Skip to content
Source
Sign inSign up
pingdotgg/t3code

feat(server): agents can move a No project thread into the project you name #23971

ClosedMacle57(GitHub profile, opens in a new tab)wants to merge 2 commits intomain fromrefs/pull/23971/headopened View on GitHub

Showing 18 changed files with 79 additions and 4 deletions (loading 15).

x
0 of 18 viewed, 18 left
54 additions and 0 deletionsapps/server/src/checkpointing/CheckpointDiffQuery.test.tsModified
View file
@@ -190,6 +190,60 @@
​
+it.effect("starts the full-thread diff in the project after a thread moved out of Scratch", () => {
+ const projection = makeProjection();
+ const scratchFolder = "/scratch/2026-10-23-fix-the-login-bug-a1b2c3d4";
+ const diffCheckpoints = vi.fn((_input: CheckpointStore.DiffCheckpointsInput) =>
+ Effect.succeed("diff --git a/file b/file"),
+ );
+ const isGitRepository = vi.fn((cwd: string) => Effect.succeed(cwd !== scratchFolder));
+ const layer = CheckpointDiffQuery.layer.pipe(
+ Layer.provide(
+ Layer.mergeAll(
+ Layer.mock(ThreadManagement.ThreadManagementService)({
+ getCheckpointContext: () =>
+ Effect.succeed({
+ ...projection,
+ checkpointScopes: projection.checkpointScopes.map((scope) =>
+ scope.id === firstScopeId ? { ...scope, cwd: scratchFolder } : scope,
+ ),
+ }),
+ }),
+ Layer.mock(CheckpointStore.CheckpointStore)({
+ diffCheckpoints,
+ isGitRepository,
+ listAuthoredPaths: () => Effect.succeed(null),
+ }),
+ ),
+ ),