mirror of
https://github.com/block/buzz.git
synced 2026-10-29 21:41:33 +00:00
While a composer sits in prefill state, every identity change of restoreAddressedAgentMentions (it depends on profiles and audience.pubkeys) re-runs the restore effect, and applyRestoredAgentMentions re-persisted the prefill unconditionally. saveDraftEntry has no same-content short-circuit, so each run cost a localStorage flush plus a notifySubscribers() broadcast with a fresh updatedAt, re-rendering Inbox count subscribers for no state change. persistAgentPrefill now loads the stored record first and returns without writing when the incoming snapshot is identical: same content, same channelId, an already-agent-prefill classification, matching mention refs, and no pending attachments or spoilered URLs (a stored agent-prefill record always has neither, so any live attachment state disqualifies the skip and the write proceeds). Bound by a unit test on the production hook: persisting an identical prefill snapshot twice notifies zero subscribers and leaves updatedAt untouched, while a genuinely changed snapshot (grown audience) still writes, notifies once, and keeps the agent-prefill classification. Falsified against the disabled skip (fails 2 !== 0 notifications). Verified: the touched unit test file (22 passing) and the persistent-agent-audience Playwright suite (37 passing; one load-flake passed in isolation and on full-suite rerun). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Signed-off-by: Matt Toohey <contact@matttoohey.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