Skip to content

Fix manual quit terminal preservation - #524

Merged
AmethystLiang merged 1 commit into
mainfrom
manual-quit-orca-should-preserve-terminal
Apr 12, 2026
Merged

AmethystLiang merged 1 commit into
mainfrom
manual-quit-orca-should-preserve-terminal

Conversation

@AmethystLiang

Copy link
Copy Markdown
Contributor

Summary

  • preserve terminal scrollback during manual app quit by passing quit intent through the close flow
  • defer PTY cleanup until will-quit and avoid double-overwriting shutdown session data
  • reset the quit latch if unload is prevented and add regression coverage

Testing

  • pnpm run typecheck
  • pnpm run test
  • pnpm run build:electron-vite
  • pnpm run build:cli

@AmethystLiang
AmethystLiang merged commit 206eb50 into main Apr 12, 2026
1 check passed
nwparker added a commit that referenced this pull request Sep 4, 2026
…ting (#18593)

The native window-close warning was built from a local-only pty set: any
worktree with a connectionId was dropped whole, and any remote runtime pty
was filtered out. A build, test run, or agent on an SSH or Orca Remote host
was therefore structurally invisible to it, on every platform. The quit path
skipped the check entirely (#524), so remote work got no prompt at all.

Route both paths through the same probe the tab-close guard uses, so the two
cannot drift, and keep the verdict vocabulary of the SSH execution boundary:
only a host that answers "no children" suppresses the warning. An unreachable
host is `unverifiable`, never `exited`, so it warns rather than quitting
silently — with its own copy, because "could not reach the host" is a
different claim than "processes are running".

Quit still ignores local ptys, preserving #524: quitting is an unambiguous
instruction to end this machine's processes, but not to end execution on
someone else's, which a bounded relay grace period will SIGKILL once the
countdown expires.

The probe budget is 1.5s (vs the tab guard's 4s) because quit is time
sensitive; expiry raises the prompt, so an unreachable host costs a click
rather than the 15s RPC timeout or a silently orphaned build.
enrick-dev pushed a commit to enrick-dev/orca that referenced this pull request Oct 15, 2026
enrick-dev pushed a commit to enrick-dev/orca that referenced this pull request Oct 15, 2026
…ting (stablyai#18593)

The native window-close warning was built from a local-only pty set: any
worktree with a connectionId was dropped whole, and any remote runtime pty
was filtered out. A build, test run, or agent on an SSH or Orca Remote host
was therefore structurally invisible to it, on every platform. The quit path
skipped the check entirely (stablyai#524), so remote work got no prompt at all.

Route both paths through the same probe the tab-close guard uses, so the two
cannot drift, and keep the verdict vocabulary of the SSH execution boundary:
only a host that answers "no children" suppresses the warning. An unreachable
host is `unverifiable`, never `exited`, so it warns rather than quitting
silently — with its own copy, because "could not reach the host" is a
different claim than "processes are running".

Quit still ignores local ptys, preserving stablyai#524: quitting is an unambiguous
instruction to end this machine's processes, but not to end execution on
someone else's, which a bounded relay grace period will SIGKILL once the
countdown expires.

The probe budget is 1.5s (vs the tab guard's 4s) because quit is time
sensitive; expiry raises the prompt, so an unreachable host costs a click
rather than the 15s RPC timeout or a silently orphaned build.
nwparker added a commit to UADominator/orca that referenced this pull request Nov 26, 2026
…ork confirmations are off

With "Closing a running chat or terminal" turned off, window close now
treats local PTYs and chats as consented, the same way quit does (stablyai#524).
It still probes SSH relay PTYs, so live or unverifiable remote work keeps
prompting (stablyai#18593). Nothing is probed when there are no SSH PTYs.

Fixes stablyai#49921

Co-authored-by: sasha <[email protected]>
nwparker added a commit that referenced this pull request Nov 26, 2026
…ork confirmations are off (#49922)

With "Closing a running chat or terminal" turned off, window close now
treats local PTYs and chats as consented, the same way quit does (#524).
It still probes SSH relay PTYs, so live or unverifiable remote work keeps
prompting (#18593). Nothing is probed when there are no SSH PTYs.

Fixes #49921

Co-authored-by: Neil <[email protected]>
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.

1 participant