Skip to content

[Epic] Qualify unchanged Code OSS webviews and nested document contexts #264

Description

@wieslawsoltes

Current webview/nested-document checkpoint — 19 September 2026

Exact inputs are WebScene 2cd3913fceff7a0c9660aca05ab232fa237bda1d, AppScene 0ef434a4040d0bf3bff840045987566904f1a34c, and unchanged Code OSS 645f29cc3176500b4b5762ba887cf2a7f0ffdf2c. Nested lifecycle/security and interaction providers are merged through cancelable beforeunload, ordered unload, same/cross-document history/reload, restricted cross-origin WindowProxy, focus/input, find/Selection, clipboard, links/downloads, drag and semantics.

The latest #268 audit found no additional bounded reusable provider gap. #267/#268 remain open for current-package cumulative behavior across Markdown Preview, notebooks, custom editors, extension panels/views, release notes, Getting Started, Chat/MCP, Mermaid and Simple Browser, including the reported Markdown preview failure. A newly reproduced product-neutral primitive gets a focused child issue/PR.

Only git diff --check runs in this wave. WPT/browser/product/security/lifecycle and package acceptance remain open.

Parent epic: #227

Outcome

Run the unchanged VS Code OSS 1.137 webview stack in WebScene with browser-shaped isolation, resource delivery, interaction, lifecycle, visual, performance, and accessibility behavior. Markdown Preview is the first deterministic reproduction, not the boundary of the work.

Pinned audit baseline: AppScene 9f434e0, WebScene b81f594c, VS Code OSS 645f29c.

Unchanged consumers in scope

  • extension API webview panels, webview views, custom editors, and editor insets;
  • Markdown Preview and Markdown editor, Mermaid editor, and Simple Browser;
  • notebook back-layer/output webviews and notebook diff/output editors;
  • release notes, Getting Started, extension details, image carousel, and contributed panels;
  • chat tool output, agent-plugin editor, MCP app content, and Copilot suggestion panels.

They all converge on webviewElement.ts and browser/pre/index.html; success from a hand-authored iframe does not qualify this epic.

Proven dependency chain

  1. Expose HTMLIFrameElement.sandbox for Code OSS webviews and Markdown Preview #253: HTMLIFrameElement.sandbox.add(...) currently throws synchronously.
  2. Complete ServiceWorker control and client lifecycle for Code OSS webviews #265 service-worker control plane: Markdown does not set disableServiceWorker; index.html rejects when navigator.serviceWorker is absent.
  3. Stream and cache admitted Code OSS webview resources #266 service-worker resource plane: service-worker.js needs FetchEvent, Clients, CacheStorage, readable/writable/transform streams, ranges, cache validation, and resource-message transfer.
  4. Enforce secure nested-document lifecycle for Code OSS webviews #267 secure nested-document lifecycle: the outer frame loads the prelude, then creates fake.html, accesses contentWindow/contentDocument, and uses open/write/close to install extension HTML under CSP and sandbox rules.
  5. Complete nested-webview interaction, find, focus, and accessibility handoff #268 messaging and interaction: Implement Worker, transferable MessagePort, and iframe contexts for Code OSS #81 owns transferable MessagePort/worker completion; the webview prelude also needs focus/input/clipboard/find/selection/context-menu/drag/link/download/reload behavior.
  6. Release-wide acceptance is owned by Establish Chromium/AppScene visual and geometry regression gates for unchanged Code OSS #259 (visual/geometry), Qualify all unchanged Code OSS workbench commands, panels, and feature lifecycles #260 (workbench consumers), Qualify Code OSS Chat and auxiliary-bar interaction, streaming, and lifecycle #261 (Chat), Qualify Code OSS accessibility semantics, keyboard navigation, and native exposure #262 (accessibility), Publish a Code OSS Web API capability ledger and expand WPT coverage #263 (Web API/WPT ledger), and AppScene#130 (installed release). This epic supplies their nested-document lane rather than duplicating those tickets.

Related cross-repository owners are AppScene#27 (input/focus), #30 (native accessibility), #31 (packaged URLs/origins), #32 (downloads/clipboard/drag), #34 (network/streams), #36 (workers/messaging), and #41 (embedded document contexts). WebScene #81 and #102 remain shared prerequisites. CSS/visual issues remain under #235 and open PR #245 is outside this stack.

Native subissues

Global gates

  • Use selected upstream WPTs plus a checked-in Chromium oracle for each standards surface; document exclusions instead of silently skipping.
  • Exercise top-level and nested realms on macOS arm64, Linux x64, and Windows x64 native runners and installed-package consumers.
  • Enforce CSP, opaque/same-origin sandbox transitions, local-resource roots, MIME/range/cache headers, navigation admission, and stale-generation rejection. No permissive bypass qualifies.
  • At steady state, 100 create/update/find/reload/dispose cycles leave zero live iframe realms, workers, clients, ports, observers, streams, cached response leases, and pending host requests from the disposed generation. After warm-up, retained RSS growth must be <= 8 MiB for the deterministic fixture and no queue may exceed its documented cap.
  • For the exact vscode-demo/README.md, cold command-to-first-complete-scene p95 must be <= 2 s and warm edit-to-updated-scene p95 <= 250 ms on the recorded macOS reference machine; each focused issue has tighter component budgets. Publish Chromium and native timings rather than hiding a regression inside the end-to-end allowance.
  • Chromium/native comparisons cover geometry, scroll, theme, local/external resources, images, focus order, links, find highlights, and the semantic accessibility tree. AppScene#30 owns native platform exposure.

Proposed PR stacks and schedule

Stack A — synchronous frame creation

  1. Expose HTMLIFrameElement.sandbox for Code OSS webviews and Markdown Preview #253 IDL/DOMTokenList shape;
  2. Expose HTMLIFrameElement.sandbox for Code OSS webviews and Markdown Preview #253 sandbox enforcement/navigation/teardown;
  3. Expose HTMLIFrameElement.sandbox for Code OSS webviews and Markdown Preview #253 WPT, browser oracle, native package smoke.

Stack B — service worker and resources (#265 then #266)

  1. registration/container/worker lifecycle and Clients;
  2. FetchEvent dispatch and controlled-client routing;
  3. streams and CacheStorage;
  4. VS Code resource broker, range/cache/security/performance acceptance.

Stack C — nested document and interaction (#267 then #268)

  1. src/srcdoc/fake-document navigation and realm isolation;
  2. CSP/origin/Permissions Policy enforcement;
  3. document replacement, event/focus/find/link/reload behavior;
  4. lifecycle, accessibility, and bounded stress gates.

Stack D — product qualification (#259#263 and AppScene#130)

  1. Markdown Preview with the exact current demo README plus deterministic local/external image fixtures;
  2. notebooks/custom editors/webview views and panels;
  3. release notes/Getting Started/extension/image surfaces;
  4. chat/MCP/Mermaid/Simple Browser and final three-RID package matrix.

Stack A is first because it is the current synchronous failure. Stack B follows because the unchanged prelude cannot initialize without it. Stack C may develop behind stable A/B interfaces, but security enforcement must land before product acceptance. Stack D closes only from a cumulative exact-head package. Each stack should use focused PRs, validate its cumulative top, and merge atomically. No implementation PR belongs in this investigation phase.

Acceptance

  • Every child issue is closed with WPT/browser/native/product evidence and numeric performance/teardown results.
  • All listed unchanged webview consumers either pass or have a specific, fail-closed exclusion with an owning issue.
  • The exact pinned package completes Markdown preview and representative non-Markdown consumers without VS Code source changes, Electron, CEF, or an embedded browser.
  • Security, accessibility, lifecycle, and resource gates run in release CI rather than remaining manual claims.

Active status — 17 September 2026

#253 is complete. #276/#278 merged at 053a5627/aa786c0e; an exact stamped Code 645f29c run reaches the version-6 controller and logs webview ready after 2.665 s. #281 remains open and blocked by active MessagePort lifetime #288 in PR #245. Hold #266 until #281 rebases, passes the cumulative ServiceWorker/WebSocket gates, and merges. Full Markdown remains blank because #266 still lacks Streams, FetchEvent.respondWith, and CacheStorage resource delivery.

Current webview checkpoint — 19 September 2026

Focused children under #268 now cover nested pointer, keyboard/focus, context menus, links, downloads, inbound drag routing, and bounded outbound drag requests through WebScene 2b64b08. Semantic snapshot/action/live/delta providers are also merged for nested accessibility.

AppScene has all three inbound drag adapters plus macOS and Windows outbound consumers through f3fd2d2e. Linux Wayland/X11 outbound consumption is active under AppScene #187. macOS semantic snapshot/delta peers and the reusable Windows UIA adapter are merged; Linux AT-SPI and action/live delivery are active under AppScene #184/#185.

Remaining work is real platform host wiring and cumulative unchanged Markdown/notebook/custom-editor/extension/Chat/Simple Browser selection/find/clipboard/accessibility/navigation/reload/teardown/package acceptance. Only source diff checks ran in the newest wave.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    epicTracks a coordinated set of focused issuesvscode-oss/plannedPlanned for the AppScene/WebScene VS Code OSS integration

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions