feat(FN-2270): add interactive TUI mode for fn dashboard
- Add a new dashboard TUI renderer with logs, system, utilities, stats, and settings sections - Wire runDashboard to auto-enable TUI in TTY sessions with reactive task/agent updates and utility keybindings - Keep non-TTY behavior unchanged by falling back to the existing plain-text startup output - Add CLI tests and docs for TUI behavior, keyboard shortcuts, and auth/usage guidance - Ensure dashboard WebSocket auth checks respect --no-auth consistently
This commit is contained in:
@@ -63,6 +63,36 @@ fn dashboard --dev
|
||||
| `--interactive` | Interactive port selection. |
|
||||
| `--dev` | Start dashboard only (no AI engine, no triage/scheduler). |
|
||||
|
||||
### Interactive Terminal UI (TTY Mode)
|
||||
|
||||
When running in an interactive terminal (TTY), `fn dashboard` starts an
|
||||
interactive TUI with five sections:
|
||||
|
||||
| Section | Description |
|
||||
|---|---|
|
||||
| **Logs** | Real-time log entries with timestamps and severity levels |
|
||||
| **System** | Host, port, URL, auth mode, token, engine status, uptime |
|
||||
| **Utilities** | Actions: refresh stats, clear logs, toggle engine pause |
|
||||
| **Stats** | Task counts by column, active task count, agent state counts |
|
||||
| **Settings** | Key settings from the task store |
|
||||
|
||||
**Keyboard Navigation:**
|
||||
|
||||
| Key | Action |
|
||||
|---|---|
|
||||
| `1-5` | Switch to tab by number |
|
||||
| `n` or `→` | Next tab |
|
||||
| `p` or `←` | Previous tab |
|
||||
| `r` | Refresh stats (in Utilities tab) |
|
||||
| `c` | Clear logs (in Utilities tab) |
|
||||
| `t` | Toggle engine pause (in Utilities tab) |
|
||||
| `?` or `h` | Toggle help overlay |
|
||||
| `q` | Quit |
|
||||
| `Ctrl+C` | Force quit |
|
||||
|
||||
In non-TTY mode (CI, piped output, scripts), the dashboard falls back to
|
||||
plain console output to maintain compatibility with automated workflows.
|
||||
|
||||
### Authentication
|
||||
|
||||
Unless `--no-auth` is passed, the dashboard API (including the terminal
|
||||
|
||||
Reference in New Issue
Block a user