Skip to content

fix: clipboard failure diagnosis and bounded helper execution - #894

Merged
justrach merged 5 commits into
release/v0.0.298from
fix/clipboard-paste-883
Sep 14, 2026
Merged

fix: clipboard failure diagnosis and bounded helper execution#894
justrach merged 5 commits into
release/v0.0.298from
fix/clipboard-paste-883

Conversation

@yxlyx

@yxlyx yxlyx commented Sep 14, 2026

Copy link
Copy Markdown
Collaborator

What changed

  • Distinguish clipboard helper launch failures, timeouts, explicit denial, clipboard changes, and export/conversion failures. Replace unsupported Automation advice with retry and existing paste alternatives.
  • Discard stale output before retrying a changed clipboard.
  • Keep subprocess deadlines and cancellation active after output EOF, and remove overlapping cleanup of captured stdout.
  • Add named-pasteboard, injected failure, subprocess, and headless Ctrl-V regressions.

Why

A generic helper failure was treated as proof that Automation permission was missing. The existing exporter already reads AppKit directly without scripting another application, so retain that path rather than adding another helper or asking for unrelated permissions. Ctrl-V and /paste remain image operations; normal terminal text paste is unchanged.

The subprocess fixes address failures found while testing the clipboard helper: closing output pipes bypassed the deadline, and an allocation failure could free captured output twice. Failure fixtures use private temporary directories, and native image fixtures use named pasteboards rather than the general clipboard.

Verification

  • scripts/eval-tier1.sh — passed, including build, unit/TUI suites, terminal probes, reachability, source-size, invariants, and SDK drift checks.
  • zig build test -Dtest-filter=clipboard -Dtest-filter=pasteboard -Dtest-filter='#883' --summary all — passed.
  • git diff --check — passed.
  • Branch CI on 3d4e852d713811464f631a3851b30f27db888c9b — Windows, Linux Zig, and SDK jobs passed.

Fixes #883.
Fixes #891.

justrach and others added 5 commits September 13, 2026 08:35
Keep direct AppKit extraction while separating helper launch, timeout, denial, clipboard churn, and export failures. Generic failures must not recommend Automation permission. Discard stale retry output and retain actionable paste alternatives.

Keep subprocess deadlines active after pipe EOF and avoid overlapping cleanup of captured stdout. Add named-pasteboard, injected failure, runner, and headless paste regressions.

Fixes #883. Fixes #891.
Inject an owned destination into the existing extraction loop so failure and cleanup tests use a private temporary directory on every platform. The live macOS path still chooses its randomized scratch filename.
@justrach
justrach changed the base branch from main to release/v0.0.298 September 14, 2026 11:47
@justrach
justrach merged commit d67ae7a into release/v0.0.298 Sep 14, 2026
10 of 11 checks passed
@justrach
justrach deleted the fix/clipboard-paste-883 branch September 14, 2026 12:06
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.

Capped subprocess waits lose deadlines after output EOF Clipboard paste fails with osascript Automation permission error

2 participants