Skip to content

feat(select): add semantic native dropdown selection - #207

Merged
yashranaway merged 2 commits into
mainfrom
feat/206-semantic-select
Sep 20, 2026
Merged

yashranaway merged 2 commits into
mainfrom
feat/206-semantic-select

Conversation

@SarthakWade

Copy link
Copy Markdown
Collaborator

Summary

  • add headless select for native single-selection HTML controls using semantic or inspected-ref targets
  • support one exact whitespace-normalized label or exact value matcher
  • expose the command consistently through both browser engines, the canonical protocol schema, generated SDKs, capabilities, docs, and the browser-use skill

Safety and behavior

  • reject custom ARIA comboboxes, multi-selects, disabled controls, disabled options and groups, stale refs, missing options, and ambiguous matches before mutation
  • dispatch input then change only when the selected option changes
  • keep repeated selection idempotent
  • mark option matchers sensitive, omit them from responses, and exclude select commands from flow recording
  • retain the no-arbitrary-JavaScript boundary by using one fixed isolated-world operation

Verification

  • pnpm test (71/71 protocol tests, secure prompt, MCP)
  • pnpm test:runtime
  • pnpm test:npm (41/41)
  • Python SDK: pytest (42), mypy, Ruff check, Ruff format
  • pnpm --filter @headless/web lint
  • pnpm --filter @headless/web build
  • pnpm --filter @headless/app build
  • pnpm test:e2e:mac completed the full P2 flow once; two later repetitions passed the expanded select cases and then hit the existing durable-authentication local-storage persistence flake
  • shell syntax checks and git diff --check

Local Linux browser E2E reached and passed the Linux protocol suite, but Docker could not reach the Debian package mirror while constructing the browser test layer. CI remains the authoritative Linux browser run.

Merge order

Merge #205 before this PR. Its architecture decision is #34 and this PR intentionally follows it as #35.

Closes #206

@SarthakWade SarthakWade added the macos-e2e Run the macOS WKWebView E2E suite label Sep 20, 2026
yashranaway
yashranaway previously approved these changes Sep 20, 2026

@yashranaway yashranaway left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

select stays inside the existing isolated-world boundary. It only mutates a native single-selection HTMLSelectElement, fails closed on multi-select, disabled controls/options, missing and ambiguous matchers, and does not advertise custom comboboxes.

Matchers are sensitive schema fields, omitted from the response, and excluded from flow recording. Both engines declare selectDispatch: synthetic-dom instead of pretending this is trusted CDP input.

Merge #205 first so ADR numbering stays 34 then 35. CI is green.

Keep ADR 34 network-idle wait and ADR 35 native select. Regenerated the
SDK schema so wait --network-idle and select coexist.

@yashranaway yashranaway left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-approve after merging main. ADR 34 and 35 both present; schema includes wait --network-idle and select.

@yashranaway
yashranaway merged commit e88dbb8 into main Sep 20, 2026
24 checks passed
@yashranaway
yashranaway deleted the feat/206-semantic-select branch September 20, 2026 11:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

macos-e2e Run the macOS WKWebView E2E suite

Projects

None yet

Development

Successfully merging this pull request may close these issues.

C7: add semantic native select command

2 participants