Skip to content

fix(replay): Support Compose 1.13 and mask Compose views that can't be traversed - #6626

Merged
markushi merged 4 commits into
mainfrom
markushi/fix/compose-1.13
Nov 17, 2026
Merged

markushi merged 4 commits into
mainfrom
markushi/fix/compose-1.13

Conversation

@markushi

@markushi markushi commented Nov 16, 2026 •

Copy link
Copy Markdown
Member

📜 Description

  • Read LayoutNode children and transparency through the unmangled SemanticsInfo API (childrenInfo, isTransparent()), because Compose 1.13 renamed the mangled internals. Compose < 1.8 keeps the reflection fallback.
  • If the SDK can't traverse a Compose view, it now masks the whole view instead of recording it unmasked.
  • Add a CI matrix that runs the replay unit tests against Compose UI 1.9 – 1.13.

Why childrenInfo and isTransparent() are drop-in replacements

Both are public, unmangled SemanticsInfo members on LayoutNode (a final class). Each one only forwards to the mangled internal that we called before:

LayoutNode.getChildrenInfo():        LayoutNode.isTransparent():
  aload_0                              aload_0
  invokevirtual getChildren$<suffix>   invokevirtual getOuterCoordinator$<suffix>
  areturn                              invokevirtual NodeCoordinator.isTransparent()
                                       ireturn

Only <suffix> changes between versions. I disassembled all 57 androidx.compose.ui:ui-android releases from 1.9.0-alpha01 to 1.13.0-rc01:

Compose UI getChildrenInfo() calls isTransparent() calls
1.9.0-alpha01 – 1.9.5 getChildren$ui_release() getOuterCoordinator$ui_release()
1.10.0-alpha01 – 1.13.0-alpha03 getChildren$ui() getOuterCoordinator$ui()
1.13.0-beta01 – 1.13.0-rc01 getChildren$androidx_compose_ui_ui() getOuterCoordinator$androidx_compose_ui_ui()

The SDK compiles against 1.10.2, so the old direct calls were fixed to $ui and threw NoSuchMethodError from 1.13.0-beta01. The reflection fallback only knows the $ui_release names.

💚 How did you test it?

Unit tests in ComposeMaskingOptionsTest, and the new Compose matrix workflow.

Manual testing: https://sentry-sdks.sentry.io/explore/replays/9a84e9904b76410bb06bddc5cf2ab36a

📝 Checklist

  • I added tests to verify the changes.
  • No breaking change or entry added to the changelog.

🤖 Generated with Claude Code

@markushi
markushi requested review from a team and adinauer as code owners November 16, 2026 19:22
@markushi
markushi requested review from 0xadam-brown and runningcode and removed request for a team November 16, 2026 19:22
@github-actions github-actions Bot added the risk: medium PR risk score: medium label Nov 16, 2026
@sentry

sentry Bot commented Nov 16, 2026 •

Copy link
Copy Markdown

📲 Install Builds

Android

🔗 App Name App ID Version Configuration
SDK Size io.sentry.tests.size 8.64.0 (1) release

⚙️ sentry-android Build Distribution Settings

Comment thread sentry-android-replay/build.gradle.kts Resolved

@adinauer adinauer left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

approving to unblock

@markushi
markushi merged commit 7eda470 into main Nov 17, 2026
49 checks passed
@markushi
markushi deleted the markushi/fix/compose-1.13 branch November 17, 2026 10:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk: medium PR risk score: medium

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants