Repository navigation
Conversation
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Electron clipboard IPC bridge electron/electron-env.d.ts, electron/main.ts, electron/preload.ts |
The preload bridge exposes clipboard writing through IPC. The main process checks the sender frame and text type and length before writing to the system clipboard. |
Shared clipboard utility and tests src/lib/copyText.ts, src/lib/copyText.test.ts |
copyText uses the Electron API when available and otherwise uses the browser clipboard API. Tests cover both paths and Electron rejection propagation. |
UI clipboard actions src/components/ui/toast.tsx, src/components/video-editor/cloud/CloudShareButton.tsx, src/components/video-editor/layout/EditorExportMenu.tsx |
Three UI actions use copyText instead of calling the browser clipboard API directly. Existing success and failure handling remains in place. |
Priority:
Estimated code review effort: 3 (Moderate) | ~20 minutes
Change: Bug fix
Sequence Diagram(s)
sequenceDiagram
participant UI as UI action
participant Copy as copyText
participant Bridge as electronAPI
participant Preload as Electron preload
participant Main as Electron main process
participant Clipboard as System clipboard
participant Browser as Browser clipboard API
UI->>Copy: submit text
alt Electron API is available
Copy->>Bridge: writeClipboardText(text)
Bridge->>Preload: invoke write-clipboard-text
Preload->>Main: IPC request
Main->>Clipboard: write validated text
else Electron API is unavailable
Copy->>Browser: writeText(text)
end
Possibly related issues
- webadderallorg/Recordly issue 1050: The change updates copying error text in the export interface, but does not fix the reported Lightning export failure.
- webadderallorg/Recordly issue 1067: The change updates the export error copy action, but does not address the reported auto-zoom or export failures.
- webadderallorg/Recordly issue 1157: The change updates the export error copy path, but does not fix the reported H.264 or
_resourceTypeerrors.
Suggested reviewers: webadderall
Merge Risk: 
Minimal · up to 33f7f
-
The clipboard change is mergeable after normal checks; the supported renderer windows can use the new clipboard path.
Pre-merge checks: 
4 · 
1
-
Failed checks: 1 warning Passed checks: 4 passed -
Finishing Touches
-
🧪 Generate unit tests (beta)
-
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Comment @coderabbitai help to get the list of available commands.
Description
Add a small Electron clipboard IPC path and route cloud share links, copied error toasts, and export error copying through a shared
copyTexthelper. The helper uses Electron when available and retains the browser clipboard fallback.Motivation
On macOS with Recordly v1.4.0, copying a cloud share link fails with “Could not copy link.” The permission handlers in
electron/main.tsdelegate to the policy inelectron/permissionPolicy.ts, which only grants the trusted media permission; Chromium's clipboard write permission is denied. This change keeps that policy intact and writes through Electron's main-process clipboard API instead.Fix
BrowserWindowmain frame whose document matches a trusted renderer URL, and accept only strings up to 100,000 characters (handler and sender check, IPC handler).electronAPItype (preload).Type of Change
Related Issue(s)
PR #1112 also discusses an IPC clipboard fallback. This PR keeps the fix focused on the clipboard path and avoids the broader, conflicting changes in that proposal.
Screenshots / Video
Not applicable; this fixes clipboard behavior without changing the UI.
Testing Guide
npm test -- --reporter=dot— 1,607 passed, 35 skipped.npm run typecheck— passed.npm run lint— passed with one existinguseExhaustiveDependencieswarning insrc/components/video-editor/dashboard/ProjectThumbnail.tsx.npx vitest run src/lib/copyText.test.ts src/components/ui/toast.test.ts).Checklist
Thank you for contributing!
🤖 Generated with Claude Code
Summary by CodeRabbit