Skip to content

Avoid unchanged TUI footer redraws during streaming #27

Closed

Description

@wooksong

Problem

During hidden reasoning and streamed tool calls, the TUI repeatedly clears and redraws the footer even when its visible content has not changed. Because the erase and redraw are separate writes, this can appear as flicker.

This issue is complete when:

  • A reasoning-only stream writes nothing when the footer is unchanged.
  • Calling setActivity again with the same text does not repaint. Only the one-second tick repaints.
  • Actual footer changes bracket the complete update with synchronized output.

Increasing the 40 ms interval or adding synchronized output without skipping unchanged frames is not sufficient. Switching to the alternate screen is not a fix.

Reproduction

  1. Start an interactive Motif session.
  2. Submit a prompt that causes several seconds of reasoning or a streamed tool call.
  3. Watch the composer and activity line while their visible text remains unchanged.
  4. On affected terminals, the footer repeatedly flashes during the stream.

Activity

  1. TaewoooPark commented on Sep 24, 2026

    @TaewoooPark
    Owner

    Resolved by #29, squash-merged as 1acde4f.

    Unchanged footer frames are now skipped, while synchronized updates and the terminal-height resize fix preserve the visible input/status area. The reviewed head and merged main have the same source tree; the height-only shrink/expand behavior was also rechecked in the visible xterm.js + macOS PTY harness.

    All five post-merge CI jobs passed (Node 20, Node 22, Linux ARM64, Python, and golden fixtures). Thank you @wooksong for the contribution and follow-up review!

    This is merged into main; it has not yet been published to npm. The separate scrollback work remains tracked in #28 / #34.

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions