mirror of
https://github.com/block/buzz.git
synced 2026-08-18 06:50:31 +02:00
The timeline caps visible content at MAX_TIMELINE_MESSAGES (2000) and always
kept the *newest* window, evicting the oldest. That's correct for live-tailing
but backwards for scrollback: paging back to the start of a channel with more
than 2000 content events evicted the head — the first messages never rendered.
On a non-virtualized list the cap is the only DOM bound, so it can't simply be
lifted.
Make eviction direction-aware. normalizeTimelineMessages / mergeTimelineHistory-
Messages take a `keep` end ('newest' | 'oldest', default 'newest' so cold-load
and live-tail are unchanged). The scrollback merge in useFetchOlderMessages
passes 'oldest', so the head the reader is scrolling toward survives and the
far newer tail (which they've left and which live/cold-load re-seeds) ages off
instead. Same 2000-row DOM bound either way.
Verified against #buzz-bugs (~2104 content events): scrolling to the start now
renders the channel_created genesis row; previously the first ~104 messages were
clipped.
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