Capture oversized screenshots instead of dropping them.
Retina clipboard images over the RGBA size cap were silently skipped; downscale and store a thumbnail so they still appear in history, with regression tests.
This commit is contained in:
+9
-4
@@ -16,14 +16,14 @@ maCopy has an automated suite. There is no separate “live” Storybook/UI docs
|
||||
| `npm run lint` | TypeScript `tsc --noEmit` |
|
||||
| `npm run check` | Lint + all tests (CI-style gate) |
|
||||
|
||||
Current counts (approx.): **~60 frontend** + **~52 Rust** unit tests.
|
||||
Current counts (approx.): **~60 frontend** + **~65 Rust** unit tests.
|
||||
|
||||
## What is covered
|
||||
|
||||
### Frontend (`src/**/*.test.tsx`, `transforms.test.ts`)
|
||||
|
||||
- App: load entries, paste invoke, delete via keyboard
|
||||
- ClipboardList: selection, multi-select modifiers, image stubs/thumbs, Alt=plain paste
|
||||
- ClipboardList: selection, multi-select modifiers, image stubs/thumbs (including truncated thumb previews), Alt=plain paste
|
||||
- ContextMenu: Paste / Paste plain / transforms / Pin / Delete
|
||||
- SettingsPanel: toggles, history limit, hotkey recorder, **Launch at login → autostart enable**
|
||||
- SearchBar basics
|
||||
@@ -34,18 +34,23 @@ Tauri APIs are mocked in `src/test/setup.ts` (invoke, window, events, clipboard,
|
||||
### Backend (`src-tauri/src/**` `#[cfg(test)]`)
|
||||
|
||||
- SQLite CRUD, FTS5, trim + pin preservation, settings
|
||||
- List previews: truncate text, omit image blobs, return thumbnails
|
||||
- List previews: truncate text, omit image blobs, return thumbnails (including stub `[image WxH]` rows)
|
||||
- Search excludes image rows (text-only FTS)
|
||||
- Sensitive redaction (card / password / banking) while `get_entry` stays full
|
||||
- Hotkey parser (`cmd+\`` etc.)
|
||||
- Image thumbnail / PNG helpers
|
||||
- Image thumbnail / PNG helpers + `fit_rgba_under_bytes` against production `MAX_IMAGE_BYTES`
|
||||
- **Oversized / Retina screenshot prepare** — never skip; downscale + thumb + DB list preview
|
||||
- Clipboard content hashing fingerprints
|
||||
|
||||
## What is *not* covered (yet)
|
||||
|
||||
- End-to-end UI on a real Mac (no Playwright against the Tauri window)
|
||||
- Live pasteboard polling (requires macOS Accessibility / real `NSPasteboard`)
|
||||
- Accessibility permission / AppleScript paste in CI
|
||||
- Notarized release smoke tests
|
||||
- Performance benchmarks in CI
|
||||
- Prefer-image-when-text-also-present (poller text-wins path)
|
||||
- Exclude-apps / pause-monitoring integration
|
||||
|
||||
## Recommended workflow
|
||||
|
||||
|
||||
Reference in New Issue
Block a user