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 |
|
Traced this through fully (not a bot finding — I've been working in this exact area for #3512-3514 and wanted to check for interaction effects). I think there's a real regression here, worth a look before merge. The issue: With this PR's new
So with the new default, manually closing a window doesn't really "close" it in the sense a user would expect — it just hides it until the next launch, and it keeps coming back indefinitely, even windows closed weeks ago. I don't think that's the intended behavior described in the PR body (which frames this around app restart restoring what was open, not "closed windows resurrect forever"). It might be worth distinguishing "window closed individually by the user" from "window still open when the app quit" — e.g. only preserving windows that are still open at actual app-quit time, rather than preserving every window that has ever been closed while Happy to be wrong here if I'm missing some other cleanup path — but I traced every |
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