Skip to content

Complete nested-webview interaction, find, focus, and accessibility handoff #268

Description

@wieslawsoltes

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-standard contentWindow.find(...). WebScene exposes a limited Selection surface but no Window.find implementation was found. Markdown enables enableFindWidget; 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

Proposed PR stack

  1. Selection/Window.find API and browser oracle;
  2. nested-frame event/focus/link/download/reload integration;
  3. accessibility semantics and platform handoff with AppScene#30;
  4. bounded interaction/lifecycle and unchanged product acceptance.

Current status — 19 September 2026

Merged focused children:

All 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 --check ran 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.

Activity

  1. wieslawsoltes commented on Sep 18, 2026

    @wieslawsoltes
    CollaboratorAuthor

    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.find is absent and getSelection() has no persistent range state.

    This child owns only realm-local Selection state, the Code OSS Window.find argument 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.

  2. wieslawsoltes commented on Sep 18, 2026

    @wieslawsoltes
    CollaboratorAuthor

    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.

  3. wieslawsoltes commented on Sep 18, 2026

    @wieslawsoltes
    CollaboratorAuthor

    Exact implementation base: d355d3fd021d792f97f5010aad5951ff7776b772.

    The Chrome 153 oracle establishes the next product-visible invariant: frame.contentWindow.focus() sets the outer activeElement to the iframe, the child document becomes focused with BODY active, 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.

  4. wieslawsoltes commented on Sep 18, 2026

    @wieslawsoltes
    CollaboratorAuthor

    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.html plus document.open/write/close focus 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.
  5. wieslawsoltes commented on Sep 18, 2026

    @wieslawsoltes
    CollaboratorAuthor

    Implementation-only progress on current main:

    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.

  6. wieslawsoltes commented on Sep 18, 2026

    @wieslawsoltes
    CollaboratorAuthor

    Implementation-only child #470 completed through #472 and merged as ff94bad2d8d7148948bc44644e4da1b6d5280fa9 from exact main c595be47332adb88a50c374804c299f3db814616.

    Host-ABI pointer and keyboard events now expose isTrusted === true through the existing native input-dispatch scope. Constructed Events and HTMLElement.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/clientY in 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-context ancestry, 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-downloads activation 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.

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

    vscode-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