Repository navigation
DevFlow: use canonical WebView context IDs across tooling (Unit 3) - #662
mattleibow wants to merge 1 commit into
Conversation
|
✅ Expert Code Review: 2 independent reviewers found no issues. Methodology: 2-model adversarial consensus. (1 reviewer failed to complete — reduced coverage, no tiebreaker)
|
e67d748 to
823f668
Compare
823f668 to
99c89ad
Compare
|
Current consolidation position: this draft canonical-context layer is directly above the prepared #661, at head The canonical-only slice maps 31 original files to 35 because regressions were composed into the smaller bug fixes existing test files. Direct single-evaluation CLI JavaScript and CDP Input.insertText remain intact rather than restoring the old bundled typed-CLI migration. Useful failures, native PNGs and aggregate batch exits are preserved. Invalid/removed/blank targets still cannot silently select a default, and Inspector confirmation freezes its selected target. Layout remains the next #664 layer. Every PR remains draft; the complete-graph evidence and retained limits are recorded on #665. |
3f373e7 to
e460680
Compare
e460680 to
c8349af
Compare
Require contextId with webview-<index> IDs and ready-only responses. Migrate portable Client, CLI, MCP, Inspector, existing tests and contract guidance together; reject removed and invalid selectors before document dispatch. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: a938040f-8bf7-45ea-bd22-f199669fdd18
c8349af to
2ca56e1
Compare
Summary
Make WebView targeting consistent and unambiguous across HTTP, Client, CLI, MCP and Inspector.
webview-<index>ID, including unnamed and duplicate-AutomationId hosts. Index, AutomationId, elementId and descriptive hostKind remain metadata, not alternate selectors.contextIdthroughout the protocol and tooling, with CLI--context-id. Explicit blank, invalid or removed selectors fail without selecting another document. Omission/JSON-null retains the active-host default; query contextId takes precedence over typed-body contextId.readyfor readiness. Preserve internal readiness checks and native-owner correlation.Compatibility
Obtain IDs from
/api/v1/webview/contexts. Numeric indices, AutomationIds and element IDs no longer select contexts. HTTPwebview, Inspector/MCPwebviewId, CLI--webview/-wand the duplicateisReadyfield are removed; C# named arguments usecontextId.Update Agent, CLI, Client, WebView and Blazor packages together and rebuild consumers. No selector/readiness compatibility shims remain. Portable Client support, Driver namespaces/type forwards and descriptive hostKind extensibility are preserved.
Validation
Contract tests cover valid/default/null targeting, query/body precedence, duplicate IDs, removed/blank values and zero dispatch for invalid selections. Inspector proxy tests reject 40 invalid requests without downstream calls and dispatch six valid/default/null requests exactly once. Client, CLI/MCP and protocol regressions pass;
netstandard2.0builds.Actual Chromium Inspector tests verify initial selection and a target frozen through confirmation. Agent/shared-engine/CLI/MCP document-isolation proofs exercise one click/fill event sequence, useful errors, native PNG targeting and failure exits. Mac Catalyst target isolation and original Hybrid/native callbacks are also exercised; no Windows/GTK/WPF or physical-device runtime claim.
Related: #654, #621, #232, #407. No timing, screenshot-flake or native-crash resolution is claimed.