← Back to PRs

#12079: TUI: improve thinking UX, tool readability, and live running status context

by rubenfb23 open 2026-02-08 20:30 View on GitHub →
stale
## 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