Skip to content

feature: webview without service worker#326333

Open
SimonSiefke wants to merge 15 commits into
microsoft:mainfrom
SimonSiefke:feature/webview-without-service-worker-minimal
Open

feature: webview without service worker#326333
SimonSiefke wants to merge 15 commits into
microsoft:mainfrom
SimonSiefke:feature/webview-without-service-worker-minimal

Conversation

@SimonSiefke

Copy link
Copy Markdown
Contributor

fix #326331

Copilot AI review requested due to automatic review settings July 17, 2026 11:59

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds an opt-in, Electron-only single-iframe webview loader that avoids service workers while retaining the legacy browser path.

Changes:

  • Adds proposed API gating and direct webview URI routing.
  • Implements Electron protocol handling, resource streaming, CSP transformation, and iframe messaging.
  • Adds tests, a manual test extension, and an implementation plan.

Reviewed changes

Copilot reviewed 24 out of 26 changed files in this pull request and generated 13 comments.

Show a summary per file
File Description
src/vscode-dts/vscode.proposed.webviewNoServiceWorker.d.ts Declares the proposal.
src/vs/workbench/contrib/webviewView/browser/webviewViewPane.ts Enables direct loading for eligible views.
src/vs/workbench/contrib/webview/test/browser/resourceLoading.test.ts Tests direct resource URIs.
src/vs/workbench/contrib/webview/electron-browser/webviewElement.ts Implements the single-iframe loader.
src/vs/workbench/contrib/webview/common/webview.ts Adds direct resource routes.
src/vs/workbench/contrib/webview/browser/webviewElement.ts Adds direct-loader lifecycle hooks.
src/vs/workbench/contrib/webview/browser/webview.ts Extends webview metadata.
src/vs/workbench/contrib/webview/browser/resourceLoading.ts Adds canonical-path validation.
src/vs/workbench/contrib/webview/browser/overlayWebview.ts Propagates resource identifiers.
src/vs/workbench/api/test/browser/extHostWebview.test.ts Tests proposal gating.
src/vs/workbench/api/common/extHostWebview.ts Selects direct routing on desktop.
src/vs/workbench/api/common/extHost.protocol.ts Extends protocol metadata.
src/vs/workbench/api/common/extHost.api.impl.ts Passes UI kind to webviews.
src/vs/workbench/api/browser/mainThreadWebviews.ts Assigns and revives routing data.
src/vs/platform/webview/electron-main/webviewProtocolProvider.ts Serves direct documents and resources.
src/vs/platform/webview/electron-main/webviewMainService.ts Bridges protocol requests over IPC.
src/vs/platform/webview/common/webviewManagerService.ts Defines direct-loader IPC contracts.
src/vs/platform/extensions/common/extensionsApiProposals.ts Registers the proposal.
src/vs/code/electron-main/app.ts Authorizes requests and maps ports.
src/vs/code/electron-browser/workbench/workbench.html Allows the Trusted Types policy.
src/vs/code/electron-browser/workbench/workbench-dev.html Allows the development policy.
implementation-plan.md Documents the design and test plan.
extensions/webview-no-service-worker/package.json Declares the manual test extension.
extensions/webview-no-service-worker/media/style.css Styles its test webview.
extensions/webview-no-service-worker/media/image.svg Adds its test image.
extensions/webview-no-service-worker/extension.js Implements the test panel.

Comment thread src/vs/code/electron-main/app.ts Outdated
Comment thread src/vs/workbench/contrib/webview/browser/webviewElement.ts
Comment thread src/vs/workbench/contrib/webview/electron-browser/webviewElement.ts Outdated
Comment thread src/vs/workbench/contrib/webview/electron-browser/webviewElement.ts Outdated
Comment thread src/vs/workbench/contrib/webview/electron-browser/webviewElement.ts
Comment thread src/vs/workbench/contrib/webview/electron-browser/webviewElement.ts
Comment thread src/vs/workbench/contrib/webview/electron-browser/webviewElement.ts Outdated
Comment thread src/vs/workbench/contrib/webview/browser/resourceLoading.ts Outdated
Comment thread src/vs/workbench/contrib/webview/electron-browser/webviewElement.ts
Comment thread extensions/webview-no-service-worker/package.json Outdated
@SimonSiefke
SimonSiefke marked this pull request as ready for review July 17, 2026 15:08
@vs-code-engineering

Copy link
Copy Markdown
Contributor

📬 CODENOTIFY

The following users are being notified based on files changed in this PR:

@deepak1556

Matched files:

  • src/vs/code/electron-browser/workbench/workbench-dev.html
  • src/vs/code/electron-browser/workbench/workbench.html
  • src/vs/code/electron-main/app.ts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feature: webview without service workers

3 participants