From d87f05f9f131aa7cc92f53355c5fe63be01aa516 Mon Sep 17 00:00:00 2001 From: Christophe Besson Date: Wed, 23 Sep 2026 19:01:37 +0200 Subject: fix(client): let Copy buttons write the clipboard in the desktop app Only fullscreen was granted, so navigator.clipboard.writeText was refused and every Copy button did nothing. Grant clipboard-sanitized-write; reading stays refused. Co-Authored-By: Claude Opus 5.5 --- packages/meshbay-client/src/main.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'packages/meshbay-client/src') diff --git a/packages/meshbay-client/src/main.js b/packages/meshbay-client/src/main.js index 794477b..c263d2c 100644 --- a/packages/meshbay-client/src/main.js +++ b/packages/meshbay-client/src/main.js @@ -499,9 +499,13 @@ function publicKeyB64(privateKey) { return der.subarray(der.length - 32).toString('base64'); } -// Everything the interface is allowed to ask Chromium for. Watching a film -// full-screen is the whole list. -const GRANTED_PERMISSIONS = new Set(['fullscreen']); +// Everything the interface is allowed to ask Chromium for: watching a film +// full-screen, and putting text on the clipboard. The second is what every Copy +// button needs (an invitation link, the recovery key, the node key, a cast +// URL); refused, `navigator.clipboard.writeText` rejects and each button +// quietly did nothing. Write only, and sanitized — reading the clipboard stays +// refused, because that is someone else's text. +const GRANTED_PERMISSIONS = new Set(['fullscreen', 'clipboard-sanitized-write']); // No hub call is still going to be answered after this. The hub's longest is // signaling a WebRTC offer, which gives up at fifteen seconds of its own. -- cgit v1.2.3