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-hub/tests/test_desktop_shell.py | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'packages/meshbay-hub/tests/test_desktop_shell.py') diff --git a/packages/meshbay-hub/tests/test_desktop_shell.py b/packages/meshbay-hub/tests/test_desktop_shell.py index fcf6c4d..e6eefc2 100644 --- a/packages/meshbay-hub/tests/test_desktop_shell.py +++ b/packages/meshbay-hub/tests/test_desktop_shell.py @@ -96,6 +96,17 @@ def test_video_may_go_fullscreen(): assert "fullscreen" in _granted_permissions() +def test_copy_buttons_may_write_the_clipboard_and_nothing_may_read_it(): + """ + Every Copy button calls `navigator.clipboard.writeText`, which Chromium + gates on `clipboard-sanitized-write`. With only `fullscreen` granted it was + refused, and each button did nothing — reported on the invitation link's. + """ + granted = _granted_permissions() + assert "clipboard-sanitized-write" in granted + assert "clipboard-read" not in granted + + def test_both_permission_handlers_answer_from_the_same_list(): """`Permissions.query` takes the check handler and a request takes the other; two lists would eventually disagree about what the page may do.""" -- cgit v1.2.3