Repository navigation
fix(android): Mask prepared text layout views in replay and screenshots - #7011
Merged
Merged
Conversation
React Native 0.89 renders <Text> with PreparedLayoutTextView by default. It extends ViewGroup, so the android.widget.TextView match behind maskAllText does not cover it. Fixes #7010 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Semver Impact of This PR⚪ None (no version bump detected) 📋 Changelog PreviewThis is how your changes will appear in the changelog.
🤖 This preview updates automatically when you update the PR. |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 2bd4350. Configure here.
antonis
marked this pull request as ready for review
November 10, 2026 12:11
antonis
requested review from
alwx and
buenaflor
and removed request for
a team
November 10, 2026 12:11
📲 Install BuildsAndroid
|
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.
📢 Type of change
📜 Description
Adds
com.facebook.react.views.text.PreparedLayoutTextViewto the masked view classes on Android whenevermaskAllTextis on, for both Session Replay and error screenshots.maskAllTextis on.getReplayOptions, so it is also covered when sample rates are set withoutmobileReplayIntegration. In that case JS sends nomobileReplayOptionsand the native default still masks text.maskAllText: false: the class is explicitly unmasked in replay, mirroring how sentry-java handlesTextView. Classes in the user'smaskedViewClasses/unmaskedViewClassesare applied afterwards and take precedence.These views use the generic mask path, so the mask is one black block over the whole
<Text>instead of per-line rectangles in the text color.💡 Motivation and Context
Fixes #7010
RN 0.89 changes the default of
enablePreparedTextLayouttotrue, so a regular<Text>renders asPreparedLayoutTextView. That class extendsViewGroupand draws the layout itself.maskAllTextmatchesandroid.widget.TextView, so with the defaultpixelCopystrategy this text would be left visible.The class and flag already exist in 0.88 with the flag off by default, so apps that opted in there are covered too. The change is a string match, so it has no effect on RN versions that don't use this view. iOS keeps
RCTParagraphComponentView, which is already redacted.💚 How did you test it?
📝 Checklist
sendDefaultPIIis enabled.🔮 Next steps