@devries-cameron20 / t3code Mirror · read-only / commits / 77fcad3586
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

Mirrored from https://github.com/Camo67/t3code.git

Synced Nov 25, 06:15 UTC

Prevent live thread branches from regressing to temp worktree names (#1995)

Co-authored-by: codex <codex@users.noreply.github.com>

Julius Marminge committed Apr 13, 2026 at 12:04 UTC 77fcad3586a372878304c108d082662706a32f56
2 files changed +19
apps/web/src/components/GitActionsControl.logic.test.ts
+9
@@ -1020,6 +1020,15 @@ describe("resolveLiveThreadBranchUpdate", () => {
1020
1021 assert.equal(update, null);
1022 });
1023 +
1024 + it("does not regress a semantic thread branch back to a temporary worktree branch", () => {
1025 + const update = resolveLiveThreadBranchUpdate({
1026 + threadBranch: "t3code/github-query-rate-limit",
1027 + gitStatus: status({ branch: "t3code/bda76797" }),
1028 + });
1029 +
1030 + assert.equal(update, null);
1031 + });
1032 });
1033
1034 describe("resolveAutoFeatureBranchName", () => {
apps/web/src/components/GitActionsControl.logic.ts
+10
@@ -3,6 +3,7 @@ import type {
3 GitStackedAction,
4 GitStatusResult,
5 } from "@t3tools/contracts";
6 +import { isTemporaryWorktreeBranch } from "@t3tools/shared/git";
7
8 export type GitActionIconName = "commit" | "push" | "pr";
9
@@ -354,6 +355,15 @@ export function resolveLiveThreadBranchUpdate(input: {
355 return null;
356 }
357
358 + if (
359 + input.threadBranch !== null &&
360 + input.gitStatus.branch !== null &&
361 + !isTemporaryWorktreeBranch(input.threadBranch) &&
362 + isTemporaryWorktreeBranch(input.gitStatus.branch)
363 + ) {
364 + return null;
365 + }
366 +
367 return {
368 branch: input.gitStatus.branch,
369 };