Repository navigation
feat: paste files into a Finder folder with desktop_insert, confirmed by their names appearing there (#3) - #114
Merged
Merged
Conversation
iamnbutler
added a commit
that referenced
this pull request
Oct 17, 2026
… by their names appearing there (#3)
iamnbutler
force-pushed
the
feat/finder-paste
branch
from
October 17, 2026 09:51
a30f6ee to
d201f6a
Compare
This was referenced Oct 17, 2026
Merged
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.
The #3 follow-up:
desktop_insertwithformat: "files"now accepts a Finder folder window as its receiver. It pastes the files with Command-V and confirms the paste when every name appears in the folder, then restores the clipboard.How it works (
native/patches/peekaboo-finder-paste.patch, last in the stack)AXDocument, thenAXURL, with short AX messaging timeouts. The result must be a file URL naming an existing directory. A window that reports neither is refused before input.lstat. If it isn't, the request is refused withPASTE_NAME_EXISTSbefore the clipboard is touched, so Finder's Replace / Keep Both dialog never opens. The check runs again before the clipboard write and in the delivery validator, just before Command-V.completedwithconsumption: "observed",folderandcopy: "started". That is reported separately from consumption: Finder may still be copying contents.clipboard: "replace", the clipboard is left replaced, as for other receivers.FinderPasteRefusal.suffix) toPASTE_NAME_EXISTSwith a hint, and passesfolderandcopythrough.Also
desktop_insertdescription gains one sentence on Finder. docs/tools.md's "images and files" details gain a Finder bullet, and the "Copy files between Finder folders" recipe now usesdesktop_insert.[Unreleased]→ Added bullet.npm run live-check -- --only 114): a 2-file paste into the fixture folder (completed,copy: "started", both files on disk, known clipboard text restored), and a name collision (refused withPASTE_NAME_EXISTS, existing file unchanged, clipboard change count unchanged). They're gated on the build's description mentioningPASTE_NAME_EXISTS.Verified
npm test(70) andnpm run checkpass. The local native build passes.FinderFolderPasteTests(2 tests: name presence including a dangling symlink, and the refusal suffix) andClipboardAttachmentWriteTests(3) pass. They ran isolated, with no helpers left running.Pending: screen locked
Nothing has run live yet. Unverified assumptions, to be checked by the live checks:
AXDocumentorAXURLas a file URL.desktop_focusfirst, as the recipe says).