From ad0b27c036d8e7511d900d48ddca4539c5ec8406 Mon Sep 17 00:00:00 2001 From: skybluu <12523559+skybluu@users.noreply.github.com> Date: Sun, 11 Oct 2026 21:09:03 -0500 Subject: [PATCH] LRC-LIB-REFVIEW: fix Escape and catalog-local reference pins --- crates/ui-egui/src/menus.rs | 12 +++-- crates/ui-egui/src/panels/compare.rs | 2 +- crates/ui-egui/src/panels/settings.rs | 18 ++++++- crates/ui-egui/src/tests_compare.rs | 61 ++++++++++++++++++++++ crates/ui-egui/src/tests_preview_limit.rs | 9 +--- crates/ui-egui/src/tests_switch_library.rs | 32 ++++++++++++ docs/parity-checklist.md | 5 +- docs/ui-parity.md | 21 +++++++- docs/whats-new.md | 8 +++ 9 files changed, 150 insertions(+), 18 deletions(-) diff --git a/crates/ui-egui/src/menus.rs b/crates/ui-egui/src/menus.rs index 3e8c3653b..d1ada6b23 100644 --- a/crates/ui-egui/src/menus.rs +++ b/crates/ui-egui/src/menus.rs @@ -590,8 +590,8 @@ pub fn run_ui_command(app: &mut LightcraftApp, id: &str, p: &Value) -> Option Option { let id = p.get("id").and_then(Value::as_u64).or_else(|| app.session.active().map(|a| a.0)); - app.ui.reference = id; + let Some(id) = id else { return Some(Err("select a photo to use as the reference".into())) }; + if app.session.catalog.photo(lightcraft_catalog::PhotoId(id)).is_none_or(|p| p.deleted) { + return Some(Err(format!("no photo {id}"))); + } + app.ui.reference = Some(id); Ok(json!({"reference": id})) } "compare.swap" => crate::panels::compare::swap(app), @@ -636,7 +640,7 @@ pub fn run_ui_command(app: &mut LightcraftApp, id: &str, p: &Value) -> Option Result Err(e) => Err(format!("{err}; reopening the previous library {} failed too: {e}", prev.display())), }; } + // Photo IDs are local to a catalog: a pin cannot follow them into another library. + app.ui.reference = None; app.ui.settings.library_path = path.clone(); if let Some(prev) = previous.filter(|p| p != &path && !app.ui.settings.recent_libraries.contains(p)) { remember_library(&mut app.ui.settings.recent_libraries, &prev); @@ -1311,7 +1313,8 @@ mod tests { use serde_json::json; fn app_with_import() -> LightcraftApp { - let mut app = LightcraftApp::new(lightcraft_engine::Session::new(), crate::Services::default()); + let mut app = LightcraftApp::new(lightcraft_engine::Session::with_demo(), crate::Services::default()); + app.run("photo.setReference", json!({})).unwrap(); app.import = Some(crate::import::ImportTask::new(vec!["a.jpg".into()], json!({"mode": "add"}), 0, false)); app } @@ -1319,17 +1322,21 @@ mod tests { #[test] fn open_library_is_refused_while_an_import_runs() { let mut app = app_with_import(); + let pin = app.ui.reference; let err = open_library(&mut app, &json!({"path": "other"})).unwrap_err(); assert!(err.contains("import to finish"), "{err}"); assert!(app.import.is_some()); + assert_eq!(app.ui.reference, pin, "a refused Open Library keeps the reference pin"); } #[test] fn new_library_is_refused_while_an_import_runs() { let mut app = app_with_import(); + let pin = app.ui.reference; let err = new_library(&mut app, &json!({"path": "other"})).unwrap_err(); assert!(err.contains("import to finish"), "{err}"); assert!(app.import.is_some()); + assert_eq!(app.ui.reference, pin, "a refused New Library keeps the reference pin"); } /// The menu items that switch libraries are greyed out meanwhile, like during a Lightroom import. @@ -1349,11 +1356,18 @@ mod tests { fn open_library_is_refused_while_an_import_scan_runs() { let dir = std::env::temp_dir().join(format!("lc-ui-switchscan-{}", std::process::id())); let _ = std::fs::create_dir_all(&dir); - let mut app = LightcraftApp::new(lightcraft_engine::Session::new(), crate::Services::default()); + let mut app = LightcraftApp::new(lightcraft_engine::Session::with_demo(), crate::Services::default()); + app.run("photo.setReference", json!({})).unwrap(); + let pin = app.ui.reference; crate::import::open(&mut app, vec![dir.to_string_lossy().into_owned()]).unwrap(); assert!(app.scan.is_some()); let err = open_library(&mut app, &json!({"path": "other"})).unwrap_err(); assert!(err.contains("import to finish"), "{err}"); + assert_eq!(app.ui.reference, pin, "a refused Open Library during a scan keeps the reference pin"); + let err = new_library(&mut app, &json!({"path": "other"})).unwrap_err(); + assert!(err.contains("import to finish"), "{err}"); + assert_eq!(app.ui.reference, pin, "a refused New Library during a scan keeps the reference pin"); + assert!(app.scan.is_some()); let _ = std::fs::remove_dir_all(&dir); } } diff --git a/crates/ui-egui/src/tests_compare.rs b/crates/ui-egui/src/tests_compare.rs index 0f8d123be..6d2a8eb5b 100644 --- a/crates/ui-egui/src/tests_compare.rs +++ b/crates/ui-egui/src/tests_compare.rs @@ -209,3 +209,64 @@ fn a_compare_pane_says_when_its_render_failed() { assert!(h.step_until(SETTLE, failed), "the failure is said"); assert!(!h.app.widgets.iter().any(|(w, _)| w.starts_with("compare:rendering:"))); } + +#[test] +fn reference_escape_leaves_overlays_then_the_view_without_changing_edits() { + use crate::state::{LightsOut, ViewMode}; + let mut h = demo(); + let reference = h.app.session.visible_cloned()[0]; + h.app.run("library.select", json!({"ids": [reference.0]})).unwrap(); + h.app.run("view.reference", json!({})).unwrap(); + let active = h.app.session.active().unwrap(); + h.app.run("develop.set", json!({"control": "light.exposure", "value": 0.7})).unwrap(); + h.app.ui.lights_out = LightsOut::Dim; + h.request("ui.key", json!({"key": "Escape"}), T); + assert_eq!((h.app.ui.view, h.app.ui.lights_out), (ViewMode::Reference, LightsOut::On)); + h.request("ui.key", json!({"key": "Escape"}), T); + assert_eq!(h.app.ui.view, ViewMode::Detail); + assert_eq!(h.app.ui.reference, Some(reference.0), "leaving the view keeps the pinned photo"); + assert_eq!(h.app.session.active(), Some(active)); + assert_eq!(h.app.session.develop_of(active).unwrap().light.exposure, 0.7); + h.request("ui.key", json!({"key": "Escape"}), T); + assert_eq!(h.app.ui.view, ViewMode::PhotoGrid); +} + +#[test] +fn invalid_or_deleted_reference_is_refused_without_replacing_the_pin() { + let mut h = demo(); + let ids = h.app.session.visible_cloned(); + h.app.run("library.select", json!({"ids": [ids[0].0]})).unwrap(); + h.app.run("photo.setReference", json!({})).unwrap(); + h.app.run("photo.delete", json!({"ids": [ids[1].0]})).unwrap(); + for id in [u64::MAX, ids[1].0] { + let r = h.app.run("photo.setReference", json!({"id": id})); + assert!(r.is_err(), "unavailable photo {id} must not be pinned"); + assert_eq!(h.app.ui.reference, Some(ids[0].0)); + } + h.app.run("library.select", json!({"ids": []})).unwrap(); + assert!(h.app.run("photo.setReference", json!({})).is_err()); + assert_eq!(h.app.ui.reference, Some(ids[0].0)); +} + +#[test] +fn deleting_the_pinned_reference_stops_drawing_it_and_reentry_uses_a_live_photo() { + let mut h = demo(); + let reference = h.app.session.visible_cloned()[0]; + h.app.run("library.select", json!({"ids": [reference.0]})).unwrap(); + h.app.run("view.reference", json!({})).unwrap(); + h.settle(SETTLE); + let texture = h.app.renderer.textures.get(&crate::render::Slot::Compare(0)).unwrap().tex.id(); + let drawn = |h: &Headless| h.view.painted_shapes().iter().any(|s| matches!(s, egui::epaint::Shape::Mesh(mesh) if mesh.texture_id == texture)); + assert!(drawn(&h), "the live reference is shown before deletion"); + let active = h.app.session.active().unwrap(); + h.app.run("photo.delete", json!({"ids": [reference.0]})).unwrap(); + h.settle(SETTLE); + assert!(!drawn(&h), "Recently Deleted photos must not remain on the reference canvas"); + let r = h.app.run("view.reference", json!({})).unwrap(); + assert_eq!(r["reference"], active.0); + assert_eq!(h.app.ui.reference, Some(active.0)); + h.app.run("photo.restore", json!({"ids": [reference.0]})).unwrap(); + h.app.run("photo.setReference", json!({"id": reference.0})).unwrap(); + h.settle(SETTLE); + assert!(h.app.renderer.textures.get(&crate::render::Slot::Compare(0)).is_some_and(|t| t.photo == reference)); +} diff --git a/crates/ui-egui/src/tests_preview_limit.rs b/crates/ui-egui/src/tests_preview_limit.rs index 070921256..c362c11c8 100644 --- a/crates/ui-egui/src/tests_preview_limit.rs +++ b/crates/ui-egui/src/tests_preview_limit.rs @@ -2,7 +2,7 @@ //! loupe renders at the size it is drawn at (up to the photo's own pixels and a safety ceiling); //! "Preview size" in Settings only lowers that when the user asks for it. -use crate::state::{AppSettings, LOUPE_EDGE_CEILING, PREVIEW_LIMITS, STANDARD_PREVIEW_EDGE}; +use crate::state::{AppSettings, LOUPE_EDGE_CEILING, STANDARD_PREVIEW_EDGE}; /// A texture side no GPU we run on refuses (see the tests of small ones below). const BIG: usize = 16384; @@ -11,13 +11,6 @@ fn with_limit(preview_limit: u32) -> AppSettings { AppSettings { preview_limit, ..Default::default() } } -// Given a fresh install -#[test] -fn default_is_automatic() { - assert_eq!(AppSettings::default().preview_limit, 0); - assert_eq!(PREVIEW_LIMITS[0], 0, "Automatic is the first choice"); -} - // Given Automatic, when a 24 MP photo is shown at 1:1, then the render is the photo's own width #[test] fn automatic_renders_a_one_to_one_view_at_native_size() { diff --git a/crates/ui-egui/src/tests_switch_library.rs b/crates/ui-egui/src/tests_switch_library.rs index d1ad85c96..d03ec7a9e 100644 --- a/crates/ui-egui/src/tests_switch_library.rs +++ b/crates/ui-egui/src/tests_switch_library.rs @@ -183,6 +183,38 @@ fn missing_recent_libraries_are_greyed_out_and_pruned_and_the_list_is_capped() { let _ = std::fs::remove_dir_all(&dir); } +#[test] +fn reference_photo_ids_do_not_cross_library_boundaries() { + let dir = temp("reference-switch"); + let (first, second) = (dir.join("first"), dir.join("second")); + let mut session = lightcraft_engine::Session::new().with_fs(); + session.open_library(&second, true).unwrap(); + let new_photo = session.visible_cloned()[0]; + session.close_library().unwrap(); + session.open_library(&first, true).unwrap(); + let old_reference = session.visible_cloned()[1]; + let mut app = LightcraftApp::new(session, Services::default()); + app.run("library.select", json!({"ids": [old_reference.0]})).unwrap(); + app.run("photo.setReference", json!({})).unwrap(); + app.run("view.reference", json!({})).unwrap(); + let held = lightcraft_catalog::LibraryLock::acquire(&second, "another program").unwrap(); + assert!(app.run("app.openLibrary", json!({"path": second.to_string_lossy()})).is_err()); + assert_eq!(app.ui.reference, Some(old_reference.0), "a refused switch keeps the live pin"); + drop(held); + app.run("app.openLibrary", json!({"path": second.to_string_lossy()})).unwrap(); + assert!(app.session.catalog.photo(old_reference).is_some(), "the second library reuses this numeric ID"); + assert_eq!(app.ui.reference, None, "the first library's pin must not acquire a different photo"); + app.run("library.select", json!({"ids": [new_photo.0]})).unwrap(); + let r = app.run("view.reference", json!({})).unwrap(); + assert_eq!(r["reference"], new_photo.0); + app.run("app.newLibrary", json!({"path": dir.to_string_lossy(), "name": "Empty"})).unwrap(); + assert_eq!(app.ui.reference, None, "New Library clears the old reference too"); + assert!(app.run("view.reference", json!({})).is_err(), "an empty library cannot pin a reference"); + assert_eq!(app.ui.reference, None); + app.session.close_library().unwrap(); + let _ = std::fs::remove_dir_all(&dir); +} + /// A library another program has open is refused before the current one is closed: the current /// library stays open with its photos, and the window title keeps its name. #[test] diff --git a/docs/parity-checklist.md b/docs/parity-checklist.md index 02f5bf08f..b0fad5a3d 100644 --- a/docs/parity-checklist.md +++ b/docs/parity-checklist.md @@ -696,11 +696,11 @@ From `08-lightroom-classic-extras.md` (Classic-only features) and part 2 of `06- | LRC-LIB-VIEWS | Grid / loupe / compare / survey / people | P1 | 🟡 | `cmd:view.photoGrid`, `cmd:view.squareGrid`, `cmd:view.detail`, `cmd:view.compare`, `cmd:view.survey`, `cmd:view.gridInfo` | grid, square grid, loupe, compare, survey, second window; square-grid captions: file name, exposure or capture date (View ▸ Grid Info; no people view; picking one in Photo Grid switches to Square Grid) | | LRC-LIB-COMPARE | Compare view | P1 | ✅ | `cmd:view.compare` | ⇧C (C is Crop here); swap, make select; a filmstrip click replaces the active side, a ⌘/Ctrl- or Shift-click changes the selection without touching the pair; zoom always linked; each pane says “Rendering…” or that the photo can't be opened, as the loupe does (see LR-VIEW-COMPARE) | | 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; each pane says “Rendering…” (widget `compare:rendering:`) or “This photo can't be opened” (`compare:renderFailed:`) as the loupe does | +| 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; each pane says “Rendering…” (widget `compare:rendering:`) or “This photo can't be opened” (`compare:renderFailed:`) as the loupe does. Escape → Detail without losing edits; pins are catalog-local; missing/deleted photos refused and deleted references no longer drawn (Windows regression/native smoke verified) | | 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 (also WAL-only tables with main schema format 0), in-tree read-only Rust SQLite B-tree reader; on-demand main-file pages up to 16 GiB with existing table/record bounds (WAL still capped at 1 GiB, issue #798); background inspection/import with progress/cancellation, per-open library identity checks; persistent result with destination library, offline-original counts and Show in Library, dismissed when switching libraries; offline Local records are promoted without probing missing files; 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, a root folder not found at its recorded path looked up relative to the catalog (Lightroom's `relativePathFromCatalog`, so a project folder copied from another computer stays linked; reported as a warning), 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. Custom white balance on relative-WB raws (`RAW` in Lightroom's terms) stays As Shot and is reported, since the catalog keeps no as-shot white to shift from (issue #510). An image whose file, folder or root folder record is missing from the catalog, or whose original path is empty, is skipped with its virtual copies instead of failing the whole import; the report lists them as data (`skipped`: image id and reason) and the result window counts them in the UI language (PR #2230). Adobe rendering, AI data and native history replay remain incomplete; no writes to Lightroom catalogs. Open Library given a Lightroom catalog folder, an `.lrdata` / `.lrcat-data` folder or the `.lrcat` makes no library there and offers this import with the catalog found (`cmd:app.openLibrary`, `crates/engine/src/lightroom_folder.rs`; issue #891) | | 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 (the app's notices, `library.info` → `settingsWarnings`, and the CLI's stderr; issue #171); 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`); the lock is released explicitly when the library closes, not by letting its file handle close, so a program another thread is starting at that moment (which holds a copy of every file handle until it is launched) cannot keep the library "already open" for a moment (issue #680) | -| LRC-LIB-CATALOG-SWITCH | New / Open Recent catalog, catalog name shown | P1 | ✅ | `cmd:app.newLibrary`, `cmd:app.openLibrary`, `cmd:app.recentLibraries`, `cmd:app.clearRecentLibraries`, `crates/ui-egui/src/panels/settings.rs`, `crates/ui-egui/src/panels/left.rs` | File ▸ New Library… (name, then location), File ▸ Open Recent Library (last 8; missing ones greyed out, dropped when opened; Clear), the open library's name under My Photos and in the window title (issue #902); a library that can't be opened leaves the current one open; ⌘O (Ctrl+O on Windows and Linux) runs Open Library… and asks for a folder once (`crates/ui-egui/src/tests_keymap.rs`: `cmd_o_opens_the_library_picker_once`); a dialog or a text field with the focus keeps the key | +| LRC-LIB-CATALOG-SWITCH | New / Open Recent catalog, catalog name shown | P1 | ✅ | `cmd:app.newLibrary`, `cmd:app.openLibrary`, `cmd:app.recentLibraries`, `cmd:app.clearRecentLibraries`, `crates/ui-egui/src/panels/settings.rs`, `crates/ui-egui/src/panels/left.rs` | File ▸ New Library… (name, then location), File ▸ Open Recent Library (last 8; missing ones greyed out, dropped when opened; Clear), the open library's name under My Photos and in the window title (issue #902); Open/New refused during imports and their folder scans; a library that can't be opened leaves the current one and its reference pin intact; a successful switch clears the catalog-local reference pin; ⌘O (Ctrl+O on Windows and Linux) runs Open Library… and asks for a folder once (`crates/ui-egui/src/tests_keymap.rs`: `cmd_o_opens_the_library_picker_once`); a dialog or a text field with the focus keeps the key | | 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-LIBFOLDERS | Library folders | P1 | ✅ | `cmd:library.folders`, `cmd:library.source` (`libraryFolder`), `cmd:library.filter` (`libraryFolder`), `cmd:library.removeFolder`, `cmd:folder.rename`, `cmd:folder.move`, `cmd:folder.label`, `cmd:folder.create`, `cmd:photo.moveToFolder`, `cmd:folder.scanChanges`, `cmd:folder.synchronize`, `crates/catalog/src/folders.rs`, `crates/engine/src/sync.rs`, `crates/ui-egui/src/sync.rs`, `crates/ui-egui/src/panels/left.rs` (`folders_section`, `folder_menu_for_library`, `row_menu`), `crates/ui-egui/src/tests_panels.rs` | sidebar Folders: the folders the library's photos were imported from, with photo counts (subfolders included), as another way to explore the library next to By Date and Keywords; Local stays the way to browse any folder on disk. Each disk is a row of its own and starts open: a drive letter, a Windows share (`\\server\share`, `\\?\UNC\…`, `\\wsl$\…`), a macOS share or disk (`/Volumes/tokyo`), a Linux mount (`/media`, `/run/media`, `/mnt`, gvfs `smb-share:…`, `/net/`), NFS (`/Network/Servers/`), else “This Computer” — told apart from the stored paths alone, so an offline share lists like a mounted one and the sidebar never waits on a network. Only folders that hold imported photos are listed (browsed, deleted and demo photos don't count); every folder is a row of its own (`Users` → `me` → `Pictures`), and a folder that holds nothing itself and leads to one folder starts open; every level indents one step more than its parent however deep it goes: the whole sidebar (Albums, Local, By Date, Folders, Keywords) scrolls sideways when its widest row is wider than the panel (rows are measured one frame behind; Create Album and the counts stay at the visible edge); a name that does not fit ends in an ellipsis at the count (the full name on hover; a row asks for room for at most 140 pt of its name, so depth, not one long name, makes the sidebar scroll), as does the grid title; selection and hover bars end at the panel's edge; click makes the folder the source, like an album or a Local folder (its photos and those of the folders inside it fill the grid, titled “photos/travel”; the filter bar narrows it further; `library.source` `libraryFolder` + `path`; kept with the library's view), and its row is always opened into view; the shown folder follows a rename or move and their undo (engine-tested; the sidebar test covers rename), is dropped back to All Photos when it is removed or no longer holds a photo, and a smart album made from the view keeps it, also when its rules are edited (the editor has no folder field). Only a folder that shows exactly its own photos can be shown (not the startup disk, not `/Volumes`-like folders above disks, not an empty one). A row that would cover other disks' photos too (the startup disk, `/Volumes`, `/mnt`…) only opens. Right-click (row or triangle): Rename Folder…, Move Folder To…, New Folder on Disk… (`folder.create`; one undo step, undo removes it while empty), Move Selected Photos Here (`photo.moveToFolder`, also *Move to Folder…* in the photo context menu, and photos dragged from the grid onto a Folders row: the row lights up, the dragged label says “Move 3 photos to “Trip””, a closed folder held under the pointer opens, a row covering several disks and Local photos are refused with the reason, photos already there say so; a drop asks first (“Move 2 photos to “Porto”?”, Don't ask again, Settings → Confirm before moving photos to another folder on disk), and photos that leave the view leave the selection; files and XMP sidecars move, virtual copies follow, across volumes copied (streamed) and verified before the source goes, a name taken in the destination refuses the whole move, one undo step; an undo with the share offline or read-only is refused with the reason and kept until it can run, nothing deleted), Show in Finder (on disk, photos relinked, as in Local), Set Color Label ▸ (the five colours with their custom names, None, Edit Label Names…; `folder.label`, one undo step; the row shows the label's dot before its count and says it with its name; kept in the catalog as a folder record under the folder's identity, so it follows Rename / Move and their undo and redo, the folders inside going along), Synchronize Folder… (the dialog opens at once and scans the folder and the folders inside it on a worker thread — the look for new files beside parallel checks of the library's photos — then offers Import new photos (checked; files only browsed in Local count as new), Relink photos whose file was renamed or moved within the folder (checked; matched by content — a Duplicate's too — or, for a photo with no hash on record such as one from a Lightroom catalog, by file size and dimensions when exactly one file agrees), Remove missing photos from the library (to Recently Deleted) and Read metadata updates from XMP sidecars (saved after the photo came in or was last edited here, and saying something the library doesn't; the sidecar wins), with counts and skipped duplicates / unreadable files; `folder.scanChanges` / `folder.synchronize`, which acts on exactly the scan shown — a scan whose folder's photos changed meanwhile is refused and made again in the background — and is one undo step, also with a full history; a folder that isn't there (an unplugged disk) is reported as such, not as every photo missing; a whole disk or a folder holding disks needs `disk: true`; Esc stops the scan; Synchronize hands everything to a worker thread — the import, the checks that moved and missing files are still as found, the sidecar reads — and commits its steps between frames, shown in the activity stack with ✕ to stop, so no file is touched on the UI thread) and Remove from Library… (asks; moves the folder's photos to Recently Deleted, one undo step, no file touched); a disk row (not the startup disk) offers Set Color Label ▸, Synchronize Folder… and Remove Disk from Library… (the command needs `disk: true` for a whole disk or a folder spanning several). Limits: names are compared as written (macOS `/Volumes/tokyo` vs `/Volumes/TOKYO` are two disks; `/Volumes/Macintosh HD/…` and `/…` two rows); no disk capacity / online status; no “include subfolders” switch (a folder always includes the ones inside it); photos can't yet be dragged onto a folder row (use the menus); a name clash on moving photos is refused rather than renamed -1, -2; folders can't be filtered or sorted by label, and a label stays with the old path when the folder is moved outside LightCraft (Find Missing relinks photos, not folder records); Synchronize has no “show import dialog first” or “show missing photos” option, and only knows when a photo came in or was last developed here: a rating, label or metadata change made here (auto-write off) after another app saved the sidecar is listed as an update, and reading it restores the sidecar's older value (reading is never the default); the walk for new files isn't cancelled midway and its depth/entry limits are only logged | | 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 +) | @@ -880,6 +880,7 @@ Latin stays upright. Advanced Japanese composition remains open. Regression cove | 2026-10-13 | minor | LR-META-INFO: Nikon DSLR raws show their lens from the maker note; status unchanged (✅) | | 2026-10-13 | patch | LR-IMP-LOCAL: browsing a Local folder again forgets the untouched records of files deleted or moved by another app (issue #1392); status unchanged | | 2026-10-13 | minor | LR-MERGE-PANO: a panorama keeps its photos' resolution (up to 512 MP / 65,000 px) instead of a fixed 40 MP, held to what fits in memory (issue #1455); status unchanged | +| 2026-10-11 | minor | LRC-LIB-REFVIEW / CATALOG-SWITCH: Escape preserves edits; reference pins stay within their catalog, unavailable photos refused, deleted reference not drawn; statuses unchanged | | 2026-10-11 | minor | KEY-SLIDER-TYPE: honor immediate Return/Escape and keep typed keys in the value editor; add regression references | | 2026-10-11 | minor | LR-PROF-CAMERACOLOR: raws with a black-and-white camera JPEG take its tone curve (issue #577) | | 2026-10-11 | minor | LR-VIEW-ZOOM and LR-VIEW-COMPARE: Compare and Reference are sharp at 1:1 (zoom windows per pane, two originals kept decoded while they are open); statuses unchanged | diff --git a/docs/ui-parity.md b/docs/ui-parity.md index e5e0c6e5f..37fce85dc 100644 --- a/docs/ui-parity.md +++ b/docs/ui-parity.md @@ -1,6 +1,6 @@ # UI parity -> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-10-14 · **Change:** minor (zoom row: soft proofing sharp at 1:1; canvas tools by keyboard; focus-order test; ~50 unnamed hand-drawn widgets named) · **Target:** Adobe Lightroom Classic 15.5 / Lightroom 9.6 +> **Last reviewed:** 2026-10-11 · **Last updated:** 2026-10-21 · **Change:** minor (Reference Escape, catalog-local pins and deleted-photo handling verified on Windows; earlier: zoom row soft proofing sharp at 1:1, canvas tools by keyboard, focus-order test, ~50 unnamed hand-drawn widgets named) · **Target:** Adobe Lightroom Classic 15.5 / Lightroom 9.6 How LightCraft's interaction compares with Lightroom's: views, panels, tools and handles, modifier keys, shortcuts, zoom, context menus and feel. Rows for individual menu items and shortcuts live in @@ -126,6 +126,24 @@ unnamed was in the way. Not done: brush strokes and red-eye ellipses still need a pointer. Nobody has tried the app with a real screen reader on any platform yet. +## Reference view lifecycle + +Escape leaves Reference for Detail, preserving the active photo and its edits; a second Escape +returns to the grid. Existing dialogs, tools and Lights Out retain their higher-priority Escape +handling. The reference stays pinned when leaving the view, but a successful Open/New Library +clears it: numeric photo IDs are local to each catalog. A refused switch keeps the current pin, +including Open/New refused while an import or its folder scan is running. + +`photo.setReference` refuses missing or Recently Deleted photos without replacing the current +pin. Deleting a pinned reference stops drawing it; re-entering Reference falls back to a live +active photo. Restoring the photo permits pinning it again. An empty catalog cannot supply one. + +Verification: four new behavioral regressions failed on upstream `76b5377` before the fix. +The patched Windows x64 app on RTX 5080 / DX12 passed Escape, edit preservation, delete/restore, +and New/Open Library checks using isolated catalogs. Saved exposure survived reopening. Native +1400 × 900 captures did not fall back to headless rendering. Control-channel input does not +establish OS keyboard delivery or cross-platform acceptance. + ## Revision history | Date | Change | Summary | @@ -138,5 +156,6 @@ a real screen reader on any platform yet. | 2026-10-13 | minor | Shortcuts: Home / End and Shift+Left / Right in the two library grids, Cmd+O (Open Library…) and Shift+H (Visualize HDR) get bindings and keyboard tests; percentages and the dated counts above are unchanged | | 2026-10-14 | minor | Zoom row: soft proofing gets zoom windows; LR-VIEW-ZOOM gap closed | | 2026-10-12 | minor | Accessibility: an AccessKit tree audit test over every view, Develop tool and 13 dialogs; unnamed fields, slider ranges and the Auto Stack slider fixed; 30% → 55%; UI remaining 40–70 h → 34–58 h | +| 2026-10-11 | minor | Reference Escape exits to Detail; catalog-local pins and missing/deleted reference handling verified with regressions and native Windows smoke | | 2026-10-11 | minor | Zoom row: Compare and Reference get zoom windows; what remains of LR-VIEW-ZOOM is overlays and soft proofing | | 2026-10-10 | major | Created: measured command and shortcut counts, assessment by area, estimates; moved the shortcut conflicts section here from the checklist | diff --git a/docs/whats-new.md b/docs/whats-new.md index cfeed33ed..971cc8097 100644 --- a/docs/whats-new.md +++ b/docs/whats-new.md @@ -570,6 +570,14 @@ D7000, D5100, D800, D800E, Df, D4, D3, D3S, D700, D300, D300S, D600, D610, D810, D4S, D5600, Coolpix A, D3000, D40X, D60, D80 and D2Xs now show the area the camera itself frames, a few pixels smaller than before. +### Reference view reliability +- Escape now leaves Reference for Detail without changing the active photo or its edits; the next + Escape returns to the grid. A dialog, tool or Lights Out still handles Escape first. +- Opening or creating a different library clears the pinned reference. Photo IDs belong to one + catalog; a pin no longer silently becomes another library's photo with the same numeric ID. +- Missing or Recently Deleted photos cannot be pinned. Deleting the pinned reference stops drawing + it; re-entering Reference chooses a live photo, and restoring the deleted photo makes it pinnable again. + ### JPEG XL export - Export as JPEG XL (issue #247): Format ▸ JPEG XL in the Export dialog, `format: "jxl"` for agents and the CLI (`render in.raw -o out.jxl`). Quality as for JPEG, or Lossless; Effort (Fast / Normal) trades time for a