Skip to content

fix(worktrees): a finished create no longer pulls you off the workspace you switched to - #23974

Merged
brennanb2025 merged 9 commits into
mainfrom
brennanb2025/bug-creating-launching-an-agent-in-worktree-a-st
Sep 30, 2026
Merged

brennanb2025 merged 9 commits into
mainfrom
brennanb2025/bug-creating-launching-an-agent-in-worktree-a-st

Conversation

@brennanb2025

@brennanb2025 brennanb2025 commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 8 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​671 $\color{#cf222e}{\Huge{\mathbf{−}}}$​41 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​630
Prod 10 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​143 $\color{#cf222e}{\Huge{\mathbf{−}}}$​13 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​130

ELI5

If you started creating a new workspace, switched to another workspace while it was still being set up, and kept working, Orca pulled you onto the new workspace the moment it finished, so your typing landed in the wrong place. Now you stay where you are and a toast says "Worktree is ready" with a Go to worktree button (for a folder workspace: "Workspace is ready" with Go to workspace). If you stay on the "creating…" panel, you are still taken to the new workspace as before.

What does NOT change (so you are never left somewhere unexpected):

  • You stay on the new workspace while it is created (you remain on its "creating…" panel until it finishes) → you are taken into the new workspace with its agent tab selected and focused, exactly as before. No toast.
  • You are already on the new worktree when it finishes (for example you clicked its sidebar row, which appears a moment before the create completes) → treated the same as staying on the panel: the agent tab is selected and focused, and no toast.
  • You open a new agent tab (or any terminal tab) in the workspace you are already on → Orca switches to that new tab when it opens, exactly as before. This PR does not touch that path; it only changes what happens when a new workspace finishes being created while you are looking at something else.

Scope: workspaces created from the New Workspace dialog (every UI entry point opens it: sidebar/project "+", kanban, command palette, Tasks page, menu shortcut). Covers local, SSH and VM-backed creates, git worktrees and folder workspaces. Not changed: the other reveal paths reported on #9944 — orca file open --worktree <other>, CLI creates with --activate/--focus, GitHub Project view "start", the PR-checks "Fix" launch, and agent-session fork still open the workspace as before. The agent-launch-in-a-new-tab path is handled separately in #10924.

What caused it: two things moved you. (1) For a local create that starts a terminal agent (Claude, Codex, …), the main process opened the agent's terminal with activate: true, which switched the app to the new workspace as soon as that terminal appeared — before the create had even returned. This came from #4565 (new-workspace shortcut terminal focus). (2) The completion rule added in #8226 also activated the new workspace whenever you were on any other workspace when it finished.

What Changed

Before: finishing a create switched you to the new workspace if you were on its creation panel or on any other workspace; for local terminal-agent creates the switch happened even earlier, when the agent terminal spawned. You stayed put (silently) only if you had gone to Tasks or Settings, and in that case some creates did not start their agent or setup script until you later opened the workspace.

After:

  • Still on the creation panel → taken to the new workspace with the agent tab selected and focused, no toast (unchanged).
  • Moved anywhere else (another workspace, Tasks, Settings) → your view, focus and sidebar stay put; the agent, its draft prompt, the setup script and any issue command still start in the background; a toast "Worktree is ready" appears with a Go to worktree button (external-link icon) that opens it the same way the sidebar does; folder workspaces read "Workspace is ready" / Go to workspace.
  • Cancelled before it finished → no toast.

Mechanism:

  • src/main/ipc/worktree-remote.ts: the host now adds the agent startup terminal (and the setup terminal, tab or split) to the new workspace with surfaceOwner: false instead of activate: true — it creates the tab without opening, revealing or focusing the workspace. This is how runtime-managed creates already worked. The only caller is the app's own worktrees:create IPC; renderer and main ship together, so no wire change.
  • src/renderer/src/lib/worktree-creation-flow-execute.ts: the completion decision is now "are you still looking at this create" — its creation panel, or the new workspace itself. If yes, it opens and focuses the workspace (unchanged). If not, it leaves you where you are and shows the ready toast (worktree-creation-ready-toast.tsx), wrapped like the other post-create steps so a toast failure can't strand the create.
  • src/renderer/src/lib/worktree-creation-background-mount.ts: for creates whose agent the host does not start (SSH repos, local repos with project default tabs, VM creates), the tabs that still carry startup work (agent command, setup split, issue-command split) are mounted in the background with the existing requestBackgroundTerminalWorktreeMount, so they run without opening the workspace. Previously, the yank was what mounted them; tabs with no pending work stay unmounted.

Why

The issue asks for exactly this: work that finishes in the background must never change the workspace you are looking at, and should give a non-stealing signal instead (#9944 lists sidebar badge / toast / activity entry). The success toast mirrors the existing failure path in the same file, which already toasts a create error only when you have left the panel.

Undoing #8226's "activate after a workspace switch" is safe: #8226 was a product choice for the Tasks one-click create that did not show the creation panel, and that entry was removed in #13479. Every live entry now shows the creation panel on submit, so anyone who is elsewhere when the create finishes chose to leave.

Making the host stop activating (rather than only changing the renderer rule) is what actually fixes the reported case: the host's activation fired before the renderer's decision and cleared the "watching this panel" marker, so a renderer-only change still yanked you and showed a redundant toast. Now a single place — the window that submitted the create — decides navigation.

Alternatives considered:

  • Keep activating, but skip moving keyboard focus. Rejected: the view still switches under you, which is the complaint.
  • Only suppress activation after a workspace switch, stay silent for Tasks/Settings. Rejected: it is the same situation either way, and the silent case gives no signal the create finished.
  • Leave never-opened workspaces unmounted until you open them. Rejected: the toast would announce "ready" while the agent and setup script had not started.

Linked Issue

Refs #9944 (fixes the "create finishes after I switched away" case; the CLI / orca file open reveal paths are separate, so this should not auto-close the issue).

Visual Proof

Live Electron QA on a separate macOS machine (dev build, isolated profile, stub agent, a git hook slowing each create to ~17 s so there is time to switch away). "After" screenshots are from the final commit's copy unless noted.

Before (main): start creating A1, switch to workspace B — when A1 finishes you are pulled onto it, no toast.

before: creating A1 while on B
before: pulled to A1 on completion

After — switched to another worktree: you stay on B and get the toast.

after: Worktree r4gwt1 is ready · Go to worktree
after: still on B with the toast

After — Go to worktree: lands on the new worktree with the agent tab selected and focused.

after: opened from the toast, agent tab focused

After — folder workspace: the toast says "Workspace … is ready" / Go to workspace, and the button opens it.

after: Workspace r4fws1 is ready · Go to workspace
after: opened the folder workspace from the toast

After — already on the new worktree when it finishes (clicked its sidebar row mid-create): agent tab focused, no toast.

after: already on the new worktree, no toast

After — stayed on the creating panel: taken to the new worktree with the agent focused, no toast.

after: stayed on the panel

After — switched to Tasks: view stays on Tasks and the toast appears (this capture predates the final toast wording).

after: Tasks view with toast

After — project with default tabs (the agent is not started by the main process): stayed on B; the setup script and agent both ran without opening the workspace (marker files written within ~3 s), and after opening it each had run exactly once.

after: default-tabs project opened

Testing

  • I manually tested these changes locally (live Electron QA on macOS, see Visual Proof)

  • Automated tests added/updated, or explained why not below

  • worktree-creation-flow-ready-toast.test.ts (new): drives the New Workspace dialog's real entry — switched workspace → no activation, one toast whose Open opens the workspace; Tasks → toast, no activation; still on the panel with a host-started agent → activation + focus, no toast; cancelled mid-create → no toast.

  • worktree-creation-backend-startup-focus.test.ts (new): real store, IPC bridge, activation and focus queue — the host's agent/setup terminals don't activate the workspace, and completion focuses the agent tab, not the setup tab.

  • worktree-creation-background-mount.test.ts (new): SSH-like, setup-split and issue-split creates mount exactly the tabs with pending work; host-started agent tabs are never mounted again.

  • worktrees-local-create-flow.test.ts: pins the host's agent terminal and setup terminal (tab and split) as surfaceOwner: false with no activation.

  • Each new test was checked to fail with its fix removed. Web and node typechecks pass; oxlint and the changed-lines code-quality gate are clean; all verify:localization-* scripts pass; new strings are in all six locale catalogs.

Review

Agent skill upstream boundary

  • Not applicable, or this change follows docs/reference/agent-skill-sharing-upstream-boundary.md and copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.

Notes

Security: no new inputs, commands or IPC. Cross-platform: no shortcuts, paths or shells. SSH / VM: renderer decides navigation for all hosts; SSH and VM creates now start their agent/setup in the background — verified by code and unit tests, not in a live SSH session. Remote Orca servers and paired clients use a different create path and are unchanged. Mobile: not touched. Performance: one toast per backgrounded create; background mounts are limited to the new workspace's tabs that carry startup work, under the existing hidden-terminal parking limits.

Known and not changed here (pre-existing): with setup set to "split" on a project where the agent is started by the main process, the setup runs once but does not appear as a split (on main it was not visible at all; now it appears as its own tab); a create cancelled after the git worktree was already being added still finishes in the background and appears in the sidebar.

Checklist

  • This PR is small and focused
  • I explained what changed and why (ELI5, the user-facing before/after, the mechanism, and why over the alternatives)
  • Before/after screenshots or videos attached for UI changes, or N/A with reason
  • Self-reviewed for correctness, security, and performance
  • Cross-platform, SSH/remote, and path/shortcut impact considered (or N/A)
  • pnpm lint, pnpm typecheck, pnpm test, and pnpm build pass (or CI will cover; local preferred)

…ce you switched to

Show a ready toast with an Open action instead (#9944).
…om the host

For a composer create on a local repo that starts a terminal agent, main
spawned the agent terminal with `activate: true`. The renderer turned that
into a workspace switch before `createWorktree` resolved, which cleared the
creation panel pointer: a user who had moved to another workspace was still
pulled onto the new one, and every such create also showed a redundant
"ready" toast and lost its completion focus.

The host now adopts the startup and setup terminals silently
(`surfaceOwner: false`, no activation), the same way runtime-managed creates
do when not asked to activate. The submitting renderer's completion rule is
the only thing that decides whether to open the new workspace.

Also: the ready toast's Open is a deliberate user open (`navigationIntent:
'user-open'`), and the renderer tests now drive the composer's live entry
and reach the post-create cancel check.
…completion

- Pin that split-mode setup is split into the startup terminal without
  surfacing the new workspace.
- The watching-user completion test is now a real agent create: activation
  returns no primary tab, as it does in the app.
- New store-backed test drives the host's silent reveals through the real
  bridge, then the completion's activation and focus queue, and checks
  focus lands on the host-adopted agent tab rather than the setup tab.
…without opening it

When the host does not start the agent (SSH repos, local repos with
project default tabs, VM creates) and the user has moved on, completion
seeds the agent/setup/issue terminals without activating them. Nothing
mounted those panes, so the agent, draft prompt and setup script waited
until the user opened the workspace while the toast already said it was
ready.

The non-activating branch now asks for a background mount of just the
created tabs that still owe startup work, the same request the terminal
bridges and sleeping-agent wake already use. Idle tabs and host-started
terminals are left unmounted.
@brennanb2025

brennanb2025 commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor Author

Review status (head e75bd739577)

The problem: if you started creating a workspace from the New Workspace dialog, switched to another workspace while it was being set up, and kept working, Orca pulled you onto the new workspace when it finished. The first version of this PR changed only the completion rule, which did not fix the most common case: for a local create that starts a terminal agent, the main process opened the agent's terminal with "activate", which switched workspaces before the completion rule ran (and cleared its "still watching the panel" marker). So you were still pulled away, and also got a redundant "ready" toast.

What changes for you now: if you stay on the "creating…" panel, you land on the new workspace with the agent focused, as before. If you move anywhere else (another workspace, Tasks, Settings), your view, keyboard focus and sidebar stay put, the agent / draft prompt / setup script / issue command still start in the background, and a toast appears: "Worktree is ready" with a Go to worktree button ("Workspace is ready" / Go to workspace for folder workspaces). If you are already on the new worktree when it finishes (its sidebar row appears a moment early and you clicked it), it is treated like staying on the panel: agent tab focused, no toast. A cancelled create shows no toast.

Fixed during review

  • P1 — local terminal-agent creates still yanked you: the main process now adds the agent and setup terminals without opening, revealing or focusing the workspace (surfaceOwner: false), so only the window that submitted the create decides navigation. (src/main/ipc/worktree-remote.ts)
  • P2 — creates whose agent the main process does not start (SSH repos, local repos with project default tabs, VM creates) would have announced "ready" while the agent and setup had not started, because a never-opened workspace does not mount its terminals. Their tabs that carry startup work are now mounted in the background with the existing background-mount mechanism. (worktree-creation-background-mount.ts)
  • P3 — the toast's button now opens the workspace the same way the sidebar does (navigationIntent: 'user-open').
  • Toast copy and icon (requested after review): "Worktree/Workspace is ready" + ExternalLink "Go to worktree"/"Go to workspace", in all six locales.
  • A user already on the new worktree at completion got a redundant toast; they now get the normal "watching" completion. An unreachable second guard added along the way was removed.
  • P3 — tests now drive the dialog's real entry point and the real store/IPC/focus path; each new test was checked to fail with its fix removed.
  • PR body: corrected the reason reverting Fix task workspace handoff after switching workspaces #8226 is safe (its Tasks one-click entry was removed in [leas code] Remove superseded GitHub background creation #13479; every live entry shows the creation panel), and listed the create paths that are not changed.

Deferred (not in this PR)

  • "Create more" batches show one toast per workspace rather than one combined toast.
  • The toast button on a workspace deleted in the meantime does nothing (no error).
  • Pre-existing (identical on main): when you stay on the panel with the sidebar scrolled down, the new row is inserted above and ends up out of view under the "Projects" header.
  • Pre-existing: setup set to "split" on a project where the main process starts the agent runs once but never appears as a split (on main it was not visible at all; now it is its own tab).
  • Pre-existing: a create cancelled after the git worktree add started still finishes in the background and appears in the sidebar with its agent running (on main it also pulled you onto it).
  • Unproven: in one run the sidebar scroll position jumped when a create finished; traced to the sidebar's own scroll restore, not compared against main.
  • Minor pre-existing UI: the "Add a setup script" card overlaps bottom sidebar rows; focus falls to the page body after Cancel.
  • continueBackgroundWorktreeCreation / beginBackgroundWorktreePreparation have no production callers since [leas code] Remove superseded GitHub background creation #13479 (left in place, out of scope).

Verified

  • Live Electron QA on a separate macOS machine (isolated dev profile, stub agent, create slowed to ~17 s): bug reproduced on main; on this branch — switched workspace (stay + toast, focus kept), Open (agent tab focused), stayed on panel (opened, no toast), Tasks view (stay + toast), setup script runs, cancel (no toast), and a default-tabs project where agent and setup ran in the background exactly once. A second QA round on 08374be223e checked the new toast copy/icon, the folder title, clicking the new row mid-create (no toast, agent focused, started once), clicking it then leaving (toast), and staying on the panel. A final capture on e75bd739577 confirmed both toasts ("Worktree … is ready" / Go to worktree, "Workspace … is ready" / Go to workspace) and that each button opens the right place; the PR body screenshots are updated to the final copy.

  • Unit tests for the changed flows (85 tests across the creation-flow, local-create, focus and background-mount suites), web and node typechecks, oxlint and the changed-lines quality gate, localization checks. CI is green on e75bd739577.

  • Final readiness checklist on e75bd739577: no P0–P2 findings; one test gap deferred (no test asserts the toast for a native-chat create after moving away).

Not verified

  • SSH and VM creates live (background start is verified by code reading and unit tests only), the Settings view, agents other than a stub Claude, Windows/Linux, non-English toast text, native window focus (the QA window was hidden), human-paced timing for clicking the new row mid-create (driven by script; the row appears ~115 ms before completion on a local create).

The PR is marked ready for review; it was not merged.

@brennanb2025
brennanb2025 marked this pull request as ready for review September 30, 2026 17:50
@greptile-apps

greptile-apps Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

RetriggerConfidence Score: 4/5

[Medium risk] Worktree creation no longer auto-switches the user away.

The PR is not yet safe to merge because the ready toast’s Open action can select a same-ID workspace on another host.

Findings

  1. P1 Open can select another host ▶

Summary

The PR prevents a completed New Workspace creation from switching users away from their current view. Creates finished in the background instead show a ready toast, and pending terminal startup work can mount without opening the workspace. The latest update gives folder workspaces a distinct “Go to workspace” action.

Diagram
%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Creation finishes] --> B{Still viewing creation or new workspace?}
  B -->|Yes| C[Activate and focus new workspace]
  B -->|No| D[Mount pending startup work in background]
  D --> E[Keep current view and show ready toast]
  E --> F[Go to workspace action]
Loading

Reviews (4) · Last reviewed commit: "fix(worktrees): folder workspace ready t..."

Comment on lines +19 to +22
activateAndRevealWorktree(worktree.id, {
sidebarRevealBehavior: 'auto',
navigationIntent: 'user-open'
})

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Open can select another host

If an SSH or runtime host has a worktree with the same ID as one on another host, this Open action passes no host identity. The lookup then uses the first matching row, so clicking Open can take the user to a different workspace instead of the one that just finished creating.

Knowledge Base Used: Workspace and worktree lifecycle

@coderabbitai

coderabbitai Bot commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Advanced

Run ID: 144debc1-24f9-44c2-b3e3-82b5336a81bb

📥 Commits

Reviewing files that changed from the base of the PR and between ed05456 and e75bd73.

📒 Files selected for processing (8)
  • src/renderer/src/i18n/locales/en.json
  • src/renderer/src/i18n/locales/es.json
  • src/renderer/src/i18n/locales/fr.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/worktree-creation-ready-toast.test.tsx
  • src/renderer/src/lib/worktree-creation-ready-toast.tsx
🚧 Files skipped from review as they are similar to previous changes (6)
  • src/renderer/src/i18n/locales/fr.json
  • src/renderer/src/i18n/locales/es.json
  • src/renderer/src/i18n/locales/ko.json
  • src/renderer/src/i18n/locales/ja.json
  • src/renderer/src/i18n/locales/en.json
  • src/renderer/src/i18n/locales/zh.json

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 5 remain after this review.


📝 Walkthrough

Walkthrough

Local startup and setup terminals no longer request activation or claim surface ownership. The renderer mounts tabs with pending startup work in the background. Creation completion now considers the current view when deciding whether to activate the new worktree. When creation remains pending and the worktree is not in view, the renderer can show a localized ready notification with an action to open it.

Priority: ➖ Normal

Merge Risk: ⚪ Minimal · up to e75bd

No concrete merge-blocking issue remains identified. The changes preserve the current workspace when creation finishes elsewhere and provide an explicit action to open the result; merge after normal checks pass.

Architecture Summary

Architecture risk: 🔵 Low · up to e75bd

The change affects 1 system.

Changed systems: src

Architecture concerns
No architecture-level concerns identified.

Review details

Systems and components

  • observed — src (service) was modified; 18 changed files map to changed impact.

Before / after behavior

  • observed — Modified behavior in src/main/ipc/worktree-remote.ts: The startup terminal no longer activates on creation and now sets surfaceOwner: false.
  • observed — Modified behavior in src/main/ipc/worktree-remote.ts: Setup terminals retain activate: false and now also set surfaceOwner: false for both split and newly created terminal paths.
  • observed — Modified behavior in src/main/ipc/worktrees-local-create-flow.test.ts: The startup-terminal expectation now sets surfaceOwner: false instead of activate: true.
  • observed — Modified behavior in src/main/ipc/worktrees-local-create-flow.test.ts: The setup-terminal expectation adds activate: false and surfaceOwner: false. The test also replaces the former assertion that startup creation used activate: false with a check that its options omit activate, alongside a comment assigning workspace opening to the submitting renderer.
🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 57.14% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 14 functions across 13 files. (6 skipped:… Write docstrings for the functions missing them to satisfy the coverage threshold.
Description check ⚠️ Warning The description thoroughly explains the user impact, implementation, rationale, testing, visual proof, scope, and known limitations. However, the Linked Issue section uses Refs #9944, while the repo… Replace Refs #9944 with a valid issue link or the required issue-closing reference, unless the author is an internal maintainer covered by the template exception. Also check the final validation items or state that CI will cover `pnpm lin…
✅ Passed checks (3 passed)
Check name Status Explanation
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.
Title check ✅ Passed The title clearly identifies the primary behavior change: completed worktree creation no longer moves the user away from the workspace they selected.
Full details: Docstring Coverage

Explanation

Docstring coverage is 57.14% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 14 functions across 13 files. (6 skipped: 6 unsupported.)

Full details: Description check

Explanation

The description thoroughly explains the user impact, implementation, rationale, testing, visual proof, scope, and known limitations. However, the Linked Issue section uses Refs #9944, while the repository template requires an actual linked issue and states that Refs is not sufficient. The final command checklist also remains unchecked without explicitly stating that CI will cover those checks.

Resolution

Replace Refs #9944 with a valid issue link or the required issue-closing reference, unless the author is an internal maintainer covered by the template exception. Also check the final validation items or state that CI will cover pnpm lint, pnpm typecheck, pnpm test, and pnpm build.

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Autopilot is currently an internal CodeRabbit preview.


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: 1


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Advanced

Run ID: 31fa7d51-57f0-41c3-9a2f-199ac1033f37

📥 Commits

Reviewing files that changed from the base of the PR and between fceca5c and 70ae17a.

📒 Files selected for processing (17)
  • src/main/ipc/worktree-remote.ts
  • src/main/ipc/worktrees-local-create-flow.test.ts
  • src/renderer/src/i18n/locales/en.json
  • src/renderer/src/i18n/locales/es.json
  • src/renderer/src/i18n/locales/fr.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/worktree-creation-backend-startup-focus.test.ts
  • src/renderer/src/lib/worktree-creation-background-mount.test.ts
  • src/renderer/src/lib/worktree-creation-background-mount.ts
  • src/renderer/src/lib/worktree-creation-flow-dedupe.test.ts
  • src/renderer/src/lib/worktree-creation-flow-execute.ts
  • src/renderer/src/lib/worktree-creation-flow-ready-toast.test.ts
  • src/renderer/src/lib/worktree-creation-flow-stranded-surface.test.ts
  • src/renderer/src/lib/worktree-creation-flow.test.ts
  • src/renderer/src/lib/worktree-creation-ready-toast.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 7 remain after this review.

// Why: only a user still watching the creation surface is handed the new
// workspace; anyone who moved on (another workspace or an app view) keeps
// their place and gets a toast instead (#9944).
const shouldActivateOnCompletion = isPendingCreationSurfaceVisible(creationId)

Copy link