Skip to content

fix: confirm before quitting when unsaved review work would be lost#504

Open
mvanhorn wants to merge 2 commits into
modem-dev:mainfrom
mvanhorn:fix/499-quit-confirmation
Open

fix: confirm before quitting when unsaved review work would be lost#504
mvanhorn wants to merge 2 commits into
modem-dev:mainfrom
mvanhorn:fix/499-quit-confirmation

Conversation

@mvanhorn

@mvanhorn mvanhorn commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

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

  • QuitConfirmDialog component + useAppKeyboardShortcuts wiring for q/Esc.
  • The quit gate counts only draft notes, user notes, and live comments — not static agent annotations — so it prompts exactly when unsaved work exists.

Testing

bun test AppHost.interactions.test.tsx passes (65 tests) and bun run typecheck is 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

@greptile-apps

greptile-apps Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

PR author is not in the allowed authors list.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

It's too easy to quit

1 participant