Skip to content

[Bug]: Dashboard text rendering corruption during scroll and multi-line input #47315

Closed as not planned

Description

@Icather

Bug Description

Two related rendering corruptions in the web dashboard composer:

(a) Scrolling during streaming output
When the AI is generating a response and the user scrolls via mouse wheel, characters from the status bar area can stick into the output area, appearing as mis-placed text fragments.

(b) Multi-line input trailing text
When typing a Chinese (multi-byte) message spanning 3–5 lines and pressing Enter, some input text appears as trailing white-colored characters after the > prompt, with abnormally large whitespace gaps. The successfully sent message is unaffected, but residual text remains in the composer.

Steps to Reproduce

(a)

  1. Start a conversation, let the AI generate a long streaming response
  2. Scroll up/down via mouse wheel during output
  3. Observe: status bar characters stick into the message area

(b)

  1. Type a 3–5 line message in Chinese
  2. Press Enter to send
  3. Observe: residual white text with large gaps after the > prompt

Expected Behavior

No text corruption during scrolling. No residual input text after sending a message.

Actual Behavior

Characters from the status bar bleed into the output area during scroll. Multi-line Chinese input leaves ghost text after sending.

Affected Component

Other (Web Dashboard)

Debug Report

N/A — frontend rendering bug. Backend logs are not relevant.

Environment

  • OS: Windows 10
  • Browser: Edge Dev
  • Python: 3.11.15
  • Hermes: 0.16.0 (upstream c6b0eb4)
  • Provider: DeepSeek v4 flash

Root Cause Analysis

(a) Likely a dirty cursor buffer not being cleared on re-render in the xterm.js integration during streaming updates. The scroll event triggers a partial re-render that fails to invalidate the status bar region.

(b) Suspected input line-height miscalculation for wrapped multi-byte (CJK) text. When the input spans multiple visual lines, the calculated height on send may exceed the actual rendered area, leaving residual pixels in the visible buffer.

Both issues are persistent since at least v0.14.x.

Proposed Fix

N/A — front-end only. (a) Status bar region invalidation needed on scroll during stream; (b) multi-byte input line-height recalc on send.

Are you willing to submit a PR for this?

  • I would like to fix this myself and submit a PR

Activity

  1. changed the title [-]Dashboard: text rendering corruption during scroll and multi-line input[/-] [+][Bug]: Dashboard text rendering corruption during scroll and multi-line input[/+] on Jun 16, 2026
  2. added
    type/bugSomething isn't working
    comp/tuiTerminal UI (ui-tui/ + tui_gateway/)
    P3Low — cosmetic, nice to have
    on Jun 16, 2026
  3. teknium1 commented on Jul 14, 2026

    @teknium1
    Collaborator

    Implemented on current main; thank you for the concrete dashboard reproduction.

    Automated hermes-sweeper review found:

    • web/src/pages/ChatPage.tsx:690 now keeps browser wheel scrolling in xterm and out of the PTY, while :1071–:1090 discards raw SGR mouse reports that could surface as stray input.
    • ui-tui/packages/hermes-ink/src/ink/log-update.ts:176–:191 protects the status/cursor row from scroll-region ghosting.
    • ui-tui/src/components/textInput.tsx:282–:290 routes multiline and CJK input away from unsafe fast echo; ui-tui/src/lib/inputMetrics.ts:23–:145 aligns the composer cursor with Ink's wrap behavior.
    • Existing regression coverage includes CJK/multiline fast-echo cases and multiline cursor-drift parity tests.
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

    P3Low — cosmetic, nice to havecomp/tuiTerminal UI (ui-tui/ + tui_gateway/)sweeper:implemented-on-mainSweeper: behavior already present on current maintype/bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions