Skip to content

🤖 Terminal tab repeats its scrollback when shown again #6330

Open

Description

@ThomasK33

Problem

A terminal tab in the right sidebar repeats its scrollback each time you show it again. No reconnect is needed.

Steps

  1. Open a workspace, then the Terminal tab.
  2. Run seq 1 200.
  3. Select another tab (for example Artifacts), then select Terminal again.

Result: the terminal buffer grows from about 200 lines to about 340, and most of the numbers 1..200 show twice. Each further tab switch adds another copy.

Expected: the terminal shows each line once.

Measured on origin/main cccfd9e0d1 (202 -> 338 lines, 136 numbers repeated) and on the reconnect stack (#6296).

Cause (from reading the code, not verified with a fix)

A hidden terminal tab stays mounted but stops listening. When it is shown again, TerminalView subscribes to the router again and calls term.clear(), which keeps the scrollback. The router then delivers the cached full screen (with its scrollback) without replace, so it is written on top of the old lines.

The replace path that #6304 added for a reattach (writeScreenState(term, state, replace), a VT full reset before the screen) would also fix this case if a re-subscribe that already shows content used it.


Generated with xum • Model: anthropic:claude-opus-5-5 • Thinking: high

Activity

  1. self-assigned this
    on Oct 13, 2026
  2. ThomasK33 commented on Oct 14, 2026

    @ThomasK33
    MemberAuthor

    The workspace artifacts-yr22 took this back and is working on it now (branch fix/terminal-scrollback-on-show).


    Generated with xum • Model: anthropic:claude-opus-5-5 • Thinking: high

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

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