Registry Mirror
Skip to content

Conversation

@only21mil

Copy link
Copy Markdown
Contributor

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

ddb9d3ec86af (before) 5090d101c36a (after)
PR #31574 Description reopened after switching right-panel tabs (Checks, below the fold, also collapsed again).
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.
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 reopened after switching right-panel tabs.
Issue #29099 Description stays collapsed 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).

Generated with Gemini 4 Neon in T3 Code Nightly

@macroscopeapp

macroscopeapp Bot commented Dec 3, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved at 5090d10

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.

@coderabbitai

coderabbitai Bot commented Dec 3, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

Important

Review skipped

Review was skipped as selected files did not have any reviewable changes.

Run configuration

Commits

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.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Suggested reviewers: chenxin-yan, stienswout

Merge Risk: Minimal · previous review 5090d

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: Passed 4

Check name Status Explanation
Title check Passed 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 Passed 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 Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed 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
Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between c670bed and 5090d10.

Files selected for processing: 3

  • apps/web/src/components/issue/IssueDetailPanel.tsx
  • apps/web/src/components/pullRequest/PullRequestSummaryTab.browser.test.tsx
  • apps/web/src/components/pullRequest/PullRequestSummaryTab.tsx

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 7 remain after this review.

@juliusmarminge juliusmarminge added the takeover:in-progress A takeover lead is working on this PR label Dec 3, 2026
@juliusmarminge

Copy link
Copy Markdown
Member

/recheck-vouch

@github-actions github-actions Bot added the vouch:unvouched Author is not yet trusted in the VOUCHED list. label Dec 3, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot added the size:S 10-29 changed lines (additions + deletions). label Dec 3, 2026
@juliusmarminge

Copy link
Copy Markdown
Member

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.

It stays open for a person to finish or close.

@juliusmarminge juliusmarminge added takeover:blocked Takeover blocked; reason in the PR body and removed takeover:in-progress A takeover lead is working on this PR labels Dec 3, 2026
@only21mil only21mil closed this Dec 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:S 10-29 changed lines (additions + deletions). takeover:blocked Takeover blocked; reason in the PR body vouch:unvouched Author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants