#18942: fix(tui): trigger render after finalizing chat assistant message
channel: mattermost
size: XS
Cluster:
TUI and Tool Execution Fixes
## Summary
- Add missing `tui.requestRender()` call after finalizing a regular chat assistant message, so the reply is immediately visible without requiring reconnection.
## Root Cause
The regular chat message final state handler in `tui-event-handlers.ts` updated the chat log and refreshed session info but did not trigger a terminal render. The empty message path (line 162) and command message path (line 178) both call `tui.requestRender()`, but the regular chat message path (after line 203) was missing this call. This caused the finalized assistant message to remain invisible until the user reconnected (which triggers a full history reload).
## Changes
- `src/tui/tui-event-handlers.ts`: Add `tui.requestRender()` after `void refreshSessionInfo?.()` in the regular chat final state handler.
## Test plan
- [ ] Send a message in the TUI and verify the assistant reply appears immediately after completion
- [ ] Verify the reply persists on reconnection
Fix #18691
🤖 Generated with [Claude Code](https://claude.com/claude-code)
<!-- greptile_comment -->
<h3>Greptile Summary</h3>
adds missing `tui.requestRender()` call after finalizing regular chat assistant messages in the TUI event handler, making replies immediately visible
- **Code fix**: correctly adds `tui.requestRender()` at src/tui/tui-event-handlers.ts:204, matching the pattern used in empty message (line 162) and command message (line 178) paths
- **CHANGELOG issue**: the same fix entry was incorrectly added to 38 already-released versions (2026.2.15 and older), not just the current unreleased version (2026.2.16)
<h3>Confidence Score: 2/5</h3>
- code fix is correct but CHANGELOG has critical issue with 38 historical versions modified
- the TUI render fix is technically sound and follows existing patterns, but the CHANGELOG was incorrectly modified to add the same entry to 38 already-released versions instead of only the unreleased version, which violates changelog best practices and could cause confusion
- CHANGELOG.md requires attention to remove entries from historical versions
<sub>Last reviewed commit: 8f36cdf</sub>
<!-- greptile_other_comments_section -->
<!-- /greptile_comment -->
Most Similar PRs
#4035: fix(tui): ensure UI updates when status changes
by willerxar-cmyk · 2026-01-29
80.8%
#6502: fix(tui): skip empty text for tool-only assistant turns
by douvy · 2026-02-01
80.0%
#3721: fix(ui): webchat not displaying chat responses
by maxmaxrouge-rgb · 2026-01-29
79.4%
#4495: Fix: emit final assistant event when reply tags hide stream
by ukeate · 2026-01-30
78.9%
#9220: Fix: TUI drops API responses silently when runID already finalized
by vishaltandale00 · 2026-02-05
78.8%
#14309: fix(ui): resolve chat event session key mismatch
by justonlyforyou · 2026-02-11
77.3%
#8493: fix(tui): filter NO_REPLY token from chat display
by gavinbmoore · 2026-02-04
76.4%
#23073: fix(ui): strip reply directive tags from assistant messages in WebC...
by x4v13r1120 · 2026-02-22
75.3%
#16733: fix(ui): avoid injected newlines when tool output is hidden
by jp117 · 2026-02-15
75.3%
#12974: fix: intermittent (no output) reported by users
by vincentkoc · 2026-02-10
75.2%