Skip to content

TUI: bottom-anchor modal + streaming top card race causes repaint glitch #120

@esengine

Description

@esengine

Reported in discussion #20 (video attached there).

Symptom

Visible vertical jitter / corruption in the card stream when:

  • a tool card is still streaming at the top of the viewport (e.g. write_file), AND
  • an approval modal (plan / shell / edit) is anchored at the bottom

The two layers compete for the same rows and the layout pass can't reconcile them on the same frame.

Hypothesis

Bottom-anchor UI (approval modal, status row, multi-line input) and growing top cards each compute their height independently, then write into overlapping row ranges. Resize is not the trigger — though it likely amplifies it.

Action

Sweep every "bottom-anchored layer × top-growing card" combination:

  • approval modal (plan / shell / edit) × any streaming tool card
  • multi-line input expansion × streaming assistant card
  • status row height changes × streaming card
  • session lifecycle banners × streaming card

Goal: single layout authority that allocates rows top-down with the bottom layer's claimed height reserved up front.

Repro

Linux Mint + WezTerm SSH → Ubuntu in the original report. Should also be reproducible locally by triggering an approval modal mid-stream.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingtrackingTracking issue / umbrella for a multi-PR effort

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions