#4035: fix(tui): ensure UI updates when status changes
Cluster:
UI and Model Management Enhancements
Add missing tui.requestRender() calls after status updates to prevent UI from becoming stale. This ensures the terminal interface reflects current connection and activity status immediately.
<!-- greptile_comment -->
<h2>Greptile Overview</h2>
<h3>Greptile Summary</h3>
This PR adds `tui.requestRender()` calls after status/loader message updates so the terminal UI reflects connection/activity status changes immediately instead of getting stale.
Changes are isolated to `src/tui/tui.ts`, primarily around the status rendering pipeline (`updateBusyStatusMessage`, `setConnectionStatus`, `setActivityStatus`, and the status TTL timeout).
<h3>Confidence Score: 3/5</h3>
- Mostly safe, but may regress TUI performance due to extra renders on timer-driven paths.
- The change is small and localized, but it adds `requestRender()` calls inside hot timer paths (waiting updates at 120ms) and duplicates render triggers across layers; without certainty about `@mariozechner/pi-tui` render semantics, there’s some risk of CPU/flicker regressions.
- src/tui/tui.ts (status timers and render scheduling)
<!-- greptile_other_comments_section -->
<sub>(2/5) Greptile learns from your feedback when you react with thumbs up/down!</sub>
**Context used:**
- Context from `dashboard` - CLAUDE.md ([source](https://app.greptile.com/review/custom-context?memory=fd949e91-5c3a-4ab5-90a1-cbe184fd6ce8))
- Context from `dashboard` - AGENTS.md ([source](https://app.greptile.com/review/custom-context?memory=0d0c8278-ef8e-4d6c-ab21-f5527e322f13))
<!-- /greptile_comment -->
Most Similar PRs
#7794: fix(tui): refresh session info periodically to reflect config changes
by GuoxiangZu · 2026-02-03
81.0%
#18942: fix(tui): trigger render after finalizing chat assistant message
by BinHPdev · 2026-02-17
80.8%
#5509: Fix TUI crash when terminal window is too narrow
by omar-khaled-2 · 2026-01-31
80.3%
#6819: fix(tui): handle unstructured tool results and errors in tool execu...
by TreyDong · 2026-02-02
77.7%
#12913: TUI: truncate lines to fit terminal width on narrow terminals
by kutayilmaaz · 2026-02-09
77.2%
#12079: TUI: improve thinking UX, tool readability, and live running status...
by rubenfb23 · 2026-02-08
76.7%
#7316: fix: /chat dashboard performance
by felipcsousa · 2026-02-02
76.6%
#9220: Fix: TUI drops API responses silently when runID already finalized
by vishaltandale00 · 2026-02-05
76.0%
#8083: fix(tui): update model status immediately after /model command
by rohanjangala · 2026-02-03
75.7%
#11109: fix(tui): prefer config contextTokens over persisted session value
by marezgui · 2026-02-07
75.0%