Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): skip item counts during worktree cleanup #38879

OpennateEc(GitHub profile, opens in a new tab)wants to merge 4 commits intomain fromrefs/pull/38879/headopened View on GitHub

Showing 3 changed files with 40 additions and 7 deletions.

x
0 of 3 viewed, 3 left
27 additions and 0 deletionsapps/server/src/orchestration-v2/ProjectionStore.test.tsModified
View file
@@ -7376,6 +7376,18 @@
yield* applyItem(otherThreadId, otherRunId);
const snapshot = yield* projectionStore.getShellSnapshot({ projectId });
+ const withoutItemCounts = yield* projectionStore.getShellSnapshot({
+ projectId,
+ includeItemCounts: false,
+ });
+ assert.deepEqual(
+ withoutItemCounts.threads,
+ snapshot.threads.map((thread) => ({
+ ...thread,
+ itemCount: 0,
+ visibleItemCount: 0,
+ })),
+ );
const expected = [
[busyThreadId, 4],
[emptyThreadId, 0],
@@ -10261,6 +10273,21 @@
assert.equal(shell?.visibleItemCount, targetAfterRollback.visibleTurnItems.length);
+ const lightweightRead = traceSqlStatements();
+ const withoutItemCounts = yield* projectionStore
+ .getShellSnapshot({ projectId, includeItemCounts: false })
+ .pipe(Effect.withTracer(lightweightRead.tracer));
+ assert.isNotEmpty(lightweightRead.statements);
+ assert.deepEqual(