RUM-16362: Fix interop wireframe positioning in Compose windows#3611
Merged
Conversation
jonathanmos
force-pushed
the
jmoskovich/fix-compose-positioning
branch
from
July 7, 2026 08:33
6cc86c8 to
30fb155
Compare
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## develop #3611 +/- ##
===========================================
+ Coverage 72.89% 73.01% +0.12%
===========================================
Files 975 976 +1
Lines 35277 35291 +14
Branches 5972 5970 -2
===========================================
+ Hits 25712 25765 +53
+ Misses 7905 7858 -47
- Partials 1660 1668 +8
🚀 New features to boost your workflow:
|
jonathanmos
marked this pull request as ready for review
July 7, 2026 09:35
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 30fb155af6
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
jonathanmos
marked this pull request as draft
July 7, 2026 11:44
jonathanmos
force-pushed
the
jmoskovich/fix-compose-positioning
branch
from
July 7, 2026 13:35
30fb155 to
150da26
Compare
… view has a screen offset
jonathanmos
force-pushed
the
jmoskovich/fix-compose-positioning
branch
from
July 9, 2026 08:37
150da26 to
d7017e7
Compare
jonathanmos
marked this pull request as ready for review
July 12, 2026 11:05
satween
reviewed
Jul 14, 2026
ambushwork
previously approved these changes
Jul 15, 2026
satween
approved these changes
Jul 15, 2026
ambushwork
approved these changes
Jul 15, 2026
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.
What does this PR do?
Fixes Session Replay rendering embedded Compose content at the top of its scroll container instead of its actual scrolled position. When a ComposeView is nested inside an XML ScrollView/NestedScrollView (a common pattern during incremental Compose migration), SemanticsNode.positionInRoot is relative to the AndroidComposeView, not the screen — so wireframe coordinates never accounted for where the ComposeView itself sits on screen. This went unnoticed for full-screen Compose because the root AndroidComposeView sits at roughly (0, statusBarHeight), making positionInRoot coincidentally line up with screen coordinates. ComposeViewMapper and AndroidComposeViewMapper now resolve the host view's on-screen position via getLocationOnScreen() and translate the resulting wireframes by that offset, so scrolled/embedded Compose content is captured at its true position. Since getLocationOnScreen() reflects the current scroll offset at capture time, this fixes all scroll positions without special-casing ScrollView.
One visible side effect: on typical full-screen (non-edge-to-edge) activities, this now correctly shifts Compose content down by the status bar height, which exposes a plain background-colored strip where the status bar sits. The strip was previously invisible because content incorrectly extended up into it under the old bug. This is a pre-existing SR limitation becoming visible in a new place, not a regression from this fix, and is out of scope here.
Motivation
What inspired you to submit this pull request?
Additional Notes
Interop wireframes (Android Views embedded via AndroidView inside Compose) are already screen-absolute, so they're tracked separately (ComposeWireframeEntry.Compose vs .Interop) and excluded from the new offset to avoid double-counting. Touch-privacy override areas are offset the same way to stay aligned with the corrected wireframe positions.
Review checklist (to be filled by reviewers)