Finish file operations: copy, batch rename, duplicate detection #45
Loading…
Reference in a new issue
No description provided.
Delete branch "file-ops-copy-batch-dup"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Completes the File operations roadmap item (Phase 1) — the remaining pieces on top of the existing rename/move/trash.
Copy
copy_assetcommand + Copy to… in the asset context menu (single and multi-select). The original is untouched; if the copy lands inside a library root the watcher indexes it. Undo trashes the copy by path via a newtrash_filecommand.Batch rename
{name},{ext},{index}(default{name}.{ext}). Confirm is gated until the batch is collision-free.rename_assetscommand: two-phase temp renames on disk and in the DB, so cyclica↔bswaps and{index}renumbers don't trip theUNIQUE(root_id, relative_path)constraint. Two new Rust tests cover the swap and the rejected-collision cases.Duplicate detection
find_duplicatesgroups byte-identical assets bycontent_hash(already stamped at index time, so no extra hashing pass), ordered by reclaimable space.Ctrl+K → "Duplicates". Each group shows copies × size each + total reclaimable; per-copy open / open-folder / trash, with a one-shot Undo for the last trash.Also
Verification
cargo check+clippyclean; 130 backend tests pass (incl. 2 new batch-rename tests)tsc+ biome cleanmake dev