Repository navigation
Description
Part of #3791. Refs #3795, #4146, #3800, #3798.
Blocked by #3795
The W4 renderer integration depends on #3795/#4146 landing. Its host metadata and kit states may be prepared independently; the complete issue remains dependency-blocked until that base is delivered.
Context
The approved W4 design puts a target row above GitHubComment in preview. The kit component requires author: GitHubPerson (GitHubCommentProps, packages/ui-kit/src/github/GitHubComment.tsx:15-24); login: null renders @ghost, meaning a deleted account. The comment tool's approval currently carries only repository, number and body (prepareWrite, packages/ui-server/src/github/host.ts:438-450), so it cannot honestly supply a poster or say whether the target is an issue or PR.
#4146 currently composes kit parts for W4 without inventing either fact. Its review added the target-kind requirement. This issue supplies the host display metadata and kit-owned unknown states needed to use the designed reusable preview. Source context was inspected at main 49b6e7c48ca9f7f6c4bfff90790c28a536ba66e0; #4146's renderer delivery retains its own source and proof identities.
Decision
Maintainer, 2026-11-17: author options 1 + 2 and target-kind option A, recorded ruling.
- Known author: show only the host GitHub tools credential's verified posting account. Resolve through a bounded credential-scoped cache; invalidate/rebind on credential changes so one credential's cached identity is never attributed to another.
- Unknown author:
GitHubCommentpreview accepts an absent author and shows The host's GitHub account as a neutral identity. Never use@ghostor a made-up/stale login for this state. Posted comments retain their existing real/deleted-author meaning. - Known target kind: show Issue or PR only from verified host target metadata bound to the same repository/number.
- Unknown target kind: show repository #number through a kit-owned neutral target-row state. Do not guess a kind or manufacture a direct link.
- Data boundary: these facts are host-owned approval display metadata only. They never enter model tool schemas/inputs/results, system prompts or provider-facing history. Unknown/failed metadata uses the neutral state without blocking an otherwise permitted write.
Always-neutral author/target alternatives were rejected because verified metadata adds useful approval context. Neutral fallbacks preserve the surface when verified metadata is unavailable.
Out of scope
Changing GitHub tool names or model-facing input/result envelopes, adding identity to provider history, changing the dedicated-credential rule, repository allow-list or per-use exact-content approval, accepting edited approval payloads, adding authority from display metadata, automatic posting, broad restyling or a renderer-owned W4 layout. No browser request may bypass the existing host detail/avatar routes.
Scope
Carry optional verified poster/target metadata from the host to the approval surface through a display-only path. Use the existing bounded GitHub transport and preserve its policy/authorization checks. Give the kit the explicit absent-author preview and unknown-kind target states, stories and focused design verification. W4 then renders the target row above the kit's GitHubComment preview; the renderer only maps the host-reported facts. Keep the approved exact body, Not posted chip, draft provenance and no posted-comment link.
Acceptance criteria
- Known poster, unknown poster, issue, PR and unknown target kind render exactly the ruled states; combine known/unknown author and kind independently. No unknown preview reads as
@ghost, Issue or PR without supporting metadata. - Host metadata is bound to the same credential and target as the pending write. Credential rotation, denied/missing identity, lookup failure, timeout and rate limit produce the neutral fallback with bounded work and no stale identity reuse.
- The renderer passes reported values to kit-owned preview/target states; it does not recreate their layouts. Posted-comment behavior and direct-link validation remain intact.
- Display metadata cannot alter the approved outbound content or be returned to the model. Exact-content comparison, repository policy, current-authority checks after approval and recorded one-time posting remain covered.
- Kit stories and actual render/browser coverage show both neutral states at 320px and wider, in both themes, with truthful accessible names and the existing draft/truncation behavior.
- Both backends' keyless provider-history guards pass unchanged. A mutation leaking display metadata into model history or inventing a known identity/type fails its named assertion; restore it and retain the receipt.
Verification
Run the affected host GitHub tests, approval transport/schema tests, kit/render tests and real browser preview coverage; run packages/ui-backend-claude/tests/provider-history.test.ts and packages/ui-backend-pi/tests/provider-history.test.ts through the normal offline wrapper. Use mocked/offline GitHub responses for credential rotation, verified metadata and lookup failures. No live credential or network-dependent test is required.
Contract impact
Optional host-to-client approval display metadata is additive: update the actual wire/HTTP/public SDK component it uses in the same CONTRACT: commit, refresh the affected API report, and include the required minor changeset. GitHub model-facing tool names/schemas/input/result meanings stay unchanged. The kit's absent preview author and unknown target kind are additive states; preserve existing non-preview semantics.
2026-11-17 decision processing: selected author 1 + 2 and host-reported target kind with neutral fallback; folded the #4146 review addition into a complete brief. Preserve the existing 0.45.0 milestone and explicit priority p2. This pass performs no product lookup, write or runtime verification.
Activity
schlessera commentedon Nov 17, 2026
Found in #4146's review: the comment tool's approval card names only
repositoryandnumber, not whether the target is an issue or a pull request, and the comment tool posts on both. #4146's preview therefore names its target asowner/repo #nwithout "Issue" or "PR". The posted result takes the kind from its validated URL (/pull/or/issues/).The W4 target row (
GitHubRef, which needskind) has the same gap as the author. Whichever option this issue chooses should also give the approval the target's kind, so the target row can be the design'sGitHubRef.Added criterion: the W4 approval's target row names the object's kind only when the host states it.
schlessera commentedon Nov 17, 2026
Decision (maintainer, 2026-11-17): Author options 1 + 2, and target-kind option A.
GitHubCommentpreview accepts an absent author and shows the neutral identity The host's GitHub account. Unknown is never@ghost, a fabricated login or a stale identity from another credential.Use the target row above the kit's
GitHubCommentpreview for W4, with kit-owned neutral states and stories. Verify known/unknown combinations, credential changes, bounded lookup failures, 320px/accessibility behavior and both backends' keyless provider-history guards. Always-neutral identity/target alternatives were rejected because verified metadata provides useful approval context; neutral fallbacks preserve usability when it is unavailable.Remove
needs: decisionand addagent-readyif no other need remains. Preserve the existing milestone and any actual integration dependency. This ruling selects the data and fallback behavior; it performs no GitHub lookup or write through the product.schlessera commentedon Nov 17, 2026
Unblocked: #3795 is closed, so
scripts/sync-project.tsis removing theblockedlabel.schlessera commentedon Nov 17, 2026
Claimed for implementation. Claim token:
claim-5dc72645. Branch:feat/4154-comment-preview-author.collisions: closure-only overlaps with open drafts (none on the cited paths); #4147 works the same GitHub UI area in parallel
schlessera commentedon Nov 17, 2026
Decision (maintainer, 2026-11-17): route the approval card's pre-approval target-kind lookup through G2 data routing, as PR #4198 does. It sends the repository and number to GitHub before approval, so it is a read. If routing refuses, the card shows
repository #numberwith no kind. The write itself stays unrouted under the #4029 ruling.fix(ui-kit): keep the draft caption on a GitHubComment preview (#4154)
fix(ui-kit): a not-posted GitHub draft shows its whole body (#4197) (#…
CONTRACT: feat(ui-server, ui-react, ui-kit): an honest poster and tar…
schlessera commentedon Nov 18, 2026
Merged in #4198 as
969a020c2through the integration lease (orchestrator merge queue for 0.45.0). Candidate confirmation passed on the exact head; the squash's own main run carries the post-merge heavy categories.