Proposal

Branch autonaming dropped the custom prefix. The code path is fixed; the settings layout is still worth merging.

Autonaming and branch prefix lived in different settings screens and didn't talk to each other. When an AI-generated name landed, it silently overwrote the prefix a user configured — moments after the workspace correctly had it. The code-path fix has since shipped in PR #7413; the settings-consolidation half below is future scope, since that PR doesn't touch the desktop UI.

Author Kiet Ho Area Workspace creation · Desktop settings Status Code fix shipped

The bug (fixed)

A workspace's branch prefix (none / github / author / custom) was resolved correctly at the moment a workspace was created. But when AI autonaming finished a few seconds later and renamed the branch to something better than the placeholder, the prefix wasn't reapplied — it was just gone. PR #7413 reapplies the prefix deterministically in every path that can rename a branch after creation; see that PR for the shipped fix.

1
Workspace created with placeholder branch
resolveProjectBranchPrefix runs, prefix applies correctly → kiet/quick-brown-fox
2
AI naming call runs in the background
The launch agent reads the prompt and proposes a better name: fix-login-timeout
3
applyGeneratedWorkspaceNames renames the branch — without the prefix
git branch -m uses the AI name raw → kiet/quick-brown-fox becomes fix-login-timeout

The live branch-name preview shown while typing a prompt has the same gap: workspaces.ts's generateBranchName procedure never calls resolveProjectBranchPrefix at all, unlike the create procedure right next to it. What the user sees while typing already doesn't match what they'll briefly get.

Notably, this already works elsewhere in the codebase

The legacy desktop-local naming path (apps/desktop/.../generate-branch-name.ts) threads resolveBranchPrefix into its dedupe step correctly. The regression is isolated to the newer host-service path — the one the app is actively migrating onto — which makes it worth fixing before that migration finishes and the correct behavior disappears entirely.

Evidence — verified live in the running app

Reproduced the exact reported scenario against a disposable scratch project in a real running dev build — not a unit-test mock — driven over CDP through the same host-service tRPC calls the desktop app itself makes, then confirmed on disk. Cleaned up afterward; nothing left behind.

1
Set a custom prefix on a scratch project
project.setBranchPrefix({ mode: "custom", customPrefix: "qatest" }) → success
2
Live-preview a branch name from a prompt (nothing typed yet)
generateBranchName({ prompt: "Fix the login timeout bug" }) → qatest/fix-the-login-timeout-bug
3
Create the workspace from only that prompt — no typed name or branch
the exact scenario that used to lose the prefix once autonaming landed. Final workspace: qatest/fix-the-login-timeout-bug
Superset Workspaces list showing a workspace named 'Fix the login timeout bug' with branch qatest/fix-the-login-timeout-bug, created just now
The real Workspaces list, right after creation — qatest/fix-the-login-timeout-bug, not a bare unprefixed name.
# confirmed on disk — the real git branch, not just the DB row
$ git -C .../cdp-prefix-test branch -a
* main
+ qatest/fix-the-login-timeout-bug

The scratch project's worktree and registration were removed via project.remove immediately after, and the scratch directory deleted.

Why it was easy to miss

Correction from the original draft of this page: on inspection while implementing the fix, the current (V2) project settings page turned out to already group the branch-prefix override and "Naming instructions" under one "Branches & naming" section, and the global Git settings page already shows a live prefix preview. So the settings-layout gap was smaller than first thought. Confirmed by reading the actual component tree:

// apps/desktop/.../v2-project/$projectId/components/V2ProjectSettings/V2ProjectSettings.tsx
<SettingsSection
  title={t({ message: "Branches & naming" })}
  description={t({ message: "How branches and workspace names are created for this project." })}
>
  {/* same section — not a separate page or a distant block */}
  <BranchPrefixSection ... />
  <NamingInstructionsSection ... />
</SettingsSection>
A project's Branches & naming settings section, showing Branch prefix set to Use global default and a Naming instructions textarea directly below it
Default project — prefix and naming instructions, same section.
The same Branches & naming section on a project with Branch prefix set to Custom prefix qatest
A project with a custom prefix (qatest) set — still the same section.

What's still true: there's no toggle anywhere to turn autonaming off (it's implicit — fires whenever a user hasn't hand-edited the branch name field), and the per-project section has no live example showing the prefix and naming instructions combined the way the global page's prefix preview does.

What shipped, and what's still open

  1. ✓
    Shipped — apply the resolved prefix in every host-service rename path

    PR #7413 calls resolveProjectBranchPrefix in the live-preview generateBranchName procedure, and reapplies it inside applyGeneratedWorkspaceNames after the AI/derived name comes back, instead of using that name raw in the git branch -m. It also covers the manual "rename with AI" path. This brings host-service to parity with what the legacy desktop path already did correctly.

  2. —
    No longer needed — settings are already grouped on the current (V2) project page

    See the correction above: the per-project branch-prefix override and naming instructions already render under one section, so there's no desktop UI change to make here. PR #7413 doesn't touch the desktop app.

  3. 3
    Future scope — a combined live example in that section

    A one-line preview — "with your current settings, a workspace from this prompt would be named kiet/fix-login-timeout" — next to the per-project naming instructions, matching the pattern the global Git settings page already has for the prefix alone. Not part of PR #7413.

Settings layout: current state / future scope

Today (V2) — already one section, no combined preview
Global: Git & Worktrees (has its own prefix preview)
— per-project "Branches & naming" section —
Branch prefix override
Naming instructions
Future scope — add a combined live preview
Prefix (mode + custom string)
Naming instructions
Live preview (not yet built)
→ kiet/fix-login-timeout

The two fields are already grouped in one section on the current (V2) project page — no restructuring needed there. The only gap left is a preview showing what the two settings produce together; that's future scope, not part of PR #7413.

Files involved

FileWhat's there
host-service/.../workspaces/workspaces.ts Fixed in PR #7413: the auto-gen path's resolved prefix is now threaded into the deferred AI rename, and the live-preview generateBranchName procedure now resolves the prefix itself.
host-service/.../workspace-creation/utils/ai-workspace-names.ts Fixed in PR #7413: applyGeneratedWorkspaceNames now takes a branchPrefix and reapplies it (via the new resolveGeneratedBranchName helper) before the git branch -m.
host-service/.../workspace-creation/utils/branch-prefix.ts resolveProjectBranchPrefix — the function now called from all three fixed call sites above.
desktop/.../workspaces/procedures/generate-branch-name.ts Legacy path — reference implementation that already got this right; host-service now matches it.
desktop/.../v2-project/.../V2ProjectSettings.tsx BranchPrefixSection + NamingInstructionsSection — already grouped under one section; no change made here (future scope is a combined live preview, see above).

Open questions