Commit Graph

30 Commits

Author SHA1 Message Date
LyAhn f82002129a fix: address four correctness bugs in duplicate detection and tagging
- Duplicate scanner now runs a full-file hash pass (Phase 3) for large
  files (> 64 KB) after the sample-hash shortlist, preventing false
  positives from reaching the destructive deletion workflow
- delete_images_from_disk now attempts filesystem removal before touching
  the DB; only successfully deleted files have their rows removed,
  keeping locked/permission-denied files visible in the library
- AI tag upsert guards user-sourced rows with WHERE source != 'user' so
  a tagger re-run cannot silently overwrite manually added tags
- clear_tagging_jobs excludes 'cancelled' rows from the immediate DELETE
  so the worker can observe cancellation via is_tagging_job_cancelled
  before the rows are cleaned up at next startup
2026-06-06 21:50:53 +01:00
LyAhn c1070649fa feat(notifications): report completed background tasks
Register the Tauri notification plugin and request notification permission during startup. Send completion notifications for folder scans, embeddings, AI tagging, and duplicate scans, including failure counts where available.
2026-06-06 19:52:24 +01:00
LyAhn 2cdab000fb feat(discovery): surface all tags and guard folder removal
Include tags used by a single image in Explore and invalidate the tag cache after edits so changes appear immediately. Add an accessible, time-limited confirmation step before removing indexed folders from the sidebar.
2026-06-06 19:52:05 +01:00
LyAhn 6824dcffb3 fix(indexer): recover cleanly from indexing failures
Move sqlite-vec embedding deletions outside the image transaction to avoid transactional virtual-table failures. Emit a terminal indexing progress event on errors so the frontend reloads partial state and clears its active scan state.
2026-06-06 19:51:44 +01:00
LyAhn d7595703de docs: rewrite README to reflect current features, add CLAUDE.md 2026-06-02 19:40:00 +01:00
LyAhn 5b35bc5b6e chore: set app title to Phokus, remove default Vite favicon 2026-06-02 19:39:44 +01:00
LyAhn df17497808 feat: add region-based similarity search
Adds a "Search within image" button to the lightbox that lets the user
draw a crop region on an image and find visually similar results using
that crop's embedding. The crop is embedded in-memory without a temp
file via a new embed_image_crop method on ClipImageEmbedder.

Introduces a folder-scoped cosine search (search_image_ids_by_embedding_in_folder)
to support the current-folder scope option, and wires up the new
find_similar_by_region Tauri command end-to-end from Rust through to
the Zustand store and Lightbox UI.
2026-06-02 19:39:31 +01:00
LyAhn ff4a568b57 feat: expand media exploration and tagging controls 2026-04-12 12:18:47 +01:00
LyAhn b2826d1143 feat: add WD tagger with CSV tag support and model download via ureq/zip
Introduces tagger.rs for WD-based image tagging with CSV label support.
Adds csv, ureq, and zip dependencies; updates gitignore to exclude Python/JSON files.
2026-04-08 20:04:37 +01:00
LyAhn f93a80bc87 fix: refresh lightbox tags live after AI tagging, hide AI tags button for video 2026-04-08 17:15:44 +01:00
LyAhn a9dd2b2797 feat: add WD tagger, remove caption UI, add per-image tag queuing in lightbox
- Add WD SwinV2 tagger v3 backend (tagger.rs) with DirectML acceleration
- Expose tagger commands (model status, download, queue, tags CRUD)
- Add queueTaggingForImage store action and AI tags button in lightbox sidebar
- Remove all caption UI surfaces (Lightbox, BackgroundTasks, SettingsModal)
- Disable caption worker in lib.rs; keep Rust backend intact for future use
- Make lightbox sidebar scrollable with sticky header/footer
- Collapse long tag lists (show 8, expandable) in lightbox sidebar
2026-04-08 16:33:14 +01:00
LyAhn bee6adc61a feat: add local AI captions and queue controls 2026-04-07 06:11:01 +01:00
LyAhn 8905baf4a5 Merge pull request #7 from JezzWTF/feat/custom-titlebar
feat: custom TitleBar with window controls (no native decorations)
2026-04-06 21:02:45 +01:00
LyAhn d0b41119c6 Surface failed embeddings and add filter for affected files
- Fix root cause: embedding_source_path() returns Result<PathBuf>, returning
  Err for videos without a thumbnail instead of silently falling back to the
  raw .mp4 path that CLIP cannot decode
- indexer: split embedding batch into pre-failed (no source) and embeddable
  jobs; pre-failed are marked immediately without hitting the CLIP model
- db: retry_failed_embedding_jobs skips videos still without a thumbnail so
  they no longer re-fail immediately on retry
- Add get_failed_embedding_images command listing failed files + error per folder
- Gallery: amber warning badge on tiles with embedding_status = 'failed'
- BackgroundTasks: fetch and show failed filenames/errors in expanded panel
- Toolbar: conditional 'Failed Embeddings' amber filter pill shown when any
  folder has embedding_failed > 0; filters at DB level via new
  embedding_failed_only param on get_images / count_images
- TagCloud: replaced vocabulary/dictionary label system with representative
  image thumbnails per cluster; results cached in SQLite by image-id hash
2026-04-06 16:54:03 +01:00
LyAhn ce5c3d0033 fix: add data-tauri-drag-region attribute alongside WebkitAppRegion CSS 2026-04-06 15:01:15 +01:00
LyAhn ab8fba2e3f fix: remove unused window permissions (allow-maximize, allow-unmaximize, allow-start-dragging) 2026-04-06 15:00:52 +01:00
LyAhn 2807240fab feat: integrate TitleBar into App layout 2026-04-06 14:08:21 +01:00
LyAhn 7779fe0696 feat: add custom TitleBar component with window controls 2026-04-06 14:05:45 +01:00
LyAhn aed8fcfd67 feat: add window management permissions for custom titlebar 2026-04-06 14:05:19 +01:00
LyAhn 53f21580a2 feat: disable native decorations for custom titlebar 2026-04-06 14:05:07 +01:00
LyAhn 6c3fd449ce Add tag cloud feature with k-means clustering and CUDA support
Introduces an Explore view with a tag cloud that clusters image embeddings
using cosine k-means and labels clusters via vocabulary-nearest-neighbour
CLIP matching. Vocabulary embeddings are disk-cached (FNV hash-keyed) to
avoid redundant inference. Enables CUDA for candle dependencies and adds a
build.rs check that surfaces a clear error when the toolkit is missing.
2026-04-06 12:43:44 +01:00
LyAhn 35c1dafd65 Ignore local patch artifacts
- ignore local .diff and .patch files
- ignore the local /staging workspace directory
2026-04-06 02:28:52 +01:00
LyAhn da9a20f8f7 Refine semantic search and CPU fallback
- make Candle CUDA support opt-in so default builds work on CPU-only machines
- improve semantic search loading and empty states in the gallery
- keep semantic search UX clearer when no matches are found

Refs: #4
2026-04-06 02:26:43 +01:00
LyAhn c6a66d1ba9 Polish search and embedding UX
- add semantic text search with toolbar mode switching and sqlite-vec query support
- improve embedding progress visibility, failure recovery, and similar-image affordances
- add search clearing and keyboard controls for filename vs semantic search modes
- refine background task interactions and gallery/lightbox embedding states

Refs: #4
2026-04-06 01:45:25 +01:00
LyAhn 51e4c2c1f7 Add CLIP embeddings and similar-image search
- add Candle + HF Hub CLIP image embedding pipeline with background embedding worker
- write image embeddings into sqlite-vec and expose similar-image lookup through a new backend command
- surface embedding progress and recovery in the UI, including retries for failed embeddings
- improve gallery/lightbox embedding UX and make similar-image actions directly accessible

Refs: #3, #4
2026-04-06 00:54:14 +01:00
LyAhn 76ec424167 Optimize thumbnail workers and adaptive indexing 2026-04-05 20:36:11 +01:00
LyAhn 8b391059ba Add project roadmap 2026-04-05 19:12:48 +01:00
LyAhn c4036140e6 Improve media indexing and processing flow 2026-04-05 18:59:17 +01:00
LyAhn c299c7d452 Improve indexing updates and thumbnail streaming 2026-04-05 16:52:31 +01:00
LyAhn c5e9c83ac9 Initial commit — Tauri image gallery with sqlite-vec
Sets up Tauri v2 + React frontend with SQLite metadata store,
sqlite-vec for CLIP embedding infrastructure, and r2d2 connection
pool replacing the single Arc<Mutex<Connection>>. Indexer now uses
rayon for parallel file metadata collection.
2026-04-05 15:59:48 +01:00