Skip to content

fix(revyl): establish the iOS screen origin when the root frame matches the screen - #4514

Merged
thymikee merged 1 commit into
callstack:mainfrom
KayaanT:fix/revyl-ios-screen-origin
Nov 14, 2026
Merged

thymikee merged 1 commit into
callstack:mainfrom
KayaanT:fix/revyl-ios-screen-origin

Conversation

@KayaanT

@KayaanT KayaanT commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Since 0.21.37, every iOS tap by ref on Revyl fails with window-origin-unknown. assertSnapshotScreenOrigin accepts only a reported viewport, and resolveIosAxTreeViewport, whose only caller is the Revyl plugin, returned derived for any usable tree root. On a live iPhone 17 Pro Max the root was exactly the health screen, 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 stays derived, including one with width and height swapped. A CONSERVATIVE: 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/revyl against 0.21.37 (e2e-inc/e2e#1708).

Validation

At the head commit:

  • check:affected --run --head passed every step through vitest-related.
  • unit: 19,766 passed and 2 failed. Both failures are -Werror Swift tests, which need the iphonesimulator SDK this Mac lacks.
  • capture-kit covers 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.
  • On a live Revyl iOS session, snapshot -i gave @e13 [radiobutton] "Fleet". press @e13 tapped (220, 904), and the next snapshot showed Fleet selected. The same flow fails with window-origin-unknown on the published 0.21.37.

Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

View guided diff

…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.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 4 files

View guided diff | Re-trigger cubic

@thymikee

Copy link
Copy Markdown
Member

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).

@thymikee thymikee added the ready-for-human Valid work that needs human implementation, judgment, or maintainer merge label Nov 13, 2026
@thymikee
thymikee merged commit 7c55c02 into callstack:main Nov 14, 2026
14 checks passed
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.

2 participants