mirror of
https://github.com/block/buzz.git
synced 2026-08-18 06:50:31 +02:00
A channel timeline cache holding more than MAX_TIMELINE_MESSAGES (2000) content events — i.e. the user paged back to an old day in a busy channel — was silently trimmed back to the newest 2000 by the next capped merge: any live event, optimistic send, or fresh-history revalidation. The rows being read vanished out from under the reader, appearing as randomly missing messages for old dates (all present right after scrollback, partially or fully gone seconds later). Scrollback merges were already uncapped (isOlderHistoryPage special case), which is what made the loss intermittent instead of consistent. Fix: no merge into a potentially-on-screen timeline applies the cap. - mergeTimelineHistoryMessages: sort + dedupe only (drops the isOlderHistoryPage split — both branches now behave identically). - mergeTimelineCacheMessages (live/optimistic/single-event): same. - The DOM bound is enforced where nothing is rendered from the cache: the cold-snapshot paint (already capped) and a new trim-on-leave in useChannelSubscription cleanup, which re-applies normalizeTimelineMessages when the user leaves the channel. Regression test: expanded 2537-event cache + fresh newest-page revalidation merge — all old rows survive. Co-authored-by: Tyler Longwell <tlongwell@block.xyz> Signed-off-by: Tyler Longwell <tlongwell@block.xyz>
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