Files
buzz/desktop
Duncan 021e55f3f8 fix(sync): thread preservedKey through per-record fold in readOutboxWithMeta
Without bestKey in the per-record reduce, folding two durable outbox records
totaling 501 entries evicts the clicked channel before the final bound can
protect it. Thread bestKey through merge(acc, r.store, bestKey) on every step
so the reservation is upheld at each intermediate capacity-bound merge.

Update the merge callback signature from (a, b) to (a, b, preservedKey?) —
both mergeStores implementations already accept the optional third arg.

Also fix two test gaps from Thufir pass 3:

reconnect test: both the reconnect-callback fetch and the subsequent
pre-publish fetch must return the remote 500-entry head so that reverting
the hook reconnect to publish*(pending) triggers the 501-entry merge and
fails. The previous single-return-on-call-1 mock left the pre-publish fetch
returning [] — no 501-merge occurred and the wrong wiring stayed green.

restart test: upgrade from one to two foreign-nonce outbox records. Record 1
carries the clicked channel + 499 entries with preservedKey; record 2 carries
the 501st entry with no key. This exercises the per-record fold eviction
(mutation c) directly: without bestKey in the reduce the fold evicts the click
at the record-2 merge, before the final bound runs. The single-record test
could not catch this class of defect.

Co-authored-by: Will Pfleger <pfleger.will@gmail.com>
Signed-off-by: Will Pfleger <pfleger.will@gmail.com>
2026-09-02 15:31:28 -04:00
..
2026-08-03 21:51:17 -04:00
2026-03-09 13:02:11 -07: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