mirror of
https://github.com/patriceckhart/zot.git
synced 2026-06-26 21:36:31 +02:00
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. |
||
|---|---|---|
| .. | ||
| agent | ||
| assets | ||
| auth | ||
| core | ||
| provider | ||
| tui | ||