mirror of
https://github.com/block/buzz.git
synced 2026-08-18 06:50:31 +02:00
The 'preserves user scroll while older channel history loads' e2e test
drove pagination with a synthetic scrollTop teleport plus a
dispatchEvent('scroll'), which mutates geometry a virtualizer can
re-assert and never reflects real input.
Seeding general with a small prepend was a dead end: the cold load
(CHANNEL_HISTORY_LIMIT=300) drains a sub-300 store in one shot, so the
wheel-driven fetchOlder returns only already-cached events that dedup to
zero net growth. The anchor then has no real prepend to hold and the
assertion measures virtualizer re-measure, not scroll preservation --
and __HISTORY_INFLIGHT__ fires on the request gate regardless of whether
new events come back, so it cannot prove a genuine page landed.
Target the deep-history channel (600 > 300) so a real older page sits
behind the until cursor. Its store is pre-seeded with monotonic
createdAt, so the test no longer needs its own timestamped emit loop to
avoid the same-second-collision flake. Two phases reconcile the standing
tension that the in-flight delay needed to observe drift is the same
thing that stalls the climb to the top sentinel: walk into mid-history
with no delay (each instant page advances the oldest row so the next
wheel re-enters a fresh sentinel), then enable historyDelayMs and fire
one delayed genuine page. The poll gates on a NEW older index landing
(not the inflight counter, not bare row count) AND <=2px drift of a
first-visible row captured while that page is in flight -- so a pass
proves the restore held a genuine prepend, not a re-measure.
Co-authored-by: Will Pfleger <pfleger.will@gmail.com>
Signed-off-by: Will Pfleger <pfleger.will@gmail.com>
Buzz
Desktop chat shell with:
- Tauri + React + TypeScript + Vite
- Tailwind CSS
- shadcn/ui-ready shared components
- Biome (lint/format/check)
- Feature-driven frontend structure
Scripts
pnpm dev- run the web frontendpnpm tauri dev- run the desktop apppnpm build- typecheck and build frontendpnpm typecheck- TypeScript checkspnpm lint- Biome lintpnpm format- Biome format (write)pnpm check- Biome check
Structure
src/shared- reusable app-wide code (ui,lib,styles)src/features- feature modules (vertical slices)src/app- top-level app composition