diff --git a/apps/web/src/components/ManagedRunEvidence.browser.test.tsx b/apps/web/src/components/ManagedRunEvidence.browser.test.tsx
new file mode 100644
index 0000000000000..7f7ed6f9c4ae5
--- /dev/null
+++ b/apps/web/src/components/ManagedRunEvidence.browser.test.tsx
@@ -0,0 +1,59 @@
+import { EnvironmentId } from "@t3tools/contracts";
+import { expect, it, vi } from "vite-plus/test";
+
+import { render } from "../../test/render";
+import type { ManagedRun } from "~/lib/managedRunDelivery";
+import { ManagedRunEvidence } from "./ManagedRunEvidence";
+
+vi.mock(import("~/state/environments"), async (original) => ({
+ ...(await original()),
+ usePrimaryEnvironmentId: () => EnvironmentId.make("windows-fixture"),
+}));
+vi.mock(import("~/state/entities"), async (original) => ({
+ ...(await original()),
+ useQuietThreadShell: (ref) =>
+ ref?.threadId === "mcp:launch:known" ? ({ threadId: ref.threadId } as never) : null,
+}));
+
+it("links an operator wait to the locally known worker and preserves unknown evidence", async () => {
+ const run: ManagedRun = {
+ version: 1,
+ runId: "00000000-0000-0000-0000-000000000000",
+ ticket: "fixture",
+ revision: "a".repeat(64),
+ status: "approved",
+ brief: {
+ workspaceId: "fixture",
+ repository: "lab/fixture",
+ baseSha: "b".repeat(40),
+ scope: "Fixture",
+ tokens: 100,
+ },
+ budget: { reserved: 100, used: null, remaining: null },
+ stages: [
+ {
+ stageId: "known",
+ role: "implementation",
+ status: "waiting_for_operator",
+ threadId: "mcp:launch:known",
+ providerInstanceId: "codex",
+ toolCalls: 0,
+ },
+ {
+ stageId: "unknown",
+ role: "qa",
+ status: "queued",
+ threadId: "mcp:launch:unknown",
+ providerInstanceId: null,
+ },
+ ],
+ };
+ await using screen = await render(
+ Thread {id ?? "Unknown"} + {ref && thread && ( + <> + {" · "} + + Open worker thread + + > + )} +
+ ); +} function formatCount(value: number | null): string { return value === null ? "Unknown" : value.toLocaleString(); @@ -49,7 +71,7 @@ export function ManagedRunEvidence({ run }: { run: ManagedRun }) {Stage ID {stage.stageId}
Provider instance {stage.providerInstanceId ?? "Unknown"}
-Thread {stage.threadId ?? "Unknown"}
+Tool calls {formatCount(stage.toolCalls ?? null)}
{stage.status === "waiting_for_operator" && (