mirror of
https://github.com/block/buzz.git
synced 2026-08-18 06:50:31 +02:00
The unmount cleanup handler (registered for every useLocalDictation instance) called stop_dictation unconditionally, so a non-recording composer unmounting (e.g. closing a thread reply composer) while another composer was actively dictating would tear down the singleton engine and drop the real recording's final transcript. Scope every frontend stop_dictation call to a specific session: - cleanup() passes nativeSessionRef.current (0 for an instance that never started; native session IDs start at 1, so a never-recorded composer's stop can never match the live session and correctly no-ops). - startRecording bail paths pass the just-started sessionId, robust against a concurrent restart during an await window. - error path and cancelRecording drop their redundant unconditional stop and rely on cleanup()'s scoped stop.
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