Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(web): identify cleanup results by machine and folder #20211

Mergedrazzeee(GitHub profile, opens in a new tab)merged 5 commits intomain fromrefs/pull/20211/headmerged by juliusmarminge View on GitHub

Showing 5 changed files with 42 additions and 9 deletions (loading 2).

x
0 of 5 viewed, 5 left
12 additions and 4 deletionsapps/server/src/storageCleanup.test.tsModified
View file
@@ -896,6 +896,7 @@
outcome: "kept",
reason: "No thread uses this worktree",
path: orphan,
+ projectPath: null,
threadId: null,
threadTitle: null,
bytes: sizes.reduce((sum, size) => sum + size, 0),
@@ -1472,7 +1473,7 @@
it.live("compares the checked-out branch without a full status", () =>
runCleanupTest(
Effect.gen(function* () {
- const { service, fs, worktree, command, setThreads, fullStatusCalls } =
+ const { service, fs, repo, worktree, command, setThreads, fullStatusCalls } =
yield* cleanupFixture();
const changed = { outcome: "kept", reason: "Repository or branch changed" };
yield* command(worktree, ["checkout", "--detach"]);
@@ -1490,8 +1491,15 @@
const index = (yield* command(worktree, ["rev-parse", "--git-path", "index"])).stdout;
yield* fs.writeFileString(`${index.trim()}.lock`, "");
const locked = (yield* service.runNow).entries[0];
- expect(locked).toMatchObject({ outcome: "failed" });
+ expect(locked).toMatchObject({
+ outcome: "failed",
+ projectPath: repo,
+ path: worktree,
+ threadId: "thread-1",
+ threadTitle: "Thread",