Repository navigation
refactor(replay): share one mask classifier between the mask walk and the discard check - #913
Merged
Merged
Conversation
… the discard check
6 tasks done
…r parity test Drops the refactor changeset: an internal refactor has no user-facing changelog entry.
marandaneto
approved these changes
Oct 30, 2026
marandaneto
left a comment
Member
There was a problem hiding this comment.
The code looks good; no qualifying findings. Verdict: correct.
Moves #914's ph-no-capture descendant masking into the shared classifier as a NO_CAPTURE rule. Co-Authored-By: Claude Opus 5.5 <[email protected]>
turnipdabeets
added a commit
that referenced
this pull request
Oct 30, 2026
…able masked views (#910) * fix(replay): discard legacy frames with an unplaceable masked view * fix(replay): record FLAG_SECURE windows as a fully masked screenshot * fix(replay): read FLAG_SECURE null-safely and cover reused bitmaps and nested masked views * test(replay): cover plain masked text in the legacy transient-state discard * fix(replay): drop touches on FLAG_SECURE windows in screenshot mode Also splits the legacy discard log so a transient-state discard says why, documents the FLAG_SECURE behaviour on the screenshot option, and points the duplicated mask rules at each other. * fix(replay): mask the frame when a window turns secure during the copy * fix(replay): guard the touch interceptor map and test secure touches through the window * test(replay): register the secure-touch test's window through mocked Curtains roots * refactor(replay): share one mask classifier between the mask walk and the discard check (#913) * refactor(replay): share one mask classifier between the mask walk and the discard check * test(replay): cover Compose and hidden children in the mask classifier parity test Drops the refactor changeset: an internal refactor has no user-facing changelog entry. --------- Co-authored-by: Claude Opus 5.5 <[email protected]> * fix(replay): honour FLAG_SECURE in wireframe mode (#912) * fix(replay): record FLAG_SECURE windows as a black wireframe and drop their touches in all modes * fix(replay): mask the wireframe when a window turns secure during the walk * test(replay): cover the wireframe secure check before the walk * fix(replay): treat no-capture descendants as maskable in the discard check Co-Authored-By: Claude Opus 5.5 <[email protected]> --------- Co-authored-by: Claude Opus 5.5 <[email protected]>
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.
Note
Stacked on #910. Merges into
fix/replay-flag-secure.💡 Motivation and Context
#910 added
hasMaskableContent, which repeats the mask rules fromfindMaskableWidgetsso the legacy capture can tell an animating sensitive view from a harmless one. Two copies with a "keep in sync" comment can drift: a new mask rule added only to the walk would let legacy capture record that view type unmasked again.Both now use one classifier,
View.maskRule(), which returns aMaskRuleenum. Thewhenover it is exhaustive, so a new rule won't compile until both callers handle it.No behaviour change: I compared every branch and the two copies classified every view the same way, so nothing needed the stricter result. Child iteration still differs on purpose (the walk uses its geometry-aware visibility check; the discard check counts any
VISIBLEchild, the stricter side) and is unchanged. No per-frame allocations:MaskRuleis an enum.💚 How did you test it?
the discard check treats everything the mask walk masks as maskable: covers plain, ph-no-capture, ph-no-mask, empty and non-empty text, image, nested, hidden-child and Compose views. The discard check counts Compose as maskable even when the walk finds nothing to mask, since it can't judge Compose content without geometry (unchanged behaviour). It fails if the discard check ignores masked text, treats Compose as non-maskable, or stops skipping hidden children../gradlew spotlessCheck apiCheck :posthog-android:testDebugUnitTestpasses.📝 Checklist
If releasing new changes
pnpm changesetto generate a changeset file (internal refactor, no user-facing change)🤖 Agent context
Autonomy: Human-driven (agent-assisted)
🤖 Generated with Claude Code