Fix PTT voice: switch from broken batch mode to live#6396
Conversation
Batch mode was re-introduced broken by the March 29 automated sync (9126906) which reverted the March 6 fix (e80ec70). The IOProc captures audio but batchAudioBuffer stays empty, causing "no audio recorded" 100% of the time. Live mode works correctly. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Greptile SummaryThis PR restores the correct default PTT transcription mode to Confidence Score: 5/5Safe to merge — single-line targeted fix restoring the correct default for a broken feature The change is a one-line fix to restore the intended default, backed by clear regression history. No P0 or P1 issues exist. Existing user preferences are correctly preserved by the UserDefaults guard that runs before the default is applied, and Swift's init semantics mean didSet does not fire during init so no spurious UserDefaults writes occurred on the broken default. No files require special attention Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[App Init / ShortcutSettings.init] --> B{UserDefaults has\nshortcut_pttTranscriptionMode?}
B -- Yes --> C[Load saved mode\n.live or .batch]
B -- No --> D[Use hardcoded default\nPREVIOUS: .batch BROKEN\nFIXED: .live WORKS]
C --> E[pttTranscriptionMode set]
D --> E
E --> F{Mode?}
F -- .live --> G[Real-time transcription\nwhile speaking ✅]
F -- .batch --> H[batchAudioBuffer stays empty\nno audio recorded ❌]
Reviews (1): Last reviewed commit: "Fix PTT voice recording: switch default ..." | Re-trigger Greptile |
) ## Summary - Batch mode PTT was re-introduced broken by the March 29 automated sync (9126906) which reverted the March 6 fix (e80ec70) - The IOProc captures audio but `batchAudioBuffer` stays empty, causing "no audio recorded" 100% of the time - Changes default from `.batch` to `.live` which works correctly ## Test plan - [ ] Press PTT shortcut, speak, release — should transcribe and send query - [ ] Verify floating bar shows live transcript while speaking 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Summary
batchAudioBufferstays empty, causing "no audio recorded" 100% of the time.batchto.livewhich works correctlyTest plan
🤖 Generated with Claude Code