fix: retry no-op maestro taps#644
Conversation
Size Report
Startup median (7 runs, lower is better):
Top changed chunks:
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4b66df4ecf
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| durationMs: Date.now() - startedAt, | ||
| }, | ||
| }); | ||
| await dispatchCommand(session.device, pending.command, pending.positionals, pending.flags?.out, { |
There was a problem hiding this comment.
Map click retries to press before dispatch
When a no-change retry is triggered for a recorded click (the path just added for Maestro tapOn sets pending.command to click), this calls the core dispatchCommand directly with pending.command. I checked src/core/dispatch.ts, and dispatchKnownCommand has cases for press, fill, longpress, etc. but no click, so the first retryable no-op tap will throw INVALID_ARGS: Unknown command: click during the following snapshot instead of retrying the tap. Store or translate click retries to the platform press command before calling core dispatch.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Addressed in d46c758: click-derived no-change retries now store the platform dispatch command as press while keeping action: click for diagnostics. I also updated the lazy retry tests and provider integration expectation.
4b66df4 to
87cfe81
Compare
|
Summary
Add an opt-in interaction outcome policy for Maestro tapOn so successful taps that leave the UI unchanged are retried lazily on the next snapshot/assertion.
The retry stores resolved coordinate payloads instead of stale refs/selectors, composes with Android freshness-aware snapshot capture, and keeps internal retry controls out of recorded session actions.
Post-gesture stabilization now reuses the same surface-signature logic; that signature includes semantic state such as role/enabled/selected/hittable and rounded rects.
Closes #597
Validation
Focused unit coverage passed for interaction outcome policy, snapshot retry handling, Android freshness composition, find delegation, interaction retry payloads, and the exact Maestro fuzzy fallback path. Typecheck, format, Fallow, build, and full integration validation passed locally.
Manual device verification passed earlier on iOS simulator Settings and Android emulator Clock using Maestro replay flows; all manual sessions were closed.
Known gap: broad local coverage/check:unit still fails in this environment with unrelated mocked host-command timeouts/tooling failures outside this change; CI Coverage passed on the PR after the prior fix.