Repository navigation
fix: close replay masking and legacy retry gaps from 4.0 review - #980
Merged
turnipdabeets merged 2 commits intoNov 16, 2026
Merged
Conversation
- Mask Compose text that a negative TextIndent paints left of its layout box (or right of it, for right-to-left text). - Read cleared text semantics from SemanticsModifier elements on Compose 1.0-1.2, which have no getTail, instead of discarding every frame. - Re-queue one copy per uuid when capture asks to retry legacy events, since it drops a uuid's later copies in a batch for good. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
posthog-android Compliance ReportDate: 2026-11-13T22:48:08.663445+00:00 ✅ All Tests Passed!232/232 tests passed Capture_V1 Tests✅ 105/105 tests passed View Details
Capture_Ai_V1 Tests✅ 110/110 tests passed View Details
Feature_Flags Tests✅ 17/17 tests passed View Details
|
- Skip clearAndSetSemantics { text = ... } replacements when looking for
the text to measure: only semantics with GetTextLayoutResult count.
- A missing getTail is only expected on pre-1.3 layout wrappers. On a
NodeCoordinator it throws again, so the frame is discarded.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
Approved.
The disclosed changes enter privacy-sensitive, ingestion, and build territory, with independent assurance supplied by the author's STRONG familiarity and added regression tests. No substantive unresolved review concerns or other refusal grounds were found; the bot discussion summary is not a current-head review.
- Author wrote 100% of the modified lines and has 30 merged PRs in these paths (familiarity STRONG).
Gate mechanics and policy version
| Gate | Result | |
|---|---|---|
| prerequisites | ✓ | all clear |
| deny-list | ✓ | no deny categories matched |
| every_file_attested | ✓ | not a bot PR |
| size | ✓ | 50L, 3F substantive, 119L/5F incl. docs/generated/snapshots — within ceiling |
| tier | ✓ | T1-agent / T1c-medium (119L, 5F, two-areas, fix) |
| stamphog 2.9.0 | .stamphog/policy.yml @ 739bc26 · reviewed head 739bc26 |
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.
💡 Motivation and Context
Follow-up to the review bot findings on #871. All three bugs are in code that is new on the 4.0 branch. Stacked on
chore/v4-remove-deprecated.TextIndentwithTextOverflow.Visiblestarts the line before x = 0 (or past the right edge for RTL text).measureTextPaintedBounds()now widens the mask to each line's start position.getLineLeft/getLineRightdon't show the indent, butgetHorizontalPosition(lineStart)does: -40px for a -40sp indent, which matched where the pixels were drawn.getTailon Compose 1.0–1.2LayoutNodeWrapperhas nogetTail), so reading cleared text semantics threw and every frame of that screen was discarded. Text semantics there areSemanticsModifierelements (SemanticsModifierCore), which we now read first. WhengetTailis missing, we skip that modifier instead of throwing. Delegating nodes we can't read still discard the frame, as before.I left the compliance adapter finding out because it's test-harness code.
No changeset changes:
android-v4-replay-and-device.mdalready says 4.0 masks "Compose text that draws past its layout box in full", and this makes that true for indented text.💚 How did you test it?
PostHogReplayComposeMaskScopeTestcover LTR and RTL negative-indent overflow. Both fail without the fix and pass with it.PostHogSendCachedLegacyEventsIntegrationTestcase: a retried event stored twice is re-queued once. It fails without the fix../gradlew spotlessApply apiCheck :posthog:test :posthog-android:testDebugUnitTestpasses.ui-1.0.0jar:LayoutNodeWrapperhas nogetTail,ModifierInfo.getModifier()exists, andSemanticsModifierCoreimplementsSemanticsModifier.SemanticsModifier.getSemanticsConfiguration()is still in ui 1.12.1. I haven't run a sample app on an old Compose runtime.📝 Checklist
🤖 Agent context
Autonomy: Human-driven (agent-assisted)
Claude Code checked each bot finding against
mainand the 4.0 branch, wrote failing tests first, and fixed the three findings in shipped code. While probing, it found that unwrapped RTL text stays inside its box, so it dropped that test and tested a negative RTL indent instead.🤖 Generated with Claude Code