mirror of
https://github.com/block/buzz.git
synced 2026-10-31 22:41:12 +00:00
Six items from Thufir's pass-2 report: 1. Typed DrainOutcome union (applied-read | silent-inactive | applied-unread | genuine-refusal) with exhaustive switch in the hook layer, eliminating the stringly-typed seam that let already_inactive fall outside both branches. 2. already_inactive emits silent-inactive outcome so the hook's source-cleanup callback fires; committed forced-entry ownership is now removed exactly rather than left stale after a successful queued read. 3. Click-time markAt threaded through applyOverrideRead → markChannelRead → PendingIntent.readTarget; drain advances frontier to that exact target before C-bump so pre-ready reads don't lose position. 4. priorForcedEntry persisted in PendingIntent (and in the v2 blob); genuine- refusal DrainOutcome carries it; hook uses the persisted value when the in-memory snapshot map is empty (post-restart rollback is now byte-for-byte exact). 5. initialize() ending with an incomplete verdict schedules the first backoff timer (1 s, then 2 s, 4 s … 60 s via retryLoad's own loop) so pending intents eventually drain without needing an external reconnect signal. New witness: initialize_incompleteVerdict_schedulesAutomaticRetry. 6. Non-reentrant outcome commit: after onDrainOutcome fires, drain re-checks generation; if a newer intent was enqueued inside the callback, all in- memory effects (register, receipt, publishable, extraSlots) are rolled back and the loop continues without consuming the newer intent. drain_compareDeletePreservesNewerIntent strengthened with zero-stale-effects assertion. Also: fix noExplicitAny in readStateStorage.ts (priorForcedEntry now typed as ForcedUnreadEntry); ratchet trimmed to keep useUnreadChannels.ts at limit. 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