4 Commits

Author SHA1 Message Date
11e91a4f36 Fix paste-to-app, settings highlight, and titleBarStyle casing
Paste fix:
- Switch from std::process::Command to tokio::process::Command to avoid
  blocking the async runtime (was stalling the paste action)
- Use explicit AppleScript that activates the frontmost app before sending
  Cmd+V keystroke, making paste more reliable
- Increase delay to 300ms for macOS app refocus
- Add tokio "process" feature

Settings highlight fix:
- SettingsPanel now uses local useState for immediate optimistic updates
  when clicking position/history buttons, instead of waiting for the
  parent prop round-trip
- Buttons highlight instantly on click, then sync with backend

Config fix:
- titleBarStyle must be PascalCase "Overlay" in Tauri 2 config (was
  lowercase "overlay" which caused a startup error)

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-12 14:28:08 -04:00
80a6c01cdb Fix cursor positioning, resize, and paste; add App tests and Cursor rules
- Use CoreGraphics (core-graphics crate) for global mouse position instead
  of Tauri's window-relative cursor_position() which fails when hidden
- Switch to titleBarStyle overlay with hiddenTitle for native resize handles
  while keeping the frameless look (decorations:false had no resize affordance)
- Fix paste_and_refocus: use .output() instead of .spawn() so osascript
  actually completes, increase delay to 250ms for reliable app refocus
- Add comprehensive App.test.tsx (7 integration tests) bringing total to 47
- Add multi-select and type badge tests for ClipboardList and ContextMenu
- Update Tauri mock in setup.ts with innerSize/scaleFactor for resize tests
- Create .cursor/rules/ with 4 rule files for project conventions
- Add npm run lint and npm run check scripts
- Update README with full usage table and current test counts (74 total)

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-12 14:15:42 -04:00
55ee81fc6d Multi-select, paste-to-app, resizable window, polished UI
- Max history default increased to 10K, options: 1K/5K/10K/50K
- Tray icon uses with_id to prevent duplicates on hot-reload
- Selecting an entry now pastes directly into the previous app
  via osascript Cmd+V simulation after hiding the window
- Multi-select: Ctrl+Click toggles, Shift+Arrow extends range,
  Cmd+A selects all, Enter pastes all selected
- Window is resizable, size persists in SQLite across opens
- Window position setting: cursor, center, or any screen corner
- UI cleanup: tighter spacing, cleaner dividers, compact search,
  type badges (TXT/IMG/FILE), PIN label, tabular timestamps
- Context menu shows multi-item labels ("Paste 3 items")
- All tests updated and passing (27 Rust + 33 TypeScript)

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-12 14:01:03 -04:00
b643f50d76 Initial commit: macOS clipboard manager menu bar app
Tauri 2 + React 18 + TypeScript + Tailwind CSS v4 + SQLite (rusqlite)

Features:
- Menu bar app with tray icon (no dock icon)
- Global hotkey Cmd+Shift+V
- Clipboard polling every 500ms (text, images, file paths)
- SQLite FTS5 full-text search
- Pin/unpin entries, auto-trim, context menu
- Settings panel (launch at login, show images, max history, clear all)
- Dark/light mode following macOS system preference
- Frameless floating window, closes on blur

Testing:
- 27 Rust unit tests (db, clipboard, FTS5, trim, settings)
- 31 TypeScript component tests (vitest + @testing-library/react)

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-12 12:55:56 -04:00