Files
npub1qyvc0c5kl4gqv2fd97fsk46tu378sqgy35vc83rvgfwne90sel7s0ed67dandTyler Longwell b56b621195 fix(desktop): stop timeline cap from evicting scrolled-in history mid-read
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>
2026-07-02 15:28:21 -04:00
..
2026-06-11 15:06:24 +00:00
2026-06-11 15:06:24 +00:00

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 frontend
  • pnpm tauri dev - run the desktop app
  • pnpm build - typecheck and build frontend
  • pnpm typecheck - TypeScript checks
  • pnpm lint - Biome lint
  • pnpm 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