Send clipboard contents to a tailnet machine with Taildrop - #9277
Open
geirolafs wants to merge 1 commit into
Open
Send clipboard contents to a tailnet machine with Taildrop#9277geirolafs wants to merge 1 commit into
geirolafs wants to merge 1 commit into
Conversation
The Tailscale panel can already send files to a machine; add a matching per-machine action that sends whatever is on the clipboard. An image goes over as itself, files copied in a file manager go over as themselves through the regular Taildrop send, and anything else goes as a small text file the receiver can open or copy from. Password-manager copies are refused, and a transfer that drags on announces itself in flight. Available as a row button, the panel's `v` key, and `omarchy tailscale send-clipboard <machine>`. On the receiving side, a clipboard text drop is announced as click-to-copy: answering the notification puts the text straight on that machine's clipboard, while the file still lands in the downloads directory as the recovery path. Co-Authored-By: Claude (Fable 5) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VRQZFePBavwQkzvAzGAR1K
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 Tailscale panel can send files to a machine with Taildrop (#6375); this adds the natural sibling: sending whatever is on the clipboard. It's the fastest way to get a snippet, a screenshot, or a copied batch of files onto your phone or another machine on the tailnet.
Sending
Each machine row gets a clipboard button next to the file-send button,
vsends to the selected machine from the keyboard, andomarchy tailscale send-clipboard <machine>does the same from the terminal. What goes over depends on what the clipboard holds:clipboard-HHMMSS.png, or its actual image type).text/uri-listoffer and handed to the regularomarchy-tailscale-send, so the files themselves arrive rather than a text file offile://URLs.Guard rails: a clipboard marked
x-kde-passwordManagerHintis refused — the same marker the shell's clipboard history refuses to record. An empty clipboard is refused rather than delivering a zero-byte file. Contents are staged before the transfer starts, so a paste that dies mid-stream can't deliver an empty file and then blame Taildrop. A transfer still running after ~2 seconds announces itself in flight, so a send to a sleeping phone doesn't look like nothing happened. Notifications never echo the clipboard contents.Receiving
On an Omarchy receiver,
omarchy-tailscale-receiveannounces a clipboard text drop as click-to-copy: answering the notification puts the text straight on that machine's clipboard, while the file still lands in~/Downloadsas the recovery path. Oversized drops (>256KB) are announced as the plain files they have effectively become. Together the two ends give clipboard push between Omarchy machines; on phones and other platforms it arrives as a normal Taildrop file.Why not
omarchy share clipboard?The LocalSend share is complementary: this targets a specific machine from the panel you're already in, reaches the whole tailnet across the internet (no shared LAN, no LocalSend open on the receiver), and handles image clipboards (#8340 tracks the LocalSend path sending empty files for those). Clipboard sharing across devices has also been asked for in #8451.
Testing
test/shell.d/tailscale-send-clipboard-test.sh(new): text/image/svg+xmlnaming, payload integrity, uri-list delegation with percent-decoded paths and stale-list fallback to text, password-manager refusal, both empty-clipboard shapes (no offer, empty string), paste-failure error attribution, in-flight and completion toasts, transfer-error surfacing.test/shell.d/tailscale-receive-test.sh(extended): click-to-copy announcement, the file still landing in downloads, contents never echoed into the notification, a renamed name-clash keeping its click-to-copy, and the oversized fallback../test/cliand the tailscale shell tests pass.Verified live on my tailnet: text and image clipboards sent from the panel, the
vkey, and the CLI to an iPhone, including the in-flight toast on a slow transfer. The receiver's click-to-copy path is covered by the tests; it can't be exercised on a single machine since Taildrop won't send to itself.🤖 Generated with Claude Code
https://claude.ai/code/session_01VRQZFePBavwQkzvAzGAR1K