fix(desktop): restore native macOS fullscreen on restart - #10817
fix(desktop): restore native macOS fullscreen on restart#10817andybergon wants to merge 3 commits into
Conversation
Persist native fullscreen alongside the existing normal bounds so update and restart relaunches can return to the same macOS window mode. Keep the behavior gated to macOS and cover persistence, restoration, and lifecycle transitions.
Expose the graceful desktop relaunch lifecycle in the command palette so window-state behavior can be exercised without leaving the app.
ApprovabilityVerdict: Not approved Macroscope's review found this PR not approvable — This PR changes desktop startup and window-state persistence behavior and adds a new command-palette action that can interrupt active tasks and relaunch the app. It also modifies the desktop product defaults, so the combined runtime and user-facing scope warrants human review. You can add or adjust custom eligibility rules. Learn more. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (12)
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughThe desktop now persists native macOS fullscreen state and restores it when opening the main window. It also exposes a desktop-only restart command through IPC, the preload bridge, the command palette, and user documentation. ChangesDesktop window lifecycle
Restart IPC flow
Restart command surface
Priority: ⬇️ Low Estimated code review effort: 3 (Moderate) | ~20 minutes Merge Risk: ⚪ Minimal · up to This change restores macOS fullscreen state after relaunch and adds a desktop-only restart command that warns users about interrupted tasks. The persistence, IPC, and command availability paths are consistent, with no concrete merge-blocking risk identified. Sequence Diagram(s)sequenceDiagram
participant CommandPalette
participant DesktopBridge
participant DesktopIpcHandlers
participant DesktopLifecycle
CommandPalette->>DesktopBridge: invoke restartApp
DesktopBridge->>DesktopIpcHandlers: invoke desktop:restart-app
DesktopIpcHandlers->>DesktopLifecycle: relaunch("command-palette")
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 5 functions across 11 files. (1 skipped: 1 unsupported.)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
What Changed
Restore the saved native macOS full-screen state after an app restart or update relaunch. A separate commit adds Restart T3 Code to the desktop command palette so the restart path can be tested directly.
Why
Window bounds and maximized state are already saved, but native full screen is not. Persist its state and request
fullscreen: truewhen constructing the macOS window. Ignore transient startup bounds until the native transition completes, including when the saved display is disconnected.The restart command uses the existing graceful relaunch lifecycle, which flushes window state before shutting down the desktop-managed server. It warns that active tasks are interrupted and remains hidden in web clients and older desktop shells.
UI Changes
Verified in an isolated macOS development app: enter native full screen, use Cmd+K > Restart T3 Code, then confirm
window.desktopBridge.getWindowFullscreenState()returnstruein the relaunched renderer.Before and after the same restart, captured from the isolated dev window:
Single-display OBS recording of Cmd+K > Restart T3 Code and the return to native fullscreen: 2560 x 1440, 30 fps, no audio. The idle lead-in is trimmed. A labeled privacy screen covers seven seconds around the relaunch to hide other apps, without changing elapsed time.
t3-fullscreen-restart.mp4
Verification
Checklist
Implementation: Codex in T3 Code. Independent review: Claude Fable 5.1 via Claude Code.
Summary by CodeRabbit
New Features
Bug Fixes
Documentation