Skip to content

Concurrent sessions, enhanced dashboard, and session navigation#10

Merged
chanakyav merged 1 commit intomainfrom
concurrent-sessions-dashboard
Mar 16, 2026
Merged

Concurrent sessions, enhanced dashboard, and session navigation#10
chanakyav merged 1 commit intomainfrom
concurrent-sessions-dashboard

Conversation

@chanakyav
Copy link
Copy Markdown
Owner

Summary

This PR adds multi-session support with a rich status dashboard, session navigation, and branch locking. Inspired by gavraz/recon's table dashboard and session management UX.

Closes #3

Concurrent Sessions & Branch Locking

  • Branch locking: autopilot start now checks if another active task is already on the target branch. If so, it blocks with a clear error message suggesting autopilot stop first. Prevents conflicts from two tasks writing to the same branch.
  • New persistence functions: get_active_tasks() (all non-terminal tasks), get_tasks_on_branch(branch) (for locking checks).

Enhanced Dashboard (autopilot status)

  • Rich table: Replaces the old plain-text table with a rich-powered dashboard showing colored state indicators, mode (review/ci), branch, PR number, iteration progress, and elapsed time.
  • --watch flag: Auto-refreshing live display using rich.live.Live, refreshes every N seconds (configurable via --interval). Similar to recon's default table view.
  • --json flag: Machine-readable JSON output for scripting. Similar to recon json.

Session Navigation

  • autopilot attach <task_id>: Switch to (or attach to) a task's tmux session. Works both inside tmux (switch-client) and outside (attach).
  • autopilot next: Jump to the next session needing attention. Prioritizes STOPPED > FAILED tasks. Similar to recon next.

What we took from recon

  • Table dashboard with colored state indicators (recon's table view)
  • --json output mode (recon's recon json)
  • next command for jumping to sessions needing input (recon's recon next)
  • Live polling with --watch (recon's 2-second poll approach)

What we deferred

  • Full interactive TUI with keybindings (tracked in a separate issue)
  • autopilot start --mode ci as a unified alias (tracked in a separate issue)
  • Tamagotchi pixel-art view (out of scope)

Dependencies

  • Added rich as a runtime dependency

Tests

  • 97 tests passing (4 new: get_active_tasks, get_active_tasks_excludes_stopped_and_failed, get_tasks_on_branch, get_tasks_on_branch_excludes_terminal)

- Add branch locking: prevent concurrent tasks on the same branch
- Add get_active_tasks() and get_tasks_on_branch() to persistence layer
- Rewrite cmd_status with rich table: colored state indicators, mode, branch
- Add --watch flag: auto-refreshing live dashboard (inspired by recon)
- Add --json flag: machine-readable status output for scripting
- Add cmd_attach: switch to a task's tmux session
- Add cmd_next: jump to next session needing attention (STOPPED/FAILED)
- Add rich as a dependency
- 97 tests passing (4 new tests for active tasks and branch locking)
@chanakyav chanakyav merged commit d20625f into main Mar 16, 2026
3 checks passed
@chanakyav chanakyav deleted the concurrent-sessions-dashboard branch March 16, 2026 19:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Concurrent autopilot sessions

1 participant