Repository navigation
Complete nested-webview interaction, find, focus, and accessibility handoff #268
Description
Activity
- addedvscode-oss/plannedPlanned for the AppScene/WebScene VS Code OSS integrationPlanned for the AppScene/WebScene VS Code OSS integration
on Sep 17, 2026 Exact audited base:
51f71381bda9015b64cf0566534e209f8bfa9986.The unchanged Markdown prelude now advances through iframe navigation, document replacement, fallback activation, and ResizeObserver setup after #399. The first remaining product call that fails is the enabled find bridge:
contentWindow.findis absent andgetSelection()has no persistent range state.This child owns only realm-local Selection state, the Code OSS
Window.findargument subset, reset on replacement/detach, and focused Chrome/native/performance/lifecycle evidence. It will touch V8 DOM/window bindings, realm lifecycle state, focused browser-DOM tests, and a dedicated contract/profile. It excludes #400 File System paths, #401 CSS paths, AppScene packaging, cross-origin capability expansion, cross-frame/Shadow DOM search, input routing, and accessibility publication.Completed by #411, merged as
d355d3fd021d792f97f5010aad5951ff7776b772.Final evidence: unchanged Code OSS Markdown reaches the nested frame find/find-stop bridge; Chrome 153 and native pass the focused contract 10/10; the exact Code-shaped nested-frame sequence passes; opaque/cross-origin access remains fail-closed; 100 create/navigate/find/remove cycles retain no listeners or native DOM nodes. The 100,000-text-node gate measured p95 17.67 ms (50 ms limit), flat V8 heap (1,390,808 bytes before/after), native nodes 7 -> 7, and bounded high-water RSS. Direct exact-head Linux, native-document, portable V8, and both NativeAOT checks passed; focused macOS product gates passed locally.
Exact implementation base:
d355d3fd021d792f97f5010aad5951ff7776b772.The Chrome 153 oracle establishes the next product-visible invariant:
frame.contentWindow.focus()sets the outeractiveElementto the iframe, the child document becomes focused withBODYactive, inner focus keeps iframe ownership, and outer focus exits the child and resets its active element. The unchanged Code OSS prelude uses exactly this call for host focus and visible-frame replacement.Owned paths will be the generic V8 focus/window bindings and state, focused native browser-DOM/input tests, and one dedicated browser/native contract/profile. The implementation will not touch CSS, File APIs, packaging, AppScene, keyboard routing, accessibility publication, or #267 navigation/origin/CSP behavior. Opaque/cross-origin access remains fail-closed, and top-level
Window.focus()keeps its typed host request.Completed by #416, merged as
dd39f118b8eba301f1884740e8b25573f49d687e.Evidence:
- Chrome 153 oracle: 6/6 focus ownership assertions passed.
- Native WebPlatformSubset: 1/1 document, 6/6 subtests passed.
- Exact navigated Code-shaped Markdown
fake.htmlplusdocument.open/write/closefocus handoff passed. - Same-origin child focus emits no host activation request; top-level focus emits exactly one typed request; opaque/cross-origin access remains fail-closed.
- Post-rebase native lifecycle gate: 100 create/focus/inner-focus/remove cycles, p95 0.476 ms (10 ms limit), V8 heap 1,417,252 -> 1,417,252 bytes, native nodes 7 -> 7, RSS 44.9 -> 46.2 MiB (64 MiB limit).
- Hosted macOS ARM64 and portable V8 passed at exact PR head
8f2732033761d86a936ab3ae7f308a160f8f1529; remaining broad tails were canceled under the fast-merge policy.
Implementation-only progress on current main:
- Select all text in active nested webview documents #440/Select all nested webview document text #442 merged as
0ff47fc45bf574d71263821923c8e24e8dda34cb: unchanged Code OSS Select All now creates a realm-local visible-text Selection in the active nested document, including multi-node stringification. - Expose implemented legacy editing command capabilities #443/Expose supported legacy document commands #445 merged as
4ea2feebd0dd7f2f08dfa1a8bfbbe1ca5f3d6c3b: Code OSS legacy clipboard capability probes now see only the implemented copy/cut/paste/selectAll command set in top-level and iframe document realms.
Both children are attached here and closed by their PRs. They add no clipboard/host authority and do not touch AppScene, vscode-demo, or consolidation #76.
Validation debt is intentionally open: both changes still need Chromium/WPT, native regression, performance/memory/lifecycle, and exact unchanged Markdown/webview product evidence. Remaining #268 scope includes nested event/input/context-menu/drag/link/download/reload integration, keyboard traversal, accessibility publication with AppScene, and cumulative unchanged-consumer acceptance.
- Select all text in active nested webview documents #440/Select all nested webview document text #442 merged as
Implementation-only child #470 completed through #472 and merged as
ff94bad2d8d7148948bc44644e4da1b6d5280fa9from exact mainc595be47332adb88a50c374804c299f3db814616.Host-ABI pointer and keyboard events now expose
isTrusted === truethrough the existing native input-dispatch scope. Constructed Events andHTMLElement.click()activation remain untrusted, including synthetic clicks invoked from a trusted handler. This satisfies the provenance gate used by unchanged Code OSS before it forwards nested anchor clicks and outer-workbench keyboard data. Existing Code listeners retain link/context-menu/key ownership, and existing host requests retain navigation authority.Per the implementation-only directive, no tests, benchmarks, builds, package qualification, CI waits, or installed-product checks were run. Validation debt remains Chromium/WPT provenance comparison, native nested pointer/keyboard/link coverage, synthetic-click isolation, teardown/performance evidence, and cumulative unchanged-consumer acceptance.
Exact remaining #268 gaps after this merge:
- project pointer coordinates into each nested viewport before Code's context-menu anchor handoff; current native events still expose host-viewport
clientX/clientYin child realms; - qualify cross-frame keyboard focus traversal/default actions and the complete workbench keybinding handoff beyond the newly supplied trust bit;
- complete context-menu targeting,
data-vscode-contextancestry, visibility-state, and coordinate handoff; - complete primary/auxiliary anchor activation, fragment/default-action behavior, target/modifier semantics, and host-owned external-link handoff;
- implement and qualify
allow-downloadsactivation plus host-owned download destination/stream handoff; - complete nested drag/drop routing and retirement;
- publish nested accessibility semantics with AppScene;
- run the deferred Chromium/native/performance/lifecycle/package and representative unchanged-webview acceptance matrix.
Explicit reload/history remains coordinated with #267's nested-document lifecycle scope. Consolidation PR #76, AppScene #65, and
vscode-demo#1 remain unmerged.- project pointer coordinates into each nested viewport before Code's context-menu anchor handoff; current native events still expose host-viewport
- added sub-issues
on Sep 19, 2026
Current cumulative interaction checkpoint — 19 September 2026
Main is
2cd3913fceff7a0c9660aca05ab232fa237bda1d. The no-change audit confirmed focused find/Selection, focus/input, clipboard/permissions, links/downloads, reload/history, inbound/outbound drag and nested semantic snapshot/action/live/delta providers are merged. No non-duplicative bounded source gap remained.#268 owns cumulative unchanged Markdown/notebook/custom-editor/extension/Chat/Simple Browser interaction, accessibility, lifecycle, performance and package acceptance. No implementation worktree remains. Only source diff checks ran; all current-package product evidence remains open.
Parent epic: #264. Top-level release epic: #227.
Proven gap
The unchanged webview prelude forwards focus/blur, key, wheel, scroll, context-menu, drag/drop, click/auxclick, link, message, and clipboard commands through the nested frame. Its enabled find widget calls
contentWindow.getSelection()and non-standardcontentWindow.find(...). WebScene exposes a limited Selection surface but noWindow.findimplementation was found. Markdown enablesenableFindWidget; all webviews share the remaining event and command bridge.Existing owners remain authoritative: WebScene #81 for MessagePort; #86 for clipboard API/data transfer; #100 for native input observability; #262 for release-wide accessibility; AppScene#27 for host input/focus, #30 for native accessibility, and #32 for downloads/clipboard/drag. This issue owns the webview-shaped integration and missing reusable DOM behavior, without reopening those completed or broader scopes.
Acceptance
getSelectionand the browser-compatibleWindow.findsubset cover forward/backward, case, wrap, whole-word, repeated query, clear selection, detached/replaced frames, Unicode and shadow/composed-tree exclusions. Selection WPTs and a Chromium oracle define the claimed subset.Proposed PR stack
Current status — 19 September 2026
Merged focused children:
eb0fca6d59d143e1488b9790a5131262e33fdbc6e7c8eb059afd161eAll listed child issues are attached and closed. Current dependent implementation is AppScene #30 native semantic peers. AppScene #32 remains authoritative for platform drag translation and filesystem grants. Remaining WebScene/AppScene work is outbound desktop drag initiation, any proven semantic action/edit/live-region follow-ups, and cumulative unchanged Code OSS interaction/accessibility/package acceptance. Reload/history remains coordinated with #267.
Only
git diff --checkran for the latest implementation. Authored focused tests, 10,000-over performance, lifecycle/memory, assistive-technology, visual, package, and computer-use evidence were not executed.Focused remaining child #548 owns bounded outbound desktop drag requests. Its platform consumer is SceneTech/AppScene#187; inbound platform translation is SceneTech/AppScene#186.
Accessibility action prerequisite #545/#553 is now merged as
b3869360; #546 live regions is active.Outbound desktop drag child #548/#561 is merged as
79ed2c84: bounded immutable request leases, pointer-threshold admission, writable dragstart DataTransfer, text/URI/selection/image payloads, operation/drag-image metadata, completion/dragend, and generation/subtree/navigation retirement. AppScene #187 macOS consumer is now active.Current implementation checkpoint — 19 September 2026
Merged nested-document interaction slices cover pointer, keyboard/focus, context menu, link/default navigation, bounded downloads, inbound drag routing, and bounded outbound drag requests through WebScene 2b64b08. AppScene consumers now include macOS/Windows/Linux inbound adapters, macOS outbound #194/#195, and Windows outbound #196/#197 through f3fd2d2e.
Linux outbound child #202/#203 is merged; AppScene #187 retains the real Wayland/X11 display-host and package integration. AppScene retains native paths, objects, grants, platform sessions and completion authority; WebScene publishes bounded generation-stamped data only.
Remaining #268 work is cumulative unchanged Markdown/notebook/custom-editor/extension/Chat/Simple Browser interaction, selection/find/clipboard/accessibility, navigation/reload, teardown, lifecycle and package acceptance. Only source diff checks ran in the current wave.