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
server: mirrored-pane typing is not cancelled by a detach or reattach before its queue drains #546
On a Windows mirror (terminalAttachKnown === false, or the first input before it is known), typed text goes through the mirror branch of the input handler in server/index.ts: it waits its turn in serialize(...), shapes the text with mirrorInput, checks that the connection still exists and authorizeSocket, then calls paneSendText. It never captures or re-checks the sender's attachment claim or membership, which the pty branch and the keys handler do since #508.
So on a mirrored pane: queue text behind another operation, detach the pane and switch, or detach and reattach, before the queue drains. The text still reaches the pane it was typed into.
Where
server/index.ts, case "input", the branch guarded by terminalAttachKnown === false || (!attachment && terminalAttachKnown === null).
Possible fix
Capture client.data.attached.get(pane_id) and the attachment before the queue, and apply the same claim, attachment identity and sender-membership checks inside the queued step, after the asynchronous shaping. The contract test can simulate the mirror on Linux as server/submit.contract.test.ts does.
Found by
Codex gpt-6.1-sol adversarial review of #508 at 471db0c (Medium). Pre-existing branch; #508 did not touch it.
Activity
feat(terminal): customize the mobile key bar (#508)
fix(server): drop mirrored typing whose sender left the pane before i…