Skip to content

[Bug]: Cancelling a quit prompt leaves Orca in a quitting state #39596

Closed

Description

@tomarai85

Operating system

macOS

Orca version

main at 0956e33 (2026-11-07)

Details

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?

  1. Run sleep 600 in a local terminal.
  2. Open a file and edit it without saving.
  3. Press Cmd+Q. In the "Unsaved Changes" dialog, click Cancel.
  4. 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

  1. added
    os:macos
    on Nov 7, 2026
  2. added 2 commits that reference this issue on Nov 8, 2026
    3b34c79
    6668964
  3. added a commit that references this issue on Nov 8, 2026
    ae6675d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    os:macos

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions