Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(clients): unloaded thread links show their title and project icon #32830

MergedYash-Singh1(GitHub profile, opens in a new tab)merged 4 commits intomain fromrefs/pull/32830/headmerged by Yash-Singh1(GitHub profile, opens in a new tab) View on GitHub

Showing 21 changed files with 113 additions and 10 deletions (loading 18).

x
0 of 21 viewed, 21 left
72 additions and 0 deletionsapps/mobile/src/state/entities.test.tsAdded
View file
@@ -0,0 +1,72 @@
+import { EnvironmentId, ProjectId, ThreadId, type ScopedThreadRef } from "@t3tools/contracts";
+import * as Cause from "effect/Cause";
+import { AsyncResult, Atom, AtomRegistry } from "effect/reactivity";
+import { expect, it, vi } from "vite-plus/test";
+​
+const state = vi.hoisted(() => ({ reply: null as unknown }));
+vi.mock(import("./threads"), async () => {
+ const { Atom } = await import("effect/reactivity");
+ return {
+ environmentThreadDetails: {} as never,
+ environmentThreadShells: {
+ threadShellAtom: () => Atom.make(null),
+ threadRefsAtom: Atom.make([{ environmentId: "remote", threadId: "older-thread" }]),
+ } as never,
+ };
+});
+vi.mock(import("./orchestration"), () => ({
+ orchestrationEnvironment: { threadLinkMetadata: () => state.reply } as never,
+}));
+vi.mock(import("./atom-registry"), () => ({ appAtomRegistry: {} as never }));
+vi.mock(import("./projects"), () => ({ environmentProjects: {} as never }));
+vi.mock(import("./server"), () => ({
+ environmentServerConfigsAtom: {} as never,
+ serverEnvironment: {} as never,
+}));
+vi.mock(import("./assets"), () => ({ projectFaviconUrlAtom: (() => null) as never }));
+vi.mock(import("../native/ProjectChipIconImages"), () => ({
+ projectGlyphImageAtom: (() => null) as never,
+ projectGlyphKey: (() => "") as never,
+}));