Repository navigation
fix(web): keep interrupted terminal pastes free of stray Escape characters - #42916
StiensWout wants to merge 2 commits into
Conversation
Co-authored-by: GPT 6.2 Sol <codex@openai.com>
…cters Co-authored-by: GPT 6.2 Sol <codex@openai.com>
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Hiding the terminal drawer near the end of a large bracketed paste could leave an extra Escape character in the shell input. The terminal writer now keeps the closing marker in a single write, so recovery can send the full marker without duplicating a prefix.
Related: #36902, #35419, #37889, #42686, #30577
Reproduction on main
Commit b61af8a5d2 (main), in the running web app:
The input line shows those characters followed by ^[, an extra Escape left when the paste was closed. Expected: The input line shows those 65,529 characters and nothing after them.
The cause is at
apps/web/src/components/terminal/terminalInputWriter.ts:64. Rancd apps/web && pnpm exec vp test run src/components/terminal/terminalInputWriter.test.tswith the repro test added: it failed in 2 of 2 runs on a clean checkout, withexpected '"\u001b\u001b[201~"' to be '"\u001b[201~"' // Object.is equalityin the output.Evidence
Environment: Linux x64, the repository's own tests.
Proven: the repro fails at the test commit c272c7df8c and passes on the head 0a0303c3f6, both on main b61af8a5d2.
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 b61af8a5d2af5e514674bd85fe5a62e4ea8f9918passed on head.Not in this change
Who did the work
Made in T3 Code by GPT 6.2 Sol, Grok 4.7, Claude Opus 5.5 and Gemini 4 Neon