Skip to content

TUI: eliminate per-frame full clears; conditional chat clears to reduce background blinking#405

Merged
edwin-zvs merged 1 commit into
mainfrom
tui-blink-fix
Jun 15, 2026
Merged

TUI: eliminate per-frame full clears; conditional chat clears to reduce background blinking#405
edwin-zvs merged 1 commit into
mainfrom
tui-blink-fix

Conversation

@edwin-zvs

Copy link
Copy Markdown
Contributor

This PR reduces subtle background “blinking” that appeared in sync with Matrix Rain ticks on large panes.

Changes

  • Remove unconditional per-frame clears of main_area / modeline / minibuffer in the top-level render path; rely on targeted clears inside components when geometry grows/shrinks.
  • Make chat-pane Clear conditional: only Clear (and blank newly-exposed rows) when the editor pane shrinks and chat_area grows, or width changes. Steady-state frames skip Clear so vt100 overdraw handles repaint without flashing.
  • Avoid per-frame Clear in orchestrator panel; draw the Block directly.

Why

  • Even with a small Matrix Rain panel, our top-level frame cleared large regions every tick (rain ~8fps), producing a faint full-surface flash on some terminals. Limiting Clear to true geometry transitions eliminates the flash while preserving the fix for uncovered stale cells after shrink.

Notes

  • Parser sizing, rain animation, and hit-testing unchanged.
  • Verified locally: with rain open, the faint periodic background flash disappears while editor grow/shrink still clears newly-exposed rows correctly.

Follow-ups

  • Similar conditional-clear audit for smaller clear sites (matrix widget viewport, some popovers) if we get reports of flicker in those areas.

…nditional chat clears; skip per-frame clear in orchestrator
@edwin-zvs
edwin-zvs merged commit 682e56b into main Jun 15, 2026
1 check passed
@edwin-zvs edwin-zvs mentioned this pull request Jun 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant