Title: fix(desktop): let sites copy to the clipboard in the browser tab by waleedlatif1 · Pull Request #6696 · simstudioai/sim · GitHub
Open Graph Title: fix(desktop): let sites copy to the clipboard in the browser tab by waleedlatif1 · Pull Request #6696 · simstudioai/sim
X Title: fix(desktop): let sites copy to the clipboard in the browser tab by waleedlatif1 · Pull Request #6696 · simstudioai/sim
Description: Summary The browser tab's partition denied every site permission, which included clipboard-sanitized-write — the permission Chromium routes navigator.clipboard.writeText through. Copy buttons rejected with NotAllowedError and did nothing at all: no error shown, nothing copied. Sites still using the legacy document.execCommand('copy') kept working, which is why only some sites looked broken and the cause wasn't obvious. Allow that one permission. Reading the clipboard stays denied, along with media, geolocation, and notifications. Granting it hands the page no reach it lacked: Chromium still requires the document to be focused and holding a transient user activation, and a sanitized write only places text the page already renders onto the clipboard. Clipboard read is the direction that would leak whatever the user last copied from anywhere else — that stays denied. Type of Change Bug fix Testing Measured against the app's exact partition configuration on a real Electron 43.1.1 runtime, with transient user activation (as a real copy-button click has): Before — navigator.clipboard.writeText → rejected: NotAllowedError Failed to execute 'writeText' on 'Clipboard': Write permission denied, and navigator.permissions.query({name:'clipboard-write'}) → denied. After — writeText → resolved, permission query → granted, and the text actually landed on the system clipboard. Re-checked in the same run that the rest stay denied: clipboard.readText() → NotAllowedError, Notification.requestPermission() → denied, geolocation.getCurrentPosition → denied: code 1. Unit test asserts the grant/deny split across media, geolocation, notifications, clipboard-read (denied) and clipboard-sanitized-write (granted); confirmed it fails when the fix is reverted. Type-check and lint pass. Note: repo CI has been cancelling at Install dependencies on every branch including staging for several hours, so the CI signal here is unrelated to this change. Checklist Code follows project style guidelines Self-reviewed my changes Tests added/updated and passing No new warnings introduced I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)
Open Graph Description: Summary The browser tab's partition denied every site permission, which included clipboard-sanitized-write — the permission Chromium routes navigator.clipboard.writeText through. Copy buttons ...
X Description: Summary The browser tab's partition denied every site permission, which included clipboard-sanitized-write — the permission Chromium routes navigator.clipboard.writeText through. Copy butt...
Opengraph URL: https://github.com/simstudioai/sim/pull/6696
X: @github
Domain: github.com
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf |
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:83a830e7-403b-f7c5-4d1c-7fe9a41fc203 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | B3CC:26BE6B:B5CD3E:F9A410:6AFB53A8 |
| html-safe-nonce | 996b846fcc756c14f910a1c39b0ca3d9d7e8b908c4901e7d63d5bd38d8855ebb |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCM0NDOjI2QkU2QjpCNUNEM0U6RjlBNDEwOjZBRkI1M0E4IiwidmlzaXRvcl9pZCI6IjY4NDMyNTQwMzgyNzIzNjU0ODAiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | a5fe550e167f78de41d30889c3c01090320827b2a131d19a5bfce0998f959b50 |
| hovercard-subject-tag | pull_request:4277934509 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/simstudioai/sim/pull/6696/files |
| twitter:image | https://avatars.githubusercontent.com/u/40672544?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/40672544?s=400&v=4 |
| og:image:alt | Summary The browser tab's partition denied every site permission, which included clipboard-sanitized-write — the permission Chromium routes navigator.clipboard.writeText through. Copy buttons ... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 7122bb414b542dba14d71a3f0b9f6fd2abce715b9f5912d082800563e6c806d1 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/simstudioai/sim git https://github.com/simstudioai/sim.git |
| octolytics-dimension-user_id | 199344406 |
| octolytics-dimension-user_login | simstudioai |
| octolytics-dimension-repository_id | 912559512 |
| octolytics-dimension-repository_nwo | simstudioai/sim |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 912559512 |
| octolytics-dimension-repository_network_root_nwo | simstudioai/sim |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | cbf66c024bb6d10e6955baa7413c54cf13a201bb |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width