Windows: cross-platform clipboard + daemon spawn (#6, #7)#17
Merged
MasonStation merged 2 commits intomainfrom Apr 22, 2026
Merged
Windows: cross-platform clipboard + daemon spawn (#6, #7)#17MasonStation merged 2 commits intomainfrom
MasonStation merged 2 commits intomainfrom
Conversation
Replaces three platform-specific shell-outs (pbcopy/xclip/xsel) with a single arboard::Clipboard call. Adds Windows clipboard support as a side-effect — previously 'phantom reveal --copy' returned false on Windows and printed the secret to stdout instead. Uses default-features = false to skip arboard's image-data support (we only need text). Does not change the 30-second auto-clear behavior — that remains macOS-only via the bash+pbcopy hack and is tracked separately in #9 (cross-platform auto-clear needs a detached-process design rather than a thread, since threads die with the parent). Closes #6 Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Windows has no process_group() equivalent. Uses CommandExt::creation_flags with DETACHED_PROCESS (0x08) | CREATE_NO_WINDOW (0x08000000) so the proxy survives the parent exiting and runs without a console window. Unix behavior unchanged (still process_group(0)). PID file mechanics already work cross-platform — Windows allows the same atomic rename pattern used on Unix. The cfg(unix) block that sets 0o600 on the PID file remains Unix-only; a Windows ACL equivalent is a separate follow-up if needed. Closes #7 Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
This was referenced Apr 22, 2026
This was referenced Apr 22, 2026
Open
MasonStation
added a commit
that referenced
this pull request
Apr 22, 2026
First release with Windows support. - workspace version 0.4.0 -> 0.5.0 - npm/package.json 0.4.0 -> 0.5.0 - npm/bin/cli.js VERSION 0.4.0 -> 0.5.0 - Cargo.lock refreshed (captures arboard tree from #17 and patch bumps) Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Third slice of #1 (Windows support) — Tier 2A.
Summary
phantom reveal --copy#6): Replaces three platform-specific shell-outs (pbcopy/xclip/xsel) with a singlearboard::Clipboardcall. Adds Windows clipboard support as a side-effect — previously `phantom reveal --copy` failed on Windows and fell back to stdout.phantom start#7): Adds `cfg(windows)` branch to `phantom start --daemon` using `CommandExt::creation_flags` with `DETACHED_PROCESS | CREATE_NO_WINDOW`. Unix behavior unchanged.Deliberate scope
bash -c 'sleep && pbcopy'clipboard auto-clear with pure Rust #9 (cross-platform auto-clear) deferred. The 30-second clipboard auto-clear remains macOS-only via the existing `bash -c "sleep && pbcopy"` hack. Closing cli: replacebash -c 'sleep && pbcopy'clipboard auto-clear with pure Rust #9 properly needs a detached-process design (a `thread::spawn` thread dies with the parent), which is a larger change — reopening cli: replacebash -c 'sleep && pbcopy'clipboard auto-clear with pure Rust #9 with that context as a focused follow-up.Test plan
Closes #6
Closes #7