Skip to content

fix: preserve Maestro coordinate swipes on Android#1207

Merged
thymikee merged 1 commit into
mainfrom
fix/android-helper-instrumentation-ownership
Jul 11, 2026
Merged

fix: preserve Maestro coordinate swipes on Android#1207
thymikee merged 1 commit into
mainfrom
fix/android-helper-instrumentation-ownership

Conversation

@thymikee

@thymikee thymikee commented Jul 11, 2026

Copy link
Copy Markdown
Member

Summary

Preserve explicit Maestro swipe coordinates when a flow also contains from, matching Maestro's coordinate-command precedence instead of silently converting the action to an upward element swipe.

Honor Maestro's default launchApp isolation semantics by relaunching unless stopApp: false is explicit, so directory suites do not inherit navigation state from the previous flow.

Release the persistent Android snapshot helper before touch instrumentation and verify same-version APK identity for snapshot, multitouch, and IME helpers. This prevents UiAutomation ownership conflicts and stale same-version helper bytes from surviving local rebuilds.

Preserve visible identifier-only Android hierarchy markers when React Native renders their content in a covering sibling. This matches Maestro selector behavior for screen-level testID wrappers without retaining covered actionable subtrees.

Add parser, installer, hierarchy, provider, and instrumentation-ownership regressions, and document Android helper exclusivity in ADR 0002.

Validation

  • Format, TypeScript typecheck, oxlint, and fallow passed.
  • Android snapshot-focused suite passed: 90 tests across capture, install, hierarchy pruning, and persistent helper sessions.
  • Built runtime and all Android helper artifacts with pnpm build and pnpm build:android, then cleaned daemon state before device verification.
  • API 37 helper proof reported android-helper version 0.19.3 over persistent-session; a stale same-version helper was detected as mismatched and replaced by SHA-256 identity.
  • Native Maestro 2.5.1 passed material_top_bar_example.yaml and confirmed the material-top-bar-post-auth-screen selector contract.
  • Agent-device passed material_top_bar_example.yaml end to end after the hierarchy fix, including login, tab switch, logout, and pre-auth return.
  • Pager-view master directory run passed six flows including material top bar; three later flows timed out only on the initial Metro/debug home-screen assertion and all three passed immediately when rerun individually. All nine flow behaviors passed, including horizontal, vertical, RTL, nested, scrollable, and auth navigation cases.

@thymikee thymikee force-pushed the fix/android-helper-instrumentation-ownership branch from 49136ac to b3d8297 Compare July 11, 2026 06:13
@github-actions

github-actions Bot commented Jul 11, 2026

Copy link
Copy Markdown

Size Report

Metric Base Current Diff
JS raw 1.7 MB 1.7 MB -4.4 kB
JS gzip 531.1 kB 530.0 kB -1.2 kB
npm tarball 640.9 kB 637.0 kB -3.8 kB
npm unpacked 2.3 MB 2.2 MB -13.6 kB

Startup median (7 runs, lower is better):

Scenario Base Current Diff
CLI --version 26.5 ms 26.8 ms +0.3 ms
CLI --help 55.1 ms 56.7 ms +1.6 ms

Top changed chunks:

Chunk Raw diff Gzip diff
dist/src/client.js +61.8 kB +19.3 kB
dist/src/android.js +15.0 kB +5.3 kB
dist/src/registry.js +2.7 kB +963 B
dist/src/server.js -2.8 kB -907 B
dist/src/tv-remote.js -888 B -336 B

@thymikee thymikee force-pushed the fix/android-helper-instrumentation-ownership branch 4 times, most recently from 6911de5 to ff18615 Compare July 11, 2026 10:11
@thymikee

Copy link
Copy Markdown
Member Author

Addressed the checksum-cache finding in ff18615. Local APK verification now runs only after an install-cache miss for both the shared multitouch/IME installer and the snapshot installer. Cache keys include device, package, version, and manifest SHA, so a changed artifact identity still revalidates. Added regressions that delete the APK after the first ensure and prove a matching cache hit performs no filesystem, ADB, or provider access. Validation: 96 focused tests, typecheck, lint, format, and fallow pass.

@thymikee thymikee force-pushed the fix/android-helper-instrumentation-ownership branch from ff18615 to c60d255 Compare July 11, 2026 10:30
@thymikee

Copy link
Copy Markdown
Member Author

Fixed the Fallow failure in c60d255.

The regular audit was green; the production-export check found the obsolete exported verifyAndroidSnapshotHelperArtifact left after checksum consolidation. I removed the duplicate implementation/export and retargeted its mismatch regression to the shared production verifier.

Both fallow audit --base origin/main and the exact production-unused-exports gate now pass locally.

@thymikee thymikee merged commit c23d951 into main Jul 11, 2026
22 checks passed
@thymikee thymikee deleted the fix/android-helper-instrumentation-ownership branch July 11, 2026 17:44
@github-actions

Copy link
Copy Markdown
PR Preview Action v1.8.1
Preview removed because the pull request was closed.
2026-07-11 17:45 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