Skip to content

fix(web): remember maximized browser when reopening side panel - #30121

Open
digitalbase wants to merge 1 commit into
pingdotgg:mainfrom
digitalbase:fix/remember-browser-maximized
Open

digitalbase wants to merge 1 commit into
pingdotgg:mainfrom
digitalbase:fix/remember-browser-maximized

Conversation

@digitalbase

@digitalbase digitalbase commented Nov 3, 2026 •

Copy link
Copy Markdown

before

t3-code-maximise-lost.mp4

after

T3.Code.Beta.with.fix.mp4

Closing the side panel with its toggle shortcut clears its saved maximized state. Reopening the Browser panel therefore restores the narrow layout, forcing users to maximize it again each time.

Preserve the per-thread size preference when hiding the panel. The existing open-state guard still restores the chat while the panel is hidden, and the maximize/restore control still changes the saved preference. This is a small, focused fix to the existing panel toggle behavior.

Verification on macOS Apple Silicon:

  • The browser regression test fails on the original code because the reopened panel's maximized value is undefined, and passes with the fix.
  • vp run check:changed upstream/main --concurrency 2 passes formatting, lint, both Knip checks, affected typechecks, the browser test, and the React Compiler check.
  • vp run dist:desktop:artifact --platform mac --target dir --arch arm64 builds and validates the upstream T3 Code app bundle.
  • Before/after recordings have been captured by the author and will be uploaded to this PR after creation.

Reproduction: open the side panel, select Browser, maximize it, close the panel using the toggle shortcut, and reopen it using the same shortcut. The panel should remain maximized.

Model: GPT-6.1 Sol. Harness: Codex in T3 Code.

@github-actions github-actions Bot added vouch:unvouched PR author is not yet trusted in the VOUCHED list. size:XS 0-9 changed lines (additions + deletions). labels Nov 3, 2026
@macroscopeapp

macroscopeapp Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved at e63c519

Macroscope's review found this PR approvable — Hiding and reopening the side panel now preserves its previously selected maximized layout. Initial defaults remain unchanged, and users can still restore the panel using the existing control.

You can add or adjust custom eligibility rules. Learn more.

@coderabbitai

coderabbitai Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review.

Walkthrough

Closing the preview panel no longer resets the active thread’s maximized state. A browser test checks that the panel closes when toggled and remains maximized after reopening.

Changes: Right panel state

Layer / File(s) Summary
Preserve maximized state
apps/web/src/components/chat/useRightPanelActions.ts, apps/web/src/components/chat/useRightPanelActions.browser.test.tsx
Closing the preview panel no longer resets the active thread’s maximized state. The browser test checks the panel’s state after closing and reopening.

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

Change: Bug fix

Suggested reviewers: juliusmarminge

Merge Risk: Minimal · up to e63c5

Closing the panel preserves its size preference while restoring chat. No material merge risk was identified.

Pre-merge checks: Passed 4
Check name Status Explanation
Title check Passed The title "fix(web): remember maximized browser when reopening side panel" matches the change. The raw summary shows the change removes the maximized-state reset when the preview panel closes, so reop…
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.
Description check Passed The description covers the problem, the change, scope, and verification, so it is mostly complete. It explains that closing the side panel with its toggle shortcut clears the saved maximized state, so…
Full details: Title check

Explanation

The title "fix(web): remember maximized browser when reopening side panel" matches the change. The raw summary shows the change removes the maximized-state reset when the preview panel closes, so reopening the Browser panel keeps its maximized state. The title is specific, uses a conventional commit prefix, and names the main behavior. It is 62 characters, which is acceptable.

Full details: Description check

Explanation

The description covers the problem, the change, scope, and verification, so it is mostly complete. It explains that closing the side panel with its toggle shortcut clears the saved maximized state, so reopening the Browser panel loses the maximized layout. The change keeps the per-thread size preference when the panel is hidden, and the open-state guard and maximize/restore control behave as before. Verification covers a browser regression test that fails before the fix and passes after, plus the changed-files check and a macOS desktop build. Before/after recordings are linked as GitHub attachments. Two template items are weak: the Scope and approval section does not link a triaged issue or maintainer approval, and it does not explicitly justify why the small fix qualifies without one. The title is also not in the template's conventional commit form in the description itself, though the PR title follows that form.

Finishing Touches
Generate unit tests (beta)
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Tip

🎯 Customize your risk assessments

Guide how CodeRabbit assesses merge risk and security architecture risk. Highlight sensitive changes and explain your security boundaries using Merge Risk Instructions and Security Risk Instructions in your review settings. Security architecture risk assessments require the Advanced plan or above.

✅ Automatic approvals, with your rules

Let CodeRabbit approve pull requests once required threads are resolved, pre-merge checks pass, and your risk limits are met. Enable Automatic approvals in review settings, with overrides for teams or file paths.

CodeRabbit Verify

  • Run CodeRabbit Verify to test the changes in this pull request.
Recent review info
Run configuration
Commits

Reviewing files that changed from the base of the PR and between cefb544 and e63c519.

Files selected for processing: 2
  • apps/web/src/components/chat/useRightPanelActions.browser.test.tsx
  • apps/web/src/components/chat/useRightPanelActions.ts
Files with no reviewable changes: 1
  • apps/web/src/components/chat/useRightPanelActions.ts

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

@maria-rcks

maria-rcks commented Nov 3, 2026 •

Copy link
Copy Markdown
Collaborator

Note

Written by gpt-6.1-sol on behalf of Maria

Verified in a real dev environment

verified e63c519f2e74ab56dc7df21ac9b6848666d2d81d on linux using the real dev web app, repository playwright, and /usr/bin/google-chrome.

  • reproduced on github/main (cefb544af3): open browser, maximize, press ctrl+alt+b twice. reopening loses maximized width.
  • repeated on the exact pr head: closing restores chat; reopening preserves maximized width.
  • restore size still works, and normal width survives close/reopen. the panel toggle button preserves maximized width too. switching to another thread leaves its layout separate; returning restores the original thread's maximized panel.
  • added the real git repository through the app and completed codex gpt-6.1-sol turns on both main and the pr. no mocks, fixtures, or demo data. main was stopped before starting the pr; both captures use the same app-created conversation and browser URL.
  • vp run check:changed cefb544af3c98224874419198c0359b652ca3c94 --concurrency 2 passed through blacksmith-check: format, lint, knip, affected typechecks, the browser regression test, and react compiler. current github checks also pass. no code changes were needed.

before, reopened on main:

main loses maximized browser size after reopening

after, reopened on the pr:

pr preserves maximized browser size after reopening

maximize, close, and reopen on the pr:

pr browser panel interaction recording

Not verified

native electron, macos/windows shortcuts, ios/android, and remote relay/tunnel connections were not exercised on this linux web run. uploaded video playback and seeking were checked in chrome; playback inside t3's own media viewer was not exercised.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XS 0-9 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants