Skip to content

fix(ios): request runner synthesis only on platforms that synthesize - #2835

Merged
thymikee merged 1 commit into
mainfrom
fix/2789-visionos-synthesis
Sep 23, 2026
Merged

thymikee merged 1 commit into
mainfrom
fix/2789-visionos-synthesis

Conversation

@thymikee

Copy link
Copy Markdown
Member

Summary

isIosFamily returns true for visionOS, so every producer of synthesized: true (coordinate
tap, selector tap, runner-sequence press-series builder) requested the runner's two-finger HID
synthesis path on visionOS even though the native runner gates that path behind #if os(iOS)
and falls into a generic #else branch for visionOS, refusing with a misleading
"not supported on macOS" message and forcing an XCTest coordinate-tap fallback.

Adds one named predicate, runnerSynthesizesTap (packages/kernel/src/device.ts):
isIosFamily(device) && !isTvOsDevice(device) && device.appleOs !== 'visionos'. All three
synthesized: true producers now call this predicate instead of two independently drifting
inline checks; the local shouldUseSynthesizedIosGesture helper is deleted in favor of it.

Closes #2789.

6 files changed (net +13 production lines; +95 test lines).

PR #2829, opened separately, fixes a distinct visionOS simulator misclassification bug
(appleOs resolving to ios for a visionOS simulator whose name lacks a literal "vision"
substring), found incidentally while setting up live validation here. Unrelated to this logic.

Validation

Tested at 52dbc1bee2f725a9d54abd099828b1363dc1b8c5. pnpm check:affected --run: all runnable
checks passed (format, lint, typecheck, layering, build, 887 test files / 7789 tests,
daemon-wire-compat 0 drift), exit 0.

Live, on a visionOS 26.2 simulator: pre-fix press returned gestureFallback: "xctest-coordinate-tap" with the macOS-labeled message; post-fix press returns no
gestureFallback* fields, and the runner log shows a clean tap with no synthesis markers.
Adversarial high-level code review: zero findings. No unresolved risks for this change.

…visionOS

isIosFamily includes visionOS, so every producer of synthesized:true kept
sending it for visionOS taps even though the runner's synthesis path is
gated behind #if os(iOS) and falls through to an unsupported-message
XCTest fallback on visionOS. Add runnerSynthesizesTap, a named predicate
for the leaves the runner actually synthesizes on (iOS and iPadOS), and
route every synthesized:true producer through it, including the
runner-sequence press-series builder.
@github-actions

Copy link
Copy Markdown

Size Report

Metric Base Current Diff
Installed (including dependencies) 4.80 MB 4.79 MB -7.2 kB
Package (unpacked) 4.80 MB 4.79 MB -7.2 kB
Package (download) 1.43 MB 1.43 MB -2.7 kB

Startup median (7 runs, lower is better):

Scenario Base Current Diff
CLI --version 27.3 ms 27.3 ms -0.1 ms
CLI --help 77.9 ms 79.3 ms +1.4 ms

@thymikee

Copy link
Copy Markdown
Member Author

Reviewed at 52dbc1b. Coordinate tap, selector tap and the press-series builder now request synthesis only where the runner can synthesize, and iOS behavior stays the same. The code looks right.

Not blocking: runnerSynthesizesTap (https://github.com/callstack/agent-device/blob/52dbc1b/packages/kernel/src/device.ts#L191) starts from isIosFamily, which is also true for watchOS. It is safe today only because watchOS fails earlier with UNSUPPORTED_PLATFORM. Would a positive list (ios, ipados) be clearer?

Two Smoke Tests jobs were green and two were still running at review time. None of this diff touches the known depth-frontier failure that #2832 fixes.

@thymikee thymikee added the ready-for-human Valid work that needs human implementation, judgment, or maintainer merge label Sep 23, 2026
@thymikee
thymikee merged commit 3f2fa08 into main Sep 23, 2026
17 of 19 checks passed
@thymikee
thymikee deleted the fix/2789-visionos-synthesis branch September 23, 2026 17:17
@github-actions

Copy link
Copy Markdown
PR Preview Action v1.8.1
Preview removed because the pull request was closed.
2026-09-23 17:18 UTC

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

Labels

ready-for-human Valid work that needs human implementation, judgment, or maintainer merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(ios): visionOS taps request synthesis the runner cannot perform

1 participant