LightCraft: An open-source non-destructive photo editor written by scratch in pure Rust
PR218: document optional-data and recovery warnings
Adrian D'souzab4a1166f4ba9
diff --git a/docs/lightroom-catalog-import.md b/docs/lightroom-catalog-import.mdindex 694441aa1..d3d1940e9 100644--- a/docs/lightroom-catalog-import.md+++ b/docs/lightroom-catalog-import.md@@ -16,27 +16,33 @@ hierarchical keywords, regular collections/collection sets, virtual copies and msettings are imported. Missing originals remain catalogued for relinking. Existing LightCraftedits are preserved by default; `updateExisting=true` explicitly replaces them. Persistent importidentity prevents reimport from duplicating virtual copies and collections. One undo step reverses-catalog changes; recovery archives remain available.--Before changing records, source image records, decoded XMP, verbatim develop settings, history,-snapshots and collection content are saved to compressed `Interop/lightroom-import-N.lca` archives-in the LightCraft library. Unchanged source data reuses its existing archive. Opaque SQL BLOBs are-skipped; decoded XMP and structured recovery data remain. Each archive is capped at 32 MiB-(uncompressed and on disk), with at most eight archives and 128 MiB total retained. Oldest managed-archives are retired; legacy `.json` archives remain untouched. `Interop/lightroom-index.json` records imported identities. Source catalogs and originals-are never overwritten. Native import is bounded to a 1 GiB database/WAL, 16 MiB XMP packets and-one million rows per table. The in-tree, read-only Rust SQLite B-tree reader follows SQLite’s public file-format specification;-it introduces no dependency or C runtime. Table payloads are capped at 256 MiB. Unsupported-WITHOUT ROWID and virtual tables produce explicit errors.+catalog changes; any saved recovery archives remain available.++Before changing records, the importer attempts to save source image records, decoded XMP,+verbatim develop settings, history, snapshots and collection content to compressed+`Interop/lightroom-import-N.lca` recovery archives in the LightCraft library. Archiving is+best-effort: a size limit or write failure produces a warning and does not prevent photo import.+Unchanged source data reuses its existing archive. Opaque SQL BLOBs are skipped. Each archive is+capped at 32 MiB (uncompressed and on disk), with at most eight archives and 128 MiB total+retained. Oldest managed archives are retired; legacy `.json` archives remain untouched.+`Interop/lightroom-index.json` records imported identities. Source catalogs and originals are+never overwritten.++Native import is bounded to a 1 GiB database/WAL, 16 MiB XMP packets and one million rows per+table. The in-tree, read-only Rust SQLite B-tree reader follows SQLite’s public file-format+specification; it introduces no dependency or C runtime. Table payloads are capped at 256 MiB.+Optional history, keyword and collection tables that exceed limits are skipped with warnings;+required photo tables still report errors. Unrelated unsupported schemas are ignored. A needed+WITHOUT ROWID or virtual table produces an explicit error, handled as a warning when optional.Develop settings reuse the existing XMP/preset mapper. Supported sliders, curves and supportedmask structures remain editable, but this is approximate rendering: camera profiles, Adobe AImodels, some masking/retouch fields and process-version algorithms are not reproduced. Unmapped-fields are reported; source settings/history/snapshots are archived rather than discarded. Smart-collections become regular albums with current membership; their original rules remain archived.-History and snapshots are retained as source data, not exposed as native LightCraft history yet.+fields are reported. When a recovery archive is saved, it retains source settings/history/snapshots+and original smart-collection rules. Smart collections become regular albums with current+membership. Archived history and snapshots are source data, not native LightCraft history yet.Lightroom's `-999999` deferred-adjustment sentinel is omitted from both catalog and XMP mappings;-it is reported and archived, never clamped into a real slider value. Deferred Adobe Auto Tone+it is reported, included in any saved archive, and never clamped into a real slider value. Deferred Adobe Auto Toneis not evaluated by the importer; LightCraft's Auto control remains available after migration.Native desktop inspection/import runs on a cancellable background worker with progress. Onlydiff --git a/docs/parity.md b/docs/parity.mdindex 1ea2d967f..0212a6816 100644--- a/docs/parity.md+++ b/docs/parity.md@@ -716,7 +716,7 @@ From `08-lightroom-classic-extras.md` (Classic-only features) and part 2 of `06-| LRC-LIB-SURVEY | Survey view | P2 | ✅ | `cmd:view.survey` | N || LRC-LIB-REFVIEW | Reference view | P2 | ✅ | `cmd:view.reference`, `cmd:photo.setReference`, `crates/ui-egui/src/panels/compare.rs` (`show_reference`) | View ▸ Reference View (⇧R): the reference photo beside the active one (edited with the Edit panel); photo menu ▸ Set as Reference Photo || LRC-LIB-CATALOG-PANEL | Catalog sets | P1 | ✅ | `cmd:library.source` (`missing`) | all, recently added, picks, recently deleted, missing photos (when any) |-| LRC-LIB-CATALOG-IMPORT | Native Lightroom Classic catalog import | P1 | 🟡 | `cmd:library.inspectLightroom`, `cmd:library.importLightroom`, `crates/engine/src/lightroom_catalog.rs`, `docs/lightroom-catalog-import.md` | read-only `.lrcat` plus committed WAL pages, in-tree read-only Rust SQLite B-tree reader; background inspection/import with progress/cancellation, per-open library identity checks; originals in place, ratings/flags/labels, XMP, hierarchical keywords, collection sets/regular collections, virtual copies, mapped develop settings; stable reimport identities, undo, missing-file placeholders, existing edits preserved. Settings/history/snapshots/collection rules retained in deduplicated compressed archives (32 MiB each, eight archives/128 MiB aggregate); opaque SQL BLOBs skipped. Adobe rendering, AI data and native history replay remain incomplete; no writes to Lightroom catalogs |+| LRC-LIB-CATALOG-IMPORT | Native Lightroom Classic catalog import | P1 | 🟡 | `cmd:library.inspectLightroom`, `cmd:library.importLightroom`, `crates/engine/src/lightroom_catalog.rs`, `docs/lightroom-catalog-import.md` | read-only `.lrcat` plus committed WAL pages, in-tree read-only Rust SQLite B-tree reader; background inspection/import with progress/cancellation, per-open library identity checks; originals in place, ratings/flags/labels, XMP, hierarchical keywords, collection sets/regular collections, virtual copies, mapped develop settings; stable reimport identities, undo, missing-file placeholders, existing edits preserved. Best-effort deduplicated recovery archives retain settings/history/snapshots/collection rules (32 MiB each, eight archives/128 MiB aggregate); archive limits/write failures and optional-table limits warn without blocking photo import; unrelated unsupported tables and opaque SQL BLOBs skipped. Adobe rendering, AI data and native history replay remain incomplete; no writes to Lightroom catalogs || LRC-LIB-CATALOG-LOCK | Catalog open in one program at a time | P1 | ✅ | `cmd:app.openLibrary`, `crates/catalog/src/lock.rs`, `crates/engine/src/library.rs` (`open_library`) | exclusive OS lock on `catalog.lock` for the session (app and `lightcraft-cli --library`); a second opener is refused with who has it (`catalog.lock.owner`: program, process, computer); released by the OS on a crash, so never stale; file systems without locks open unprotected with a warning; no read-only mode; the browser build (OPFS) has no guard across tabs yet. A library that can't be opened at launch (locked, unreadable, newer format, drive missing) shows a window — Try Again, Choose Another Library…, Continue Without Saving (then a banner; nothing written), Quit — instead of a silent demo session (`crates/ui-egui/src/panels/library_problem.rs`) || LRC-LIB-FOLDERS | Disk folder tree | P1 | ✅ | `cmd:library.browse`, `cmd:folder.rename`, `cmd:folder.move`, `crates/ui-egui/src/panels/left.rs` (`local_section`, `folder_tree`) | standard places + the browsed folder + Browse Folder…, each an expandable tree of subfolders, breadcrumb navigation; context menu: Rename Folder…, Move Folder To…, Show in Finder (on disk, photos relinked; one undo step each: undo / redo move the folder back and forth, refused when the destination is taken) || LRC-LIB-COLLECTIONS | Collections & sets | P1 | ✅ | `cmd:album.create`, `cmd:album.createSmart`, `cmd:album.toggleTarget`, `cmd:album.setTarget`, `cmd:album.clearQuick` | albums + folders (sets), smart albums (rule editor; rules incl. File Path — the whole string, either separator, case-insensitive), Quick Collection and target album (B in the grids adds / removes the selection; album menu ▸ Set as Target Album; the target is marked +) |