fix: preserve configurable worktree branch prefixes#1498
fix: preserve configurable worktree branch prefixes#1498nassimna wants to merge 6 commits intopingdotgg:mainfrom
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

What Changed
worktreeBranchPrefixsetting.Why
t3codebranch namespace should not have generated worktree renames rewritten back tot3code/....UI Changes
Verification
bun fmtbun lintbun typecheckNote
Medium Risk
Touches branch-name generation/detection and server-side git rename behavior; a regex or prefix-handling mistake could rename the wrong branch or break worktree flows for some users, but changes are localized and covered by tests.
Overview
Ensures worktree branch naming is prefix-configurable end-to-end: a new
worktreeBranchPrefixclient setting (validated/normalized viaWorktreeBranchPrefix, defaulting tot3code) is introduced and migrated from legacy local settings.Temporary worktree branches are now created as
${prefix}/worktree-<8hex>instead of a hardcodedt3code/<8hex>, and server-side first-turn rename logic now detects only these marked temp branches (case-insensitive) and preserves the existing prefix when generating the final branch name. Adds UI control + validation for editing the prefix and expands test coverage for temp-branch detection and rename behavior.Written by Cursor Bugbot for commit a9fed1c. This will update automatically on new commits. Configure here.
Note
Preserve configurable worktree branch prefixes when renaming and creating branches
worktreeBranchPrefixfield toClientSettingsSchema(defaultt3code) with aWorktreeBranchPrefixschema for validation and normalization in settings.ts.buildTemporaryWorktreeBranchName, producing branches in the form<prefix>/worktree-<8hex>.buildGeneratedWorktreeBranchNameon rename, so the namespace is preserved across the rename./worktree-marker segment; existing branches without this marker will not match the newTEMP_WORKTREE_BRANCH_PATTERNand won't be renamed.Macroscope summarized a9fed1c.