From 71b4d2ef389a889f2c6177ecc424409a64135c2c Mon Sep 17 00:00:00 2001 From: Drew Dibble Date: Mon, 22 Jun 2026 18:51:59 -0600 Subject: [PATCH] fix(runframe): use the embedded eval worker in CLI standalone mode The CLI branch rendered . runframeStandaloneProps carries the embedded eval-worker blob under evalWebWorkerBlobUrl, but RunFrameForCli reads workerBlobUrl, so the blob was silently dropped. RunFrameForCli then computed forceLatestEvalVersion={!props.workerBlobUrl && shouldLoadLatestEval} -> true and fetched eval from the CDN instead of using the embedded worker. Forward the blob explicitly as workerBlobUrl (and pass enableFetchProxy). No-op for the default flow (no embedded worker -> evalWebWorkerBlobUrl is undefined -> still loads latest eval from CDN); only changes behavior when a worker is actually embedded, which is the case this is meant to handle (offline / air-gapped / pinned-eval / locally-built-eval tsci dev). --- lib/components/RunFrameWithApi/standalone.tsx | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/lib/components/RunFrameWithApi/standalone.tsx b/lib/components/RunFrameWithApi/standalone.tsx index f1d871b6c..726521b15 100644 --- a/lib/components/RunFrameWithApi/standalone.tsx +++ b/lib/components/RunFrameWithApi/standalone.tsx @@ -105,7 +105,17 @@ const runframeStandaloneProps: ComponentProps = { />, ) } else if (window.TSCIRCUIT_USE_RUNFRAME_FOR_CLI) { - root.render() + // RunFrameForCli reads the embedded eval worker from `workerBlobUrl`, while the + // standalone build injects it as `evalWebWorkerBlobUrl` — map it explicitly so + // the embedded worker is used instead of forcing a CDN eval fetch. + // Props are forwarded by name (not spread), so any new standalone prop that + // RunFrameForCli should receive must be added here. + root.render( + , + ) } else { const { fsMap } = await loadScriptsAsFsMap() if (fsMap.size > 0) {