Skip to content

ios(foldable): snapshot rects on the unfolded iPhone Duo inner panel are transposed, so ref taps miss #2719

Description

@thymikee

What happens

On an iPhone Duo simulator (iOS 27.1) in the open pose, a press @ref on the inner panel lands on the wrong point. Found while verifying #2717; the fold itself is verified and is not the cause, the same geometry is reported whenever the inner panel is lit.

Safari session, agent-device fold open, then agent-device snapshot -i --json:

{"ref":"e8","role":"text-field","label":"Address","rect":{"x":599,"y":295.3,"width":44,"height":360}}

agent-device press @e8Tapped @e8 (621, 475). The screenshot of the same state is 951x669 and shows the address bar across the top, centred around (475, 48); the tap landed inside the page (attached), the field never took focus, and type fails with TEXT_INPUT_NOT_FOCUSED.

Why

The rect is the address bar rotated a quarter turn: a 360x44 bar at portrait (x≈295, y≈26) maps to (669 − 26 − 44, 295, 44, 360) = (599, 295, 44, 360), which is exactly what the snapshot reports. So one normalization pass rotates XCUITest frames into a 669-wide orientation space while the panel the app is drawn on, and the space the tap is delivered in, is the rot90 inner panel (LCD-1, currentOrientation: rot90, 951x669 as captured). On the closed pose (LCD, rot0, 466x678) the same commands work.

ADR 0025 already records that XCUIScreen.main is hardcoded in the runner and that the rotated panel was never exercised against interaction; this is that gap showing up. Suspects: the orientation-space normalization in packages/platform-apple/src/snapshot-source/window-coordinate-space.ts / apple/snapshot-presentation, and the runner's frame for synthesized gestures.

Repro

agent-device open com.apple.mobilesafari --platform ios --device "iPhone Duo"
agent-device fold open
agent-device snapshot -i --json     # address field rect is 44 wide and 360 tall
agent-device press @e8              # taps (621, 475); the bar is at the top

Xcode 27.1 beta (27A9269), iOS 27.1 runtime 24A94401, iPhone Duo device type.

Safari on the open Duo after press @e8: the tap at (621, 475) landed in the page, not on the address bar at the top

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions