You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Together with a recent fix for Android input's measurement jumps, Claude has found a theoretical race condition that could lead to a one-frame measurement jump which visually would look exactly like what React Native has.
It's so difficult to achieve that neither me nor Argent could reproduce it, but based on code analysis it's possible and fix is super cheap.
It can happen when, at the same time:
input's width changes
content update happens
user scrolls the input
Basically, when an Android input's width changed, MeasurementStore briefly dropped its saved maxTextHeight (used for the mentioned fix). A content update on the UI thread landing in that gap could make the loss stick, re-enabling the one-line scroll jump until the next layout pass; the fix keeps the value in that rewrite.
Test Plan
--
Screenshots / Videos
--
Compatibility
OS
Implemented
iOS
❌
Android
✅
Web
❌
Checklist
E2E tests are passing
Required E2E tests have been added (if applicable)
This is a small Android fix that keeps the saved maximum text height when the input width changes. It is expected to prevent a brief measurement jump. No concrete merge-blocking risk was found.
Pre-merge checks: 4
Check name
Status
Explanation
Title check
The title names the Android measurement jump race condition fix, which matches the single-file change that keeps maxTextHeight when MeasurementStore recalculates a cached measurement after a width cha…
Description check
The description explains the theoretical race between input width changes, content updates, and user scrolling. It states that MeasurementStore dropped maxTextHeight and that the fix keeps the value d…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Title check
Explanation
The title names the Android measurement jump race condition fix, which matches the single-file change that keeps maxTextHeight when MeasurementStore recalculates a cached measurement after a width change. It is specific and states the main change, so it passes.
Full details: Description check
Explanation
The description explains the theoretical race between input width changes, content updates, and user scrolling. It states that MeasurementStore dropped maxTextHeight and that the fix keeps the value during the rewrite, which matches the changed file. It lacks a test plan, but the check is lenient and the description is on-topic, so it passes.
Finishing Touches
Generate unit tests (beta)
Commit to this branch
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 0 remain after this review.
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
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.
Summary
Together with a recent fix for Android input's measurement jumps, Claude has found a theoretical race condition that could lead to a one-frame measurement jump which visually would look exactly like what React Native has.
It's so difficult to achieve that neither me nor Argent could reproduce it, but based on code analysis it's possible and fix is super cheap.
It can happen when, at the same time:
Basically, when an Android input's width changed,
MeasurementStorebriefly dropped its savedmaxTextHeight(used for the mentioned fix). A content update on the UI thread landing in that gap could make the loss stick, re-enabling the one-line scroll jump until the next layout pass; the fix keeps the value in that rewrite.Test Plan
--
Screenshots / Videos
--
Compatibility
Checklist