#12079: TUI: improve thinking UX, tool readability, and live running status context
stale
Cluster:
UI Enhancements and Fixes
## Summary
This PR improves the TUI experience in three areas:
1. **Thinking UX**
- Show compact thinking by default (`thinking ... <latest sentence>`)
- Add `Ctrl+Y` to toggle compact/expanded thinking view
- Enable thinking display by default in TUI
- Keep thinking updates live (no manual Ctrl+T refresh required)
2. **Tool call readability**
- Add per-tool timeline hints (`start → args → updates → result`)
- Add tool status badges (`running`, `ok`, `error`, `cached`)
- Add color accents by tool family (`web`, `files`, `exec`, `browser`)
3. **Status line context**
- Enrich running/waiting status with live context:
- current active tool (`tool: ...`)
- latest thinking preview (`thinking ... ...`)
- Ensure status/thinking repaint live without manual toggles
## Files changed
- `src/tui/components/assistant-message.ts`
- `src/tui/components/custom-editor.ts`
- `src/tui/components/tool-execution.ts`
- `src/tui/tui-event-handlers.ts`
- `src/tui/tui.ts`
## Why
The previous UX required manual toggles to see up-to-date thinking in some flows, and tool execution context was harder to scan quickly during runs. This improves real-time visibility while keeping the UI compact.
## AI assistance
This PR is AI-assisted.
## Testing
Lightly tested manually in local TUI runs:
- thinking stream updates
- running status line context
- tool event rendering
- Ctrl+Y compact/expanded thinking toggle
<!-- greptile_comment -->
<h2>Greptile Overview</h2>
<h3>Greptile Summary</h3>
This PR updates the TUI to improve “thinking” visibility (compact-by-default rendering + Ctrl+Y toggle), enhance tool execution rendering (badges, timeline hints, family-based color accents, elapsed time), and enrich the status line with live context (active tool + thinking preview).
The changes mostly land in the TUI rendering pipeline (`AssistantMessageComponent`, `ToolExecutionComponent`) and the event handlers/status timer logic (`tui-event-handlers.ts`, `tui.ts`) to ensure the UI repaints automatically during streaming/tool runs.
<h3>Confidence Score: 3/5</h3>
- This PR is close to mergeable but has a couple of user-visible logic regressions in TUI behavior.
- The UX improvements are localized and consistent with existing code patterns, but (1) `state.showThinking` is bypassed in streaming/final rendering by hardcoding `true`, and (2) the Ctrl+Y toggle shows an inverted status message. These should be fixed to avoid confusing/incorrect behavior for users relying on thinking visibility controls.
- src/tui/tui-event-handlers.ts, src/tui/tui.ts
<!-- greptile_other_comments_section -->
<sub>(2/5) Greptile learns from your feedback when you react with thumbs up/down!</sub>
<!-- /greptile_comment -->
Most Similar PRs
#11010: fix(control-ui): hide tool call cards when thinking toggle is off
by Annaxiebot · 2026-02-07
82.8%
#6819: fix(tui): handle unstructured tool results and errors in tool execu...
by TreyDong · 2026-02-02
80.2%
#3678: TUI: fix /reasoning by supporting stream + normalization-Mark as AI...
by AaronWander · 2026-01-29
79.2%
#10996: fix(control-ui): hide tool call blocks when thinking/working toggle...
by Annaxiebot · 2026-02-07
78.4%
#16733: fix(ui): avoid injected newlines when tool output is hidden
by jp117 · 2026-02-15
78.1%
#8353: fix(ui): display tool calls during webchat streaming
by MarvinDontPanic · 2026-02-03
77.3%
#11526: fix(control-ui): hide tool-only assistant messages when thinking is...
by Annaxiebot · 2026-02-07
77.1%
#22797: Feat/auto thinking mode
by jrthib · 2026-02-21
77.1%
#17448: ui: make tool cards collapsible with inline expansion
by karimStekelenburg · 2026-02-15
76.9%
#11527: feat(control-ui): UX improvements — Enter key, thinking icon, auto-...
by Annaxiebot · 2026-02-07
76.8%