Skip to content

fix(whisper): preserve transcript when insertion fails - #644

Open
mplacona wants to merge 1 commit into
SuperCmdLabs:mainfrom
mplacona:fix/whisper-clipboard-fallback
Open

mplacona wants to merge 1 commit into
SuperCmdLabs:mainfrom
mplacona:fix/whisper-clipboard-fallback

Conversation

@mplacona

Copy link
Copy Markdown

Summary

Fixes #643.

When Whisper finishes transcribing but cannot inject text into its target app, SuperCmd now copies the final transcript to the system clipboard instead of discarding it.

  • Adds a small, tested clipboard-preservation helper.
  • Returns the existing fallbackClipboard signal accurately.
  • Keeps the Whisper overlay open and tells the user that the text was copied, rather than closing and losing the recovery message.
  • Successful dictation still uses the existing temporary clipboard/paste flow and restores the user's prior clipboard.

Verification

  • node --test scripts/test-whisper-clipboard-fallback.mjs
  • npm test — 83 passed, 0 failed, 1 existing Electron-dependent test skipped
  • npm run build:main
  • npm run build:renderer
  • npm run check:i18n — exit 0; reports two pre-existing missing Italian keys

Manual test to run on macOS

  1. Invoke hold-to-talk Whisper without an editable target or make the target unavailable before release.
  2. Dictate a unique phrase.
  3. Confirm Whisper remains visible with Couldn't insert text — copied to clipboard.
  4. Paste into any app and confirm the phrase is recoverable.

@mplacona

Copy link
Copy Markdown
Author

Hey, is anyone maintaining this repo?

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.

Whisper can silently lose a completed transcript when text insertion fails

1 participant