fix: exclude temporary paste writes from clipboard manager history - #526
fix: exclude temporary paste writes from clipboard manager history#526postoso wants to merge 1 commit into
Conversation
|
This PR has been closed because it still does not follow the required PR template after the 48-hour correction window. Please open a new PR with the required description, related issue or accepted Discussion, testing notes, and screenshot/video evidence when applicable. |
cea7caa to
3979f64
Compare
|
this seems like a good one! wanna fix all of the issues and perhaps add a clip for me to verify ? I can happily merge this ;) might be useful for me as well. |
The clipboard-paste insertion path writes the transcription to NSPasteboard.general to drive a synthetic Cmd+V, then restores the previous clipboard immediately after. Clipboard managers (Maccy, Raycast, Paste, etc.) record every pasteboard change, so that temporary write lands in history even though it is reverted right away. With a clipboard manager running, every dictation that uses the paste path leaves a transcription entry in history. Mark the temporary write with the nspasteboard.org TransientType and AutoGeneratedType marker types so well-behaved clipboard managers skip it. The change is confined to withTemporaryPasteboardString, which every clipboard-paste path funnels through; the string content and restore logic are untouched, so paste behavior and clipboard restoration are unchanged. ConcealedType is deliberately not used, since it signals sensitive content.
3979f64 to
83828d3
Compare
Greptile SummaryThe PR tags temporary clipboard writes as transient and auto-generated so compatible clipboard managers omit dictated text from history, while preserving the existing paste and clipboard-restoration behavior.
|
|
Rebased this onto current The temporary pasteboard write now carries the normal string plus the Transient and AutoGenerated markers. Concealed is intentionally omitted. I also updated the stale Reliable Paste description and added coverage confirming the markers survive a real Verified with SwiftLint, Video attached below. pr526-fluidvoice-raycast-proof.mp4 |
Description
FluidVoice temporarily writes dictated text to
NSPasteboard.generalwhen using Reliable Paste or a paste fallback. Clipboard managers can observe that write before FluidVoice restores the previous clipboard, leaving an unwanted transcription in history.This marks the shared temporary pasteboard item with
org.nspasteboard.TransientTypeandorg.nspasteboard.AutoGeneratedType. The normal string remains available to Cmd+V, and the existing clipboard restoration behavior is unchanged.ConcealedTypeis intentionally omitted because the transcription is not necessarily sensitive content.The Reliable Paste setting description is also updated so it no longer warns about the clipboard-history behavior fixed here.
Type of Change
Related Issue or Discussion
Related to #479, which relies on the clipboard paste path this change improves.
Testing
xcodebuild build-for-testingTypingServiceTransientPasteboardTestsNSPasteboardwriteScreenshots / Video
End-to-end verification: https://github.com/user-attachments/assets/bdbecb8f-ca65-4d07-8086-591583f22069
There are no UI layout changes.