From 5ff2b7d16dbb950a58fc08181d6b707fa53a263f Mon Sep 17 00:00:00 2001 From: Andrew Frahn Date: Mon, 26 Oct 2026 18:59:25 +1100 Subject: [PATCH 1/2] Upstream review r3: grid Shift+Up/Down, library date-folder rename, small fixes Ports upstream #2998 (Shift+Up/Down and Ctrl+Shift+arrows extend the grid selection), #3016 (a date folder inside the library can be renamed), #3024 (face scan progress starts over in another library), #3013 (built-in lens profiles: no-make cameras, overflowing focal ranges), #3012 (estimated CA keeps the crop inside every plane), #3020 (Windows hard links count as the original), #3010 (file:// mirror escapes), #3009/#435 (merge reports reused) and #3035 (Italian strings Chromaforge has). Sources: upstream storytold/lightcraft PRs above (ported). Co-Authored-By: Claude Opus 5.5 --- Cargo.lock | 1 + Cargo.toml | 1 + crates/catalog/Cargo.toml | 3 + crates/catalog/src/safe_file.rs | 23 ++++++ crates/engine/src/cmd/browse.rs | 8 +- crates/engine/src/faces_index.rs | 2 + crates/engine/src/merge.rs | 2 + crates/engine/src/tests_face_recognize.rs | 18 +++++ crates/engine/src/tests_folders.rs | 27 +++++++ crates/engine/src/tests_merge.rs | 2 + crates/fetch/src/lib.rs | 23 +++++- crates/fetch/src/tests.rs | 11 +++ crates/lensdb/src/lib.rs | 18 +++-- crates/lensdb/src/tests.rs | 8 ++ crates/pipeline/src/geometry.rs | 2 +- crates/pipeline/src/lib.rs | 4 + crates/ui-egui/locales/it.json | 41 +++++++++- crates/ui-egui/src/panels/dialogs.rs | 3 +- crates/ui-egui/src/panels/keymap.rs | 3 + crates/ui-egui/src/shortcuts.rs | 44 ++++++++++- crates/ui-egui/src/tests_keymap.rs | 75 +++++++++++++++++++ docs/library-shortcuts.md | 9 ++- docs/parity-checklist.md | 2 +- docs/ui-parity.md | 4 +- .../whats-new/2026-10-26-upstream-r3-fixes.md | 10 +++ 25 files changed, 321 insertions(+), 23 deletions(-) create mode 100644 docs/whats-new/2026-10-26-upstream-r3-fixes.md diff --git a/Cargo.lock b/Cargo.lock index 54dc4bf91a..43c3d0793d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4592,6 +4592,7 @@ dependencies = [ "log", "proptest", "redb", + "same-file", "serde", "serde_json", "siphasher", diff --git a/Cargo.toml b/Cargo.toml index b8fc597395..ff0c229913 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -92,6 +92,7 @@ getrandom = "0.3" # All date/time conversion goes through chrono (no hand-rolled calendar code beyond the 400-year range extension; CLAUDE.md). chrono = { version = "0.4.45", default-features = false, features = ["std"] } rayon = "1" +same-file = "1" # lcc-catalog reads a file's volume serial number and file index with it on Windows proptest = "1" bytemuck = { version = "1", features = ["derive"] } half = { version = "2", default-features = false } # f32 → f16 for the HDR loupe texture diff --git a/crates/catalog/Cargo.toml b/crates/catalog/Cargo.toml index 15d93caf3c..59ff27e85a 100644 --- a/crates/catalog/Cargo.toml +++ b/crates/catalog/Cargo.toml @@ -29,6 +29,9 @@ siphasher = { workspace = true } [target.'cfg(not(target_arch = "wasm32"))'.dependencies] redb = { workspace = true } +[target.'cfg(windows)'.dependencies] +same-file = { workspace = true } + [dev-dependencies] lcc-fuzzkit = { workspace = true } lcc-geom = { workspace = true } diff --git a/crates/catalog/src/safe_file.rs b/crates/catalog/src/safe_file.rs index a6d3479184..bb68343314 100644 --- a/crates/catalog/src/safe_file.rs +++ b/crates/catalog/src/safe_file.rs @@ -23,6 +23,7 @@ //! replacing anything** (a hard link, which fails on a taken name; where the volume has no hard //! links, an exclusive create that claims the name, then a rename over that placeholder). //! - [`same_file`] tells whether two paths name the same file on disk (device + inode on Unix, +//! volume serial number + file index on Windows, //! resolved paths elsewhere), for "is this target an original?" checks. //! - [`open_regular`] / [`open_or_create_regular`] open a library file in place (to read, append //! or cut it), never through a link planted at its name, nor a FIFO or a device (issue #2552). @@ -389,6 +390,14 @@ pub fn same_file(a: &Path, b: &Path) -> bool { } #[cfg(not(unix))] { + // A hard link has its own path but shares the volume serial number and file index with + // its original. A volume that does not report them is compared by resolved path below. + #[cfg(windows)] + { + if ::same_file::is_same_file(a, b).unwrap_or(false) { + return true; + } + } if ma.len() != mb.len() { return false; } @@ -611,6 +620,20 @@ mod tests { let _ = fs::remove_dir_all(&d); } + #[test] + fn same_file_sees_a_hard_link_under_another_name() { + let d = temp("same-link"); + let p = d.join("IMG_1.jpg"); + fs::write(&p, b"original").unwrap(); + let linked = d.join("linked.png"); + fs::hard_link(&p, &linked).unwrap(); + fs::write(d.join("copy.png"), b"original").unwrap(); + assert!(same_file(&p, &linked), "a hard link is the same file"); + assert!(same_file(&linked, &p)); + assert!(!same_file(&p, &d.join("copy.png")), "a copy with the same content and length is another file"); + let _ = fs::remove_dir_all(&d); + } + #[test] fn same_file_sees_through_other_spellings() { let d = temp("same"); diff --git a/crates/engine/src/cmd/browse.rs b/crates/engine/src/cmd/browse.rs index bf8bdd8382..49da842e31 100644 --- a/crates/engine/src/cmd/browse.rs +++ b/crates/engine/src/cmd/browse.rs @@ -539,7 +539,13 @@ pub(crate) fn move_folder(s: &mut Session, from: &str, to: &str) -> std::result: if !src.is_dir() { return Err(format!("{from} is not a folder")); } - if s.library.as_ref().is_some_and(|l| l.dir.starts_with(src) || src == l.dir) { + // `a/../b` names a folder without spelling it, which the checks below and the relink can't see + if src.components().any(|c| matches!(c, std::path::Component::ParentDir)) { + return Err(format!("{from}: give the folder's path without '..'")); + } + // the library folder itself, and its own top-level folders (`Originals`, `thumbs`), stay where + // the library expects them; folders below those (an import's date folders) can be renamed + if s.library.as_ref().is_some_and(|l| l.dir.starts_with(src) || src.parent() == Some(l.dir.as_path())) { return Err("the library's own folders can't be moved here".into()); } // Repairs retain their exact old paths, including those on surviving history entries. diff --git a/crates/engine/src/faces_index.rs b/crates/engine/src/faces_index.rs index 86a9d786d9..0a25fd530b 100644 --- a/crates/engine/src/faces_index.rs +++ b/crates/engine/src/faces_index.rs @@ -599,6 +599,8 @@ impl FacesState { self.in_flight.clear(); self.retry_at = None; self.saved_at = None; + self.task = None; + self.peak = 0; self.epoch = self.epoch.wrapping_add(1); } diff --git a/crates/engine/src/merge.rs b/crates/engine/src/merge.rs index c75db26e17..95f7ed0c61 100644 --- a/crates/engine/src/merge.rs +++ b/crates/engine/src/merge.rs @@ -911,6 +911,8 @@ impl Session { info["id"] = json!(id.0); info["path"] = json!(path); info["bytes"] = json!(out.dng.len()); + // a repeated identical merge gives the verified result it already made (no new file, edits kept) + info["reused"] = json!(reused); Ok(info) } diff --git a/crates/engine/src/tests_face_recognize.rs b/crates/engine/src/tests_face_recognize.rs index 00fcc9cc0c..b1efdba86c 100644 --- a/crates/engine/src/tests_face_recognize.rs +++ b/crates/engine/src/tests_face_recognize.rs @@ -524,6 +524,24 @@ fn face_scan_row_follows_pending_photos() { let _ = std::fs::remove_dir_all(&d); } +#[test] +fn face_scan_row_starts_over_in_another_library() { + // issue #2995: the scan's whole was kept from the library opened before, so a smaller one showed most of it done + let d = temp("peak-library"); + let (mut s, _) = setup(&d, 64); + s.faces.peak = 442_717; + s.open_library(d.join("other"), true).unwrap(); + let id = s.catalog.photos().map(|p| p.id).max().unwrap(); + set_regions(&mut s, id, vec![region(0.1, None)]); + let last = s.execute("faces.pump", &json!({})).unwrap(); + let pending = last["pendingPhotos"].as_u64().unwrap(); + assert!(pending > 0, "{last}"); + assert_eq!(last["peak"].as_u64().unwrap(), pending, "{last}"); + let rows = s.activity.list().into_iter().filter(|t| t.kind == "faces").collect::>(); + assert_eq!(rows.iter().map(|t| (t.total, t.done)).collect::>(), vec![(pending, 0)]); + let _ = std::fs::remove_dir_all(&d); +} + fn face_names(s: &Session, id: PhotoId) -> Vec> { s.catalog.photo(id).unwrap().meta.regions.iter().map(|r| r.name.clone()).collect() } diff --git a/crates/engine/src/tests_folders.rs b/crates/engine/src/tests_folders.rs index 5cd998db29..837bd119a0 100644 --- a/crates/engine/src/tests_folders.rs +++ b/crates/engine/src/tests_folders.rs @@ -16,6 +16,7 @@ use lcc_catalog::{Op, Photo, Source}; use serde_json::json; +use std::path::Path; use crate::{LibrarySource, Session, filter_chips}; @@ -841,3 +842,29 @@ fn a_destination_without_write_permission_reports_an_error_and_keeps_everything( } std::fs::set_permissions(dir.0.join("ro"), std::fs::Permissions::from_mode(0o755)).unwrap(); } + +#[test] +fn a_date_folder_inside_the_library_can_be_renamed_but_the_librarys_own_folders_cannot() { + let dir = Scratch::new("in-library"); + let lib = dir.0.join("lib"); + let mut s = Session::new(); + s.open_library(&lib, false).unwrap(); + let day = lib.join("Originals").join("2026-10-16"); + std::fs::create_dir_all(&day).unwrap(); + add(&mut s, &day.join("a.jpg").to_string_lossy()); + let day = day.to_string_lossy().to_string(); + s.execute("folder.rename", &json!({"path": day, "name": "Beach"})).unwrap(); + assert!(lib.join("Originals/Beach").is_dir(), "the imported date folder is renamed"); + assert!(!Path::new(&day).exists()); + s.execute("edit.undo", &json!({})).unwrap(); + assert!(Path::new(&day).is_dir(), "undo names it back"); + for own in ["Originals", "thumbs"] { + std::fs::create_dir_all(lib.join(own)).unwrap(); + let path = lib.join(own).to_string_lossy().to_string(); + assert!(s.execute("folder.rename", &json!({"path": path, "name": "x"})).is_err(), "{own} stays put"); + } + assert!(s.execute("folder.rename", &json!({"path": lib.to_string_lossy(), "name": "x"})).is_err(), "and so does the library"); + let alias = lib.join("Originals").join("..").join("Originals").to_string_lossy().to_string(); + assert!(s.execute("folder.rename", &json!({"path": alias, "name": "x"})).is_err(), "even named through '..'"); + assert!(lib.join("Originals").is_dir()); +} diff --git a/crates/engine/src/tests_merge.rs b/crates/engine/src/tests_merge.rs index 0bd6ea5d57..ee681a598e 100644 --- a/crates/engine/src/tests_merge.rs +++ b/crates/engine/src/tests_merge.rs @@ -145,6 +145,7 @@ fn hdr_merge_command_creates_and_imports_a_dng() { let r = s.execute("merge.hdr", &json!({"ids": ids, "autoSettings": true, "stack": true})).unwrap(); let path = r["path"].as_str().unwrap(); assert!(path.ends_with("IMG_0-HDR.dng"), "{path}"); + assert_eq!(r["reused"].as_bool(), Some(false)); let id = lcc_catalog::PhotoId(r["id"].as_u64().unwrap()); let p = s.catalog.photo(id).unwrap().clone(); assert_eq!((p.width, p.height), (480, 320)); @@ -168,6 +169,7 @@ fn hdr_merge_command_creates_and_imports_a_dng() { let undo_before = s.undo.len(); let r2 = s.execute("merge.hdr", &json!({"ids": ids, "autoSettings": true, "stack": true})).unwrap(); assert_eq!(r2["id"].as_u64(), Some(id.0)); + assert_eq!(r2["reused"].as_bool(), Some(true)); assert_eq!(r2["path"].as_str(), Some(path)); assert!(!dir.join("IMG_0-HDR-2.dng").exists(), "duplicate merge left an orphan"); assert_eq!(s.catalog.photos().count(), 4); diff --git a/crates/fetch/src/lib.rs b/crates/fetch/src/lib.rs index 73ff839fb8..f3e06fd722 100644 --- a/crates/fetch/src/lib.rs +++ b/crates/fetch/src/lib.rs @@ -57,7 +57,7 @@ pub fn mirrors(env: Option<&str>, file: Option<&Path>, defaults: &[&str]) -> Vec let mut add = |s: &str| { let s = s.trim(); // a local folder (an absolute path) is the same as its `file://` URL - let s = if Path::new(s).is_absolute() { format!("file://{s}") } else { s.to_string() }; + let s = if Path::new(s).is_absolute() { format!("file://{}", s.replace('%', "%25")) } else { s.to_string() }; let s = s.trim_end_matches('/'); let usable = local_path(s).is_some() || Url::parse(s).is_ok(); if !s.is_empty() && usable && !out.iter().any(|m| m == s) && out.len() < MAX_MIRRORS { @@ -522,10 +522,29 @@ fn fetch_file( fn local_path(url: &str) -> Option { let rest = url.strip_prefix("file://")?; let rest = if rest.get(2..3) == Some(":") { rest.strip_prefix('/').unwrap_or(rest) } else { rest }; - let p = PathBuf::from(rest); + let rest = percent_decode(rest)?; + let p = PathBuf::from(&rest); if p.is_absolute() && !rest.chars().any(char::is_control) { Some(p) } else { None } } +/// Decode `%XX` escapes (a `file://` URL's path); `None` for a broken escape or non-UTF-8 result. +fn percent_decode(s: &str) -> Option { + let b = s.as_bytes(); + let mut out = Vec::with_capacity(b.len()); + let mut i = 0; + while let Some(&c) = b.get(i) { + if c == b'%' { + let hex = std::str::from_utf8(b.get(i + 1..i + 3)?).ok()?; + out.push(u8::from_str_radix(hex, 16).ok()?); + i += 3; + } else { + out.push(c); + i += 1; + } + } + String::from_utf8(out).ok() +} + /// Copy a file from a local mirror into `part` (from the start; it is checked afterwards like a download). fn copy_local(src: &Path, part: &Path, limit: u64, size: Option, cancel: &AtomicBool, report: &mut dyn FnMut(u64, u64)) -> Result<(), Fail> { let disk = |e: std::io::Error| Fail::Disk(format!("{}: {e}", part.display())); diff --git a/crates/fetch/src/tests.rs b/crates/fetch/src/tests.rs index f79d072a30..1bd165b64a 100644 --- a/crates/fetch/src/tests.rs +++ b/crates/fetch/src/tests.rs @@ -491,3 +491,14 @@ fn the_overall_deadline_stops_a_trickling_server() { assert!(!dir.join("model.bin").exists()); let _ = std::fs::remove_dir_all(&dir); } + +#[test] +fn file_urls_are_percent_decoded_but_bare_paths_keep_their_percent_signs() { + let bare = mirrors(Some("/models/50%20off"), None, &[]); + assert_eq!(bare.len(), 1); + assert_eq!(local_path(&bare[0]), Some(std::path::PathBuf::from("/models/50%20off"))); + assert_eq!(local_path("file:///models/my%20sam3"), Some(std::path::PathBuf::from("/models/my sam3"))); + for hostile in ["file:///x%", "file:///x%2", "file:///x%zz", "file:///x%ff", "file:///x%0a"] { + assert_eq!(local_path(hostile), None, "{hostile}"); + } +} diff --git a/crates/lensdb/src/lib.rs b/crates/lensdb/src/lib.rs index a10d470c3c..d089f5cc5c 100644 --- a/crates/lensdb/src/lib.rs +++ b/crates/lensdb/src/lib.rs @@ -161,12 +161,15 @@ impl LensDb { /// The camera with this EXIF make and model. pub fn find_camera(&self, make: &str, model: &str) -> Option<&Camera> { let mk = tokens(make); - let md = strip_maker(tokens(model), &mk); + let raw = tokens(model); + let md = strip_maker(raw.clone(), &mk); if md.is_empty() { return None; } self.cameras.iter().find(|c| { let cm = tokens(&c.maker); + // with no EXIF make, the model may still start with the maker's word + let md = if mk.is_empty() { strip_maker(raw.clone(), &cm) } else { md.clone() }; maker_matches(&cm, &mk) && strip_maker(tokens(&c.model), &cm) == md }) } @@ -174,7 +177,8 @@ impl LensDb { /// The best profile for an EXIF lens model (and lens make, when the file has one), preferring lenses for the /// camera's mount. `None` when no name is a convincing match. pub fn find_lens(&self, lens_make: Option<&str>, lens_model: &str, camera: Option<&Camera>) -> Option<&Profile> { - self.best_lens(lens_make, lens_model, camera, |_| true) + // a compact camera's built-in lens is named after the camera, not the EXIF focal range + self.best_lens(lens_make, lens_model, camera, |_| true).or_else(|| self.find_fixed_lens(&tokens(lens_model), camera?)) } /// [`find_lens`](Self::find_lens) among the profiles one of whose names is exactly `name` @@ -207,10 +211,7 @@ impl LensDb { best = Some((score, lens)); } } - match best { - Some((_, l)) => Some(l), - None => self.find_fixed_lens(&exif, camera?), - } + best.map(|(_, l)| l) } /// Compact cameras with a built-in lens: lensfun names the lens after the camera and gives it the camera's own @@ -234,6 +235,9 @@ impl LensDb { return (cands.len() == 1).then(|| cands[0]); }; let (lo, hi) = (lo * 0.9, hi * 1.1); + if !lo.is_finite() || !hi.is_finite() { + return None; + } let mut best: Option<(f64, &Profile)> = None; for p in cands { let focals: Vec = @@ -263,7 +267,7 @@ fn strip_maker(model: Vec, maker: &[String]) -> Vec { /// The numbers before the first "mm" in tokenised EXIF lens text: (shortest, longest) focal length. fn exif_focal_range(exif: &[String]) -> Option<(f64, f64)> { let end = exif.iter().position(|t| t == "mm")?; - let nums: Vec = exif.get(..end)?.iter().filter_map(|t| t.parse::().ok()).filter(|v| *v > 0.0).collect(); + let nums: Vec = exif.get(..end)?.iter().filter_map(|t| t.parse::().ok()).filter(|v| v.is_finite() && *v > 0.0).collect(); let lo = nums.iter().copied().fold(f64::INFINITY, f64::min); let hi = nums.iter().copied().fold(0.0, f64::max); (lo.is_finite() && hi > 0.0).then_some((lo, hi)) diff --git a/crates/lensdb/src/tests.rs b/crates/lensdb/src/tests.rs index 24b5368c37..1265e549a2 100644 --- a/crates/lensdb/src/tests.rs +++ b/crates/lensdb/src/tests.rs @@ -251,6 +251,14 @@ fn built_in_lens_matches_by_camera_mount_and_focal_range() { let l = db.find_lens(None, "6.0-72.0 mm f/2.7-3.5", cam).unwrap(); assert_eq!(l.mounts, ["canonS5"]); assert!(db.find_lens(None, "6.0-72.0 mm f/2.7-3.5", None).is_none()); + // a file with no make still finds the camera by its full model name + assert!(db.find_camera("", "Canon PowerShot S5 IS").is_some()); + // the exact-name lookup never falls back to the camera's mount + assert!(db.find_lens_named(None, "6.0-72.0 mm f/2.7-3.5", cam).is_none()); + // a focal length that overflows to infinity is ignored, not taken as an unbounded range + let huge = format!("6.0-{}9 mm f/2.7-3.5", "9".repeat(400)); + assert_eq!(db.find_lens(None, &huge, cam).unwrap().mounts, ["canonS5"]); + assert_eq!(exif_focal_range(&tokens(&huge)), Some((6.0, 6.0))); } /// A hand-edited or corrupt database may carry any number: infinities, NaN, enormous or negative diff --git a/crates/pipeline/src/geometry.rs b/crates/pipeline/src/geometry.rs index 4c62f7f381..7927ab59f8 100644 --- a/crates/pipeline/src/geometry.rs +++ b/crates/pipeline/src/geometry.rs @@ -92,7 +92,7 @@ impl Frame { /// corrections (profile, embedded camera warp, manual distortion, lateral CA) always do this, as /// a corrected lens never shows the blank past the photo's edge (issue #245); perspective only /// with "Constrain Crop" (`with_persp`), so a keystone fix can keep its corners. - fn constrain_to_image(&mut self, with_persp: bool) { + pub(crate) fn constrain_to_image(&mut self, with_persp: bool) { let Some(full) = self.warp.as_ref().filter(|w| w.moves_pixels()) else { return }; let optics; let wp = if with_persp || full.persp == Homography::IDENTITY { diff --git a/crates/pipeline/src/lib.rs b/crates/pipeline/src/lib.rs index 5f00591cb2..7d66fe8169 100644 --- a/crates/pipeline/src/lib.rs +++ b/crates/pipeline/src/lib.rs @@ -296,6 +296,10 @@ pub fn frame_for(src: &Rgb32f, info: &SourceInfo, s: &DevelopSettings, apply_cro let mut frame = geometry::Frame::with_lens(src.width, src.height, s, apply_crop, info.lens.as_ref()); if s.optics.remove_ca && s.section_enabled("optics") { frame.add_lateral_ca(optics::estimate_lateral_ca(src)); + if apply_crop { + // The estimated CA moves the colour planes too: keep the crop inside every one of them. + frame.constrain_to_image(s.geometry.constrain_crop); + } } frame } diff --git a/crates/ui-egui/locales/it.json b/crates/ui-egui/locales/it.json index da12c5aa34..dc82654287 100644 --- a/crates/ui-egui/locales/it.json +++ b/crates/ui-egui/locales/it.json @@ -2419,5 +2419,44 @@ "AI Denoise from": "Riduzione disturbo IA da", "New raw photos shot at this ISO or above start with AI Denoise on, and their denoised pictures are made in the background after the import. Needs a denoise model (Settings, AI Denoise).": "Le nuove foto raw scattate a questo ISO o superiore iniziano con la riduzione disturbo IA attiva, e le loro immagini ripulite vengono create in background dopo l’importazione. Serve un modello di riduzione disturbo (Impostazioni, Riduzione disturbo IA).", "Photos and previews kept in memory, so the photos you go back to show at once. Automatic uses a quarter of this computer's memory, up to 16 GB. Choose more for big shoots, but leave some for other apps.": "Foto e anteprime tenute in memoria, così le foto a cui torni si vedono subito. Automatico usa un quarto della memoria di questo computer, fino a 16 GB. Scegli di più per i servizi grandi, ma lascia spazio alle altre app.", - "Finding skin and faces to retouch": "Ricerca di pelle e volti da ritoccare" + "Finding skin and faces to retouch": "Ricerca di pelle e volti da ritoccare", + "Always merge into the open library": "Unisci sempre alla libreria aperta", + "Another library was opened since this window appeared: nothing was imported": "Nel frattempo è stata aperta un'altra libreria: non è stato importato nulla", + "Ask me": "Chiedimelo", + "Ask me lists your recent libraries at launch. Holding Alt (Option on a Mac) as the window appears asks once.": "Chiedimelo mostra le librerie recenti all'avvio. Tenendo premuto Alt (Opzione su Mac) mentre compare la finestra, la domanda viene fatta una volta sola.", + "Ask where to import it": "Chiedi dove importarlo", + "At launch": "All'avvio", + "Burst: shots at most this far apart": "Raffica: scatti distanti al massimo", + "Checking recent libraries": "Controllo delle librerie recenti", + "Choose the library to open.": "Scegli la libreria da aprire.", + "Close a dialog by clicking outside it": "Chiudi una finestra di dialogo facendo clic fuori", + "Create Library and Import": "Crea libreria e importa", + "Create a new library": "Crea una nuova libreria", + "Dialogs": "Finestre di dialogo", + "Don't ask again (always merge into the open library)": "Non chiedere più (unisci sempre alla libreria aperta)", + "Last opened": "Ultima apertura", + "{app} opens the new library, then imports the catalog into it. Its folder must be new or empty.": "{app} apre la nuova libreria e poi vi importa il catalogo. La sua cartella deve essere nuova o vuota.", + "Lower it when a panning or moving burst splits into several groups.": "Abbassalo quando una raffica in panning o in movimento si divide in più gruppi.", + "No horizon or vertical lines to level by": "Nessun orizzonte o linea verticale su cui livellare", + "No recent libraries. Open one from a folder, or make a new one.": "Nessuna libreria recente. Aprine una da una cartella o creane una nuova.", + "Not answering yet: the drive may be asleep or offline": "Non risponde ancora: il disco potrebbe essere in stop o scollegato", + "Not found: moved, renamed or on a disconnected drive": "Non trovata: spostata, rinominata o su un disco scollegato", + "Open": "Apri", + "Open a Library": "Apri una libreria", + "Open a library first, then drop the presets again": "Apri prima una libreria, poi trascina di nuovo i preset", + "Open now": "Aperta ora", + "Open the last library": "Apri l'ultima libreria", + "Remove from List": "Rimuovi dall'elenco", + "The catalog's photos, collections and edits join the ones already in this library.": "Foto, raccolte e modifiche del catalogo si aggiungono a quelle già presenti in questa libreria.", + "The import reads the catalog without changing it. Next, choose whether its photos, edits, keywords and collections join the library open now or go into a new library.": "L'importazione legge il catalogo senza modificarlo. Poi scegli se foto, modifiche, parole chiave e raccolte vanno nella libreria aperta ora o in una nuova libreria.", + "The library is empty: the catalog's photos, collections and edits become its first.": "La libreria è vuota: foto, raccolte e modifiche del catalogo saranno le sue prime.", + "The library itself stays where it is.": "La libreria resta dov'è.", + "The library's catalog can't be read:": "Impossibile leggere il catalogo della libreria:", + "The photos are imported once a library is open": "Le foto vengono importate appena c'è una libreria aperta", + "There is no {app} library in this folder any more": "In questa cartella non c'è più una libreria {app}", + "This folder can't be read:": "Impossibile leggere questa cartella:", + "This is a file, not a library folder": "Questo è un file, non una cartella di libreria", + "This library couldn't be checked": "Impossibile controllare questa libreria", + "This library couldn't be checked:": "Impossibile controllare questa libreria:", + "When importing a Lightroom catalog": "Quando importi un catalogo Lightroom" } diff --git a/crates/ui-egui/src/panels/dialogs.rs b/crates/ui-egui/src/panels/dialogs.rs index 75067f02b5..b32f1601c5 100644 --- a/crates/ui-egui/src/panels/dialogs.rs +++ b/crates/ui-egui/src/panels/dialogs.rs @@ -1554,7 +1554,8 @@ pub fn show(app: &mut LccApp, ctx: &egui::Context) { } close = true; } - Err(e) if matches!(dlg, Dialog::MovePhotos { .. }) => { + // a prompt (Rename Folder, …) that is refused closes and says why + Err(e) if matches!(dlg, Dialog::MovePhotos { .. } | Dialog::TextPrompt { .. }) => { app.toast(ctx, e); close = true; } diff --git a/crates/ui-egui/src/panels/keymap.rs b/crates/ui-egui/src/panels/keymap.rs index aeb9b90614..7659ebdd73 100644 --- a/crates/ui-egui/src/panels/keymap.rs +++ b/crates/ui-egui/src/panels/keymap.rs @@ -292,6 +292,9 @@ fn fixed_keys(app: &LccApp, ui: &mut egui::Ui, t: &Tokens, mac: bool, needle: &s ("End", "Grid: last photo of the view"), ("Shift+Left", "Grid: add the previous photo to the selection"), ("Shift+Right", "Grid: add the next photo to the selection"), + ("Shift+Up", "Grid: add the photos up to the row above to the selection"), + ("Shift+Down", "Grid: add the photos down to the row below to the selection"), + ("Ctrl+Shift+Left", "Grid: Ctrl+Shift+arrows extend the selection like Shift+arrows"), ] { fixed.push((sc.to_string(), label)); } diff --git a/crates/ui-egui/src/shortcuts.rs b/crates/ui-egui/src/shortcuts.rs index 9437000f3c..30cd9ac53d 100644 --- a/crates/ui-egui/src/shortcuts.rs +++ b/crates/ui-egui/src/shortcuts.rs @@ -473,10 +473,20 @@ pub fn handle(app: &mut LccApp, ctx: &egui::Context) { fire.push(id.to_string()); } } - // Shift+← / Shift+→: the previous / next photo of the view joins the selection - for (key, step) in [(Key::ArrowLeft, -1i64), (Key::ArrowRight, 1)] { - if matches(i, Modifiers::SHIFT, key) && !taken.contains(&(Modifiers::SHIFT, key)) { - fire.push(format!("grid:extend:{step}")); + // Shift+arrows and Ctrl+Shift+arrows (as in the Windows file manager, where Ctrl keeps a + // scattered selection; here Shift already adds to the selection, so both do the same): + // ← / → add the previous / next photo of the view, ↑ / ↓ every photo up to the cell above / + // below the active one + for mods in [Modifiers::SHIFT, Modifiers::COMMAND | Modifiers::SHIFT] { + for (key, id) in [ + (Key::ArrowLeft, "grid:extend:-1"), + (Key::ArrowRight, "grid:extend:1"), + (Key::ArrowUp, "grid:extend:up"), + (Key::ArrowDown, "grid:extend:down"), + ] { + if matches(i, mods, key) && !taken.contains(&(mods, key)) { + fire.push(id.to_string()); + } } } } @@ -556,6 +566,32 @@ pub fn handle(app: &mut LccApp, ctx: &egui::Context) { if let Some(id) = edge { let _ = app.run("library.select", json!({"ids": [id.0], "active": id.0})); } + } else if f == "grid:extend:up" || f == "grid:extend:down" { + // Shift+↑ / Shift+↓ in a grid: every photo from the active one to the cell above / below it + // (the layout's nearest cell, as plain ↑ / ↓ move to) joins the selection; the cell reached + // becomes the active photo. In the top / bottom row, or while the grid isn't laid out for the + // photos in view, the key does nothing. + let down = f == "grid:extend:down"; + let reach = crate::panels::grid::row_distance(app, down).and_then(|d| usize::try_from(d).ok()).unwrap_or(0); + let vis = app.session.visible_cloned(); + let run: Vec = app + .session + .active() + .and_then(|active| vis.iter().position(|p| *p == active)) + .and_then(|pos| { + if down { + let end = pos.checked_add(reach)?; + Some(vis.get(pos.checked_add(1)?..=end)?.iter().map(|p| p.0).collect()) + } else { + // nearest the active photo first, so the cell reached is the last one added + Some(vis.get(pos.checked_sub(reach)?..pos)?.iter().rev().map(|p| p.0).collect()) + } + }) + .filter(|_| reach > 0) + .unwrap_or_default(); + if !run.is_empty() { + let _ = app.run("library.select", json!({"ids": run, "mode": "add"})); + } } else if let Some(step) = f.strip_prefix("grid:extend:") { // Shift+← / Shift+→ in a grid: the neighbour of the active photo joins the selection and // becomes the active one. At either end of the view the key does nothing. diff --git a/crates/ui-egui/src/tests_keymap.rs b/crates/ui-egui/src/tests_keymap.rs index b06aba963d..0cc83ad4b3 100644 --- a/crates/ui-egui/src/tests_keymap.rs +++ b/crates/ui-egui/src/tests_keymap.rs @@ -669,6 +669,81 @@ fn navigation_open_library_and_hdr_keys_wait_for_a_text_field() { assert!(h.app.ui.dialog.is_none()); } +/// Shift+Up / Shift+Down in a grid add every photo from the active one to the cell above / below it +/// (the cell plain Up / Down move to) and make that cell active; the top and bottom rows do nothing, +/// and the loupe has no such key. +#[test] +fn shift_up_down_extend_the_grid_selection_by_a_row() { + let (mut h, vis, middle) = grid_demo(); + let at = vis.iter().position(|p| *p == middle).unwrap(); + + press(&mut h, "Down", &["shift"]); + let reached = h.app.session.active().unwrap(); + let to = vis.iter().position(|p| *p == reached).unwrap(); + assert!(to > at, "the active photo moved down the grid: {at} -> {to}"); + let mut got = h.app.session.selection.ids.clone(); + got.sort_by_key(|p| p.0); + let mut want = vis[at..=to].to_vec(); + want.sort_by_key(|p| p.0); + assert_eq!(got, want, "everything from the active photo to the cell below is selected"); + + // Shift+Up from there reaches the row the selection began on again: nothing is deselected + let before = h.app.session.selection.ids.len(); + press(&mut h, "Up", &["shift"]); + assert!(h.app.session.selection.ids.len() >= before, "Shift+Up never removes photos"); + for p in &vis[at..=to] { + assert!(h.app.session.selection.contains(*p), "{p:?} stays selected"); + } + + // the first row has no row above, the last none below: the selection stays as it is + select(&mut h, vis[0]); + press(&mut h, "Up", &["shift"]); + assert_eq!(h.app.session.selection.ids, vec![vis[0]], "Shift+Up in the first row is a no-op"); + let last = *vis.last().unwrap(); + select(&mut h, last); + press(&mut h, "Down", &["shift"]); + assert_eq!(h.app.session.selection.ids, vec![last], "Shift+Down in the last row is a no-op"); + + // outside a grid it is not the extension key + select(&mut h, middle); + view(&mut h, json!({ "view": "detail" })); + press(&mut h, "Down", &["shift"]); + assert_eq!(h.app.session.selection.ids, vec![middle], "the loupe has no grid extension key"); +} + +/// Ctrl+Shift+arrows extend the grid selection like Shift+arrows and keep a scattered selection: +/// the photos selected earlier stay, wherever they are. +#[test] +fn ctrl_shift_arrows_extend_the_grid_selection_and_keep_the_rest() { + let (mut h, vis, middle) = grid_demo(); + let at = vis.iter().position(|p| *p == middle).unwrap(); + let (previous, next) = (vis[at - 1], vis[at + 1]); + + press(&mut h, "Right", &["cmd", "shift"]); + assert_eq!(h.app.session.selection.ids, vec![middle, next], "Ctrl+Shift+Right adds the next photo"); + assert_eq!(h.app.session.active(), Some(next)); + press(&mut h, "Left", &["cmd", "shift"]); + press(&mut h, "Left", &["cmd", "shift"]); + assert_eq!(h.app.session.selection.ids, vec![middle, next, previous], "Ctrl+Shift+Left adds the previous photo"); + + // a photo far away, selected earlier, stays selected + let far = vis[0]; + let r = h.request("engine.execute", json!({"command": "library.select", "params": {"ids": [far.0], "mode": "add"}}), T); + assert_eq!(r["ok"], true, "{r}"); + press(&mut h, "Right", &["cmd", "shift"]); + assert!(h.app.session.selection.contains(far), "the photo selected earlier stays"); + assert!(h.app.session.selection.contains(middle) && h.app.session.selection.contains(next)); + + // downwards it adds the row, as Shift+Down does + select(&mut h, middle); + press(&mut h, "Down", &["cmd", "shift"]); + let reached = h.app.session.active().unwrap(); + assert_ne!(reached, middle, "Ctrl+Shift+Down moved the active photo"); + assert!(h.app.session.selection.contains(middle), "the start of the selection stays"); + assert!(h.app.session.selection.ids.len() >= 2); +} + + /// Shift+Left / Shift+Right belong to the grid: while the full-screen preview covers it they leave /// the selection alone. (Home / End are Library module keys in the Classic set and step to the /// first / last photo there too.) diff --git a/docs/library-shortcuts.md b/docs/library-shortcuts.md index 4ae4025de4..7fb365d357 100644 --- a/docs/library-shortcuts.md +++ b/docs/library-shortcuts.md @@ -54,9 +54,12 @@ in the grids, and `\` given to another command runs that command. Flag cycling and raise/lower use each photo's own flag, so a mixed selection steps together without being made uniform. Adobe's shortcut list names the backtick "Cycle flag settings" but does not state the order; unflagged → pick → reject is the app's choice. The key is the logical grave key, so it follows the keyboard layout (on layouts where it is a dead accent key, assign another key in Help → Keyboard Shortcuts to `photo.cycleFlag`). `Home` and `End` make the first or last photo of the view the active, selected one. `Shift` + `←` / -`→` add the previous or next photo of the view to the selection and make the added photo active; the -key never removes a photo from the selection, and at either end of the view it does nothing. These -four keys work in Photo Grid and Square Grid only. They wait in Detail, Compare and Survey, in the +`→` add the previous or next photo of the view to the selection and make the added photo active; +`Shift` + `↑` / `↓` add every photo from the active one up to the cell above or below it (the cell +plain `↑` / `↓` move to) and make that cell active. `Ctrl` + `Shift` with an arrow does the same, as +the Windows file manager's Ctrl+Shift+arrows keep a scattered selection (`⌘` + `Shift` on macOS). The +keys never remove a photo from the selection, and at either end of the view (the top or bottom row +for `↑` / `↓`) they do nothing. These keys work in Photo Grid and Square Grid only. They wait in Detail, Compare and Survey, in the full-screen preview (which covers the grid), while a text field or a dialog has the keyboard, and when you gave the same key to a command in Help → Keyboard Shortcuts, where they are listed under Fixed keys. diff --git a/docs/parity-checklist.md b/docs/parity-checklist.md index 24828d96fa..ac2c8fc008 100644 --- a/docs/parity-checklist.md +++ b/docs/parity-checklist.md @@ -896,7 +896,7 @@ PLAN.md §2 carry the status of that survey ("unverified" where it said so) unti | KEYC-VIEWS | Classic view keys (E, G, C, N, L, F, I, ⇧R, ⌘⌥0) | P2 | ✅ | `cmd:view.loupe`, `cmd:view.gridToggle`, `cmd:view.compare`, `cmd:view.survey`, `cmd:view.lightsOut`, `cmd:view.screenMode`, `cmd:view.zoom100` | P1.3 Classic set: E Library loupe, G grid, C compare, N survey, L lights out, F full-screen preview, ⇧F screen modes, ⌘⌥F normal, I info, ⇧R reference, ⌘⌥0 1:1 | | KEYC-SECONDWINDOW | Classic secondary-window keys | P2 | ✅ | `cmd:second.grid`, `cmd:second.loupe`, `cmd:second.compare`, `cmd:second.survey`, `cmd:second.slideshow`, `cmd:view.secondWindow` | P1.3: ⇧G grid, ⇧E loupe, ⇧C compare, ⇧N survey, ⌘⇧↩ slideshow, ⌘F11 open | | KEYC-CATALOG | Classic photo/catalog keys (⇧⌘I, ⌘', ⌘R, F2, ⌫, ⇧⌘E…) | P2 | ✅ | `cmd:library.import`, `cmd:photo.delete`, `cmd:photo.virtualCopy`, `cmd:app.showInFinder`, `cmd:dialog.rename`, `cmd:photo.editInExternal` | ⇧⌘I add, ⌘' virtual copy, ⌘R show in Finder, F2 rename, ⌫ delete, ⇧⌘E external editor | -| KEYC-COMPARE | Classic grid/compare keys (Z, Home/End, =/−, ⌘⇧D, S…) | P2 | ✅ | `cmd:view.zoomToggle`, `cmd:view.thumbSizeUp`, `cmd:view.thumbSizeDown`, `cmd:library.first`, `cmd:library.last`, `cmd:stack.toggle` | Z toggles zoom; C compare; = / − grid thumbnail size (Photo Grid, Square Grid, People); Library module keys (`LIBRARY_KEYS` in `crates/ui-egui/src/module.rs`): Home / End first / last photo, backslash the filter bar in the grids (Show Original in a loupe), ⌘L Enable Filters (`cmd:library.toggleFilters`, G28); stacks S (grid), ⇧S top, ⌘G / ⌘⇧G group / ungroup | +| KEYC-COMPARE | Classic grid/compare keys (Z, Home/End, =/−, ⌘⇧D, S…) | P2 | ✅ | `cmd:view.zoomToggle`, `cmd:view.thumbSizeUp`, `cmd:view.thumbSizeDown`, `cmd:library.first`, `cmd:library.last`, `cmd:stack.toggle` | Z toggles zoom; C compare; = / − grid thumbnail size (Photo Grid, Square Grid, People); Library module keys (`LIBRARY_KEYS` in `crates/ui-egui/src/module.rs`): Home / End first / last photo, ⇧← / ⇧→ add the neighbour and ⇧↑ / ⇧↓ every photo up to the cell above / below (⌘⇧ + arrow the same; `shift_up_down_extend_the_grid_selection_by_a_row` in `crates/ui-egui/src/tests_keymap.rs`), backslash the filter bar in the grids (Show Original in a loupe), ⌘L Enable Filters (`cmd:library.toggleFilters`, G28); stacks S (grid), ⇧S top, ⌘G / ⌘⇧G group / ungroup | | KEYC-RATING | Classic rating/flag keys (1–5, ⇧1–5, 6–9, P, X, U, ⇧X, ⇧U, `[` `]`, \`, ⌘↑ ⌘↓) | P2 | ✅ | `cmd:photo.rate`, `cmd:photo.pick`, `cmd:photo.flag`, `cmd:photo.increaseRating`, `cmd:photo.decreaseRating`, `cmd:photo.flagToggle`, `cmd:photo.cycleFlag`, `cmd:photo.increaseFlag`, `cmd:photo.decreaseFlag`, `cmd:library.toggleFilters` | 0–5 / Shift+0–5 and 6–9 / Shift+6–9; P/X/U and Shift+P/X/U in every view (issue #1707); P1.3: `[` / `]` rate down/up in Library (brush size in Develop), \` toggles the pick flag (Classic keymap; `photo.cycleFlag` cycles each selected photo's flag unflagged → pick → reject → unflagged), ⌘↑ / ⌘↓ (Ctrl on Windows/Linux) raise / lower it (reject < unflagged < pick, clamped; one undo step, Compare/Survey act on the active photo, Auto Advance follows). Caps Lock auto-advance is not detected (egui reports no Caps Lock state): use Photo ▸ Auto Advance | | KEYC-COLLECTIONS | Classic collection keys (⌘N, B…) | P2 | ✅ | `cmd:dialog.newAlbum`, `cmd:album.toggleTarget` | ⌘N New Collection…; P1.3: B adds to / removes from the target collection everywhere (brush is K) | | KEYC-METADATA | Classic keyword/metadata keys (⌘K, ⌘S, ⌘⌥⇧C/V…) | P2 | ✅ | `cmd:photo.saveMetadataToFile`, `cmd:photo.copyMetadata`, `cmd:photo.pasteMetadata`, `cmd:panel.keywords`, `cmd:panel.editKeywords`, `cmd:keyword.toggleFromSet` | ⌘S saves metadata; ⌘⇧K (Ctrl+Shift+K) Edit Keywords opens the keyword picked in the Keyword List in Edit Keyword Tag (upstream #2879); P1.3: ⌘K keywords, ⌘⌥⇧C / ⌘⌥⇧V copy/paste metadata, ⌥1–9 keyword set (the plan's Ctrl+Alt+0–9 would collide with module switching; Classic uses ⌥) | diff --git a/docs/ui-parity.md b/docs/ui-parity.md index 3b9763d2b4..24d2c50e53 100644 --- a/docs/ui-parity.md +++ b/docs/ui-parity.md @@ -1,4 +1,4 @@ -# UI parity +| 2026-10-25 | minor | Shortcuts: Shift+Up / Shift+Down and Ctrl+Shift+arrows extend the selection in the two library grids, with keyboard tests |# UI parity > **Last reviewed:** 2026-10-10 · **Last updated:** 2026-10-23 · **Change:** patch (upstream merge: context menus move instead of flashing, issue #1877); minor (upstream: diagnostic overlays noted as the zoom row's remainder; brush A / B presets; zoom row: overlays and soft proofing sharp at 1:1; gap closed; canvas tools by keyboard; focus-order test; ~50 unnamed hand-drawn widgets named) · **Target:** Adobe Lightroom Classic 15.5 / Lightroom 9.6 @@ -77,7 +77,7 @@ auto-repeat used to flip the zoom back and forth (`crates/ui-egui/src/space_hand **Grid thumbnail size (KEYC-COMPARE):** Classic's `=` and `-` increase and decrease the Grid thumbnail size (same keys on macOS and Windows; `+` also works for the larger size here, as Shift+`=` or the keypad). They step the bottom-bar slider by 30 pt inside its 90–480 pt range, in Photo Grid, Square Grid and People only; Detail, Compare, Survey and Reference ignore them, and ⌘= / ⌘− stay Zoom In / Out. See [library shortcuts](library-shortcuts.md). -**Library navigation keys (KEYC-COMPARE):** in Photo Grid and Square Grid, `Home` / `End` make the first / last photo of the view the active, selected one, and `Shift+Left` / `Shift+Right` add the previous / next photo of the view to the selection (the added photo becomes active; the keys never remove a photo from the selection, and do nothing at either end of the view). They wait in the other views, in the full-screen preview, while a text field or a dialog has the keyboard, and when you gave the key to a command; they are listed under Fixed keys in Help → Keyboard Shortcuts. `Cmd+O` (`Ctrl+O` on Windows and Linux) runs File → Open Library… ; View → Visualize HDR has no default key (`Shift+H` cycles the Tool Overlay, issue #224; `Cmd+Shift+H` stays the Histogram). Covered by `crates/ui-egui/src/tests_keymap.rs`; the macOS native menu path for `Cmd+O` is not exercised by the headless tests. +**Library navigation keys (KEYC-COMPARE):** in Photo Grid and Square Grid, `Home` / `End` make the first / last photo of the view the active, selected one, and `Shift+Left` / `Shift+Right` add the previous / next photo of the view to the selection, `Shift+Up` / `Shift+Down` every photo up to the cell above / below the active one (the cell plain Up / Down move to); `Ctrl+Shift` with an arrow does the same, as the Windows file manager's Ctrl+Shift+arrows keep a scattered selection (the added photo, or the cell reached, becomes active; the keys never remove a photo from the selection, and do nothing at either end of the view, or in the top / bottom row for Up / Down). They wait in the other views, in the full-screen preview, while a text field or a dialog has the keyboard, and when you gave the key to a command; they are listed under Fixed keys in Help → Keyboard Shortcuts. `Cmd+O` (`Ctrl+O` on Windows and Linux) runs File → Open Library… ; View → Visualize HDR has no default key (`Shift+H` cycles the Tool Overlay, issue #224; `Cmd+Shift+H` stays the Histogram). Covered by `crates/ui-egui/src/tests_keymap.rs`; the macOS native menu path for `Cmd+O` is not exercised by the headless tests. **Still missing / broken:** - Tab / ⇧Tab (hide the side panels / all panels): Tab moves the keyboard focus here (accessibility), so it is diff --git a/docs/whats-new/2026-10-26-upstream-r3-fixes.md b/docs/whats-new/2026-10-26-upstream-r3-fixes.md new file mode 100644 index 0000000000..c67b70284d --- /dev/null +++ b/docs/whats-new/2026-10-26-upstream-r3-fixes.md @@ -0,0 +1,10 @@ +### Grid selection keys, folder renames and smaller fixes +- In Photo Grid and Square Grid, Shift+Up / Shift+Down add every photo up to the cell above or below the active one, + and Ctrl+Shift (⌘⇧ on macOS) with an arrow extends the selection like Shift with that arrow. +- A date folder inside the library (an import's `Originals/2026-10-16`) can be renamed; the library's own folders + still can't, and a refused rename now says why. +- Opening another library while the face scan runs starts the scan's progress over instead of showing it nearly done. +- Compact cameras with a built-in lens find their lens profile even when the file names no camera make. +- Lens corrections with Remove Chromatic Aberration keep the crop inside every colour plane, so no edge shows. +- On Windows, a hard link to an original counts as that original. +- A SAM 3 mirror given as a `file://` URL may use `%20`-style escapes in its path. From 5dda973af2c1ad4f8ed2b3303f7d37727a0f59aa Mon Sep 17 00:00:00 2001 From: Andrew Frahn Date: Mon, 26 Oct 2026 18:59:46 +1100 Subject: [PATCH 2/2] fmt Co-Authored-By: Claude Opus 5.5 --- crates/ui-egui/src/tests_keymap.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/crates/ui-egui/src/tests_keymap.rs b/crates/ui-egui/src/tests_keymap.rs index 0cc83ad4b3..3b84569152 100644 --- a/crates/ui-egui/src/tests_keymap.rs +++ b/crates/ui-egui/src/tests_keymap.rs @@ -743,7 +743,6 @@ fn ctrl_shift_arrows_extend_the_grid_selection_and_keep_the_rest() { assert!(h.app.session.selection.ids.len() >= 2); } - /// Shift+Left / Shift+Right belong to the grid: while the full-screen preview covers it they leave /// the selection alone. (Home / End are Library module keys in the Classic set and step to the /// first / last photo there too.)