Files
buzz/desktop
npub1223z34hd7vtwc6qj4s7flsxkj644nlre2nthu7lrrmkumhu3xddsrx9r6wandTaylor Ho f1846e06cb fix(timeline): keep prior batch profiles during users-batch key churn
As messages stream in, new author pubkeys join the users-batch query's
pubkey set and the queryKey ("users-batch", ...pubkeys) changes. React
Query treats the new key as a brand-new query and drops `data` to
undefined for a frame before the new batch resolves.

That single undefined frame is the root of both regressions tho saw on
first-load:

  (a) Content-bust: the consumer collapses the profile lookup to {} when
      data is undefined, so already-resolved rows revert to truncated
      pubkeys and drop their avatars mid-stream.
  (b) Gaping empty space: the near-empty rebuild hands MessageTimeline a
      new messages reference, churning the virtualizer's measurement
      cache and scrollMargin so older rows pop in one at a time above a
      hole.

Adding placeholderData: keepPreviousData (v5 function form) retains the
previously resolved batch through the key transition, so settled rows
stay settled while the new batch fetches in the background. Verified
empirically against the installed query-core v5.100.14: the immediate
frame after a new author arrives keeps the prior profiles instead of
going undefined.

Co-authored-by: Taylor Ho <taylorkmho@gmail.com>
Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
2026-06-16 00:19:54 -07:00
..
2026-06-11 15:06:24 +00: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