From 9d09742d4a16d38b1d74efacc5a9e308ee7db056 Mon Sep 17 00:00:00 2001 From: Nathaniel Ledford Date: Sat, 24 Oct 2026 09:02:37 -0400 Subject: [PATCH 1/3] LRC-LIB-SMARTCOLL: a smart album on a loop of albums testing one another holds no photos, and says which album it loops through --- crates/catalog/src/index.rs | 24 +- crates/catalog/src/lib.rs | 34 ++- crates/catalog/src/tests_looping_albums.rs | 235 ++++++++++++++++++++ crates/ui-egui/locales/cs-formats.json | 3 +- crates/ui-egui/locales/cs.json | 4 +- crates/ui-egui/locales/de-formats.json | 3 +- crates/ui-egui/locales/de.json | 4 +- crates/ui-egui/locales/es-formats.json | 3 +- crates/ui-egui/locales/es.json | 4 +- crates/ui-egui/locales/fi-formats.json | 3 +- crates/ui-egui/locales/fi.json | 4 +- crates/ui-egui/locales/fr-formats.json | 3 +- crates/ui-egui/locales/fr.json | 4 +- crates/ui-egui/locales/id-formats.json | 3 +- crates/ui-egui/locales/id.json | 4 +- crates/ui-egui/locales/it-formats.json | 3 +- crates/ui-egui/locales/it.json | 4 +- crates/ui-egui/locales/ja-formats.json | 3 +- crates/ui-egui/locales/ja.json | 4 +- crates/ui-egui/locales/ka-formats.json | 3 +- crates/ui-egui/locales/ka.json | 4 +- crates/ui-egui/locales/pl-formats.json | 3 +- crates/ui-egui/locales/pl.json | 4 +- crates/ui-egui/locales/pt-br-formats.json | 3 +- crates/ui-egui/locales/pt-br.json | 4 +- crates/ui-egui/locales/ru-formats.json | 3 +- crates/ui-egui/locales/ru.json | 4 +- crates/ui-egui/locales/sv-formats.json | 3 +- crates/ui-egui/locales/sv.json | 4 +- crates/ui-egui/locales/uk-formats.json | 3 +- crates/ui-egui/locales/uk.json | 4 +- crates/ui-egui/locales/vi-formats.json | 3 +- crates/ui-egui/locales/vi.json | 4 +- crates/ui-egui/locales/zh-hans-formats.json | 3 +- crates/ui-egui/locales/zh-hans.json | 4 +- crates/ui-egui/locales/zh-hant-formats.json | 3 +- crates/ui-egui/locales/zh-hant.json | 4 +- crates/ui-egui/src/i18n.rs | 14 ++ crates/ui-egui/src/panels.rs | 19 +- crates/ui-egui/src/panels/grid.rs | 9 +- crates/ui-egui/src/panels/left/albums.rs | 6 + crates/ui-egui/src/tests.rs | 1 + crates/ui-egui/src/tests/looping_albums.rs | 160 +++++++++++++ docs/parity-checklist.md | 3 +- docs/whats-new.md | 13 ++ 45 files changed, 594 insertions(+), 43 deletions(-) create mode 100644 crates/catalog/src/tests_looping_albums.rs create mode 100644 crates/ui-egui/src/tests/looping_albums.rs diff --git a/crates/catalog/src/index.rs b/crates/catalog/src/index.rs index 2c347473bc..3d77378714 100644 --- a/crates/catalog/src/index.rs +++ b/crates/catalog/src/index.rs @@ -8,7 +8,7 @@ //! `AddAlbum`, `RemoveAlbum`, `SetAlbumPhotos`) update them as they apply, inverses and the //! rollback of a failed batch included, as those are ops too. -use std::collections::{HashMap, HashSet}; +use std::collections::{BTreeSet, HashMap, HashSet}; use std::sync::OnceLock; use crate::{AlbumId, Catalog, PhotoId, StackId}; @@ -20,6 +20,10 @@ pub(crate) struct Indexes { stacks: OnceLock>>, /// Album → its photos (regular albums; a smart album's list is empty). albums: OnceLock>>, + /// The smart albums on a loop (see [`crate::Catalog::album_on_a_loop`]). Built from the albums' + /// rules, so forgotten whenever an album is added or removed or its rules change (and by no + /// other op: photos never change which album tests which). + looping: OnceLock>, } /// A copy builds its own when asked (copies are made to be saved, not queried). @@ -45,6 +49,12 @@ impl std::fmt::Debug for Indexes { } impl Indexes { + /// An op is about to add or remove an album or change its rules (the undo of any of them is + /// one of those too): the albums on a loop are worked out again when asked. + pub(crate) fn forget_loops(&mut self) { + self.looping.take(); + } + /// Stack `id` held `old` and holds `new` now (empty: it was added, or is gone). pub(crate) fn stack_changed(&mut self, id: StackId, old: &[PhotoId], new: &[PhotoId]) { let Some(Some(m)) = self.stacks.get_mut() else { return }; @@ -73,6 +83,18 @@ impl Indexes { } impl Catalog { + /// The smart albums that lead back to themselves through the albums they test, worked out once + /// (by [`crate::AlbumGraph`]) and kept until an album is added, removed or has its rules changed. + pub(crate) fn looping(&self) -> &BTreeSet { + self.index.looping.get_or_init(|| crate::AlbumGraph::of(self.albums.values()).on_a_loop()) + } + + /// Whether the albums on a loop are worked out and kept now (what the tests look at). + #[cfg(test)] + pub(crate) fn loops_known(&self) -> bool { + self.index.looping.get().is_some() + } + /// The stack photo `photo` is in, by the index (built on first use). pub(crate) fn stack_id_of(&self, photo: PhotoId) -> Option { let m = self.index.stacks.get_or_init(|| { diff --git a/crates/catalog/src/lib.rs b/crates/catalog/src/lib.rs index 5a82d2a67d..65e3b49620 100644 --- a/crates/catalog/src/lib.rs +++ b/crates/catalog/src/lib.rs @@ -560,8 +560,33 @@ impl Catalog { /// Whether smart album `id` with `rules` (as [`Filter::prepare`]d) holds `p`. fn smart_album_has(&self, id: AlbumId, rules: &Filter, prepared: &query::Prepared, p: &Photo) -> bool { - // guarded: a smart album testing smart albums can't loop or recurse without end - !p.deleted && rules::smart_album_holds(id, p.id, || rules.matches_in(p, self, prepared)) + // an album on a loop holds nothing, whoever asks (see `album_on_a_loop`); beyond that, a + // smart album testing smart albums can't recurse without end (the guard) + !p.deleted && !self.looping().contains(&id) && rules::smart_album_holds(id, p.id, || rules.matches_in(p, self, prepared)) + } + + /// Whether album `id` is on a loop: a smart album that includes itself, directly or through + /// the smart albums it tests. Such an album holds no photos ([`Self::album_photos`], + /// [`Self::album_count`], [`Self::album_contains`] and the grid all agree), until its rules or + /// those of an album on the loop change. An album that only tests a looping album is not on + /// the loop: it is worked out as usual, seeing the looping album as empty. + pub fn album_on_a_loop(&self, id: AlbumId) -> bool { + self.looping().contains(&id) + } + + /// For an album on a loop, an album it tests that leads back to it: the one to name when + /// saying why it is empty (itself when it tests itself and nothing else on the loop). `None` + /// for an album that is not on a loop. + pub fn album_loops_through(&self, id: AlbumId) -> Option { + if !self.album_on_a_loop(id) { + return None; + } + let tested = self.albums.get(&id)?.smart.as_deref()?.albums_tested(); + tested + .iter() + .copied() + .find(|b| *b != id && self.album_on_a_loop(*b) && self.album_reaches(*b, id)) + .or_else(|| tested.contains(&id).then_some(id)) } /// Whether smart album `from` tests `to`, directly or through the smart albums it tests (the @@ -936,6 +961,7 @@ impl Catalog { } Op::AddAlbum { album } => { self.plans = PlansMemo::default(); + self.index.forget_loops(); if self.albums.contains_key(&album.id) { return Err(CatalogError::Invalid(format!("album {:?} exists", album.id))); } @@ -958,6 +984,7 @@ impl Catalog { } Op::RemoveAlbum { id } => { self.plans = PlansMemo::default(); + self.index.forget_loops(); if self.albums.values().any(|a| a.parent == Some(id)) { return Err(CatalogError::Invalid("folder is not empty".into())); } @@ -1019,6 +1046,7 @@ impl Catalog { } Op::SetAlbumRules { id, rules } => { self.plans = PlansMemo::default(); + self.index.forget_loops(); self.validate_rules(&rules)?; let a = self.album_mut(id)?; let Some(old) = a.smart.as_mut() else { @@ -1543,6 +1571,8 @@ mod tests_lock; #[cfg(all(test, not(target_arch = "wasm32")))] mod tests_log_thread; #[cfg(test)] +mod tests_looping_albums; +#[cfg(test)] mod tests_repair; #[cfg(test)] mod tests_rule_order; diff --git a/crates/catalog/src/tests_looping_albums.rs b/crates/catalog/src/tests_looping_albums.rs new file mode 100644 index 0000000000..50f887dd2d --- /dev/null +++ b/crates/catalog/src/tests_looping_albums.rs @@ -0,0 +1,235 @@ +//! A smart album on a loop (it includes itself through the albums it tests) holds nothing, +//! whichever way it is asked: its photos, its count, whether it holds one photo, the grid's query +//! for it. The rule, stated once: +//! +//! * an album **on** a loop (a ring of albums testing one another, or one testing itself) holds no +//! photos; +//! * an album **off** every loop is worked out as always, and one that tests a looping album sees +//! it as the empty album it is (so "is in A" matches nothing and "isn't in A" matches all); +//! * mending the loop (changing rules, removing an album) gives each album its photos back. + +use super::*; + +/// A smart album with `any` of the rules in `rules` (a JSON array). +fn any_of(id: u64, rules: serde_json::Value) -> Album { + let filter: Filter = serde_json::from_value(serde_json::json!({"ruleSet": {"match": "any", "rules": rules}})).unwrap(); + Album { smart: Some(Box::new(filter)), ..Album::new(AlbumId(id), format!("Smart {id}")) } +} + +fn in_album(op: &str, id: u64) -> serde_json::Value { + serde_json::json!({"field": "album", "op": op, "value": id}) +} + +fn picked() -> serde_json::Value { + serde_json::json!({"field": "flag", "op": "is", "value": "pick"}) +} + +fn rated(n: u64) -> serde_json::Value { + serde_json::json!({"field": "rating", "op": "gte", "value": n}) +} + +/// Three photos: `.0` is picked, `.1` is rated 5, `.2` is neither. +fn photos(c: &mut Catalog) -> (PhotoId, PhotoId, PhotoId) { + let mut add = |name: &str| { + let id = c.alloc_photo_id(); + let p = Photo::new(id, Source::Demo { scene: 1 }, name, "JPEG", 600, 400, "2026-09-30T10:00:00"); + c.apply(Op::AddPhoto { photo: Box::new(p) }).unwrap(); + id + }; + let ids = (add("picked.jpg"), add("rated.jpg"), add("plain.jpg")); + c.apply(Op::SetFlag { id: ids.0, flag: Flag::Pick }).unwrap(); + c.apply(Op::SetRating { id: ids.1, rating: 5 }).unwrap(); + ids +} + +fn add(c: &mut Catalog, album: Album) { + c.apply(Op::AddAlbum { album }).unwrap(); +} + +/// What the grid shows for `album`: the query the sidebar click makes. +fn grid(c: &Catalog, album: u64) -> Vec { + c.query(&Filter { album: Some(AlbumId(album)), ..Default::default() }, &Sort::default()) +} + +/// Every way of asking what an album holds agrees it holds `want`. +#[track_caller] +fn assert_holds(c: &Catalog, album: u64, want: &[PhotoId]) { + let mut want = want.to_vec(); + want.sort(); + let mut got = c.album_photos(AlbumId(album)); + got.sort(); + assert_eq!(got, want, "album_photos of {album}"); + assert_eq!(c.album_count(AlbumId(album)), want.len(), "album_count of {album}"); + let mut shown = grid(c, album); + shown.sort(); + assert_eq!(shown, want, "the grid's source for {album}"); + for p in c.photos() { + assert_eq!(c.album_contains(AlbumId(album), p), want.contains(&p.id), "album_contains of {album} for {:?}", p.id); + } +} + +/// 1 ⇄ 2: each holds the photos of its own rule, or those of the other. Without the loop, 1 holds +/// the picked and the rated photo, and so does 2. +fn two_albums_in_a_loop() -> (Catalog, (PhotoId, PhotoId, PhotoId)) { + let mut c = Catalog::new(); + let p = photos(&mut c); + add(&mut c, any_of(1, serde_json::json!([picked(), in_album("is", 2)]))); + add(&mut c, any_of(2, serde_json::json!([rated(4), in_album("is", 1)]))); + (c, p) +} + +#[test] +fn two_albums_that_test_each_other_hold_nothing() { + let (c, _) = two_albums_in_a_loop(); + assert_holds(&c, 1, &[]); + assert_holds(&c, 2, &[]); +} + +#[test] +fn an_album_that_tests_itself_holds_nothing() { + let mut c = Catalog::new(); + photos(&mut c); + add(&mut c, any_of(1, serde_json::json!([picked(), in_album("is", 1)]))); + assert_holds(&c, 1, &[]); +} + +#[test] +fn every_album_on_a_longer_ring_holds_nothing_and_the_ones_leading_into_it_do_not_count_as_on_it() { + let mut c = Catalog::new(); + let (picked_photo, rated_photo, plain) = photos(&mut c); + // 1 → 2 → 3 → 1 + add(&mut c, any_of(1, serde_json::json!([picked(), in_album("is", 2)]))); + add(&mut c, any_of(2, serde_json::json!([rated(4), in_album("is", 3)]))); + add(&mut c, any_of(3, serde_json::json!([rated(1), in_album("is", 1)]))); + // 4 tests the ring (a tail into it), 5 tests 4: neither is on it + add(&mut c, any_of(4, serde_json::json!([rated(4), in_album("is", 1)]))); + add(&mut c, any_of(5, serde_json::json!([in_album("is", 4)]))); + for ring in [1, 2, 3] { + assert_holds(&c, ring, &[]); + } + assert_holds(&c, 4, &[rated_photo]); + assert_holds(&c, 5, &[rated_photo]); + let _ = (picked_photo, plain); +} + +#[test] +fn a_smart_album_off_every_loop_is_as_it_was() { + let mut c = Catalog::new(); + let (picked_photo, rated_photo, _) = photos(&mut c); + let (a, b) = (any_of(1, serde_json::json!([picked(), in_album("is", 2)])), any_of(2, serde_json::json!([rated(4), in_album("is", 1)]))); + add(&mut c, a); + add(&mut c, b); + // 3 and 4 form a chain, no loop: 4 holds what 3 holds + add(&mut c, any_of(3, serde_json::json!([picked(), rated(4)]))); + add(&mut c, any_of(4, serde_json::json!([in_album("is", 3)]))); + assert_holds(&c, 3, &[picked_photo, rated_photo]); + assert_holds(&c, 4, &[picked_photo, rated_photo]); +} + +#[test] +fn an_album_that_tests_a_looping_album_sees_it_as_empty() { + let (mut c, (a, b, d)) = two_albums_in_a_loop(); + // 3 isn't on the loop; it asks about album 1 + add(&mut c, any_of(3, serde_json::json!([in_album("is", 1)]))); + let mut not_in_one = any_of(4, serde_json::json!([in_album("isNot", 1)])); + not_in_one.name = "Not in one".into(); + add(&mut c, not_in_one); + assert_holds(&c, 3, &[]); + assert_holds(&c, 4, &[a, b, d]); +} + +#[test] +fn a_regular_album_is_not_a_loop() { + let (mut c, (a, ..)) = two_albums_in_a_loop(); + add(&mut c, Album { photos: vec![a], ..Album::new(AlbumId(9), "Plain") }); + assert_holds(&c, 9, &[a]); +} + +#[test] +fn mending_the_loop_gives_the_photos_back() { + let (mut c, (picked_photo, rated_photo, _)) = two_albums_in_a_loop(); + assert_holds(&c, 1, &[]); + // 2 stops testing 1 + let before = any_of(2, serde_json::json!([rated(4), in_album("is", 1)])).smart.unwrap(); + let inv = c.apply(Op::SetAlbumRules { id: AlbumId(2), rules: any_of(2, serde_json::json!([rated(4)])).smart.unwrap() }).unwrap(); + assert_holds(&c, 2, &[rated_photo]); + assert_holds(&c, 1, &[picked_photo, rated_photo]); + // undoing that brings the loop, and the emptiness, back + c.apply(inv).unwrap(); + assert_eq!(c.album(AlbumId(2)).and_then(|a| a.smart.as_deref()), Some(&*before)); + assert_holds(&c, 1, &[]); + assert_holds(&c, 2, &[]); + // removing 2 leaves 1 testing an album that is gone + c.apply(Op::RemoveAlbum { id: AlbumId(2) }).unwrap(); + assert_holds(&c, 1, &[picked_photo]); + // adding it back closes the loop again + add(&mut c, any_of(2, serde_json::json!([rated(4), in_album("is", 1)]))); + assert_holds(&c, 1, &[]); +} + +#[test] +fn the_loop_can_say_which_album_it_goes_through() { + let (mut c, _) = two_albums_in_a_loop(); + assert!(c.album_on_a_loop(AlbumId(1)) && c.album_on_a_loop(AlbumId(2))); + assert_eq!(c.album_loops_through(AlbumId(1)), Some(AlbumId(2))); + assert_eq!(c.album_loops_through(AlbumId(2)), Some(AlbumId(1))); + // 3 tests an album on the loop, and 4 tests itself as well as 3 + add(&mut c, any_of(3, serde_json::json!([in_album("is", 1)]))); + add(&mut c, any_of(4, serde_json::json!([in_album("is", 4)]))); + assert!(!c.album_on_a_loop(AlbumId(3)), "a tail into a loop is not on it"); + assert_eq!(c.album_loops_through(AlbumId(3)), None); + assert_eq!(c.album_loops_through(AlbumId(4)), Some(AlbumId(4)), "an album that tests itself loops through itself"); + // a plain album and an album that does not exist + add(&mut c, Album::new(AlbumId(5), "Plain")); + assert!(!c.album_on_a_loop(AlbumId(5)) && !c.album_on_a_loop(AlbumId(99))); + assert_eq!(c.album_loops_through(AlbumId(5)), None); +} + +#[test] +fn on_a_longer_ring_the_album_named_is_one_that_leads_back() { + let mut c = Catalog::new(); + // 1 → 2 → 3 → 1, and 1 also tests 7, which tests itself (a loop of its own, not 1's) + add(&mut c, any_of(1, serde_json::json!([in_album("is", 7), in_album("is", 2)]))); + add(&mut c, any_of(2, serde_json::json!([in_album("is", 3)]))); + add(&mut c, any_of(3, serde_json::json!([in_album("is", 1)]))); + add(&mut c, any_of(7, serde_json::json!([in_album("is", 7)]))); + assert_eq!(c.album_loops_through(AlbumId(1)), Some(AlbumId(2)), "7 is on a loop, but not the one 1 is on"); + assert_eq!(c.album_loops_through(AlbumId(2)), Some(AlbumId(3))); + assert_eq!(c.album_loops_through(AlbumId(3)), Some(AlbumId(1))); +} + +/// Asking is cheap: the albums on a loop are worked out once, and again only after an op that adds +/// or removes an album or changes rules, not after the edits to photos the library sees all day. +#[test] +fn the_loops_are_remembered_until_an_album_changes() { + let (mut c, (a, ..)) = two_albums_in_a_loop(); + assert!(!c.loops_known()); + assert_holds(&c, 1, &[]); + assert!(c.loops_known()); + c.apply(Op::SetRating { id: a, rating: 3 }).unwrap(); + c.apply(Op::SetFlag { id: a, flag: Flag::Reject }).unwrap(); + assert!(c.loops_known(), "photo edits don't change which album tests which"); + c.apply(Op::SetAlbumRules { id: AlbumId(2), rules: any_of(2, serde_json::json!([rated(4)])).smart.unwrap() }).unwrap(); + assert!(!c.loops_known(), "new rules"); + assert!(!c.album_on_a_loop(AlbumId(1))); + assert!(c.loops_known()); + add(&mut c, Album::new(AlbumId(9), "New")); + assert!(!c.loops_known(), "a new album"); + assert!(!c.album_on_a_loop(AlbumId(1))); + c.apply(Op::RemoveAlbum { id: AlbumId(9) }).unwrap(); + assert!(!c.loops_known(), "a removed album"); + // a copy builds its own when asked + assert!(!c.album_on_a_loop(AlbumId(1))); + assert!(!c.clone().loops_known()); +} + +/// A refused op leaves no half-forgotten state behind: the answer after it is still right. +#[test] +fn a_refused_edit_leaves_the_answers_as_they_were() { + let (mut c, _) = two_albums_in_a_loop(); + assert_holds(&c, 1, &[]); + assert!(c.apply(Op::SetAlbumRules { id: AlbumId(404), rules: any_of(1, serde_json::json!([rated(4)])).smart.unwrap() }).is_err()); + assert!(c.apply(Op::AddAlbum { album: any_of(1, serde_json::json!([rated(4)])) }).is_err(), "the id is taken"); + assert_holds(&c, 1, &[]); + assert_holds(&c, 2, &[]); +} diff --git a/crates/ui-egui/locales/cs-formats.json b/crates/ui-egui/locales/cs-formats.json index 77c37c84fc..9af24164c4 100644 --- a/crates/ui-egui/locales/cs-formats.json +++ b/crates/ui-egui/locales/cs-formats.json @@ -325,5 +325,6 @@ "View › Detail View ({keys}).": "Zobrazení › Zobrazení detailu ({keys}).", "File › Export… · File › Print… ({keys}).": "Soubor › Exportovat… · Soubor › Tisk… ({keys}).", "{n} folder{} could not be read": "Složky, které se nepodařilo přečíst: {n}{:.0}", - "{n} file{} skipped (not a supported photo type)": "Přeskočené soubory (nejde o podporovaný typ fotografie): {n}{:.0}" + "{n} file{} skipped (not a supported photo type)": "Přeskočené soubory (nejde o podporovaný typ fotografie): {n}{:.0}", + "It leads back to itself through “{}”: change the rules of one album on the loop (Edit Smart Album…)": "Vede zpět samo na sebe přes album „{}“: změňte pravidla jednoho alba ve smyčce (Upravit inteligentní album…)" } diff --git a/crates/ui-egui/locales/cs.json b/crates/ui-egui/locales/cs.json index ea10219217..aad91cb6e8 100644 --- a/crates/ui-egui/locales/cs.json +++ b/crates/ui-egui/locales/cs.json @@ -2472,5 +2472,7 @@ "Welcome": "Vítejte", "Next": "Další", "Get Started": "Začít", - "Stopped at the scan limit: there may be more photos": "Zastaveno na limitu skenování: je možné, že existují další fotografie" + "Stopped at the scan limit: there may be more photos": "Zastaveno na limitu skenování: je možné, že existují další fotografie", + "This album is in a loop, so it shows nothing": "Toto album je ve smyčce, a proto nic nezobrazuje", + "It tests itself: change its rules (Edit Smart Album…)": "Testuje samo sebe: změňte jeho pravidla (Upravit inteligentní album…)" } diff --git a/crates/ui-egui/locales/de-formats.json b/crates/ui-egui/locales/de-formats.json index 7e78396a1c..7b13330f72 100644 --- a/crates/ui-egui/locales/de-formats.json +++ b/crates/ui-egui/locales/de-formats.json @@ -326,5 +326,6 @@ "{name} is installed and in use: face recognition is on": "{name} ist installiert und in Gebrauch: Gesichtserkennung ist eingeschaltet", "Bring photos in with File › Import Photos… ({keys}).": "Fotos holen Sie mit Datei › Fotos importieren… ({keys}) in die Bibliothek.", "View › Detail View ({keys}).": "Ansicht › Detailansicht ({keys}).", - "File › Export… · File › Print… ({keys}).": "Datei › Exportieren… · Datei › Drucken… ({keys})." + "File › Export… · File › Print… ({keys}).": "Datei › Exportieren… · Datei › Drucken… ({keys}).", + "It leads back to itself through “{}”: change the rules of one album on the loop (Edit Smart Album…)": "Es führt über das Album „{}“ zu sich selbst zurück: Ändere die Regeln eines Albums im Kreis (Smart-Album bearbeiten…)" } diff --git a/crates/ui-egui/locales/de.json b/crates/ui-egui/locales/de.json index bc67606eb6..b4910b99df 100644 --- a/crates/ui-egui/locales/de.json +++ b/crates/ui-egui/locales/de.json @@ -3507,5 +3507,7 @@ "Start the app with --control 7980 (or LIGHTCRAFT_CONTROL_PORT), then lightcraft-cli mcp --connect attaches one to it.": "Starten Sie die App mit --control 7980 (oder LIGHTCRAFT_CONTROL_PORT), dann verbindet lightcraft-cli mcp --connect einen Agenten mit ihr.", "Welcome": "Willkommen", "Next": "Weiter", - "Get Started": "Loslegen" + "Get Started": "Loslegen", + "This album is in a loop, so it shows nothing": "Dieses Album ist in einem Kreis und zeigt deshalb nichts", + "It tests itself: change its rules (Edit Smart Album…)": "Es prüft sich selbst: Ändere seine Regeln (Smart-Album bearbeiten…)" } diff --git a/crates/ui-egui/locales/es-formats.json b/crates/ui-egui/locales/es-formats.json index 77d40f0ec0..817895fef8 100644 --- a/crates/ui-egui/locales/es-formats.json +++ b/crates/ui-egui/locales/es-formats.json @@ -326,5 +326,6 @@ "{name} is installed and in use: face recognition is on": "{name} está instalado y en uso: el reconocimiento facial está activado", "Bring photos in with File › Import Photos… ({keys}).": "Importa fotos con Archivo › Importar fotos… ({keys}).", "View › Detail View ({keys}).": "Vista › Vista de detalle ({keys}).", - "File › Export… · File › Print… ({keys}).": "Archivo › Exportar… · Archivo › Imprimir… ({keys})." + "File › Export… · File › Print… ({keys}).": "Archivo › Exportar… · Archivo › Imprimir… ({keys}).", + "It leads back to itself through “{}”: change the rules of one album on the loop (Edit Smart Album…)": "Vuelve a sí mismo a través del álbum “{}”: cambia las reglas de uno de los álbumes del bucle (Editar álbum inteligente…)" } diff --git a/crates/ui-egui/locales/es.json b/crates/ui-egui/locales/es.json index c34057bdfe..bf381e91fa 100644 --- a/crates/ui-egui/locales/es.json +++ b/crates/ui-egui/locales/es.json @@ -2426,5 +2426,7 @@ "Start the app with --control 7980 (or LIGHTCRAFT_CONTROL_PORT), then lightcraft-cli mcp --connect attaches one to it.": "Inicia la aplicación con --control 7980 (o LIGHTCRAFT_CONTROL_PORT), y lightcraft-cli mcp --connect conecta un agente a ella.", "Welcome": "Bienvenido", "Next": "Siguiente", - "Get Started": "Empezar" + "Get Started": "Empezar", + "This album is in a loop, so it shows nothing": "Este álbum está en un bucle, así que no muestra nada", + "It tests itself: change its rules (Edit Smart Album…)": "Se comprueba a sí mismo: cambia sus reglas (Editar álbum inteligente…)" } diff --git a/crates/ui-egui/locales/fi-formats.json b/crates/ui-egui/locales/fi-formats.json index 31f6c32b5d..bde2a17fd9 100644 --- a/crates/ui-egui/locales/fi-formats.json +++ b/crates/ui-egui/locales/fi-formats.json @@ -322,5 +322,6 @@ "View › Detail View ({keys}).": "Näytä › Tarkastelunäkymä ({keys}).", "File › Export… · File › Print… ({keys}).": "Tiedosto › Vie… · Tiedosto › Tulosta… ({keys}).", "{n} folder{} could not be read": "Kansiot, joita ei voitu lukea: {n}{:.0}", - "{n} file{} skipped (not a supported photo type)": "Ohitetut tiedostot (ei tuettu valokuvatyyppi): {n}{:.0}" + "{n} file{} skipped (not a supported photo type)": "Ohitetut tiedostot (ei tuettu valokuvatyyppi): {n}{:.0}", + "It leads back to itself through “{}”: change the rules of one album on the loop (Edit Smart Album…)": "Se johtaa takaisin itseensä albumin ”{}” kautta: muuta jonkin silmukan albumin sääntöjä (Muokkaa älyalbumia…)" } diff --git a/crates/ui-egui/locales/fi.json b/crates/ui-egui/locales/fi.json index 59cc611cd6..98f59687ca 100644 --- a/crates/ui-egui/locales/fi.json +++ b/crates/ui-egui/locales/fi.json @@ -2383,5 +2383,7 @@ "Top bar": "Yläpalkki", "Tool strip": "Työkalupalkki", "Bottom bar": "Alapalkki", - "Stopped at the scan limit: there may be more photos": "Skannauksen raja saavutettiin: valokuvia voi olla lisää" + "Stopped at the scan limit: there may be more photos": "Skannauksen raja saavutettiin: valokuvia voi olla lisää", + "This album is in a loop, so it shows nothing": "Tämä albumi on silmukassa, joten se ei näytä mitään", + "It tests itself: change its rules (Edit Smart Album…)": "Se testaa itseään: muuta sen sääntöjä (Muokkaa älyalbumia…)" } diff --git a/crates/ui-egui/locales/fr-formats.json b/crates/ui-egui/locales/fr-formats.json index ba6bcc7b0f..d901812e97 100644 --- a/crates/ui-egui/locales/fr-formats.json +++ b/crates/ui-egui/locales/fr-formats.json @@ -326,5 +326,6 @@ "{name} is installed and in use: face recognition is on": "{name} est installé et utilisé : la reconnaissance des visages est activée", "Bring photos in with File › Import Photos… ({keys}).": "Importez des photos avec Fichier › Importer des photos… ({keys}).", "View › Detail View ({keys}).": "Affichage › Vue de détail ({keys}).", - "File › Export… · File › Print… ({keys}).": "Fichier › Exporter… · Fichier › Imprimer… ({keys})." + "File › Export… · File › Print… ({keys}).": "Fichier › Exporter… · Fichier › Imprimer… ({keys}).", + "It leads back to itself through “{}”: change the rules of one album on the loop (Edit Smart Album…)": "Il revient sur lui-même via l'album « {} » : modifiez les règles d'un album de la boucle (Modifier l'album intelligent…)" } diff --git a/crates/ui-egui/locales/fr.json b/crates/ui-egui/locales/fr.json index 31e6814b6d..633df63311 100644 --- a/crates/ui-egui/locales/fr.json +++ b/crates/ui-egui/locales/fr.json @@ -3609,5 +3609,7 @@ "Start the app with --control 7980 (or LIGHTCRAFT_CONTROL_PORT), then lightcraft-cli mcp --connect attaches one to it.": "Démarrez l'application avec --control 7980 (ou LIGHTCRAFT_CONTROL_PORT), puis lightcraft-cli mcp --connect y connecte un agent.", "Welcome": "Bienvenue", "Next": "Suivant", - "Get Started": "Commencer" + "Get Started": "Commencer", + "This album is in a loop, so it shows nothing": "Cet album est pris dans une boucle : il n'affiche rien", + "It tests itself: change its rules (Edit Smart Album…)": "Il se teste lui-même : modifiez ses règles (Modifier l'album intelligent…)" } diff --git a/crates/ui-egui/locales/id-formats.json b/crates/ui-egui/locales/id-formats.json index 7bd027cc35..e51d65329d 100644 --- a/crates/ui-egui/locales/id-formats.json +++ b/crates/ui-egui/locales/id-formats.json @@ -325,5 +325,6 @@ "View › Detail View ({keys}).": "Tampilan › Tampilan Detail ({keys}).", "File › Export… · File › Print… ({keys}).": "File › Ekspor… · File › Cetak… ({keys}).", "{n} folder{} could not be read": "Folder yang tidak bisa dibaca: {n}{:.0}", - "{n} file{} skipped (not a supported photo type)": "File yang dilewati (bukan jenis foto yang didukung): {n}{:.0}" + "{n} file{} skipped (not a supported photo type)": "File yang dilewati (bukan jenis foto yang didukung): {n}{:.0}", + "It leads back to itself through “{}”: change the rules of one album on the loop (Edit Smart Album…)": "Album ini kembali ke dirinya sendiri melalui album “{}”: ubah aturan salah satu album dalam perulangan (Edit album pintar…)" } diff --git a/crates/ui-egui/locales/id.json b/crates/ui-egui/locales/id.json index 52705328cc..bb5e7c20ad 100644 --- a/crates/ui-egui/locales/id.json +++ b/crates/ui-egui/locales/id.json @@ -2397,5 +2397,7 @@ "Top bar": "Bilah atas", "Tool strip": "Bilah alat", "Bottom bar": "Bilah bawah", - "Stopped at the scan limit: there may be more photos": "Berhenti pada batas pemindaian: mungkin masih ada foto" + "Stopped at the scan limit: there may be more photos": "Berhenti pada batas pemindaian: mungkin masih ada foto", + "This album is in a loop, so it shows nothing": "Album ini berada dalam perulangan, jadi tidak menampilkan apa pun", + "It tests itself: change its rules (Edit Smart Album…)": "Album ini menjadikan dirinya sendiri syarat: ubah aturannya (Edit album pintar…)" } diff --git a/crates/ui-egui/locales/it-formats.json b/crates/ui-egui/locales/it-formats.json index 922bac810d..cbd19a8255 100644 --- a/crates/ui-egui/locales/it-formats.json +++ b/crates/ui-egui/locales/it-formats.json @@ -325,5 +325,6 @@ "View › Detail View ({keys}).": "Visualizza › Vista dettaglio ({keys}).", "File › Export… · File › Print… ({keys}).": "File › Esporta… · File › Stampa… ({keys}).", "{n} folder{} could not be read": "Cartelle non leggibili: {n}{:.0}", - "{n} file{} skipped (not a supported photo type)": "File saltati (non è un tipo di foto supportato): {n}{:.0}" + "{n} file{} skipped (not a supported photo type)": "File saltati (non è un tipo di foto supportato): {n}{:.0}", + "It leads back to itself through “{}”: change the rules of one album on the loop (Edit Smart Album…)": "Ritorna su se stesso attraverso l'album “{}”: modifica le regole di un album del ciclo (Modifica album smart…)" } diff --git a/crates/ui-egui/locales/it.json b/crates/ui-egui/locales/it.json index 5b0ccc0cee..490906ec88 100644 --- a/crates/ui-egui/locales/it.json +++ b/crates/ui-egui/locales/it.json @@ -2590,5 +2590,7 @@ "Welcome": "Benvenuto", "Next": "Avanti", "Get Started": "Inizia", - "Stopped at the scan limit: there may be more photos": "Fermati al limite di scansione: potrebbero esserci altre foto" + "Stopped at the scan limit: there may be more photos": "Fermati al limite di scansione: potrebbero esserci altre foto", + "This album is in a loop, so it shows nothing": "Questo album è in un ciclo, quindi non mostra nulla", + "It tests itself: change its rules (Edit Smart Album…)": "Verifica se stesso: modifica le sue regole (Modifica album smart…)" } diff --git a/crates/ui-egui/locales/ja-formats.json b/crates/ui-egui/locales/ja-formats.json index 9f7dd3fe7c..e1ad2a0c05 100644 --- a/crates/ui-egui/locales/ja-formats.json +++ b/crates/ui-egui/locales/ja-formats.json @@ -326,5 +326,6 @@ "{name} is installed and in use: face recognition is on": "{name} をインストールして使用中です:顔認識はオンです", "Bring photos in with File › Import Photos… ({keys}).": "ファイル › 写真を読み込む… ({keys}) で写真を読み込みます。", "View › Detail View ({keys}).": "表示 › 詳細表示 ({keys})。", - "File › Export… · File › Print… ({keys}).": "ファイル › 書き出す… · ファイル › 印刷… ({keys})。" + "File › Export… · File › Print… ({keys}).": "ファイル › 書き出す… · ファイル › 印刷… ({keys})。", + "It leads back to itself through “{}”: change the rules of one album on the loop (Edit Smart Album…)": "アルバム「{}」を通じて自分自身に戻っています。循環しているアルバムのどれかの条件を変更してください(スマートアルバムを編集…)" } diff --git a/crates/ui-egui/locales/ja.json b/crates/ui-egui/locales/ja.json index 97c15dd019..2d251def1a 100644 --- a/crates/ui-egui/locales/ja.json +++ b/crates/ui-egui/locales/ja.json @@ -2424,5 +2424,7 @@ "Start the app with --control 7980 (or LIGHTCRAFT_CONTROL_PORT), then lightcraft-cli mcp --connect attaches one to it.": "アプリを --control 7980 (または LIGHTCRAFT_CONTROL_PORT) で起動してから、lightcraft-cli mcp --connect でエージェントを接続できます。", "Welcome": "ようこそ", "Next": "次へ", - "Get Started": "始める" + "Get Started": "始める", + "This album is in a loop, so it shows nothing": "このアルバムは循環しているため、何も表示されません", + "It tests itself: change its rules (Edit Smart Album…)": "自分自身を条件にしています。条件を変更してください(スマートアルバムを編集…)" } diff --git a/crates/ui-egui/locales/ka-formats.json b/crates/ui-egui/locales/ka-formats.json index b13dc07d30..70b5001d38 100644 --- a/crates/ui-egui/locales/ka-formats.json +++ b/crates/ui-egui/locales/ka-formats.json @@ -328,5 +328,6 @@ "View › Detail View ({keys}).": "ხედი › დეტალური ხედი ({keys}).", "File › Export… · File › Print… ({keys}).": "ფაილი › ექსპორტი… · ფაილი › დაბეჭდვა… ({keys}).", "{n} folder{} could not be read": "საქაღალდეები, რომლებიც ვერ წაიკითხა: {n}{:.0}", - "{n} file{} skipped (not a supported photo type)": "გამოტოვებული ფაილები (მხარდაუჭერელი ფოტოს ტიპია): {n}{:.0}" + "{n} file{} skipped (not a supported photo type)": "გამოტოვებული ფაილები (მხარდაუჭერელი ფოტოს ტიპია): {n}{:.0}", + "It leads back to itself through “{}”: change the rules of one album on the loop (Edit Smart Album…)": "ის საკუთარ თავს უბრუნდება ალბომის „{}“ გავლით: შეცვალეთ ციკლში მყოფი ერთ-ერთი ალბომის წესები (სმარტ-ალბომის რედაქტირება…)" } diff --git a/crates/ui-egui/locales/ka.json b/crates/ui-egui/locales/ka.json index 30769b60fa..db4743619e 100644 --- a/crates/ui-egui/locales/ka.json +++ b/crates/ui-egui/locales/ka.json @@ -3692,5 +3692,7 @@ "Tool strip": "ხელსაწყოების ზოლი", "Bottom bar": "ქვედა ზოლი", "Prevent G-SYNC/FreeSync flicker (applies at next launch)": "G-SYNC/FreeSync-ის ციმციმის თავიდან აცილება (ამოქმედდება შემდეგი გაშვებისას)", - "Stopped at the scan limit: there may be more photos": "სკანირების ლიმიტზე გაჩერდა: შესაძლოა სხვა ფოტოებიც არის" + "Stopped at the scan limit: there may be more photos": "სკანირების ლიმიტზე გაჩერდა: შესაძლოა სხვა ფოტოებიც არის", + "This album is in a loop, so it shows nothing": "ეს ალბომი ციკლშია, ამიტომ არაფერს აჩვენებს", + "It tests itself: change its rules (Edit Smart Album…)": "ის საკუთარ თავს ამოწმებს: შეცვალეთ მისი წესები (სმარტ-ალბომის რედაქტირება…)" } diff --git a/crates/ui-egui/locales/pl-formats.json b/crates/ui-egui/locales/pl-formats.json index f03219ae1e..dfafc2bac8 100644 --- a/crates/ui-egui/locales/pl-formats.json +++ b/crates/ui-egui/locales/pl-formats.json @@ -325,5 +325,6 @@ "View › Detail View ({keys}).": "Widok › Widok szczegółów ({keys}).", "File › Export… · File › Print… ({keys}).": "Plik › Eksportuj… · Plik › Drukuj… ({keys}).", "{n} folder{} could not be read": "Nie udało się odczytać folderów: {n}{:.0}", - "{n} file{} skipped (not a supported photo type)": "Pominięte pliki (nieobsługiwany typ zdjęcia): {n}{:.0}" + "{n} file{} skipped (not a supported photo type)": "Pominięte pliki (nieobsługiwany typ zdjęcia): {n}{:.0}", + "It leads back to itself through “{}”: change the rules of one album on the loop (Edit Smart Album…)": "Wraca do siebie przez album „{}”: zmień reguły jednego z albumów w pętli (Edytuj album inteligentny…)" } diff --git a/crates/ui-egui/locales/pl.json b/crates/ui-egui/locales/pl.json index dbc29a1941..3b9df13471 100644 --- a/crates/ui-egui/locales/pl.json +++ b/crates/ui-egui/locales/pl.json @@ -2348,5 +2348,7 @@ "Welcome": "Witamy", "Next": "Dalej", "Get Started": "Zaczynamy", - "Stopped at the scan limit: there may be more photos": "Zatrzymano na limicie skanowania: możliwe, że jest więcej zdjęć" + "Stopped at the scan limit: there may be more photos": "Zatrzymano na limicie skanowania: możliwe, że jest więcej zdjęć", + "This album is in a loop, so it shows nothing": "Ten album jest w pętli, więc niczego nie pokazuje", + "It tests itself: change its rules (Edit Smart Album…)": "Sprawdza samego siebie: zmień jego reguły (Edytuj album inteligentny…)" } diff --git a/crates/ui-egui/locales/pt-br-formats.json b/crates/ui-egui/locales/pt-br-formats.json index 4227fe328a..129e28f3af 100644 --- a/crates/ui-egui/locales/pt-br-formats.json +++ b/crates/ui-egui/locales/pt-br-formats.json @@ -326,5 +326,6 @@ "{name} is installed and in use: face recognition is on": "{name} está instalado e em uso: o reconhecimento facial está ativado", "Bring photos in with File › Import Photos… ({keys}).": "Traga fotos com Arquivo › Importar fotos… ({keys}).", "View › Detail View ({keys}).": "Exibir › Exibição de detalhe ({keys}).", - "File › Export… · File › Print… ({keys}).": "Arquivo › Exportar… · Arquivo › Imprimir… ({keys})." + "File › Export… · File › Print… ({keys}).": "Arquivo › Exportar… · Arquivo › Imprimir… ({keys}).", + "It leads back to itself through “{}”: change the rules of one album on the loop (Edit Smart Album…)": "Ele volta para si mesmo pelo álbum “{}”: mude as regras de um álbum do ciclo (Editar álbum inteligente…)" } diff --git a/crates/ui-egui/locales/pt-br.json b/crates/ui-egui/locales/pt-br.json index 3aedd82906..38c292a7de 100644 --- a/crates/ui-egui/locales/pt-br.json +++ b/crates/ui-egui/locales/pt-br.json @@ -2270,5 +2270,7 @@ "Start the app with --control 7980 (or LIGHTCRAFT_CONTROL_PORT), then lightcraft-cli mcp --connect attaches one to it.": "Inicie o aplicativo com --control 7980 (ou LIGHTCRAFT_CONTROL_PORT) e o lightcraft-cli mcp --connect conecta um agente a ele.", "Welcome": "Bem-vindo", "Next": "Próximo", - "Get Started": "Começar" + "Get Started": "Começar", + "This album is in a loop, so it shows nothing": "Este álbum está em um ciclo, então não mostra nada", + "It tests itself: change its rules (Edit Smart Album…)": "Ele testa a si mesmo: mude as regras dele (Editar álbum inteligente…)" } diff --git a/crates/ui-egui/locales/ru-formats.json b/crates/ui-egui/locales/ru-formats.json index 24134de944..e45559df2a 100644 --- a/crates/ui-egui/locales/ru-formats.json +++ b/crates/ui-egui/locales/ru-formats.json @@ -326,5 +326,6 @@ "{name} is installed and in use: face recognition is on": "Модель {name} установлена и используется: распознавание лиц включено", "Bring photos in with File › Import Photos… ({keys}).": "Фотографии добавляются через Файл › Импорт фото… ({keys}).", "View › Detail View ({keys}).": "Вид › Режим детализации ({keys}).", - "File › Export… · File › Print… ({keys}).": "Файл › Экспорт… · Файл › Печать… ({keys})." + "File › Export… · File › Print… ({keys}).": "Файл › Экспорт… · Файл › Печать… ({keys}).", + "It leads back to itself through “{}”: change the rules of one album on the loop (Edit Smart Album…)": "Он возвращается к себе через альбом «{}»: измените условия одного из альбомов в цикле (Изменить смарт-альбом…)" } diff --git a/crates/ui-egui/locales/ru.json b/crates/ui-egui/locales/ru.json index b3df02470e..328bc1a5fb 100644 --- a/crates/ui-egui/locales/ru.json +++ b/crates/ui-egui/locales/ru.json @@ -2632,5 +2632,7 @@ "Start the app with --control 7980 (or LIGHTCRAFT_CONTROL_PORT), then lightcraft-cli mcp --connect attaches one to it.": "Запустите приложение с --control 7980 (или LIGHTCRAFT_CONTROL_PORT), и команда lightcraft-cli mcp --connect подключит к нему одного агента.", "Welcome": "Добро пожаловать", "Next": "Далее", - "Get Started": "Начать" + "Get Started": "Начать", + "This album is in a loop, so it shows nothing": "Этот альбом попал в цикл, поэтому ничего не показывает", + "It tests itself: change its rules (Edit Smart Album…)": "Он проверяет сам себя: измените его условия (Изменить смарт-альбом…)" } diff --git a/crates/ui-egui/locales/sv-formats.json b/crates/ui-egui/locales/sv-formats.json index 124fcb3a18..96ec579add 100644 --- a/crates/ui-egui/locales/sv-formats.json +++ b/crates/ui-egui/locales/sv-formats.json @@ -325,5 +325,6 @@ "View › Detail View ({keys}).": "Visa › Detaljvy ({keys}).", "File › Export… · File › Print… ({keys}).": "Fil › Exportera… · Fil › Skriv ut… ({keys}).", "{n} folder{} could not be read": "Mappar som inte gick att läsa: {n}{:.0}", - "{n} file{} skipped (not a supported photo type)": "Hoppade över filer (fotoformat som inte stöds): {n}{:.0}" + "{n} file{} skipped (not a supported photo type)": "Hoppade över filer (fotoformat som inte stöds): {n}{:.0}", + "It leads back to itself through “{}”: change the rules of one album on the loop (Edit Smart Album…)": "Det leder tillbaka till sig självt via albumet ”{}”: ändra reglerna för ett av albumen i loopen (Redigera smart album…)" } diff --git a/crates/ui-egui/locales/sv.json b/crates/ui-egui/locales/sv.json index 94b9e30333..e7f55f2260 100644 --- a/crates/ui-egui/locales/sv.json +++ b/crates/ui-egui/locales/sv.json @@ -2486,5 +2486,7 @@ "Top bar": "Övre fältet", "Tool strip": "Verktygsfält", "Bottom bar": "Nedre fältet", - "Stopped at the scan limit: there may be more photos": "Stoppade vid skanningsgränsen: det kan finnas fler foton" + "Stopped at the scan limit: there may be more photos": "Stoppade vid skanningsgränsen: det kan finnas fler foton", + "This album is in a loop, so it shows nothing": "Det här albumet ingår i en loop och visar därför ingenting", + "It tests itself: change its rules (Edit Smart Album…)": "Det testar sig självt: ändra dess regler (Redigera smart album…)" } diff --git a/crates/ui-egui/locales/uk-formats.json b/crates/ui-egui/locales/uk-formats.json index d30091f2d2..ddce9d88fd 100644 --- a/crates/ui-egui/locales/uk-formats.json +++ b/crates/ui-egui/locales/uk-formats.json @@ -326,5 +326,6 @@ "{name} is installed and in use: face recognition is on": "{name} установлено й використовується: розпізнавання облич увімкнено", "Bring photos in with File › Import Photos… ({keys}).": "Фотографії імпортуйте через Файл › Імпортувати фото… ({keys}).", "View › Detail View ({keys}).": "Вигляд › Детальне подання ({keys}).", - "File › Export… · File › Print… ({keys}).": "Файл › Експортувати… · Файл › Друк… ({keys})." + "File › Export… · File › Print… ({keys}).": "Файл › Експортувати… · Файл › Друк… ({keys}).", + "It leads back to itself through “{}”: change the rules of one album on the loop (Edit Smart Album…)": "Він повертається до себе через альбом «{}»: змініть правила одного з альбомів у циклі (Редагувати смарт-альбом…)" } diff --git a/crates/ui-egui/locales/uk.json b/crates/ui-egui/locales/uk.json index 09b78fab1e..d138467000 100644 --- a/crates/ui-egui/locales/uk.json +++ b/crates/ui-egui/locales/uk.json @@ -2422,5 +2422,7 @@ "Start the app with --control 7980 (or LIGHTCRAFT_CONTROL_PORT), then lightcraft-cli mcp --connect attaches one to it.": "Запустіть програму з --control 7980 (або LIGHTCRAFT_CONTROL_PORT), і lightcraft-cli mcp --connect під'єднає до неї одного агента.", "Welcome": "Ласкаво просимо", "Next": "Далі", - "Get Started": "Почати" + "Get Started": "Почати", + "This album is in a loop, so it shows nothing": "Цей альбом потрапив у цикл, тому нічого не показує", + "It tests itself: change its rules (Edit Smart Album…)": "Він перевіряє сам себе: змініть його правила (Редагувати смарт-альбом…)" } diff --git a/crates/ui-egui/locales/vi-formats.json b/crates/ui-egui/locales/vi-formats.json index d6c686c3b5..0803ab9206 100644 --- a/crates/ui-egui/locales/vi-formats.json +++ b/crates/ui-egui/locales/vi-formats.json @@ -322,5 +322,6 @@ "View › Detail View ({keys}).": "Xem › Chế độ xem chi tiết ({keys}).", "File › Export… · File › Print… ({keys}).": "Tệp › Xuất… · Tệp › In… ({keys}).", "{n} folder{} could not be read": "Thư mục không đọc được: {n}{:.0}", - "{n} file{} skipped (not a supported photo type)": "Đã bỏ qua tệp (không phải loại ảnh được hỗ trợ): {n}{:.0}" + "{n} file{} skipped (not a supported photo type)": "Đã bỏ qua tệp (không phải loại ảnh được hỗ trợ): {n}{:.0}", + "It leads back to itself through “{}”: change the rules of one album on the loop (Edit Smart Album…)": "Album này quay lại chính nó qua album «{}»: hãy đổi quy tắc của một album trong vòng lặp (Chỉnh sửa album thông minh…)" } diff --git a/crates/ui-egui/locales/vi.json b/crates/ui-egui/locales/vi.json index af27e9aa0a..2e5c4febc0 100644 --- a/crates/ui-egui/locales/vi.json +++ b/crates/ui-egui/locales/vi.json @@ -2711,5 +2711,7 @@ "Top bar": "Thanh trên cùng", "Tool strip": "Thanh công cụ", "Bottom bar": "Thanh dưới cùng", - "Stopped at the scan limit: there may be more photos": "Đã dừng ở giới hạn quét: có thể còn ảnh khác" + "Stopped at the scan limit: there may be more photos": "Đã dừng ở giới hạn quét: có thể còn ảnh khác", + "This album is in a loop, so it shows nothing": "Album này nằm trong một vòng lặp nên không hiển thị gì", + "It tests itself: change its rules (Edit Smart Album…)": "Album này tự kiểm tra chính nó: hãy đổi quy tắc của nó (Chỉnh sửa album thông minh…)" } diff --git a/crates/ui-egui/locales/zh-hans-formats.json b/crates/ui-egui/locales/zh-hans-formats.json index 1d5f27c576..3625784e71 100644 --- a/crates/ui-egui/locales/zh-hans-formats.json +++ b/crates/ui-egui/locales/zh-hans-formats.json @@ -326,5 +326,6 @@ "{name} is installed and in use: face recognition is on": "{name} 已安装并在使用:人脸识别已开启", "Bring photos in with File › Import Photos… ({keys}).": "通过 文件 › 导入照片… ({keys}) 导入照片。", "View › Detail View ({keys}).": "视图 › 详细视图 ({keys})。", - "File › Export… · File › Print… ({keys}).": "文件 › 导出… · 文件 › 打印… ({keys})。" + "File › Export… · File › Print… ({keys}).": "文件 › 导出… · 文件 › 打印… ({keys})。", + "It leads back to itself through “{}”: change the rules of one album on the loop (Edit Smart Album…)": "它通过相册“{0}”回到自身:请更改循环中某个相册的规则(编辑智能相册…)" } diff --git a/crates/ui-egui/locales/zh-hans.json b/crates/ui-egui/locales/zh-hans.json index ca13d782a5..bde231b37b 100644 --- a/crates/ui-egui/locales/zh-hans.json +++ b/crates/ui-egui/locales/zh-hans.json @@ -2425,5 +2425,7 @@ "Start the app with --control 7980 (or LIGHTCRAFT_CONTROL_PORT), then lightcraft-cli mcp --connect attaches one to it.": "先以 --control 7980 (或 LIGHTCRAFT_CONTROL_PORT) 启动应用,lightcraft-cli mcp --connect 即可将一个智能体接入其中。", "Welcome": "欢迎", "Next": "下一步", - "Get Started": "开始使用" + "Get Started": "开始使用", + "This album is in a loop, so it shows nothing": "此相册处于循环中,因此不显示任何内容", + "It tests itself: change its rules (Edit Smart Album…)": "它引用了自身:请更改其规则(编辑智能相册…)" } diff --git a/crates/ui-egui/locales/zh-hant-formats.json b/crates/ui-egui/locales/zh-hant-formats.json index 51fb1109ae..f86d7a69a8 100644 --- a/crates/ui-egui/locales/zh-hant-formats.json +++ b/crates/ui-egui/locales/zh-hant-formats.json @@ -326,5 +326,6 @@ "{name} is installed and in use: face recognition is on": "{name} 已安裝並在使用中:臉部辨識已開啟", "Bring photos in with File › Import Photos… ({keys}).": "透過 檔案 › 匯入照片… ({keys}) 匯入照片。", "View › Detail View ({keys}).": "檢視 › 詳細檢視 ({keys})。", - "File › Export… · File › Print… ({keys}).": "檔案 › 匯出… · 檔案 › 列印… ({keys})。" + "File › Export… · File › Print… ({keys}).": "檔案 › 匯出… · 檔案 › 列印… ({keys})。", + "It leads back to itself through “{}”: change the rules of one album on the loop (Edit Smart Album…)": "它透過相簿「{}」回到自身:請變更循環中某個相簿的規則(編輯智慧型相簿…)" } diff --git a/crates/ui-egui/locales/zh-hant.json b/crates/ui-egui/locales/zh-hant.json index f3dfc422ec..6c4e06967f 100644 --- a/crates/ui-egui/locales/zh-hant.json +++ b/crates/ui-egui/locales/zh-hant.json @@ -2426,5 +2426,7 @@ "Start the app with --control 7980 (or LIGHTCRAFT_CONTROL_PORT), then lightcraft-cli mcp --connect attaches one to it.": "先以 --control 7980 (或 LIGHTCRAFT_CONTROL_PORT) 啟動應用程式,lightcraft-cli mcp --connect 即可將一個代理程式連接到其中。", "Welcome": "歡迎", "Next": "下一步", - "Get Started": "開始使用" + "Get Started": "開始使用", + "This album is in a loop, so it shows nothing": "此相簿處於循環中,因此不顯示任何內容", + "It tests itself: change its rules (Edit Smart Album…)": "它引用了自身:請變更其規則(編輯智慧型相簿…)" } diff --git a/crates/ui-egui/src/i18n.rs b/crates/ui-egui/src/i18n.rs index c9e0e6aead..afc57a9c58 100644 --- a/crates/ui-egui/src/i18n.rs +++ b/crates/ui-egui/src/i18n.rs @@ -397,6 +397,20 @@ pub fn source_title(session: &lightcraft_engine::Session) -> String { } } +/// For a smart album on a loop (it includes itself through the albums it tests, so it holds no +/// photos): what the album's empty view says, as its title and what to do about it, naming the +/// album the loop goes through. `None` for an album that is not on a loop. +pub fn album_loop_note(catalog: &lightcraft_catalog::Catalog, id: lightcraft_catalog::AlbumId) -> Option<(String, String)> { + let through = catalog.album_loops_through(id)?; + let body = if through == id { + tr("It tests itself: change its rules (Edit Smart Album…)").to_string() + } else { + let name = catalog.album(through).map(|a| a.name.clone()).unwrap_or_default(); + tr_format!("It leads back to itself through “{}”: change the rules of one album on the loop (Edit Smart Album…)", name) + }; + Some((tr("This album is in a loop, so it shows nothing").to_string(), body)) +} + /// A date group heading (`2026-09-20`, `2026-09`, `2026`) in the UI language: the grid's full /// form, or the date sidebar's `short` one ("Sunday, 20" / "September" / "2026"). English keeps the /// catalog's own wording; every other language formats it with its `*-formats.json` date diff --git a/crates/ui-egui/src/panels.rs b/crates/ui-egui/src/panels.rs index ed9c45fb5d..799c50f207 100644 --- a/crates/ui-egui/src/panels.rs +++ b/crates/ui-egui/src/panels.rs @@ -31,7 +31,7 @@ pub mod strip; pub mod topbar; pub mod unnamed; -use egui::{Align2, Rect, pos2, vec2}; +use egui::{Rect, pos2, vec2}; use crate::LightcraftApp; pub use crate::dialogs; @@ -112,12 +112,23 @@ pub fn toast(app: &mut LightcraftApp, ctx: &egui::Context) { ctx.request_repaint_after(std::time::Duration::from_millis(30)); } -/// Paint a centred, dimmed message (empty states). +/// Paint a centred, dimmed message (empty states). Each line wraps to the area, so a long one (a +/// translation, an album named in it) is not cut off at its edges. pub fn empty_message(ui: &egui::Ui, rect: Rect, title: &str, body: &str) { let t = Tokens::get(ui.ctx()); let p = ui.painter(); - p.text(rect.center() - vec2(0.0, 12.0), Align2::CENTER_CENTER, crate::i18n::tr(title), t.semibold(18.0), t.text_label); - p.text(rect.center() + vec2(0.0, 14.0), Align2::CENTER_CENTER, crate::i18n::tr(body), t.font(13.0), t.text_dim); + let wrap = (rect.width() - 32.0).max(120.0); + let lay = |text: &str, font: egui::FontId, color: egui::Color32| { + let mut job = egui::text::LayoutJob::simple(text.to_owned(), font, color, wrap); + job.halign = egui::Align::Center; + p.layout_job(job) + }; + let title = lay(crate::i18n::tr(title), t.semibold(18.0), t.text_label); + let body = lay(crate::i18n::tr(body), t.font(13.0), t.text_dim); + // as one block, centred: one line each sits where the two lines always sat + let top = rect.center().y - (title.size().y + 8.0 + body.size().y) / 2.0; + p.galley(pos2(rect.center().x, top), title.clone(), t.text_label); + p.galley(pos2(rect.center().x, top + title.size().y + 8.0), body, t.text_dim); } /// A button under an empty state's message: the command it runs, its label, and the id it is diff --git a/crates/ui-egui/src/panels/grid.rs b/crates/ui-egui/src/panels/grid.rs index db4dfa1b83..af416d7feb 100644 --- a/crates/ui-egui/src/panels/grid.rs +++ b/crates/ui-egui/src/panels/grid.rs @@ -328,7 +328,14 @@ fn show_inner(app: &mut LightcraftApp, ui: &mut egui::Ui) { } app.canvas_rect = Some(ui.max_rect()); if ids.is_empty() { - if !chips.is_empty() { + // an album on a loop is empty because of the loop, whatever filters are on + let loop_note = match app.session.source { + lightcraft_engine::LibrarySource::Album(id) => crate::i18n::album_loop_note(&app.session.catalog, id), + _ => None, + }; + if let Some((title, body)) = loop_note { + super::empty_message(ui, ui.max_rect(), &title, &body); + } else if !chips.is_empty() { let body = match total { Some(n) if n > 0 => { crate::i18n::tr_format!("{n} photos in {} are hidden by the filters above", crate::i18n::source_title(&app.session), n = n) diff --git a/crates/ui-egui/src/panels/left/albums.rs b/crates/ui-egui/src/panels/left/albums.rs index f9a2cf229f..ee5aacdb7d 100644 --- a/crates/ui-egui/src/panels/left/albums.rs +++ b/crates/ui-egui/src/panels/left/albums.rs @@ -72,6 +72,9 @@ fn albums_tree(app: &mut LightcraftApp, ui: &mut egui::Ui, all: &AlbumKids, pare let label = if target == Some(a.id) { format!("{} +", a.name) } else { a.name.clone() }; // a smart album whose rules no longer check (an album they test was deleted) says so let problems = app.caches.smart_album_problems(&app.session.catalog).get(&a.id).cloned().unwrap_or_default(); + // an album on a loop holds nothing: its tooltip says so, and through which album (the ⚠ is + // there already: a loop is one of the problems it reports) + let loop_note = crate::i18n::album_loop_note(&app.session.catalog, a.id); let label = if problems.is_empty() { label } else { format!("⚠ {label}") }; let mut resp = Row::new(&format!("album:{}", a.id.0), icon, &label) .count(Some(n)) @@ -100,6 +103,9 @@ fn albums_tree(app: &mut LightcraftApp, ui: &mut egui::Ui, all: &AlbumKids, pare tip.push_str(&crate::i18n::problem_line(p)); } } + if let Some((title, body)) = &loop_note { + tip.push_str(&format!("\n\n{title}\n{body}")); + } resp = resp.on_hover_text(tip); } if resp.clicked() { diff --git a/crates/ui-egui/src/tests.rs b/crates/ui-egui/src/tests.rs index f801ee843f..caeb70700d 100644 --- a/crates/ui-egui/src/tests.rs +++ b/crates/ui-egui/src/tests.rs @@ -59,6 +59,7 @@ mod library_problem; mod lifecycle_037; mod lightroom_destination; mod lights_out; +mod looping_albums; mod mask_effects; mod masking; mod masking_layout; diff --git a/crates/ui-egui/src/tests/looping_albums.rs b/crates/ui-egui/src/tests/looping_albums.rs new file mode 100644 index 0000000000..692f2b2077 --- /dev/null +++ b/crates/ui-egui/src/tests/looping_albums.rs @@ -0,0 +1,160 @@ +//! A smart album on a loop holds nothing, and says why: its empty view and its sidebar row name +//! the album the loop goes through. An empty album that is not on a loop says nothing of loops, +//! and neither does one that only tests a looping album. + +use std::time::Duration; + +use lightcraft_catalog::{Album, AlbumId, Filter, Op}; +use serde_json::json; + +use crate::headless::Headless; +use crate::{LightcraftApp, Services}; + +const T: Duration = Duration::from_secs(20); +const SETTLE: Duration = Duration::from_secs(120); +const TITLE: &str = "This album is in a loop, so it shows nothing"; + +fn demo() -> Headless { + let services = Services { png: None, ..Default::default() }; + let app = LightcraftApp::new(lightcraft_engine::Session::with_demo(), services); + let mut h = Headless::new(app, [1400.0, 900.0], 1.0); + let r = h.request("ui.set", json!({"view": "photoGrid", "leftPanel": true}), T); + assert_eq!(r["ok"], true, "{r}"); + h.settle(SETTLE); + h +} + +/// A smart album with `any` of the rules. +fn smart(id: u64, name: &str, rules: serde_json::Value) -> Album { + let filter: Filter = serde_json::from_value(json!({"ruleSet": {"match": "any", "rules": rules}})).unwrap(); + Album { smart: Some(Box::new(filter)), ..Album::new(AlbumId(id), name) } +} + +fn is_in(id: u64) -> serde_json::Value { + json!({"field": "album", "op": "is", "value": id}) +} + +fn show(h: &mut Headless, album: u64) { + let r = h.request("engine.execute", json!({"command": "library.source", "params": {"kind": "album", "id": album}}), T); + assert_eq!(r["ok"], true, "{r}"); + h.settle(SETTLE); +} + +fn painted(h: &Headless) -> Vec { + h.painted_text() +} + +/// Alpha (10) and Beta (11) test each other; Gamma (12) tests Alpha without being on the loop; +/// Delta (13) tests itself; Quiet (14) is an ordinary smart album that happens to match nothing. +fn with_a_loop() -> Headless { + let mut h = demo(); + let rating = json!({"field": "rating", "op": "gte", "value": 1}); + let none = json!({"field": "keywords", "op": "contains", "value": "no-such-keyword"}); + for album in [ + smart(10, "Alpha", json!([rating, is_in(11)])), + smart(11, "Beta", json!([rating, is_in(10)])), + smart(12, "Gamma", json!([is_in(10)])), + smart(13, "Delta", json!([rating, is_in(13)])), + smart(14, "Quiet", json!([none])), + ] { + h.app.session.commit("Add album", Op::AddAlbum { album }).unwrap(); + } + h.settle(SETTLE); + h +} + +// Scenario: an album on a loop is empty, and its empty view names the album it loops through +#[test] +fn an_album_on_a_loop_says_it_is_empty_because_of_the_loop() { + let mut h = with_a_loop(); + show(&mut h, 10); + assert_eq!(h.app.session.visible_cloned().len(), 0); + let text = painted(&h); + assert!(text.iter().any(|t| t == TITLE), "{text:?}"); + assert!(text.iter().any(|t| t.contains("“Beta”") && t.contains("Edit Smart Album…")), "the body names the album the loop goes through: {text:?}"); + assert!(text.iter().all(|t| t != "No photos"), "{text:?}"); + // the other way round, and an album that tests itself + show(&mut h, 11); + assert!(painted(&h).iter().any(|t| t.contains("“Alpha”"))); + show(&mut h, 13); + let text = painted(&h); + assert!(text.iter().any(|t| t == TITLE), "{text:?}"); + assert!(text.iter().any(|t| t.starts_with("It tests itself")), "{text:?}"); +} + +// Scenario: a filter on top doesn't hide the reason +#[test] +fn the_loop_is_the_reason_even_with_a_filter_on() { + let mut h = with_a_loop(); + show(&mut h, 10); + let r = h.request("engine.execute", json!({"command": "library.filter", "params": {"rating": 3}}), T); + assert_eq!(r["ok"], true, "{r}"); + h.settle(SETTLE); + assert!(painted(&h).iter().any(|t| t == TITLE)); +} + +// Scenario: an album that is not on a loop says nothing of loops +#[test] +fn an_empty_album_off_every_loop_does_not_blame_a_loop() { + let mut h = with_a_loop(); + // empty by its own rule + show(&mut h, 14); + let text = painted(&h); + assert!(text.iter().all(|t| t != TITLE && !t.starts_with("It leads back")), "{text:?}"); + assert!(text.iter().any(|t| t == "No photos"), "{text:?}"); + // empty because the album it tests holds nothing, but not on the loop itself + show(&mut h, 12); + assert_eq!(h.app.session.visible_cloned().len(), 0); + let text = painted(&h); + assert!(text.iter().all(|t| t != TITLE), "{text:?}"); +} + +// Scenario: the sidebar marks the looping albums, and only those (the mark predates the loop rule: +// a loop is among the problems a smart album reports) +#[test] +fn the_sidebar_marks_the_albums_on_a_loop() { + let h = with_a_loop(); + assert!(h.app.widgets.iter().any(|(w, _)| w == "source:album:10"), "the rows are on screen"); + let has = |id: u64| h.app.widgets.iter().any(|(w, _)| *w == format!("albumProblem:{id}")); + assert!(has(10) && has(11) && has(13), "the albums on a loop carry the mark"); + assert!(!has(12) && !has(14), "an album off every loop does not"); + let text = painted(&h); + assert!(text.iter().any(|t| t.starts_with('⚠') && t.contains("Alpha")), "{text:?}"); +} + +#[test] +fn the_note_names_the_album_the_loop_goes_through() { + use lightcraft_catalog::Catalog; + let mut c = Catalog::new(); + for album in [smart(1, "Alpha", json!([is_in(2)])), smart(2, "Beta", json!([is_in(1)])), smart(3, "Plain", json!([]))] { + c.apply(Op::AddAlbum { album }).unwrap(); + } + let (title, body) = crate::i18n::album_loop_note(&c, AlbumId(1)).expect("on a loop"); + assert_eq!(title, TITLE); + assert!(body.contains("Beta")); + assert!(crate::i18n::album_loop_note(&c, AlbumId(3)).is_none()); +} + +// Scenario: in a narrow grid the message wraps instead of running off its edges +#[test] +fn the_message_wraps_in_a_narrow_grid() { + let mut h = with_a_loop(); + let r = h.request("ui.resize", json!({"width": 900, "height": 700}), T); + assert_eq!(r["ok"], true, "{r}"); + show(&mut h, 10); + let canvas = h.app.canvas_rect.expect("the grid is drawn"); + let lines: Vec<(f32, usize, egui::Rect)> = h + .view + .painted_shapes() + .into_iter() + .filter_map(|s| match s { + egui::epaint::Shape::Text(t) if t.galley.job.text.starts_with("It leads back") => { + Some((t.galley.size().x, t.galley.rows.len(), t.visual_bounding_rect())) + } + _ => None, + }) + .collect(); + let (_, rows, bounds) = lines.first().copied().expect("the body is painted"); + assert!(rows > 1, "the body is wider than the grid, so it takes more than one row"); + assert!(bounds.left() >= canvas.left() && bounds.right() <= canvas.right(), "{bounds:?} stays inside {canvas:?}"); +} diff --git a/docs/parity-checklist.md b/docs/parity-checklist.md index 49bfe4ec9c..3100d1e1a7 100644 --- a/docs/parity-checklist.md +++ b/docs/parity-checklist.md @@ -707,7 +707,7 @@ From `08-lightroom-classic-extras.md` (Classic-only features) and part 2 of `06- | 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`), `crates/ui-egui/src/tests/move_folder.rs` | 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); Move Folder To… (here and in Folders) asks for the destination in a folder dialog that doesn't hold up the window (issue #3140); the rows of the standard places themselves (Pictures, Desktop, Downloads, Home) offer neither Rename Folder… nor Move Folder To…, while the folders inside them and the ones kept with Browse Folder… do, starting from their real name; `folder.rename` and `folder.move` refuse the home folder and its Pictures, Desktop and Downloads for every caller | | 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 (16 pt while the deepest open row of any sidebar tree fits the panel with room for its name and count; narrower in bands of 14, 12, 10 and 8 pt when it would not, the same for every tree, chosen from the last frame; issue #2298): past 8 pt 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, except on a row indented so far that its count (or colour dot) would cover its name: that count follows the name, wholly past the 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, which is kept only once the move has started, 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; a folder with none of these changes only says the library is up to date with it, with one Close and no choices, and closing it starts no job; `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 stops when the scan is cancelled, 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 +) | -| LRC-LIB-SMARTCOLL | Smart-collection rules | P1 | ✅ | `cmd:album.createSmart`, `cmd:album.setRules`, `cmd:album.ruleFields`, `cmd:dialog.smartAlbum`, `crates/catalog/src/rules.rs`, `crates/ui-egui/src/dialogs/rules_editor.rs` | rule editor: match all / any / none, nested groups (⌥+ or + Group), 47 fields. The field menu shows Rating, Pick Flag, Color Label and Any Searchable Text, then one submenu per group (`FIELD_GROUPS`; `album.ruleFields` reports each field's `group`): Source (album — a plain or a smart album, so one smart album can include or exclude another; a rule that would make an album include itself, directly or through others, is refused, and a loop saved anyway can't recurse: inside it, the album being evaluated counts as holding no photos, so an "isn't" rule on it matches every photo, and the sidebar marks it ⚠ —, virtual copy, copy name, in a stack), File (filename, extension, file path, type, format, video duration), Date (capture / import / edit), Keywords & People (keywords, keyword count, people on named faces, people count), Description (title, caption, alt text, creator, copyright, copyright status), Camera Info (camera, lens, focal length, aperture, shutter speed as 1/250, ISO), Location (any, city, state / province, country, GPS), Size (long / short edge, aspect ratio and megapixels, all of the photo as shown: oriented and cropped), Develop (has edits, cropped, treatment), Assisted Culling (focus, best of similar shots); text / number / date / in-the-last operators; live match count; also usable as a library filter (`ruleSet`). Missing vs Classic: develop preset, flash, exposure bias, camera serial, colour profile / bit depth, IPTC Job, smart-preview status. Choice values read as words in every language (Public Domain, Black & White; `album.ruleFields` gives `choiceLabels`), while rules store the ids; yes/no fields read Yes / No and take `true`/`false`, `"yes"`/`"no"`, `"true"`/`"false"` or 1/0. Every value is checked against its field (`RuleSet::check`): numbers (rating 0–5), shutter speeds, dates (`2026`, `2026-08`, `2026-08-14`, then `T10`, `T10:00` or `T10:00:00`, a space working as the `T`, and after whole seconds a fraction and a time zone as imported capture times carry them (`.250+02:00`); no 30 February; `rules::rule_date` is the one reading for the check and the matcher; each date field has a calendar picker, `crates/ui-egui/src/widgets/date_picker.rs`, that picks a year, a month or a day and keeps a "between" in order), between = two bounds in order, in the last = more than 0 of a known unit, choices (ids, the flag's picked / rejected, a colour label's custom name), text with something to look for, an existing album (plain or smart, not a folder), no empty groups; each problem names its rule (`rule 2.1: no rating 0–5 is 9`), and album.createSmart / setRules / library.filter refuse them. The editor marks each bad rule under its row (inside groups too), keeps OK disabled until they are fixed (and its confirm refuses them before renaming anything), picks an Album rule's album with an album picker (`crates/ui-egui/src/widgets/album_picker.rs`: the sidebar's tree with folders, or type part of a name or folder; ↑ / ↓ / Enter; albums that can't be picked shown greyed with the reason) (is / isn't; a folder can't be tested), and drawing it never changes a rule: a rating of 9, "in the last 0 days" or 20,000 days, a "between" that isn't a pair all stay as stored (and are marked where they can't match) until edited. Album rules saved with an old operator (≥, between) are read as the "isn't" they always meant (`RuleSet::upgrade`). Saved smart albums whose rules no longer check are marked ⚠ in the sidebar (tooltip: what to fix; `albums.list` `problems`, `Catalog::smart_album_problems`); the name and rules of an album are saved as one undo step (`album.setRules` `name`). Problems read as the field's name and the issue in the editor's language (“Titel: braucht einen Suchbegriff”; `Problem::issue` / `field`, `Issue::text`, translated in every locale), while commands keep the English `rule 2.1: …` message for agents | +| LRC-LIB-SMARTCOLL | Smart-collection rules | P1 | ✅ | `cmd:album.createSmart`, `cmd:album.setRules`, `cmd:album.ruleFields`, `cmd:dialog.smartAlbum`, `crates/catalog/src/rules.rs`, `crates/ui-egui/src/dialogs/rules_editor.rs` | rule editor: match all / any / none, nested groups (⌥+ or + Group), 47 fields. The field menu shows Rating, Pick Flag, Color Label and Any Searchable Text, then one submenu per group (`FIELD_GROUPS`; `album.ruleFields` reports each field's `group`): Source (album — a plain or a smart album, so one smart album can include or exclude another; a rule that would make an album include itself, directly or through others, is refused, and a loop saved anyway holds nothing: every album on it shows no photos whoever asks, its empty view and its sidebar row (⚠) name the album it loops through, and an album that only tests a looping album sees it as empty, so an "isn't" rule on it matches every photo —, virtual copy, copy name, in a stack), File (filename, extension, file path, type, format, video duration), Date (capture / import / edit), Keywords & People (keywords, keyword count, people on named faces, people count), Description (title, caption, alt text, creator, copyright, copyright status), Camera Info (camera, lens, focal length, aperture, shutter speed as 1/250, ISO), Location (any, city, state / province, country, GPS), Size (long / short edge, aspect ratio and megapixels, all of the photo as shown: oriented and cropped), Develop (has edits, cropped, treatment), Assisted Culling (focus, best of similar shots); text / number / date / in-the-last operators; live match count; also usable as a library filter (`ruleSet`). Missing vs Classic: develop preset, flash, exposure bias, camera serial, colour profile / bit depth, IPTC Job, smart-preview status. Choice values read as words in every language (Public Domain, Black & White; `album.ruleFields` gives `choiceLabels`), while rules store the ids; yes/no fields read Yes / No and take `true`/`false`, `"yes"`/`"no"`, `"true"`/`"false"` or 1/0. Every value is checked against its field (`RuleSet::check`): numbers (rating 0–5), shutter speeds, dates (`2026`, `2026-08`, `2026-08-14`, then `T10`, `T10:00` or `T10:00:00`, a space working as the `T`, and after whole seconds a fraction and a time zone as imported capture times carry them (`.250+02:00`); no 30 February; `rules::rule_date` is the one reading for the check and the matcher; each date field has a calendar picker, `crates/ui-egui/src/widgets/date_picker.rs`, that picks a year, a month or a day and keeps a "between" in order), between = two bounds in order, in the last = more than 0 of a known unit, choices (ids, the flag's picked / rejected, a colour label's custom name), text with something to look for, an existing album (plain or smart, not a folder), no empty groups; each problem names its rule (`rule 2.1: no rating 0–5 is 9`), and album.createSmart / setRules / library.filter refuse them. The editor marks each bad rule under its row (inside groups too), keeps OK disabled until they are fixed (and its confirm refuses them before renaming anything), picks an Album rule's album with an album picker (`crates/ui-egui/src/widgets/album_picker.rs`: the sidebar's tree with folders, or type part of a name or folder; ↑ / ↓ / Enter; albums that can't be picked shown greyed with the reason) (is / isn't; a folder can't be tested), and drawing it never changes a rule: a rating of 9, "in the last 0 days" or 20,000 days, a "between" that isn't a pair all stay as stored (and are marked where they can't match) until edited. Album rules saved with an old operator (≥, between) are read as the "isn't" they always meant (`RuleSet::upgrade`). Saved smart albums whose rules no longer check are marked ⚠ in the sidebar (tooltip: what to fix; `albums.list` `problems`, `Catalog::smart_album_problems`); the name and rules of an album are saved as one undo step (`album.setRules` `name`). Problems read as the field's name and the issue in the editor's language (“Titel: braucht einen Suchbegriff”; `Problem::issue` / `field`, `Issue::text`, translated in every locale), while commands keep the English `rule 2.1: …` message for agents | | LRC-LIB-PUBLISH | Publish services | P2 | ⬜ | | | | LRC-LIB-FILTERBAR | Library filter bar | P1 | ✅ | `cmd:view.filterBar`, `cmd:filter.applyPreset`, `cmd:library.filter` (`flags`, `labels`, `ruleSet`), `crates/ui-egui/src/panels/filterbar.rs` | rating/flag (several flags at once = any of them)/label (several labels at once = any of them)/kind/edited/camera/lens/keyword, clear, save as smart album, filter presets; the filter stays as you change albums (an album the filter held is replaced by the album you show; always locked, as in the desktop app); arbitrary conditions via the smart-album rule editor | | LRC-LIB-STACKS | Stacks (full) | P1 | ✅ | `crates/catalog/src/stacks.rs`, `cmd:stack.group`, `cmd:stack.split`, `cmd:stack.moveUp`, `cmd:stack.moveDown` | group / ungroup / toggle / set top / remove / auto by time / split / move up and down | @@ -1046,6 +1046,7 @@ Latin stays upright. Advanced Japanese composition remains open. Regression cove | 2026-10-29 | patch | LR-BEHAV-TITLEBAR: a dialog's backdrop leaves the integrated title bar undimmed, as a macOS sheet does (the bar's controls stay inactive, a click on it is not a click outside the dialog, dragging its empty space still moves the window); status unchanged (🟡) | | 2026-10-29 | minor | LR-MASK-OBJECTS: an Object / Describe selection's stored grid is enlarged along the photo's edges (fast guided filter of its logits by log luminance, a 1.5-cell window), so a raised Exposure no longer draws an outline around the subject (#3272); existing AI masks are 1–2 px tighter at edges; status unchanged (🟡) | | 2026-10-30 | patch | LR-MASK-COLORRANGE: a colour-range mask keeps its first 64 samples however it is loaded (sidecar `lc:settings`, presets, `develop.merge`, `render --settings`, catalog and history), not only through `mask.add` / `mask.update`, so a document with thousands can't stall a render or lose the GPU device (issue #2556); status unchanged (✅) | +| 2026-10-24 | minor | LRC-LIB-SMARTCOLL: a smart album on a loop (it includes itself through the albums it tests) holds no photos, the same for every question about it, where it showed a subset that depended on the album asked about; its empty view and its sidebar row say it is in a loop and name the album it loops through; status unchanged (✅) | | 2026-10-20 | patch | LR-PRE-PANEL, LR-PRE-AMOUNT: a preset changes only the settings it names; each is measured from the photo's import look when one is recorded, otherwise from its current value (issue #2159). Statuses and feature counts unchanged. | | 2026-10-17 | minor | LR-EXP-DIALOG: built-in export presets for the issue #2104 delivery targets — Instagram Feed (1080 px, screen sharpening), Instagram Story / Reel (1920 px), Web / Portfolio (2048 px, copyright-only metadata), Full Resolution Master (full size, Display P3, quality 95); LR-EXP-PREVIOUS drops its stale "no named export presets yet" note; status unchanged (✅) | | 2026-10-17 | minor | LR-EXP-DIALOG: built-in export presets for the issue #2104 delivery targets — Instagram Feed (1080 px, screen sharpening), Instagram Story / Reel (1920 px), Web / Portfolio (2048 px, copyright and creator metadata), Full Resolution Master (full size, Display P3, quality 95); LR-EXP-PREVIOUS drops its stale "no named export presets yet" note; status unchanged (✅) | diff --git a/docs/whats-new.md b/docs/whats-new.md index ab0f90c033..27c2703402 100644 --- a/docs/whats-new.md +++ b/docs/whats-new.md @@ -443,6 +443,19 @@ left out of a new album made from the selection, out of Add to Album, and out of the target album (B), which does nothing and says nothing when none of them is left, and counts only the photos it changed. +### An album caught in a loop is empty, and says so +- A smart album that tests another album, which tests it back (or that tests itself), used to show a share of + its photos, and which photos depended on the album you asked about. Now every album on such a loop shows no + photos, however you look at it: in the grid, in the count beside it in the sidebar, and in an Album rule of + another smart album. +- The empty album says why instead of "No photos": "This album is in a loop, so it shows nothing", then the album it + loops through and where to fix it (Edit Smart Album…). The row in the sidebar keeps its ⚠, and hovering it says the + same. +- An album that only tests a looping album is not on the loop: it keeps working, and sees the looping album as empty + (so an Album rule set to "isn't" that album matches every photo). Change the rules of one album on the loop and its albums hold + their photos again. +- A library that already holds such a loop opens as before; only what the albums on it show changes. + ## 2026-10-23 ### AI Denoise works out of the box From f4ce1550b8a1d0356d46cce025b25abaa7c5a5df Mon Sep 17 00:00:00 2001 From: Nathaniel Ledford Date: Mon, 2 Nov 2026 14:32:40 -0500 Subject: [PATCH 2/3] LRC-LIB-SMARTCOLL: the looping-album tests build their loop the way a saved library brings one back Since the catalog refuses an edit that would newly put a smart album on a loop, the fixture no longer commits the loop's albums as edits: it applies them the way the journal replays a library saved before that rule, which is the state whose UI these tests are about. Everything the six tests read (the empty view, the note, the sidebar marks) comes from the catalog either way. Co-Authored-By: Claude --- crates/ui-egui/src/tests/looping_albums.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/crates/ui-egui/src/tests/looping_albums.rs b/crates/ui-egui/src/tests/looping_albums.rs index 692f2b2077..7e49d36524 100644 --- a/crates/ui-egui/src/tests/looping_albums.rs +++ b/crates/ui-egui/src/tests/looping_albums.rs @@ -57,7 +57,10 @@ fn with_a_loop() -> Headless { smart(13, "Delta", json!([rating, is_in(13)])), smart(14, "Quiet", json!([none])), ] { - h.app.session.commit("Add album", Op::AddAlbum { album }).unwrap(); + // An edit can no longer make a loop (the catalog refuses it), but a library from before that + // rule still opens with one: the journal replays its ops the way `apply` does here, so the + // album the loop leaves on screen is the one the user still sees. + h.app.session.catalog.apply(Op::AddAlbum { album }).unwrap(); } h.settle(SETTLE); h From e5773bf63551bce01d13d9a7bde210de4c0f836e Mon Sep 17 00:00:00 2001 From: FredApps <153173854+FredApps@users.noreply.github.com> Date: Thu, 26 Nov 2026 22:31:44 +0700 Subject: [PATCH 3/3] Format import/job.rs as main's gate requires (rustfmt) The #1995 merge left crates/engine/src/import/job.rs unformatted on main, so the gate fails at fmt for every branch; this is that file run through rustfmt, nothing else. --- crates/engine/src/import/job.rs | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/crates/engine/src/import/job.rs b/crates/engine/src/import/job.rs index 7ff684a75a..1d6761531b 100644 --- a/crates/engine/src/import/job.rs +++ b/crates/engine/src/import/job.rs @@ -398,15 +398,13 @@ impl ImportJob { let external_sidecar = if skip_sidecar { None } else { - found_sidecar - .and_then(|f| std::fs::read_to_string(f).ok()) - .and_then(|x| match crate::sidecar::parse_sidecar(&x, target) { - Ok(sc) => Some(sc), - Err(e) => { - log::warn!("import {path}: XMP: {e}"); - None - } - }) + found_sidecar.and_then(|f| std::fs::read_to_string(f).ok()).and_then(|x| match crate::sidecar::parse_sidecar(&x, target) { + Ok(sc) => Some(sc), + Err(e) => { + log::warn!("import {path}: XMP: {e}"); + None + } + }) }; let sidecar = match (embedded_sidecar, external_sidecar) { (Some(mut embedded), Some(external)) => {