Repository navigation
fix(updater): include starting chats and spawning terminals in restart impact - #51439
Conversation
…in restart impact Quit aborts every chat start still acquiring its agent and cancels local PTY spawns in flight, so updater.restartImpact now names those too.
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
ELI5
Before a phone or another desktop updates an Orca desktop, it can ask what the restart would stop. That answer missed two short-lived cases: a chat whose agent was still starting, and a terminal still being created. Both do stop on restart, so they're now included.
What Changed
updater.restartImpactlisted only chats with a running agent that quit would stop, and terminals already running inside the app.StartFlights.startingSessionIds()exposes the starts in flight.quitKeepsStartingStructuredAgentsits next to quit's existing keep rule and decides which childless starts survive.inProcessTerminalPtyIdsnow addspendingLocalPtySpawnskeys.Why
killAllLocalPtyscancels pending PTY spawns before killing running ones.Linked Issue
No GitHub issue; follow-up to #51246.
Visual Proof
N/A, no UI. This is a host read with no client caller yet.
Testing
I manually tested these changes locally
Automated tests added/updated, or explained why not below
Every added test fails without this change and avoids the test anti-patterns
pnpm check:changedandtc:nodepass.Not exercised live. The inputs exist only for the moments between a start or spawn beginning and its process registering, and on macOS/Linux most chats are kept by the daemon.
Instead, the sets were checked in code against what quit aborts:
spawnLocalPtyregisters inptyProcesses;No automated test: these are transient in-memory states owned by the live provider relay and PTY provider.
Performance
None, because the read runs only when a client asks. It adds one pass over in-flight starts (normally none) and the pending-spawn map keys, both in memory, with no I/O or retained state.
Risk
Level: Low
AI Disclosure
Review
Agent skill upstream boundary
Notes
Ensure no issues in: Security, Cross-platform support (Linux, Windows, Mac), Remote SSH, Mobile, general backwards compatibility, performance
updater.restartImpactis not on the phone allowlist yet.Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)