fix(terminal): upgrade xterm.js to 6.0 to fix scroll jumping in Claude Code sessions#824
Merged
arnestrickmann merged 1 commit intomainfrom Feb 11, 2026
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Greptile OverviewGreptile SummaryUpgraded xterm.js from 5.5 to 6.0 to enable synchronized output support (DEC mode 2026), which prevents scroll jumping during Claude Code streaming sessions. The upgrade includes all compatible addon versions and removes the deprecated canvas addon (eliminated in xterm 6.0). Key changes:
How this fixes scroll jumping: Confidence Score: 5/5
|
| Filename | Overview |
|---|---|
| package.json | Upgraded @xterm/xterm from 5.5 to 6.0 and all addons to compatible versions, removed deprecated @xterm/addon-canvas |
| src/renderer/index.css | Added background-color: transparent !important to fix black viewport bar caused by xterm 6.0's hardcoded background |
| pnpm-lock.yaml | Lockfile updated to reflect xterm 6.0 upgrade and addon version bumps, peer dependencies removed |
Sequence Diagram
sequenceDiagram
participant User
participant Terminal as Terminal UI
participant XTerm as xterm.js 6.0
participant PTY as PTY Process
User->>Terminal: Triggers Claude Code streaming
PTY->>XTerm: ED3 clear scrollback
PTY->>XTerm: Stream output chunk 1
Note over XTerm: Synchronized output enabled<br/>(DEC mode 2026)
PTY->>XTerm: ED3 clear scrollback
PTY->>XTerm: Stream output chunk 2
Note over XTerm: Batches clear+rewrite atomically<br/>(prevents scroll jump)
XTerm->>Terminal: Render final state
Terminal->>User: Stable viewport position maintained
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.
Summary
Context
Users report the terminal auto-scrolling up during Claude Code sessions,
especially during streaming output and after pasting large text. This is
caused by Claude Code's ED3 (Erase in Display mode 3) pattern which clears
the entire scrollback and re-renders every update cycle. xterm.js 6.0 adds
synchronized output support (DEC mode 2026) that batches these clear+rewrite
cycles atomically, preventing the intermediate state that causes scroll jumps.
Refs: xtermjs/xterm.js#5620, anthropics/claude-code#826
Test plan