Files
buzz/desktop
npub1mn7jgtj4w2pd0g0zeuhxsa6jy6p0rewxz4kujt98my82ahfmp72sxjexk7 dd848a61cc fix(read-state): close timer race, hydration publishability, v2 durable leakage
Fix three residuals from Thufir's final bounded re-check at bcd591b54:

1. Timer race (relayClientShared.ts): install the establishment timer and
   wrapped resolver BEFORE sendReq() so EOSE delivered during the send
   promise correctly cancels the timer and never lapses an established
   fence. Guard via alreadyEstablished boolean. Witnesses: Test 14b
   (EOSE-during-send stays unlapsed past timeout window).

2. Hydration publishability (readStateManager.ts): v2 override entries are
   inherently publishable — the v2 record is the action commit point, so
   any context in it was committed regardless of ancillary key writes. Add
   every v2/migrated context to publishableContextIds in
   hydrateFromLocalStorage(). Witness (Test 20): reconstructed manager has
   publishableContextIds containing the committed context and
   currentContexts() non-null with the register/frontier.

3. v2-failure durable leakage (readStateStorage.ts + readStateManager.ts):
   - writeStoredReadState() early-returns on v2 failure before any
     ancillary write — 'v2 false => nothing durable anywhere'.
   - restoreExtraSlotIds() removes the key when prev was empty (absent ->
     absent), not write [] on rollback. Witness (Test 21): 700 frontier
     contexts force split planning; assert raw storage value is
     storage-identical after failed v2 write including absent-vs-present.

Co-authored-by: Will Pfleger <pfleger.will@gmail.com>
Signed-off-by: Will Pfleger <pfleger.will@gmail.com>
2026-08-01 12:20:22 -04:00
..
2026-06-11 15:06:24 +00: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