🏁 Launching the TUI
bun install.
Persistent UI state lives under $HOME/.hoox/.tui-state/ (session, crash log, chat history, DB query history).
⌨️ Global Keyboard Navigation
If
Ctrl+Q is swallowed by XON/XOFF flow control: stty -ixon, or use Ctrl+P → QUIT HOOX.
🗺️ All 15 Views
1. Dashboard (Ctrl+1)
Service health grid, kill-switch status, auto-repair (hoox check fix), AI model health, alerts, quick stats (P&L, trades, AI calls).
2. Workers Overview (Ctrl+2)
2-column cards: status, uptime, CPU, memory, requests, DO count, edges. Enter opens Worker Detail. Actions: logs / deploy / repair via CLI bridge.
3. Worker Detail (Ctrl+3)
Four panes for the selected worker (select from Workers first): metrics, live logs, Durable Objects (names inferred from count), config preview (hoox config show with fallbacks).
4. Trade Monitor (Ctrl+4)
Live trade feed (SSE /trades/stream when API is up), open positions, today/7d/30d P&L, win rate, Sharpe. Space pauses the feed.
5. Logs Viewer (Ctrl+5)
Level + worker filters, text search, pause, fetch via hoox logs, export to ~/.hoox/logs-export-*.json. SSE /logs/stream when API is up.
6. Service Manager (Ctrl+6)
Per-worker deploy/repair, deploy-all, rebuild, kill-switch show/engage/disengage, interactive PoP-style edge map.
7. Config Editor (Ctrl+7)
File tree + TOML/JSON syntax highlighting, live validate (hoox config validate), format on demand.
8. Setup Wizard (Ctrl+8)
Guided onboarding (Cloudflare, exchanges, AI, strategies, Telegram) ending in deploy.
9. Settings (Ctrl+9)
Theme / notifications / refresh interval / shortcuts reference, Check Setup, Check Fix, config path display.
10. Queue Depth (Ctrl+0)
Queue backlog snapshot via hoox monitor queue-depth (auto-refresh while focused).
11. KV Viewer (Ctrl+Alt+K)
Read-only list + on-demand value reveal for non-secret keys (config kv list / get). Writes stay CLI-only.
12. Secrets Viewer (Ctrl+Alt+S)
Read-only names and metadata only — values are never fetched or shown.
13. AI Chat (Ctrl+Alt+C)
Streaming chat with agent worker models. History persisted under .tui-state/chat-history.json (Bun has no localStorage).
14. DB Query (Ctrl+Alt+Q)
Read-only SQL (SELECT / WITH / EXPLAIN only). Client-side validation + CLI enforcement. History under .tui-state/db-query-history.json.
15. Edge Topology (Ctrl+Alt+E)
Interactive map from monorepo graph-metadata.json (workers, infrastructure, communities, data flows). Resolves the file from CWD or monorepo root.
🛜 Data channels
Connection state machine:
connected → reconnecting → offline (status bar pills + expandable CLI error panel).
🛡️ Crash protection
- Per-view ErrorBoundary — a broken view shows Retry; sidebar/status keep running.
- CrashRecoveryApp — process-level trap → Restart / Safe Mode / Report Bug →
$HOME/.hoox/.tui-state/crash.log.
🛠️ Troubleshooting
Next steps
- Local Development — API / wrangler mesh that feeds the TUI
- CLI Reference — commands the TUI invokes
- TUI architecture (DevOps) — stores, backoff, crash model