fix(cli): Windows final-mile cleanup — clipboard auto-clear + hook docs (closes #9, #10)#44
Merged
MasonStation merged 2 commits intomainfrom Apr 26, 2026
Merged
Conversation
Closes #9: replace the macOS-only `bash -c 'sleep && pbcopy'` shell-out in `phantom reveal --copy` with a self-respawn of `phantom __clear-clipboard-after`, a hidden subcommand that sleeps the requested seconds and clears the clipboard via arboard. Spawning a child rather than a thread preserves the original UX (parent exits immediately) and works on Windows where there's no bash. The new subcommand is hidden from --help. Closes #10: document the pre-commit hook caveat in the README's Windows section. The installed `#!/bin/sh` hook works under Git for Windows' bundled sh.exe (the standard installer); GUI clients with a stripped PATH may silently skip it. Recommends terminal commits or `phantom check --staged` as the workaround, and notes CI as the durable safety net regardless. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
Summary
Closes the two remaining functional issues on the Windows tracker (#1):
bash -c 'sleep && pbcopy'clipboard auto-clear with pure Rust #9 —phantom reveal --copyno longer shells out tobash -c 'sleep 30 && pbcopy'for the auto-clear. Replaced with a self-respawn of a hiddenphantom __clear-clipboard-after --secs Nsubcommand that sleeps and clears viaarboard. Cross-platform, no shell, preserves the immediate-exit UX of the original (a thread would die when the parent exits, and on macOS/Windows the clipboard persists past process exit — so a live process is needed).#!/bin/shhook works under Git for Windows' bundledsh.exe(the standard installer ships it). GUI clients with a strippedPATHmay silently skip it; recommends terminal commits orphantom check --staged, and notes CI as the durable safety net.After this lands, the only open child of #1 is the umbrella tracker itself — Windows is functionally complete.
Test plan
cargo build— cleancargo clippy --all-targets -- -D warnings— zero warningscargo fmt --check(on changed files) — cleancargo test --workspace— all pass except a pre-existing keychain-state-pollution flake unrelated to this changephantom __clear-clipboard-after --secs 1runs and exits 0phantom --helpdoes not list the hidden subcommandphantom reveal --copy SOME_KEYreturns the prompt immediately, clipboard clears 30s later (Windows + macOS)🤖 Generated with Claude Code