Repository navigation
feat: support named native clipboard formats - #425
Merged
tiensonqin merged 12 commits intoNov 27, 2026
Merged
Conversation
Contributor
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
Contributor
There was a problem hiding this comment.
Devin Review found 2 findings. Devin automatically fixed all 2 findings.
Fixed by Devin (2)
- Clipboard writes wait for the manager — Clipboard-manager persistence is now requested during process shutdown rather than synchronously after each copy, avoiding UI input blockage while retaining cross-restart clipboard contents.
- Non-Linux shutdown fails after clipboard hook — The shutdown persistence hook is a no-op off Linux instead of raising the unsupported-backend exception.
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.
Summary
Adds
clipboard_write_formatsandclipboard_read_formatto the macOS and Linux native shell APIs so hosts can atomically transport structured clipboard data alongside the plain-text fallback.text/plain/text/htmlto native pasteboard types unless those native keys were explicitly supplied.text/plainis also exposed throughUTF8_STRING. Linux rejects embedded NULs intext/plainbecause GTK plain-text reads are NUL-terminated; custom formats may carry them.clipboard_write/clipboard_readbehavior is unchanged.docs/api-migrations.md.Validation:
dune build platform/native/lui_shell_linux platform/native/lui_shellpassed;dune runtest platform/native/lui_shell_linux/testpassed, including a real GTK multi-format clipboard round trip and a custom-format embedded-NUL payload. Real two-process macOS validation also passed atd60f967e: the fulllui_shell_mac_test.exesuite passed 12/12, and an independent Swift process readtext/plain,public.utf8-plain-text,text/html, andapplication/logseqwith the expected distinct payloads afterclipboard named formatsran.Link to Devin session: https://app.devin.ai/sessions/c5d7e54b078e47e28153404536bb3def
Open in Devin Desktop: https://app.devin.ai/desktop/session/c5d7e54b078e47e28153404536bb3def?variant=devin
Requested by: @tiensonqin
🟢 Devin fixed all 2 findings · Follow Devin's work