fix: confirm before quitting when unsaved review work would be lost#504
Open
mvanhorn wants to merge 2 commits into
Open
fix: confirm before quitting when unsaved review work would be lost#504mvanhorn wants to merge 2 commits into
mvanhorn wants to merge 2 commits into
Conversation
Contributor
|
PR author is not in the allowed authors list. |
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.
Summary
Pressing
q/Esc to quit now asks for confirmation when you have unsaved review work (draft notes, user notes, or live comments), so you no longer lose in-progress review input by accidentally quitting. Quitting with nothing unsaved still exits immediately.Why this matters
Issue #499 reports losing review work by quitting without warning. This adds a quit-confirmation dialog gated on whether there is actually unsaved, in-memory review work to lose. Crucially, it ignores persisted/static agent sidecar annotations (
file.agent.annotations): those reload on the next launch and are not lost on quit, so an agent-context review no longer shows a spurious "notes will be lost" prompt when the user has not authored anything.Changes
QuitConfirmDialogcomponent +useAppKeyboardShortcutswiring forq/Esc.Testing
bun test AppHost.interactions.test.tsxpasses (65 tests) andbun run typecheckis clean. New coverage asserts: quitting with only agent sidecar annotations does not prompt, while a draft/user note/live comment does prompt, and confirming/cancelling behaves correctly.Fixes #499