Skip to content

Fallback to an available branch when creating worktrees#108

Merged
BunsDev merged 1 commit into
mainfrom
okcode/new-thread-git-ref
Mar 31, 2026
Merged

Fallback to an available branch when creating worktrees#108
BunsDev merged 1 commit into
mainfrom
okcode/new-thread-git-ref

Conversation

@BunsDev
Copy link
Copy Markdown
Member

@BunsDev BunsDev commented Mar 31, 2026

Summary

  • Let createWorktree fall back to a local branch when the requested base branch does not resolve, instead of failing immediately.
  • Return the selected baseBranch through the git contract and persist it in server and client thread state.
  • Surface the chosen base branch in the branch toolbar and show a warning toast when OK Code auto-selects a different branch.
  • Improve worktree-related error banners with a user-facing title and expandable technical details.
  • Add tests for GitCore fallback behavior, worktree error humanization, and the new toast copy.

Testing

  • Not run (bun fmt)
  • Not run (bun lint)
  • Not run (bun typecheck)
  • Not run (bun run test)

- Auto-select a local branch when the requested worktree base is missing
- Surface the chosen base branch in the UI and explain worktree errors more clearly
- Track worktree base branch in thread state and contracts
@vercel
Copy link
Copy Markdown

vercel Bot commented Mar 31, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
okcode-marketing Ready Ready Preview Mar 31, 2026 5:01pm

@github-actions github-actions Bot added the vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. label Mar 31, 2026
@BunsDev BunsDev merged commit 4156c90 into main Mar 31, 2026
8 of 9 checks passed
@BunsDev BunsDev deleted the okcode/new-thread-git-ref branch March 31, 2026 21:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant