fix(orchestration): focus a newly opened Orcastrator window - #38
Merged
zaridan merged 1 commit intoJun 25, 2026
Merged
Conversation
#29 added a `suppressActivation` flag to keep a director from yanking the user's active tab when a worker is spawned programmatically. That flag was also applied to `launchOrchestratorForProject`, which is reached only by the user clicking "+" in the ORCASTRATORS sidebar section — a deliberate, manual action that SHOULD focus the new window, exactly like the "+" for a regular worktree. As a result, opening a new Orcastrator silently left the user on their current worktree. User-facing change: opening a new Orcastrator now activates (focuses) it. - orchestrator-launch.ts: stop passing `suppressActivation: true` to `activateAndRevealWorktree`. - director-worktree-shell.ts: drop the trailing `{ suppressActivation: true }` on the store create so the host-side (SSH/remote) `activate` gate also focuses the new director. `launchOrchestratorForProject` is its only caller, so no per-caller threading is needed. Worker-spawn focus suppression is untouched: the CLI worker-spawn path (#35) and any renderer worker-create path still suppress activation. A director spawning a WORKER must still not steal focus. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
zaridan
deleted the
zaridan/fix-orchestration-focus-new-orcastrator-window
branch
June 25, 2026 04:13
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
#29 added a
suppressActivationflag so a director wouldn't yank the user off their active tab when it spawns a worker programmatically. That flag was also applied tolaunchOrchestratorForProject, which is reached from exactly one place: the user clicking "+" in the ORCASTRATORS sidebar section (OrchestratorLaunchModal.tsx:128). That is a deliberate, manual action and the new Orcastrator window SHOULD be focused — exactly like the "+" for a regular worktree. The regression: after #29, opening a new Orcastrator silently left the user on their current worktree.Change (user-facing, one line)
Opening a new Orcastrator now activates (focuses) it.
orchestrator-launch.ts— stop passingsuppressActivation: truetoactivateAndRevealWorktree.director-worktree-shell.ts— drop the trailing{ suppressActivation: true }on the storecreateWorktreecall so the host-side (SSH/remote)activategate (worktrees.ts,activate: options?.suppressActivation !== true) also focuses the new director.launchOrchestratorForProjectiscreateDirectorWorktreeShell's only caller (confirmed by grep after the recipe-director layer was removed in71041c0db), so no per-caller option threading is needed.Untouched: worker-spawn focus suppression
A director spawning a worker must still not steal focus. This PR leaves intact:
src/cli/handlers/worktree.ts/src/cli/selectors.ts.suppressActivationflag itself (still used for worker spawns) and itsworktree-activation-suppress.test.tscoverage.Tests
orchestrator-launch.test.ts— flipped to assert the launch now activates (suppressActivationfalsy,sidebarRevealBehaviorstill'auto').director-worktree-shell.test.ts— asserts no trailingsuppressActivationoption is passed to the host create.worktree-activation-suppress.test.ts— unchanged, still green (proves worker-spawn suppression is unaffected).Verified: touched vitest files pass (6/6),
oxlintclean,tsgoweb typecheck passes.🤖 Generated with Claude Code