You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: Cancelling a quit prompt leaves Orca in a quitting state #39596
Short summary:
After Cmd+Q, if a prompt appears (unsaved file, running work, settings or WSL-move guard) and you pick Cancel, the window stays open but the main process still thinks Orca is quitting. Later actions behave as if a quit were in progress.
What happened? before-quit sets isQuitting = true in main, and the window's close handler asks the renderer to confirm. Only will-prevent-unload resets the flag (onQuitAborted). The renderer's Cancel buttons, a close-guard veto and the shutdown-checkpoint veto keep the window open without telling main, so the flag stays set until restart.
What I observed afterwards (Playwright e2e, hidden window, main at 0956e33):
The next plain window close is sent to the renderer as isQuitting: true. Without a cancelled quit it is isQuitting: false.
A renderer crash is not recovered: no reload within 20 s, so the window stays blank. Without a cancelled quit the same crash reloads.
With sleep 600 running in a local terminal, closing the window shows no "running processes" warning and the window closes. Without a cancelled quit, the same close warns. A quit checks only SSH work, which is intended (see window-close-running-work.ts); the problem is that this close is not a quit.
How can we reproduce it?
Run sleep 600 in a local terminal.
Open a file and edit it without saving.
Press Cmd+Q. In the "Unsaved Changes" dialog, click Cancel.
Close the window with the red close button. There is no "running processes" warning, and the window closes.
Expected result:
Cancel ends the quit. Closing the window afterwards behaves like any plain close, and crash recovery still works.
Actual result:
Main keeps the quit state, as listed above.
Anything else that might help:
I have a fix that sends a cancel message from each of these renderer paths and runs the same abort steps as a beforeunload veto. I'll open it as a PR linked to this issue.
Activity
fix(window): cancelling a quit prompt now cancels the quit
fix(window): cancelling a quit prompt now cancels the quit
fix(window): cancelling a quit prompt clears the quit latch so later …