2026-05-10 22:47:39 -05:00
# Mission Control - Future Improvements
2026-05-10 11:14:55 -05:00
**This document tracks potential future enhancements for Mission Control.**
2026-05-10 22:47:39 -05:00
**Last Updated:** 2026-05-10
2026-05-10 20:15:31 -05:00
**Current Version:** v0.0.4
2026-05-10 11:14:55 -05:00
## How to Use This Document
This file is a living document. Agents should:
1. Read this file before proposing changes
2. Add new recommendations with priority levels
2026-05-10 22:47:39 -05:00
3. Never add completed items - move those to HISTORY.md instead
2026-05-10 11:14:55 -05:00
4. Reference this file when dispatching improvement tasks
5. Only Ripley can remove items from this list.
### Priority Format
All items must include the priority emoji in their heading, matching the section they belong to:
| Priority | Emoji | Heading Format |
|----------|-------|---------------|
2026-05-10 22:47:39 -05:00
| CRITICAL | 🔴 | `### 🔴 Title - CRITICAL` |
| HIGH | 🟠 | `### 🟠 Title - HIGH` |
| MEDIUM | 🟡 | `### 💡 Title - MEDIUM` |
| LOW | 🔵 | `### 🔵 Title - LOW` |
| NICE TO HAVE | 💭 | `### 💭 Title - NICE TO HAVE` |
2026-05-10 11:14:55 -05:00
Items are grouped under their priority section heading (`## 🔴 CRITICAL`, `## 🟠 HIGH` , etc.) and sorted most-impactful-first within each tier.
---
## Pending Recommendations
### 🟠 HIGH
2026-05-10 22:47:39 -05:00
### 🟠 Gateway Data Collection Service - HIGH
**Priority:** HIGH
**Status:** DONE ✅
2026-05-10 11:14:55 -05:00
**Added:** 2026-05-10 by Ripley
2026-05-10 20:15:31 -05:00
**Completed:** 2026-05-11
2026-05-10 11:14:55 -05:00
2026-05-10 20:15:31 -05:00
GatewayCollectorService created in `src/backend/app/services/monitoring/` . Background asyncio task polls gateway RPC endpoints (cost, cron, sessions, health) and upserts into monitoring models. Configurable intervals via env vars. Startup/shutdown integrated into main.py lifespan.
2026-05-10 11:14:55 -05:00
2026-05-10 22:47:39 -05:00
### 🟠 Monitoring Database Models - HIGH
**Priority:** HIGH
**Status:** DONE ✅
2026-05-10 11:14:55 -05:00
**Added:** 2026-05-10 by Ripley
feat: add gateway data collection service + fix model FK definitions
- Created src/backend/app/services/monitoring/ package:
- gateway_collector.py: Background asyncio task that polls gateway RPC endpoints
(usage.cost, usage.status, cron.list, sessions.list/preview, health, status)
and stores results in monitoring models using upsert pattern
- models.py: Pydantic schemas for parsing gateway RPC responses
- __init__.py: Package init, exports GatewayCollectorService
- Added collector startup/shutdown in main.py lifespan:
- Launches collector as background task when gateways exist
- Clean shutdown on app termination
- Fixed model FK definitions in monitoring.py and alert_rules.py:
- Replaced Column(UUID, ForeignKey(...)) with Field(foreign_key=...)
to match codebase pattern (UUID is Python class, not SQLAlchemy type)
- Added missing gateway_id field to AlertRule model
- Removed OpenClawDBService inheritance from GatewayCollectorService
(uses session factory pattern instead of injected session)
- Cleaned up duplicate/conflicting imports
- Configurable collection intervals via env vars:
COLLECTION_INTERVAL_COST (300s), COLLECTION_INTERVAL_CRON (60s),
COLLECTION_INTERVAL_SESSION (30s), COLLECTION_INTERVAL_HEALTH (60s)
2026-05-10 20:13:16 -05:00
**Completed:** 2026-05-11
All 7 models created, migrated, CASCADE + composite indexes verified in running DB. Committed as v0.0.3.
2026-05-10 11:14:55 -05:00
**Description:**
Create new PostgreSQL models for tracking data (cost, sessions, crons, system health, alerts).
**Implementation Notes:**
- CostSnapshot, CronJobStatus, SessionEvent, SubAgentRun, SystemHealthMetric, AlertRule
- Alembic migration for all new tables
- CRUD API endpoints under `/api/monitoring/`
2026-05-10 22:47:39 -05:00
### 🟠 WebSocket for Agent Events - HIGH
**Priority:** HIGH
**Status:** DONE ✅
2026-05-10 11:14:55 -05:00
**Added:** 2026-05-10 by Ripley
2026-05-10 22:38:41 -05:00
**Completed:** 2026-05-11
2026-05-10 11:14:55 -05:00
2026-05-10 22:38:41 -05:00
WebSocket endpoint at `/ws/agents` with initial state snapshot (last 50 events) and background polling (every 2s). Event parser ported from TS source. Committed in v0.0.4.
2026-05-10 11:14:55 -05:00
---
### 🟡 MEDIUM
2026-05-10 22:47:39 -05:00
### 🟠 Monitoring API Endpoints - HIGH
**Priority:** HIGH
**Status:** DONE ✅
2026-05-10 20:45:23 -05:00
**Added:** 2026-05-11 by Ripley
**Completed:** 2026-05-11
10 read-only endpoints at /api/v1/monitoring/* with org-scoping, pagination, and filtering. Schemas in app/schemas/monitoring.py, router in app/api/monitoring.py.
2026-05-10 22:47:39 -05:00
### 🟠 Dashboard Logic Port - HIGH
**Priority:** HIGH
**Status:** DONE ✅
2026-05-10 22:38:41 -05:00
**Added:** 2026-05-11 by Ripley
**Completed:** 2026-05-11
Data processing functions ported to Python: `ModelName()` , `BuildDailyChart()` , `BuildAlerts()` , `FmtTokens()` , `BuildCostBreakdown()` . Event parser ported: `parse_session_event()` , `format_tool_status()` . WebSocket endpoint at `/ws/agents` with initial snapshot + polling. All committed in v0.0.4.
### 🟠 Cost Summary API Endpoints — HIGH
**Priority:** HIGH
2026-05-10 22:47:39 -05:00
**Status:** DONE ✅
**Added:** 2026-05-11 by Ripley
**Completed:** 2026-05-12 by Neo
2026-05-10 22:38:41 -05:00
**Description:**
"How much have I spent today, and which model is burning the most?" — Cost Cards + Cost Breakdown API endpoints.
**Implementation Notes:**
2026-05-10 22:47:39 -05:00
- Today's cost, all-time cost, projected monthly cost
- Per-model cost breakdown (7d/30d/all-time tabs)
- Use existing `data_processing.BuildCostBreakdown()` and `data_processing.BuildDailyChart()`
- New API endpoints: `GET /api/v1/monitoring/cost-summary` and `GET /api/v1/monitoring/cost-breakdown?range=7d|30d|all`
- Org-scoped, paginated where applicable
- Neo implemented cost-summary and cost-breakdown endpoints
2026-05-10 22:38:41 -05:00
### 🟠 Health Summary API — HIGH
**Priority:** HIGH
2026-05-10 22:47:39 -05:00
**Status:** DONE ✅
**Added:** 2026-05-11 by Ripley
**Completed:** 2026-05-12 by Neo
2026-05-10 22:38:41 -05:00
**Description:**
"Is my gateway actually running right now?" — System health summary endpoint.
**Implementation Notes:**
2026-05-10 22:47:39 -05:00
- Gateway status (online/offline), PID, uptime, memory, compaction
- CPU, RAM, swap, disk gauges
- Use existing `monitoring/health` endpoint data + `data_processing` functions
- New API endpoint: `GET /api/v1/monitoring/health-summary`
- Neo implemented health-summary endpoint
2026-05-10 22:38:41 -05:00
### 🟠 Cron Summary API — HIGH
**Priority:** HIGH
2026-05-10 22:47:39 -05:00
**Status:** DONE ✅
**Added:** 2026-05-11 by Ripley
**Completed:** 2026-05-12 by Neo
2026-05-10 22:38:41 -05:00
**Description:**
"Which cron jobs ran, which failed, and when does the next one fire?" — Cron summary endpoint.
**Implementation Notes:**
2026-05-10 22:47:39 -05:00
- List all cron jobs with status, schedule, last/next run, duration, model
- Filter by enabled/disabled, gateway
- Use existing `monitoring/cron-jobs` endpoint
- New API endpoint: `GET /api/v1/monitoring/cron-summary`
- Neo implemented cron-summary endpoint
2026-05-10 22:38:41 -05:00
### 🟠 Sessions Summary API — HIGH
**Priority:** HIGH
2026-05-10 22:47:39 -05:00
**Status:** DONE ✅
**Added:** 2026-05-11 by Ripley
**Completed:** 2026-05-12 by Neo
2026-05-10 22:38:41 -05:00
**Description:**
"What sessions are active and how much context are they consuming?" — Active sessions summary.
**Implementation Notes:**
2026-05-10 22:47:39 -05:00
- Recent sessions with model, type badges (DM/group/cron/subagent), context %, tokens
- Use `data_processing.ModelName()` and `event_parser.parse_session_event()`
- New API endpoint: `GET /api/v1/monitoring/sessions-summary`
- Neo implemented sessions-summary endpoint
2026-05-10 22:38:41 -05:00
### 🟠 Sub-Agents Summary API — HIGH
**Priority:** HIGH
2026-05-10 22:47:39 -05:00
**Status:** DONE ✅
**Added:** 2026-05-11 by Ripley
**Completed:** 2026-05-12 by Neo
2026-05-10 22:38:41 -05:00
**Description:**
"Are my sub-agents doing useful work or spinning in circles?" — Sub-agent activity summary.
**Implementation Notes:**
2026-05-10 22:47:39 -05:00
- Sub-agent runs with cost, duration, status + token breakdown (7d/30d tabs)
- Use existing `monitoring/sub-agents` endpoint
- New API endpoint: `GET /api/v1/monitoring/sub-agents-summary`
- Neo implemented sub-agents-summary endpoint
2026-05-10 22:38:41 -05:00
### 🟠 Cost Trends API — HIGH
**Priority:** HIGH
2026-05-10 22:47:39 -05:00
**Status:** DONE ✅
**Added:** 2026-05-11 by Ripley
**Completed:** 2026-05-12 by Neo
feat: add gateway data collection service + fix model FK definitions
- Created src/backend/app/services/monitoring/ package:
- gateway_collector.py: Background asyncio task that polls gateway RPC endpoints
(usage.cost, usage.status, cron.list, sessions.list/preview, health, status)
and stores results in monitoring models using upsert pattern
- models.py: Pydantic schemas for parsing gateway RPC responses
- __init__.py: Package init, exports GatewayCollectorService
- Added collector startup/shutdown in main.py lifespan:
- Launches collector as background task when gateways exist
- Clean shutdown on app termination
- Fixed model FK definitions in monitoring.py and alert_rules.py:
- Replaced Column(UUID, ForeignKey(...)) with Field(foreign_key=...)
to match codebase pattern (UUID is Python class, not SQLAlchemy type)
- Added missing gateway_id field to AlertRule model
- Removed OpenClawDBService inheritance from GatewayCollectorService
(uses session factory pattern instead of injected session)
- Cleaned up duplicate/conflicting imports
- Configurable collection intervals via env vars:
COLLECTION_INTERVAL_COST (300s), COLLECTION_INTERVAL_CRON (60s),
COLLECTION_INTERVAL_SESSION (30s), COLLECTION_INTERVAL_HEALTH (60s)
2026-05-10 20:13:16 -05:00
**Description:**
2026-05-10 22:38:41 -05:00
"What's the cost trend over the last 7 days — am I accelerating?" — Charts & trends endpoint.
feat: add gateway data collection service + fix model FK definitions
- Created src/backend/app/services/monitoring/ package:
- gateway_collector.py: Background asyncio task that polls gateway RPC endpoints
(usage.cost, usage.status, cron.list, sessions.list/preview, health, status)
and stores results in monitoring models using upsert pattern
- models.py: Pydantic schemas for parsing gateway RPC responses
- __init__.py: Package init, exports GatewayCollectorService
- Added collector startup/shutdown in main.py lifespan:
- Launches collector as background task when gateways exist
- Clean shutdown on app termination
- Fixed model FK definitions in monitoring.py and alert_rules.py:
- Replaced Column(UUID, ForeignKey(...)) with Field(foreign_key=...)
to match codebase pattern (UUID is Python class, not SQLAlchemy type)
- Added missing gateway_id field to AlertRule model
- Removed OpenClawDBService inheritance from GatewayCollectorService
(uses session factory pattern instead of injected session)
- Cleaned up duplicate/conflicting imports
- Configurable collection intervals via env vars:
COLLECTION_INTERVAL_COST (300s), COLLECTION_INTERVAL_CRON (60s),
COLLECTION_INTERVAL_SESSION (30s), COLLECTION_INTERVAL_HEALTH (60s)
2026-05-10 20:13:16 -05:00
**Implementation Notes:**
2026-05-10 22:47:39 -05:00
- Cost trend line (7d/30d), model cost breakdown bars, per-model usage
- Use `data_processing.BuildDailyChart()`
- New API endpoint: `GET /api/v1/monitoring/trends?range=7d|30d`
- Neo implemented trends endpoint with 7d/30d support
### 🟡 Cost Tracking UI - MEDIUM
**Priority:** MEDIUM
**Status:** PENDING
2026-05-10 11:14:55 -05:00
**Added:** 2026-05-10 by Ripley
**Description:**
Port the dashboard's cost cards, donut charts, and trend lines to React/Recharts components.
**Implementation Notes:**
- Today's cost, all-time cost, projected monthly
- Per-model cost breakdown (7d/30d/all-time tabs)
- Cost trend line chart (SVG → Recharts)
- Theme-aware styling
2026-05-10 22:47:39 -05:00
### 🟡 Session & Sub-Agent UI - MEDIUM
**Priority:** MEDIUM
**Status:** PENDING
2026-05-10 11:14:55 -05:00
**Added:** 2026-05-10 by Ripley
**Description:**
Active sessions with model, type badges, context % bars, sub-agent activity grid.
**Implementation Notes:**
- Session list with filtering (model, type, status)
- Context % bars, token counts
- Sub-agent activity grid with cost/duration/status
- Session detail panel with conversation preview
2026-05-10 22:47:39 -05:00
### 🟡 Cron Job Management - MEDIUM
**Priority:** MEDIUM
**Status:** PENDING
2026-05-10 11:14:55 -05:00
**Added:** 2026-05-10 by Ripley
**Description:**
Cron job list with schedule, status, run history. Trigger manual runs from UI.
**Implementation Notes:**
- List, add, edit, delete cron jobs via gateway RPC
- Run history with duration and status badges
- Manual trigger button
- Uses existing `cron.*` gateway RPC methods
2026-05-10 22:47:39 -05:00
### 🟡 System Health Dashboard - MEDIUM
**Priority:** MEDIUM
**Status:** PENDING
2026-05-10 11:14:55 -05:00
**Added:** 2026-05-10 by Ripley
**Description:**
Gateway status, CPU/RAM/disk gauges, alert banners with configurable thresholds.
**Implementation Notes:**
- Gateway uptime, PID, memory, compaction status
- CPU/RAM/swap/disk gauge cards
- Alert banner for high cost, failed crons, gateway offline
- Auto-refresh with countdown timer
---
### 🔵 LOW
2026-05-10 22:47:39 -05:00
### 🔵 AI Chat Panel - LOW
**Priority:** LOW
**Status:** PENDING
2026-05-10 11:14:55 -05:00
**Added:** 2026-05-10 by Ripley
**Description:**
Port the dashboard's AI chat to a React component that uses OpenClaw gateway's `/v1/chat/completions` .
**Implementation Notes:**
- Context-aware: feed live monitoring data into system prompt
- Persistent chat history per user
- Streaming responses
2026-05-10 22:47:39 -05:00
### 🔵 Theme System Merge - LOW
**Priority:** LOW
**Status:** PENDING
2026-05-10 11:14:55 -05:00
**Added:** 2026-05-10 by Ripley
**Description:**
Port the 6 dashboard themes into Mission Control's Tailwind config.
**Implementation Notes:**
- Map dashboard's 19 CSS color variables to Tailwind config
- Theme picker in header (persists via localStorage)
- Glass morphism effects where appropriate
2026-05-10 22:47:39 -05:00
### 🔵 Engineering Reference Manual - LOW
**Priority:** LOW
**Status:** PENDING - Requires explicit user initiation
2026-05-10 18:14:26 -05:00
**Added:** 2026-05-10 by Ripley
**Description:**
Comprehensive engineering reference manual documenting the full system architecture, API endpoints, data models, frontend pages/components, and infrastructure.
**Implementation Notes:**
- ⚠️ This task requires explicit initiation by the user. Do not create the Engineering Reference Manual unless specifically asked.
- Should document: system architecture, tech stack, all API endpoints, data models, frontend structure, Docker setup, auth flows
- Bishop would own this task when initiated
2026-05-10 11:14:55 -05:00
---
### 💭 NICE TO HAVE
2026-05-10 22:47:39 -05:00
### 💭 Pixel Agent Canvas - NICE TO HAVE
**Priority:** NICE TO HAVE
**Status:** PENDING
2026-05-10 11:14:55 -05:00
**Added:** 2026-05-10 by Ripley
**Description:**
Port the pixel-art office scene with agent sprites, activity bubbles, and day/night cycle to React Canvas.
**Implementation Notes:**
- Use `useRef` + `requestAnimationFrame` for animation, not React state
- Agent sprites with activity state (working, idle, talking)
- Activity bubbles showing current task/conversation
- Conversation heat glow based on recent activity
- Pan/zoom controls (touch + mouse)
2026-05-10 22:47:39 -05:00
### 💭 Hardware Monitor & Service Controls - NICE TO HAVE
**Priority:** NICE TO HAVE
**Status:** PENDING
2026-05-10 11:14:55 -05:00
**Added:** 2026-05-10 by Ripley
**Description:**
Server rack component for hardware gauges, breaker panel for gateway start/stop/restart.
**Implementation Notes:**
- CPU/GPU/RAM/disk/network gauges
- Gateway start/stop/restart controls
- Update checker (ham radio component)
- All via gateway RPC methods