Skip to content

Make Insert Last in the overlay menu stop the active recording - #1466

Open
dreadloop wants to merge 2 commits into
altic-dev:mainfrom
dreadloop:fix-insert-last-overlay-menu
Open

dreadloop wants to merge 2 commits into
altic-dev:mainfrom
dreadloop:fix-insert-last-overlay-menu

Conversation

@dreadloop

@dreadloop dreadloop commented Dec 1, 2026 •

Copy link
Copy Markdown

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.

PasteLastRecordingPolicy holds the per-trigger rule, with a standalone test in Tests/run_ci_checks.sh. The test pins that rule; it does not exercise the ContentView wiring.

Type of Change

  • 🐞 Bug fix
  • ✨ New feature
  • 💥 Breaking change
  • 🧹 Chore
  • 📝 Documentation update

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 paste followed by Actions: 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.

  • Tested on Intel Mac
  • Tested on Apple Silicon Mac
  • Tested on macOS version: 27.3
  • Ran linter locally: swiftlint --strict --config .swiftlint.yml Sources Tests Package.swift (SwiftLint 0.63.2, as pinned in CI)
  • Ran formatter locally: swiftformat --config .swiftformat Sources (SwiftFormat 0.61.1, as pinned in CI)
  • Ran tests locally: Tests/run_ci_checks.sh (all standalone checks pass and 2,849 Xcode tests pass with 46 skipped; the 9 UpdateInstallationPipelineTests fail with invalidSignature(-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 isRunning rather than isRunningOrStarting, 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.

  • A human created this PR or reviewed and approved it before submission, understands the full diff, and takes responsibility for the change.

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.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Dec 1, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-12-01T18:56:05.290625Z 407e195 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@greptile-apps

greptile-apps Bot commented Dec 1, 2026 •

Copy link
Copy Markdown

Confidence Score: 5/5RetriggerView in Greptile

[Medium impact] The changes appear safe to merge; no blocking issues were found.

Summary

Insert Last from the overlay discards an active recording before inserting the latest saved text. The hotkey still skips active recordings.

  • Insert Last from the overlay stops recording before pasting the latest transcription.

Reviews (2) · Last reviewed commit: "Skip Insert Last while a normal stop is ..." · Reviewed by Greptile

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread Sources/Fluid/ContentView.swift Resolved
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Insert Last in the overlay Actions menu does nothing

1 participant