Skip to content

feat(locator): tap a node count times with tap({ count }) - #1979

Merged
KrzysztofMoch merged 10 commits into
e2e-inc:mainfrom
przytrzask:feat/tap-count
Nov 24, 2026
Merged

KrzysztofMoch merged 10 commits into
e2e-inc:mainfrom
przytrzask:feat/tap-count

Conversation

@przytrzask

@przytrzask przytrzask commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

What and why

  • locator.tap({ count }) and click({ count }) tap count times in a row: Detox's multiTap(n) and Playwright's clickCount.
  • count is any positive safe integer; each engine keeps its own limit. count: 1 is a plain tap.
  • count: 2 sends the existing doubleTap action, so it does what doubleTap() does on every engine. Its step is labelled … 2 times, like 3 or more.
  • 3 or more go through a new multiTap action kind { count, modifiers? }. Following feat: support in-memory file uploads #1883, it isn't in LOCATOR_ACTION_KINDS (SPI v1); web and mobile list it explicitly. An engine without it fails with UNSUPPORTED_CAPABILITY before lookup instead of tapping once.
    • Web: click({ clickCount }), one sequence with a rising detail, so a triple click selects a paragraph.
    • Mobile: agent-device press({ count }), count presses at the doubleTap cadence. Mobile refuses more than 200 (agent-device's limit) with UNSUPPORTED_CAPABILITY before pressing.
  • A count above 1 beside position is INVALID_ARGUMENT, as modifiers beside position is (as agreed in ☂️ Help us bring missing APIs to e2e #1855).
await screen.getByText('Shipping address').tap({ count: 3 });

Issue

Part of #1855, item locator.tap({ count: 3 }) under Locators and actions. @okwasniewski

Verified

Ran it locally: yes, except the mobile benchmark, which ran in CI (see below).

  • After merging main (5ab9121): pnpm check passes, and the e2e (6,048), web (1,055) and mobile (633) suites pass. Core's provider-credentials.test.ts "leaves a provider key no pattern can be built for alone" times out at 30 s here, and fails the same way on a clean main checkout, so it isn't from this PR.
  • Unit (locator-action-options.test.ts): count 1 → tap with a bare label; 2 → doubleTap labelled … 2 times; 3+ → one multiTap; modifiers carried; Number.MAX_SAFE_INTEGER passes through; an engine without multiTap refused before lookup; bad counts and a count above 1 with position refused before lookup; count: 1 with position still taps at the point.
  • Engine protocol: a served engine declaring multiTap advertises it, and { kind: 'multiTap', count: 3, modifiers: ['Shift'] } reaches it unchanged over JSON-RPC. The valid manifest fixture lists multiTap.
  • Chromium (web/tests/integration/tap-actions.test.ts): click detail 1, 2, 3 in one sequence, a triple click selects a paragraph, Shift held for each click.
  • Mobile: multiTap maps to interactions.press({ count }); count 201 is refused with no device call at all, 200 goes through.
  • Testbed on the built CLI: Playwright's "should select the text by triple clicking" is ported into click.e2e.ts and passes.
  • Mutation checks: each new rule (count 2 label, count 1 label, the mobile 200 guard and its placement, count 1 with position) fails a test when broken.
  • Device: apps/mobile-benchmark/tests/controls.e2e.ts adds "tap({ count: 3 }) lands three presses" on "Double-tap me", expecting "3 taps". I couldn't run it locally (no Xcode or Android SDK); it passed in CI on both the iOS simulator and the Android emulator with the real agent-device at fb1a25e. It checks that three presses arrive, not that the app reads them as one triple-tap gesture. Not tried on a physical device.

Checklist

  • Changeset added (core, e2e, web, mobile).
  • Breaking change: n/a.
  • Mobile benchmark test added (runs in CI).
  • Docs updated: reference/screen.mdx, reference/engine.mdx, reference/mobile.mdx, migrate/detox.mdx, migrate/playwright.mdx, skills/e2e/ (ja/zh synced, except the migrate/detox rows).
  • Contract change: tests/types/sdk-types.ts updated; engine manifest schema and valid fixture list multiTap.
  • Engine contract change: changesets for e2e, @e2e-dev/web, and @e2e-dev/mobile.

@github-actions github-actions Bot added the size:L Up to 499 changed lines, not counting tests, fixtures, translated docs, or the lockfile label Nov 19, 2026
Part of e2e-inc#1855 (`locator.tap({ count: 3 })`). count 2 dispatches doubleTap;
3 or more go through a new multiTap action kind that web and mobile declare.
- tap/click count accepts integers 1 through 10 (agent-device takes up to
  200; no real multi-tap needs more); TapOptions, screen reference, and the
  skill say so.
- Mobile reference lists multiTap under perform, with doubleTap's cadence
  caveat and the modifiers refusal (en, ja, zh).
- Engine protocol test: multiTap is advertised and its count and modifiers
  reach the served engine unchanged.
- requireTapCount moves above requireModifiers' doc comment.
- web() declares multiTap in surface-of; the no-multiTap refusal asserts
  locate is never called instead of timing it.
@przytrzask
przytrzask marked this pull request as ready for review November 23, 2026 14:53

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

All reported issues were addressed across 29 files

Heads up: you’ve reached your flex budget. Increase your flex budget or wait for usage to reset.

View guided diff | Re-trigger cubic

Comment thread docs/ja/reference/screen.mdx Resolved
Comment thread skills/e2e/references/writing-tests.md Resolved
Comment thread docs/ja/reference/engine.mdx Resolved
Comment thread docs/zh/reference/mobile.mdx Resolved
Comment thread packages/core/src/locator/screen.ts Resolved

@okwasniewski okwasniewski left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

[claude-opus-5-5] automated review on behalf of @okwasniewski

Checked head b8f90fb (merge-base c330373, main e486fbd): core/locator, contract + manifest, web and mobile engines, agent-device 0.21.41 press({ count }), docs, skill.

The shape is right: a separate multiTap kind that an engine has to declare (#1883 shape), so an engine without it can't silently tap once. count: 2 goes to doubleTap, and web uses click({ clickCount }), which matches Playwright: one sequence with detail 1..n and a dblclick after the second click, not n separate clicks.

Must fix

None.

Should fix

  • packages/core/src/locator/screen.ts:858 the cap at 10 is a guess ("no real multi-tap needs more than 10"), not a platform limit. Playwright's clickCount has no cap, Detox's multiTap(n) has none, and agent-device allows 1-200 and rejects anything above that with its own error. If core checks only for a positive safe integer (what you first proposed in #1855), each engine keeps its real limit and the docs can drop "1 through 10". Mobile can then map agent-device's >200 refusal, or check it itself in surface.ts.
  • screen.ts:425 tap({ count: 2 }) writes the step as getByLabel("Agree") under locator.tap, so the report shows a double tap as a plain tap. Count 3+ writes ... 3 times. Label count 2 the same way (... 2 times) and update the test at locator-action-options.test.ts that pins the bare label.
  • screen.ts:426-429 duplicates dispatchTap (label + modifiers suffix + steps.run + perform). Have dispatchTap take the tap-family action plus an optional label suffix, so the multiTap branch becomes one call and the label logic lives in one place.
  • Mobile multiTap has only been checked against the fake client. agent-device sends count separate XCTest taps about 285 ms apart, and iOS has to recognize them as one triple tap (UITapGestureRecognizer(numberOfTapsRequired: 3) / a triple-tap text selection). Please run one real triple tap on an iOS sim and an Android emulator, or say in the PR that it wasn't verified. The docs caveat only covers the cadence.

Nits

  • skills/e2e/references/writing-tests.md:314 the new clause runs past the file's wrap width. "not with position" is worth a few words there too.
  • Desktop (headed) already sends mouse-click --count 2 for doubleTap, so declaring multiTap with --count n is a cheap follow-up. Not for this PR.

cubic: the ja/zh items are best effort since #1930, so no action needed. count: 1 with position is not a real issue: it is the default, and the throws table says "a count above 1". The skill wording item is covered by the nit above.

Verified

  • Built core/e2e/web/mobile. locator-action-options + engine-protocol (135), mobile engine.test.ts (281), web surface-of + Chromium tap-actions integration (9) all pass.
  • Typecheck core/e2e/web/mobile, oxlint on the changed files, check:peer-ranges, check:changeset-bumps, plugins:check, docs:check, docs:check-errors all clean.
  • Mutants: web multiTap as n separate click()s fails 6/6 integration tests (detail sequence, paragraph selection, held Shift). Mobile count: action.count -> 2 fails the engine test.
  • Peer floors: web and mobile are already at >=0.25.0 on main. They have to be, because core's defineEngine refuses any actions kind not in KNOWN_LOCATOR_ACTION_KINDS, so a web/mobile that declares multiTap on a core without it fails to load entirely. That is fine as long as this lands before release PR #1974 publishes 0.25.0. If it lands after, bump both floors to the release that ships it.
  • CI: fork runs (mobile, docs, docs translations, spec, benchmark, review-verdict) are action_required and not approved yet. mergeable_state unstable, no conflicts.

@okwasniewski okwasniewski added the Ready for Human Review Green, conflict-free, every thread handled. Waiting on a maintainer. label Nov 23, 2026

@michal-e2e michal-e2e 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.

Drafted by an AI agent and posted autonomously on Michal's behalf, without him reading it first.

Reviewed at b8f90fb04 (merge base c3303731e, main). It also merges cleanly onto the current main tip 0007636f0.

Thanks @przytrzask, this works well. I ran it at the head: the suites are green, the ported triple-click test passes on the testbed, and the new tests catch almost everything I broke on purpose. Two small things are missing before it merges. Both are documentation and fixture updates that main's AGENTS.md asks for when a change like this lands.

Must fix

  • The engine manifest gained a new action kind, but neither checked-in fixture uses it. Your schema change adds multiTap to the actions enum, and web and mobile now declare it. Both fixture files are byte for byte the same as on the merge base, so no checked-in manifest uses multiTap. AGENTS.md says a wire change "edits the schema, both fixtures, and the producer in one review". The last two new kinds each put the kind into a checked-in fixture: #1919 put blur into the invalid one, and #1883 put setInputFilePayloads there. Please add "multiTap" to the valid fixture's actions, after "doubleTap", which is where the mobile engine declares it. The invalid fixture is pinned by schema-fixtures.test.ts to #1883's duplicate-action error, so I'd leave that one as it is. packages/e2e/schema/fixtures/engine-manifest-v1.valid.json:27
  • The Playwright migration guide still says e2e has no click count. Under "What e2e doesn't have yet", Planned, the row reads "selectOption([...]), click({ clickCount }), hover({ position })" with "browser.mouse with boundingBox()" as the workaround. After this PR that is wrong, and it is the guide someone porting your ported Playwright test would read. Please take click({ clickCount }) out of that row and add it to the mapping row at line 123, for example click({ clickCount: 3 }) mapped to tap({ count: 3 }). docs/migrate/playwright.mdx:261

Optional

  • Your changeset says tap({ count: 3 }) "taps three times in a row, which the platform reads as one triple click". That holds in a browser, where Playwright's clickCount sends one sequence with a rising detail. On a device it is three presses at the doubleTap cadence (about 285 ms apart on iOS), and docs/reference/mobile.mdx already warns that a short-window detector can read them as separate taps. Something like "In a browser the clicks arrive as one multi-click, so a triple click selects a paragraph; on a device they are count presses at the doubleTap cadence." would keep the changeset and screen.mdx true on both. .changeset/tap-count.md:8
  • Can we add a test that tap({ count: 1, position: { x: 1, y: 1 } }) still taps at the point? I changed the position guard to refuse any explicit count, and every test in packages/e2e's unit project still passed. The current test covers only count: 2 with a position. packages/core/src/locator/screen.ts:431
  • CONTRIBUTING.md ("Engine contract") asks for a changeset for every engine when the engine contract changes, and this one leaves out @e2e-dev/desktop. Desktop keeps refusing multiTap, so it is a release-note line only. #1883 and #1919 skipped it too, so take this one as low priority.

Follow-ups

  • multiTap follows the doubleTap path on both engines, so it skips the retargeting a single tap does: on the web it clicks the control itself instead of the visible <label> that clickControl picks for a zero-size checkbox, and on a device it presses the settings row instead of its inner switch (controlRef). doubleTap() behaves the same on main, so this is not new, and a triple tap is mostly for text. Worth one follow-up for both kinds rather than a change here.

Verified

  • The asks on #1855: count is on TapOptions, so click() takes it too; doubleTap() stays; tap({ count: 2 }) sends the same doubleTap action with the same label (a unit test checks it, and a mutant that sends count 2 as multiTap fails the modifiers test); count above 1 beside position is INVALID_ARGUMENT.
  • Suites at b8f90fb04, run here (load average 20 to 48 on 18 cores): pnpm check green; pnpm test green (e2e 5,629, web 981, mobile 592 passed); pnpm test:testbed green (608 passed, 1 skipped), including "should select the text by triple clicking"; pnpm test:web-benchmark green. The web agent suite from its committed recordings with --strict-cache and no model key: 26 passed and 8 failed. 5 failed with MODEL_PROVIDER_FAILED because the run has no key, and 3 planted-bug judgments failed with ASSERTION_FAILED. The clean merge base c3303731e fails the same 8 tests with the same codes, so this PR doesn't cause them.
  • Integration: git merge-tree --write-tree origin/main b8f90fb04 with main at 0007636f0 exits 0, no conflicts.
  • Public contract, built merge base against built head: the changes are all additions (the multiTap member of the locator action union, the kind in KNOWN_LOCATOR_ACTION_KINDS and the schema enum, TapOptions.count), with ENGINE_PROTOCOL_VERSION still 1 and no package.json export or peer change. The web and mobile lifecycle hazard scans and the docs impact check found nothing.
  • New tests: 25 added. All 25 fail on the merge base and pass at the head, and 22 of them fail under at least one of the mutants below. Three fail under none of them: "sends count 2 as doubleTap, the same action and step doubleTap() records" and "refuses count 3 on an engine without multiTap before resolving, while count 2 still works there" in locator-action-options.test.ts, and "advertises multiTap and carries its count and modifiers over JSON-RPC unchanged" in engine-protocol.test.ts. I wrote a targeted mutant for each (count 2 sent as a plain tap, the multiTap path swallowing the engine's refusal, the wire encoder dropping count), but they didn't run before this review (see Not run).
  • Mutation testing, each mutant applied to b8f90fb04: 22 places this PR adds or changes a branch, constant or type in src/ and the schema, 21 runtime mutants, 20 killed by a failing assertion. Killed, among others: count 0, 11 and 1.5 accepted; count 2 sent as multiTap; the count or the modifiers dropped from the step label or the action; count - 1 sent; multiTap left out of KNOWN_LOCATOR_ACTION_KINDS or the schema enum; web clickCount: 1, three separate click() calls, Shift dropped; web and mobile not declaring multiTap; mobile sending count: 2. The survivor is the explicit count: 1 with position case above. Two places have no mutant: the typeof value !== 'number' check, since Number.isInteger already rejects a non-number, and the web heldKeys type widening, which is type only.

Not run

  • The three targeted mutants for the new tests named above, and four mutants of the declarations the new sdk-types.ts assertions pin (TapOptions.count also accepting a string, the multiTap action's count or modifiers typed as a string, and count added to ClickOptions, which doubleTap() takes). All seven are written against b8f90fb04, but none ran before this review.

  • A real triple tap on an iOS simulator and an Android emulator, and pnpm test:mobile-benchmark. The mobile change is checked only against the fake agent-device client, as the first pass also noted. A test beside the Android doubleTap() case in apps/mobile-benchmark/tests/controls.e2e.ts, calling tap({ count: 3 }) on "Double-tap me" and reading tap-count, would close it.

Accepted as intended

  • count: 1 beside position is accepted. It is the default, and an empty modifiers list beside position is accepted the same way, so it matches "refuse count with position the same way modifiers + position is refused". The docs table says "a count above 1".

For the maintainer

  • The cap of 10. The plan on #1855 said "a positive safe integer"; the cap came later, and agent-device accepts up to 200. The automated first pass posted for okwasniewski already asks to drop the cap, and the author hasn't answered it yet.
  • Merge order. Web and mobile declare multiTap with a @e2e-dev/core floor of >=0.25.0, and core's defineEngine refuses an unknown action kind (manifest.ts:164). That holds if this lands before 0.25.0 is published; after that, both floors need the release that ships multiTap.

The findings are mine, the approval is @okwasniewski's.

@michal-e2e michal-e2e removed the Ready for Human Review Green, conflict-free, every thread handled. Waiting on a maintainer. label Nov 23, 2026
Add the count bullet and its throws rows to the ja/zh tap reference,
list multiTap under tapModifiers in ja/zh engine.mdx, and add blur to the
zh mobile perform row. The skill note now says count 2 is doubleTap, 3+
needs multiTap, and a count above 1 does not combine with position.
Reword the TapOptions.count contract the same way: count 1 beside
position stays accepted, since it is the default plain tap.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

0 issues found across 9 files (changes from recent commits).

Heads up: you’ve reached your flex budget. Increase your flex budget or wait for usage to reset.

View guided diff | Re-trigger cubic

@michal-e2e michal-e2e 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.

Drafted by an AI agent and posted autonomously on Michal's behalf, without him reading it first.

Thanks for clarifying the tap options and updating the translations. The two required changes from the earlier review still apply at 480d465bd.

Must fix

  • Please add "multiTap" to the valid engine manifest fixture's actions array so the checked-in fixture exercises the new schema value. The engines declare it and the schema accepts it. Valid fixture · Schema
  • Please move Playwright's click({ clickCount }) out of the Planned row and show how to port it, for example from click({ clickCount: 3 }) to tap({ count: 3 }). Playwright migration guide

Verified

  • The updated docs now say a count above 1 is incompatible with position. They also describe the distinction between doubleTap and multiTap. The policy and action dispatch are unchanged from the earlier review. Follow-up commit

  • The head merges cleanly with main at 97b51a229. The two required changes also remain open in that merge result.

  • The follow-up commit adds no executable branches or tests to mutate. The prior round's runtime and mutation results are recorded against b8f90fb04. Prior review

  • Locally on 480d465bd, the focused locator, protocol, and fixture tests passed. So did pnpm check, pnpm test, pnpm test:testbed, and pnpm test:web-benchmark. The testbed exercised text selection by triple click.

  • The web agent benchmark with --strict-cache replayed 26 passing tests. The same eight tests failed with the same error codes on the saved merge-base run: five provider authentication failures and three planted-bug assertions.

  • The local mobile benchmark ran on iOS and Android with 101 passing, 18 failing, and four skipped. The failures include iOS orientation, navigation and keyboard behavior, plus Android text input. This run has no matching mobile control on the merge base, so I could not attribute the failures. The benchmark does not exercise the new triple-tap action.

The public engine contract decision remains with @okwasniewski.

…unt, and fill the contract fixtures

Core accepts any positive safe integer as a tap count again, as e2e-inc#1855
planned; each engine keeps its own limit. The mobile engine refuses a
multiTap above agent-device's 200 presses with UNSUPPORTED_CAPABILITY
before it presses anything.

tap({ count: 2 }) still sends doubleTap but records "<label> 2 times",
like 3 or more. dispatchTap now builds every tap-family step label and
runs the action, so the multiTap branch is one call.

The valid engine manifest fixture lists multiTap. The Playwright guide
maps click({ clickCount }) to tap({ count }), and the changeset and
screen reference say how a browser and a device each receive the taps.
A unit test pins tap({ count: 1, position }) as a pointer tap.
…ests

The multiTap contract and docs said the platform reads the taps as one
multi-click. That holds in a browser; a device presses them at its own
cadence, which a gesture detector may not read as one. Say so in the
contract, the engine reference, and the skill, and note on the mobile page
that a large count needs a longer timeout (about 285 ms a press on iOS).

Tests: send Number.MAX_SAFE_INTEGER through the fake engine to pin that
core has no cap, check count 1 keeps the bare step label, and run the
mobile count-201 refusal as a test step, asserting no device call at all,
so a guard moved after the settle and steady waits fails.
…device

Runs in the mobile workflow's iOS simulator and Android emulator jobs with
the real agent-device, next to the double-tap case.

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

All reported issues were addressed across 25 files (changes from recent commits).

Heads up: you’ve reached your flex budget. Increase your flex budget or wait for usage to reset.

View guided diff | Re-trigger cubic

Comment thread skills/e2e/references/writing-tests.md Resolved
Comment thread packages/core/src/types.ts Resolved
Comment thread docs/reference/screen.mdx Resolved
Comment thread docs/reference/mobile.mdx Resolved
Comment thread docs/reference/screen.mdx Resolved
…mobile limit

core accepts a count that is a positive safe integer, and the mobile engine
refuses a multi-tap above 200 with UNSUPPORTED_CAPABILITY. Say both in the
TapOptions JSDoc and its reference blocks, the tap() option and throws
table, and the e2e skill, and list the multi-tap among the cancellable
device inputs in the mobile reference. Comment and docs only.
# Conflicts:
#	packages/e2e/tests/helpers/screen-over.ts

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

0 issues found across 9 files (changes from recent commits).

Heads up: you’ve reached your flex budget. Increase your flex budget or wait for usage to reset.

View guided diff | Re-trigger cubic

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

0 issues found across 2 files (changes from recent commits).

Heads up: you’ve reached your flex budget. Increase your flex budget or wait for usage to reset.

View guided diff | Re-trigger cubic

@przytrzask

Copy link
Copy Markdown
Contributor Author

Thanks @okwasniewski and @michal-e2e. Addressed in 69df08f, a3fdbe8, fb1a25e, 0d23293 and f8934cc, with main merged in 29e4e7e:

  • Cap of 10: dropped. Core checks only for a positive safe integer. Mobile refuses count > 200 (agent-device's limit) itself with UNSUPPORTED_CAPABILITY before any device call; a unit test covers it, and mobile.mdx notes the limit and that a large count needs a longer timeout (about 285 ms a press on iOS).
  • Count 2 label: tap({ count: 2 }) records … 2 times, like 3 or more. (okwasniewski asked for this. ☂️ Help us bring missing APIs to e2e #1855 says tap({ count: 2 }) "should match" doubleTap(): it sends the same doubleTap action, and only the step label differs; doubleTap() keeps its bare label.)
  • dispatchTap duplication: it now takes the tap-family action plus an optional count, builds every tap label, and runs the step. The multiTap branch is one call.
  • Valid manifest fixture: "multiTap" added after "doubleTap". The invalid fixture is unchanged.
  • Playwright guide: click({ clickCount: 3 }) → tap({ count: 3 }) in the mapping, and removed from "doesn't have yet" (en/ja/zh).
  • Browser vs device wording: multi-click is now qualified as browser behavior in the changeset, screen.mdx, the multiTap contract comment and the skill; the changeset and screen.mdx describe device presses at the doubleTap cadence.
  • count: 1 with position: new test; it fails under the "refuse any explicit count" mutant.
  • Skill: rewrapped to the file's width (f8934cc), with the count rules, mobile's 200 limit, and "a count above 1 doesn't combine with position".
  • Doc wording from cubic's last pass: positive safe integer, the mobile 200 limit, and multi-tap in the mobile cancellation note (0d23293).
  • Not done: no @e2e-dev/desktop changeset (same as feat: support in-memory file uploads #1883/feat(locator): add blur for web elements #1919). Desktop multiTap, and the retargeting a single tap does (the visible <label> on web, the inner switch on a device) for doubleTap/multiTap, are left as follow-ups.
  • Device coverage: added Michal's mobile-benchmark case in fb1a25e: tap({ count: 3 }) on "Double-tap me" expects "3 taps". It passes in CI on the iOS simulator and the Android emulator with the real agent-device, at fb1a25e and again after the merge at f8934cc (agent-device 0.21.42). It shows that three presses arrive; it doesn't show that iOS reads them as one triple tap (a numberOfTapsRequired: 3 recognizer or triple-tap text selection), which stays unverified, and mobile.mdx keeps the short-window caveat. Not tried on a physical device.
  • Merge order: noted. This needs to land before chore: version packages #1974 publishes 0.25.0; otherwise the web and mobile @e2e-dev/core floors need the release that ships multiTap.

After merging main (5ab9121) in 29e4e7e, all CI is green at f8934cc. Locally, pnpm check passes, and pnpm test passes for e2e (6,048), web (1,055) and mobile (633). In core, provider-credentials.test.ts "leaves a provider key no pattern can be built for alone" times out at 30 s here, and fails the same way on a clean main 5ab9121, so it isn't from this PR.

@okwasniewski okwasniewski left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

[claude-opus-5-5] automated review on behalf of @okwasniewski

Re-checked head f8934cc (main 5ab9121 merged in, merges cleanly onto current main 5db0f41): every ask from our b8f90fb pass and both michal-e2e reviews, plus the new commits for regressions.

Must fix

None.

Earlier asks, all done

  • Cap of 10 dropped: requireTapCount checks only for a positive safe integer, and a test sends Number.MAX_SAFE_INTEGER straight through as one multiTap. Mobile refuses count > 200 itself (surface.ts:1552) with UNSUPPORTED_CAPABILITY, after the ref resolves and before any settle wait or press. Web hands the count to Playwright's clickCount, which has no cap, so leaving the limit to each engine is right.
  • tap({ count: 2 }) now records ... 2 times, and doubleTap() keeps its bare label.
  • dispatchTap takes the tap-family action plus an optional count and builds every tap label in one place. The multiTap branch is one call.
  • michal: "multiTap" is in the valid manifest fixture after "doubleTap". The Playwright guide maps click({ clickCount: 3 }) to tap({ count: 3 }) and drops it from "doesn't have yet" (en/ja/zh).
  • michal optional: the browser vs device wording is fixed in the changeset, screen.mdx, the contract comment and the skill. There is now a test for count: 1 with position.
  • Device check: the tap({ count: 3 }) mobile-benchmark case passes in CI at this head on both the iOS simulator and the Android emulator. The PR body and mobile.mdx say plainly that iOS reading three presses as one triple tap is still unverified. That is enough for this PR.
  • The skill is rewrapped and mentions position. All cubic threads have replies and are resolved, and none of them is still a real issue.

Nits

  • surface.ts multiTap: a big count under the default 30 s timeout sends the press, part of it lands, and it ends ACTION_MAY_HAVE_COMMITTED. longPress already refuses unsent when its hold won't fit the budget. A per-press estimate differs by platform, so the docs note ("pass a longer timeout") is fine for now. Mentioning it only in case you want it unsent later.

Verified

  • Built core/e2e/web/mobile. locator-action-options + engine-protocol + schema-fixtures (178), mobile engine.test.ts (310), web surface-of (3) and Chromium tap-actions integration (6) all pass.
  • Typecheck core/e2e/web/mobile, oxlint on the changed files, check:peer-ranges, check:changeset-bumps (all patch), plugins:check, docs:check-errors all clean. No added dashes.
  • Mutants on the new tests, all killed: mobile limit > -> >= and limit removed (each fails 1). Core: count 2 without the label (fails 2), cap 10 put back (fails 1), refusing any explicit count with position (fails 1), label order held before times (fails 1).
  • Peer floors: web and mobile declare @e2e-dev/core and e2e >=0.25.0, and core 0.25.0 is the first version with multiTap in KNOWN_LOCATOR_ACTION_KINDS, so those floors are correct. Release PR #1974 is still open. This has to merge before #1974 publishes 0.25.0. If it lands after, both floors move to the release that ships it.
  • CI at f8934cc: all green (check, build, web, tests on Node 22/24/26 + Bun, iOS/Android deterministic, docs, spec, benchmark gates). The iOS and Android logs show tap({ count: 3 }) lands three presses passing. mergeable_state clean, 0 unresolved threads.

@okwasniewski okwasniewski added the Ready for Human Review Green, conflict-free, every thread handled. Waiting on a maintainer. label Nov 24, 2026

@michal-e2e michal-e2e 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.

Drafted by an AI agent and posted autonomously on Michal's behalf, without him reading it first.

Reviewed at f8934ccd4 (merge base 5ab912188). The valid manifest fixture and the Playwright migration guide are fixed, and I found nothing that blocks. One question for the code owner below, on a click count limit for the web engine.

Must fix: none.

Optional

  • Can we match the number at the start of the mobile benchmark readout? toContainText('3 taps') also accepts 13 taps. A pattern like /^3 taps, \d+ ms apart$/ checks the delivered count and lets the timing vary. Device benchmark

Verified locally

  • pnpm check, pnpm test, pnpm test:testbed and pnpm test:web-benchmark passed. The built testbed selected the textarea's text with three clicks. The same test failed its selection assertion when the engine sent one click.
  • In a separate built CLI probe, the merge base rejected the count option before any click. On the head, a moderate click sequence could return a timeout after dispatch while all clicks reached the page. The Playwright source shows that the timeout does not bound the amount of work queued. That probe did not determine a safe maximum.
  • The strict-cache web run had 26 passes and eight failures on both revisions. The same five tests lacked model authentication and the same three planted-bug judgments failed.
  • All 26 new Vitest cases failed on the merge base and each detected at least one mutation. Across 33 runtime mutations, 30 failed by assertion and three threw the expected error before an assertion. No mutation survived. The four SDK type controls failed at their intended assertions.
  • multiTap crosses JSON-RPC and is present in the schema and valid fixture. The packed runner worked with the published web engine. The candidate web engine requires the upcoming 0.25.0 runner, so the reverse published pairing is pending.
  • The full mobile benchmark had 119 passes, six iOS failures and two skips. The new three-press case passed on the iOS simulator and Android emulator, including in a separate focused run. Four of the iOS failures are the same keyboard dismissal UNSUPPORTED_CAPABILITY in tests/device.e2e.ts; the merge base reproduced it on isKeyboardShown and reproduced the WebView coupon failure in spot checks. Sign-out failed once in the full head suite. Its trace shows the wait for the sheet's "Not Now" button ending after 0 reads in 5 seconds, and then iOS's "Save Password?" sheet covering the app at tests/login-form.e2e.ts:50. That is the benchmark test missing the sheet, not this change. The test passed twice alone on the head and once on the merge base. With the Android engine sending two presses instead of count, the new benchmark case failed at its own assertion with 2 taps, 34 ms apart. The helper does not count a CLI failure as a kill, so this is not in the 30 above.

Not run

  • Published runner with this web engine: the engine's e2e peer floor is 0.25.0, which is not on npm yet. Rerun the e2e-uat back-compat check once 0.25.0 is published.

For the maintainer

  • Should the web engine refuse large click counts? okwasniewski's review says leaving the limit to each engine is right, since Playwright's clickCount has no cap. That missing cap is my concern. Playwright 1.65.1 builds a mouse down and up for every click in one synchronous loop before it awaits anything, so the action timeout cannot stop it, and a large count from test data could stall the test worker. I read this from source. I ran count 256 only, which timed out after every click had arrived, and did not run a large count. If yes, web would return UNSUPPORTED_CAPABILITY above a documented limit, as mobile does above 200, with tests for the largest allowed count and the first refused one that check the refusal sends no input. Web dispatch · Playwright input
  • The invalid manifest fixture is unchanged. AGENTS.md asks a wire change to edit both fixtures, and an earlier review on this PR asked to keep that file as is. A duplicate multiTap entry would cover the new enum value and keep the same uniqueItems failure.
  • CONTRIBUTING on main says an engine contract change releases every engine together, @e2e-dev/desktop included. The changeset bumps core, e2e, web and mobile. Desktop does not declare multiTap, so it would refuse a count of 3 or more with UNSUPPORTED_CAPABILITY.

The findings are mine; the approval is @okwasniewski's, since this changes the engine contract, the manifest schema and the SDK type assertions.

@github-actions github-actions Bot removed the Ready for Human Review Green, conflict-free, every thread handled. Waiting on a maintainer. label Nov 24, 2026
# Conflicts:
#	docs/reference/engine.mdx
#	packages/e2e/tests/helpers/screen-over.ts
@KrzysztofMoch
KrzysztofMoch added this pull request to the merge queue Nov 24, 2026
Merged via the queue into e2e-inc:main with commit 012dd22 Nov 24, 2026
32 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L Up to 499 changed lines, not counting tests, fixtures, translated docs, or the lockfile

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants