mirror of
https://github.com/block/buzz.git
synced 2026-11-25 10:42:26 +00:00
The per-agent live-event stores (`eventsByAgent`/`transcriptByAgent`/the memoized snapshot) each kept the full MAX_OBSERVER_EVENTS window, and a long-lived session observes many agents over time — so the accumulator grew with the number of distinct agents seen and never shrank, one of the renderer leaks behind the v0.5.9 lag. Tier the window by whether a session viewer is mounted. A viewer (the two session panels and the activity bar, via useObserverEvents/useAgentTranscript) pins its agent with a refcount, keeping the full window so the deep scroll-back it displays is never truncated under it. An unpinned agent — observed only by background consumers that never display the transcript — is bounded to UNPINNED_AGENT_EVENT_TAIL. Unpinning the last viewer immediately re-bounds the window it accumulated, rebuilding events, transcript, and snapshot atomically before notifying so no consumer sees a transcript referencing dropped events. The tail is safe for every non-viewer consumer: preventSleep reads only the newest event (always retained); the active-turns bridge processes each event once as it arrives, with turn state living in its own store and gated by a per-channel watermark, so a turn_started aging out of the tail cannot lose the turn; and the profile activity feed derives a channel set that degrades to the tail (its durable history is channel-scoped in SQLite). 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