mirror of
https://github.com/block/buzz.git
synced 2026-08-18 06:50:31 +02:00
The two chat-message surfaces (MessageTimeline, MessageThreadPanel) ran on a hand-rolled scroll manager with two ResizeObservers and a double-rAF scrollTop band-aid that raced during prepend, causing the channel-jump bug. Replace it with @tanstack/react-virtual as the single scroll owner. virtual-core@3.17.0 ships the three hard behaviors natively, so they are configuration not hand-built code: anchorTo:"end" holds the viewport on load-older prepend, followOnAppend pins the bottom during a burst, and the internal reconcile loop settles deep-link scrollToIndex once the target row measures. The hook owns only what the library does not: the short-channel bottom-align pad, the at-bottom/new-message pill state, and the deep-link highlight. Channel/thread switch resets via key-remount (fresh virtualizer = zero stale measurement cache) rather than porting the old reset logic. useTimelineScrollManager + useLoadOlderOnScroll deleted, zero callers. 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