fix(desktop): restore fast middle-page scroll coverage setup (#155) - #166
Merged
Conversation
The failing scroll-history middle-page coverage case never reached its mounted-range asserts. Setup tried to force a Virtua shift prepend by live-emitting 100 backdated messages after channel open; product mergeLiveChannelWindowEvent correctly drops events below the open oldest boundary (they wait for ordinary relay paging), so scrollHeight stayed flat (3608→3608) and the >5608 poll timed out. Evidence (before fix): - mounted rows before emit: 49; after 100 older live emits: still 49 - prepended settle text mounted: 0 - no older-page request required for that path — pure live merge shortfall in the harness, not a virtualizer coverage or page-fetch shortfall Fix (harness): seed older mock history before open, wheel up to land a real older-page prepend (enables shift), then keep the original middle-scroll continuous-coverage asserts unchanged. Fixes #155
This was referenced Aug 12, 2026
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.
Problem
scroll-history.spec.ts— fast middle-page scroll settles with continuous mounted coverage — failed onmainwith:Issue #155 framed two opposite product causes (page-fetch shortfall vs virtualizer coverage). Discriminating evidence shows neither: the suite never reached the middle-scroll coverage loop.
Evidence (before fix)
Recorded at the setup prepend step on main:
scrollHeightbefore live older emits3608[data-message-id]rows49(initial ~50-event window)1000scrollHeight1s later3608(unchanged)Product path that rejects the harness setup:
Unit contract already locks this:
live rows below an open oldest boundary wait for paging.Cause kind: HARNESS (not product page-fetch shortfall, not virtualizer coverage bug).
Approach
Buzz seam: channel window store live-merge + older-page pagination (
mergeLiveChannelWindowEvent/pageOlderMessagesUntilRowFloor/ top-edge sentinel).__BUZZ_E2E_PREPEND_MOCK_HISTORY__before open.shiftprepend.Tests
Red → green (target):
Local collateral:
scroll-history.spec.tsfull file: 18 passedrelay-reconnect.spec.ts: 13 passed, 1 failed at:617(known baseline relay-reconnect.spec.ts:617 — pre-disconnect message disappears from the timeline after a 260-message reconnect backfill #154, sibling)channelWindowStore+ timeline retention unit tests: 31 passedtypecheck+ biome on touched spec: greenDocs
docs/crew/STATE.md— note scroll-history.spec.ts:1281 — fast middle-page scroll settles with ~half the required mounted coverage #155 harness root cause and fix.Risk
scrollHeightpoll still fails loudly rather than weakening coverage.Exclusions
relay-reconnect.spec.ts:617(relay-reconnect.spec.ts:617 — pre-disconnect message disappears from the timeline after a 260-message reconnect backfill #154).Fixes #155