@devries-cameron20 / t3code-1 / commits / b654911f8a
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

fix(web): stop session activity timing test from blocking releases (#8585)

Theo Browne committed Aug 28, 2026 at 15:50 UTC b654911f8a1d07f8d74fb6dd58ab4f9884326ea2
1 file changed +11 -5
apps/web/src/session-logic.test.ts
+11 -5
@@ -2281,7 +2281,7 @@ describe("session activity performance", () => {
2281 expect(appendedEntries[1]).toBe(initialEntries[1]);
2282 });
2283
2284 - it("updates 20,000 ordered tool activities within 100 ms", () => {
2284 + it("reuses entries when appending to 20,000 ordered tool activities", () => {
2285 const activities = Array.from({ length: 20_000 }, (_, index) =>
2286 makeActivity({
2287 id: `benchmark-tool-${index}`,
@@ -2299,7 +2299,8 @@ describe("session activity performance", () => {
2299 },
2300 }),
2301 );
2302 - deriveWorkLogEntries(activities);
2302 + const initialEntries = deriveWorkLogEntries(activities);
2303 + expect(initialEntries).toHaveLength(20_000);
2304 const updatedActivities = [
2305 ...activities,
2306 makeActivity({
@@ -2316,8 +2317,13 @@ describe("session activity performance", () => {
2317 }),
2318 ];
2319
2319 - const startedAt = performance.now();
2320 - expect(deriveWorkLogEntries(updatedActivities)).toHaveLength(20_001);
2321 - expect(performance.now() - startedAt).toBeLessThan(100);
2320 + const updatedEntries = deriveWorkLogEntries(updatedActivities);
2321 + expect(updatedEntries).toHaveLength(20_001);
2322 + expect(initialEntries.every((entry, index) => updatedEntries[index] === entry)).toBe(true);
2323 + expect(updatedEntries.at(-1)).toMatchObject({
2324 + id: "benchmark-tool-appended",
2325 + command: "git diff",
2326 + toolLifecycleStatus: "completed",
2327 + });
2328 });
2329 });