feat(overseer): TUI line + Ctrl+A o create/enter - #115
Conversation
Surfaces the overseer in the interactive dashboard (opt-in, nothing changes by default): - Ctrl+A o is a create-or-enter toggle: with no live overseer it opens the normal tool/provider picker in "overseer" mode and spawns one rooted at the main repo (findMainRepo, not the focused worktree) with overseer:true; with a live overseer it jumps straight into its session - a dedicated "Overseer" line renders above the worktree groups when an overseer exists; overseer sessions are partitioned out of the worktree groups and the worktree nav list (isOverseerSession) so they never double-render or appear as phantom nav entries - help legend gains the new hotkey - tests: the overseer line renders above worktrees when present and is absent otherwise Backend (spawn overseer flag, preamble, loop watcher) shipped in #114. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Warning Review limit reached
More reviews will be available in 3 hours, 42 minutes, and 3 seconds. Learn how PR review limits work. Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file). ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (6)
📝 WalkthroughWalkthroughIntroduces an "overseer" session role end-to-end: a new ChangesOverseer Session Feature
Sequence Diagram(s)sequenceDiagram
participant User
participant HotkeyHandler
participant SessionLaunch
participant MetadataStore
participant ToolPicker
participant ToolRunner
participant DashboardOps
participant AgentsAPI
participant TeamMetadata
User->>HotkeyHandler: press o
HotkeyHandler->>SessionLaunch: onAction create-overseer
SessionLaunch->>MetadataStore: findOverseerSessionId and loadMetadataState
alt live overseer exists
SessionLaunch->>SessionLaunch: open live tmux window
else no live overseer
SessionLaunch->>ToolPicker: showToolPicker with overseer true
ToolPicker->>ToolRunner: runSelectedTool in overseer mode
ToolRunner->>DashboardOps: spawnDashboardAgentWithFeedback overseer true
DashboardOps->>AgentsAPI: POST agents spawn with overseer flag
ToolRunner->>TeamMetadata: setSessionOverseer true
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 3
🧹 Nitpick comments (1)
src/hotkeys.ts (1)
95-97: Run a build before manual hotkey verification.Before validating
Ctrl+A obehavior in terminal, runyarn buildsodist/reflects this TypeScript change.As per coding guidelines, "Rebuild with
yarn buildaftersrc/*.tschanges before testing runtime behavior or sending users to verify behavior changes."🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/hotkeys.ts` around lines 95 - 97, The change to the "o" case handler in the hotkeys.ts file needs to be compiled into the distribution files before the Ctrl+A o behavior can be verified at runtime. Run yarn build to compile the TypeScript changes in src/ into the dist/ directory, ensuring that the updated create-overseer action is available for manual testing and user verification.Source: Coding guidelines
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/multiplexer/dashboard-model.ts`:
- Around line 470-473: The overseer session filtering applied at line 470 with
the isOverseerSession predicate is not consistently applied when
composeDashboardWorktreeGroups reconstructs group sessions from the full
dashSessions set starting at line 522. Apply the same filter predicate
(!isOverseerSession(s)) within composeDashboardWorktreeGroups when processing
dashSessions to prevent overseer sessions from being reintroduced into worktree
groups after pending-action application, ensuring consistent filtering across
both the initial group construction and the group recomposition logic. Also
apply this same fix at line 490 where a similar pattern exists.
In `@src/multiplexer/session-launch.ts`:
- Around line 789-793: The call to openLiveTmuxWindowForEntry in the
liveOverseer check does not validate the result of the operation. Instead of
ignoring the outcome, capture the return value from openLiveTmuxWindowForEntry
and check whether it equals "opened". If it does not return "opened" (indicating
the operation failed or was a no-op), fall back to calling host.showToolPicker
as the else branch currently does, ensuring that stale runtime state does not
prevent overseer creation.
In `@src/multiplexer/tool-picker.ts`:
- Around line 207-211: The findMainRepo() call in the wtPath assignment lacks
error handling and can throw an exception if repo discovery fails, interrupting
agent creation. Wrap the findMainRepo() call in a try-catch block that returns
undefined as a fallback value if an error is thrown. This ensures that if repo
resolution fails, wtPath will safely default to undefined rather than
propagating an exception through the overlay key handling logic.
---
Nitpick comments:
In `@src/hotkeys.ts`:
- Around line 95-97: The change to the "o" case handler in the hotkeys.ts file
needs to be compiled into the distribution files before the Ctrl+A o behavior
can be verified at runtime. Run yarn build to compile the TypeScript changes in
src/ into the dist/ directory, ensuring that the updated create-overseer action
is available for manual testing and user verification.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 25dadc00-0750-49b2-9727-173a763e7d5f
📒 Files selected for processing (14)
src/dashboard/index.tssrc/hotkeys.tssrc/multiplexer/dashboard-actions-methods.tssrc/multiplexer/dashboard-control.tssrc/multiplexer/dashboard-model.tssrc/multiplexer/dashboard-ops.tssrc/multiplexer/dashboard-view-methods.tssrc/multiplexer/index.tssrc/multiplexer/session-launch.tssrc/multiplexer/tool-picker.tssrc/team.tssrc/tui/screens/dashboard-renderers.test.tssrc/tui/screens/dashboard-renderers.tssrc/tui/screens/overlay-renderers.ts
- metadata-store: enforce a single overseer — setSessionOverseer(…, true)
clears any other session's flag, so a dead overseer no longer makes
Ctrl+A o spawn a new one every time (unbounded growth)
- dashboard-model: also exclude overseers in composeDashboardWorktreeGroups
so pending-action recomposition can't reintroduce them into groups
- dashboard-interaction: filter overseers out of the quick-jump worktree
builder so they don't show as a spurious orphan worktree entry
- session-launch: check openLiveTmuxWindowForEntry's result — only a stale
("missing") session falls through to creating a fresh overseer; "error"
is already surfaced and "opened" is done
- tool-picker: guard findMainRepo() against throwing; reset the overseer
picker flag on Esc
- tests: singleton-overseer enforcement
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sub-agent review (round 1) — dispositionsAn independent sub-agent reviewed alongside CodeRabbit. Its findings (distinct from the CR threads above), all fixed in e4ec665:
CodeRabbit's 3 threads (composeDashboardWorktreeGroups filter, open-result fallback, findMainRepo guard) are addressed in the same commit and replied to inline. |
What
Surfaces the overseer agent in the interactive aimux dashboard. Opt-in — nothing changes until you create one.
Builds on #114 (overseer backend: spawn flag, role preamble, daemon loop watcher).
UX
Ctrl+A ois a create-or-enter toggle:Ctrl+A c) and spawns one rooted at the main repo (findMainRepo, not the focused worktree) withoverseer: true(sets the team role → sticky preamble, and the metadata flag → loop-watcher discovery).isOverseerSession) so they never double-render or appear as phantom cursor entries.Ctrl+A o.Design notes
toolPickerOverseerflag;runSelectedToolswaps in the main-repo cwd and the overseer flag when set.Files
Hotkey/create path:
hotkeys.ts,multiplexer/session-launch.ts,multiplexer/tool-picker.ts,multiplexer/dashboard-actions-methods.ts,multiplexer/dashboard-ops.ts,multiplexer/index.ts. Render/partition:dashboard/index.ts,multiplexer/dashboard-model.ts,multiplexer/dashboard-view-methods.ts,multiplexer/dashboard-control.ts,tui/screens/dashboard-renderers.ts,tui/screens/overlay-renderers.ts,team.ts(isOverseerSession).Verification
yarn typecheck,yarn lint,yarn build, fullyarn vitest(1113 tests) all pass. New unit test: the Overseer line renders above the worktrees when present and is absent when empty.Not done: live interactive-dashboard verification (the keypress→picker→spawn→render loop hasn't been eyeballed in a real terminal headlessly).
🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
Documentation