Files
buzz/desktop
npub1qyvc0c5kl4gqv2fd97fsk46tu378sqgy35vc83rvgfwne90sel7s0ed67d 1e6e0eefb8 desktop: cancel in-flight channel fetch before optimistic reaction write
The reaction onMutate snapshotted the cache and wrote the optimistic
kind:7 synchronously, but did not cancel an in-flight useChannelMessages
fetch first. That queryFn ends with setQueryData(queryKey, mergedHistory)
built from a pre-click snapshot, so a fetch resolving just after the
click would clobber the optimistic reaction until the next backfill —
the same race the sibling send-message onMutate already guards against.

Make onMutate async and await queryClient.cancelQueries({ queryKey })
before snapshotting, matching the send-message mutation. Narrow but real;
no behavior change when no fetch is in flight (cancelQueries is a no-op).

Co-authored-by: Tyler Longwell <tlongwell@block.xyz>
Signed-off-by: Tyler Longwell <tlongwell@block.xyz>
2026-06-21 09:58:24 -04:00
..
2026-03-09 19:32:56 -07:00
2026-03-09 13:02:11 -07:00
2026-06-11 15:06:24 +00:00
2026-06-11 15:06:24 +00:00
2026-03-09 13:02:11 -07: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