+
+ {linkedThreadTitle(
+ { title: projection?.thread.title || surface.title },
+ gt("Thread on {label}", { label }),
+ )}
+
+ {projection === null ? (
+ <>
+
+ {failure === null ? (
+
+
+
+ Reading from {label}…
+
+
+ ) : (
+
+ {failure.title}
+ {failure.detail}
+ {retryAction}
+
+ )}
+
+
+ >
+ ) : (
+
+ {() => (
+ <>
+ {failure === null ? null : (
+
+
+ {failure.title}
+
+ {failure.detail} Showing what was read before.
+
+ {retryAction}
+
+
+ )}
+
+ >
+ )}
+
+ )}
+
+ );
+}
diff --git a/apps/web/src/components/chat/MarkdownThreadLink.browser.test.tsx b/apps/web/src/components/chat/MarkdownThreadLink.browser.test.tsx
index 80e8cdf0dbd76..4455c29c7ea1e 100644
--- a/apps/web/src/components/chat/MarkdownThreadLink.browser.test.tsx
+++ b/apps/web/src/components/chat/MarkdownThreadLink.browser.test.tsx
@@ -1,19 +1,32 @@
import { RegistryContext } from "@effect/atom-react";
+import { scopeThreadRef } from "@t3tools/client-runtime/environment";
import { EnvironmentId, ProjectId, ThreadId } from "@t3tools/contracts";
import * as Cause from "effect/Cause";
import { AsyncResult, Atom, AtomRegistry } from "effect/reactivity";
import { expect, it, vi } from "vite-plus/test";
import { act, render } from "../../../test/render";
+import { linkedThreadSurface } from "../../linkedThreadSurface";
+import { selectThreadRightPanelState, useRightPanelStore } from "../../rightPanelStore";
import { MarkdownThreadLink } from "./MarkdownThreadLink";
+const HERE = scopeThreadRef(EnvironmentId.make("environment"), ThreadId.make("here"));
+const panel = () => selectThreadRightPanelState(useRightPanelStore.getState().byThreadKey, HERE);
+
const state = vi.hoisted(() => ({
reply: null as unknown,
remote: null as unknown,
+ cached: null as unknown,
+ linked: new Map