macOS: a paste error discards the completed dictation from History and Paste Last
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 76/100
Research direction
Read finish_output in src/parakeet.rs around lines 981–989 and trace how the paste result, last_transcript, and record_history are handled. Check the existing output tests or reproduce the controlled failure described in the issue. Done means a failed paste still returns its original error and leaves History unchanged, while Paste Last can retry the completed transcript.
Written by the indexing model from the issue text.
Description
Hex version
dev at 334af30119bb4e3a18133e05fe180cc63c193353
Platform
macOS
System details
macOS 27.3, Apple silicon
What happened?
A completed dictation is dropped from normal recovery when pasting fails. History receives no entry, and Paste Last still contains the previous successful dictation. Retrying Paste Last therefore inserts the old text.
Expected: keep the completed result available for copying or retrying, while still reporting the paste failure.
A second writer changing a private macOS pasteboard reproduced these errors in the production paster:
clipboard changed while Hex was preserving it
could not inspect clipboard format (status -25130)
Steps to reproduce
The native clipboard failure and output handling were reproduced separately, using production code with controlled inputs. The installed app and general clipboard were not used.
- Give
finish_outputan earlier Paste Last value and a newly completed transcript. - Exercise
src/paste.rsagainst a unique private pasteboard while another writer changes it. Supply the resulting native error throughfinish_output's existing paste callback. - Observe the failure return before the History recording call or Paste Last update.
- Run the Paste Last output job. It uses the earlier transcript:
completed text: "completed new dictation"
history entries: []
Paste Last retry: "earlier dictation"
The ordinary trigger is another copy or clipboard update while Hex prepares the paste; its frequency in real use is unmeasured.
Additional context
In src/parakeet.rs, finish_output calls paste at line 981 and propagates its error with ? at line 989. Both last_transcript and record_history are updated only afterwards. The completed result is consumed on the error path.
Suggested minimal fix: retain the paste result temporarily, update last_transcript for a non-cancelled Paste/RawPaste result, then propagate the original error. Leave History's success-only behavior unchanged. This restores Paste Last recovery without counting a failed paste as successful History.
With the proposed fix, tested against the same native error, the error still returned, History remained empty, and Paste Last retried completed new dictation. Successful-output and deliberately injected cancellation controls also passed. The cancellation control is a fixture check of the guard, not evidence of a user-facing cancel action.
Windows and Linux have similar post-paste retention ordering in source; their native paths were not exercised.
Proof limits: the native pasteboard failure and production output function were executed. History persistence was replaced with a call recorder, so this is not a disk-backed History or installed-app integration test. Diagnostic logs may contain raw text; the demonstrated loss is recovery through History and Paste Last.
- Dominant language
- Rust
- Stars
- 5.7k
- Forks
- 337
- Avg merge
- 2h 57m
- Merged PRs (30d)
- 891
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from anomalyco/hex
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
anomalyco/hex#456 · 4 comments ·
Maintainers usually reply within 1 day
-
Difficulty 5/5 Over a week Newbie friendliness 34/100
anomalyco/hex#1682 · 1 comment ·
Maintainers usually reply within 1 day
-
macOS: with the lid closed and the Mac asleep, dictation reopens a Bluetooth headset's mic every 4 s, and the Mac wakes every 8–10 sPossibly taken @thdxr claimed this today. Open
Difficulty 4/5 3-5 days Newbie friendliness 48/100
Maintainers usually reply within 1 day
-
Support selecting multiple dictations in historyPossibly taken @thdxr claimed this today. Open
Difficulty 4/5 3-5 days Newbie friendliness 55/100
Maintainers usually reply within 1 day
-
Please add a model which support Urdu LanguagePossibly taken @thdxr claimed this today. Open
Difficulty 4/5 3-5 days Newbie friendliness 42/100
Maintainers usually reply within 1 day
Similar issues
-
ci javascript tests
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
jonathanong/no-mistakes#3258 ·
Maintainers usually reply within 1 day
-
area: cpu-engines area: fuzzer good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 91/100
hffgzktbcc-blip/ounce-core#402 ·
Maintainers usually reply within 1 day
-
compiler
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
HerringtonDarkholme/hd-lang#1699 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
swc-project/swc-ai-issues#432 ·
-
SPLADE `/embed_sparse` output depends on the other inputs in the batch (candle BertModel / DistilBertModel)Possibly taken @0z5a claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
huggingface/text-embeddings-inference#979 ·
Maintainers usually reply within 1 day