Skip to content

feat: isolate run button#1952

Open
dsanders11 wants to merge 2 commits into
mainfrom
refactor/isolate-zee-run-button-now
Open

feat: isolate run button#1952
dsanders11 wants to merge 2 commits into
mainfrom
refactor/isolate-zee-run-button-now

Conversation

@dsanders11
Copy link
Copy Markdown
Member

Isolates the run button to a cross-origin iframe to ensure it's rendered as an out-of-process iframe (OOPIF), and is isolated in a separate process to protect against a compromised renderer. This prevents the renderer from being able to programmatically run fiddles, and only the main process or user interaction can start them.

Assisted-by: Claude Opus 4.7
@dsanders11 dsanders11 requested a review from ckerr May 22, 2026 05:23
@dsanders11 dsanders11 requested review from a team and codebytere as code owners May 22, 2026 05:23
@coveralls
Copy link
Copy Markdown

coveralls commented May 22, 2026

Coverage Status

coverage: 87.403% (-0.9%) from 88.301% — refactor/isolate-zee-run-button-now into main

Comment thread src/preload/preload.ts
Comment on lines +85 to +89
if (location.protocol === ISOLATED_ACTIONS_PROTOCOL) {
setupIsolatedActionsGlobal();
} else {
await setupFiddleGlobal();
}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's add an isMainFrame check here, exposing only isolated if we're not the main frame

Suggested change
if (location.protocol === ISOLATED_ACTIONS_PROTOCOL) {
setupIsolatedActionsGlobal();
} else {
await setupFiddleGlobal();
}
if (isMainAppFrame()) {
await setupFiddleGlobal();
} else {
setupIsolatedActionsGlobal();
}

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure about this change, only because in the future there may be another protocol that'll need different a different preload as well. If we isolate the editors themselves, they'll need additional third-party code (monaco-editor, etc) so we'll want to separate those as well. I think going off the protocol here will scale better for future changes.

Comment thread src/main/isolated-actions.ts Outdated
Comment thread src/main/isolated-actions.ts Outdated
Assisted-by: Claude Opus 4.7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants