Use repository-derived worktree branch names instead of the hardcoded t3code prefix #7063
Replies: 11 comments
|
would ideally like a way to specify branch naming conventions. My org requires us to prefix branches by type similar request for commit messages to stick with conventional commits (also enforced by my org) |
Yeah I just had the gut initial take of “I don’t want my branches prefixed with |
|
we'll eventually have configurable branch names (probalby both deterministic prefix but also letting you configure the prompts sent to the agent when generating the name). |
|
cool - I figured it was that just to keep t3code branches from colliding with something else preexisting. I know you have a thousand things coming at you, but can you give a rough priority on at what point polish like this will be added? |
|
I opened a PR for this, hopefully it solves it if this workflow works for everyone, open to feedback! |
|
I have simply been working around this currently by opening up the terminal drawer and checking out a new branch with |
|
It is a feature request not a bug report (at least for me). I also do this with worktrees and a |
|
for me the directory name is more important, so I can easily hook it up to my window manager app switcher. |
I have the exact same issue. My org requires that branches start with |
|
So are we going to see this soon? |
|
Closing as a duplicate of #6865. Both request configurable branch prefixes or templates, including no prefix. The repository-derived naming and worktree-directory examples are linked there. |
Uh oh!
There was an error while loading. Please reload this page.
Summary
New worktree branches are currently created under a hardcoded
t3code/...namespace, even when the active repository is not namedt3code.Problem
This makes branch names and derived worktree paths misleading in multi-repo usage. For example, creating a new worktree in another repository can still produce a branch like
t3code/1a2b3c4d, which looks like it belongs to this app rather than the actual repository the user is working in.Current behavior
t3code/<8-hex>prefix.t3code/...namespace.Expected behavior
Why this matters
Likely code areas
apps/web/src/components/ChatView.tsxapps/server/src/orchestration/Layers/ProviderCommandReactor.tspackages/shared/src/git.tsAcceptance criteria
t3codeworktree branch prefix remains in the worktree creation / rename flow.Prompt to solve
Refactor worktree branch naming so it is derived from the active repository instead of a hardcoded
t3codeprefix. Centralize the naming logic in shared git utilities, update the web-side worktree creation flow and the server-side first-turn branch rename flow to use the same helper, preserve reliable temporary branch detection, and add focused tests for namespace derivation, temporary branch generation, and generated branch renaming.All reactions