Repository navigation
fix(web): preserve retained reading position across virtual prepends - #250
Merged
Merged
Conversation
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.
Prepending mixed-height rows can lose the reader because total scroll-height changes include unrelated offscreen geometry. Preserve the first intersecting retained row and its measured viewport offset, materialize it through the virtualizer, and cancel on subsequent collection changes, user input, explicit scroll requests, reparenting or disposal. The helper has an explicit interface and no timer or synthetic input path.
Validation: two real-browser failures before implementation, then all three prepend cases pass in Chromium, Firefox and WebKit. All 20 related Chromium cases pass. The real Mapre consumer removes duplicate height compensation and passes 102 related browser cases. Melange/install builds and the new helper's AST64 check pass.
The first CI run passes six jobs and 135/136 browser cases; its unchanged virtual-tree focus test exposes a real reparenting regression. The correction cancels the old container's reading position when its retained parent changes. The unchanged assertion and all 18 focused upstream cases now pass, as do 44 affected Mapre cases after a fresh installed-package build. New exact-head CI is required; the original failure is preserved.
No Dune declarations, warning settings or vendored code changed. Repository-wide decision validation still reports two pre-existing legacy document paths; whole-repository @fmt reports pre-existing Dune formatting/configuration issues. New modules are explicitly formatted. Mapre release remains gated on this PR's CI and merge.