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
runningcode added a commit that referenced this pull request Nov 19, 2026
The fix is already on main as #6626, released in 8.65.0 with its own entry, and reaches 9.x.x with the next sync. #6679 is closed.

Refs JAVA-552

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
sentry-junior Bot added a commit that referenced this pull request Nov 20, 2026
… can't be traversed (#6626)"

This reverts commit 7eda470.

Co-Authored-By: Nelson Osacky <nelson.osacky@sentry.io>
sentry-junior Bot added a commit that referenced this pull request Nov 20, 2026
…t can't be traversed (#6626)"

This reverts commit ee14ece.

Co-Authored-By: Nelson Osacky <nelson.osacky@sentry.io>
adinauer added a commit that referenced this pull request Nov 20, 2026
* collection: Servlet API compatibility

* chore(deps): bump javax.servlet:javax.servlet-api from 3.1.0 to 4.0.1 (#6475)

Bumps [javax.servlet:javax.servlet-api](https://github.com/javaee/servlet-spec) from 3.1.0 to 4.0.1.
- [Commits](javaee/servlet-spec@3.1.0...4.0.1)

---
updated-dependencies:
- dependency-name: javax.servlet:javax.servlet-api
  dependency-version: 4.0.1
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* build(servlet): Keep Servlet 3.1 as compatibility floor

Compile the javax servlet integrations against the minimum supported API.
Exclude the intentionally pinned API from Dependabot while retaining the
separate Servlet 4 alias for latest-runtime coverage.

Co-Authored-By: Claude <noreply@anthropic.com>

* test(servlet): Test Servlet 3.1 and 4.0 runtimes (#6625)

* test(servlet): Test Servlet 3.1 on Tomcat 8.5

Run sentry-servlet against the minimum supported servlet container while
keeping Servlet 3.1 as the production compile target. Exercise the
service-loaded initializer through a real HTTP request and verify that
request context reaches Sentry.

* test(servlet): Run integration test on Tomcat 9

Reuse the real-container servlet integration test with a Tomcat 9 and Servlet 4 runtime classpath. Keep the Tomcat 8.5 run as the minimum-runtime check and attach both runs to the verification lifecycle.

* build(servlet): Use JVM test suites for Tomcat matrix

Replace the hand-built Tomcat 9 test task with isolated JVM test suites.
Run the shared servlet integration test with independent Tomcat 8.5 and
Tomcat 9 dependency graphs and attach both suites to check.

Co-Authored-By: Claude <noreply@anthropic.com>

* build(servlet): Remove unused Truth dependency

The servlet integration suites declare Truth directly, so the regular unit
test configuration no longer needs it after moving the integration test.

Co-Authored-By: Claude <noreply@anthropic.com>

* build(deps): Share the Tomcat 9 version

Reference one catalog version from the Tomcat 9 core, Catalina, and Jasper
aliases so dependency updates keep the runtime components aligned.

Co-Authored-By: Claude <noreply@anthropic.com>

* test(servlet): Run Tomcat matrix in dedicated CI job

Compile the servlet integration test once and execute it with separate
Tomcat 8.5 and Tomcat 9 runtime targets. Move both targets out of the
standard check lifecycle and run them in a dedicated CI job.

Co-Authored-By: Claude <noreply@anthropic.com>

* ci: Move integration tests to dedicated workflow

Create a shared workflow for non-Spring Boot integration suites and move the
servlet runtime matrix there instead of adding it to the main build workflow.

Co-Authored-By: Claude <noreply@anthropic.com>

* ci: Restrict integration test workflow permissions

Limit the workflow token to read-only repository contents because the test, artifact, and step-summary operations do not require write access.

Co-Authored-By: Claude <noreply@anthropic.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>

* build(deps): Share the Tomcat 11 version

Restore Tomcat 11.0.27 after the collection branch merge and use one catalog version for Catalina and embedded Jasper so future updates keep them aligned.

Co-Authored-By: Claude <noreply@anthropic.com>

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

This reverts commit 7eda470.

Co-Authored-By: Nelson Osacky <nelson.osacky@sentry.io>

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

This reverts commit ee14ece.

Co-Authored-By: Nelson Osacky <nelson.osacky@sentry.io>

* build: Lower Gradle daemon heap to 7g and metaspace to 1g

Co-Authored-By: Nelson Osacky <nelson.osacky@sentry.io>

* build: Restore 8g Gradle heap and cap Kotlin daemon heap at 3g

Co-Authored-By: Nelson Osacky <nelson.osacky@sentry.io>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com>
Co-authored-by: Nelson Osacky <nelson.osacky@sentry.io>
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