Skip to content

fix(windows): keep temporary pastes out of clipboard history#1768

Open
badigit wants to merge 1 commit into
cjpais:mainfrom
badigit:codex/clipboard-pr-clean
Open

fix(windows): keep temporary pastes out of clipboard history#1768
badigit wants to merge 1 commit into
cjpais:mainfrom
badigit:codex/clipboard-pr-clean

Conversation

@badigit

@badigit badigit commented Jul 22, 2026

Copy link
Copy Markdown

Before Submitting This PR

Please confirm you have done the following:

If this is a feature or change that was previously closed/rejected:

  • I have explained in the description below why this should be reconsidered
  • I have gathered community feedback (link to discussion below)

Human Written Description

On W11 , the "don't modify clipboard" option was still filling my Win+V history with duplicates and empty entries. I use clipboard history all the time, so this was really annoying. This fix keeps pasting fast without changing or polluting the clipboard history.

Related Issues/Discussions

Related: #1356

This issue was closed because clipboard-based paste was assumed to have no way to avoid Windows clipboard-history entries. Windows exposes registered clipboard formats specifically for excluding a clipboard transaction from monitoring, history, and cloud sync, which makes a Windows-specific fix possible without changing the paste mechanism.

Community Feedback

The original report and reproduction are in #1356. No separate discussion has been opened because this is a bug fix for the existing Don't Modify Clipboard behavior, not a new feature.

Testing

  • Built the Windows x64 production application, MSI, and NSIS installer in the existing GitHub Actions workflow: https://github.com/badigit/Handy/actions/runs/29920434836
  • The workflow's Windows runtime audit installed both packages, verified bundled runtime DLLs, and launched handy.exe --list-devices successfully.
  • Manually tested the unsigned Windows build on Windows 11 with clipboard history enabled. Clipboard-mode transcriptions remained fast, the previous clipboard content was restored, and repeated pastes did not add transcription or blank entries to Win+V history.
  • Added unit coverage for CF_DIB byte layout, invalid RGBA lengths, and empty image dimensions.
  • An independent read-only review found no remaining blocking issues after removing test-only version/workflow changes and extending clipboard-open retries to approximately 475 ms.

Screenshots/Videos (if applicable)

Not included. The behavior is observable directly in the Windows Win+V clipboard-history panel; reproduction steps are documented in #1356.

AI Assistance

  • No AI was used in this PR
  • AI was used (please describe below)

If AI was used:

  • Tools used: OpenAI Codex
  • How extensively: Codex investigated the Windows clipboard behavior, implemented most of the patch and tests, prepared the cloud build, and performed an independent read-only review. The contributor manually tested the resulting Windows build.

@badigit
badigit marked this pull request as ready for review July 22, 2026 14:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant