📛 feat(notes): show agent author in inline notes and popovers#293
Open
sdougbrown wants to merge 1 commit into
Open
📛 feat(notes): show agent author in inline notes and popovers#293sdougbrown wants to merge 1 commit into
sdougbrown wants to merge 1 commit into
Conversation
6 tasks
Contributor
Confidence Score: 4/5Safe to merge; the change is narrowly scoped to title rendering and falls back correctly when no author is present. The author-aware title logic is straightforward, backward-compatible, and well-tested. The only notable issue is that src/ui/components/panes/AgentInlineNote.tsx — duplicated title-building logic that should share a single source of truth with agentPopover.ts. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[AgentAnnotation\nauthor?: string] --> B[AgentInlineNote]
A --> C[AgentCard]
B --> D["inlineNoteTitle(noteIndex, noteCount, author)"]
C --> E["buildAgentPopoverContent({ author })"]
E --> F["agentPopoverTitle(noteIndex, noteCount, author)"]
D --> G{author present?}
F --> G
G -- yes, noteCount > 1 --> H["'author N/total'"]
G -- yes, noteCount = 1 --> I["'author'"]
G -- no, noteCount > 1 --> J["'AI note N/total'"]
G -- no, noteCount = 1 --> K["'AI note'"]
Reviews (1): Last reviewed commit: "📛 feat(notes): show agent author in inl..." | Re-trigger Greptile |
ee52b4f to
2864ede
Compare
The AgentAnnotation schema has carried an optional `author` field end-to-end (sidecar JSON, session daemon, wire protocol) but the TUI never surfaced it. Render it in the note title bar and the matching agent popover so reviewers can tell which agent left which note when multiple agents annotate the same diff. Falls back to "AI note" when author is absent for backward compat.
2864ede to
6ae1e5f
Compare
Member
|
@sdougbrown Makes total sense. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Surface the optional
authorfield on agent annotations in the TUI. The schema has carriedauthorend-to-end through sidecar JSON, the session daemon, and the wire protocol, but the inline note's title bar always rendered a generic "AI note" label. Multi-agent reviews are hard to read at a glance because every note looks the same.With this change:
inlineNoteTitle()inAgentInlineNote.tsxand the matching popover title inAgentCard.tsx+agentPopover.tsare author-aware."AI note"when an annotation has no author (backward compat).examples/3-agent-review-demo/agent-context.jsonnow uses named authors so the demo exercises the new path.No file is renamed, no public API changes. The annotation schema itself was unchanged.
Verified
bun run typecheckbun run lintbun test— only the pre-existing baseline failures onupstream/main(5 jj-binary-missing + 9 session-daemon-timing) reproduce; no new failures.bun run test:integration(PTY)bun run test:tty-smokeexamples/3-agent-review-demo/change.patchwith--agent-context examples/3-agent-review-demo/agent-context.json.New unit coverage in
ui-components.test.tsxexercises: author rendering, fallback when author is absent, multi-note index suffixing, and special-character authors. The popover title path is covered by the existingAgentCardsnapshot tests.Related
Paired with #294, which adds per-author colour tinting on top of these title changes. The two are intended to merge in order — this PR first, since #294's colour tests assert the author-in-title rendering added here.