Skip to content

feat(site): count every PR in the chats sidebar - #29547

Merged
DanielleMaywood merged 0 commit into
feat/chat-diff-ref-topbarfrom
feat/chat-diff-ref-ui
Sep 23, 2026
Merged

DanielleMaywood merged 0 commit into
feat/chat-diff-ref-topbarfrom
feat/chat-diff-ref-ui

Conversation

@DanielleMaywood

@DanielleMaywood DanielleMaywood commented Sep 18, 2026 •

Copy link
Copy Markdown
Collaborator

Part 6 of 6. Depends on #29545.

The chats sidebar and search results now count every PR in diff_statuses, not only the primary ref. A chat with one PR shows that PR's state icon and line stats, even when the primary ref is a newer branch without a PR. A chat with several PRs shows a PR count instead of a single state icon, with no line stats. Screen readers hear "N pull requests".

In the sidebar tree, a chat with several PRs gets a tooltip on its link that lists each PR's state, number and title. It opens on hover or keyboard focus, and each PR's state is announced to screen readers.

Replaces #29083, split into smaller layers.

Generated by Coder Agents.

@DanielleMaywood DanielleMaywood added the experimental Changes that might not necessarily be merged, until its approved to proceed with. label Sep 18, 2026
@DanielleMaywood
DanielleMaywood force-pushed the feat/chat-diff-ref-ui branch 2 times, most recently from ee5ee90 to 6cede4d Compare September 18, 2026 12:14
@DanielleMaywood DanielleMaywood removed the experimental Changes that might not necessarily be merged, until its approved to proceed with. label Sep 21, 2026
@DanielleMaywood
DanielleMaywood marked this pull request as ready for review September 21, 2026 10:59
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 21, 2026 •

Copy link
Copy Markdown

Codex Review Summary

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-23T08:59:29.695725Z 4a0dde3 Manual request
ℹ️ 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.

@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: 19bdbb2ce8

ℹ️ 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".

asChild
className="inline-flex shrink-0 items-center gap-0.5"
>
<span>

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Make the multi-PR tooltip keyboard reachable

For keyboard-only users, this plain span never receives focus, so Radix cannot open the tooltip on focus and the per-PR titles, numbers, and states are available only by pointer hover. Make the trigger keyboard-focusable with appropriate semantics, or expose the same details through a keyboard-reachable control.

AGENTS.md reference: site/AGENTS.md:L12-L12

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Fixed in 4a0dde3, by making the chat link itself the tooltip trigger. For multi-PR rows, <TooltipTrigger asChild> wraps the existing NavLink: keyboard focus on the link opens the PR list, and Radix wires aria-describedby so the per-PR titles, numbers, and states are announced. No focusable descendant nests inside the anchor (a span with tabIndex, like a button, is invalid inside <a>), and no extra tab stop is added. The tradeoff is that hovering anywhere on a multi-PR row opens the tooltip, which we accepted. A test tabs to the link and asserts the describedby relation and the PR list in the accessible description.

Generated by Coder Agents

</span>
<GitPullRequestArrowIcon
role="img"
aria-label={`${prStatuses.length} pull requests`}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Prevent the PR count from being announced twice

For screen-reader users focusing the containing chat link, the visible count already contributes 2 to its accessible name, and this adjacent image contributes 2 pull requests, producing a redundant announcement such as "2 2 pull requests." Hide the standalone count from assistive technology or give the combined trigger one nonduplicated accessible name.

AGENTS.md reference: site/AGENTS.md:L12-L12

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Fixed in 4a0dde3. The count glyph is now a single named element (role="img" aria-label="N pull requests") with the count span and the PR icon marked aria-hidden, so the chat link announces the count once instead of "2 2 pull requests". A test asserts the link's accessible name contains the count once and not twice.

Generated by Coder Agents

@DanielleMaywood
DanielleMaywood force-pushed the feat/chat-diff-ref-ui branch 2 times, most recently from 8e1127b to 36331b8 Compare September 21, 2026 12:38
@DanielleMaywood
DanielleMaywood force-pushed the feat/chat-diff-ref-ui branch 2 times, most recently from 0d759bb to 90c6e51 Compare September 22, 2026 10:24
@DanielleMaywood
DanielleMaywood force-pushed the feat/chat-diff-ref-ui branch 2 times, most recently from 872539d to 775e1f9 Compare September 22, 2026 11:29
@DanielleMaywood

Copy link
Copy Markdown
Collaborator Author

@codex review

@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: 4a0dde3b23

ℹ️ 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".

key={`${status.remote_origin ?? ""}/${status.git_branch ?? ""}/${index}`}
className="flex items-center gap-1.5 text-left"
>
<Icon className={cn("size-3.5 shrink-0", config.className)} />

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Expose each tooltip PR state to assistive technology

When a screen-reader user focuses a multi-PR chat link, aria-describedby exposes the PR numbers and titles, but each open/draft/merged/closed state is represented only by this unlabeled icon and its color. Although the trigger is now keyboard reachable, the fresh code still omits an accessible name for each state icon, so add the corresponding config.label as accessible text or an aria-label.

AGENTS.md reference: site/AGENTS.md:L12-L12

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Fixed in 2638922. Each tooltip row now carries its state as visually hidden text, so the chat link's aria-describedby description announces it: screen readers hear "Pull request open PR #1 <title>" per row.

An icon aria-label does not work in this position: the accessible description computation skips both role="img" labels and plain span aria-label values when building the description from the tooltip subtree. Hidden text is content, so it flows through. The single-PR glyph keeps its role="img" label, which works there because it is the node itself being named.

The existing multi-PR keyboard test now asserts the description contains each row's state.

This reply was generated by Coder Agents.

@DanielleMaywood
DanielleMaywood force-pushed the feat/chat-diff-ref-ui branch 2 times, most recently from cae6fa9 to 0f7e5d5 Compare September 23, 2026 13:04
@linear-code

linear-code Bot commented Sep 23, 2026

Copy link
Copy Markdown

CODAGT-990

@DanielleMaywood
DanielleMaywood merged commit 96fbdeb into main Sep 23, 2026
@DanielleMaywood
DanielleMaywood deleted the feat/chat-diff-ref-ui branch September 23, 2026 17:52
@github-actions github-actions Bot locked and limited conversation to collaborators Sep 23, 2026
@DanielleMaywood

Copy link
Copy Markdown
Collaborator Author

This pull request was merged after its branch was accidentally flattened, so the merged diff does not contain the changes. The same work now lives in #29832.

Coder Agents generated this comment.

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.

1 participant