Repository navigation
Conversation
|
Ready to review this PR? Stage has broken it down into 9 individual chapters for you: Chapters generated by Stage for commit 1e5074a2ccdb5b6dc343c111f0239db3cc362088 on Jun 22, 2026 9:06pm UTC. |
📝 WalkthroughWalkthroughThis PR introduces an experimental "Orcastrators" feature: a persistent director/coordinator worktree that runs the 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 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: 7
🧹 Nitpick comments (1)
src/renderer/src/components/right-sidebar/OrchestratorMissionControl.tsx (1)
159-182: 🚀 Performance & Scalability | 🔵 Trivial | ⚡ Quick winNarrow 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.jsonlreads. Use a narrower signal (for exampleworkerIdsor 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)
.nvmrcORCASTRATORS-SPEC.mdconfig/electron-builder.config.cjsskills/orcastrate/SKILL.mdskills/orcastrate/orcastrate-coordinator.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
| // 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} /> | ||
| } |
There was a problem hiding this comment.
🚀 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.
- 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]>
1e5074a to
c1bfc76
Compare
CodeRabbit feedback addressed (Stack A, #6099)Rebased onto the freshly-fixed parent (#6036 / Fixed:
Inherited as already-fixed (verified, not re-touched):
Intentionally skipped:
Verified: |
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]>
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]>
c1bfc76 to
f614562
Compare
|
Rebased onto the current parent ( Resolved: union-merged the 5 i18n locale catalogs ( Verified: Mergeable: |
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 8d575fbf-e3c7-418c-891f-0f58fb11ba76
📒 Files selected for processing (27)
.nvmrcORCASTRATORS-SPEC.mdconfig/electron-builder.config.cjsskills/orcastrate/SKILL.mdskills/orcastrate/orcastrate-coordinator.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.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
| 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]) |
There was a problem hiding this comment.
🎯 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
|
Folded into the consolidated Orcastrator PR #6293. |
Double-click an Orcastrator's name in the sidebar to rename it inline, reusing the existing
WorktreeTitleInlineRenameUX (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'sdisplayName(carrying theOrcastrator ·prefix), so the new name survives a reload throughreattachOrchestrators()— 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). Upstreammaindoes 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 row1e5074a2ccdb5b6dc343c111f0239db3cc362088— fix(orchestrators): honor renamed name on reattach over project displayNameOnce #6036 merges, rebasing this branch onto the updated
mainwill reduce the diff to just those two commits.Notes
experimentalOrchestratorsflag — no behavior change for users without it enabled.orchestrators.ts,OrchestratorsSidebarSection.tsx, andorchestrators.test.ts. Web typecheck and the orchestrators slice tests (10/10) are green.🤖 Generated with Claude Code