Repository navigation
Conversation
📝 Walkthrough
Priority: ⬇️ Low Merge Risk: 🔵 Low · up to
|
There was a problem hiding this comment.
Actionable comments posted: 3
ℹ️ Review info
⚙️ Run configuration
- Source mode: Auto
- Repository: Unavailable
- Branch: Unavailable
- File: No configuration file from this repository applied
- Commit: Unavailable
- Layers: Repository UI
- Review profile: CHILL
- Plan: Advanced
- Run ID:
5766c092-5c3c-4f6e-a7ed-44678757fafc
⛔ Files ignored due to path filters: 1
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing: 44
.gitignoreREADME.mdconfig/electron-builder.config.cjsconfig/scripts/package-windows-wer-helper.cjsconfig/scripts/package-windows-wer-helper.test.mjsdocs/reference/electron-45-upgrade.mddocs/reference/macos-daemon-tcc-attribution.mdpackage.jsonpnpm-workspace.yamlsrc/main/browser/browser-site-display-controller.test.tssrc/main/browser/browser-site-display-controller.tssrc/main/ipc/crash-reporting.tssrc/main/ipc/speech.tssrc/main/persistence/profile-state/profile-state-startup-recovery-dialog.tssrc/main/startup/main-process-ready-foundation.tssrc/main/startup/main-process-ready-runtime.tssrc/main/window/clipboard-agent-session-attachment-paste.test.tssrc/main/window/clipboard-copied-file-paths.test.tssrc/main/window/clipboard-copied-file-paths.tssrc/main/window/clipboard-dashboard-popout-access.test.tssrc/main/window/clipboard-file-copy.tssrc/main/window/clipboard-file-urls.tssrc/main/window/clipboard-formats.tssrc/main/window/clipboard-image-source.test.tssrc/main/window/clipboard-image-source.tssrc/main/window/clipboard-ipc-handlers.test.tssrc/main/window/clipboard-ipc-handlers.tssrc/main/window/clipboard-macos-image-paste.test.tssrc/main/window/clipboard-native-image.tssrc/main/window/clipboard-platform-routing.test.tssrc/main/window/clipboard-runtime-owned-ssh-paste.test.tssrc/main/window/clipboard-text-publisher.test.tssrc/main/window/clipboard-text-publisher.tssrc/main/window/clipboard-text-write-verify.test.tssrc/main/window/clipboard-text-write-verify.tssrc/main/window/clipboard-windows-image-file.tssrc/main/window/renderer-recovery-prompt.test.tssrc/main/window/renderer-recovery-prompt.tssrc/preload/api/speech-bridge.tssrc/shared/node-runtime-pin.tstests/e2e/clipboard-macos-image-paste.spec.tstests/e2e/electron-runtime-compatibility.spec.tstests/e2e/file-explorer-copy-file-windows.spec.tstests/e2e/paired-client-hosted-browser-markup.spec.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 6 remain after this review.
|
|
||
| Synchronous `safeStorage.isEncryptionAvailable()`, `encryptString()`, and `decryptString()` still work in 45 but are **removed in 46**. They remain behind `guardedSafeStorage` and the synchronous `SecretStore` contract. Callers include persisted host credentials, plugin secrets, and cloud profile sessions. | ||
|
|
||
| Migrate the shared secret-store interface and all callers together to `isAsyncEncryptionAvailable()`, `encryptStringAsync()`, and `decryptStringAsync()`. The latter returns `{ result, shouldReEncrypt, isTemporarilyUnavailable }`, not a string. Required checks for that follow-up: |
There was a problem hiding this comment.
🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win
Correct the decryptStringAsync() return contract.
Electron 45 resolves with { result, shouldReEncrypt }. Temporary unavailability rejects the promise; it does not return isTemporarilyUnavailable. If the planned credential migration follows this description, it could miss the rejection path. Document that path separately so callers preserve saved credentials and handle retries. (github.com)
| vi.mock('./clipboard-formats', () => ({ | ||
| clipboardFormatReader: { | ||
| availableFormats: clipboardAvailableFormatsMock, | ||
| readBuffer: clipboardReadBufferMock, | ||
| has: () => false | ||
| }, | ||
| writeClipboardBuffer: clipboardWriteBufferMock | ||
| })) |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
🔎 Supported by static analysis
-
🏁 Script executed:
sed -n '1,145p' src/main/window/clipboard-ipc-handlers.test.ts rg -n 'writeImage|WriteImage|writeClipboardPng|clipboardWriteImageMock|clipboardWritePngMock' src/main/window/clipboard-ipc-handlers.test.ts src/main/window/clipboard-ipc-handlers.ts sed -n '245,285p' src/main/window/clipboard-ipc-handlers.ts
Repository: stablyai/orca
Length of output: 7682
Retarget the untrusted and oversized writeImage tests to writeClipboardPng.
clipboard:writeImage now writes through writeClipboardPng from ./clipboard-formats, not clipboard.writeImage. The not.toHaveBeenCalled() assertions on clipboardWriteImageMock at lines 297, 710, and 725 cannot fail, so they do not detect an image write. The clipboard-formats mock also omits writeClipboardPng. Any future test that reaches the write call will fail with a Vitest missing-export error.
Proposed mock and hoisted-variable changes
-
const { removeHandlerMock, ... clipboardWriteImageMock, clipboardWriteBufferMock, + clipboardWritePngMock, nativeImageCreateFromBufferMock, ... } = vi.hoisted(() => ({ ... clipboardWriteImageMock: vi.fn(), clipboardWriteBufferMock: vi.fn(), + clipboardWritePngMock: vi.fn(), nativeImageCreateFromBufferMock: vi.fn(), ... }))vi.mock('./clipboard-formats', () => ({ clipboardFormatReader: { availableFormats: clipboardAvailableFormatsMock, readBuffer: clipboardReadBufferMock, has: () => false }, - writeClipboardBuffer: clipboardWriteBufferMock + writeClipboardBuffer: clipboardWriteBufferMock, + writeClipboardPng: clipboardWritePngMock }))
Then make these test-level changes:
- Reset
clipboardWritePngMockin the samebeforeEachblock that resetsclipboardWriteImageMock(line 222). - In the untrusted-sender test (line 297) and both oversized-image tests (lines 710 and 725), assert against
clipboardWritePngMockinstead ofclipboardWriteImageMock. - Add
awaitbefore theclipboard:writeImagehandler calls at lines 707 and 722, because the handler is async.
| if (!deps.isWayland()) { | ||
| await deps.write(safeText, kind) | ||
| return | ||
| } |
There was a problem hiding this comment.
🩺 Stability & Availability | 🟡 Minor | ⚡ Quick win
🔎 Supported by static analysis
-
🏁 Script executed:
#!/bin/bash # Find renderer/main callers that can issue many clipboard text writes quickly. rg -nP --type=ts -C3 "writeClipboardText|clipboard:writeTerminalText|clipboard:writeText|copyOnSelect|copy-on-select" src -g '!**/*.test.ts'
Repository: stablyai/orca
Length of output: 45667
🏁 Script executed:
cat -n src/main/window/clipboard-text-publisher.ts rg -n -F -e 'MAX_PENDING_CLIPBOARD_WRITES' -e 'Too many pending clipboard writes' -e 'pendingCodeUnits' -e 'code-unit' src/main || test "$?" -eq 1 rg -l -F -e 'MAX_PENDING_CLIPBOARD_WRITES' -e 'Too many pending clipboard writes' src || test "$?" -eq 1
Repository: stablyai/orca
Length of output: 7915
🏁 Script executed:
rg -n -F -e 'publishClipboardText' -e 'writeCoalesced' src/main src/shared || test "$?" -eq 1 sed -n '88,140p' src/shared/osc52-clipboard.ts
Repository: stablyai/orca
Length of output: 3678
Non-Wayland clipboard writes now share the 32-write cap, and OSC 52 bursts can reach it.
Before this change, non-Wayland writes ran immediately. Now each accepted call counts against MAX_PENDING_CLIPBOARD_WRITES (32) until its write completes. Calls beyond that limit reject with Too many pending clipboard writes. When terminal OSC 52 clipboard writes are enabled, the OSC 52 handler can reach this limit. writeCoalesced starts one write per microtask flush and does not wait for the previous write to settle. If the PTY stream sends OSC 52 sequences faster than the IPC and clipboard writes complete, pending writes build up and some are rejected. A rejected write shows the failure toast and is dropped. If the last payload is dropped, the clipboard keeps an earlier value.
Other write callers found in the inspected source are single user actions, so the OSC 52 path is the main burst source.
Fix direction: limit writeCoalesced to one write in flight per handler. Keep pendingText while the previous writeClipboardText promise is unresolved. When that promise settles, flush the latest value.
Ports #32176 onto current main and pins Electron 45.3.2. Moves every clipboard caller to the async ClipboardItem API, including the saved-password copy whose delayed clipboard wipe would otherwise never run. Co-authored-by: Neil <[email protected]>
Ports #32176 onto current main and pins Electron 45.3.2. Moves every clipboard caller to the async ClipboardItem API, including the saved-password copy whose delayed clipboard wipe would otherwise never run. Co-authored-by: Neil <[email protected]>
Ports #32176 onto current main and pins Electron 45.3.2. Moves every clipboard caller to the async ClipboardItem API, including the saved-password copy whose delayed clipboard wipe would otherwise never run. Co-authored-by: Neil <[email protected]>
Ports #32176 onto current main and pins Electron 45.3.2. Moves every clipboard caller to the async ClipboardItem API, including the saved-password copy whose delayed clipboard wipe would otherwise never run. Co-authored-by: Neil <[email protected]>
…Is (#43018) * Upgrade to Electron 45 and adapt clipboard, preload, and packaging APIs Ports #32176 onto current main and pins Electron 45.3.2. Moves every clipboard caller to the async ClipboardItem API, including the saved-password copy whose delayed clipboard wipe would otherwise never run. Co-authored-by: Neil <[email protected]> * fix(deps): update node-abi to 4.40.0 so native rebuilds recognize Electron 45 node-abi 4.33.0 predates Electron 45, so CI native rebuilds failed with "Could not detect abi for version 45.3.2". 4.40.0 maps Electron 45 to ABI 150. * fix(clipboard): await the clipboard read before wiping a copied secret Electron 45's clipboard.readText() returns a Promise, so comparing it to the copied secret was always false and the webhook key was never wiped. * docs(electron): record the 45.3.3 pin and its Node 24.22.3 security release * fix(electron-45): adapt to main's newer clipboard handlers, tests and startup layout - Keep clipboard:writeImage synchronous like main so refusals still throw before decoding. - Fall back to Explorer's FileNameW when a Windows URI list yields no paths. - Point the clipboard handler tests at Orca's async clipboard modules. - Move the background client-certificate guard into network-compatibility setup; main's ready-foundation file is at its line limit. - Move the Electron runtime E2E spec beside the desktop fixtures. * fix(browser): drop the embedded-browser prompt() shim that Electron 45 blocks Electron 45 installs its throwing window.prompt natively in every frame, so the about:blank iframe workaround now throws too. prompt() returns to Electron's deliberate 'not supported' behavior; alert() and confirm() still reach Orca's dialog. * chore(deps): pin Electron 45.4.1 for upstream Chromium security backports 45.4.1 carries 83 upstream ANGLE/Chromium/Dawn/FFmpeg/PDFium/V8 security cherry-picks over 45.3.3. Same Chromium 156.0.8078.100, Node 24.22.3 and ABI 150. Verified against the GitHub release file-for-file and against npm's checksums. * fix(clipboard): address review findings on the Electron 45 port - Reject Windows device and pipe paths from text/uri-list, as the FileNameW path already does. - A newer copied secret now supersedes a clipboard read already in flight. - Docs: Electron 45 rejects decryptStringAsync when the key provider is temporarily unavailable; CVE-2026-123864 and CVE-2026-123872 are server-side. --------- Co-authored-by: Neil <[email protected]>
ELI5
Upgrade Orca's desktop engine from Electron 43.7.8 to 45.0.0, adapting clipboard and dictation code so existing workflows keep working. macOS now requires Ventura (13) or newer.
What Changed
ClipboardItem/Bloboperations, including Linux selection, images, copied-file lists, and write verification. Preserve sender checks, bounded reads, image limits, platform fallbacks, and remote attachment routing.Bufferglobal with a byte view for dictation audio.Why
Electron 44 removed synchronous/raw clipboard helpers; Electron 45 removed Node globals from sandboxed preloads. A dependency-only bump would break copy/paste and dictation. The review also evaluates new features against Orca's existing ownership, security, and cross-platform constraints.
Synchronous safeStorage still works in 45 but is removed in 46. Its shared secret-store contract needs a separate migration covering old ciphertext, temporary keychain unavailability, headless hosts, concurrent persistence, and mixed client/server versions. The reference review records that requirement; do not upgrade to 46 first. Experimental Prompt API, static protocol sources, passkeys, and spare renderers remain separate decisions.
Linked Issue
Maintainer-requested upgrade; no existing issue supplied.
Visual Proof
N/A — no intended appearance or interaction redesign. The upgrade preserves existing clipboard, browser, terminal, and dictation workflows. A hidden-renderer startup screenshot was inspected locally, and browser/terminal behavior is exercised by Electron tests.
Testing
Local platform: macOS arm64. All app/test launches use
ORCA_BACKGROUND_LAUNCH=1, hidden renderers, and isolated profiles. No microphone recording or developer clipboard writes in the executed tests.pnpm tc: all four projects pass.git diff --checkpass.Windows/Linux native behavior and signed packaged/ASAR builds remain for their platform CI lanes; local macOS source tests do not establish WER loading, Explorer paste, Wayland/X11, GPU, native prompts, or updater compatibility.
Review
Self-reviewed sender authorization before asynchronous access, allocation/dimension limits, URI/path handling, write serialization and failures, certificate authority, WER naming, and compatibility of unchanged IPC contracts with remote/mobile clients and folder workspaces.
Agent skill upstream boundary
Checklist