You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
VS Code OSS service-worker.js is the mandatory broker for every webview.asWebviewUri(...) request. It handles FetchEvent, Request/Response/Headers, Client messaging, range requests, ETag/Last-Modified, 401/404/206/304 results, streamed response chunks, CacheStorage, and localhost port mapping. It caps active host-response bodies at 32 and times unresolved requests out after 30 seconds.
WebScene b81f594c has a bounded fetch subset, but the audited native bindings contain no CacheStorage, FetchEvent, ReadableStream, WritableStream, or TransformStream implementation. Current Markdown content references extension CSS/scripts through asWebviewUri; local images and every other webview consumer share this broker.
Reuses AppScene#31 packaged URL/origin work and AppScene#34 networking; this issue owns the browser-standard resource plane in WebScene.
Preserve VS Code's localResourceRoots admission, authority/origin mapping, MIME, conditional/range headers, and streaming protocol. Do not replace it with direct unrestricted filesystem access.
The broker enforces at most 32 active response bodies, bounded queued bytes, cancellation propagation, single release of every host lease, and zero live streams/cache operations after navigation or shutdown.
A 64 KiB warm local resource reaches first byte at p95 <= 100 ms; 32 concurrent 1 MiB resources complete with <= 64 MiB aggregate queued payload and no starvation; 100 cache-fill/evict cycles retain <= 8 MiB after warm-up. Publish Chromium/native throughput and peak-memory results.
Exact Markdown extension CSS/scripts, a local PNG/SVG, an external HTTPS image, a missing asset, and an out-of-root path behave like Chromium. Current vscode-demo/README.md remains the exact primary fixture even though it has no inline image today.
Representative notebook, custom editor, extension detail, chat/MCP, Mermaid, Simple Browser, and release-notes assets use the same path without consumer-specific bypasses.
Proposed PR stack
Web Streams primitives and bounded body ownership;
CacheStorage/Cache and Request/Response integration;
FetchEvent dispatch and VS Code client broker;
range/cache/security/performance gates and unchanged product resources.
Parent epic: #264. Top-level release epic: #227.
Proven gap
VS Code OSS
service-worker.jsis the mandatory broker for everywebview.asWebviewUri(...)request. It handles FetchEvent, Request/Response/Headers, Client messaging, range requests, ETag/Last-Modified, 401/404/206/304 results, streamed response chunks, CacheStorage, and localhost port mapping. It caps active host-response bodies at 32 and times unresolved requests out after 30 seconds.WebScene
b81f594chas a bounded fetch subset, but the audited native bindings contain no CacheStorage, FetchEvent, ReadableStream, WritableStream, or TransformStream implementation. Current Markdown content references extension CSS/scripts throughasWebviewUri; local images and every other webview consumer share this broker.Scope and dependencies
Acceptance
respondWith/waitUntil, and client-message transfer.vscode-demo/README.mdremains the exact primary fixture even though it has no inline image today.Proposed PR stack