Description
Describe the bug
Process Again and Use Raw Text in the overlay's Actions menu stop an active recording with stopWithoutTranscription() before they run. They don't do the rest of the cleanup that discarding a recording with Escape does. I found two gaps by reading the code while working on #1466. I haven't reproduced either one at runtime.
- Use Raw Text keeps the recording mode.
applyHistoryTextOutputdoesn't callclearActiveRecordingMode()or reset the hotkey's modifier tracking, so the app still treats the discarded recording as active. The next Escape press likely goes to that stale state instead of doing its normal job. Process Again sets the mode to.dictatestraight afterward, so it probably doesn't have this problem. - Neither action handles a stop that's already running. Both check
asr.isRunning, notisRunningOrStarting, and neither checksprocessingDictationLifecycleID. If a normal stop has already started, for example just after a hold-to-talk key is released,stopWithoutTranscription()returns without doing anything because the other stop holds the recording. The normal stop then delivers its transcript as well as the action's output, so text can be inserted twice. The window is a fraction of a second.
#1466 handles both cases for Insert Last. If that approach is accepted, the same handling (or a shared "discard recording" helper) could cover these two actions.
Reproduction steps
From code reading. Not confirmed at runtime.
- Start dictation so the overlay appears.
- Open the Actions menu and click Use Raw Text.
- Start another dictation and press Escape to cancel it.
Expected behavior
Both actions discard the active recording the same way Escape does. If a normal stop is already delivering the recording, they skip it instead of inserting twice.
Actual behavior
Expected from the code: the first Escape after Use Raw Text doesn't cancel. A history action clicked during an in-flight stop may insert twice.
App Version
1.6.13
macOS Version
27.3
Architecture
Apple Silicon
Logs or crash report
None. These come from reading the code.
Activity