Repository navigation
Conversation
Users could spawn multiple main windows via File > New Window, the Dock menu, the Finder service "New cmux Window Here", session restore, and the workspace context menu's "Move to Window > New Window". Each window had its own independent TabManager / SidebarState / FileExplorer state, so workspaces, surfaces, and focus were not synchronized between windows and the focus-routing code (`setActiveMainWindow`, `synchronizeActiveMainWindowContext`) could only paper over a subset of the resulting state divergence. Drop multi-window support entirely: - Remove the `New Window` File menu item and the Dock menu (which only contained `New Window`). - Make `openNewMainWindow` reuse the existing window via `ensureInitialMainWindowIfNeeded` so any leftover entry point that still calls it (workspace fallback, etc.) just brings the existing window forward. - Route the Finder service `openWindow` action through the same workspace path as `openTab`. - Remove the workspace context menu's `Move Workspace to Window` submenu and its supporting helpers. - Trim session restore (both startup and `reopenPreviousSession`) to a single window so legacy snapshots with multiple windows don't resurrect them. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
@tichise is attempting to deploy a commit to the Manaflow Team on Vercel. A member of the Team first needs to authorize it. |
|
Caution Review failedPull request was closed or merged during review 📝 WalkthroughWalkthroughStartup and session restoration behavior has been changed to single-window-only mode: additional persisted windows are no longer restored during initial startup, and window creation through UI entry points has been adjusted. Multi-window workspace relocation features have been removed from the application menu in cmuxApp.swift, along with their supporting helper methods. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~22 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Greptile SummaryThis PR disables multi-window mode by removing the New Window menu/Dock entry, capping session restore to a single window, routing the Finder The implementation is clean and internally consistent. Confidence Score: 5/5Safe to merge — all multi-window entry points are cleanly closed with no dangling references or missed completion calls. No logic bugs found. Session restore correctly handles both the startup path and the manual reopen path. The removed branch (snapshotWindows.count > existingContexts.count inside the else arm) was already unreachable once prefix(1) is applied. Helper removals leave no orphaned call sites. No files require special attention. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[App Launch / Reopen] --> B{startupSnapshot != nil?}
B -- No --> C[No session restore]
B -- Yes --> D[Apply primary window snapshot only]
D --> E[completeSessionRestoreOperation\nisManualReopen: false]
F[reopenPreviousSession] --> G[Load snapshot\nprefix 1 window]
G --> H{existingContexts\nempty?}
H -- Yes --> I[createMainWindow\nwith snapshot]
H -- No --> J[applySessionWindowSnapshot\nto existing window]
J --> K{Too many live windows?}
K -- Yes --> L[closeMainWindow\nfor extras]
K -- No --> M[Done]
I --> M
L --> M
M --> N[completeSessionRestoreOperation\nisManualReopen: true]
O[File Menu / Dock / Finder] --> P{Action}
P -- New Window removed --> Q[⌘N → New Workspace only]
P -- Dock menu --> R[nil — no custom items]
P -- Finder openWindow --> S[openWorkspaceFromService\nin existing window]
P -- openNewMainWindow --> T[ensureInitialMainWindowIfNeeded\nbring existing window to front]
Reviews (1): Last reviewed commit: "Disable multi-window mode" | Re-trigger Greptile |
No description provided.