Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(clients): keep uncached thread links navigable #30635

Closedronak-guliani(GitHub profile, opens in a new tab)wants to merge 5 commits intomain fromrefs/pull/30635/headopened View on GitHub

Showing 11 changed files with 73 additions and 1 deletion (loading 8).

x
0 of 11 viewed, 11 left
42 additions and 0 deletionsapps/mobile/src/state/entities.test.tsAdded
View file
@@ -0,0 +1,42 @@
+import { EnvironmentId, ThreadId, type ScopedThreadRef } from "@t3tools/contracts";
+import { AtomRegistry } from "effect/reactivity";
+import { expect, it, vi } from "vite-plus/test";
+​
+vi.mock("./threads", async () => {
+ const { Atom } = await import("effect/reactivity");
+ return {
+ environmentThreadDetails: {},
+ environmentThreadShells: {
+ threadShellAtom: () => Atom.make(null),
+ threadRefsAtom: Atom.make([]),
+ },
+ };
+});
+vi.mock("./projects", () => ({ environmentProjects: {} }));
+vi.mock("./server", () => ({ environmentServerConfigsAtom: {}, serverEnvironment: {} }));
+vi.mock("./assets", () => ({ projectFaviconUrlAtom: () => null }));
+vi.mock("../native/ProjectChipIconImages", () => ({
+ projectGlyphImageAtom: () => null,
+ projectGlyphKey: () => "",
+}));
+​
+import { resolveThreadLink } from "./entities";
+​
+it("opens an explicit thread destination even when the shell omits it", () => {
+ const registry = AtomRegistry.make();
+ const destination: ScopedThreadRef = {
+ environmentId: EnvironmentId.make("archbook"),
+ threadId: ThreadId.make("thread:delegated-task:mcp%3A1"),
+ };