Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): onboarding offers worktrees of a bare repository #16688

Mergedchris-allen(GitHub profile, opens in a new tab)merged 6 commits intomain fromrefs/pull/16688/headmerged by juliusmarminge View on GitHub

Showing 4 changed files with 87 additions and 8 deletions (loading 1).

x
0 of 4 viewed, 4 left
73 additions and 1 deletionapps/server/src/project/AgentSessionScanner.test.tsModified
View file
@@ -978,9 +978,12 @@
path.join(repo, ".git", "config"),
'[core]\n\tbare = false\n[remote "origin"]\n\turl = git@github.com:pingdotgg/t3code.git\n\tfetch = +refs/heads/*:refs/remotes/origin/*\n',
+ const worktreeGitDir = path.join(repo, ".git", "worktrees", "wt");
+ yield* fileSystem.makeDirectory(worktreeGitDir, { recursive: true });
+ yield* fileSystem.writeFileString(path.join(worktreeGitDir, "commondir"), "../..\n");
yield* fileSystem.writeFileString(
path.join(worktree, ".git"),
- `gitdir: ${path.join(repo, ".git", "worktrees", "wt")}\n`,
+ `gitdir: ${worktreeGitDir}\n`,
yield* fileSystem.makeDirectory(path.join(noRemote, ".git"));
yield* fileSystem.writeFileString(path.join(noRemote, ".git", "config"), "[core]\n");
@@ -1022,6 +1025,75 @@
+ it.effect(
+ "offers bare-repository worktrees separately and imports only their own sessions",
+ () =>
+ Effect.gen(function* () {
+ const path = yield* Path.Path;
+ const fileSystem = yield* FileSystem.FileSystem;
+ const nowMs = Date.parse("2026-08-24T12:00:00.000Z");
+ yield* TestClock.setTime(nowMs);
+ const claudeHomePath = yield* makeTempDir("t3code-claude-home-");
+ const codexHomePath = yield* makeTempDir("t3code-codex-home-");
+ const configBaseDir = yield* makeTempDir("t3code-scanner-base-");