You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Collapsing or expanding a section in a pull request's Summary tab (Description, Checks, Comments) or in an issue panel (Description, Linked pull requests, Activity) was lost when you switched right-panel tabs and came back: the tab unmounts while hidden, and PullRequestSection kept its open state only in local state.
PullRequestSection now takes an optional openKey and remembers each toggle in a bounded module-level LRUCache, as resolved conversations and expanded comments already do. A link that reveals a section still opens it at once and records it open in the cache so returning to the tab does not re-collapse it. Summary sections are keyed by environment and PR URL, and issue sections reuse the panel's scroll-position key. Comments now gets a React key like Description and Checks, so switching PRs in place starts from that PR's own state.
Evidence
Setup. Linux x86_64, light theme, 1440x900 Chromium, isolated dev state on pingdotgg/t3code with a settled Replay (dev) showcase thread (tested by an AI agent).
Steps. Open PR #31574 → collapse Description, expand Checks → switch to Linked items → switch back (Issue #29099: collapse Description → switch to Linked items → switch back).
PR #31574 Description reopened after switching right-panel tabs (Checks, below the fold, also collapsed again).
PR #31574 Description stays collapsed and Checks stays expanded after switching right-panel tabs.
Issue #29099 Description reopened after switching right-panel tabs.
Issue #29099 Description stays collapsed after switching right-panel tabs.
Checks and controls
PullRequestSummaryTab.browser.test.tsx: new case fails on ddb9d3ec86af (aria-expanded received "true", expected "false") and passes on 5090d101c36a (13/13), collapsing Description and verifying it stays collapsed after remount; 2x100 parallel stress runs passed 200/200 with 0 failures.
IssueDetailPanel.browser.test.tsx: 10/10 passed.
vp run check:changed ddb9d3ec86af: format, lint, knip, typecheck, 23 browser tests, and React Compiler coverage all passed.
Controls: a second PR (fix(web): name cut-off model picker labels in full on hover #29140) keeps its own default sections; an anchor link to Checks (selectedUrl=.../checks) opens Checks immediately; resolved conversations and expanded long comments stay open across tab switches; a full page reload resets in-memory section state back to defaults.
Not shown.
Desktop Electron shell (shares web bundle, not separately launched).
Mobile (non-collapsible PullRequestSectionHeading, unaffected).
Macroscope's review found this PR approvable — PR and issue sections now remember expansion choices across right-panel tab switches while preserving their initial defaults. State is kept in a bounded browser-memory cache, with no persistent-data or external-system changes.
You can add or adjust custom eligibility rules. Learn more.
Reviewing files that changed from the base of the PR and between 5090d10 and 5227acd.
You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.
Use the checkbox below for a quick retry:
Trigger review
No actionable comments were generated in the recent review.
Walkthrough
Keyed sections retain their open state across component unmounts. Pull request summary and issue detail sections now receive scoped keys. A browser test checks that a collapsed pull request Description section remains collapsed after remount.
Changes: Section open-state retention
Layer / File(s)
Summary
Keyed section state apps/web/src/components/pullRequest/PullRequestSummaryTab.tsx
PullRequestSection accepts an optional openKey and uses an LRU cache to restore and save open state for keyed sections. Reveal-count changes also save the open state.
Summary and issue section keys apps/web/src/components/pullRequest/PullRequestSummaryTab.tsx, apps/web/src/components/issue/IssueDetailPanel.tsx, apps/web/src/components/pullRequest/PullRequestSummaryTab.browser.test.tsx
Description, Checks, and Comments sections in the pull request summary, and Description, Linked pull requests, and Activity sections in the issue panel, receive scoped keys. The browser test checks collapsed Description state after remount.
This change keeps collapsible section state across right-panel tab remounts. No concrete defects were found, so the merge risk is minimal.
Pre-merge checks: 4
Check name
Status
Explanation
Title check
The title names the fix and the affected area: PR and issue collapsible sections keep their open state across right-panel tab switches. This matches the main change in the changeset, which adds an opt…
Description check
The description follows the template's sections. It has a Problem section that explains the lost open state when the tab unmounts. It has a Change section that explains the openKey and LRUCache approa…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Title check
Explanation
The title names the fix and the affected area: PR and issue collapsible sections keep their open state across right-panel tab switches. This matches the main change in the changeset, which adds an optional openKey and an LRU cache to PullRequestSection. The title uses a conventional commit prefix and reads as a clear, specific summary. It is 79 characters, which is slightly long but acceptable.
Full details: Description check
Explanation
The description follows the template's sections. It has a Problem section that explains the lost open state when the tab unmounts. It has a Change section that explains the openKey and LRUCache approach and the keying scheme. Verification is detailed, with before/after screenshots, specific test results, stress-run counts, and a list of controls. It states what was not checked (Electron shell and mobile). The Scope section is weaker: it does not link a dedicated issue for the bug and does not say why no issue is needed. The template's Scope guidance asks for an issue link or a reason for none. The description also refers to a commit and PR outside this repository, and the top-level comment block was kept, which is acceptable. Overall the description is mostly complete.
Finishing Touches
Generate unit tests (beta)
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 7 remain after this review.
The automated pipeline stopped on this pull request and will not merge it:
the proof has no capture anyone can open:
The runner stopped on the splash screen before the reproduction controls appeared on both attempts, so no before/after captures or behavioral verdict could be produced.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
size:S10-29 changed lines (additions + deletions).takeover:blockedTakeover blocked; reason in the PR bodyvouch:unvouchedAuthor is not yet trusted in the VOUCHED list.
2 participants
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Collapsing or expanding a section in a pull request's Summary tab (Description, Checks, Comments) or in an issue panel (Description, Linked pull requests, Activity) was lost when you switched right-panel tabs and came back: the tab unmounts while hidden, and
PullRequestSectionkept its open state only in local state.PullRequestSectionnow takes an optionalopenKeyand remembers each toggle in a bounded module-levelLRUCache, as resolved conversations and expanded comments already do. A link that reveals a section still opens it at once and records it open in the cache so returning to the tab does not re-collapse it. Summary sections are keyed by environment and PR URL, and issue sections reuse the panel's scroll-position key. Comments now gets a Reactkeylike Description and Checks, so switching PRs in place starts from that PR's own state.Evidence
Setup. Linux x86_64, light theme, 1440x900 Chromium, isolated dev state on
pingdotgg/t3codewith a settledReplay (dev)showcase thread (tested by an AI agent).Steps. Open PR #31574 → collapse Description, expand Checks → switch to Linked items → switch back (Issue #29099: collapse Description → switch to Linked items → switch back).
PR #31574 Description reopened after switching right-panel tabs (Checks, below the fold, also collapsed again).
PR #31574 Description stays collapsed and Checks stays expanded after switching right-panel tabs.
Issue #29099 Description reopened after switching right-panel tabs.
Issue #29099 Description stays collapsed after switching right-panel tabs.
Checks and controls
PullRequestSummaryTab.browser.test.tsx: new case fails onddb9d3ec86af(aria-expandedreceived"true", expected"false") and passes on5090d101c36a(13/13), collapsing Description and verifying it stays collapsed after remount; 2x100 parallel stress runs passed 200/200 with 0 failures.IssueDetailPanel.browser.test.tsx: 10/10 passed.vp run check:changed ddb9d3ec86af: format, lint, knip, typecheck, 23 browser tests, and React Compiler coverage all passed.selectedUrl=.../checks) opens Checks immediately; resolved conversations and expanded long comments stay open across tab switches; a full page reload resets in-memory section state back to defaults.Not shown.
PullRequestSectionHeading, unaffected).Generated with Gemini 4 Neon in T3 Code Nightly