Land clip selection and secret-heuristic removal on main - #22
Merged
Merged
Conversation
A spool is not always wanted whole. Ticking clips narrows what the next serve delivers and what the whole-spool paste joins, using one working set for both, so Win+Alt+U, Win+Alt+V and the button cannot come to mean different things. An empty selection means every clip. Selecting nothing and meaning nothing is not a state worth having: it would make both hotkeys dead and the button a no-op with nothing to distinguish that from a bug. Clearing the selection and selecting everything are therefore the same act, and unticking the last box returns to all rather than to none. The selection is not stored. It describes what you are doing now, the way a text selection does, and one that survived a restart would be a rule the user does not remember making. It ends when the active spool changes or the spool is cleared, and drops any deleted clip, because a set still naming a clip that is gone makes the button promise more than it can deliver. Serving steps over what is not in play and wraps among the chosen clips. A cursor left on an excluded clip is not an error — it was put there before the choice was made — so the next serve walks forward to the first clip in play instead of refusing. The button names what it will take: "Put all 15 on the clipboard" becomes "Put 3 of 15", keeping the total visible so a selection reads as a narrowing rather than as the whole truth. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The heuristics scanned every copy for PEM blocks, JWTs, key prefixes, connection strings and high-entropy text, and prompted on a match. They went for three reasons. They interrupted an ordinary workflow to report something the user already knew. Copying a credential is a normal thing to do, and the prompt arrived every time, asking permission for the thing the person had just deliberately done. The premise was weaker than it looked. The guessing defended against exposure, but nothing Spool holds leaves the machine. What Spool does change is persistence: a clipboard entry that would have lived until the next copy instead lives in an encrypted file with a visible preview. That is a real difference and it is the honest case for asking — it is not a strong enough one to justify asking about every API key a developer copies. And it was the entire cost of capture: 147ms per MiB, because each needle walked the whole buffer separately. Classification is now 0.003ms, because it no longer reads the content at all — classify does not take the bytes any more, which is the strongest form that claim can take. Two tests that failed intermittently at a five-second timeout stopped being flaky as a side effect. What is kept is not a guess. CanIncludeInClipboardHistory = 0 is an explicit statement from the application that owns the secret, and Windows' own Clipboard History obeys it. Spool makes a transient thing durable, so ignoring it would persist exactly what a password manager asked it not to, and behave worse than the OS feature beside it. It costs a flag check. detect/bytes.ts loses nine functions that existed only to feed the heuristics. wipe stays: a declined clip must not be left in memory. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Stop guessing whether a clip is a secret
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.
PRs #20 and #21 were merged, but not into
main: #20 was opened againstrepeat-unspooland #21 againstclip-selection, so both merge commits landed on feature branches andmainstayed at #19 (2bfaf65).This PR carries their commits to
main:09695a5Choose which clips are in play (Choose which clips are in play #20)b25886eStop guessing whether a clip is a secret (Stop guessing whether a clip is a secret #21)The merge base is
cf7e206, whose tree is identical tomain's HEAD, so this merges without conflicts and adds nothing beyond those two changes.🤖 Generated with Claude Code