mirror of
https://github.com/block/buzz.git
synced 2026-10-29 13:31:44 +00:00
wholeBlobSyncManager.startPendingEdit() unconditionally reseeded publishBaseline from mutable lastRemoteHead on every non-replay call. Sequence: A1 click pending → live H102 suppressed by hasPendingEdit → A2 second click → lastRemoteHead (=H102) folded into baseline → preflight saw no advance → A2 silently overwrote H102-only changes. Contract violation per JSDoc :51-55/:163-174. Fix: reseed publishBaseline only when (a) starting a fresh pending sequence (wasIdle) or (b) lastRemoteHead holds our OWN in-flight published attempt (lastIsOwnAttempt: eventId ∈ ambiguousAttemptIds). Case (b) is required so foldSupersedingAttemptWinner can repair the baseline on a same-second collision. A suppressed live remote head is never in ambiguousAttemptIds → lastIsOwnAttempt=false → baseline is preserved across all pending phases (debounce, preflight, publish, confirmation wait). Replay path (isRestoredReplay) semantics unchanged. New tests: wholeBlobSyncCarlP2SecondClick.shared.test.mjs, Variant A (debounce-window) and Variant B (in-flight), wired into both lane test files. Required mutations: timer-phase revert turns Variant B red; unconditional-reseed revert turns all four red. Same-second collision test remains green under both mutations. Co-authored-by: Will Pfleger <pfleger.will@gmail.com> Signed-off-by: Will Pfleger <pfleger.will@gmail.com>
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