mirror of
https://github.com/block/buzz.git
synced 2026-08-18 06:50:31 +02:00
Two Codex P2 findings on PR #1511: - stt_engine.rs: the shutdown drain + final flush ran for every SttEngine, including the huddle wrapper. Leaving a huddle / disabling transcription calls shutdown() then drops the pipeline (Drop joins the worker), so draining the queue and decoding the trailing buffer could block huddle teardown even though the huddle generation guard discards the transcript. Gate the drain + final flush behind a new SttEngineConfig.flush_on_shutdown flag: true for dictation (preserves the last-words fix), false for huddle (fast no-final-flush teardown, as before). - AppShell.tsx: push-to-talk dictation only stopped on keyup, so if the WebView lost focus before \u2318D was released (Cmd-Tab, clicking another app, OS focus change), the key-up event never fired and the mic kept recording. Add blur + visibilitychange handlers that dispatch buzz:dictation-key-up when the key is still held.