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
Programmatic virtualizer scroll events can briefly report an off-bottom gap while rows finish measuring, causing anchored scroll state to latch a message anchor before the bottom pin settles. Track recent real scroll input and ignore synthetic off-bottom events while the explicit bottom-settle guard is active so resize re-pins can chase the true floor without swallowing legitimate history-prepend restores. Also tighten the stream E2E helpers so they wait for real seeded messages, joined receiver participation, and a pinned timeline instead of treating the tall empty-state intro as proof that the receiver is ready. Co-authored-by: Pinky <44b8e82baa6e0e254e0208d68f335c283c94e7b78dd1fa10d5a49d3f13dd0435@sprout-oss.stage.blox.sqprod.co> Signed-off-by: Wes <wesbillman@users.noreply.github.com>
863cc02 to
787f5f2
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.