Repository navigation
Fix scroll target after dataKey switch - #579
Open
jmeistrich wants to merge 11 commits into
Open
jmeistrich wants to merge 11 commits into
jmeistrich wants to merge 11 commits into
Conversation
Retire fresh-data scroll ownership before preparing destination positions, then reuse that data epoch during container allocation instead of clearing the same geometry twice. Keep keyed measurements and the container pool. Invalidate column-dependent measurements before preparation and discard unconsumed epochs when a viewport cannot allocate. Cover active bootstrap data updates, uncached switches, first destination windows, and epoch reuse.
Check the normalized observed offset against the current target on the completion frame and synchronize settled scroll state before finishing. Keep the existing completion fallback when the DOM cannot confirm landing. Share inclusive one-pixel tolerance across watchdog, completion, and layout correction. Cover RTL offsets, footer and viewport changes, stale callbacks, and the exact one-pixel completion boundary.
Use empty normal cells before evicting assigned cells, including typed and pending-removal candidates. Keep type matching within each pool and preserve recycling behavior.
Prepare data geometry early only for fresh datasets and active bootstrap sessions so settling offset sessions retain their pre-change MVCP anchors. Remove the preparation epoch and always invalidate column measurements when columns change, including deferred allocation.
Feed unaligned observed offsets into initial-scroll fallback checks so optimistic dispatch state cannot complete an unconfirmed request immediately. Preserve next-frame completion for custom scrollers that do not expose offset observation.
Use one observed-offset assignment for confirmed completions and initial-scroll fallback checks. Preserve the existing completion predicate, finite-observation guard, custom-scroller contract, and animated landing retries. Validation: 530 targeted tests across 22 files, full typecheck, lint, library build, and headless Chromium switch/completion checks.
Use the primary scroll path coordinate conversion when retrying an initial or end target through the completion fallback. Logical offsets must be translated before dispatching to the native scroller. Cover an initial landing two pixels short in negative and inverted RTL modes. Both retries reach logical offset 1500 instead of reversing to 0 or 8000.
Capture positions and the column count when the first destination bootstrap is assigned, before later layout passes can repair stale geometry. Cover one-pixel and beyond-one-pixel end-clamp overshoot on web, iOS, and Android.
Keep resetColumnLayoutCaches in the shared cache module so initial scroll lifecycle no longer imports checkResetContainers through the calculateItemsInView cycle. Both callers reuse the unchanged reset implementation.
Skip the preference pool when it has no candidates, avoiding the exact-type, untyped, and cross-type request scans. Preserve matching order whenever empty cells are available.
Default web RTL coordinates to negative offsets so a cold initial target lands without waiting for a negative scroll event to classify the mode. Preserve that mode at zero instead of reclassifying the start as inverted. Cover cold initial landing and next-frame completion without fallback dispatches, initial zero observations, and returning to zero. Keep native defaults and explicitly detected coordinate modes.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
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.
What was broken
After a
dataKeyswitch, a pending initial scroll target could resolve against stale layout from the previous data, so the list landed on the wrong row or never confirmed it had landed.Fix
recycleItems={false}, the container pool prefers empty cells over reusing occupied ones.Verification
scrollBy.Intended to merge after 3.7.0 ships.