mirror of
https://github.com/block/buzz.git
synced 2026-11-04 00:12:02 +00:00
Perci caught a blocking gap on Tyler's exact repro: the relay already holds the reactor's kind:7 (it never came back over the #h live sub, so the cache didn't render it). Clicking again ran onMutate (optimistic write) -> addReaction rejected with "duplicate: reaction already exists" -> onError rolled the optimistic reaction back -> we were straight back to "duplicate but nothing visible". The optimistic write was being undone on precisely the path it was meant to fix. Swallow duplicate-on-add in mutationFn (reusing the existing isDuplicateReactionError predicate that Pulse already uses) so onError never runs and the optimistic reaction survives. Other failures and the remove path still propagate and roll back. Adds a regression test pinning the relay error string the swallow depends on. 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