You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit a2cd749
Browse filesBrowse the repository at this point in the historyBrowse files
fix(web): a new worktree thread opened during a clone bases on the real default branch
While a project is still cloning, git reports an unborn HEAD (`master`,
`main` or init.defaultBranch) that the repository may never have. Two
places recorded that name as the draft's branch: the live status sync in
Current checkout mode, whose value New worktree mode then kept as the
base, and the base seeding in New worktree mode. Nothing revisited it
after the clone, so the first send failed with ref_not_found.
The live sync now waits until the clone is done, and the base is seeded
only from a ref the list actually holds. When the clone finishes, the
picker reloads its refs past the server's snapshot of the empty
repository, so the real default branch is seeded without a reload.
Fixes#25719
Co-Authored-By: Claude Fable 5.2 <[email protected]>
// oxlint-disable-next-line t3code/no-unreasoned-state-sync -- refs listed while the project was cloning are empty; reload them past the server's snapshot when the clone finishes
550
+
useEffect(()=>{
551
+
if(projectCloneDone)refreshRefsAfterClone();
552
+
},[projectCloneDone]);
538
553
539
554
// The server sets started threads' branches; defaulting here would detach the agent from its worktree.
// oxlint-disable-next-line t3code/no-unreasoned-state-sync -- persists the draft thread branch when the live git status subscription reports a different branch
0 commit comments