Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(mobile): defer thread detail reads until creation completes #24345

Closedbrandon-julio-t(GitHub profile, opens in a new tab)wants to merge 8 commits intomain fromrefs/pull/24345/headopened View on GitHub

Showing 3 changed files with 161 additions and 0 deletions (loading 2).

x
0 of 3 viewed, 3 left
161 additions and 0 deletionsapps/mobile/src/features/threads/thread-workflow-opening.test.tsxAdded
View file
@@ -0,0 +1,161 @@
+import { RegistryProvider } from "@effect/atom-react";
+import { scopeThreadRef } from "@t3tools/client-runtime/environment";
+import {
+ EnvironmentId,
+ MessageId,
+ NodeId,
+ ProviderDriverKind,
+ ProviderInstanceId,
+ ThreadId,
+} from "@t3tools/contracts";
+import { Atom } from "effect/reactivity";
+import { act } from "react";
+import { createRoot } from "react-dom/client";
+import { expect, it, vi } from "vite-plus/test";
+​
+import { v2Projection } from "../../../../../packages/client-runtime/src/state/orchestrationV2TestFixtures";
+​
+vi.mock("react-native", () => ({ Pressable: "button", View: "div" }));
+vi.mock("@react-navigation/native", () => ({ StackActions: {}, useNavigation: vi.fn() }));
+vi.mock("../../components/ui/AppText", () => ({ AppText: "span" }));
+vi.mock("../settings/appearance/AppearancePreferencesProvider", () => ({
+ useAppearancePreferences: vi.fn(),
+}));
+vi.mock("./markdownCodeHighlightState", () => ({ useMarkdownCodeHighlight: vi.fn() }));
+vi.mock("./useOpenLinkedThread", () => ({ useOpenLinkedThread: vi.fn() }));
+vi.mock("./SubagentRow", () => ({ SubagentRow: "div" }));
+vi.mock("./work-log-layout", () => ({ WorkLogBlock: "div" }));
+vi.mock("../../state/threads", () => ({ environmentThreadDetails: { threadAtom: vi.fn() } }));
+​
+import { environmentThreadDetails } from "../../state/threads";