Skip to content

feat(macos): deliver text via pbcopy and osascript System Events - #69

Merged
ElbertePlinio merged 1 commit into
mainfrom
feat/macos-delivery
Jul 24, 2026
Merged

ElbertePlinio merged 1 commit into
mainfrom
feat/macos-delivery

Conversation

@ElbertePlinio

Copy link
Copy Markdown
Member

PR 3 of #66.

  • macOS branches in the existing DeliveryRuntime/ProcessRuntime seam: clipboard via pbcopy, paste chord + typing via osascript (System Events); Linux paths byte-identical, zero new engine-crate dependencies
  • Chord mapping: CtrlV → ⌘V, CtrlShiftV → ⌘⇧V; AppleScript escaping pinned by tests (quotes, backslashes, multi-line via keystroke return)
  • Accessibility-denied osascript failures map to an actionable System Settings message
  • AXIsProcessTrusted probe (new src-tauri/src/macos.rs) powers a platform-aware doctor: pbcopy + Accessibility state on macOS, unchanged ydotool/wl-copy checks on Linux, now shown pre-early-return
  • "Paste automation" blocker removed from macOS platform support (dictation_supported still false until the loop is proven)

Design deviation from the #66 plan text (Tauri clipboard plugin → pbcopy/osascript) recorded on the issue.

Validated on macOS hardware: 130 engine + 47 shell tests, clippy -D warnings clean; live pbcopy→pbpaste round-trip through the real ProcessRuntime path (kept as an #[ignore]d regression test). osascript keystroke synthesis deliberately not fired live (would type into the active session) — covered by unit tests; the full-loop E2E lands with PR 5.

🤖 Generated with Claude Code

Adds macOS text delivery to the engine's ProcessRuntime seam: pbcopy
for clipboard copy, osascript keystroke synthesis for hotkey paste
(command-V / command-shift-V) and typing, with Accessibility-denied
failures mapped to an actionable System Settings message. Auto
delivery resolves to the hotkey path on macOS. No new engine-crate
dependencies; the Linux paths are unchanged.

Adds an AXIsProcessTrusted-backed accessibility_trusted() helper in
src-tauri and makes the doctor's Clipboard/Paste backend checks
platform-aware, running them for macOS ahead of the
dictation-supported early return. Removes the now-implemented "Paste
automation" release blocker from macOS platform support.
@ElbertePlinio
ElbertePlinio merged commit 5b91053 into main Jul 24, 2026
4 checks passed
@ElbertePlinio ElbertePlinio mentioned this pull request Jul 24, 2026
11 tasks done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant