Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(clients): threads no longer flash in the inbox before they settle #24760

Mergedt3dotgg(GitHub profile, opens in a new tab)merged 9 commits intomain fromrefs/pull/24760/headmerged by t3dotgg(GitHub profile, opens in a new tab) View on GitHub

Showing 14 changed files with 43 additions and 7 deletions (loading 11).

x
0 of 14 viewed, 14 left
30 additions and 1 deletionapps/mobile/src/features/threads/threadListV2.test.tsModified
View file
@@ -1,4 +1,5 @@
import { threadSearchMatchKey } from "@t3tools/client-runtime/state/thread-search";
+import { createInboxReturnTracker } 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";
@@ -24,7 +25,7 @@
RunId,
ThreadId,
} from "@t3tools/contracts";
-import { describe, expect, it } from "vite-plus/test";
+import { describe, expect, it, vi } from "vite-plus/test";
​
import type { PendingNewTask } from "../../state/use-pending-new-tasks";
import { makeRawThreadShell, makeThreadShellFixture } from "../../test-fixtures";
@@ -1562,6 +1563,34 @@
expect(off.workingCount).toBe(0);
+ it("keeps an inactive row in Working during the shared grace and returns it on expiry", () => {
+ vi.useFakeTimers();
+ vi.setSystemTime(new Date(NOW));
+ const tracker = createInboxReturnTracker();
+ const working = makeThread({ id: ThreadId.make("grace"), title: "grace", runtime: running });
+ const inactive = { ...working, runtime: null };
+ const render = () =>
+ build({
+ threads: [inactive],
+ workingShelfExpanded: true,