Skip to content

feat(site): show cited sources in the message action bar - #32148

Merged
jakehwll merged 2 commits into
mainfrom
jakehwll/CODAGT-1476-web-search-sources
Nov 16, 2026
Merged

jakehwll merged 2 commits into
mainfrom
jakehwll/CODAGT-1476-web-search-sources

Conversation

@jakehwll

@jakehwll jakehwll commented Nov 13, 2026 •

Copy link
Copy Markdown
Collaborator

🤖 This PR was modified by Coder Agents on behalf of Jake Howell.

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.

image

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.

@jakehwll
jakehwll temporarily deployed to main November 13, 2026 00:33 — with GitHub Actions Inactive
@jakehwll
jakehwll temporarily deployed to main November 13, 2026 00:33 — with GitHub Actions Inactive
@linear-code

linear-code Bot commented Nov 13, 2026 •

Copy link
Copy Markdown

CODAGT-1476

CODAGT-1577

@jakehwll
jakehwll temporarily deployed to main November 13, 2026 00:35 — with GitHub Actions Inactive
@jakehwll
jakehwll requested a review from mafredri November 13, 2026 00:35
@jakehwll
jakehwll marked this pull request as ready for review November 13, 2026 00:35
@jakehwll
jakehwll requested a review from a team as a code owner November 13, 2026 00:35
@jakehwll
jakehwll temporarily deployed to main November 13, 2026 00:35 — with GitHub Actions Inactive
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-13T00:38:59.543827Z 9519d3e Draft marked ready
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@jakehwll
jakehwll temporarily deployed to docs-preview November 13, 2026 00:37 — with GitHub Actions Inactive
@github-actions

Copy link
Copy Markdown
Contributor

Docs preview

Links 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.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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 jaaydenh left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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. TurnAttachments handles this with group-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.

@DanielleMaywood DanielleMaywood left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-approving

@jakehwll
jakehwll added this pull request to stack #32252 November 16, 2026 09:25
@jakehwll
jakehwll merged commit acafa54 into main Nov 16, 2026
36 of 38 checks passed
@jakehwll
jakehwll deleted the jakehwll/CODAGT-1476-web-search-sources branch November 16, 2026 09:25
@jakehwll
jakehwll temporarily deployed to main November 16, 2026 09:25 — with GitHub Actions Inactive
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 16, 2026

This branch had an error being deployed

1 failed and 1 inactive deployments
docs-preview — f798f0b6 Deployed Nov 16, 2026 by jakehwll via cleanup #108
main — f798f0b6 Deployed Nov 16, 2026 by jakehwll via cla #257797
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants