Skip to content

Add parent worktree selection when creating workspace - #15420

Merged
AmethystLiang merged 4 commits into
mainfrom
being-able-to-select-parent-worktree-when-creating-worktree
Aug 28, 2026
Merged

AmethystLiang merged 4 commits into
mainfrom
being-able-to-select-parent-worktree-when-creating-worktree

Conversation

@AmethystLiang

@AmethystLiang AmethystLiang commented Aug 19, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 14 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​1592 $\color{#cf222e}{\Huge{\mathbf{−}}}$​14 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​1578
Prod 41 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​1632 $\color{#cf222e}{\Huge{\mathbf{−}}}$​499 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​1133

Problem

Users couldn't organize newly created worktrees hierarchically in the sidebar, limiting their ability to manage workspaces by parent-child relationships.

Solution

Added a parent workspace picker in the composer's Advanced drawer that allows selecting any active worktree from the same repo as the parent for sidebar nesting. The feature:

  • Filters archived worktrees and cyclic references automatically
  • Respects folder workspace boundaries when restricting candidates
  • Gracefully degrades if the parent disappears before create (warns user, retries unattached)
  • Affects only sidebar organization (no git impact)
  • Works across local and remote runtimes

Changes

UI Components

  • New ComposerParentWorktreePicker with search, virtualization, and keyboard navigation
  • Updated NewWorkspaceComposerCard to expose parent selection in Advanced drawer
  • Improved jump-palette selection styling for virtualized lists

Backend

  • Export recordWorkspaceLineageForCreatedWorktree and assertAttachableParentWorkspace for adoption path
  • Split worktree-create into payload builders and parent-pick handling
  • Added retry logic: if create API reports parent missing, retry without parent and warn user
  • Preserve optimistic lineage writes that land after refresh requests start

State & RPC

  • Carry parentWorkspaceOrigin: 'manual' on app-selected picks so host records correct provenance (not CLI flag)
  • New WorktreeCreateParentPick type for resolver logic
  • Updated CreateWorktreeCallOptions type to include parentWorktreeId

Tests

  • Comprehensive picker component tests (search, keyboard nav, stale handling, folder filtering)
  • Create flow tests for parent-pick acceptance, stale drops, and remote retry
  • Lineage record tests for boundary checks and instance staleness

Testing

  • ComposerParentWorktreePicker component tests (virtualization, search, keyboard, stale parent)
  • Create flow tests (accept, drop, retry, remote)
  • Lineage merge tests (preserve optimistic writes)
  • pnpm test passes

@coderabbitai

coderabbitai Bot commented Aug 19, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

The change adds parent-worktree selection to the workspace composer. It validates repository, host, project, and workspace lineage boundaries during creation. Local and remote creation paths persist and return applicable lineage records. Renderer creation resolves stale parents, retries missing-parent failures without attachment, and merges results through shared helpers. Runtime and RPC payloads record manual parent provenance. Lineage refreshes preserve concurrent local changes. The change also extracts creation execution logic and updates related tests and selected-row styling.

Merge Risk: 🔵 Low · up to af2d4

The PR adds parent-worktree selection and sidebar lineage persistence, but a no-match search can clear an existing parent and a retained selection may cross the active folder boundary. These are bounded correctness issues requiring explicit owner follow-up before or after merge.

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description clearly explains the problem, solution, scope, implementation areas, and automated testing. However, it omits required template sections and information, including the linked issue, vi… Add the missing template sections. Provide a linked issue using Fixes #..., attach before/after visual proof or state N/A with a reason, document manual testing and tested platforms, complete the AI Disclosure and Agent skill upstream b…
Docstring Coverage ⚠️ Warning Docstring coverage is 16.28% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 86 functions across 49 files. (5 skipped:… 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 clearly summarizes the primary change: adding parent worktree selection during workspace creation.
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.
Full details: Description check

Explanation

The description clearly explains the problem, solution, scope, implementation areas, and automated testing. However, it omits required template sections and information, including the linked issue, visual proof or an explicit N/A explanation, manual testing and platform coverage, AI disclosure, review, agent skill boundary, notes, and checklist items.

Resolution

Add the missing template sections. Provide a linked issue using Fixes #..., attach before/after visual proof or state N/A with a reason, document manual testing and tested platforms, complete the AI Disclosure and Agent skill upstream boundary sections, address the Notes requirements, and complete the checklist.

Full details: Docstring Coverage

Explanation

Docstring coverage is 16.28% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 86 functions across 49 files. (5 skipped: 5 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch

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

🧹 Nitpick comments (3)
src/renderer/src/components/new-workspace/ComposerParentWorktreePicker.test.tsx (1)

308-324: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Add coverage for the host/project boundary filter.

storeState.projectHostSetups stays empty in every test, so sharesWorktreeLineageBoundary always compares undefined host and project ids. The filter that excludes a candidate running on a different host or project is never exercised. Add one case that seeds a project host setup and a candidate with a different hostId or projectId, then assert the candidate is excluded.

src/renderer/src/store/slices/worktrees-create-parent-pick.test.ts (1)

44-52: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Name the options argument index instead of writing to a bare position.

args[25] = { parentWorktreeId } couples both helpers to the exact arity of createWorktree. If a positional parameter is added before the options object, the assignment silently targets the wrong slot whenever the neighbouring parameter type also accepts an object. Extract a shared constant (or a small helper in worktrees-slice-test-harness.ts) so both call sites and future create tests refer to one named index.

♻️ Suggested shape
+// Index of the trailing options object in the positional createWorktree signature.
+const CREATE_OPTIONS_ARG_INDEX = 25
+
 function createWithParentPick(
   store: ReturnType<typeof createTestStore>,
   parentWorktreeId: string
 ) {
   const createWorktree = store.getState().createWorktree
   const args: Parameters<typeof createWorktree> = ['repo1', 'feature', 'origin/main']
-  args[25] = { parentWorktreeId }
+  args[CREATE_OPTIONS_ARG_INDEX] = { parentWorktreeId }
   return createWorktree(...args)
 }

Also applies to: 241-246

src/renderer/src/store/slices/worktrees/create/worktree-create-payload.ts (1)

109-132: 🗄️ Data Integrity & Integration | 🔵 Trivial | ⚡ Quick win

Reuse the existing schema-derived type.

Export WorktreeCreateParams from src/main/runtime/rpc/methods/worktree-create-args.ts and use it as the return type of buildRuntimeWorktreeCreateParams instead of Record<string, unknown>.


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: a123768e-0606-4b4a-ba2a-8cb311db178e

📥 Commits

Reviewing files that changed from the base of the PR and between 1272406 and 7420562.

📒 Files selected for processing (37)
  • src/main/ipc/worktree-create-lineage.test.ts
  • src/main/ipc/worktree-remote.ts
  • src/main/ipc/worktrees.ts
  • src/main/runtime/orca-runtime.test.ts
  • src/main/runtime/orca-runtime.ts
  • src/main/runtime/rpc/methods/worktree-create-args.test.ts
  • src/main/runtime/rpc/methods/worktree-create-args.ts
  • src/main/runtime/rpc/methods/worktree-schemas.ts
  • src/renderer/src/assets/main.css
  • src/renderer/src/components/NewWorkspaceComposerCard.test.tsx
  • src/renderer/src/components/NewWorkspaceComposerCard.tsx
  • src/renderer/src/components/new-workspace/ComposerParentWorktreePicker.test.tsx
  • src/renderer/src/components/new-workspace/ComposerParentWorktreePicker.tsx
  • src/renderer/src/components/right-sidebar/folder-workspace-attached-worktrees.ts
  • src/renderer/src/hooks/useComposerState.ts
  • src/renderer/src/i18n/locales/en.json
  • src/renderer/src/lib/pending-worktree-creation.ts
  • src/renderer/src/lib/worktree-creation-flow-agent-trust-preflight.test.ts
  • src/renderer/src/lib/worktree-creation-flow-execute.ts
  • src/renderer/src/lib/worktree-creation-flow.ts
  • src/renderer/src/runtime/runtime-compatibility-test-fixture.ts
  • src/renderer/src/store/slices/worktree-helpers.ts
  • src/renderer/src/store/slices/worktrees-create-parent-pick.test.ts
  • src/renderer/src/store/slices/worktrees-fetch-remote-lineage.test.ts
  • src/renderer/src/store/slices/worktrees/create/create-worktree.ts
  • src/renderer/src/store/slices/worktrees/create/created-worktree-state-merge.ts
  • src/renderer/src/store/slices/worktrees/create/worktree-create-parent-pick.ts
  • src/renderer/src/store/slices/worktrees/create/worktree-create-payload.ts
  • src/renderer/src/store/slices/worktrees/listing/fetch-worktrees.ts
  • src/renderer/src/store/slices/worktrees/listing/runtime-worktree-rpc-errors.ts
  • src/renderer/src/store/slices/worktrees/metadata/worktree-lineage-actions.ts
  • src/renderer/src/store/slices/worktrees/metadata/worktree-lineage-host-merge.ts
  • src/renderer/src/store/slices/worktrees/metadata/worktree-lineage-refresh.ts
  • src/renderer/src/web/web-preload-api-workspace-catalog.test.ts
  • src/renderer/src/web/web-preload-api.ts
  • src/shared/resolved-worktree-lineage.test.ts
  • src/shared/resolved-worktree-lineage.ts

Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.

@AmethystLiang

Copy link
Copy Markdown
Contributor Author

@coderabbitai Fixing. Will be in the next commit

@coderabbitai

coderabbitai Bot commented Aug 23, 2026

Copy link
Copy Markdown
Contributor

Tip

For best results, initiate chat on the files or code changes.

@AmethystLiang Thanks for the update. I will review the fix when it is available.

You are interacting with an AI system.

Enable users to pick a parent workspace in the composer's Advanced drawer,
organizing newly created worktrees hierarchically in the sidebar. The backend
validates lineage relationships and gracefully retries without the parent if
it becomes unavailable during creation.
- Record app-picked parents as manual actions, not CLI-flag equivalents,
  ensuring the same user action carries consistent cleanup semantics across hosts
- Gracefully retry without parent if the selection goes stale, warn the
  user instead of failing
- Refactor create into modules: parent resolution, payload building,
  state merge
- New parent worktree picker filtered by execution host and project
- Preserve concurrent local writes to lineage by comparing per-record state instead of key-set membership
@AmethystLiang
AmethystLiang force-pushed the being-able-to-select-parent-worktree-when-creating-worktree branch from 7420562 to 7933b1a Compare August 27, 2026 19:25
@coderabbitai

coderabbitai Bot commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

@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 Plus

Run ID: d5a625ab-fdbe-444a-9ebc-329ac43a0d7d

📥 Commits

Reviewing files that changed from the base of the PR and between fecdf0b and 7933b1a.

📒 Files selected for processing (38)
  • src/main/ipc/worktree-create-lineage.test.ts
  • src/main/ipc/worktree-remote.ts
  • src/main/runtime/orca-runtime.test.ts
  • src/main/runtime/orca-runtime.ts
  • src/main/runtime/rpc/methods/worktree-create-args.test.ts
  • src/main/runtime/rpc/methods/worktree-create-args.ts
  • src/main/runtime/rpc/methods/worktree-create-schemas.ts
  • src/renderer/src/assets/main.css
  • src/renderer/src/components/NewWorkspaceComposerCard.set-location.test.tsx
  • src/renderer/src/components/NewWorkspaceComposerCard.test.tsx
  • src/renderer/src/components/NewWorkspaceComposerCard.tsx
  • src/renderer/src/components/new-workspace/ComposerParentWorktreePicker.test.tsx
  • src/renderer/src/components/new-workspace/ComposerParentWorktreePicker.tsx
  • src/renderer/src/components/new-workspace/NewWorkspaceComposerAdvancedSection.tsx
  • src/renderer/src/components/new-workspace/new-workspace-composer-card-props.ts
  • src/renderer/src/components/right-sidebar/folder-workspace-attached-worktrees.ts
  • src/renderer/src/lib/pending-worktree-creation.ts
  • src/renderer/src/lib/worktree-creation-flow-agent-trust-preflight.test.ts
  • src/renderer/src/lib/worktree-creation-flow-execute.ts
  • src/renderer/src/lib/worktree-creation-flow.ts
  • src/renderer/src/runtime/runtime-compatibility-test-fixture.ts
  • src/renderer/src/store/slices/worktree-helpers.ts
  • src/renderer/src/store/slices/worktrees-create-parent-pick.test.ts
  • src/renderer/src/store/slices/worktrees-fetch-remote-lineage.test.ts
  • src/renderer/src/store/slices/worktrees/create/create-worktree.ts
  • src/renderer/src/store/slices/worktrees/create/created-worktree-state-merge.ts
  • src/renderer/src/store/slices/worktrees/create/worktree-create-parent-pick.ts
  • src/renderer/src/store/slices/worktrees/create/worktree-create-payload.ts
  • src/renderer/src/store/slices/worktrees/listing/fetch-worktrees.ts
  • src/renderer/src/store/slices/worktrees/listing/runtime-worktree-rpc-errors.ts
  • src/renderer/src/store/slices/worktrees/metadata/worktree-lineage-actions.ts
  • src/renderer/src/store/slices/worktrees/metadata/worktree-lineage-host-merge.ts
  • src/renderer/src/store/slices/worktrees/metadata/worktree-lineage-refresh.ts
  • src/renderer/src/web/preload-api/web-runtime-calls.ts
  • src/renderer/src/web/preload-api/web-worktrees-api.ts
  • src/renderer/src/web/web-preload-api-workspace-catalog.test.ts
  • src/shared/resolved-worktree-lineage.test.ts
  • src/shared/resolved-worktree-lineage.ts
🚧 Files skipped from review as they are similar to previous changes (28)
  • src/renderer/src/lib/worktree-creation-flow-agent-trust-preflight.test.ts
  • src/renderer/src/components/NewWorkspaceComposerCard.test.tsx
  • src/renderer/src/lib/pending-worktree-creation.ts
  • src/main/runtime/rpc/methods/worktree-create-args.ts
  • src/renderer/src/components/right-sidebar/folder-workspace-attached-worktrees.ts
  • src/renderer/src/store/slices/worktrees/listing/runtime-worktree-rpc-errors.ts
  • src/main/runtime/rpc/methods/worktree-create-args.test.ts
  • src/renderer/src/web/web-preload-api-workspace-catalog.test.ts
  • src/main/ipc/worktree-create-lineage.test.ts
  • src/renderer/src/store/slices/worktrees/create/created-worktree-state-merge.ts
  • src/renderer/src/store/slices/worktrees/listing/fetch-worktrees.ts
  • src/renderer/src/runtime/runtime-compatibility-test-fixture.ts
  • src/renderer/src/store/slices/worktrees/create/worktree-create-payload.ts
  • src/main/runtime/orca-runtime.ts
  • src/shared/resolved-worktree-lineage.ts
  • src/renderer/src/store/slices/worktrees-create-parent-pick.test.ts
  • src/renderer/src/store/slices/worktrees/metadata/worktree-lineage-actions.ts
  • src/renderer/src/components/new-workspace/ComposerParentWorktreePicker.test.tsx
  • src/renderer/src/assets/main.css
  • src/renderer/src/store/slices/worktree-helpers.ts
  • src/renderer/src/store/slices/worktrees/create/worktree-create-parent-pick.ts
  • src/renderer/src/lib/worktree-creation-flow-execute.ts
  • src/shared/resolved-worktree-lineage.test.ts
  • src/main/runtime/orca-runtime.test.ts
  • src/main/ipc/worktree-remote.ts
  • src/renderer/src/lib/worktree-creation-flow.ts
  • src/renderer/src/store/slices/worktrees/metadata/worktree-lineage-refresh.ts
  • src/renderer/src/store/slices/worktrees/create/create-worktree.ts

Included review availability: Your plan provides up to 10 included reviews per hour; 8 remain after this review.

- Rename "Parent workspace" label to "Parent worktree"
- Filter candidates by execution host and project to prevent nesting across hosts
- Wire parentWorktreeId through composer state and creation request pipeline
- Update translations and add new copy for nesting-related messages

@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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
src/renderer/src/components/new-workspace/ComposerParentWorktreePicker.tsx (1)

295-301: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Do not clear on a no-match Enter. A nonempty query with zero matches clamps activeIndex to 0, so Enter calls onSelect(null) and clears an existing parent. Return without selecting when the query has no matches.

Also applies to: 328-334


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: aa79b3da-5559-4900-aaac-64fdacd51fcb

📥 Commits

Reviewing files that changed from the base of the PR and between 7933b1a and af2d47d.

📒 Files selected for processing (23)
  • src/renderer/src/components/NewWorkspaceComposerCard.test.tsx
  • src/renderer/src/components/NewWorkspaceComposerCard.tsx
  • src/renderer/src/components/new-workspace/ComposerParentWorktreePicker.test.tsx
  • src/renderer/src/components/new-workspace/ComposerParentWorktreePicker.tsx
  • src/renderer/src/components/new-workspace/NewWorkspaceComposerAdvancedSection.tsx
  • src/renderer/src/components/new-workspace/new-workspace-composer-card-props.ts
  • src/renderer/src/hooks/composer-state/composer-card-contract.ts
  • src/renderer/src/hooks/composer-state/composer-card-props.ts
  • src/renderer/src/hooks/composer-state/composer-store-actions.ts
  • src/renderer/src/hooks/composer-state/composer-submit-orchestration.ts
  • src/renderer/src/hooks/composer-state/full-creation-execution.test.ts
  • src/renderer/src/hooks/composer-state/full-creation-execution.ts
  • src/renderer/src/hooks/composer-state/identity-model.ts
  • src/renderer/src/hooks/composer-state/quick-creation-execution.ts
  • src/renderer/src/hooks/composer-state/quick-creation-request.test.ts
  • src/renderer/src/hooks/composer-state/quick-creation-request.ts
  • src/renderer/src/hooks/composer-state/workspace-identity-state.ts
  • src/renderer/src/hooks/useComposerState.integration.test.ts
  • 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

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

Comment thread src/renderer/src/i18n/locales/zh.json Resolved
@AmethystLiang
AmethystLiang merged commit 2ac23c2 into main Aug 28, 2026
33 of 36 checks passed
AmethystLiang added a commit that referenced this pull request Aug 28, 2026
Addresses PR #15420 review feedback: parent worktree strings mixed
工作区 (workspace) and 工作树 (worktree) terminology.
AmethystLiang added a commit that referenced this pull request Aug 28, 2026
…ale (#16954)

* feat: select parent worktree for nesting when creating workspace

Enable users to pick a parent workspace in the composer's Advanced drawer,
organizing newly created worktrees hierarchically in the sidebar. The backend
validates lineage relationships and gracefully retries without the parent if
it becomes unavailable during creation.

* feat: select parent worktree for nesting when creating workspace

- Record app-picked parents as manual actions, not CLI-flag equivalents,
  ensuring the same user action carries consistent cleanup semantics across hosts
- Gracefully retry without parent if the selection goes stale, warn the
  user instead of failing
- Refactor create into modules: parent resolution, payload building,
  state merge

* Allow selecting parent worktree when creating workspace

- New parent worktree picker filtered by execution host and project
- Preserve concurrent local writes to lineage by comparing per-record state instead of key-set membership

* Allow selecting parent worktree when creating workspace

- Rename "Parent workspace" label to "Parent worktree"
- Filter candidates by execution host and project to prevent nesting across hosts
- Wire parentWorktreeId through composer state and creation request pipeline
- Update translations and add new copy for nesting-related messages

* fix(i18n): use 工作树 consistently for parent worktree strings in zh locale

Addresses PR #15420 review feedback: parent worktree strings mixed
工作区 (workspace) and 工作树 (worktree) terminology.
paidaxingyo666 pushed a commit to paidaxingyo666/Manta that referenced this pull request Aug 30, 2026
* feat: select parent worktree for nesting when creating workspace

Enable users to pick a parent workspace in the composer's Advanced drawer,
organizing newly created worktrees hierarchically in the sidebar. The backend
validates lineage relationships and gracefully retries without the parent if
it becomes unavailable during creation.

* feat: select parent worktree for nesting when creating workspace

- Record app-picked parents as manual actions, not CLI-flag equivalents,
  ensuring the same user action carries consistent cleanup semantics across hosts
- Gracefully retry without parent if the selection goes stale, warn the
  user instead of failing
- Refactor create into modules: parent resolution, payload building,
  state merge

* Allow selecting parent worktree when creating workspace

- New parent worktree picker filtered by execution host and project
- Preserve concurrent local writes to lineage by comparing per-record state instead of key-set membership

* Allow selecting parent worktree when creating workspace

- Rename "Parent workspace" label to "Parent worktree"
- Filter candidates by execution host and project to prevent nesting across hosts
- Wire parentWorktreeId through composer state and creation request pipeline
- Update translations and add new copy for nesting-related messages

(cherry picked from commit 2ac23c2)
paidaxingyo666 pushed a commit to paidaxingyo666/Manta that referenced this pull request Aug 30, 2026
…ale (stablyai#16954)

* feat: select parent worktree for nesting when creating workspace

Enable users to pick a parent workspace in the composer's Advanced drawer,
organizing newly created worktrees hierarchically in the sidebar. The backend
validates lineage relationships and gracefully retries without the parent if
it becomes unavailable during creation.

* feat: select parent worktree for nesting when creating workspace

- Record app-picked parents as manual actions, not CLI-flag equivalents,
  ensuring the same user action carries consistent cleanup semantics across hosts
- Gracefully retry without parent if the selection goes stale, warn the
  user instead of failing
- Refactor create into modules: parent resolution, payload building,
  state merge

* Allow selecting parent worktree when creating workspace

- New parent worktree picker filtered by execution host and project
- Preserve concurrent local writes to lineage by comparing per-record state instead of key-set membership

* Allow selecting parent worktree when creating workspace

- Rename "Parent workspace" label to "Parent worktree"
- Filter candidates by execution host and project to prevent nesting across hosts
- Wire parentWorktreeId through composer state and creation request pipeline
- Update translations and add new copy for nesting-related messages

* fix(i18n): use 工作树 consistently for parent worktree strings in zh locale

Addresses PR stablyai#15420 review feedback: parent worktree strings mixed
工作区 (workspace) and 工作树 (worktree) terminology.

(cherry picked from commit 6f3c5cc)
enrick-dev pushed a commit to enrick-dev/orca that referenced this pull request Oct 15, 2026
* feat: select parent worktree for nesting when creating workspace

Enable users to pick a parent workspace in the composer's Advanced drawer,
organizing newly created worktrees hierarchically in the sidebar. The backend
validates lineage relationships and gracefully retries without the parent if
it becomes unavailable during creation.

* feat: select parent worktree for nesting when creating workspace

- Record app-picked parents as manual actions, not CLI-flag equivalents,
  ensuring the same user action carries consistent cleanup semantics across hosts
- Gracefully retry without parent if the selection goes stale, warn the
  user instead of failing
- Refactor create into modules: parent resolution, payload building,
  state merge

* Allow selecting parent worktree when creating workspace

- New parent worktree picker filtered by execution host and project
- Preserve concurrent local writes to lineage by comparing per-record state instead of key-set membership

* Allow selecting parent worktree when creating workspace

- Rename "Parent workspace" label to "Parent worktree"
- Filter candidates by execution host and project to prevent nesting across hosts
- Wire parentWorktreeId through composer state and creation request pipeline
- Update translations and add new copy for nesting-related messages
enrick-dev pushed a commit to enrick-dev/orca that referenced this pull request Oct 15, 2026
…ale (stablyai#16954)

* feat: select parent worktree for nesting when creating workspace

Enable users to pick a parent workspace in the composer's Advanced drawer,
organizing newly created worktrees hierarchically in the sidebar. The backend
validates lineage relationships and gracefully retries without the parent if
it becomes unavailable during creation.

* feat: select parent worktree for nesting when creating workspace

- Record app-picked parents as manual actions, not CLI-flag equivalents,
  ensuring the same user action carries consistent cleanup semantics across hosts
- Gracefully retry without parent if the selection goes stale, warn the
  user instead of failing
- Refactor create into modules: parent resolution, payload building,
  state merge

* Allow selecting parent worktree when creating workspace

- New parent worktree picker filtered by execution host and project
- Preserve concurrent local writes to lineage by comparing per-record state instead of key-set membership

* Allow selecting parent worktree when creating workspace

- Rename "Parent workspace" label to "Parent worktree"
- Filter candidates by execution host and project to prevent nesting across hosts
- Wire parentWorktreeId through composer state and creation request pipeline
- Update translations and add new copy for nesting-related messages

* fix(i18n): use 工作树 consistently for parent worktree strings in zh locale

Addresses PR stablyai#15420 review feedback: parent worktree strings mixed
工作区 (workspace) and 工作树 (worktree) terminology.
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.

1 participant