Skip to content

fix: account for Android end clamping during item resizing - #582

Closed
chrispader wants to merge 2 commits into
LegendApp:mainfrom
chrispader:@chrispader/fix/android-item-resize-end-clamp
Closed

chrispader wants to merge 2 commits into
LegendApp:mainfrom
chrispader:@chrispader/fix/android-item-resize-end-clamp

Conversation

@chrispader

Copy link
Copy Markdown

On Android, shrinking rows above the viewport can make native scroll clamping and MVCP apply the same movement twice. This accounts for the native clamp before applying the remaining item-size adjustment, including when the content shrinks to fit the viewport. It upstreams the second LegendList patch from Expensify/App#100733; #481 covers the related bottom-inset case.

Reproduction

  1. Open the native-content-shrink fixture on Android with LegendList, MVCP enabled, and no bottom inset.
  2. Expand the first row, press End, and wait for scrolling to settle.
  3. Press Shrink first row, then Read geometry. The list should remain at the new end without moving above it.

When measured content shrinks beyond the current offset, Android already clamps the viewport before native MVCP applies its anchor delta. Synchronize the JS offset to that clamp and request only the remaining movement so the same shrink cannot move the viewport twice.

Keep data-change and active-target handling on their existing paths, and clamp targets to zero when the content fits the viewport.
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ⚠️ Failed 2026-10-22T12:17:18.945898Z
We couldn’t complete this review. Comment @codex review to try again.
2707d1b PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Credits must be used to enable repository wide code reviews.

Keep the upstream clamp implementation and its regression coverage, including the current shared scroll-range calculation.
@chrispader chrispader closed this Nov 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant