Repository navigation
feat(site): count every PR in the chats sidebar - #29547
Conversation
ee5ee90 to
6cede4d
Compare
6cede4d to
71867c0
Compare
71867c0 to
a63f9cf
Compare
a63f9cf to
65c75b4
Compare
65c75b4 to
dc28d93
Compare
dc28d93 to
19bdbb2
Compare
Codex Review SummaryThis 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. |
There was a problem hiding this comment.
💡 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> |
There was a problem hiding this comment.
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 👍 / 👎.
There was a problem hiding this comment.
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`} |
There was a problem hiding this comment.
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 👍 / 👎.
There was a problem hiding this comment.
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
8e1127b to
36331b8
Compare
36331b8 to
b5c9351
Compare
b5c9351 to
45bce8a
Compare
45bce8a to
537f0f5
Compare
0d759bb to
90c6e51
Compare
872539d to
775e1f9
Compare
775e1f9 to
ca3de10
Compare
|
@codex review |
There was a problem hiding this comment.
💡 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)} /> |
There was a problem hiding this comment.
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 👍 / 👎.
There was a problem hiding this comment.
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.
4a0dde3 to
36a283a
Compare
cae6fa9 to
0f7e5d5
Compare
2638922 to
96fbdeb
Compare
|
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. |
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.