Skip to content

feat(orcastrator): rename an existing Orcastrator inline from the sidebar - #6099

Closed
zaridan wants to merge 26 commits into
stablyai:mainfrom
zaridan:feat/orcastrator-rename
Closed

zaridan wants to merge 26 commits into
stablyai:mainfrom
zaridan:feat/orcastrator-rename

Conversation

@zaridan

@zaridan zaridan commented Jun 22, 2026 •

Copy link
Copy Markdown
Contributor

Double-click an Orcastrator's name in the sidebar to rename it inline, reusing the existing WorktreeTitleInlineRename UX (Enter commits, Escape cancels, blur commits, empty/unchanged guarded). The rename does an optimistic in-memory update for instant feedback and then persists durably via the underlying worktree's displayName (carrying the Orcastrator · prefix), so the new name survives a reload through reattachOrchestrators() — which now treats the persisted prefixed displayName as the source of truth rather than reverting to the project name.

Stacked on #6036 — review only the two rename commits

This PR is stacked on / depends on #6036 (the Orcastrator sidebar feature, zaridan:feat/orcastrator-upstream). Upstream main does not have that feature yet, so until #6036 merges this PR's diff will also show #6036's commits. Please review only the two rename commits:

  • cc5ffc9fe1ed11808c8f119a212eb4a584c78870 — feat(orchestrators): rename Orcastrator inline from sidebar row
  • 1e5074a2ccdb5b6dc343c111f0239db3cc362088 — fix(orchestrators): honor renamed name on reattach over project displayName

Once #6036 merges, rebasing this branch onto the updated main will reduce the diff to just those two commits.

Notes

  • Entirely behind the existing experimentalOrchestrators flag — no behavior change for users without it enabled.
  • Touches only orchestrators.ts, OrchestratorsSidebarSection.tsx, and orchestrators.test.ts. Web typecheck and the orchestrators slice tests (10/10) are green.

🤖 Generated with Claude Code


Open in Stage

@ghost

ghost commented Jun 22, 2026

Copy link
Copy Markdown

@coderabbitai

coderabbitai Bot commented Jun 22, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

This PR introduces an experimental "Orcastrators" feature: a persistent director/coordinator worktree that runs the /orcastrate skill to delegate implementation work to spawned worker worktrees. The change adds a new Zustand orchestrators slice with registerOrchestrator, reattachOrchestrators, and closeOrchestrator actions, a dedicated OrchestratorLaunchModal, an OrchestratorsSidebarSection, and an OrchestratorMissionControl right-sidebar panel that tracks spawned workers, PR badges, and shipped branches via a .orcastrate/log.jsonl file. Entry points to send work items to the orchestrator are added in Landing, TaskPage, and the workspace composer. The entire feature is gated behind an experimentalOrchestrators setting exposed through the Experimental settings pane. Supporting changes include CSS PR-state badge tokens, five locale files, agent skill markdown documents, a feature specification document, Node.js version pinning, and macOS arm64 packaging cleanup.

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Description check ⚠️ Warning The PR description covers the key aspects: it explains the user-visible change (inline rename via double-click), notes it reuses existing UX, describes the dual-persistence mechanism, mentions the experimental flag gating, acknowledges the stack on #6036, and specifies which commits to review. However, it omits several required template sections: Screenshots, Testing checklist, AI Review Report, and Security Audit. Add the missing template sections: Screenshots (or 'No visual change' if applicable), complete the Testing checklist with results, include an AI Review Report summary, and provide a Security Audit summary covering input handling and platform-specific concerns.
Docstring Coverage ⚠️ Warning Docstring coverage is 39.53% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: adding inline renaming functionality for Orcastrators via the sidebar. It is specific, concise, and clearly indicates the feature being added.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ 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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 7

🧹 Nitpick comments (1)
src/renderer/src/components/right-sidebar/OrchestratorMissionControl.tsx (1)

159-182: 🚀 Performance & Scalability | 🔵 Trivial | ⚡ Quick win

Narrow the shipped-log effect dependency to avoid unnecessary rereads.

Line 182 currently depends on worktreesByRepo, so any worktree mutation (including unrelated repos) retriggers .orcastrate/log.jsonl reads. Use a narrower signal (for example workerIds or a derived signature) to keep this effect tied to director-relevant changes only.

Suggested adjustment
-  }, [directorPath, directorConnectionId, worktreesByRepo])
+  }, [directorPath, directorConnectionId, workerIds])

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 61d69a31-d2b4-4a19-ac70-35e714c2b3b8

📥 Commits

Reviewing files that changed from the base of the PR and between 1078966 and 1e5074a2ccdb5b6dc343c111f0239db3cc362088.

📒 Files selected for processing (54)
  • .nvmrc
  • ORCASTRATORS-SPEC.md
  • config/electron-builder.config.cjs
  • skills/orcastrate/SKILL.md
  • skills/orcastrate/orcastrate-coordinator.md
  • src/renderer/src/App.tsx
  • src/renderer/src/assets/main.css
  • src/renderer/src/components/Landing.tsx
  • src/renderer/src/components/NewWorkspaceComposerCard.tsx
  • src/renderer/src/components/NewWorkspaceComposerModal.tsx
  • src/renderer/src/components/OrchestratorLaunchModal.tsx
  • src/renderer/src/components/TaskPage.tsx
  • src/renderer/src/components/right-sidebar/OrchestratorMissionControl.tsx
  • src/renderer/src/components/right-sidebar/OrchestratorPanelNotice.tsx
  • src/renderer/src/components/right-sidebar/SourceControl.tsx
  • src/renderer/src/components/right-sidebar/right-sidebar-panel-content.tsx
  • src/renderer/src/components/settings/ExperimentalPane.tsx
  • src/renderer/src/components/settings/OrchestratorsExperimentalToggle.tsx
  • src/renderer/src/components/settings/experimental-search.ts
  • src/renderer/src/components/settings/orchestrators-search-entry.ts
  • src/renderer/src/components/sidebar/OrchestratorsSidebarSection.tsx
  • src/renderer/src/components/sidebar/WorktreeCardAgents.tsx
  • src/renderer/src/components/sidebar/WorktreeList.tsx
  • src/renderer/src/components/sidebar/index.tsx
  • src/renderer/src/i18n/locales/en.json
  • src/renderer/src/i18n/locales/es.json
  • src/renderer/src/i18n/locales/ja.json
  • src/renderer/src/i18n/locales/ko.json
  • src/renderer/src/i18n/locales/zh.json
  • src/renderer/src/lib/github-pr-search-url.test.ts
  • src/renderer/src/lib/github-pr-search-url.ts
  • src/renderer/src/lib/orcastrate-log-shipped-work.test.ts
  • src/renderer/src/lib/orcastrate-log-shipped-work.ts
  • src/renderer/src/lib/orchestrator-launch.ts
  • src/renderer/src/lib/orchestrator-mission-control-data.test.ts
  • src/renderer/src/lib/orchestrator-mission-control-data.ts
  • src/renderer/src/lib/orchestrator-work-item-prompt.test.ts
  • src/renderer/src/lib/orchestrator-work-item-prompt.ts
  • src/renderer/src/lib/orchestrator-worker-pr-badge.test.ts
  • src/renderer/src/lib/orchestrator-worker-pr-badge.ts
  • src/renderer/src/lib/send-work-item-to-orchestrator.ts
  • src/renderer/src/lib/shipped-branch-pr-match.test.ts
  • src/renderer/src/lib/shipped-branch-pr-match.ts
  • src/renderer/src/lib/use-orchestrator-active-worktree.ts
  • src/renderer/src/lib/worktree-agent-dot-state.ts
  • src/renderer/src/store/index.ts
  • src/renderer/src/store/slices/diffComments.test.ts
  • src/renderer/src/store/slices/orchestrators.test.ts
  • src/renderer/src/store/slices/orchestrators.ts
  • src/renderer/src/store/slices/store-test-helpers.ts
  • src/renderer/src/store/slices/ui.ts
  • src/renderer/src/store/slices/worktrees.ts
  • src/renderer/src/store/types.ts
  • src/shared/types.ts

Comment thread skills/orcastrate/SKILL.md Resolved
Comment on lines +5071 to +5076
// Why: a director has no branch to publish — show its Mission Control console
// (the workers it spawned + their state) instead of the misleading "Branch not
// published / create a pull request" empty state.
if (isOrchestratorWorktree) {
return <OrchestratorMissionControl key={activeWorktree.id} worktreeId={activeWorktree.id} />
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀 Performance & Scalability | 🟠 Major | 🏗️ Heavy lift

Move the orchestrator gate before branch/PR side-effect setup.

Line 5071 returns Mission Control only after the component has already declared and registered the branch-focused hooks/effects above. That means orchestrator worktrees still run Source Control polling/fetch logic that should be bypassed.

Please split this path into a separate component (or wrapper-level branch) so the non-orchestrator hooks are never mounted for directors.

@AmethystLiang
AmethystLiang self-requested a review June 23, 2026 02:19
zaridan added a commit to zaridan/orca that referenced this pull request Jun 23, 2026
- OrchestratorLaunchModal: guard against rapid Enter/double-click firing
  concurrent launches (in-flight isLaunching flag) so one intent produces
  one worktree/director.
- orchestrator-launch: surface a toast when the backgrounded /orcastrate
  seed times out or rejects, instead of silently leaving the session idle.
- OrchestratorsSidebarSection: persist the rename to durable worktree
  metadata FIRST (new throwOnPersistError option) and only mirror it into
  the in-memory entry on success, so the sidebar name can't diverge.
- OrchestratorsSidebarSection: give the close button keyboard focus
  visibility (group-focus-within + focus-visible ring).
- i18n: register the new seed_failed key across all locales.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
@zaridan
zaridan force-pushed the feat/orcastrator-rename branch from 1e5074a to c1bfc76 Compare June 23, 2026 04:50
@zaridan

zaridan commented Jun 23, 2026

Copy link
Copy Markdown
Contributor Author

CodeRabbit feedback addressed (Stack A, #6099)

Rebased onto the freshly-fixed parent (#6036 / feat/orcastrator-upstream); the rebase was clean. Several base-level doc-fence comments were inherited as already-fixed by the parent's "doc fence langs" commit — verified, not re-fixed.

Fixed:

  • OrchestratorLaunchModal.tsx (~143) — duplicate launches. Added an in-flight isLaunching guard; handleLaunch early-returns while a launch is pending and the submit button is disabled, so rapid Enter / double-click can only produce one worktree/director.
  • orchestrator-launch.ts (~151) — silent /orcastrate seed failure. The backgrounded pasteDraftWhenAgentReady now handles its resolved boolean and rejection: a timed-out/failed seed surfaces a toast (Orcastrator opened, but initial command seeding timed out.) instead of leaving the session silently idle.
  • OrchestratorsSidebarSection.tsx (~45) — rename state drift. Reordered to persist-then-update. Added an opt-in throwOnPersistError option to updateWorktreeMeta (default behavior unchanged for all other callers — still swallow + refetch); the rename now persists the durable worktree displayName first and only mirrors the name into the in-memory entry on success. On persist failure the refetch reverts in-memory state and the rejection propagates to the inline editor (toast + editor stays open), so the sidebar can't diverge from durable metadata for the session.
  • OrchestratorsSidebarSection.tsx (~158) — close button keyboard focus. Added group-focus-within:opacity-100 focus-visible:opacity-100 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-worktree-sidebar-ring (used the canonical worktree-sidebar-ring design token rather than a hardcoded ring) so keyboard users get a visible focus state.
  • i18n. Registered the new auto.lib.orchestrator.launch.seed_failed key across all five locales (parity verified by the localization-catalog check).

Inherited as already-fixed (verified, not re-touched):

  • Markdown code-fence language nits in skills/orcastrate/orcastrate-coordinator.md (~106, ~230) and SKILL.md (~64) — all opening fences already carry language identifiers after the parent's doc-fence-langs commit.

Intentionally skipped:

  • SourceControl.tsx (~5076) — "Move the orchestrator gate before branch/PR side-effect setup" (Major / Heavy lift). This asks to split the ~5k-line SourceControl component so the branch-focused hooks never mount for director worktrees. It's a sizable architectural refactor that this code is on a line introduced by the parent PR, not by feat(orcastrator): rename an existing Orcastrator inline from the sidebar #6099's own diff, and it's out of scope for a review-feedback pass. The current gate is functionally correct (Mission Control still renders for directors) — flagging for a dedicated follow-up rather than risking a large refactor here.

Verified: pnpm run typecheck, pnpm run lint (incl. localization parity), and pnpm run test (19,835 passing) all green.

zaridan and others added 22 commits June 22, 2026 22:29
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]>
zaridan and others added 4 commits June 22, 2026 23:36
Double-click an Orcastrator's name in the sidebar to edit it inline,
matching the existing worktree-title rename UX. Reuses
WorktreeTitleInlineRename (Enter commits, Escape cancels, blur commits,
empty/unchanged guarded).

The rename updates both sources of truth: an optimistic in-memory
updateOrchestrator for instant UI, then the durable worktree displayName
(prefixed with ORCASTRATOR_DISPLAY_PREFIX) via the existing
updateWorktreeMeta path so reattachOrchestrators reconstructs the name
after a reload. The activate target became a role="button" div because an
Input nested in a <button> is invalid HTML; Enter/Space keep it
keyboard-accessible and the close (X) button is unaffected.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
…ayName

reattachOrchestrators preferred project?.displayName over the persisted
worktree displayName, so a renamed Orcastrator with a matching project
reverted to the project name on reload — silently discarding the rename.

Treat the prefix-stripped worktree displayName as the durable source of
truth (it's `prefix + project.displayName` at launch, so un-renamed
directors reconstruct identically), falling back to project/repo only
when no name survives the prefix. Adds a test that fails against the old
precedence, and a "why" note on the optimistic rename update.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
- OrchestratorLaunchModal: guard against rapid Enter/double-click firing
  concurrent launches (in-flight isLaunching flag) so one intent produces
  one worktree/director.
- orchestrator-launch: surface a toast when the backgrounded /orcastrate
  seed times out or rejects, instead of silently leaving the session idle.
- OrchestratorsSidebarSection: persist the rename to durable worktree
  metadata FIRST (new throwOnPersistError option) and only mirror it into
  the in-memory entry on success, so the sidebar name can't diverge.
- OrchestratorsSidebarSection: give the close button keyboard focus
  visibility (group-focus-within + focus-visible ring).
- i18n: register the new seed_failed key across all locales.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Parent rebase kept upstream's TerminalInteractionSection source (PR stablyai#6068)
but dropped the matching scrollSpeed catalog keys, breaking the catalog
check. Union-merge restores upstream's real per-locale translations.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
@zaridan
zaridan force-pushed the feat/orcastrator-rename branch from c1bfc76 to f614562 Compare June 23, 2026 15:40
@zaridan

zaridan commented Jun 23, 2026

Copy link
Copy Markdown
Contributor Author

Rebased onto the current parent (feat/orcastrator-upstream) and reconciled with current upstream/main.

Resolved: union-merged the 5 i18n locale catalogs (en/es/ja/ko/zh) — restored upstream's scrollSpeed keys (from #6068's TerminalInteractionSection) that a prior rebase had dropped while keeping the source, alongside this PR's new rename keys. Used upstream's real per-locale translations (not English fallbacks).

Verified: lint, typecheck, verify:localization-catalog (full 5-locale parity, 9601 keys each), and verify:localization-coverage all pass; orchestrators slice tests pass (10/10). The only full-suite failures are pre-existing flaky env tests in src/relay and src/main/daemon (timeouts / fd-counting / temp-dir races), unrelated to this change.

Mergeable: git merge-tree upstream/main HEAD reports 0 conflicts; branch is a clean descendant of its parent base.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 8d575fbf-e3c7-418c-891f-0f58fb11ba76

📥 Commits

Reviewing files that changed from the base of the PR and between c1bfc76 and f614562.

📒 Files selected for processing (27)
  • .nvmrc
  • ORCASTRATORS-SPEC.md
  • config/electron-builder.config.cjs
  • skills/orcastrate/SKILL.md
  • skills/orcastrate/orcastrate-coordinator.md
  • src/renderer/src/App.tsx
  • src/renderer/src/assets/main.css
  • src/renderer/src/components/Landing.tsx
  • src/renderer/src/components/NewWorkspaceComposerCard.tsx
  • src/renderer/src/components/NewWorkspaceComposerModal.tsx
  • src/renderer/src/components/OrchestratorLaunchModal.tsx
  • src/renderer/src/components/TaskPage.tsx
  • src/renderer/src/components/right-sidebar/OrchestratorMissionControl.tsx
  • src/renderer/src/components/right-sidebar/OrchestratorPanelNotice.tsx
  • src/renderer/src/components/right-sidebar/SourceControl.tsx
  • src/renderer/src/components/right-sidebar/right-sidebar-panel-content.tsx
  • src/renderer/src/components/settings/ExperimentalPane.tsx
  • src/renderer/src/components/settings/OrchestratorsExperimentalToggle.tsx
  • src/renderer/src/components/settings/experimental-search.ts
  • src/renderer/src/components/settings/orchestrators-search-entry.ts
  • src/renderer/src/components/sidebar/OrchestratorsSidebarSection.tsx
  • src/renderer/src/components/sidebar/WorktreeCardAgents.tsx
  • src/renderer/src/components/sidebar/WorktreeList.tsx
  • src/renderer/src/components/sidebar/index.tsx
  • src/renderer/src/i18n/locales/en.json
  • src/renderer/src/i18n/locales/es.json
  • src/renderer/src/i18n/locales/ja.json
💤 Files with no reviewable changes (3)
  • src/renderer/src/i18n/locales/es.json
  • src/renderer/src/i18n/locales/ja.json
  • src/renderer/src/i18n/locales/en.json
✅ Files skipped from review due to trivial changes (2)
  • .nvmrc
  • ORCASTRATORS-SPEC.md
🚧 Files skipped from review as they are similar to previous changes (19)
  • src/renderer/src/components/settings/orchestrators-search-entry.ts
  • src/renderer/src/components/right-sidebar/OrchestratorPanelNotice.tsx
  • src/renderer/src/components/Landing.tsx
  • src/renderer/src/components/settings/experimental-search.ts
  • src/renderer/src/assets/main.css
  • src/renderer/src/components/right-sidebar/right-sidebar-panel-content.tsx
  • config/electron-builder.config.cjs
  • src/renderer/src/components/NewWorkspaceComposerCard.tsx
  • src/renderer/src/components/settings/OrchestratorsExperimentalToggle.tsx
  • src/renderer/src/components/right-sidebar/SourceControl.tsx
  • src/renderer/src/components/settings/ExperimentalPane.tsx
  • src/renderer/src/components/sidebar/index.tsx
  • src/renderer/src/components/sidebar/WorktreeCardAgents.tsx
  • src/renderer/src/App.tsx
  • src/renderer/src/components/NewWorkspaceComposerModal.tsx
  • src/renderer/src/components/sidebar/OrchestratorsSidebarSection.tsx
  • src/renderer/src/components/right-sidebar/OrchestratorMissionControl.tsx
  • src/renderer/src/components/sidebar/WorktreeList.tsx
  • src/renderer/src/components/TaskPage.tsx

Comment on lines +67 to +77
const agents = useMemo(() => {
const catalog = getAgentCatalog()
const enabled = new Set(
filterEnabledTuiAgents(
catalog.map((a) => a.id),
disabledTuiAgents
)
)
const detected = detectedAgentIds ? new Set(detectedAgentIds) : null
return catalog.filter((a) => enabled.has(a.id) && (detected === null || detected.has(a.id)))
}, [disabledTuiAgents, detectedAgentIds])

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Constrain seeded default agent to the launchable agent set.

The modal seeds agent from defaultTuiAgent without validating it against agents (enabled + detected). That lets a hidden/disabled agent value still be submitted on launch.

Suggested fix
   useEffect(() => {
     if (visible && !wasVisibleRef.current) {
       setSelectedOptionId(prefilledProjectOptionId ?? firstProjectOptionId)
-      setAgent(defaultTuiAgent && defaultTuiAgent !== 'blank' ? defaultTuiAgent : null)
+      const defaultAgentIsLaunchable =
+        defaultTuiAgent !== null &&
+        defaultTuiAgent !== 'blank' &&
+        agents.some((entry) => entry.id === defaultTuiAgent)
+      setAgent(defaultAgentIsLaunchable ? defaultTuiAgent : null)
       setName(prefillName)
       setPrompt(prefillPrompt)
     }
     wasVisibleRef.current = visible
   }, [
     visible,
     firstProjectOptionId,
     prefilledProjectOptionId,
     defaultTuiAgent,
     prefillName,
-    prefillPrompt
+    prefillPrompt,
+    agents
   ])

Also applies to: 106-107, 140-143

@zaridan

zaridan commented Jun 24, 2026

Copy link
Copy Markdown
Contributor Author

Folded into the consolidated Orcastrator PR #6293.

@zaridan zaridan closed this Jun 24, 2026
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.

2 participants