Repository navigation
feat(site): per-ref views in the git panel - #29083
DanielleMaywood wants to merge 4 commits into
Conversation
700032c to
65cf1d9
Compare
9169278 to
5cb2c01
Compare
65cf1d9 to
85cfa2a
Compare
064d2a7 to
f7f3b28
Compare
85cfa2a to
87b43c0
Compare
f7f3b28 to
7def130
Compare
87b43c0 to
aeceffa
Compare
7def130 to
e55688b
Compare
aeceffa to
b9af2b3
Compare
Docs previewCheck 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. |
b9af2b3 to
7f4cecc
Compare
e55688b to
eae5fbe
Compare
eae5fbe to
c66b95b
Compare
4fe2414 to
8533fe8
Compare
c66b95b to
d86382c
Compare
b3077f7 to
d0cddef
Compare
|
@codex review |
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: d0cddeffbc
ℹ️ 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".
f3c50c4 to
d18f7a4
Compare
4c58154 to
e81202d
Compare
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a7fd9d0f8f
ℹ️ 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".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 618248c436
ℹ️ 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".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7dcdd13653
ℹ️ 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".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 25eedf469c
ℹ️ 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".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e8b55e58ca
ℹ️ 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".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f8e13faf8a
ℹ️ 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".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 76ed8669b7
ℹ️ 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".
|
|
||
| // The title row must carry the selected PR's title, not the | ||
| // branch-only primary's. | ||
| screen.getByText("fix: second change"); |
There was a problem hiding this comment.
Move the selected-title presence check to Storybook
This test ends with a throwing getByText lookup, so its only outcome is that the selected title exists in the DOM. The branch-primary/older-PR state is visual coverage and should be captured in a Storybook story; keep Vitest focused on the already-covered ref-specific API request or another non-visual outcome.
AGENTS.md reference: site/AGENTS.md:L7-L7
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in 42b57ea11e. The presence test is removed. The branch-primary state moves to a new BranchPrimarySelectedPr story whose play selects the older PR, so Pixel captures the title row following the selection. The title row has no role or accessible name, so no compliant Vitest query can target it.
| <span className="truncate"> | ||
| {status.pull_request_title || | ||
| (number ? `#${number}` : "PR")} |
There was a problem hiding this comment.
Include PR numbers in multi-PR menu labels
When two tracked PRs share the same title, which is common for repeated fixes or dependency updates, both menu items render with identical visible and accessible names because the unique PR number is used only as a fallback. Users cannot determine which PR each item opens; include the number alongside the title so every action is distinguishable.
AGENTS.md reference: site/AGENTS.md:L12-L12
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in 42b57ea11e. Every menu item now renders PR #<number> <title>, matching the sidebar popover and the Git view switcher. The number is always present because branch-only rows are filtered out before classification. The selection test queries by the full name, and a new regression test selects by number alone when two PRs share a title.
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 42b57ea11e
ℹ️ 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".
| } else if (hasGitContext) { | ||
| title = "No pushed changes yet"; | ||
| body = "Once commits are pushed, the branch diff will appear here."; | ||
| } else if (hasPullRequest) { |
There was a problem hiding this comment.
Prioritize the PR-only empty state
When prTab exists but remoteDiffStats has no row, showRemoteTab makes hasGitContext unconditionally true, while it also makes the passed isGitStatusLoading false. Fresh evidence beyond the earlier resolved empty-state thread is that this ordering therefore makes the following hasPullRequest branch unreachable, so a chat with a known PR always shows the misleading “No pushed changes yet” state instead of the dedicated pending-PR state. Check hasPullRequest before the generic Git-context branch and derive loading independently.
AGENTS.md reference: site/AGENTS.md:L11-L11
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in 2697edb539. Both halves: RemoteContent now checks hasPullRequest before the generic Git-context branch, so a known PR with no status row shows the pending-PR state, and the panel passes the raw watcher isGitStatusLoading flag instead of the collapsed derivation that could never be true when a PR was known. Precedence is now loading, then pending PR, then generic no-changes. The EmptyState story screenshots the pending-PR state, and the settle test exercises both flags uncollapsed.
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2697edb539
ℹ️ 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".
7b505d9 to
3787077
Compare
49664cc to
ffb580a
Compare
The chat diff client and query cache now track every ref the chat follows, not only the primary. The GET diff client accepts a ref selector. The diff-contents query key includes the ref, so each ref keeps its own cache entry. The watch merge keys rows by ref, so a changed row for one ref leaves the other refs' rows intact, and a tombstone row removes its ref. The diff-contents invalidation prefix-matches every ref.
The git panel now shows one view per tracked ref. Selecting a ref loads that ref's diff. A chat tracks one status row per ref, and the first row is the primary. The view switcher lists one entry per ref from diff_statuses. Each entry shows the PR state and number, or the branch name when no PR exists. Selecting an entry fetches that ref's diff with its origin and branch selector. The diff body, PR title, and stats follow the selection. A selection that resolves to nothing falls back to the newest ref. The inline comment box resets when the ref switches, so a comment draft cannot leak from one PR into another.
The top bar PR chip now follows the full PR list. One PR stays a direct link. Several PRs open a menu with one link per PR; the menu item shows the PR number, so two PRs that share a title stay distinguishable. Rows that do not point to a PR stay out of the list.
The sidebar and the search results now follow the full PR list. A chat with one PR shows that PR's state icon and line stats. A chat with several PRs shows the PR count instead; one state icon cannot represent the others. Hovering the icon lists every PR, one row per PR, each with its state, number, and title.
ffb580a to
890a3aa
Compare
|
Split into smaller layers. The sidebar changes continue in the replacement PR for branch feat/chat-diff-ref-ui, based on the new git panel and top bar PRs. |
Summary
The git panel now shows one view per tracked ref. Selecting a ref loads that ref's diff. This is part 3 of 3, stacked on the API change in part 2.
Fix
diff_statuses. Each entry shows the PR state and number, or the branch name when no PR exists.originandbranchselector. The diff body, PR title, and stats all follow the selection. A selection that resolves to nothing falls back to the newest ref.changed_diff_statusevent updates only its own entry, so the other refs' cached statuses survive.Notes for review
diff_status, the primary the server picks. It does not pick the primary on the client, so the two can never disagree.Generated by Coder Agents.