Preserve all windows/workspaces on close, not just the last one#3407
Preserve all windows/workspaces on close, not just the last one#3407Jordy098 wants to merge 1 commit into
Conversation
Closing a window when other windows are still open (or when window:savelastwindow is off) always deleted its workspace, tabs, and blocks from the DB, discarding each terminal's persisted cwd along with them. Only a single-window full app quit survived a restart. Add window:restoreallwindows (default true) so every window is kept on close, matching the existing per-block cmd:cwd persistence that already restores a shell's working directory when its block relaunches.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (7)
WalkthroughThis PR introduces a new boolean configuration key, Estimated code review effort: 2 (Simple) | ~10 minutes Sequence Diagram(s)Not applicable; changes are primarily configuration/schema additions and a small conditional logic refactor. Related PRs None identified. Suggested labels: enhancement, configuration Suggested reviewers: none identified 🐰 A whisker-twitch of a config so small, 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 Biome (2.5.1)frontend/types/gotypes.d.tsFile contains syntax errors that prevent linting: Line 1880: Expected a property, or a signature but instead found '#'.; Line 1880: Expected an expression, or an assignment but instead found ':'.; Line 1880: Expected an expression but instead found ']'.; Line 2193: Expected a statement but instead found '}'. 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 |
Summary
cmd:cwdmeta, set via the OSC 7 shell-integration handler) and restore it when their shell relaunches — but that only helps if theBlock/Workspacesurvives in the DB.window:savelastwindowoff) always deleted that window's workspace/tabs/blocks on close, discarding any persisted cwd along with it. Only a single-window full app quit reliably survived a restart.window:restoreallwindows(defaulttrue) so every window is preserved on close, not just the last one, letting all previously-open terminal paths come back after a full app restart.Test plan
cdto different directories in each terminal block and let the prompt render (fires OSC 7 →cmd:cwd)window:restoreallwindowsset tofalseto confirm the legacy single-window behavior still works