Repository navigation
feat(site/src/pages/AgentsPage/components): add the chat overview card view - #31409
Merged
Merged
Conversation
jaaydenh
reviewed
Nov 3, 2026
jaaydenh
reviewed
Nov 3, 2026
Collaborator
|
@ThomasK33 The changes section feels odd here because its actually a list of repositories. Why not call this section Repos and list the names of the repositories, and make the branch name the tooltip? |
Member
Author
…d view Add ChatOverviewCardView, the card that a later change shows in the chat's top-right corner while the right panel is closed. It lists the chat cost, the uncommitted changes per repository, the pull requests, and the attachments. A row opens the matching right panel tab through onOpenTab. A clean repository shows +0 -0, so the card has a Changes row when AI Gateway turns cost off. Nothing mounts the view yet.
…d view Rename the view file to ChatOverviewCardView.tsx, so the container in a later change can take ChatOverviewCard.tsx, as AgentChatPage does. Rows now call onOpenTarget with a target object, so the deep links later only add a view to it. A titled OverviewListSection replaces the repeated "if not empty, section around a list" blocks, and RepoDiffStat holds the +0 -0 placeholder. A repository without changes is no longer a button: the Git panel lists only repositories with changes, so the row had nothing to open.
…t into its section and name the clean repository check
…ard labels in a tooltip
…ooltip through its accessible description
…iew card comments Keep the JSDoc on exported symbols and the comments that explain non-obvious behavior (cost states, subagent cost scope, attachment order, the clean repository badge, toggle focus, and why rows have tooltips). Drop comments that restate names or the code below them, and the per-story doc comments.
…accessibility review
…y for the overview card rows
… role in the clean repository test
…ins in the overview card with padding The card now pads by px-1.5 and its headings, empty and loading states, and rows pad themselves, so rows no longer pull outward with -mx-1.5. Text, icons, and hover areas stay in place; section dividers run 6px closer to the card edge.
… in the overview card The Changes section listed one row per repository but labeled each row with its branch, so two repositories on the same branch looked the same, and the toggle counted repositories as changes. Rename the section to Repositories, label each row with the repository name, and show the branch as the subtitle.
…ies in the overview card Show "No branch" when HEAD is detached instead of an empty subtitle, use a repository icon now that rows name repositories, and drop a test assertion on rendered output that the tab order test already covers.
jaaydenh
force-pushed
the
tk/overview-card-view
branch
from
November 9, 2026 11:46
4782f01 to
2574f0a
Compare
jaaydenh
approved these changes
Nov 9, 2026
This branch was previously deployed
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Adds
ChatOverviewCardView, a small card that lists a chat's cost, its repositories with their uncommitted line counts, the pull requests, and the attachments. Nothing mounts the view yet, so this PR changes no page. #31412 mounts it in the chat's top-right corner while the right panel is closed.A row calls
onOpenTarget({ tabId })with the right panel tab that holds its details: Summary for cost and attachments, Git for repositories and pull requests. A repository row shows the repository's folder name, with its branch below it, or "No branch" when HEAD is on no branch. A repository without uncommitted changes shows+0 −0as plain text, with no hover state and no click, because the Git panel has nothing to show for it. A button row's label truncates in the 16rem card. When the label or subtitle is cut off, a tooltip shows it in full on hover and on keyboard focus. A row that fits gets no tooltip, so a screen reader does not hear its text twice. The plain-text row wraps instead, and it takes no tab stop. Long lists show three rows and a toggle that names the section, such as "Show all 5 repositories" and "Show fewer repositories". While the card is empty and loading, it shows skeleton rows in astatusregion that reads "Loading overview", and the card is markedaria-busy. The card has no animation.The code comes from the prototype in #31260 (do not merge), adapted to the
MessageAttachmenttype from #31140. #31260 stays the hands-on reference for the whole card.The card with a long list, where the third repository has no branch:
The expanded list, and a clean repository without cost:
A repository row whose branch is cut off, on hover:
The loading state:
How to test
pages/AgentsPage/ChatOverviewCardViewand step through the stories.TruncatedRowTooltiphovers a repository row whose branch is cut off.pnpm exec vitest run --project=unit src/pages/AgentsPage/components/ChatOverviewCardView.test.tsxinsite/. The tests check the target each row sends, that a clean repository row is not a button, that a truncated row's tooltip opens on hover, that a row that fits gets no tooltip, and that Tab skips a clean repository row.What to look at first
OverviewRow: one row renders as a button withonClick, or as plain text without it, inside the sharedTooltip.OverviewListSection: the shared "title, first three rows, toggle" list for Repositories, Pull requests, and Attachments.hasChangesandRepoDiffStat: the clean repository rule lives in one predicate.Review history
Review follow-up: the Changes section listed repositories but labeled each row with its branch, so two repositories on the same branch looked the same, and the toggle counted repositories as changes. The section is now Repositories: each row shows the repository name, with the branch (or "No branch") as the subtitle and a repository icon. The view model gained
name, and #31590 fills it. The stack above was updated by merges.The repository's frontend-deep-review ran three rounds on the first version, then one strict code quality review ran, then a polish pass and one final review round (a code quality review plus frontend-deep-review) ran on the whole stack.
Polish pass changes in this PR:
ChatOverviewCardView.tsx. The container lives inChatOverviewCard.tsxin feat(site/src/pages/AgentsPage/components): add the overview card container #31590 and the toggle joins it in feat: show the overview card in Coder Agents chats #31412, likeAgentChatPageandAgentChatPageView.onOpenTab(tab)becameonOpenTarget({ tabId }), so feat: open the exact Git view from the overview card rows #31478 only adds a Git view to the target. The existing row test now expects{ tabId: tab }instead oftab. That is the only changed assertion, and it follows the rename.OverviewListSection,RepoDiffStat, andhasChanges.Final round fixes: folded
OverviewListintoOverviewListSection, named the clean repository checkhasChanges, madegetCostSubtitlereturnundefinedinstead of an empty string, and shortened the card's doc comment.Accessibility review from Jaayden (four threads) and an audit against site/AGENTS.md "Accessibility and robustness", FE6 and the frontend-deep-review SA6 checkpoint:
tabIndex, no tooltip, nooxlintexception, and its label wraps. This reverses the follow-up fix below. The keyboard test now checks that Tab skips the row and lands on the next button, found by role.role="status"with screen reader text, and the card getsaria-busy.aria-expandedand names the section in its visible label.ResizeObserveras the Git panel does for its PR title. New test: "adds no tooltip to a row whose label fits".TruncatedRowKeyboardFocusscreenshots the focus ring and the tooltip from the keyboard.aria-expandedon the toggle (the review asked for one state signal), moving focus after a subagent link opens another chat (the sidebar chat links behave the same way), and moving focus when the window shrinks below 84rem while focus is in the card (rare).useCallbackfor the measuring ref. The React Compiler memoizes it, and the frontend rules forbid manual memoization in compiled folders.origin/maininto this branch and carried it up the stack by merges, without a force push.Follow-up fixes, after the final round:
Tooltipprimitive. The plain-text row getstabIndex={0}and anoxlintexception with its reason, asSecretsTable.tsxdoes, so the keyboard can open its tooltip. Its earlier "no focus" behavior changes for that reason only.renderComponent, which adds the tooltip provider. No existing assertion changed.TruncatedRowTooltipgives the open tooltip a screenshot.Skipped in the polish pass:
coversWholeTree. It moves a conditional into the container and changes the testedgetOverviewCostcontract without deleting a branch.ChatSummaryin an unrelated PR.CostRowcomponent from the final round. It overlaps the cost model item above and saves about three lines.Declined in earlier rounds:
mockRepo,mockAttachment) instead of namedMock*constants. They build view-model rows for one component, not shared API entities.getPRIconConfigandgetAttachmentDisplayNameare shared helpers with their own coverage.repoBranchLabel(root, repo), the same label as the Git panel.Generated with
xum• Model:anthropic:claude-opus-5-5• Thinking:high