You're offline — showing cached data

Wiki

02-mission-control/overview
2026-06-13 06:15:47 SAST
Wiki Home → 02-mission-control/overview

Mission Control — Overview

Mission Control (MC) is Luci's web dashboard and operational hub. It manages tickets, workers, sessions, and provides a real-time conversation interface.

Basics

Pages

Page Route Purpose
Overview / Health, stats, task status
Board /board Kanban-style ticket board (30 cards, load more)
Ticket /ticket/<id> Individual ticket conversation + actions
Activity /activity Activity feed
Life Manager /life-manager WhatsApp/email scan results
Tasks /tasks Scheduled task list and run history
Skills /skills Installed skills browser
Reports /reports HTML research reports served from ~/workspace/reports/
Radio /spotify Spotify Radio dashboard with mood controls
F1 /f1 F1 Predictor season dashboard
Team /team Agent team overview
Apps /apps External dashboards (Smart Money, Price Watch)
Logs /logs Scheduler and heartbeat logs

Tech Stack

SSE thread budget (gthread)

Gunicorn runs with -w 2 -k gthread --threads 16 → 16 handler threads per worker process. Caps are PER-WORKER (counters are module-level globals), so the sum of caps must fit one worker's thread budget with headroom for normal HTTP requests:

Thread starvation symptom: listener accepts connections but every request hangs / times out, ss shows many CLOSE-WAIT sockets on the worker PIDs. Restart restores capacity; the caps prevent recurrence.

Database Tables (mc.db)

Key Files

File Purpose
app.py Flask routes, API endpoints, SSE/WS handlers
models.py Database queries, ticket/comment CRUD
auth.py Token-based auth (env vars or hardcoded fallbacks)
mc_interactive.py WebSocket interactive session manager
static/chat.js Client-side conversation UI
static/app.js Board, search, general UI logic
static/style.css All styles

API Endpoints (ticket_context)

Method Route Purpose
GET /api/v1/tickets/<id>/context List vault files linked to a ticket
POST /api/v1/tickets/<id>/context Link a vault file to a ticket (manual or auto)
DELETE /api/v1/tickets/<id>/context/<ctx_id> Remove a ticket↔vault link

API Endpoints (ticket_events — MC-747)

Method Route Purpose
POST /api/v1/tickets/<identifier>/events Persist a stream-json event; broadcast via SSE
GET /api/v1/tickets/<identifier>/events?after=<seq> Replay ticket_events in seq order

Workers call POST to persist events during execution. The ticket detail page calls GET on load to replay history, then subscribes to the ticket SSE stream for ticket_event messages while the worker is live.

Key Takeaways

Help