fix: preserve configurable worktree branch prefixes#1498
fix: preserve configurable worktree branch prefixes#1498nassimna wants to merge 7 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.
# Conflicts: # apps/server/src/orchestration/Layers/ProviderCommandReactor.test.ts # apps/server/src/orchestration/Layers/ProviderCommandReactor.ts

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 worktree branch naming and server-side rename detection; mistakes could cause missed renames or incorrect git branch names for new threads.
Overview
Adds a new client setting
worktreeBranchPrefix(defaultt3code) with validation (WorktreeBranchPrefix) and migration support, plus a Settings UI control to edit/reset it.Changes temporary worktree branches from
<prefix>/<8hex>to<prefix>/worktree-<8hex>and updates the server rename logic to only target this marked pattern, preserving the existing branch prefix (including mixed case and digit-prefixed namespaces) when renaming to an LLM-generated branch name.Extends test coverage in
ProviderCommandReactor.test.tsandcontracts/settings.test.tsto lock in prefix preservation and ensure ordinary user branches aren’t mistakenly renamed.Written by Cursor Bugbot for commit 2c6133f. This will update automatically on new commits. Configure here.
Note
Preserve configurable worktree branch prefixes when creating and renaming branches
worktreeBranchPrefixsetting toClientSettingsSchema(defaultt3code) with validation viaWorktreeBranchPrefixschema; invalid values are corrected on decode and rejected on encode.<prefix>/worktree-<8hex>using the configured prefix instead of a fixedt3code/<8hex>.buildGeneratedWorktreeBranchNamenow extracts and preserves the original prefix (including case) rather than forcing a hard-coded value.worktree-marker, so ordinary user branches (e.g.feature/deadbeef) are no longer mistakenly renamed.worktreeBranchPrefixstring are migrated into the new validated structure.Macroscope summarized 2c6133f.