feat(dictation): recording deck for voice dictation (timer, waveform, pause, retry, send modes) - #109
Merged
kahme247 merged 14 commits intoSep 19, 2026
Conversation
…anscribes+queues, deck keeps only pause and stop
…, attachment staleness, dynamic waveform width - Use the theme's --status-error token instead of undefined --danger custom properties so dictation colors follow light/dark themes. - Close the AudioContext and release the analyser when capture finishes, not only on cleanup, so transcription no longer holds the mic graph. - Read attachments through refs inside handleSend/sendQueued so files attached mid-recording are included when the transcript dispatches. - Surface 'No speech detected' when a capture yields no audio instead of failing silently. - Stretch the waveform canvas to the free composer width (dynamic bar count, newest samples at the buttons) and freeze it gray while paused. - Make the transcribe-and-send wiring test assert the contiguous branch. - Drop the orphaned chatInput.stopDictation i18n key.
…, state-gated finish, enter passthrough
Stop enters review with playback instead of sending immediately. Paused capture keeps a left-side preview play button.
…, icon, test honesty)
Contributor
Author
|
@coderabbitai review |
… behavioral test suite
…ic icon for resume
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Replaces the plain mic toggle with a full recording deck while a dictation session is active, bringing the flow to parity with modern chat apps (ChatGPT/WhatsApp-style):
Implementation notes
hooks/useDictation.tsgains pause/resume (native MediaRecorder), elapsed-time refs (no per-second re-render of consumers), an AudioContext/AnalyserNode capture for the waveform (torn down when capture finishes), and retained-audio retry.components/RecordingDeck.tsx(new) owns the 100 ms timer tick and the requestAnimationFrame waveform loop; the canvas stretches with the composer (dynamic bar count, DPR-aware, newest samples hug the buttons) and freezes gray while paused.--status-errortheme token (WCAG-verified) rather than new custom properties.Testing
node --test: 848/848 (includes new tests for pause accounting, analyser setup, blob retention/retry, timeout surfacing, and the send/queue wiring; also makes the systemd-install test hermetic against ambientOMP_WEB_OMP_BIN).tsc --noEmitandeslintclean.--use-fake-device-for-media-stream: deck swap, timer/progress, pause freeze, convert-to-text, transcribe-and-send, error→retry, cancel via button and Esc.Companion PR for automated review bots: andrebrait/ompweb (same head, base pinned to upstream/main).