Problem
If the renderer bundle load fails (or provider is missing), IsolatedFrame never transitions to ready, queues messages indefinitely, and does not surface provider failure to consumers via onError. This can leave markdown/html outputs blank indefinitely with no indication of what went wrong.
Location
registry/outputs/isolated/isolated-frame.tsx
Suggested Fix
- Read
error/isLoading from context and emit onError on failure
- Optionally add fallback behavior or a timeout to fail fast instead of silent deadlock
Additional Suggestion: Handle eval_result messages
The iframe's bootstrap HTML sends an eval_result message after attempting to eval the renderer bundle. Currently this message is ignored, so bundle eval failures are invisible.
Add handling for eval_result to surface errors:
case "eval_result":
// Report eval failures to help diagnose bundle injection issues
if (data.payload?.success === false) {
console.error("[IsolatedFrame] Bundle eval failed:", data.payload.error);
onError?.({ message: `Bundle eval failed: ${data.payload.error}` });
}
break;
This is especially helpful when debugging JSX runtime issues or other bundling problems where the renderer code fails to initialize inside the sandboxed iframe.
Problem
If the renderer bundle load fails (or provider is missing),
IsolatedFramenever transitions to ready, queues messages indefinitely, and does not surface provider failure to consumers viaonError. This can leave markdown/html outputs blank indefinitely with no indication of what went wrong.Location
registry/outputs/isolated/isolated-frame.tsxSuggested Fix
error/isLoadingfrom context and emitonErroron failureAdditional Suggestion: Handle
eval_resultmessagesThe iframe's bootstrap HTML sends an
eval_resultmessage after attempting to eval the renderer bundle. Currently this message is ignored, so bundle eval failures are invisible.Add handling for
eval_resultto surface errors:This is especially helpful when debugging JSX runtime issues or other bundling problems where the renderer code fails to initialize inside the sandboxed iframe.