zot/internal
patriceckhart 75ed9d87c7 tui: render the final 'turn finished' frame without needing a nudge
two bugs in the redraw throttle were eating the post-turn frame:

1. requestRedraw, when it could redraw immediately (since >=
   redrawMinInterval), didn't reset pendingRedraw or stop the
   pendingTimer. so subsequent invalidates within redrawMinInterval
   saw pendingRedraw == true and were dropped, leaving the ui
   stale until a key event or scroll triggered a fresh path.

2. the tick branch only called drainPending while busy or with an
   open dialog. once a turn finished and i.busy went false the
   tick stopped clearing the pending flag, so any redraw that
   ended up scheduled (because the dirty channel was saturated
   under streaming load) had no second chance to fire.

fix:
- requestRedraw now stops the timer and clears pendingRedraw
  whenever it does an immediate redraw. throttle state stays
  consistent.
- tick branch always drains pending, busy or not. requestRedraw
  on top is still gated on busy/dialog so the spinner keeps
  animating without forcing a redraw on every tick when idle.

reproduction: long turn finishes -> spinner stops, but the final
assistant text only appears when the user scrolls or types a key.
fixed by both changes; either one alone leaves a small race window.
2026-04-19 11:31:03 +02:00
..
agent tui: render the final 'turn finished' frame without needing a nudge 2026-04-19 11:31:03 +02:00
assets add logo to callback page 2026-04-18 10:15:53 +02:00
auth add auto compaction 2026-04-18 10:34:08 +02:00
core fix ci on windows: close reopened session in TestSessionRoundTrip 2026-04-18 11:01:42 +02:00
provider fix ci: portable syscall.Select via x/sys/unix; gofmt pass 2026-04-18 10:55:42 +02:00
tui tui: /jump to scroll to past turns, render cache for long transcripts 2026-04-18 12:22:16 +02:00