feat: add Maestro replay compatibility#581
Conversation
|
6794225 to
baaee00
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6794225256
ℹ️ 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".
| typeof value.direction === 'string' | ||
| ? readScrollPositionalsFromDirectionSwipe(value.direction)[0] | ||
| : 'down'; |
There was a problem hiding this comment.
Preserve scrollUntilVisible direction instead of inverting it
The scrollUntilVisible mapper currently derives direction via readScrollPositionalsFromDirectionSwipe(...)[0], which flips UP/DOWN/LEFT/RIGHT. That inversion is correct for Maestro swipe gestures, but scrollUntilVisible.direction is already a scroll direction; e.g. DOWN should keep scrolling toward lower content. With this mapping, flows that specify a direction scroll the opposite way and can consistently time out before finding elements.
Useful? React with 👍 / 👎.
| if (!conditionResponse.ok) { | ||
| return { ok: true, data: { skipped: true, condition: mode, selector } }; | ||
| } |
There was a problem hiding this comment.
Fail runFlow.when on runtime errors instead of silently skipping
When evaluating runFlow.when, any failed is response is treated as a skipped condition (ok: true). This conflates expected predicate-false outcomes with real runtime failures (for example transport/session errors), so a broken condition check can silently bypass required subflow steps and let replay continue as a false pass. The handler should only skip on genuine condition-miss cases and propagate operational errors.
Useful? React with 👍 / 👎.
baaee00 to
1ea51f9
Compare
Code reviewOverviewThis reworks the Maestro replay compatibility layer: it removes the previously-mapped device/utility commands ( FindingsSecurity / decisions to make consciouslyS1 —
S2 — iOS non-hittable selector tap: bounds check is looser than its comment. ( Issues to verifyI1 — Android I2 — I3 — I4 — I5 — Nits
Test coverage & CICoverage of the new mapping/runtime surface is good: Gaps worth filling:
CI: not failing. All completed checks pass; the SummarySolid, well-factored compatibility work with strong runtime tests. The item warranting an explicit maintainer decision is Reviewed with Claude Code. Generated by Claude Code |
Summary
Adds a focused Maestro replay compatibility path for existing YAML flows, including command mapping, variable/runScript handling, flow-control shims, and replay-only runtime helpers for scroll/tap behavior. Also adds the iOS non-hittable selector tap backdoor needed for hidden RN E2E controls and documents the supported replay subset.
Updates #558.
Touched 34 files. Scope is replay compatibility plus the narrow iOS runner tap fallback required by that workflow. Device utility commands such as permissions, mock location, airplane mode, orientation, and recording are intentionally left unsupported for now.
Validation
Verified with
pnpm format, focused replay/help tests,pnpm build, andgit diff --check.pnpm check:unitoutside the sandbox passed all but one unrelated Android .aab install test that timed out in the full run; rerunning that exact test passed. Earlier validation on this branch also passedpnpm build:xcuitestfor iOS and macOS. Manual Bluesky replay comparison produced Agent Device and Maestro recordings during validation; Maestro still fails the selected Bluesky flow earlier than Agent Device because its precondition does not reach the target screen.