Repository navigation
fix(revyl): establish the iOS screen origin when the root frame matches the screen - #4514
Conversation
…es the screen 0.21.37 refuses a tap placed from snapshot rects unless the capture's viewport is reported. resolveIosAxTreeViewport returned derived for any usable tree root, so on Revyl, its only caller, every iOS ref tap failed with window-origin-unknown even when the root was exactly the health screen at the origin. A root that is the provider's screen at the origin is now reported; any other root, including a rotated one, stays derived.
|
This PR is ready at ba088e3. The change correctly establishes the iOS screen origin when the root frame matches the screen, and I found no problems in the code. The one check that has run on this head is green and there are no conflicts. The repository CI for this fork still needs maintainer approval to run. I did not run the unit tests, and I cannot reproduce the live Revyl iOS run, which the PR body describes without naming the source SHA or build. Not blocking, and you can take or leave these: the new tests assert the viewport kind at the capture-kit and Revyl-snapshot seams, but none passes the presented snapshot through assertSnapshotScreenOrigin, where the reported refusal occurs (https://github.com/callstack/agent-device/blob/ba088e3/packages/provider-revyl/src/interactor.test.ts#L457). The match in isScreenAtOrigin is exact, so a device whose health size differs from its root frame by rounding, such as an iPad or Display Zoom, would still be refused (https://github.com/callstack/agent-device/blob/ba088e3/packages/capture-kit/src/ios-ax-tree.ts#L174), and the PR body could say that only the iPhone 17 Pro Max was live-verified. The changeset could also mention that Revyl iOS snapshots now report the screen viewport (https://github.com/callstack/agent-device/blob/ba088e3/.changeset/revyl-ios-screen-origin.md#L5). |
Summary
Since 0.21.37, every iOS tap by ref on Revyl fails with
window-origin-unknown.assertSnapshotScreenOriginaccepts only areportedviewport, andresolveIosAxTreeViewport, whose only caller is the Revyl plugin, returnedderivedfor any usable tree root. On a live iPhone 17 Pro Max the root was exactly thehealthscreen, 0,0,440,956.A root that is exactly the provider's screen at the origin is now
reported: two independent reads agree that window space is screen space. Any other root staysderived, including one with width and height swapped. ACONSERVATIVE:note explains why: Revyl reads its screen once, and no landscape run has confirmed which coordinate space taps use after a rotation.Found running e2e's
@e2e-dev/revylagainst 0.21.37 (e2e-inc/e2e#1708).Validation
At the head commit:
check:affected --run --headpassed every step throughvitest-related.unit: 19,766 passed and 2 failed. Both failures are-WerrorSwift tests, which need the iphonesimulator SDK this Mac lacks.capture-kitcovers a root that matches the screen (reported), an offset root, a swapped root and a missing screen (all derived). The Revyl interactor test covers the plugin seam.snapshot -igave@e13 [radiobutton] "Fleet".press @e13tapped (220, 904), and the next snapshot showed Fleet selected. The same flow fails withwindow-origin-unknownon the published 0.21.37.Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.