Overview
The Longshot Dashboard is a fullscreen Rich terminal UI that provides real-time monitoring of the orchestrator’s massively parallel coding operations. It reads NDJSON events and renders a multi-panel dashboard at 4 Hz.Installation
Usage Modes
Piped from Orchestrator (Production)
Follow Latest Logs (Development)
logs/run-*.ndjson file live, similar to tail -f. Automatically switches to newer log files when they appear.
Demo Mode (No Orchestrator)
Replay Mode
Command-Line Arguments
Input Sources
--stdin
- Read NDJSON from stdin (orchestrator pipe)
--follow
- Tail latest logs/run-*.ndjson file live
--replay FILE
- Replay NDJSON log file
--demo
- Generate synthetic demo data
Configuration
--agents N
- Maximum agent slots (default: 24)
- Used in demo mode
--features N
- Total features to build in demo (default: 80)
--speed FACTOR
- Replay speed multiplier (default: 1.0)
- 2.0 = 2x faster, 0.5 = half speed
--cost-rate RATE
- Cost per 1K tokens in dollars (default: 0.001)
Layout Structure
The dashboard uses a multi-panel layout:Panels
Header (3 lines)- Elapsed time
- Active workers count
- Total merged branches
- Planner thinking indicator
- Iteration number
- Commits per hour
- Completed/Failed/Pending tasks
- Merge success rate
- Token usage (with in-flight estimate)
- Estimated cost
- Recent velocity sparkline
- Running workers
- Success rate bar
- Merged count
- Conflicts count
- Failed merges count
- In Progress pane: Active and pending tasks
- Completed pane: Finished and failed tasks
- Hierarchical tree view with:
- Progress meters (■■■■)
- Task IDs and descriptions
- Status (running, complete, failed, etc.)
- Duration timers
- Worker progress details
- Handoff metrics (lines added/removed, files, tokens)
- Real-time event log (50 most recent)
- Color-coded by event type
- Timestamps
- Overall task completion progress bar
- Current tree zoom level
- Available keyboard shortcuts
- Active tab indicator
Keyboard Controls
Navigation
Tab
- Switch between Agent Grid and Activity tabs
+ / -
- Zoom planner tree levels in/out
- Shows more or fewer levels of task hierarchy
Scrolling
In Progress Pane:w- Scroll ups- Scroll down
e- Scroll upd- Scroll down
Planner Tree
Node Types
- root - Root planner (top level)
- plan - Primary planner agents
- sub - Subplanner decompositions
- wkr - Individual worker tasks
Status Colors
- running - Bright yellow
- complete - Bright green
- failed - Bright red
- assigned - Cyan
- pending - Blue
- cancelled - Bright red
Progress Meters
Node Information Display
Each node shows:- Progress meter
- Task ID (truncated if > 20 chars)
- Role label (root/plan/sub/wkr)
- Description (truncated at 32 chars)
- Status
- Duration timer (if running, color-coded by age)
- Worker progress message (if available)
- Handoff metrics (if complete):
- Lines added/removed
- Files changed
- Tokens used
Hierarchical Display
Tasks are organized in a tree structure:Zoom Levels
The+/- keys control visible depth:
- Level 1 - Shows only top-level planners
- Level 2 - Shows planners + their immediate children
- Level 3+ - Shows deeper subplanner hierarchies
... N hidden
Metrics Display
Velocity Sparkline
Shows task completion rate over the last 5 minutes:- 10 buckets of 30 seconds each
- Height represents completions in that bucket
- Current rate displayed numerically
Token Usage
- Total tokens used (formatted as K/M)
- Estimated in-flight tokens from active workers
Merge Success Rate
- Green - > 90%
- Yellow - 70-90%
- Red - < 70%
Activity Feed Events
Event Types and Colors
Task Created (Cyan)State Management
DashboardState
Thread-safe state container with:active_workers- Currently running taskspending_tasks- Tasks waiting for workerscompleted_tasks- Finished tasksfailed_tasks- Failed taskscommits_per_hour- Throughput metricmerge_success_rate- Merge queue healthtotal_tokens- Cumulative token usageestimated_in_flight- Tokens from active workerstree- PlannerTreeState (hierarchical task structure)activity- Recent event feed (max 50)visible_levels- Current zoom levelactive_tab- Current tab (“grid” or “activity”)
PlannerTreeState
Recursive tree structure tracking:parent- Parent node mappingchildren- Child nodes liststatus- Node status (pending, running, complete, etc.)role- Node role (root-planner, planner, subplanner, worker)desc- Task descriptionstarted_at- Start timestampworker_progress- Real-time progress messageshandoff_metrics- Completion metrics
Event Ingestion
The dashboard processes NDJSON events:Key Events
“Metrics” - Periodic snapshot from MonitorRefresh Rate
The dashboard refreshes at 4 Hz (250ms interval) for smooth real-time updates.Terminal Requirements
- Minimum size: 40 columns × 28 lines
- Recommended: 120 columns × 40 lines
- Terminal features: ANSI color support, UTF-8 encoding
Performance
The dashboard efficiently handles:- Activity buffer: 50 events (deque with maxlen)
- Completion times: 300 events (5 minutes for velocity)
- Tree nodes: Unlimited (dynamic rendering with scroll)