Files
buzz/desktop
Duncan cd0eedd13a refactor(sidebar-sync): single-call readOutboxWithMeta recovers preservedKey from foreign records; add P3 reconnect+restart hook regressions
Thufir pass-2 findings — all four corrections applied:

1. P3 restart durability: replace two-function readOutbox+readOutboxPreservedKey
   with readOutboxWithMeta<S> that enumerates records once and returns
   { store, preservedKey }. Key selected by max queuedAt across ALL records (own
   and foreign); after quit, the prior window's nonce is gone so its record is
   foreign — the old isOwn filter returned undefined, losing the reservation.
   Both hooks forward outboxMeta.preservedKey directly to publish* on bootstrap.

2. Two-read snapshot/provenance split closed: the capacity bound now applies
   inside readOutboxWithMeta using the selected preservedKey, so the clicked
   channel is never evicted before it reaches the manager.

3. discardPending() clears pendingPreservedKey: minor correctness fix so a
   confirmed publish resets the field alongside pendingStore and clearOutbox.

4. Test consolidation: remove non-causal reconnect/remount tests from
   channelStarsSync.test.mjs (+120) and channelMutesSync.test.mjs (+192).
   Replace with two parameterized regressions in mergeLaneHook.shared.test.mjs:
   - P3 reconnect: triggers the actual subscribeToReconnects callback registered
     by the hook, asserts clicked channel survives 501-entry merge.
     Failing mutation: revert hook reconnect to publish*(pending).
   - P3 restart: seeds a foreign-nonce outbox envelope with preservedKey,
     mounts hook (bootstrap reads foreign record → recovers key → publishes),
     fires 2s debounce, asserts clicked channel survives 501-entry merge.
     Failing mutation: revert to readOutboxPreservedKey (isOwn filter) or drop
     bootstrap preservedKey forward.

Co-authored-by: Will Pfleger <pfleger.will@gmail.com>
Signed-off-by: Will Pfleger <pfleger.will@gmail.com>
2026-09-02 15:01:01 -04: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