Skip to content

fix: stabilize iOS runner navigation taps#702

Open
thymikee wants to merge 2 commits into
mainfrom
fix/ios-runner-navigation-stability
Open

fix: stabilize iOS runner navigation taps#702
thymikee wants to merge 2 commits into
mainfrom
fix/ios-runner-navigation-stability

Conversation

@thymikee
Copy link
Copy Markdown
Member

@thymikee thymikee commented Jun 6, 2026

Summary

Stabilizes iOS runner sessions for navigation-causing selector taps by switching resolved iOS/macOS element activation to coordinate-first taps, probing ready runner sessions with a bounded uptime preflight, and deleting the legacy recent-success health cache and skipped-preflight recovery metadata.

Adds ADR 0005 and updates domain docs for resolved element activation and runner lifecycle behavior. Touched 10 files, scoped to iOS runner lifecycle, Swift runner interaction, and internal docs.

Validation

Verified with focused runner unit coverage: pnpm exec vitest run --project unit src/platforms/ios/__tests__/runner-session.test.ts src/platforms/ios/__tests__/runner-command-retry.test.ts passed 47 tests. pnpm check:quick passed. pnpm build:all passed, including Node build plus iOS/macOS XCTest runner builds.

Dogfooded on the installed React Navigation app org.reactnavigation.playground in session ax-reactnav-zoomout: 5 Back/Navigate cycles stayed fast, snapshots stayed around 0.21-0.25s, a post-idle snapshot returned in 0.17s, diagnostics showed ready_session uptime preflight, and daemon.log had no TEST EXECUTE FAILED, no Failed to get matching snapshot, and no unexpected runner relaunch.

pnpm check:unit was attempted and failed in unrelated Android .aab install tests: one bundletool install timeout and one expected TOOL_MISSING assertion receiving COMMAND_FAILED.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 6, 2026

PR Preview Action v1.8.1

QR code for preview link

🚀 View preview at
https://callstack.github.io/agent-device/pr-preview/pr-702/

Built to branch gh-pages at 2026-06-06 20:48 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 6, 2026

Size Report

Metric Base Current Diff
JS raw 1.1 MB 1.1 MB -1.0 kB
JS gzip 371.1 kB 371.0 kB -187 B
npm tarball 479.4 kB 479.4 kB +61 B
npm unpacked 1.6 MB 1.6 MB +175 B

Startup median (7 runs, lower is better):

Scenario Base Current Diff
CLI --version 30.9 ms 29.6 ms -1.3 ms
CLI --help 44.8 ms 45.3 ms +0.5 ms

Top changed chunks:

Chunk Raw diff Gzip diff
dist/src/2415.js -1.0 kB -187 B

@thymikee thymikee force-pushed the fix/ios-runner-navigation-stability branch from f9d3b87 to 899caf1 Compare June 6, 2026 20:35
@thymikee
Copy link
Copy Markdown
Member Author

thymikee commented Jun 6, 2026

Updated the PR with an explicit uptime fast path in the Swift runner. The readiness probe is now answered directly by the HTTP listener before command journaling, the serial command queue, app activation, and main-thread XCTest dispatch. It still uses the existing command protocol, so we avoid adding a second health endpoint while removing the XCTest/app costs from the preflight.\n\nDogfood on React Navigation Example after rebuilding the local runner cache:\n- startup read-only snapshot skipped preflight as expected\n- ready-session preflights measured 2 ms, 3 ms, 4 ms, and 3 ms\n- successful Navigate to Details tap: preflight 4 ms, wall 0.71 s\n- post-tap snapshot: preflight 3 ms, snapshot_capture 120 ms, wall 0.19 s\n- daemon log had no TEST EXECUTE FAILED, runner restart, or snapshot matching failure lines for this session\n\nAlso added a runner journal regression test asserting uptime is not accepted into the command journal, and documented the probe contract in ADR 0005.

@thymikee thymikee force-pushed the fix/ios-runner-navigation-stability branch from 899caf1 to 5cf6db2 Compare June 6, 2026 20:41
@thymikee
Copy link
Copy Markdown
Member Author

thymikee commented Jun 6, 2026

Cleanup pass done and pushed. The only additional code change is in runner-session: read-only and mutating commands now share one post-preflight send helper, and readiness decision derives read-only/probe status internally instead of being passed an options object. I also scanned for stale freshness-cache branches and skipped-preflight recovery metadata and found none remaining.

Validation after cleanup: focused iOS runner Vitest suite passed, pnpm check:quick passed, git diff --check passed, and pnpm build:xcuitest passed.

@thymikee thymikee force-pushed the fix/ios-runner-navigation-stability branch from 5cf6db2 to 467ec54 Compare June 6, 2026 20:47
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