Skip to content

feat(composer): choose a base ref in the New Workspace composer - #17250

Merged
nwparker merged 8 commits into
stablyai:mainfrom
VincentMenard76:feat/composer-start-from-picker
Sep 18, 2026
Merged

nwparker merged 8 commits into
stablyai:mainfrom
VincentMenard76:feat/composer-start-from-picker

Conversation

@VincentMenard76

Copy link
Copy Markdown
Contributor

ELI5

When you start a workspace from a Jira, Linear, GitHub or GitLab issue, Orca names it from the issue — but it also silently branches off the project's default branch, with no way to say otherwise. If your team works off a release branch you had to create the workspace and then move the branch yourself. This adds a "Branch from" control to the New Workspace composer, so you choose the starting point at the same moment you choose the name.

Getting there turned up a knot underneath: the composer used one value for two different things, so any second base control quietly took the name field over. That is untangled first, in its own commit.

What Changed

Five commits, each green on its own:

  1. refactor(repo) — move CreateFromPicker from components/automations/ to components/repo/, beside the repo-scoped shared UI already there (RepoCombobox, RepoBadgeLabel, repo-icon). Pure move.
  2. fix(composer) — split "the branch that names a workspace" from "the base it is created from". See The knot below.
  3. feat(composer) — declare baseBranch, onBaseBranchChange and startFromResetHint on NewWorkspaceComposerCardProps and render the shared picker under the name field, in a new ComposerBaseRefPicker.
  4. chore(repo) — drop a stale oxlint-disable react-doctor header the rename dragged into the changed set.
  5. feat(repo) — the picker lists the repo's branches as soon as it opens, instead of waiting for two typed characters.

Why

The name field's tabs pick how a workspace is named. The base ref is a separate decision the composer never exposed, so naming a workspace from an issue pinned the project's default base.

Nothing below the UI was missing. baseBranch and branchNameOverride are already separate fields on CreateWorktreeArgs (src/shared/worktree/create-types.ts:71-77); the payload builder passes baseBranch unconditionally next to linkedWorkItem (worktree-create-payload.ts:48, :87); an explicit base already wins over every default in main (src/main/worktree-create-base.ts:11); and the CLI already exposes the combination (orca worktree create --base-branch <ref> --issue <n>). No main, IPC, runtime or CLI change here.

The knot, and why commit 2 exists

baseBranch carried two meanings. It is the ref a worktree is created from, and it is also what buildWorkspaceSourceSelection (src/shared/new-workspace/workspace-source.ts:192) turns into the name field's branch pill whenever no work item is linked:

if (!linkedWorkItem) {
  return baseBranch ? { kind: 'branch', label: baseBranch } : null
}

So a second control that set a base took the name field over: SmartWorkspaceNameField swaps its text input for a source pill (:1784), and the name you had typed stopped being shown. It was never lost — it stayed in state, and Advanced still exposes a Name input when a pill occupies the main field (NewWorkspaceComposerAdvancedSection.tsx:163) — but you had to open a collapsed section to see it again. Found by hand, not by any of the automated checks.

Commit 2 adds baseBranchNamesWorkspace, true only when a branch was picked to name the workspace. The pill reads the flag; creation keeps reading baseBranch. Two call sites set it, because those are the only paths that make baseBranch defined with nothing linked, and an undefined base yields no pill anyway. It defaults to true, so restored drafts and a caller-supplied initial base behave exactly as before.

This is more than the issue asked for, and it is a prerequisite rather than a bonus: the picker cannot be offered for a plain typed name without it. Splitting it out would mean shipping the picker restricted to issue-shaped sources first — correct, because a linked issue outranks baseBranch, but it would not serve anyone creating a workspace under a name of their own until a follow-up landed. The decoupling alone, ahead of the picker, changes nothing observable and would read as an unmotivated refactor. Hence one PR. Say the word if you would rather have the narrow version first and I will resubmit that way.

Where the picker appears

Name source Picker Why
A plain typed name shown the base is an independent choice
GitHub / GitLab issue, Linear, Jira shown this is the issue's case
A branch pick hidden the branch is the base, and picking one clears reuse — offering it would silently turn a checkout of that branch into a new branch off something else
PR / MR hidden the base is the pull request's own head
Folder workspace hidden no branches

Hidden rather than disabled, following NewWorkspaceComposerAdvancedSection.tsx:183, where the Branch name field is : null in the mirror situation. The three disabled= uses in that file all gate on a visible adjacent control, which is not the case here.

The picker always opens on the project default. Persisting the last-used base per project was considered and deliberately left out, matching every other composer source.

Linked Issue

Fixes #15747

Visual Proof

The New Workspace composer, Name tab, with a workspace name typed by hand.

Before (main) After
no way to choose a base Branch from sits under the name, and the typed name stays put

The picker open, listing the repo's branches — commit 5. The typed name is still there above it:

Counted rather than eyeballed: "Branch from" appears 0 times on main and 1 time on this branch, on both the Name and Branch tabs, asserted in the same Electron run that produced these shots.

Images live on a separate pr-assets/composer-base-ref branch of the fork, not in this PR's diff.

Testing

pnpm typecheck, pnpm lint and pnpm build pass locally on macOS. pnpm test reports 65,703 passing and 9 failing; those 9 fail identically on main in this environment — same seven files, same nine test names — and none touches the composer. They are WSL (absent on macOS), macOS bash 3.2, a process-table probe, a relay handshake, a cross-version wire property, an error-message mismatch, and a number-format test that expects a narrow no-break space.

Verified end to end against a real repository. Composer on a project whose default base is origin/dev, base ref set to origin/main, name typed by hand:

Tkotm76/test   f90ed27
origin/main    f90ed27   ← the branch was created here
origin/dev     a72802a   ← the project default, correctly not used

The typed name survived and became the branch name — the regression commit 2 fixes.

New coverage:

  • base-ref-picker-visibility.test.ts — the visibility rule alone: offered with no source and for each of the four issue-shaped sources; hidden for github-pr, gitlab-mr and branch; hidden for a non-git project; hidden when branches are disabled (the folder-workspace case).
  • composer-name-source-selection.test.ts — the knot: a branch picked in the name field still names the workspace; a base ref chosen in the picker claims no source, so a typed name stays on screen; a linked issue outranks the base ref either way.
  • NewWorkspaceComposerCard.start-from.test.tsx — the rule through the rendered card, including that the picked ref reaches the composer and that choosing the project default reports no base rather than a pinned ref.
  • CreateFromPicker.test.tsx — the picker requests branches on an empty query as soon as it opens.

Platform and remote notes:

  • Renderer-only. No platform-dependent code: no keyboard shortcut, no path handling, no child process.

  • SSH / remote: base-ref reads run on the repo's own execution host. CreateFromPicker resolves getRuntimeEnvironmentIdForRepo(state, repoId) — per-repo evidence, not the ambient active-runtime setting — and passes it to getRuntimeRepoBaseRefDefault and searchRuntimeRepoBaseRefs. Worth a reviewer's eye: commit 5 means opening the picker now costs one runtime round trip on a remote repo, where it previously stayed silent until two characters were typed. The Branch tab already does exactly this through the same helper, debounced 200ms and capped at 30 results, so this aligns the two rather than inventing a cost — but say the word and I will gate the empty-query listing to local repos.

  • Remote wire: no RPC params, stream frames or published content change. baseBranch already crossed IPC.

  • Git providers: provider-neutral. Only the two PR/MR kinds are named, and only to exclude them.

  • Automations: shares CreateFromPicker and inherits commit 5's listing. Deliberate, and an improvement there too.

  • Localization: the picker's translate() keys are call-site literals, unchanged by the move. All three localization verifiers pass.

  • I manually tested these changes locally

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

AI Disclosure

Claude Opus 5, via Claude Code, wrote the implementation and ran the validation. I tested the result by hand against real projects, which is how the naming/base conflation in commit 2 was found — no automated check caught it.

Review

Cross-platform — renderer-only, no platform branch, no path or shortcut handling.

SSH / remote / local — base-ref reads execute on the repo's execution host through existing runtime helpers; no assumption of local execution introduced. One added round trip on picker open for remote repos, called out above.

Agents and integrations — no agent-specific code. Issue sources stay provider-neutral.

Performance — ComposerBaseRefPicker mounts only while the picker is visible, so folder workspaces and PR/MR sources pay no repo-map or worktree subscription. Branch search stays debounced and capped.

UI quality — the picker sits under the name field, reuses the shared CreateFromPicker on Popover, the surface docs/STYLEGUIDE.md:146 prescribes for a click-revealed picker, and the reset hint uses the documented trailing-metadata pattern from :220 (text-[11px] text-muted-foreground below the control). No new colour, size or shadow value.

Security — no new IPC surface and no new user input path to the main process; the picker calls runtime helpers that already existed.

Known adjacent duplication, not addressed here — src/renderer/src/components/settings/BaseRefPicker.tsx is a second base-ref picker duplicating the same runtime search trio and per-repo host resolution. Pre-existing; this PR promotes the other one to a shared location and leaves that consolidation alone. Flagging it so it reads as seen rather than missed.

Agent skill upstream boundary

  • Not applicable.

Notes

A stale oxlint-disable react-doctor/no-adjust-state-on-prop-change header rides along in commit 4. The rename put the file in the changed set, where check:code-quality:changed reports unused directives, and the rule no longer fires on it — verified by removing the directive and running the react-doctor pass over the whole directory, where the JS plugin actually loads, at both the new path and the old one on main. Kept in its own commit so the file move stays pure.

Checklist

  • This PR is small and focused — focused on one topic, but not small: the naming/base decoupling in commit 2 is a prerequisite for the control, not an extra. See The knot above.
  • I explained what changed and why (including ELI5)
  • 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)

Author

X: @VincentMenard76

@greptile-apps

greptile-apps Bot commented Aug 29, 2026 •

Copy link
Copy Markdown

Greptile Summary

The PR separates workspace naming-source intent from the selected creation base and adds a base-ref picker to eligible New Workspace composer states.

  • Persists whether a selected base branch also names the workspace.
  • Shows the shared repository branch picker for typed names and issue-backed workspaces.
  • Lists repository branches when the shared picker opens, including with an empty query.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Important Files Changed

Filename Overview
src/renderer/src/hooks/composer-state/workspace-identity-state.ts Adds and restores the state that distinguishes a naming branch from an independently selected creation base.
src/renderer/src/hooks/composer-state/branch-start-point-actions.ts Marks base refs selected through the standalone picker as independent from workspace naming.
src/renderer/src/hooks/composer-state/work-item-source-actions.ts Marks branches selected through the name field as both the workspace source and creation base.
src/renderer/src/components/new-workspace/NewWorkspaceComposerNameSection.tsx Conditionally renders the new base-ref control beneath the workspace name field.
src/renderer/src/components/new-workspace/ComposerBaseRefPicker.tsx Adapts the shared repository picker to optional composer base-branch state and resets picker-local state by repository.
src/renderer/src/components/repo/CreateFromPicker.tsx Moves the shared picker into the repository component area and permits branch searches with empty or one-character queries.
src/renderer/src/hooks/composer-state/draft-target-sync.ts Persists base-branch naming intent alongside an explicitly selected base branch.
src/renderer/src/store/slices/ui.ts Extends the saved New Workspace draft shape with optional base-branch naming intent.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  A[Workspace name or linked issue] --> B[Composer source selection]
  C[Branch from picker] --> D[baseBranch]
  C --> E[baseBranchNamesWorkspace = false]
  F[Name-field branch selection] --> D
  F --> G[baseBranchNamesWorkspace = true]
  B --> H[Workspace name]
  D --> I[Create-worktree payload]
  E --> H
  G --> H
Loading

Reviews (2): Last reviewed commit: "fix(composer): carry the base-ref naming..." | Re-trigger Greptile

@coderabbitai

coderabbitai Bot commented Aug 29, 2026 •

Copy link
Copy Markdown
Contributor

Review Change StackReview Change Stack

Important

Review skipped

We couldn't safely recover the incremental review. No full review was started, and the last reviewed checkpoint was preserved. Retry later, or explicitly request a full review by commenting @coderabbitai full review.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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: c6ae7df2-0828-42dc-8fcf-72d1cc3b9c73

📥 Commits

Reviewing files that changed from the base of the PR and between e96b006 and d2a3188.

📒 Files selected for processing (8)
  • src/renderer/src/hooks/composer-state/branch-start-point-actions.test.ts
  • src/renderer/src/hooks/composer-state/branch-start-point-actions.ts
  • src/renderer/src/hooks/composer-state/composer-external-sync.ts
  • src/renderer/src/hooks/composer-state/composer-name-source-selection.test.ts
  • src/renderer/src/hooks/composer-state/composer-source-state.ts
  • src/renderer/src/hooks/composer-state/github-provider-selection.ts
  • src/renderer/src/hooks/composer-state/github-submit-resolution.ts
  • src/renderer/src/hooks/composer-state/issue-source-actions.ts

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


📝 Walkthrough

Walkthrough

The composer now tracks whether a branch names the workspace or acts as its base reference. It conditionally displays a base reference picker for eligible repositories and sources. The picker resets search state when the project changes and shows branches on open without a query. Tests cover state selection, picker visibility, callbacks, reset hints, draft persistence, and empty-query searches.

Priority: ➖ Normal

Merge Risk: ⚪ Minimal · up to d2a31

The base-reference picker and its ownership state are covered across selection, persistence, restoration, and visibility paths; no merge-blocking risk remains.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 15.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 20 functions across 24 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the primary change: adding base-ref selection to the New Workspace composer.
Description check ✅ Passed The description is comprehensive and follows the required template. It explains the user impact, implementation, rationale, linked issue, visual proof, testing, AI use, review considerations, and chec…
Linked Issues check ✅ Passed Issue #15747 requires a separate “Branch from” picker for GitHub issues, GitLab issues, Linear issues, and Jira issues. The visibility helper allows the picker for these sources and typed names. It hi…
Out of Scope Changes check ✅ Passed The changes remain within issue #15747. The shared CreateFromPicker import and empty-query branch loading support the new picker and its branch discovery behavior. The state and draft changes preser…
✨ Finishing Touches 💡 1
⚔️ Resolve merge conflicts 💡
  • Resolve merge conflict in branch feat/composer-start-from-picker

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: Pro Plus

Run ID: 6e5a8875-610f-490c-8578-874d76ebbf92

📥 Commits

Reviewing files that changed from the base of the PR and between a1f198b and fdbcfd3.

📒 Files selected for processing (16)
  • src/renderer/src/components/NewWorkspaceComposerCard.start-from.test.tsx
  • src/renderer/src/components/automations/AutomationWorkspaceField.tsx
  • src/renderer/src/components/new-workspace/ComposerBaseRefPicker.tsx
  • src/renderer/src/components/new-workspace/NewWorkspaceComposerNameSection.tsx
  • src/renderer/src/components/new-workspace/base-ref-picker-visibility.test.ts
  • src/renderer/src/components/new-workspace/base-ref-picker-visibility.ts
  • src/renderer/src/components/new-workspace/new-workspace-composer-card-props.ts
  • src/renderer/src/components/repo/CreateFromPicker.test.tsx
  • src/renderer/src/components/repo/CreateFromPicker.tsx
  • src/renderer/src/hooks/composer-state/branch-start-point-actions.ts
  • src/renderer/src/hooks/composer-state/composer-name-source-selection.test.ts
  • src/renderer/src/hooks/composer-state/composer-source-state.ts
  • src/renderer/src/hooks/composer-state/identity-model.ts
  • src/renderer/src/hooks/composer-state/issue-source-actions.ts
  • src/renderer/src/hooks/composer-state/work-item-source-actions.ts
  • src/renderer/src/hooks/composer-state/workspace-identity-state.ts

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

@VincentMenard76

Copy link
Copy Markdown
Contributor Author

Notes on the two failed pre-merge checks, plus the one finding that was real.

Draft rehydration (Major) — valid, fixed in e96b006. baseBranchNamesWorkspace is now persisted with the draft and restored explicitly; details in the review thread.

Docstring coverage — not actionable as stated, because this repo asks for the opposite. AGENTS.md says: "Concise/Brief Non-obvious Comments ONLY — DO NOT: be verbose, explain the obvious, walk through the code ('WHY not HOW'). BE CONCISE. 1 LINE if possible." Writing docstrings for twelve functions to reach 80% would put the diff in direct conflict with the contributor guide, so each non-obvious decision here carries a one-line Why: and the self-describing signatures carry nothing. Happy to add more if a maintainer reads it differently.

Out of scope: listing branches on an empty query — deliberate, and disclosed rather than slipped in. Without it the picker shows only the project default and branches that already have a worktree until you type two characters, which makes the new control close to useless for the case the issue describes: you rarely know the exact name of the release branch you want to start from. It also aligns the picker with the composer's Branch tab, which already lists on an empty query through the same runtime helper. The shared effect on the Automations picker is stated in that commit's message, not left implicit.

That said, the check is right that it reaches beyond #15747. If a maintainer prefers it as its own PR, say so and I will pull commit fdbcfd36d out of this branch — the rest stands without it.

@ctolkien

Copy link
Copy Markdown
Contributor

I almost feel the "Name or Create from" should be 2 distinct things. You can name from one thing, but want to create from a different thing.

@VincentMenard76

Copy link
Copy Markdown
Contributor Author

That's the split this PR is going for. The name field still picks what the workspace is named from; the new Branch from control is the independent create-from.

Neil just landed a follow-up so an independently chosen base survives when you then pick a Jira / GitHub / Linear / GitLab issue (or clear the source). It only gets replaced when the name source itself is a branch or a PR.

If the remaining itch is the combined "Name or Create from" label, I'm happy to follow up — I'd keep that out of this PR.

VincentMenard76 and others added 8 commits September 17, 2026 20:58
Move CreateFromPicker and its test from components/automations to
components/repo, next to the repo-scoped shared UI that already lives
there (RepoCombobox, RepoBadgeLabel, repo-icon). The New Workspace
composer will consume this picker instead of growing a second base-ref
combobox.

Pure move: no behavior change. The translate() keys are call-site
literals, so no locale catalog is affected.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
baseBranch carried two meanings at once. It is the ref a worktree is created
from, and it is also what buildWorkspaceSourceSelection turns into the name
field's branch pill whenever no work item is linked. Any second control that
set a base therefore took the name field over: the pill replaced the text
input, hiding whatever the user had typed. The name survived in state, and
Advanced still exposed it, but the main field silently stopped showing it.

Add baseBranchNamesWorkspace, true only when a branch was picked to name the
workspace. The pill reads that flag; creation keeps reading baseBranch. Two
call sites set it, because those are the only paths that make baseBranch
defined with nothing linked — and an undefined base yields no pill anyway.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
The name field's tabs pick how a workspace is named; the base ref is a
separate decision the composer never exposed. Naming a workspace from a
Jira, Linear, GitHub or GitLab issue therefore pinned the project's default
base with no way to start from a release or a long-lived feature branch.

Nothing below the UI was missing. baseBranch already crosses IPC next to
linkedWorkItem and wins over every default in main, and the composer already
computed handleBaseBranchChange and startFromResetHint — the card simply
never declared those props, so its {...props} spread dropped them. Declare
them and render the shared create-from picker under the name field.

ComposerBaseRefPicker owns its own store reads, the way the sibling
ComposerParentWorktreePicker already does, so the name section stays
presentational and nothing subscribes to the worktree list while the picker
is hidden.

The picker is offered for a plain typed name and for issue-shaped sources.
It is hidden where a base already exists: PR/MR sources pin the pull
request's own head, a branch pick IS the base — and offering one there would
silently turn a checkout of that branch into a new branch off something
else, since picking a base clears reuse — and folder workspaces have no
branches. It always opens on the project default: no sticky base.

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

no-adjust-state-on-prop-change no longer fires on this file: removing the
directive and running the react-doctor pass over the directory — where the JS
plugin actually loads — reports nothing, at the new path and at the old one on
main alike. The suppression was already dead; the rename only put the file in
the changed set, where the quality gate reports unused directives.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
The picker only searched once two characters were typed, so opening it showed
just the project default and whatever branches already had a worktree. The
composer's Branch tab lists on an empty query through the same runtime helper;
match it, and the picker offers the repo's branches straight away.

Search stays debounced at 200ms and capped at 30 results, and it still runs on
the repo's own execution host, so a remote repo lists its own branches. The
Automations picker shares this component and gains the same listing.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
`baseBranchNamesWorkspace` lived only in component state, so restoring a
persisted draft always reset it to true. A base ref chosen in the picker
came back as a name-field source pill, hiding the name the user had typed
— the exact regression the flag exists to prevent, reappearing across a
draft round trip.

Persist it next to `baseBranch` and restore it through
`resolveDraftBaseBranchNamesWorkspace`. A draft written before the flag
existed records no intent and restores as a branch pick, which is the
behavior it had when it was saved.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
IssueSourceActions now requires baseBranchNamesWorkspace. The create-more reset fixture is a source-owned base, so the flag stays true and the next create still clears it.
@VincentMenard76
VincentMenard76 force-pushed the feat/composer-start-from-picker branch from d2a3188 to 296804e Compare September 17, 2026 19:07
@nwparker
nwparker merged commit b7d694f into stablyai:main Sep 18, 2026
@nwparker

Copy link
Copy Markdown
Contributor

I almost feel the "Name or Create from" should be 2 distinct things. You can name from one thing, but want to create from a different thing.

I changed it to 'Create From'
Hopefully it makes sense

@nwparker

Copy link
Copy Markdown
Contributor

final UX btw
image

ivanvykopal pushed a commit to ivanvykopal/orca that referenced this pull request Sep 20, 2026
…lyai#17250)

* refactor(repo): share the create-from picker outside automations

Move CreateFromPicker and its test from components/automations to
components/repo, next to the repo-scoped shared UI that already lives
there (RepoCombobox, RepoBadgeLabel, repo-icon). The New Workspace
composer will consume this picker instead of growing a second base-ref
combobox.

Pure move: no behavior change. The translate() keys are call-site
literals, so no locale catalog is affected.

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

* fix(composer): separate the branch that names a workspace from its base

baseBranch carried two meanings at once. It is the ref a worktree is created
from, and it is also what buildWorkspaceSourceSelection turns into the name
field's branch pill whenever no work item is linked. Any second control that
set a base therefore took the name field over: the pill replaced the text
input, hiding whatever the user had typed. The name survived in state, and
Advanced still exposed it, but the main field silently stopped showing it.

Add baseBranchNamesWorkspace, true only when a branch was picked to name the
workspace. The pill reads that flag; creation keeps reading baseBranch. Two
call sites set it, because those are the only paths that make baseBranch
defined with nothing linked — and an undefined base yields no pill anyway.

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

* feat(composer): let the New Workspace composer pick its base ref

The name field's tabs pick how a workspace is named; the base ref is a
separate decision the composer never exposed. Naming a workspace from a
Jira, Linear, GitHub or GitLab issue therefore pinned the project's default
base with no way to start from a release or a long-lived feature branch.

Nothing below the UI was missing. baseBranch already crosses IPC next to
linkedWorkItem and wins over every default in main, and the composer already
computed handleBaseBranchChange and startFromResetHint — the card simply
never declared those props, so its {...props} spread dropped them. Declare
them and render the shared create-from picker under the name field.

ComposerBaseRefPicker owns its own store reads, the way the sibling
ComposerParentWorktreePicker already does, so the name section stays
presentational and nothing subscribes to the worktree list while the picker
is hidden.

The picker is offered for a plain typed name and for issue-shaped sources.
It is hidden where a base already exists: PR/MR sources pin the pull
request's own head, a branch pick IS the base — and offering one there would
silently turn a checkout of that branch into a new branch off something
else, since picking a base clears reuse — and folder workspaces have no
branches. It always opens on the project default: no sticky base.

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

* chore(repo): drop a stale react-doctor suppression on the create-from picker

no-adjust-state-on-prop-change no longer fires on this file: removing the
directive and running the react-doctor pass over the directory — where the JS
plugin actually loads — reports nothing, at the new path and at the old one on
main alike. The suppression was already dead; the rename only put the file in
the changed set, where the quality gate reports unused directives.

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

* feat(repo): list branches as soon as the create-from picker opens

The picker only searched once two characters were typed, so opening it showed
just the project default and whatever branches already had a worktree. The
composer's Branch tab lists on an empty query through the same runtime helper;
match it, and the picker offers the repo's branches straight away.

Search stays debounced at 200ms and capped at 30 results, and it still runs on
the repo's own execution host, so a remote repo lists its own branches. The
Automations picker shares this component and gains the same listing.

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

* fix(composer): carry the base-ref naming intent through a saved draft

`baseBranchNamesWorkspace` lived only in component state, so restoring a
persisted draft always reset it to true. A base ref chosen in the picker
came back as a name-field source pill, hiding the name the user had typed
— the exact regression the flag exists to prevent, reappearing across a
draft round trip.

Persist it next to `baseBranch` and restore it through
`resolveDraftBaseBranchNamesWorkspace`. A draft written before the flag
existed records no intent and restores as a branch pick, which is the
behavior it had when it was saved.

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

* fix(composer): preserve independent base and branch name choices

* fix(composer): pass naming-intent through the create-more reset test

IssueSourceActions now requires baseBranchNamesWorkspace. The create-more reset fixture is a source-owned base, so the flag stays true and the next create still clears it.

---------

Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
Co-authored-by: Neil <[email protected]>
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.

[Feature]: Pick a base branch when creating a workspace from a task

3 participants