Enhanced TUI Chat Interface
Overviewβ
The enhanced TUI chat interface provides better visibility into orchestrator operations by adding dedicated panels for task tracking and orchestrator reasoning. This addresses the limitation where users couldn't see task assignments, progress, or orchestrator decision-making during chat sessions.
Featuresβ
Three-Panel Layoutβ
The enhanced interface displays three panels when the orchestrator is running:
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Chat/Output Area (60%) β
β β
β [User input and agent responses] β
β β
ββββββββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββββββ€
β Task List (20%) β Orchestrator Thinking (20%) β
β β Running: code-agent β [Orchestrator] Analyzing deps... β
β β Queued: review-agent β [Orchestrator] Selected agent... β
β β Completed: plan-agent β [Orchestrator] Executing step... β
ββββββββββββββββββββββββββββ΄βββββββββββββββββββββββββββββββββββ
Task List Panelβ
The task list panel displays:
- Status Icons: Visual indicators for task status
- β (Running) - Yellow
- β (Queued) - Gray
- β (Completed) - Green
- β (Error) - Red
- βΈ (Paused) - Blue
- β (Cancelled) - Dim
- Task Name: The name/description of the task
- Agent ID: The agent assigned to execute the task
- Progress Summary: Shows completed/total tasks and failed count
Orchestrator Thinking Panelβ
The orchestrator thinking panel displays:
- Real-time Logs: Orchestrator decision-making process
- Syntax Highlighting:
[Orchestrator]prefix in primary color- Keywords like "Analyzing", "Selected", "Executing" in info color
- Errors in error color
- Success messages in success color
- Auto-scroll: Automatically scrolls to latest output
- Scroll Position Indicator: Shows current line position
Keyboard Shortcutsβ
Panel Navigationβ
- Tab: Cycle focus between Chat, Task List, and Orchestrator panels
- Ctrl+T: Toggle task list panel visibility
- Ctrl+O: Toggle orchestrator thinking panel visibility
Scrollingβ
When a panel is focused, you can scroll within it:
- β/β Arrow Keys: Scroll up/down by 1 line
- Page Up/Page Down: Scroll up/down by 10 lines
- Home: Jump to top of panel
- End: Jump to bottom of panel
Focus Indicatorsβ
The focused panel displays a highlighted border (using border_active theme color) to indicate which panel accepts keyboard input.
Responsive Layoutβ
The interface adapts to different terminal sizes:
- Wide terminals (β₯100 cols): Three-panel horizontal layout (60/20/20)
- Narrow terminals (60-99 cols): Vertical stack with chat on top, task/orchestrator split on bottom
- Very narrow terminals (<60 cols): Chat only with toggle indicators in title
Troubleshootingβ
Connection Errorsβ
If you see "Connection lost" messages in the orchestrator thinking panel:
- The gRPC server may not be running
- Check that the Radium server is accessible
- The system will automatically retry after 2 seconds
Missing Panelsβ
If panels don't appear:
- Ensure orchestration is running (
orchestration_runningmust be true) - Check panel visibility with Ctrl+T and Ctrl+O
- On very narrow terminals, panels are hidden by default
No Tasks Displayedβ
If the task list shows "No active workflow":
- No tasks are currently queued or running
- Tasks are only displayed when a workflow is active
- Start a workflow or requirement execution to see tasks
Technical Detailsβ
State Managementβ
- TaskListState: Tracks task list with agent assignments and progress
- OrchestratorThinkingPanel: Uses OutputBuffer for log storage (1000 line capacity)
- Panel Focus: Managed via
PanelFocusenum (Chat, TaskList, Orchestrator)
Data Integrationβ
- Task List: Polled from gRPC
ListTasksRPC every 500ms - Orchestrator Logs: Polled from monitoring service every 500ms
- Error Handling: Connection errors display in orchestrator panel with retry logic
Component Architectureβ
- TaskListPanel: Renders task table with status icons and colors
- OrchestratorThinkingPanel: Renders scrollable log view with syntax highlighting
- orchestrator_view: Manages layout and responsive behavior
Developer Guideβ
Adding Custom Panelsβ
To add a new panel to the orchestrator view:
- Create a new component in
apps/tui/src/components/ - Add panel visibility state to
Appstruct - Update
render_orchestrator_viewto include new panel - Add keyboard shortcuts for panel toggle
- Update
PanelFocusenum if needed
Extending Task Listβ
To add more task information:
- Extend
TaskListItemstruct intask_list_state.rs - Update
TaskListPanel::renderto display new fields - Update gRPC polling to populate new fields
Customizing Syntax Highlightingβ
To modify orchestrator log highlighting:
- Edit
OrchestratorThinkingPanel::apply_syntax_highlighting - Add new patterns and color mappings
- Use theme colors for consistency