Repository navigation
Description
摘要 / Summary
在 Windows 上,将通用设置中的 Windows 插入方式 设为 Clipboard Paste(剪贴板粘贴) 后,听写结果会反复插入失败;同一环境下切换到 TSF 或 SendInput(逐字模拟) 可以正常插入。
这看起来不是 ASR 或润色失败:失败会发生在最终文本已经产生之后的 Windows clipboard/paste delivery 阶段。
Environment
- Windows desktop build; the exact product version/commit is not printed in the supplied log.
- The log contains
build_id=33618fae405179f916c0c50d6de53b23f81b7f45andprotocol_revision=0x4F4C0009in the TSF comparison run. - Upstream
betawas checked at29d6e49321008d9a1f81821bdcbee34b9431d351while preparing this report. - The log does not record which
PasteShortcutwas selected (Ctrl+V,Ctrl+Shift+V, orShift+Insert) or the exact foreground application name.
Reproduction
- Open OpenLess settings and set the Windows insertion method to Clipboard Paste.
- Focus an editable text field.
- Trigger dictation and let it finish.
- Repeat the operation several times.
- Switch only the insertion method to SendInput or TSF and repeat; those modes insert successfully in the same captured run.
Evidence from the supplied log
The supplied log is openless-2026-12-01T04-48-52.log (18,478 lines). In the repeated reproduction window on December 1, 2026, 04:47:10Z–05:07:33Z, the following pattern appears:
- Nine
Pastesessions end withoperation=insert_final result=Err(Platform)followed byTauri text insertion failed. Examples: lines 16872, 17038, 17093, 17147, 17206, 17265, 17324, 17440, and 17674. - The failed sessions are explicitly preceded by
TSF composition disabled mode=Paste. For example, session39d7c030-12f8-49b5-84b7-54be463891d6reaches final text at lines 17318–17323, then fails at lines 17324–17327. - The same run succeeds with
SendInput: sessionc56659c2-86a8-4f56-acc8-4d641d5513f8logsmode=SendInputat line 17377 andresult=Ok(Inserted)at line 17388. Later SendInput sessions also complete withOk(Inserted). - The same run succeeds with
TSF: session7d7b954e-910e-4ed4-ad63-24f30ec011c6logsmode=Tsfat line 17484 andresult=Ok(Inserted)at line 17520. - Around the failing Paste attempts, the log also contains repeated warnings such as
clipboard write failed: clipboard ownership changed(lines 17328–17335). The full log contains 11 occurrences of that warning.
Source-level correlation
I checked the current upstream beta source at 29d6e49321008d9a1f81821bdcbee34b9431d351:
core_adapters.rs— WindowsPastebranch routes Paste mode throughTextInserter::insert_guardedand then maps the result to the generic insertion outcome.insertion.rs— native clipboard adapter writes through the Windows owned-clipboard path, records a receipt, checks ownership, and only then dispatches the simulated paste shortcut.clipboard_delivery.rs— transaction/ownership gate returnsNotRequestedwhenowns()fails before paste dispatch.NotRequestedis mapped toTauri text insertion failedincore_adapters.rs.owned_clipboard/windows.rsassociates the write with a clipboard sequence number, an OpenLess marker, and a payload digest.owns()rejects the write if the sequence/marker/payload no longer matches.
The closest source-level explanation is therefore a clipboard ownership/receipt check failing between OpenLess's write and its pre-paste validation. A Windows clipboard history component, third-party clipboard manager, another clipboard writer, or a race in the ownership check could change the sequence/marker. The log does not identify which process changed the clipboard, so this is a likely trigger rather than a confirmed external culprit.
One important behavior follows from the current code: when this ownership check fails, the Paste path returns the generic Platform error before sending the paste shortcut; it does not fall back to the working SendInput path. The clipboard_delivery lock and the 750 ms post-paste consumption window do not prevent an external process from changing the clipboard before this pre-paste ownership check.
The ownership/receipt path was introduced in commit 7cf35ff1d95a8e0f4e6005c14b0e209d97b8f1f3. I am not claiming that commit is definitively the regression; it is the first source seam that matches the observed clipboard ownership changed failure.
Expected behavior
Clipboard Paste should insert the recognized final text into the focused editor, or report a distinct, actionable clipboard-delivery failure. TSF and SendInput working in the same run suggests the failure is specific to the clipboard paste path.
Request
Please investigate whether the owned-clipboard sequence/marker check can reject normal Windows Paste delivery under Windows clipboard history or clipboard-manager activity, and why this path becomes a generic Tauri text insertion failed without a safe fallback or more specific diagnostic.
This is a report only; no fix is requested in this issue.
Related issues
- [windows][insertion] 终端旧剪贴板粘贴风险已收敛,当前整链路回归稳定 #159 covered the older clipboard-restore timing risk after a paste; this report fails before successful paste dispatch.
- [windows] 剪贴板恢复/sentinel 导致划词追问与划词编辑无法抓到选区 #1024 covered the selection-capture sentinel path; this report concerns direct dictation insertion.
- [windows] 文本插入不能仅凭 Ctrl+V 发送成功就标记已插入 #20 covered the distinction between sending
Ctrl+Vand confirming insertion; this report is an earlier clipboard ownership rejection in the delivery path.
Activity
HKLHaoBin commentedon Dec 1, 2026
Android artifact available for testing
The Android artifact for the reviewed fix is ready from commit
d2180528c16ff0e563d6cb5d99fdc43717aff3ce.openless-android-release-arm64-v8aOpenLess_2.0.3-Beta.5_arm64-v8a.apk3bfd9852c93e66889355b36bf08a84ae2f08cb9a267d282d5ad5b082da214188sha256:8cb4003208de36b1669e138b6f77e39a1a392b1d65e32194623277adbfca86bdThis is the requested Android build and does not exercise the Windows Clipboard Paste path from this issue. The desktop artifact is still building; please use the desktop artifact for reproducing #1524.
HKLHaoBin commentedon Dec 1, 2026
Windows desktop artifact available for #1524 testing
The Windows desktop artifact for the reviewed fix is ready from commit
d2180528c16ff0e563d6cb5d99fdc43717aff3ce.openless-windows-x64OpenLess_2.0.3-Beta.5_x64-setup.exe3cd8895d7bf4fd32c39ccda0598b6cc0f264eaa116410c288e8e3ba97677aa18sha256:71072a6a23c26199a1c51b0b9f2d43cbc9b4897decaa5f54163cc6578c6826b9The bundled provenance records source SHA
d2180528c16ff0e563d6cb5d99fdc43717aff3ce, run46598109687, and reffix/issue-1524-clipboard-paste-ownership.Please install this build, set the Windows insertion method to Clipboard Paste, and repeat the scenario from this issue. If possible, also compare with TSF and SendInput in the same environment. The Intel macOS job in the same desktop workflow is still running; this Windows artifact is already available for the reported Windows problem.
HKLHaoBin commentedon Dec 1, 2026
Desktop artifact matrix complete
The exact-head desktop workflow has now completed successfully for commit
d2180528c16ff0e563d6cb5d99fdc43717aff3ce.Artifacts verified from the same run:
OpenLess_2.0.3-Beta.5_x64-setup.exe3cd8895d7bf4fd32c39ccda0598b6cc0f264eaa116410c288e8e3ba97677aa18sha256:71072a6a23c26199a1c51b0b9f2d43cbc9b4897decaa5f54163cc6578c6826b9OpenLess_2.0.3-Beta.5_x64.dmg778f221ba8d18116befa9c959cb75457cb11329557aecdb721d1d13ca21d1aefsha256:daf149e3681614e18b2f9aca6b54d433f21587c4eaa1487a4588ff42a1a25be1OpenLess_2.0.3-Beta.5_aarch64.dmgc49dc463f3e66a649397c2f4339c5801ab6f8bbffeed769f8e657e2edce7a80bsha256:b65e63990c714daa7047c1ce4c931c06bcf369973ab259d9b85989ae25847783Please test the Windows installer first for the Clipboard Paste issue. The macOS artifacts are provided for the requested desktop matrix but do not exercise the Windows-specific path.