Files
orca/src
Brennan Benson 34e179eca9 fix(codex): keep a dismissed restart notice from killing the pane's keyboard (#10802)
A Codex restart notice makes the pane's onData handler return early, so while
one exists EVERY KEYSTROKE IS DROPPED. Dismissing ("Keep old account") deleted
the notice outright, destroying the only memory of the account the pane
launched under — so re-selecting that ORIGINAL account produced a fresh,
INVERTED notice and a dead keyboard.

Adds a `dismissed` marker plus two shared predicates (blocksCodexPaneInput /
awaitsCodexRestartAnswer) honoured by every consumer, so a dismissal frees the
keyboard immediately while keeping the launch-account memory that drives the
A -> B -> A collapse.

Reproduced on main before fixing, so this is pre-existing; #10770's startup
sweep only widened its reach.

Four defects found across four review rounds, all dead-keyboard: a dismissed
pane still blocked by a sibling's notice in a split tab; queueCodexPaneRestarts
not stripping the marker; a bound pane with no record inheriting tab.ptyId's
block (a plain shell going silently mute); and — introduced by this PR —
markCodexRestartNotices dropping the marker on every re-mark, so a routine
token reauth resurrected an answered prompt and re-muted the pane.

Live-validated in a real Orca dev build: 7/7 desktop cases, input liveness
proven with filesystem probes rather than inferred from state, including a
before/after reproduction of the bug on main's dismissal path in the same build.

Known and out of scope: switching the HOST account marks and mutes live SSH
remote panes. Verified pre-existing and byte-identical on main by two
independent QA runs; needs a follow-up gating the marking on the selection lane.
2026-07-26 20:58:24 -07:00
..