When switching themes, ratatui's incremental diff engine may miss
color-only changes in sidebar cells that were rendered with
theme-resolved UiTheme fields rather than palette constants routed
through the backend remap layer. This manifests as the sidebar
retaining the previous theme's colors until a window resize or
conversation turn triggers a full repaint.
Add a force_next_full_repaint flag on App that is set whenever a
theme or background_color ConfigUpdated event is processed. The
main render loop merges this into the existing force_terminal_repaint
mechanism, which clears the terminal and redraws every cell.
The task, work, agents, and context sidebar panels were using hardcoded
palette::DEEPSEEK_SKY, palette::TEXT_MUTED, palette::STATUS_WARNING etc.
constants (Whale dark theme colors) that never change when the user
switches themes. This caused the sidebar content to remain in Whale dark
colors even after switching to Claude, Catppuccin, Dracula, or other
community themes.
Root cause:
- task_panel_lines() used palette::DEEPSEEK_SKY, TEXT_MUTED, STATUS_* etc.
- work_panel_lines() and helpers used palette::TEXT_MUTED, STATUS_* etc.
- subagent_panel_lines() used palette::DEEPSEEK_SKY, TEXT_DIM, STATUS_* etc.
- render_context_panel() used palette::DEEPSEEK_SKY, TEXT_MUTED, TEXT_DIM
- tool_status_marker() returned hardcoded palette::STATUS_* colors
- agent_status_marker() returned hardcoded palette::STATUS_* colors
Fix:
- All sidebar panel functions now accept &UiTheme and use theme fields
- task_panel_lines: uses app.ui_theme directly
- work_panel_lines: passes ui_theme to all helpers
- subagent_panel_lines: accepts theme parameter
- render_context_panel: uses app.ui_theme
- tool_status_marker/agent_status_marker: accept theme parameter
- All palette::DEEPSEEK_SKY -> theme.accent_primary
- All palette::TEXT_MUTED -> theme.text_muted
- All palette::TEXT_DIM -> theme.text_dim
- All palette::STATUS_WARNING -> theme.warning
- All palette::STATUS_SUCCESS -> theme.success
- All palette::STATUS_ERROR -> theme.error_fg
This ensures sidebar panels immediately reflect the active theme when
switching, without requiring a conversation turn to trigger a refresh.
Also creates a theme modification guide for future contributors.
Support `! <command>` and `!command` in the TUI composer to run shell commands through the existing exec_shell path.
The shortcut keeps normal approval, sandbox, policy, transcript, and work-panel handling, while avoiding model context
pollution from local-only tool results.
Refs #1546
Refs #1722
Preserves auto_compact as opt-in, adds the saved threshold setting, keeps the 500K hard floor, and wires Ctrl+L as a manual compaction shortcut for context-pressure recovery.
Harvested from PR #1723 by @aboimpinto
Co-authored-by: Paulo Aboim Pinto <aboimpinto@gmail.com>
Remove unneeded return in utils.rs (crates/tui/src/utils.rs:256) that was caught by clippy on the new commit. Also run cargo fmt to satisfy format checks.
- Remove ToolCallBefore observer firing from tool_routing.rs (the turn-loop gate now handles it) to prevent double-firing hooks for each tool call (greptile P1).
- Wrap hook_executor.execute() call in tokio::task::spawn_blocking so the Tokio worker thread is not blocked by child.wait_timeout() during hook execution (greptile P1).