Skip to content

Preserve clipboard contents when Flycut launches - #14

Open
MiMoHo wants to merge 1 commit into
haad:masterfrom
MiMoHo:preserve-clipboard-on-launch
Open

MiMoHo wants to merge 1 commit into
haad:masterfrom
MiMoHo:preserve-clipboard-on-launch

Conversation

@MiMoHo

@MiMoHo MiMoHo commented Aug 25, 2026

Copy link
Copy Markdown

Summary

  • Stop declaring pasteboard types during awakeFromNib.
  • Observe the current general pasteboard and retain its existing changeCount instead.
  • Add a focused regression test that prevents launch code from replacing the user's current clipboard contents.

Root cause

declareTypes:owner: creates new pasteboard contents. Calling it on the general pasteboard during launch therefore replaced the clipboard before Flycut had observed it.

Verification

  • The regression test fails against origin/master and passes with this change:
    • python3 Tests/ClipboardLaunchRegressionTests.py
  • The exact staged snapshot passed an independent fail-closed review with no security or logic findings. Its binary diff SHA-256 remained 726553ecf7bc9a566310a528b0ccdf24efa0fc9bf14c78544eb9b2487cfa4fb4 before and after review.
  • Both origin/master and this branch linked the same 20 PBX source files into native arm64 Mach-O executables with 0 errors and the same 40 existing compiler warnings.
  • Launch-time clipboard preservation was previously exercised with the equivalent production change in the consolidated local test build. This clean split branch was linked but was not installed separately.

Scope and remaining verification

This PR only preserves clipboard contents at launch. It does not include the clipboard-content logging removal already submitted in #5, and it does not change clipping selection or synthetic paste event posting.

The visible Shift+Command+V end-to-end path still needs to be repeated on the final, non-beta macOS 27 release with Accessibility access granted to the exact tested app. That separate OS-compatibility check is not claimed as passed here.

@MiMoHo
MiMoHo force-pushed the preserve-clipboard-on-launch branch from 05531d3 to fea2844 Compare September 9, 2026 15:22
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