fix(desktop): keep stream timeline pinned through settle#1320
Open
wesbillman wants to merge 1 commit into
Open
fix(desktop): keep stream timeline pinned through settle#1320wesbillman wants to merge 1 commit into
wesbillman wants to merge 1 commit into
Conversation
863cc02 to
787f5f2
Compare
When the user jumps to bottom mid-prepend (abandon), the load-older restore loop targeted the last virtualized row's END offset. That sits short of the container's true floor once padding/spacers are excluded, stranding the view above the bottom (the `Received: Infinity` scroll-history failure). Target the container's true floor (scrollHeight - clientHeight) instead. Adds relay-backed stream stability tests covering pin-to-latest, composer growth, and above-the-fold arrivals. Co-authored-by: Brain <21994759fc7a6fa6b965551d35cfd7897d262f2495467f2d78694ddcfa6a5c7e@sprout-oss.stage.blox.sqprod.co> Signed-off-by: Wes <wesbillman@users.noreply.github.com>
3fda836 to
a2005bc
Compare
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.
Summary
Why this matters
Recent main/release failures showed
stream.spec.tsintermittently stuck withdistanceFromBottomaround205while the receiver timeline still had the empty/intro content in the scroll container. A sidebar-only PR (#1319) reproduced the same deterministic205, which points at shared timeline infrastructure rather than the app code under test in those PRs.The root cause is the timeline latching an away-from-bottom message anchor from synthetic scroll events emitted during virtualizer settle or burst appends. The user never scrolled, but the app could still show the unread pill and stop chasing the true bottom.
Verification
pnpm --dir desktop checkpnpm --dir desktop build./scripts/start-relay-for-tests.sh --profile ci && ./scripts/setup-desktop-test-data.sh && pnpm --dir desktop exec playwright test --project=integration tests/e2e/stream.spec.ts --repeat-each=3→ 30/30 passedpnpm --dir desktop checkafter final cleanupMasking check:
REVERT_PROOF_TEST_STATUS=1, 2/30 failures)The revert-one failures tripped during seed propagation/visibility rather than the original
205assertion. That is still the same no-user-scroll anchor-latch race surfacing at a different point in the seed burst; the important result is that the helper-only change does not carry the shard green.