Repository navigation
Conversation
|
Ready to review this PR? Stage has broken it down into 12 individual chapters for you: Chapters generated by Stage for commit 3ae397d on Jun 22, 2026 6:03pm UTC. |
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughThis PR implements the experimental "Orcastrators" feature—a persistent director/coordinator role that runs the 🚥 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. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 9
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 55c1a7fe-d9c0-4cfb-aed8-b78a78c2cd8c
📒 Files selected for processing (51)
.nvmrcORCASTRATORS-SPEC.mdsrc/renderer/src/App.tsxsrc/renderer/src/assets/main.csssrc/renderer/src/components/Landing.tsxsrc/renderer/src/components/NewWorkspaceComposerCard.tsxsrc/renderer/src/components/NewWorkspaceComposerModal.tsxsrc/renderer/src/components/OrchestratorLaunchModal.tsxsrc/renderer/src/components/TaskPage.tsxsrc/renderer/src/components/right-sidebar/OrchestratorMissionControl.tsxsrc/renderer/src/components/right-sidebar/OrchestratorPanelNotice.tsxsrc/renderer/src/components/right-sidebar/SourceControl.tsxsrc/renderer/src/components/right-sidebar/right-sidebar-panel-content.tsxsrc/renderer/src/components/settings/ExperimentalPane.tsxsrc/renderer/src/components/settings/OrchestratorsExperimentalToggle.tsxsrc/renderer/src/components/settings/experimental-search.tssrc/renderer/src/components/settings/orchestrators-search-entry.tssrc/renderer/src/components/sidebar/OrchestratorsSidebarSection.tsxsrc/renderer/src/components/sidebar/WorktreeCardAgents.tsxsrc/renderer/src/components/sidebar/WorktreeList.tsxsrc/renderer/src/components/sidebar/index.tsxsrc/renderer/src/i18n/locales/en.jsonsrc/renderer/src/i18n/locales/es.jsonsrc/renderer/src/i18n/locales/ja.jsonsrc/renderer/src/i18n/locales/ko.jsonsrc/renderer/src/i18n/locales/zh.jsonsrc/renderer/src/lib/github-pr-search-url.test.tssrc/renderer/src/lib/github-pr-search-url.tssrc/renderer/src/lib/orcastrate-log-shipped-work.test.tssrc/renderer/src/lib/orcastrate-log-shipped-work.tssrc/renderer/src/lib/orchestrator-launch.tssrc/renderer/src/lib/orchestrator-mission-control-data.test.tssrc/renderer/src/lib/orchestrator-mission-control-data.tssrc/renderer/src/lib/orchestrator-work-item-prompt.test.tssrc/renderer/src/lib/orchestrator-work-item-prompt.tssrc/renderer/src/lib/orchestrator-worker-pr-badge.test.tssrc/renderer/src/lib/orchestrator-worker-pr-badge.tssrc/renderer/src/lib/send-work-item-to-orchestrator.tssrc/renderer/src/lib/shipped-branch-pr-match.test.tssrc/renderer/src/lib/shipped-branch-pr-match.tssrc/renderer/src/lib/use-orchestrator-active-worktree.tssrc/renderer/src/lib/worktree-agent-dot-state.tssrc/renderer/src/store/index.tssrc/renderer/src/store/slices/diffComments.test.tssrc/renderer/src/store/slices/orchestrators.test.tssrc/renderer/src/store/slices/orchestrators.tssrc/renderer/src/store/slices/store-test-helpers.tssrc/renderer/src/store/slices/ui.tssrc/renderer/src/store/slices/worktrees.tssrc/renderer/src/store/types.tssrc/shared/types.ts
Resolves the 9 CodeRabbit findings on stablyai#6036: - launch: tear down the created worktree when activation fails, so a failed launch doesn't leave an orphaned hidden director workspace. - close: surface (log) teardown failures instead of swallowing every error. - reattach: skip directors with no live tab — a blank tabId created orphan entries unreachable from the sidebar (+ tests for the new contract). - worktrees: key the Orcastrator toast suppression off the authoritative result.worktree.displayName, not the input displayName. - sidebar: gate director-worktree exclusion behind experimentalOrchestrators, so disabling the flag keeps those worktrees reachable. - mission control: move PR-state pill colors to theme-scoped --pr-state-* tokens in main.css (no raw hex in the renderer); clear stale prItems when fetch preconditions fail; localize the "PR #N" label. - launch modal: seed form state only on open (don't clobber in-progress edits), and keep the modal open when launch fails. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Review feedback addressed + conflict resolvedPushed CodeRabbit findings (all 9)
Also fixed
Verification
|
There was a problem hiding this comment.
🧹 Nitpick comments (6)
skills/orcastrate/SKILL.md (2)
30-48: 🧹 Nitpick | 🔵 Trivial | ⚡ Quick winSpecify language for the graphviz/dot diagram.
Code blocks should declare their language for proper syntax highlighting. The decision tree uses DOT notation but lacks a language identifier.
Add language identifier
-```dot +```dot digraph orca_decision {
64-75: 🧹 Nitpick | 🔵 Trivial | ⚡ Quick winSpecify language for the plan format block.
The plan format template should declare a language identifier (e.g.,
textorplain) for consistency with markdown linting standards.Add language identifier
-``` +```text Plan: <one-line task summary>skills/orcastrate/orcastrate-coordinator.md (4)
106-117: 🧹 Nitpick | 🔵 Trivial | ⚡ Quick winSpecify language for the plan format block.
Code blocks should declare a language identifier for consistency. The plan format template uses a text example format.
Add language identifier
-``` +```text Plan: <one-line task summary>
138-157: 🧹 Nitpick | 🔵 Trivial | ⚡ Quick winSpecify
bashlanguage for the execution command blocks.The orchestration commands in this section are shell/bash syntax but lack language identifiers. Add
bashto both blocks for proper highlighting.Add language identifiers
-``` +```bash # 1. create the worktree + launch the agent in one shot orca worktree create --name <name> --agent <default_agent> --jsonand
-``` +```bash orca orchestration task-create --spec "<the pre-written task for this worktree>" --json
162-165: 🧹 Nitpick | 🔵 Trivial | ⚡ Quick winSpecify
bashlanguage for the check command block.The
orca orchestration checkcommand uses bash syntax but lacks a language identifier.Add language identifier
-``` +```bash orca orchestration check --wait \
230-236: 🧹 Nitpick | 🔵 Trivial | ⚡ Quick winSpecify language for the review report format block.
The review loop report template should declare a language identifier (e.g.,
text).Add language identifier
-``` +```text Orcastrate review — <window>
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: a478a6b6-91f4-4efc-9201-efde0017d4c5
📒 Files selected for processing (2)
skills/orcastrate/SKILL.mdskills/orcastrate/orcastrate-coordinator.md
|
Pushed
The underlying core behavior ( |
CodeRabbit feedback — addressedPushed 1. 2. Markdown fence language identifiers (markdownlint nits)
(The Verification: Note: one unrelated test reported a |
Captures the proposed "Orcastrators" sidebar section + create-flow, build phases, settings (mapped to coordinator TUNABLES + external-LLM adversarial review), multi-coordinator isolation, and integration points. Planning doc for the feat/orcastrators-sidebar prototype. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
…ggle First slice of the Orcastrators feature (see ORCASTRATORS-SPEC.md): the GlobalSettings.experimentalOrchestrators flag, an Experimental-pane toggle (extracted to OrchestratorsExperimentalToggle to respect max-lines), and a settings-search entry (extracted to orchestrators-search-entry). Gates the upcoming sidebar section; no behavior yet beyond the toggle. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Records the traced, confirmed renderer call sequence for spawning a coordinator in a repo's existing primary worktree with /orcastrate seeded (primary-worktree lookup, createTab, startup payload, ensureAgentStartup- InTerminal / pasteDraftWhenAgentReady), plus the two args left to copy from the composer submit path. De-risks the launch slice. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Adds the experimental "Orcastrators" section above Projects with a + that opens a project picker; selecting a project launches a coordinator agent in that project's primary worktree and seeds /orcastrate. - orchestrator-launch.ts: resolves the project's primary worktree, builds the agent startup plan, activates the worktree with that startup command, and paste-submits /orcastrate when the TUI is ready (reuses the verified launch-work-item-direct agent helpers). - OrchestratorsSidebarSection.tsx: the gated section + picker, wired into the sidebar above the project list. Gated behind experimentalOrchestrators. typecheck + lint clean. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Locks the revised design from the working session: the Orcastrator is a persistent *director* (lives in the ORCASTRATORS section, no worktree shown, runs in the primary checkout but display-decoupled), survives restart, allows several per project, and uses disposition (delegate / decide-done / adversarial review / write-as-last-resort) rather than a permission sandbox. Adds an ordered v2 build plan (launch robustness, registry, persistence/reattach, display-decoupling) with a verify-before-commit risk note. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Replaces the activation-startup approach (which no-ops when the worktree is already active, so relaunch spawned nothing) with createTab + queueTabStartupCommand: forces a fresh agent tab and queues the launch command directly onto it, working whether or not the worktree is already open. Also delivers /orcastrate via pasteDraftWhenAgentReady with a 90s window so a cold agent boot no longer drops the prompt with a "took too long" toast. Verified live: relaunch into an open worktree spawns a fresh director and /orcastrate auto-runs. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Adds an OrchestratorsSlice tracking launched directors (id/project/worktree/ tab/launchedAt); launchOrchestratorForProject registers one on launch. The ORCASTRATORS sidebar section now lists live directors as clickable entries (project name, no worktree shown) and drops entries whose tab was closed. Wired the slice into the store + both test-store helpers. Verified live: launching shows a persistent "my-project" entry under ORCASTRATORS. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Display-decoupling (step 4, part 1): exclude an Orcastrator's agent tab from the worktree card's agent rows so the director no longer appears under Projects, and show the director's live state (working spinner / ready dot) on its ORCASTRATORS entry instead. Verified live: the /orcastrate agent row is gone from under the worktree and the section entry shows a status indicator. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Make the ORCASTRATORS list a navigator: highlight the active director's entry with the worktree card's exact active-surface styling — adds an `.orcastrator-active-surface` class to the shared active-surface CSS rule group in main.css (single source of truth) and reuses `worktree-sidebar-card-hover` for hover. Status now renders via the shared AgentStateDot. No invented styles. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
The Orcastrator is now a first-class director, fully decoupled from the project's primary checkout: launch creates a *dedicated* worktree via createWorktree (skip-setup), runs the coordinator + /orcastrate there, and registers it by worktree id. WorktreeList excludes director worktrees so they never appear under Projects — they live only in the ORCASTRATORS section. Verified live: launching spawns a director in its own worktree (workspaces/<project>/orcastrator-<project>), shown only under ORCASTRATORS, with nothing leaking into Projects. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Step 3 + lifecycle. The in-memory registry doesn't survive a reload, so on load (and when worktrees change) reattachOrchestrators rebuilds it by detecting director worktrees via the ORCASTRATOR_DISPLAY_PREFIX displayName marker — re-hiding them from Projects and re-showing them under ORCASTRATORS, reattached to their still-running agent. The section now keys off worktree existence (robust to tab-id drift on reattach) and derives status from the worktree's tabs. Adds closeOrchestrator (X-on-hover) which tears down the director's dedicated worktree and drops it from the registry. Note: pending live verification (author away); typecheck + lint clean and gated behind experimentalOrchestrators. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Covers register/dedupe/remove, reattach detection (by displayName prefix, project mapping, fallback to repo id + stripped name, idempotency, skipping non-directors), and closeOrchestrator teardown (incl. the worktree-removal- failure path). 7 tests, all passing. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
…tores
The Orcastrator feature reads new store fields (orchestrators registry,
worktreesByRepo) in WorktreeList, WorktreeCardAgents, and the section. Older
component test mocks build partial stores without these, so the reads threw.
Guard them (?? [] / ?? {}). Fixes 49 renderer test regressions; full renderer
suite green. (Remaining failures are pre-existing main/relay PTY/bash/relay
env tests, unrelated to this branch.)
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Records the implemented state of the director rearchitect (flag, launch, registry/navigator, dedicated worktree, reattach, close/cleanup), the dedicated-worktree design decision, and known follow-ups. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
… + task)
Replaces the +-dropdown with a native modal matching the "Create worktree"
composer (same Dialog + ProjectCombobox + AgentCombobox). Fields: Name (shown
in the ORCASTRATORS list), Project, Agent, and a task prompt — the prompt is
seeded after /orcastrate so the director starts planning the task instead of
asking for it. Also adds a gated "Create Orcastrator" button to the Landing
empty state next to Add Project / Create worktree.
launchOrchestratorForProject now takes { name, agent, prompt }. Verified live:
a named director ("Build Site") launched with a task, planned it, and spun up
worker worktrees under the project while staying in the ORCASTRATORS section.
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
…", design polish - Source Control: show a director explainer instead of the publish/PR empty state for an Orcastrator's worktree (it has no branch of its own to publish). - Suppress the "local main is behind" suggestion toast for director worktrees. - Send to Orcastrator: hand a tracked issue (GitHub/GitLab/Linear/Jira) to a director from the GitHub issue-row menu and the New Workspace composer footer; opens the launch modal prefilled, pre-selecting the project when the issue is repo-bound. - Launch modal: read prefill from modalData; align with the Create-worktree composer (max-w-lg, auto-focus Name, matching textarea focus/shadow tokens). - Experimental toggle: use the shared SettingsSwitch for the focus ring + a11y. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01FNy4vrv3mvyjpPnhJMZr82
… shipped history, and PR links Replaces the misleading publish/PR view for a director's worktree with a Mission Control console, consistent across the right-sidebar panels: - Source Control: director header + 'no branch to publish' summary, plus the worker worktrees it spawned (linked via lineage parent) with each worker's live agent-state dot and a clickable PR badge. - Checks (and other branch/PR panels): a director notice with an 'Open Mission Control' jump, routed centrally so directors read correctly on every tab. - Shipped: the director's completed work, read from its own .orcastrate/log.jsonl so it survives worker teardown. Each branch is matched to its merged PR by head ref — prefix-agnostic, so branch-rename-on-push still resolves — with a direct PR link. - PR state renders as GitHub-styled pills (merged/open/closed/draft) with an external-link affordance. Shared logic (lineage worker selection, agent-dot derivation, PR-badge derivation, log parsing, branch matching, PR-search-URL fallback) is extracted into pure, unit-tested helpers. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01FNy4vrv3mvyjpPnhJMZr82
The runtime node_modules closure bundles x86_64 copies of @parcel/watcher and node-pty alongside the arm64 ones. They're never loaded on Apple silicon, but recent macOS warns that the app 'includes an Intel component'. Remove them in afterPack for darwin/arm64 builds. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01FNy4vrv3mvyjpPnhJMZr82
Resolves the 9 CodeRabbit findings on stablyai#6036: - launch: tear down the created worktree when activation fails, so a failed launch doesn't leave an orphaned hidden director workspace. - close: surface (log) teardown failures instead of swallowing every error. - reattach: skip directors with no live tab — a blank tabId created orphan entries unreachable from the sidebar (+ tests for the new contract). - worktrees: key the Orcastrator toast suppression off the authoritative result.worktree.displayName, not the input displayName. - sidebar: gate director-worktree exclusion behind experimentalOrchestrators, so disabling the flag keeps those worktrees reachable. - mission control: move PR-state pill colors to theme-scoped --pr-state-* tokens in main.css (no raw hex in the renderer); clear stale prItems when fetch preconditions fail; localize the "PR #N" label. - launch modal: seed form state only on open (don't clobber in-progress edits), and keep the modal open when launch fails. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
…-implement gap Ship the orcastrate skill (SKILL.md) and its coordinator spec as a bundled skill under skills/orcastrate/, instead of leaving them honor-system in ~/.claude. This makes the Orcastrator's director behavior part of the build. Tightening: the skill front-door framed the whole decision around worktree *count*, so a single-PR task read as "no split needed → do it inline" — the exact failure where an Orcastrator resolved a conflict and applied review fixes itself. SKILL.md now separates two questions (how many PRs vs who does the work), and the coordinator calls out "one PR" as the most common trap: one PR still means one worktree with one worker, never zero workers. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> (cherry picked from commit a4a83f2)
…ch landed Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
…c fence langs closeOrchestrator removed the registry entry optimistically and only logged on removeWorktree failure, so a real teardown error (fs locked, perms) left the director gone from the sidebar while its worktree survived on disk — unreachable for retry. Restore the entry on failure (dedupe-safe). Update the test to assert rollback. Add text language identifiers to the remaining bare fenced blocks in the orcastrate skill docs (CodeRabbit markdownlint nits). Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
8320c23 to
5ca486e
Compare
Rebased onto current upstream/main — now mergeableRebased Conflicts resolved (all in i18n locale catalogs + one import):
Verification:
Note (pre-existing, not from this PR): |
|
This is really cool! We'll definitely take a look at this. Thanks for the PR! |
|
w00t! Adding some fixes, and a few additions. Will send over when the work is done. |
|
Superseded by the consolidated, recipe-free Orcastrator PR #6293, which folds this in. |
Summary
Adds an Orcastrator: a first-class "director" you brief conversationally, which plans multi-worktree work and runs worker agents (via the orchestration engine + the
/orcastrateskill) — it directs without writing the code itself, and several can run at once across projects.Entirely behind the existing
experimentalOrchestratorsflag (Settings → Experimental → Orcastrators), so it's dormant unless enabled.What's included
AgentStateDot. The list is the navigator./orcastrateinto a coordinator session..orcastrate/log.jsonl(survives worker teardown), each branch matched to its merged PR by head ref.Design & quality
docs/STYLEGUIDE.md— shadcn primitives,AgentStateDot, the sidebar nav highlight, existing tokens. PR-state pill colors live as theme-scoped--pr-state-*tokens inmain.css(the same VS-Code-parity exception the--git-decoration-*palette makes), not raw hex in the renderer.Notes for maintainers
fs/ghIPC). A follow-up could add per-worker dispatch state via a small orchestration RPC.Screenshots
Feature is gated behind Settings → Experimental → Orcastrators. New/changed UI surfaces:
AgentStateDot, no branch shown)Screen recording walking through enable → launch → Mission Control to be attached in the PR conversation (per repo policy, evidence images aren't committed to the description).
Testing
Verified locally on macOS (Apple Silicon):
pnpm lint— oxlint + switch-exhaustiveness + styled-scrollbars + localization catalog/coverage all passpnpm typecheck— node + cli + web projects cleanpnpm test— 1977 files, 19833 passed / 15 skipped / 0 failedpnpm build—build:desktop(relay, cli, electron-vite, web) +build:nativesucceed;out/artifacts producedAI Review Report
Reviewed with CodeRabbit (automated) plus a Claude Code pass.
Risks checked: worktree lifecycle/cleanup (orphaned director worktrees), error handling (silent teardown failures), React state correctness (stale fetch results, effect re-init clobbering edits, reattach producing unactivatable entries), feature-flag gating, design-token compliance, and localization coverage.
Flagged & resolved (9 findings, all in
fc7833d34):orchestrator-launch.ts).closeOrchestrator).tabId: ''entries (reattachOrchestrators, + test).result.worktree.displayNamefor toast suppression (worktrees.ts).experimentalOrchestratorsso disabling the flag keeps worktrees reachable (WorktreeList.tsx).--pr-state-*tokens (no raw hex in renderer).prItemswhen fetch preconditions fail.Also localized the
PR #Nlabel (PR #{{number}}) that was failingverify:localization-coverage.Cross-platform (macOS / Linux / Windows): explicitly checked. This is a renderer-only change set — no main/preload/IPC files added. No keyboard shortcuts introduced (no
metaKey/ctrlKey). File paths go through the cross-platformjoinPathhelper; the director log is read via the SSH-awarewindow.api.fs.readFile({ filePath, connectionId })so it works for remote hosts, not local-only. No shell/command execution added in this layer (agent launch reuses the existingbuildAgentStartupPlanpath). CSS tokens are theme-scoped, not OS-specific.Security Audit
buildAgentStartupPlan/resolveTuiAgentLaunch{Args,Env}.joinPathfrom the worktree path + a constant relative path; read through the existing fs IPC withconnectionId(SSH-safe). The log parser is a pure string function (no fs/path access).window.api.fs.readFile,window.api.gh.listWorkItems, andwindow.api.shell.openUrl.Notes
experimentalOrchestratorsis enabled.pnpm build/pnpm testwere run on macOS; Linux/Windows behavior is covered by the cross-platform helpers above and CI, with no platform-specific code paths in this PR.main(azh.jsoni18n collision) is resolved; the branch now merges cleanly (verified by a local test-merge against the currentmaintip).🤖 Generated with Claude Code