mirror of
https://github.com/block/buzz.git
synced 2026-08-18 06:50:31 +02:00
Two Codex P2 findings on PR #1511: - useLocalDictation.ts: the native STT engine is a singleton. When another mounted composer calls start_dictation, it stops this composer's session, so this hook can receive dictation-state:stopped without its own stopRecording()/cleanup() having run. The stopped branch only flipped React flags and removed listeners, leaving streamRef/workletRef/batchTimerRef/ audioContextRef alive — the old composer kept the mic open and pushed stale audio until unmount. Tear down the local capture pipeline in the stopped branch (without re-invoking stop_dictation, since native already stopped). - AppShell.tsx: when settingsOpen (or another dep) flips while Cmd+D is held, the effect cleanup removed listeners but never released the held key — the keyup listener was gone and the effect-local dictationKeyHeld was lost, so the mic kept recording. Call releaseDictationKey() in the cleanup before unregistering. Deps are referentially stable, so this only fires on the settings toggle, not on normal renders mid-hold.
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