Implements a comprehensive operational monitoring UI at /monitoring
covering all subsystems described in issue #862:
- Agent Status: lists configured agents with name, model, status, last action
- System Resources: RAM/disk/CPU usage with live progress bars via psutil
- Economy: sats balance, earned/spent, transaction count (Lightning ledger)
- Stream Health: viewer count, bitrate, uptime (graceful fallback when offline)
- Content Pipeline: episode/highlight/clip counts from data/episodes/
- Alerts: auto-derived from resource thresholds, Ollama reachability, wallet balance
Implementation details:
- New route: GET /monitoring (HTML page), GET /monitoring/status (JSON),
GET /monitoring/alerts (JSON)
- /monitoring/status aggregates all subsystems concurrently with asyncio.gather
- Frontend polls every 10 seconds with vanilla JS (no blocking)
- All optional services degrade gracefully per project convention
- CSS appended to mission-control.css (no inline styles)
- "MONITORING" link added to desktop nav in base.html
- 13 unit tests covering page render and all API endpoints
Fixes#862
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adds /db-explorer page and JSON API to browse all 15 SQLite databases
in data/. Sidebar lists databases with sizes, clicking one renders all
tables as scrollable data tables with row truncation at 200.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Major:
- Extract all inline <style> blocks from 22 Jinja2 templates into
static/css/mission-control.css — single cacheable stylesheet
- Add tox lint check that fails on inline <style> in templates
Minor:
1. Connection status indicator in topbar (green/amber/red dot) reflecting
WebSocket + Ollama reachability, with auto-reconnect
2. Jinja2 {% macro panel(title) %} in macros.html — eliminates repeated
.card.mc-panel markup; index.html converted as example
3. SVG favicon (purple T + orange dot)
4. 30-second TTL cache on _check_ollama() to avoid blocking the event loop
on every health poll (asyncio.to_thread was already in place)
5. Toast notification system (McToast.show) for transient status messages —
wired into connection status for Ollama/WebSocket state changes
Enforcement:
- CLAUDE.md updated with conventions 11-14 (no inline CSS, use panel macro,
use toasts, never block the event loop)
- tox lint + pre-push environments now fail on inline <style> blocks
https://claude.ai/code/session_014FQ785MQdyJQ4BAXrRSo9w
Co-authored-by: Claude <noreply@anthropic.com>