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 👍 / 👎.
Summary
Adds a minimal 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 expanded replay support.
Updates #558.
Touched 32 files. Scope is replay compatibility plus the narrow iOS runner tap fallback required by that workflow.
Validation
Verified with
pnpm format, focused replay tests,pnpm build,git diff --check,pnpm check:unitoutside the sandbox, andpnpm 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.