Open-source Grok Bot alternative for named AI teammates. Local-first desktop, web, and mobile clients with per-bot tools, instructions, and memory. Independent fork of T3 Code.
Prevent live thread branches from regressing to temp worktree names (#1995)
Julius Marminge77fcad3586a3
diff --git a/apps/web/src/components/GitActionsControl.logic.test.ts b/apps/web/src/components/GitActionsControl.logic.test.tsindex 267cbec18..c6a50b82c 100644--- a/apps/web/src/components/GitActionsControl.logic.test.ts+++ b/apps/web/src/components/GitActionsControl.logic.test.ts@@ -1020,6 +1020,15 @@ describe("resolveLiveThreadBranchUpdate", () => {assert.equal(update, null);});++ it("does not regress a semantic thread branch back to a temporary worktree branch", () => {+ const update = resolveLiveThreadBranchUpdate({+ threadBranch: "t3code/github-query-rate-limit",+ gitStatus: status({ branch: "t3code/bda76797" }),+ });++ assert.equal(update, null);+ });});describe("resolveAutoFeatureBranchName", () => {diff --git a/apps/web/src/components/GitActionsControl.logic.ts b/apps/web/src/components/GitActionsControl.logic.tsindex b4b0b98b0..e4e611fb8 100644--- a/apps/web/src/components/GitActionsControl.logic.ts+++ b/apps/web/src/components/GitActionsControl.logic.ts@@ -3,6 +3,7 @@ import type {GitStackedAction,GitStatusResult,} from "@t3tools/contracts";+import { isTemporaryWorktreeBranch } from "@t3tools/shared/git";export type GitActionIconName = "commit" | "push" | "pr";@@ -354,6 +355,15 @@ export function resolveLiveThreadBranchUpdate(input: {return null;}+ if (+ input.threadBranch !== null &&+ input.gitStatus.branch !== null &&+ !isTemporaryWorktreeBranch(input.threadBranch) &&+ isTemporaryWorktreeBranch(input.gitStatus.branch)+ ) {+ return null;+ }+return {branch: input.gitStatus.branch,};