Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/copilot-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,10 @@
- **Python 3.8+ compatible** — no walrus operator, no `str.removeprefix`, use `% formatting` not f-strings
- **CLI output uses `_launch_in_tmux()`** — all commands that start tmux sessions go through this shared helper; never duplicate tmux launch logic inline
- **Dashboard rendering lives in `dashboard.py`** — not in `cli.py`
- **TUI actions must be safe** — never `os.execvp` or crash out of the TUI; catch all errors and show a status message instead
- **TUI uses alternate screen buffer** — `_enter_tui()` / `_exit_tui()` in dashboard.py; always restore terminal in a `finally` block
- **Persistence changes need schema migration** — bump `SCHEMA_VERSION`, add to `_MIGRATIONS` list, add column to `SCHEMA`, add to `_TASK_COLUMNS` frozenset
- **Terminal states are `COMPLETE`, `FAILED`, `STOPPED`** — use `TERMINAL_STATES` from orchestrator, not hardcoded tuples
- **Terminal states are `COMPLETE`, `FAILED`, `STOPPED`** — use `TERMINAL_STATES` from orchestrator or `_TERMINAL_STATES` from dashboard, not hardcoded tuples
- **Branch locking** — `get_tasks_on_branch()` prevents concurrent tasks on the same branch

## When Adding a New CLI Command
Expand Down
40 changes: 30 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,27 +67,47 @@ autopilot next # Jump to next session needing attenti

### Interactive Dashboard (`--watch`)

Full-screen TUI with animated spinners for active sessions:
Full-screen TUI with animated spinners, detail panel, and built-in log viewer:

```
╭─ autopilot-loop — Sessions ──────────────────────────────────────────────────╮
│ # Task ID Mode Branch State PR Iter Age │
│► 1 a1b2c3d4 review autopilot/a1b2c3d4 ⠹ IMPLEMENT - 0/5 < 1m │
│ 2 e5f6g7h8 ci autopilot/e5f6g7h8 ◐ WAIT_CI #43 1/5 3m │
│ 3 i9j0k1l2 review autopilot/i9j0k1l2 ■ STOPPED #44 3/5 45m │
│ 4 m3n4o5p6 review autopilot/m3n4o5p6 ✓ COMPLETE #45 2/5 1h │
╰──────────────────────────────────────────────────────────────────────────────╯
j/k navigate Enter attach x stop r refresh q quit
┏━ autopilot-loop — Sessions (3) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ ┃
┃ # Task ID Mode Branch State PR Iter ┃
┃ ┃
┃ ► 1 a1b2c3d4 review autopilot/a1b2c3d4 ⠹ IMPLEMENT - 0/5 ┃
┃ ┃
┃ 2 e5f6g7h8 ci autopilot/e5f6g7h8 ◐ WAIT_CI #43 1/5 ┃
┃ ┃
┃ 3 i9j0k1l2 review autopilot/i9j0k1l2 ■ STOPPED #44 3/5 ┃
┃ ┃
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
j/k navigate Enter attach x stop l logs d detail r refresh q quit
```

**Session list keybindings:**

| Key | Action |
|-----|--------|
| `j` / `↓` | Move selection down |
| `k` / `↑` | Move selection up |
| `Enter` | Attach to selected tmux session |
| `x` | Stop selected session |
| `l` | Open log viewer for selected task |
| `d` / `Space` | Toggle detail panel (task info + log tail) |
| `r` | Force refresh |
| `q` / `Esc` | Quit |
| `q` / `Esc` | Quit (or close panel) |

**Log viewer keybindings** (inside `l`):

| Key | Action |
|-----|--------|
| `j` / `↓` | Scroll down |
| `k` / `↑` | Scroll up |
| `G` | Jump to end |
| `g` | Jump to top |
| `q` / `Esc` | Back to session list |

All actions are safe — errors show a status message instead of crashing. The dashboard runs in an alternate screen buffer (no scrollback bleed).

## Configuration

Expand Down
Loading
Loading