Skip to content

[Bug]: TUI animations scroll instead of animating in-place (missing xterm.js Synchronized Output support) #2787

@sgeraldes

Description

@sgeraldes

Description

TUI applications like Claude Code that use in-place animations (spinners, progress bars, status updates) render incorrectly in Wave Terminal. Instead of each animation frame rewriting the same line(s), each frame appears as a new line, causing content to scroll upward continuously.

For example, when running Claude Code, the "Task(Comprehensive ground truth rebuild)" spinner appears repeated dozens of times scrolling down instead of animating in place.

(Screenshots to be added in comments)

Root Cause

Wave Terminal uses xterm.js 5.5.0, which does NOT support DEC mode 2026 (Synchronized Output).

What is Synchronized Output (DEC mode 2026)?

This is a terminal feature that prevents visual tearing during animations. TUI applications use it to batch screen updates:

  1. Application sends CSI ? 2026 h (begin synchronized update)
  2. Terminal buffers all subsequent output instead of rendering it
  3. Application sends CSI ? 2026 l (end synchronized update)
  4. Terminal renders all buffered changes atomically in a single frame

Without this support, each animation "frame" gets rendered separately, causing the scrolling behavior.

xterm.js Version Status

Version Status Synchronized Output
5.5.0 Wave Terminal uses this ❌ Not supported
6.0.0 Released Dec 22, 2024 ✅ Added in PR #5453

References

Proposed Solution

Upgrade xterm.js from 5.5.0 to 6.0.0 to add Synchronized Output support.

Breaking Changes to Address

xterm.js 6.0.0 has breaking changes that will need to be handled:

  • windowsMode option removed (replaced with improved conpty handling)
  • Canvas renderer addon removed (use WebGL or DOM)
  • Viewport/scrollbar reworked
  • Event system changed (EventEmitter → VS Code's Emitter)

I Will Submit a PR

I am working on a PR to upgrade xterm.js and handle the breaking changes.

Environment

  • Wave Client Version: Latest
  • OS: Windows (also affects other platforms)
  • Architecture: x64

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions