Repository navigation
Keep dictations out of clipboard history apps - #312
Open
rupokghosh wants to merge 1 commit into
Open
rupokghosh wants to merge 1 commit into
rupokghosh wants to merge 1 commit into
Conversation
A paste writes the transcript to the pasteboard, posts cmd-v and restores the previous contents 400 ms later. Neither write carried a marker, so clipboard managers (Raycast, Maccy, Alfred) recorded every dictation as a copy, credited to whatever app was in front, and recorded the restored contents again on top of the history. Both writes now carry org.nspasteboard.TransientType, which those apps skip. The degraded path that leaves the transcript on the clipboard for a paste by hand stays unmarked, since those words are meant to be kept. Checked against Raycast: an unmarked 400 ms write is recorded, a TransientType one is not. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
org.nspasteboard.TransientTypeWhy
every dictation was saved to clipboard history as if the user had copied it, credited to whatever app was in front, and the restore added a duplicate of the old clipboard each time. that also covered anything dictated into a password field.
How it was tested
SystemClipboardTestsagainst the real pasteboard: the paste write and both restore paths are marked, the hand-paste fallback is not. they fail on main and pass with this changeswift testpasses (1242 tests),swift format lint --strictis cleanKeyInjector.inserton the real pasteboard with only the cmd-v stubbed, 3 pastes on main and 3 with this change, with raycast clipboard history running. raycast recorded the 3 from main plus a repeat of the old clipboard, and nothing from this changescripts/check.shlocally, so CI is the source of truth for the rest