iOS: HealthKit repro + snapshot frame normalization for cross-process sheets#3250
Open
simon-gilmurray wants to merge 7 commits intomainfrom
Open
iOS: HealthKit repro + snapshot frame normalization for cross-process sheets#3250simon-gilmurray wants to merge 7 commits intomainfrom
simon-gilmurray wants to merge 7 commits intomainfrom
Conversation
Contributor
|
Annoyingly, our CI doesn't run the demo_app tests on iOS right now |
Fishbowler
reviewed
May 1, 2026
Fishbowler
approved these changes
May 1, 2026
When a host app snapshot merges a remote window (e.g. HealthKit authorization), descendant frames stay in window-local coords while taps use screen coords. Traverse the XCTest snapshot, detect windowContextID boundaries whose subtree contains remote elements, and apply visibleFrame − frame origin as an inherited offset. AXElement accepts an optional frame override from the walker. Update the failing HealthKit e2e flow to assert dismissal via "Turn On All" rather than ambiguous "Health Access" text. Rebuild checked-in Simulator driver zips. Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context
We've seen iOS modal / system-sheet style UI where taps land wrong: hierarchy still exposes the controls, but
frame-based coordinates don't match on-screen placement.This branch adds HealthKit-backed UI in the Flutter demo app to reproduce the issue, plus a Maestro flow that asserts we can authorize and dismiss cleanly.
Screenshot (repro):

Changes
Demo app & E2E
demo_app: Flow to exercise Health Access → Turn On All → Allow and assert dismissal.fail_health_access.yaml: AssertTurn On Allis gone (avoids confusing "Health Access" chrome elsewhere on screen).iOS XCTest runner (MaestroDriver)
Cross-process subtrees stitched into
XCUIApplicationsnapshots sometimes reportframein window-local coords while taps use screen coords.visibleFramecan diverge at the stitching boundary; descendants often still showvisibleFrame==frame, so we don't fix this by usingvisibleFrameon every node — we takevisibleFrame.origin − frame.originat guarded boundaries, requirewindowContextIDtransition + remote subtree (isRemote), and inherit that offset to descendants.ViewHierarchyHandler: Recursive walk + offset inheritance + docs.AXElement(runner UITests Models):frameOverridewhen building fromdictionaryRepresentation.Bundled Simulator driver artifacts
Simulator driver zips under
maestro-ios-driverrebuilt from runner sources.Testing
fail_health_access.yamlpasses with driver fix