Problem#
The right panel forgets that it was maximized. Maximize it, close it, and open it again, and it comes back at its normal width. Fixes #46884.
The panel toggle calls closePreviewPanel, which cleared maximized in the right-panel store just before closing. The maximized layout is already gated by isOpen, so the chat column comes back while the panel is closed either way; clearing the stored flag only lost the user's choice.
Change#
Keep the stored maximized flag when the panel closes. The panel reopens at the size the user left it, and the titlebar still offers Restore panel size to return to the normal width. One client-side line; no server, contracts, or native changes.
Verification#
- New browser test
reopening the right panel keeps it maximized: open the panel, maximize it, close it, reopen it, and assert Restore panel size is still shown. The test times out on the old code and passes with the change.
ChatView.browser.test.tsx plus rightPanelStore.test.ts: 108 tests pass.
pnpm run check:changed: format, lint, knip, typecheck (2 packages), browser test, and React Compiler all pass.
- Before/after captured in the dev web app on Linux at 1280×800. The "before" state is the reopened panel at normal width; the "after" state is the same flow with the panel maximized:

Full size: before, after.
Model: EXP DEEP 4.1 Flash (experientiallabs/deepseek-v4.1-flash-1017) via OpenCode in T3 Code.
No actionable comments were generated in the recent review.
Walkthrough
Closing the right panel no longer clears its maximized state. A browser test opens the Files panel, maximizes it, closes and reopens it, and checks that the restore-size control remains visible.
Changes: Right panel state
apps/web/src/components/chat/useRightPanelActions.ts,apps/web/src/components/ChatView.browser.test.tsxEstimated code review effort: 2 (Simple) | ~8 minutes
Change: Bug fix · Severity of issue fixed: Low
Suggested reviewers:
juliusmarminge,stienswoutMerge Risk:
Minimal · up to
91b08The right panel now reopens maximized if it was maximized when closed, and the user can still restore its size. The change is small, client-only and covered by a browser test, so merge risk is minimal.
Pre-merge checks:
4
#46884under the bug-fix scope. The Problem section gives the reproduction steps and expecte…#46884] requires that a maximized right panel reopen maximized after close and reopen. At the reviewed head,closePreviewPanelinapps/web/src/components/chat/useRightPanelActions.tsno longer ca…apps/web/src/components/ChatView.browser.test.tsx(+34 lines) and the one-line removal in `apps/web…Full details: Title check
Explanation
The title "fix(web): reopening the right panel keeps it maximized" matches the main change. The PR stops closePreviewPanel from clearing the stored maximized flag, so a maximized right panel stays maximized after it is closed and reopened. The title uses a conventional commit prefix and names the affected area (web) and the behavior.
Full details: Description check
Explanation
The description follows the template. It has Problem, Change, and Verification sections, and it links issue
#46884under the bug-fix scope. The Problem section gives the reproduction steps and expected behavior. The Change section explains the one-line fix. The Verification section lists a new browser test, the test results, check runs, and before/after screenshots. The Scope section is only partly covered: the description cites the linked issue but does not explicitly say why the change is a bug fix and not a feature. The template's optional model attribution is present.Full details: Linked Issues check
Explanation
[
#46884] requires that a maximized right panel reopen maximized after close and reopen. At the reviewed head,closePreviewPanelinapps/web/src/components/chat/useRightPanelActions.tsno longer callsuseRightPanelStore.getState().setMaximized(activeThreadRef, false)beforeclose(activeThreadRef). That reset was the only code path in this flow that cleared the storedmaximizedflag. The diff against the merge base shows this one-line removal. Reopening goes throughtoggleVisibility, and the maximize toggle sets the flag throughsetMaximized, so the retained flag controls the reopened layout. The PR reports a new browser test,reopening the right panel keeps it maximized, which fails on the old code and passes with the change. Limits:rightPanelStore.tswas truncated at 16000 bytes, so I did not confirm thatclose()ortoggleVisibility()leavemaximizeduntouched. The browser test diff could not be read because its blob is missing from the checkout, so I did not re-run or inspect it. The verdict relies on the diff and the author's reported test result.Full details: Out of Scope Changes check
Explanation
The whole-PR diff against the merge base has two files according to the summary: a browser test in
apps/web/src/components/ChatView.browser.test.tsx(+34 lines) and the one-line removal inapps/web/src/components/chat/useRightPanelActions.ts. The removed line is directly tied to#46884. The test covers the same reopen flow. No server, contracts, or native changes are reported. The changed blob for the test file was unavailable, so its contents were not inspected. Its described scope matches the issue.Finishing Touches
Generate unit tests (beta)
be49a100-4658-47b7-bf7d-e892b822b4c8Reviewing files that changed from the base of the PR and between d5ebed78e9f0b4f8507b14a68562cf7a6bdf682a and 91b0858e32137f161e978771101937f5060059f8.
apps/web/src/components/ChatView.browser.test.tsxapps/web/src/components/chat/useRightPanelActions.tsIncluded review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.