Skip to content

fix: resolve Maestro taps from regular snapshots#709

Merged
thymikee merged 3 commits into
mainfrom
codex/android-maestro-visible-text-fallback
Jun 8, 2026
Merged

fix: resolve Maestro taps from regular snapshots#709
thymikee merged 3 commits into
mainfrom
codex/android-maestro-visible-text-fallback

Conversation

@thymikee
Copy link
Copy Markdown
Member

@thymikee thymikee commented Jun 8, 2026

Summary

Make Maestro tapOn / swipe.label resolve from the regular visible snapshot instead of the optimized interactive snapshot path.

This keeps Maestro compatibility aligned with Maestro semantics: interactions resolve against the same visible tree that assertions inspect, so text/header/container targets such as Albums are valid targets even when they are not exposed as interactive-only controls.

Reconcile the snapshot providers with that contract by removing arbitrary downstream node budgets from regular visible snapshots:

  • iOS regular snapshots now traverse the XCTest tree, emit effective user-visible nodes, and still visit offscreen descendants only to mark hiddenContentAbove / hiddenContentBelow on visible scroll containers. Fixed controls such as bottom tab bars are no longer lost behind traversal-order cutoffs, and regular snapshots report truncated: false when all visible UI was emitted.
  • Android no longer applies a second TypeScript-side parser cap after the helper captures XML. The helper protocol still reports explicit truncation metadata if the on-device capture transport truncates; the host parser does not silently discard valid visible nodes.

Also remove the temporary Maestro interactive-snapshot fallback and the related diagnostics/helper surface. Compact interactive iOS snapshots are now deadline-bounded instead of node-count bounded.

Finally, stop passing interactionOutcome.retryOnNoChange for Maestro tapOn. Maestro flows assert the expected result in the next step, and no-op text taps are valid in existing flows; retrying purely because the UI did not change caused multi-second delays on header-title/no-op taps.

Validation

  • pnpm build:xcuitest
  • pnpm build
  • pnpm check:quick
  • pnpm check:fallow
  • pnpm exec vitest run src/utils/__tests__/mobile-snapshot-semantics.test.ts src/platforms/android/__tests__/index.test.ts src/platforms/android/__tests__/snapshot-helper.test.ts test/integration/provider-scenarios/ios-lifecycle.test.ts src/compat/maestro/__tests__/runtime-interactions.test.ts src/compat/maestro/__tests__/runtime-assertions.test.ts src/compat/maestro/__tests__/runtime-flow.test.ts
  • React Navigation iOS local focused run on iPhone 17 Pro passed:
    • material-top-tabs.yml
    • bottom-tabs.yml
    • native-bottom-tabs.yml
  • React Navigation Android local focused run on Pixel 9 Pro XL passed:
    • bottom-tabs.yml
    • native-bottom-tabs.yml
    • material-top-tabs.yml
  • Direct iOS regular snapshot check on the Contacts bottom-tab screen: truncated: false, 91 visible nodes, article / contacts / albums bottom tab ids present, and the scroll view reports hiddenContentBelow instead of emitting every offscreen row.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 8, 2026

Size Report

Metric Base Current Diff
JS raw 1.1 MB 1.1 MB -4.0 kB
JS gzip 376.2 kB 374.9 kB -1.3 kB
npm tarball 487.6 kB 487.2 kB -332 B
npm unpacked 1.6 MB 1.6 MB -123 B

Startup median (7 runs, lower is better):

Scenario Base Current Diff
CLI --version 26.5 ms 25.3 ms -1.3 ms
CLI --help 41.6 ms 40.7 ms -0.9 ms

Top changed chunks:

Chunk Raw diff Gzip diff
dist/src/9533.js -2.7 kB -849 B
dist/src/session.js -1.2 kB -386 B
dist/src/2415.js +204 B +67 B
dist/src/221.js +175 B +65 B

@thymikee thymikee force-pushed the codex/android-maestro-visible-text-fallback branch from 854b911 to 8d15867 Compare June 8, 2026 09:23
@thymikee thymikee changed the title fix: fall back to raw Android snapshots for Maestro taps fix: resolve Maestro taps from regular snapshots Jun 8, 2026
@thymikee thymikee force-pushed the codex/android-maestro-visible-text-fallback branch 9 times, most recently from 048e03f to 70f54ae Compare June 8, 2026 11:25
@thymikee thymikee force-pushed the codex/android-maestro-visible-text-fallback branch from 70f54ae to fa3f8c6 Compare June 8, 2026 12:08
@thymikee thymikee merged commit 35f54a8 into main Jun 8, 2026
17 of 18 checks passed
@thymikee thymikee deleted the codex/android-maestro-visible-text-fallback branch June 8, 2026 16:12
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 8, 2026

PR Preview Action v1.8.1
Preview removed because the pull request was closed.
2026-06-08 16:12 UTC

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant