Skip to content

Terminal renders garbled output when revisiting existing tabs #205

Closed

Description

@waleedkadous

Bug Description

When switching back to an existing terminal tab in the dashboard (e.g., clicking on a builder tab that's been running), the terminal displays garbled/chaff output — scattered characters, repeated "thinking" text, partial lines, and rendering artifacts.

This appears to happen when xterm.js reconnects to a tmux-backed terminal and replays the scrollback buffer.

Steps to Reproduce

  1. Start Tower and activate a project
  2. Open a builder terminal
  3. Let it run for a while (generating output)
  4. Switch to another tab (Dashboard or another terminal)
  5. Switch back to the original terminal tab
  6. Observe garbled rendering

Expected Behavior

Terminal should render cleanly when revisiting, showing the current state of the terminal without rendering artifacts.

Actual Behavior

Terminal shows scattered characters, repeated partial words (e.g., "thinking" appearing dozens of times), broken line formatting, and visual garbage throughout the scrollback area.

Environment

  • macOS (Darwin 24.6.0)
  • Codev v2.0.0-rc.58
  • React dashboard with xterm.js + tmux-backed terminals via node-pty

Activity

  1. waleedkadous commented on Feb 9, 2026

    @waleedkadous
    ContributorAuthor

    On it! Working on a fix now.

  2. added 3 commits that reference this issue on Feb 9, 2026
  3. added a commit that references this issue on Feb 9, 2026
  4. waleedkadous commented on Feb 15, 2026

    @waleedkadous
    ContributorAuthor

    Reopening — the scroll-to-bottom aspect of this bug is still present. After Tower restart, terminal replay starts printing from the top instead of showing the full buffer scrolled to bottom. Dragging the panel divider (triggering a resize/refit) fixes it, confirming the issue is that scrollToBottom() is not called after replay buffer flush.

  5. waleedkadous commented on Feb 15, 2026

    @waleedkadous
    ContributorAuthor

    On it! Working on a fix now.

  6. added 3 commits that reference this issue on Feb 15, 2026
  7. added a commit that references this issue on Feb 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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