Repository navigation
fix(server): retain unfinished terminal sequences in attach history - #42817
Conversation
Co-authored-by: GPT 6.2 Sol <codex@openai.com>
Co-authored-by: GPT 6.2 Sol <codex@openai.com>
A zero budget already falls through to the retained history, since no sequence or introducer fits. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: GPT 6.2 Sol <codex@openai.com>
…etention An empty history has no ESC, so it already returns the retained history. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…-byte path Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: GPT 6.2 Sol <codex@openai.com>
Co-authored-by: GPT 6.2 Sol <codex@openai.com>
Co-authored-by: GPT 6.2 Sol <codex@openai.com>
Co-authored-by: GPT 6.2 Sol <codex@openai.com>
The viewer input and the omitted-state assertion no longer branch on the flag. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…e92eeb6f3fb Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Reuse the existing manager fixture instead of a second hand-rolled one, and drop a client case that repeated the zero-budget attach path. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
EvidenceReconnected the web terminal during an unfinished OSC title containing 200,000 U+2500 characters, then resumed with
Not shown:
|
…e92eeb6f3fb Keep main's compacted CSI replay (pingdotgg#42808) for every viewer; snapshot parser state now only stands in for long strings and oversized prefixes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
EvidenceReal web app, fresh databases, Replay-seeded thread, 1280×800 viewport, light theme. Wrote an unfinished OSC title containing 200,000 U+2500 characters, followed by another unfinished title prefix and Build. Attached a second independent web client during the pause, then emitted progress + BEL + ready + newline. The second client was hosted in a same-origin iframe. Identical scenario on both commits; scenarios:prove exited 0.
Scenario source. Recordings omit setup frames containing local paths. Captures visually inspected. |




Joining or reconnecting to a terminal could display part of its title as output when the history limit cut through a control sequence. Updated viewers opt in to snapshots that carry parser state for discarded prefixes, so they can skip the continuation and still replay the next escape sequence. Older viewers keep the legacy replay format.
Related: #42761, #42760, #25192
Reproduction on main
Commit 21a96989b0 (main), in the running web app:
The second tab's terminal shows the word progress and then the line ready. Expected: The second tab's terminal shows the line ready, and the title text stays out of the terminal.
The cause is at
apps/server/src/terminal/Manager.ts:3722. Rancd apps/server && pnpm exec vp test run src/terminal/Manager.test.tswith the repro test added: it failed in 2 of 2 runs on a clean checkout, withexpected 'progress\u0007ready\r\n' to be 'ready\r\n'in the output.Evidence
Environment: Linux x64, the repository's own tests.
Proven: the repro fails at the test commit 7924b2e45d and passes on the head 25bc30412e, both on main c478fde9fe.
Outside view: a person sees it in the running web app by following the steps under Reproduction on main.
Tests
pnpm exec vp run check:changed c478fde9fe323fd6d10ef9a0b109b015546fb8e0passed on head.Not in this change
Who did the work
Made in T3 Code by GPT 6.2 Sol, Claude Opus 5.5, Grok 4.7 and Gemini 4 Neon