Skip to content

feat(composer): restore compact branch picker UX - #21741

Merged
nwparker merged 2 commits into
mainfrom
nwparker/recover-compact-branch-picker
Sep 20, 2026
Merged

nwparker merged 2 commits into
mainfrom
nwparker/recover-compact-branch-picker

Conversation

@nwparker

@nwparker nwparker commented Sep 20, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 4 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​66 $\color{#cf222e}{\Huge{\mathbf{−}}}$​16 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​50
Prod 13 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​267 $\color{#cf222e}{\Huge{\mathbf{−}}}$​118 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​149

ELI5

The New Workspace composer now puts the starting branch in a compact control beside “Create From”, so choosing a workspace name and choosing its base branch stay visible together.

What Changed

The composer label is now “Create From [Optional]”. The branch picker appears as a compact top-right control, opens the existing searchable branch list, and hides while the Branch naming tab is active. Read-only projects show the selected branch without offering an action. Branch rows can set the repository default through the existing host-aware update path.

Why

The full-width branch row took over the composer and made the name/source relationship harder to scan. The compact control keeps the common choice visible without changing the underlying branch creation behavior. The implementation restores the previously designed UX and keeps local, SSH, and runtime repository routing intact.

Linked Issue

Fixes #15747

Visual Proof

The attached screenshot shows the recovered compact “Branch from” control beside “Create From [Optional]”.

Testing

  • Focused renderer tests: 52 passing across the composer, picker, and visibility suites
  • pnpm tc:web (after restoring the local dependency cache)
  • pnpm run check:code-quality:changed
  • git diff --check

AI Disclosure

Codex assisted with the implementation and verification.

Checklist

  • Small and focused
  • User-facing before/after and mechanism explained
  • Visual proof attached
  • Cross-platform and host-aware routing preserved

orca-compact-branch-from-final

@pullfrog pullfrog 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.

ℹ️ No critical issues — a couple of minor suggestions inline.

Reviewed changes

This run reviewed the full 16-file, renderer-only diff that restores the compact "Branch from" control in the New Workspace composer.

  • Compact branch picker beside the name label — NewWorkspaceComposerNameSection moves ComposerBaseRefPicker into a justify-between row with the renamed "Create From" label and drops the old Name or 'Create From' copy.
  • Mode-aware visibility — shouldShowComposerBaseRefPicker now hides the picker when smartNameMode === 'branches', with smartNameMode threaded through ComposerModel → card props → name section.
  • Read-only connected-project state — CreateFromPicker/ComposerBaseRefPicker gain readOnly, rendering the trigger without a Popover when the project needs a connection.
  • Set-as-default context menu — branch rows get a right-click "Set as default" action writing worktreeBaseRef through the host-aware updateRepo path.
  • Host-aware base-ref lookups — getRuntimeRepoBaseRefDefault/searchRuntimeRepoBaseRefs now receive repoHostId.
  • i18n + tests — label updated in en/es/ja/ko/zh; tests added/updated for read-only and branch-mode visibility.

I ran the four changed test files locally: 52 passing. The context-menu-inside-popover pattern matches the existing AgentCombobox, including z-[70], so the layering is sound.

ℹ️ Nitpicks

  • fr.json still carries the pre-change label: auto.components.NewWorkspaceComposerCard.ac3748dcda is "Nom ou « Créer à partir de »" while en/es/ja/ko/zh were updated to "Create From". French is a supported (lazily loaded) locale and the most complete catalog, so this looks like an oversight rather than intentional lag.
  • No card-level test covers smartNameMode: 'branches' actually hiding the picker (only the pure shouldShowComposerBaseRefPicker unit test), and none covers "Set as default" routing updateRepo with the repo's execution host. Both are cheap to add and guard the wiring, not just the predicate.

Pullfrog  | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using DeepSeek Flash (free via Pullfrog for OSS) | 𝕏

Comment on lines +246 to +253
title={
readOnly
? translate(
'auto.components.NewWorkspaceComposerCard.connectProjectFirst',
'Connect this project first'
)
: translate('auto.components.automations.CreateFromPicker.dd3841b442', 'Branch from')
}

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.

The compact trigger sets a native title while its label is also wrapped in FilePathCursorTooltip (line 264), so hovering the label can surface two different tooltips at once — the Radix branch-name tooltip and the browser's Branch from / Connect this project first. Consider keeping a single mechanism; e.g. move the read-only reason into the Radix tooltip content and drop title, or drop the tooltip and let title carry the full name.

@coderabbitai

coderabbitai Bot commented Sep 20, 2026 •

Copy link
Copy Markdown
Contributor

Review Change StackReview Change Stack

📝 Walkthrough

Walkthrough

The composer now carries smartNameMode into base-ref visibility checks. The base-ref picker supports compact and read-only modes, execution-host-aware branch requests, branch tooltips, and default-branch updates. The picker appears beside the Create From label and becomes read-only when a repository connection is required. Tests and localized labels were updated.

Priority: ⬇️ Low

Merge Risk: 🔵 Low · up to 4c46b

Read-only projects expose a misleading branch control, and failed default-branch changes appear to succeed. These are bounded UI failures but should be addressed before relying on the new picker workflow.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 6 functions across 11 files. (5 skipped: … 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 main change: restoring the compact branch picker UX in the composer.
Description check ✅ Passed The description directly explains the compact branch picker, its visibility rules, read-only behavior, routing, testing, and linked issue.
Linked Issues check ✅ Passed Issue #15747 requires a base-branch picker for issue-shaped workspace sources, with no picker for PR/MR sources or bare branch selections. NewWorkspaceComposerNameSection renders the compact `Compos…
Out of Scope Changes check ✅ Passed The changes stay within issue #15747. The picker API changes, compact layout, localized label updates, visibility tests, read-only behavior, branch search, host routing, and default-branch context act…
Full details: Docstring Coverage

Explanation

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

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 2
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR
🛠️ Fix failing CI checks 💡
  • Commit to this branch
  • Create a new PR

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


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Advanced

Run ID: 7e1485d6-3734-4270-abff-b53685d5b0d0

📥 Commits

Reviewing files that changed from the base of the PR and between db7b57b and 4c46ba5.

📒 Files selected for processing (16)
  • src/renderer/src/components/NewWorkspaceComposerCard.start-from.test.tsx
  • src/renderer/src/components/NewWorkspaceComposerCard.test.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/composer-card-contract.ts
  • src/renderer/src/hooks/composer-state/composer-card-props.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; 4 remain after this review.

@nwparker
nwparker merged commit b5b727b into main Sep 20, 2026
28 of 29 checks passed
@nwparker
nwparker deleted the nwparker/recover-compact-branch-picker branch September 20, 2026 02:05
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

1 participant