mirror of
https://github.com/stablyai/orca.git
synced 2026-10-17 00:03:08 +00:00
Terminal copy paths (Ctrl+Shift+C, right-click, context-menu copy, copy-on-select, and OSC 52) wrote to the clipboard via window.api.ui.writeClipboardText but swallowed write failures and never checked that the OS clipboard actually changed. The main-process clipboard:writeText handler called clipboard.writeText() and returned without reading back, so a stale OS clipboard (Electron returns without throwing even when the write did not land, seen on Windows with Copilot conversation text) looked like success while the clipboard was unchanged. - clipboard-ipc-handlers.ts: after the existing trusted-sender auth and text-size-limit checks, write then read back the standard clipboard and throw on mismatch. The X11 PRIMARY "selection" clipboard is deliberately not verified, since ownership can pass to another app and a read-back would surface false failures on Linux primary-selection copies. - terminal-selection-copy.ts: shared helper so every renderer copy path propagates a write rejection instead of silently claiming success, and only clears the xterm selection after the write resolves. - osc52-clipboard.ts: add onWriteFailure so a TUI yank that never reaches the host clipboard surfaces a toast instead of a silent no-op. - osc52-clipboard-blocked-toast.ts: add showOsc52ClipboardFailedToast. Supersedes community PR #5634. Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>