Skip to content

feat: implement ⌃⌥⌘V clipboard capture with built-in pattern detection#8

Merged
easyvibecoding merged 1 commit intomainfrom
feat/clipboard-capture-hotkey
Mar 21, 2026
Merged

feat: implement ⌃⌥⌘V clipboard capture with built-in pattern detection#8
easyvibecoding merged 1 commit intomainfrom
feat/clipboard-capture-hotkey

Conversation

@easyvibecoding
Copy link
Copy Markdown
Owner

Summary

  • Wire up ⌃⌥⌘V hotkey to scan clipboard for API keys and store in vault
  • 22 built-in capture patterns for common platforms (OpenAI, Anthropic, GitHub, AWS, Google, Stripe, Slack, etc.)
  • 3-tier confidence routing: ≥0.7 auto-store, 0.35~0.7 confirmation dialog, <0.35 ignore
  • Whitespace/newline stripping for clipboard content (handles word-wrap and copy artifacts)
  • Floating NSAlert without dock icon for menu bar app

Test plan

  • swift build compiles successfully
  • swift test — 48 tests all pass
  • Manual: copy OpenAI key → ⌃⌥⌘V → key detected and stored
  • Manual: copy key with line breaks → correctly reassembled and detected
  • Manual: copy duplicate key → shows "Duplicate Key" alert
  • Manual: copy non-key text → shows "No Keys Found" alert

🤖 Generated with Claude Code

Wire up the ⌃⌥⌘V hotkey to scan clipboard content for API keys
and store them in the vault with confidence-based routing.

Core changes:
- AppState: wire onCaptureClipboard callback with 3-tier confidence
  routing (≥0.7 auto-store, 0.35~0.7 confirm dialog, <0.35 ignore)
- ClipboardEngine: add 22 built-in capture patterns for common API
  key formats (OpenAI, Anthropic, GitHub, AWS, Google, Stripe, etc.)
  separate from vault pattern cache
- ClipboardEngine: strip whitespace/newlines from clipboard content
  before matching to handle word-wrap and copy artifacts
- NSAlert floating window: use alert.layout() + window.level = .floating
  to show alerts above all windows without dock icon in menu bar app

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@easyvibecoding easyvibecoding merged commit 1c4a7f5 into main Mar 21, 2026
2 checks passed
@easyvibecoding easyvibecoding deleted the feat/clipboard-capture-hotkey branch March 21, 2026 10:21
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