Skip to content

fix: apply a deferred item-size MVCP correction in the next position pass - #596

Open
chrispader wants to merge 1 commit into
LegendApp:mainfrom
chrispader:fix/apply-pending-anchor-correction
Open

chrispader wants to merge 1 commit into
LegendApp:mainfrom
chrispader:fix/apply-pending-anchor-correction

Conversation

@chrispader

Copy link
Copy Markdown

On web, an active MVCP anchor lock defers the item-size correction to the next frame. If another pass repositions items before that frame, for example the one a scroll event triggers, the visible items move without the correction. They jump for a frame and only partly come back once the deferred pass runs. With this change, the first pass that repositions items takes over the pending mvcpRecalculate and applies the correction itself.

We hit this in Expensify/App#100733, which moves the chat message list to LegendList. When older messages load at the top of a chat, the messages on screen jump by about 60 pixels and end up about 20 pixels off. Expensify currently carries this fix as a patch.

Reproduction

  1. On web, render a list with maintainVisibleContentPosition and more items than fit on screen.
  2. Scroll to the top and prepend a page of items with sizes that differ from the estimate.
  3. Verify the item at the top of the viewport stays in place instead of jumping and snapping back.

@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-11-04T20:45:04.551442Z
We couldn’t complete this review. Comment @codex review to try again.
74257ff 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.

…pass

On web, an active MVCP anchor lock defers the item-size recalculation to the
next frame. A pass that repositions items before that frame, such as the one a
scroll event triggers, moved the visible items without the correction, so they
jumped for a frame and only partly came back.

calculateItemsInView now takes over a pending mvcpRecalculate: it cancels the
scheduled frame and runs MVCP with the item-size source in the current pass.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@chrispader
chrispader force-pushed the fix/apply-pending-anchor-correction branch from 74257ff to 98226a5 Compare November 9, 2026 10:53
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