feat(vcs): let worktrees check out an existing branch - #8
Conversation
- add a Create new branch toggle in the worktree branch picker (web and mobile) - when off, the selected local branch is checked out directly and busy/remote refs are disabled - skip origin fetch and branch creation when reusing an existing branch
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6c21de80f2
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c46427ec7c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
Codex Review: Didn't find any major issues. What shall we delve into next? Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
What Changed
Worktree mode can now check out an existing local branch instead of always minting a new
t3code/*branch.createWorktreeon the server accepts an existing local branch when no new ref name is supplied, and fails with a clear error for remote refs or branches already checked out in another worktree.createNewBranchflag flows through composer drafts, the queued-message outbox,prepareWorktreebootstrap, and thread metadata updates. User docs updated.Why
Worktree mode previously forced a fresh temporary branch, so starting work on an existing feature branch meant creating the worktree by hand. This makes "open a worktree on branch X" a first-class choice while keeping the new-branch behavior as the default, with guards so git never tries to check out a branch that is already in use.
UI Changes
Before/after screenshots of the branch picker with the new "Create new branch" toggle (on and off states) will be attached. No motion or interaction timing changed.
Checklist
Built with GLM (glm-5.3-flash) via opencode.