Implements three TUI polish features from the roadmap: a searchable command palette modal, a syntax-highlighted diff viewer modal, configurable keybindings for both new features, and a dedicated patch storage slot that replaces heuristic text scanning.
Changes
Command Palette (Ctrl+P)
- New CommandPaletteScreen modal (ModalScreen[str]) with a search Input filter and ListView of all registered SlashCommand objects
- Selecting a command inserts its name into the prompt
- Replaces the old action_open_command_palette that simply typed / into the input
- All commands from _session_command_registry() are available
Diff Viewer (Ctrl+L)
- New DiffViewerScreen modal with a scrollable RichLog widget rendering the patch using Syntax("diff", ...) highlighting
- render_diff_content() extracted from _render_patch_body() in widgets.py for reuse by both the inline transcript path and the modal
- DiffViewerScroll helper widget for scrollable diff content
Dedicated Patch Storage
- Added last_diff: str | None field to TuiState
- Populated by record_tool_result() via the existing _result_patch() extractor — deterministic, no text scanning, provider-agnostic
- action_open_diff_viewer() reads directly from self.state.last_diff
- Removed fragile _extract_diff_from_tool_result() heuristic
Configurable Keybindings
- diff_viewer field added to TuiKeybindings with to_json() serialization
- _hidden_prompt_bindings() includes the diff_viewer candidate
- Default key swap reflected in /hotkeys help and /scoped-models description
Testing
- uv run pytest tests/test_tui_app.py tests/test_tui_config.py — 244 passed
- uv run ruff check src/tau_coding/tui/ — 0 errors
- uv run mypy src/tau_coding/tui/ — 0 errors
Implements three TUI polish features from the roadmap: a searchable command palette modal, a syntax-highlighted diff viewer modal, configurable keybindings for both new features, and a dedicated patch storage slot that replaces heuristic text scanning.
Changes
Command Palette (Ctrl+P)
Diff Viewer (Ctrl+L)
Dedicated Patch Storage
Configurable Keybindings
Testing