Files
orca/src
Neil f730fd05a1 fix(terminal): stop stray escape tails on Windows after returning to a busy pane (#43348)
* fix(terminal): stop stray escape tails on Windows by starting the daemon output sequence at first attach

On Windows, returning to a busy terminal could print the tail of an escape
sequence on the prompt row ("?2026h", "149C", "5;46m").

ConPTY's startup preamble is replayed into a new session before its creating
client attaches. The daemon counted those bytes in the session's output
sequence, but main counts a new session's stream from attach, so the daemon's
sequence ran 20 chars ahead of main's. A restore that used a daemon snapshot
(after a hidden-pane data gap or a renderer reload) was labelled 20 chars past
the stream position it covered; the renderer then dropped the next 20 chars of
live output, often from the middle of an escape sequence.

The output plane now counts only bytes emitted once a client has attached, so
both sides count the same stream. Protocol v57 rolls the fix into a fresh
daemon.

* test(terminal): pin the bytes the attached client receives in the pre-attach sequence test
2026-11-16 18:51:45 -08:00
..