Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(web): "Thread completed" alerts arrive with the thread, not 2 seconds before it #38318

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

Showing 6 changed files with 24 additions and 6 deletions (loading 4).

x
0 of 6 viewed, 6 left
6 additions and 3 deletionsapps/mobile/src/features/threads/threadListV2.test.tsModified
View file
@@ -1,5 +1,8 @@
import { threadSearchMatchKey } from "@t3tools/client-runtime/state/thread-search";
-import { createInboxReturnTracker } from "@t3tools/client-runtime/state/thread-inbox";
+import {
+ createInboxReturnTracker,
+ WORKING_EXIT_GRACE_MS,
+} from "@t3tools/client-runtime/state/thread-inbox";
import { presentThreadShell } from "@t3tools/client-runtime/state/models";
import * as DateTime from "effect/DateTime";
import * as Schema from "effect/Schema";
@@ -1776,10 +1779,10 @@
tracker.observe([inactive]);
expect(render().workingCount).toBe(1);
expect(render().items[0]?.thread.runtime).toBeNull();
- vi.advanceTimersByTime(2_000);
+ vi.advanceTimersByTime(WORKING_EXIT_GRACE_MS);
expect(render().workingCount).toBe(0);
expect(ids(render())).toEqual(["grace"]);
- expect(tracker.returnedAt(inactive)).toBe(Date.parse(NOW) + 2_000);
+ expect(tracker.returnedAt(inactive)).toBe(Date.parse(NOW) + WORKING_EXIT_GRACE_MS);
} finally {
tracker.observe(null);
vi.useRealTimers();
18 additions and 3 deletionsapps/web/src/components/ThreadNotificationCoordinator.badge.browser.test.tsModified
View file
@@ -3,6 +3,7 @@
import * as DateTime from "effect/DateTime";
import * as Option from "effect/Option";