Skip to content

fix(desktop): keep stream timeline pinned through settle#1320

Open
wesbillman wants to merge 1 commit into
mainfrom
pinky/e2e-stream-stability
Open

fix(desktop): keep stream timeline pinned through settle#1320
wesbillman wants to merge 1 commit into
mainfrom
pinky/e2e-stream-stability

Conversation

@wesbillman

Copy link
Copy Markdown
Collaborator

Summary

  • keep the stream timeline's at-bottom anchor through synthetic/programmatic scroll events unless recent real user scroll input occurred
  • tighten the stream E2E scrollability helper so it waits for real seeded receiver rows and a bounded pinned postcondition instead of treating the empty intro height as ready
  • dedupe the stream specs through the pinned helper so failures report the same postcondition

Why this matters

Recent main/release failures showed stream.spec.ts intermittently stuck with distanceFromBottom around 205 while the receiver timeline still had the empty/intro content in the scroll container. A sidebar-only PR (#1319) reproduced the same deterministic 205, 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 check
  • pnpm --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 passed
  • Re-ran pnpm --dir desktop check after final cleanup

Masking check:

  • both fixes together → 30/30 green
  • app fix removed while keeping the helper tightening → red (REVERT_PROOF_TEST_STATUS=1, 2/30 failures)

The revert-one failures tripped during seed propagation/visibility rather than the original 205 assertion. 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.

@wesbillman wesbillman force-pushed the pinky/e2e-stream-stability branch from 863cc02 to 787f5f2 Compare June 27, 2026 01:07
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>
@wesbillman wesbillman force-pushed the pinky/e2e-stream-stability branch from 3fda836 to a2005bc Compare June 27, 2026 13:47
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