Fix clipboard paste and Windows native typing failures #17
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/windows-typing-recovery"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Typing could fail before pasting when Electron returned an empty clipboard entry. Windows native insertion also stopped streaming when the focused control did not expose ValuePattern.
Empty entries now stay empty instead of constructing an invalid ClipboardItem, while all nonempty representations are resolved before replacing the clipboard. Windows probes ValuePattern without throwing and falls back only on an explicit unsupported-pattern result before any native write. Other failures are never replayed.
Actual Windows testing also caught PowerShell SendKeys turning a literal caret into an ampersand on a German keyboard. Windows direct typing and the native fallback now send Unicode through the existing serialized background worker, without using the clipboard. Native batches are bounded and blocked or partial injection is reported rather than retried. Clipboard paste keeps its existing proven key sequence.
Short Parakeet phrases still abstain from language identification below three seconds, without an expected warning for every phrase. Transcription text and honest unknown-language metadata are unchanged.
Proven with 210 passing tests, bun run check, bun run lint:eslint, bun run build, and 19 real Windows 10/Electron 45.1.0 cases on the final head: empty/rich clipboard restoration, supported WPF ValuePattern, unsupported WinForms fields, selection replacement, repeated streaming phrases, German and CJK text, literal punctuation, newlines, surrogate pairs across a native batch boundary, and read-only native failures without fallback. The native harness executes the production typing modules and worker with real OS APIs; it does not rerun ASR or recording. Target applications can still reject synthetic input, particularly across integrity levels. macOS behavior was not changed or rerun. The disposable VM and test processes were removed.
Windows baseline, final results, executed hashes and reproduction harness: windows-typing-runtime-evidence.tar.gz
Additional real Electron Linux clipboard proof: clipboard-electron45.json
kReview review
Verdict: no findings
No verified defects were found in the reviewed changes.
kReview checked only the PR diff, metadata, and supplied repository context at
453b740f93. It reports only issues supported by this material.Estimated cost: ~$0.07 total (123.3k in / 417 out); this run ~$0.04 (69.0k in / 210 out) / gpt-6.1-terra.
Run time: 0:29 total; this run 0:12.