fix(desktop): clipboard permission dialog should say Strand (DAN-74) - #131
Merged
Merged
Conversation
Route programmatic clipboard read/write through tauri-plugin-clipboard-manager so macOS TCC names Strand instead of the webview origin. Keep navigator.clipboard as the web/demo fallback, and leave Edit-menu Copy/Paste and DAN-71 Ctrl+C/V routing unchanged. Linear: DAN-74 Co-authored-by: Daniels <danielss-dev@users.noreply.github.com>
The Windows native review gate stubs navigator.clipboard.writeText to capture Copy feedback. Desktop copy now uses plugin:clipboard-manager|write_text, so also wrap __TAURI_INTERNALS__.invoke for that command and leave other IPC untouched. Linear: DAN-74 Co-authored-by: Daniels <danielss-dev@users.noreply.github.com>
danielss-dev
marked this pull request as ready for review
September 21, 2026 10:51
Tauri 2 defines __TAURI_INTERNALS__.invoke/ipc as non-writable, so the previous assignment never captured plugin:clipboard-manager|write_text. Keep the navigator stub and also intercept the Windows IPC fetch path. Co-authored-by: Daniels <danielss-dev@users.noreply.github.com>
writeClipboardText honors window.__strandCaptureClipboardWrite so the Windows native review gate can record Copy feedback without stubbing frozen Tauri invoke or touching the OS clipboard. Co-authored-by: Daniels <danielss-dev@users.noreply.github.com>
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
Programmatic clipboard read/write now goes through official Tauri 2
tauri-plugin-clipboard-manager, so macOS TCC attributes access to Strand (productName/identifier) instead of the webview origin (tauri.dev local/ localhost).Linear: DAN-74
Implementation
tauri_plugin_clipboard_managerand grant least-privilegeclipboard-manager:allow-read-text/allow-write-text(plugin default is empty; allowlist updated inscripts/check-release-security.mjs).ui/src/lib/clipboard.ts:writeText/readTextnavigator.clipboardcopyToClipboard(PierreTree re-export) andreadClipboardText(terminalClipboard re-export). Call sites stay put, including Work terminal{ copy, read }for DAN-71.writeClipboardTextso denials still surface throughrun().Native review harness (CI)
scripts/test-review-native.mjscannot stub frozen Tauriinvoke/ipc.writeClipboardTextnow honorswindow.__strandCaptureClipboardWriteso Copy feedback is captured without touching the OS clipboard. The harness still stubsnavigator.clipboard.writeTextas a web fallback.Proof
cargo check -p strand-core -p strand-tauri— pass (tauri-plugin-clipboard-manager2.3.3 compiles).pnpm --filter ./ui exec tsc --noEmit— pass.clipboard.test.ts+terminalClipboard.test.ts— 22 tests, including the capture seam (plugin andnavigator.clipboardare not called when the hook is set).pnpm release:check-security— pass.Native agent review (Windows)is the GitHub Actions gate.macOS TCC
This agent is Linux and cannot show the live macOS permission dialog. Both
tauri devand packaged builds should name Strand because clipboard access now happens in the native app process, notnavigator.clipboardonhttp://localhost:1420. Verify on a Mac by triggering a programmatic copy (tree/diff copy or terminal paste after a prior deny) on a clean TCC profile.Out of scope
Clipboard UX redesign,
productName/ identifier branding, other TCC prompts, Taste/Figma-only work.