Skip to content

feat: make worktree branch prefix configurable - #889

Closed
binbandit wants to merge 3 commits into
pingdotgg:mainfrom
binbandit:t3code/settings-branch-prefix-default
Closed

binbandit wants to merge 3 commits into
pingdotgg:mainfrom
binbandit:t3code/settings-branch-prefix-default

Conversation

@binbandit

@binbandit binbandit commented Mar 11, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • add a persisted settings field for the worktree branch prefix, keeping t3code as the default
  • thread the configured prefix through new worktree creation and cross-repo PR worktree preparation
  • centralize branch-prefix normalization in shared git helpers and preserve the chosen prefix during first-turn auto-renames

Validation

  • bun fmt
  • bun lint
  • bun typecheck
  • bun run vitest run packages/shared/src/git.test.ts packages/contracts/src/git.test.ts apps/server/src/git/Layers/GitManager.test.ts apps/server/src/orchestration/Layers/ProviderCommandReactor.test.ts
  • bun run vitest run apps/web/src/appSettings.test.ts apps/web/src/lib/gitReactQuery.test.ts

Note

Make worktree branch prefix configurable across git operations

  • Adds a worktreeBranchPrefix setting to AppSettingsSchema (default t3code), editable via a new Git section in the settings UI.
  • Introduces normalizeWorktreeBranchPrefix, extractTemporaryWorktreeBranchPrefix, isTemporaryWorktreeBranch, buildGeneratedWorktreeBranchName, and resolvePullRequestWorktreeLocalBranchName to packages/shared/src/git.ts, replacing duplicated local implementations in the server and web layers.
  • Threads the configured prefix from ChatView through PullRequestThreadDialog, the React Query mutation, and into the preparePullRequestThread backend handler so all worktree branch names (temporary and cross-repo PR) use the user-specified prefix.
  • Behavioral Change: cross-repo PR worktree branches and temporary worktree branches now use the user-configured prefix instead of the hardcoded t3code prefix; existing branches named with t3code will still be recognized via extractTemporaryWorktreeBranchPrefix.

Macroscope summarized 95d131f.

@coderabbitai

coderabbitai Bot commented Mar 11, 2026 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 16bfaa32-5c74-45e8-846d-f5ca44b86e07

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
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
📝 Coding Plan
  • Generate coding plan for human review comments

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 and usage tips.

@github-actions github-actions Bot added the vouch:trusted Author is trusted by repo permissions or the VOUCHED list. label Mar 11, 2026
@github-actions github-actions Bot added the size:L 100-499 changed lines (additions + deletions). label Mar 20, 2026
@juliusmarminge

Copy link
Copy Markdown
Member

Closing as part of an open-PR triage — this duplicates #1110 and both have drifted too far behind main to review as-is. If configurable branch naming is still wanted, a fresh PR against current main would be welcome. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L 100-499 changed lines (additions + deletions). vouch:trusted Author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants