Files
buzz/desktop
npub13fn4ahfnvaa2qwylvegdgeajqs0mph6v4qsw4jcqnw4mjh3hzh2quuucm5 3fa923dc88 fix(dictation): tear down capture on external stop + release PTT on effect cleanup
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.
2026-07-11 16:20:31 +01:00
..
2026-06-11 15:06:24 +00:00

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 frontend
  • pnpm tauri dev - run the desktop app
  • pnpm build - typecheck and build frontend
  • pnpm typecheck - TypeScript checks
  • pnpm lint - Biome lint
  • pnpm 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