Skip to content

Deliver chunked rich-text copies (Excel) to the local clipboard - #38

Merged
rangoDJ merged 1 commit into
mainfrom
fix/clipboard-multipart-flavours
Oct 7, 2026
Merged

rangoDJ merged 1 commit into
mainfrom
fix/clipboard-multipart-flavours

Conversation

@rangoDJ

@rangoDJ rangoDJ commented Oct 7, 2026

Copy link
Copy Markdown
Owner

Fixes #37

What changed

New client patch 10 in scripts/patch_selkies.py: the Selkies web client's chunked clipboard handler (clipboard_finish) now handles the application/x-selkies-clipboard-flavours bundle the same way the single-message path does — unpack it, record its signature, and write HTML + text to the local clipboard. Before, the bundle went down the image path, failed to decode, and nothing was written. The server splits payloads over ~16 KB, and Excel's HTML exceeds that for even a few cells.

Testing

  • pytest: 227 passed, 3 skipped. The test stand-in now carries the real clipboard_finish handler verbatim and runs it in Node: a chunked Excel-sized bundle is written as markup with the patch and fails without it; chunked plain text is unchanged.
  • Patch applied to the selkies-core.js from the deployed container; the bundle parses (node --check).
  • Not yet tested against a live RDP session: confirm by copying a range of Excel cells on the remote PC and pasting locally once deployed.
  • Test helper now pipes scripts to Node on stdin (long scripts overflowed the Windows command line).

🤖 Generated with Claude Code

Copies with markup over ~16 KB arrive in chunks, and Selkies' chunked
handler treated the markup-and-text bundle as an image, so it failed to
decode and nothing reached the clipboard. Excel's HTML passes 16 KB for a
few cells, so most Excel copies were lost. Handle the bundle there the way
the single-message path does.

Fixes #37

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@rangoDJ
rangoDJ merged commit 532d4cb into main Oct 7, 2026
4 checks passed
@rangoDJ
rangoDJ deleted the fix/clipboard-multipart-flavours branch October 7, 2026 22:01
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.

Copying Excel cells on the remote PC doesn't reach the local clipboard

1 participant