Repository navigation
fix(compose): Detect lazy layout scrolls on Compose foundation 1.10+ - #6548
Merged
Merged
Conversation
Compose foundation 1.10 replaced ScrollingContainerElement with ScrollableAreaElement, so the gesture target locator no longer found LazyColumn/LazyRow/LazyGrid/Pager as scroll targets and dropped the scroll breadcrumb. Match ScrollableAreaElement and keep its class name under R8. Fixes #6547 Co-Authored-By: Gene Wright <gene.wright@sentry.io>
📲 Install BuildsAndroid
|
markushi
marked this pull request as ready for review
November 11, 2026 08:15
markushi
requested review from
markushi and
romtsn
and removed request for
a team
November 11, 2026 08:15
romtsn
approved these changes
Nov 11, 2026
0xadam-brown
approved these changes
Nov 11, 2026
0xadam-brown
left a comment
Member
There was a problem hiding this comment.
My clanker verified this works on my emulator:
| Test | Result |
|---|---|
| Android sample on emulator-5554, built with Compose 1.10.2 | Tested the PR against real Compose layouts. |
| LazyColumn, LazyRow, horizontal/vertical grids, horizontal/vertical staggered grids, and horizontal/vertical Pager | All 8 visibly scrolled and produced a ui.swipe breadcrumb with the correct layout tag. |
Control build with the new ScrollableAreaElement match removed |
The same swipe logged Unable to find scroll target. No breadcrumb captured. |
| R8-minified release sample | The vertical grid still produced the tagged breadcrumb; R8 preserved the class name. |
3 tasks done
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.
📜 Description
ComposeGestureTargetLocatornow also treatsandroidx.compose.foundation.ScrollableAreaElementas a scroll target, andsentry-compose/proguard-rules.prokeeps that class name so the check still matches in R8-minified apps.💡 Motivation and Context
Compose foundation 1.10.0 removed
ScrollingContainerElement.LazyColumn,LazyRow, lazy grids, staggered grids andPagernow applyScrollableAreaElement. The locator didn't know that class, and theScrollBysemantics fallback misses lazy layouts too, becauseLazyLayoutSemanticsModifieris a node element rather than aSemanticsModifier. So on foundation ≥ 1.10, every lazy-layout scroll loggedUnable to find scroll target. No breadcrumb captured., tagged or not.verticalScroll/horizontalScrollstill applyScrollingLayoutElementand keep working. TheScrollingContainerElementcheck stays for apps on foundation 1.8–1.9.💚 How did you test it?
detects scrollable via ScrollableAreaElement modifiertoComposeGestureTargetLocatorTest, using a stub class like the existing modifier tests.:sentry-compose:testReleaseUnitTest --tests '*ComposeGestureTargetLocatorTest*'(19/19 pass) and:sentry-compose:spotlessCheckpass locally.foundation-androidAARs on Google Maven:ScrollingContainerElementexists through 1.9.5 and is gone from 1.10.0 through 1.12.1, and the 1.12.0 lazy list, grid, staggered grid and pager classes referenceScrollableAreaElement.📝 Checklist
sendDefaultPIIis enabled.🔮 Next steps
sentry-uitest-android, built against foundation ≥ 1.10.sentry-composeagainst a newer Compose so future modifier renames get caught.via gene.wright.
--
View Session [Sentry]