feat(locator): combine alternatives with or

Merged
RU
5d ago
+218-21
  • Add locator.or(other) for waiting on either alternative, as requested in#832.
  • Deduplicate overlapping nodes, retain traversal order and strict single-node ambiguity, and reject locators from another target or attempt before dispatch.
  • Reproduce the union in web and mobile engines; web preserves its native display-value composition limit and refuses cross-document branches.

Verified

Ran it locally: yes.

Native portable screen/engine tests cover absent alternatives, overlap, reverse branch order, filter/index composition, strict ambiguity, diagnostics and owner rejection. Native Chromium over local fixtures and captured mobile snapshot projection verify actual engine unions. No live model or simulator actions.

mainthis branch
Regression failsRegression and adjacent tests pass
RUN  v5.0.1 packages/e2e


 Test Files  3 passed (3)
      Tests  20 passed (20)
   Start at  10:44:14
   Duration  330ms (transform 65%, import 28%, tests 4%, worker 2%)

The full repository pnpm check, changed package build, typecheck, and changed TypeScript lint pass. The full repository pnpm check passes on the pinned unchanged base with the complete frozen-lockfile install. Browser and mobile benchmark suites were not run; no live model calls were made.

Also rebuilt the exact frozen commit and passed a real runner/worker/browser product fixture with no model calls. The candidate capability executed through the built SDK and real worker.

Also rebuilt the exact frozen commit and passed a real runner/worker/browser product fixture with no model calls. The candidate capability executed through the built SDK and real worker.

Web union branches require identical literal frame selector chains; alternate selectors that resolve to the same frame can still be refused.