Repository navigation
feat(site): show cited sources in the message action bar - #32148
Conversation
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Docs previewLinks open this pull request's preview at https://pr-32148.docs.cdr-preview.dev, which updates with each push. Check off each page once it's been reviewed. If a page changes in a later push, its checkbox clears automatically so it gets a fresh look. Pages not yet wired into the docs navigation aren't listed here. Preview sites for each built commit (1)Every built commit keeps its own preview, newest first. Previews aren't indexed by search engines and are deleted when this pull request is merged or closed. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9519d3ee03
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
jaaydenh
left a comment
There was a problem hiding this comment.
Generated by Coder Agents on behalf of @jaaydenh.
Accessibility and keyboard review of the Sources control at 9519d3e. No axe violations are introduced by this PR. Four findings are inline: two should-fix, two nits.
How it was checked: axe-core 4.11.1 (WCAG 2.0, 2.1, 2.2 A and AA, plus best practices) against the seven Sources stories in dark and light themes, and at 320px for the open popover. Then a keyboard pass in headless Chromium.
Passed
- axe:
button-name,link-name,aria-dialog-name,list,listitem,color-contrast,label-content-name-mismatch,target-size(the trigger is 127x24). - Tab order is Copy, Attachments, Sources, matching the visual order.
- Enter and Space open the popover and focus moves into the "Sources" dialog. Escape closes it and returns focus to the trigger.
- Focus ring contrast is 7.9:1 and 7.0:1 in dark, 5.2:1 and 4.7:1 in light, on the trigger and on the links.
- At 320px there is no horizontal page scroll, and the popover scrolls vertically.
Notes, not findings
- Pre-existing: the "3 pages" label at
WebSearchTool.tsx:127(text-content-secondary/60) is 3.38:1 in dark and 2.9:1 in light. It fails on the merge base too and this PR does not touch that file. - Visual only: on hover the trigger background changes but the icon circles at line 44 do not.
TurnAttachmentshandles this withgroup-hover/attachments:classes.
Not checked: a real screen reader (accessible names were read from Chromium's accessibility tree), the running app (stories only), and forced-colors mode.
Move cited web pages from the separate source-pill row into a compact Sources control in the message action bar, alongside Copy and Attachments. Stacked site icons open a list of cited page titles and hosts, while each search row keeps the pages that search found. Non-HTTP(S) sources remain unlinked.
Collect and deduplicate citations across each completed turn so they appear with its final assistant output, including when steps are collapsed. Add regression tests, Storybook coverage, and documentation for the control.
Refs CODAGT-1476.
Review follow-up
Long source titles wrap, non-web URLs remain fully visible, and new-tab links have visual and accessible indicators. Opening Sources focuses the first web link, with dialog fallback when no link exists. The action bar wraps on narrow screens.
Attachments and citations share turn splitting, host selection, and completion checks. Folded-block source lookup skips row slicing when a row has no citations. A synthetic 10,000-row helper benchmark improved from 23.9 ms to 5.2 ms (median); this is not an end-to-end rendering measurement.