The best way to control Claude Code, Codex and more from any computer or phone
Namespace PR worktree branch names under t3code
- Change local PR worktree branch format from `pr/<number>-<head>` to `t3code/pr-<number>/<head>` - Update GitManager tests to assert the new branch naming convention
Julius Marminge committed
Mar 9, 2026 at 17:30 UTC
076608021c89afb294f4bdc75d99018936540c95
2 files changed
+4
-4
apps/server/src/git/Layers/GitManager.test.ts
+3
-3
@@ -1452,13 +1452,13 @@ it.layer(GitManagerTestLayer)("GitManager", (it) => {
1452
mode: "worktree",
1453
});
1454
1455
- expect(result.branch).toBe("pr/91-main");
1455
+ expect(result.branch).toBe("t3code/pr-91/main");
1456
expect(result.worktreePath).not.toBeNull();
1457
expect((yield* runGit(repoDir, ["branch", "--show-current"])).stdout.trim()).toBe("main");
1458
expect((yield* runGit(repoDir, ["rev-parse", "main"])).stdout.trim()).toBe(mainBefore);
1459
expect(
1460
(yield* runGit(result.worktreePath as string, ["branch", "--show-current"])).stdout.trim(),
1461
- ).toBe("pr/91-main");
1461
+ ).toBe("t3code/pr-91/main");
1462
}),
1463
);
1464
@@ -1508,7 +1508,7 @@ it.layer(GitManagerTestLayer)("GitManager", (it) => {
1508
mode: "worktree",
1509
});
1510
1511
- expect(result.branch).toBe("pr/92-main");
1511
+ expect(result.branch).toBe("t3code/pr-92/main");
1512
expect((yield* runGit(repoDir, ["rev-parse", "main"])).stdout.trim()).toBe(localMainBefore);
1513
expect(
1514
(yield* runGit(result.worktreePath as string, ["rev-parse", "--abbrev-ref", "@{upstream}"]))
apps/server/src/git/Layers/GitManager.ts
+1
-1
@@ -79,7 +79,7 @@ function resolvePullRequestWorktreeLocalBranchName(
79
80
const sanitizedHeadBranch = sanitizeBranchFragment(pullRequest.headBranch).trim();
81
const suffix = sanitizedHeadBranch.length > 0 ? sanitizedHeadBranch : "head";
82
- return `pr/${pullRequest.number}-${suffix}`;
82
+ return `t3code/pr-${pullRequest.number}/${suffix}`;
83
}
84
85
function parsePullRequestList(raw: unknown): PullRequestInfo[] {