diff --git a/apps/web/react-scan-ws-harness.html b/apps/web/react-scan-ws-harness.html
new file mode 100644
index 0000000000..d317ac8957
--- /dev/null
+++ b/apps/web/react-scan-ws-harness.html
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+ React Scan WebSocket Toast Harness
+
+
+
+
+
+
diff --git a/apps/web/src/reactScanWsHarness.tsx b/apps/web/src/reactScanWsHarness.tsx
new file mode 100644
index 0000000000..7288b2e4b6
--- /dev/null
+++ b/apps/web/src/reactScanWsHarness.tsx
@@ -0,0 +1,100 @@
+import React, { useEffect } from "react";
+import ReactDOM from "react-dom/client";
+import { createRootRoute, createRouter, RouterProvider } from "@tanstack/react-router";
+import { EnvironmentId, type ExecutionEnvironmentDescriptor } from "@t3tools/contracts";
+
+import "./index.css";
+
+import { WebSocketConnectionCoordinator } from "./components/WebSocketConnectionSurface";
+import { ToastProvider } from "./components/ui/toast";
+import {
+ getWsConnectionStatus,
+ getWsConnectionUiState,
+ recordWsConnectionAttempt,
+ recordWsConnectionClosed,
+ recordWsConnectionOpened,
+ resetWsConnectionStateForTests,
+} from "./rpc/wsConnectionState";
+import { writePrimaryEnvironmentDescriptor } from "./environments/primary/context";
+
+function initializeMockEnvironment() {
+ const mockDescriptor: ExecutionEnvironmentDescriptor = {
+ environmentId: EnvironmentId.make("harness-mock-env"),
+ label: "React Scan Harness Mock",
+ platform: {
+ os: "darwin",
+ arch: "arm64",
+ },
+ serverVersion: "0.0.0-test",
+ capabilities: {
+ repositoryIdentity: false,
+ },
+ };
+
+ writePrimaryEnvironmentDescriptor(mockDescriptor);
+}
+
+function seedReconnectWaitingState() {
+ resetWsConnectionStateForTests();
+ recordWsConnectionAttempt("ws://localhost:9999", { connectionLabel: "React Scan Harness" });
+ recordWsConnectionOpened({ connectionLabel: "React Scan Harness" });
+ for (let index = 0; index < 5; index += 1) {
+ recordWsConnectionAttempt("ws://localhost:9999", { connectionLabel: "React Scan Harness" });
+ recordWsConnectionClosed(
+ { code: 1006, reason: "Harness disconnect" },
+ {
+ connectionLabel: "React Scan Harness",
+ },
+ );
+ }
+
+ const status = getWsConnectionStatus();
+ const uiState = getWsConnectionUiState(status);
+ console.log("[Harness] WS status after seed:", { status, uiState });
+}
+
+function HarnessView() {
+ useEffect(() => {
+ initializeMockEnvironment();
+ seedReconnectWaitingState();
+ }, []);
+
+ return (
+
+
+
+
+
+ React Scan harness
+
+ WebSocket reconnect toast
+
+ The WebSocket coordinator is in a reconnect-waiting state. React Scan is enabled to show
+ whether the toast stack keeps rerendering while the countdown is visible.
+
+
+ Restart reconnect countdown
+
+
+
+
+ );
+}
+
+const rootRoute = createRootRoute({
+ component: HarnessView,
+});
+
+const router = createRouter({
+ routeTree: rootRoute,
+});
+
+ReactDOM.createRoot(document.getElementById("root") as HTMLElement).render(
+
+
+ ,
+);