Repository navigation
Conversation
The overlay's Actions menu is only visible while a recording is active, but Insert Last skipped whenever a recording was running, so clicking it never inserted anything. Process Again and Use Raw Text in the same menu stop the recording first. Insert Last from the overlay menu now discards the active or starting recording with the same cleanup as cancelling with Escape, then inserts the latest transcription. The paste-last hotkey still ignores presses while recording. The decision runs before the wait for modifier keys, so releasing a held hold-to-talk key cannot also deliver the discarded recording's transcript.
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Confidence Score: 5/5
[Medium impact] The changes appear safe to merge; no blocking issues were found. SummaryInsert Last from the overlay discards an active recording before inserting the latest saved text. The hotkey still skips active recordings.
Reviews (2) · Last reviewed commit: "Skip Insert Last while a normal stop is ..." · Reviewed by Greptile |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7f8932c001
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
If a hold-to-talk key-up or Spoken Send has already started the normal stop, that stop owns the recording buffer, so stopWithoutTranscription() returns without discarding anything. Insert Last then cleared the recording state and, once capture ended, inserted the previous transcription on top of the one the stop delivered. Insert Last now skips, from either trigger, while a stop is in flight, and re-checks after the wait for modifier keys.
Description
Insert Last in the overlay's Actions menu did nothing: the menu is only visible during an active recording, and the paste path skipped whenever a recording was running. Clicking it now discards the active recording (same cleanup as cancelling with Escape) and then inserts the latest transcription, matching Process Again and Use Raw Text. The paste-last hotkey keeps ignoring presses while recording.
The overlay-menu decision runs before the wait for modifier keys, so releasing a held hold-to-talk key cannot also deliver the discarded recording's transcript. A starting recording counts as active, because the overlay appears before capture finishes starting. If a normal stop is already delivering the recording (for example after a hold-to-talk key-up), Insert Last does nothing, so the two insertions cannot both land.
PasteLastRecordingPolicyholds the per-trigger rule, with a standalone test inTests/run_ci_checks.sh. The test pins that rule; it does not exercise the ContentView wiring.Type of Change
Related Issue or Discussion
Fixes #1465
Testing
Steps: dictate once, start dictation again, click ⋯ → Insert Last.
Expected: the recording is discarded, the overlay closes, and the latest transcription is inserted at the cursor.
Before: nothing was inserted; the log showed
Actions: Paste skipped - recording in progress.After: the latest transcription is inserted and the overlay closes. The log shows
Actions: stopping active recording before pastefollowed byActions: Pasted latest transcription into focused field. Tested twice in toggle mode. Not tested: hold-to-talk mode and Escape afterwards.FluidVoice 1.6.13 (bug reproduced), built from this branch for the fix. macOS 27.3, Apple Silicon.
swiftlint --strict --config .swiftlint.yml Sources Tests Package.swift(SwiftLint 0.63.2, as pinned in CI)swiftformat --config .swiftformat Sources(SwiftFormat 0.61.1, as pinned in CI)Tests/run_ci_checks.sh(all standalone checks pass and 2,849 Xcode tests pass with 46 skipped; the 9UpdateInstallationPipelineTestsfail withinvalidSignature(-67050)locally on unmodified main too, likely because local signing uses a different team). After the in-flight-stop change (407e195), the policy test, linter, formatter, and an app build were re-run; the full Xcode suite and the runtime test were not.Screenshots / Video
Before (1.6.13): Insert Last is clicked twice during a recording and nothing is inserted; Process Again from the same menu works.
insert-last-before.mp4
After (this branch): Insert Last discards the recording and inserts the latest transcription, twice.
insert-last-after.mp4
Notes
Process Again and Use Raw Text check
isRunningrather thanisRunningOrStarting, and Use Raw Text does not clear the active recording mode, so it can swallow the next Escape. Left out of this PR to keep it to one fix.Claude traced the bug from my logs and drafted the fix and tests; two other AI reviewers checked the diff. I reviewed the full diff and reproduced the bug and the fix on macOS 27.3 / Apple Silicon. I did not test on Intel or in hold-to-talk mode.