Repository navigation
fix: #5596 confirm unsaved changes regardless of startup action - #5912
Merged
Merged
Conversation
Closed
1 task done
5 of 6 tasks
This was referenced Nov 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #5596
Summary
With Auto Save disabled and the default
restoreAllstartup action, closing an edited document's tab prompts to save, but closing its window silently keeps the edits only in the recovery cache. This makes the same document behave differently depending on how it is closed and can leave users expecting changes to have been saved to the original file.Always request Save / Don't Save / Cancel when closing a window containing unsaved documents, including untitled drafts and documents switched to reading mode. Startup recovery no longer suppresses the confirmation. Saving must succeed before closing; discarding removes the edits from the recovery snapshot; canceling retains the window and its edits. Untouched documents and empty drafts still close directly.
Update Electron fixture cleanup, including manually restarted instances in the keybindings suite, to exit without waiting for interactive save prompts. Cleanup also runs when renderer-error assertions fail. The multi-folder recovery test now explicitly waits for a snapshot and simulates an abrupt process termination; the new close-flow tests exercise the actual
BrowserWindow.close()andapp.quit()paths.Type of change
Test plan
pnpm run build:unpack,pnpm run lint, andpnpm run typecheckpassed. Lint reports existing warnings without errors.By submitting this pull request, I confirm that my contribution is made under the terms of the MIT license.