perf: optimize xterm.js rendering for Linux#1
Merged
Conversation
- Remove blanket CSS transparency on all xterm layers — this was forcing alpha blending every frame and defeating the WebGL renderer's opaque fast path. The terminal theme already provides matching background colors per preset. - Disable font ligatures (font-variant-ligatures: none) and use text-rendering: optimizeSpeed — ligature shaping in JetBrains Mono and Fira Code is expensive on Linux font stacks. - Add CSS contain: strict to the terminal container for layout isolation (skips layout/paint work outside the terminal). - Switch shell terminal dimming from CSS opacity + transition to filter: opacity() with will-change hint — avoids triggering a full compositor layer blend on every repaint. https://claude.ai/code/session_01FtXB5R8qjM54WqwE1FLCYJ
This was referenced Mar 19, 2026
This was referenced May 6, 2026
johannesjo
pushed a commit
that referenced
this pull request
May 15, 2026
…ck initial prompts (#107) * fix(prompt): scale bracketed-paste delay by line count to prevent stuck initial prompts When an agent enables bracketed paste mode (CSI ? 2004 h), synthetic prompt sends wrap the text in \x1b[200~...\x1b[201~ to avoid Codex's paste-burst guard. However, TUI agents like Claude Code process the paste asynchronously — if \r arrives while the paste is still being consumed, it is absorbed into the input buffer as a newline rather than submitting the prompt. The previous fixed 50ms delay was sufficient for short prompts but too short for large ones (e.g. a 31-line initial task prompt). The symptom is the agent sitting in INSERT mode with "[Pasted text #1 +N lines]" in its input, never sending. Fix: - Track bracketed paste mode (CSI ? 2004 h/l) in AgentTrackingState via updateBracketedPasteMode(), called on each PTY data chunk in markAgentOutput() - Export isAgentBracketedPasteEnabled() so sendPrompt can conditionally wrap - Scale the pre-Enter delay: max(50ms, lines * 15ms), capped at 500ms — a 31-line prompt now waits ~465ms instead of 50ms Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * test(prompt): add pasteDelayMs regression tests; export fn; fix duplicate constants Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
forcing alpha blending every frame and defeating the WebGL
renderer's opaque fast path. The terminal theme already provides
matching background colors per preset.
text-rendering: optimizeSpeed — ligature shaping in JetBrains Mono
and Fira Code is expensive on Linux font stacks.
isolation (skips layout/paint work outside the terminal).
filter: opacity() with will-change hint — avoids triggering a full
compositor layer blend on every repaint.
https://claude.ai/code/session_01FtXB5R8qjM54WqwE1FLCYJ