mirror of
https://github.com/block/buzz.git
synced 2026-08-18 06:50:31 +02:00
Wheeling to the top of a channel left the rendered window frozen on the newest ~11 rows — users could not scroll back through history. MessageTimeline re-renders on every scroll via useVirtualizer's onChange, but TimelineMessageList is React.memo and read getVirtualItems() internally through the virtualizer's stable mutable ref. Shallow compare cannot see the range walk through that ref, so the memo skipped re-render while the virtual range advanced underneath. Thread virtualItems as a fresh-array prop from the hook-owner into the memoized renderer so memo sees a new reference each render and re-renders in lockstep — the documented react-virtual pattern. The e2e fixture now honors since/until/limit to model a true older-page gap, and a new anchor test asserts the tracked row's getBoundingClientRect().top holds within 8px across a scroll-back. 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