Skip to content

TUI rendering glitch: Chinese text causes character scattering and ghosting #17602

@Po1nt9

Description

@Po1nt9

Bug Description

When using hermes --tui, the terminal UI rendering breaks with Chinese text output. Characters scatter to the right side of the screen, leaving ghost trails and overlapping text.

Steps to Reproduce

  1. Run hermes --tui
  2. Engage in a conversation that produces Chinese text output (several paragraphs)
  3. Observe — text does not wrap correctly, characters appear scattered on the right side

Expected Behavior

Chinese text should render cleanly without ghosting or scattering.

Actual Behavior

  • Characters scatter on the right side of the screen
  • Large irregular whitespace mid-sentence
  • Characters overlap vertically (ghost effect)
  • Status bar shows duplicated fragments
  • Text lines broken mid-sentence

Environment

  • OS: WSL2
  • Terminal: Windows Terminal / browser-based terminal

Possible Cause

CJK character width calculation issue. Chinese characters are full-width (2 cells) but the TUI rendering engine calculates them as 1 cell, causing incorrect line-wrap and cursor position misalignment.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Medium — degraded but workaround existscomp/tuiTerminal UI (ui-tui/ + tui_gateway/)duplicateThis issue or pull request already existstype/bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions