LightCraft: An open-source non-destructive photo editor written by scratch in pure Rust
Merge PR #536
Brandon Thomas244d27909186
diff --cc crates/catalog/src/model.rsindex 62fbaa8f8,327698b2a..199edac1b--- a/crates/catalog/src/model.rs+++ b/crates/catalog/src/model.rs@@@ -374,9 -374,48 +385,49 @@@ impl Photoif self.embedded_lens.is_some() {d.optics.lens_profile = true;}+ d.process = self.develop.process;d}+ /// The file name's extension without the dot, as written (`CR2` for `IMG_0042.CR2`); empty+ /// when the name has none (`README`, a dot file such as `.hidden`).+ pub fn extension(&self) -> &str {+ self.file_name.rsplit_once('.').filter(|(stem, _)| !stem.is_empty()).map_or("", |(_, ext)| ext)+ }+ /// Width and height in pixels as the photo is shown: turned by its orientation and cut by its+ /// crop. Straightening and Constrain Crop shrink the crop without changing its shape, so the+ /// aspect is exact and the edges can read a little larger than an export.+ pub fn shown_size(&self) -> (f64, f64) {+ let (w, h) = (self.width as f64, self.height as f64);+ let (w, h) = if self.develop.orientation.swaps_axes() { (h, w) } else { (w, h) };+ let r = self.develop.crop.geometry.rect;+ // a crop read from a file or an agent is hostile: no NaN, nothing outside the frame+ let part = |len: f64| if len.is_finite() { len.clamp(0.0, 1.0) } else { 1.0 };+ (w * part(r.width()), h * part(r.height()))+ }+ /// Cropped or straightened.+ pub fn is_cropped(&self) -> bool {+ !self.develop.crop.geometry.is_identity()+ }+ /// How many keywords the photo has: a hierarchical keyword (`travel|italy|rome`) is one, and+ /// the same keyword in different case or with stray spaces counts once; blank ones don't count.+ pub fn keyword_count(&self) -> usize {+ let mut seen: Vec<String> = self.meta.keywords.iter().map(|k| k.trim().to_lowercase()).filter(|k| !k.is_empty()).collect();+ seen.sort_unstable();+ seen.dedup();+ seen.len()+ }+ /// The people in the photo: the names on its face regions, trimmed, each once (names that+ /// differ only in case are one person, as first seen). Pets and unnamed faces are not people.+ pub fn people(&self) -> Vec<&str> {+ let mut out: Vec<&str> = Vec::new();+ for r in self.meta.regions.iter().filter(|r| r.kind == lightcraft_meta::RegionKind::Face) {+ let Some(name) = r.name.as_deref().map(str::trim).filter(|n| !n.is_empty()) else { continue };+ if !out.iter().any(|o| o.to_lowercase() == name.to_lowercase()) {+ out.push(name);+ }+ }+ out+ }/// In the library: not deleted and not only browsed (Local).pub fn in_library(&self) -> bool {!self.deleted && !self.localdiff --cc crates/catalog/src/tests.rsindex 67ba0f791,d997ceb17..20f4b7282--- a/crates/catalog/src/tests.rs+++ b/crates/catalog/src/tests.rs@@@ -457,25 -457,159 +457,178 @@@ fn random_sort_has_no_date_headers()assert!(c.date_runs(&ids, SortKey::Random, GroupBy::Day).is_empty());}+/// Reload stores the lens data a file carries; the inverse (through the journal's JSON) takes it back.+#[test]+fn set_embedded_lens_is_undoable_and_journaled() {+ let mut c = Catalog::default();+ let a = c.alloc_photo_id();+ c.apply(Op::AddPhoto {+ photo: Box::new(Photo::new(a, Source::File { path: "/x.rw2".into() }, "x.rw2", "RW2", 4000, 3000, "2026-10-06T00:00:00")),+ })+ .unwrap();+ let lens = lightcraft_develop::EmbeddedLens { warp: Some(Default::default()), vignette: None };+ let op = Op::SetEmbeddedLens { id: a, lens: Some(Box::new(lens)) };+ let op: Op = serde_json::from_str(&serde_json::to_string(&op).unwrap()).unwrap();+ let inv = c.apply(op).unwrap();+ assert_eq!(c.photo(a).unwrap().embedded_lens, Some(lens));+ let inv: Op = serde_json::from_str(&serde_json::to_string(&inv).unwrap()).unwrap();+ c.apply(inv).unwrap();+ assert_eq!(c.photo(a).unwrap().embedded_lens, None);+}++ /// A saved smart album whose rules no longer check (the album a rule tests was deleted) is found,+ /// with its problems; a good one has none; an old album operator is read as it was meant.+ #[test]+ fn smart_album_problems_flag_stale_rules() {+ let mut c = Catalog::new();+ c.apply(Op::AddAlbum { album: Album::new(AlbumId(1), "Trip") }).unwrap();+ let smart = |id: u64, rules: serde_json::Value| {+ let f: Filter = serde_json::from_value(serde_json::json!({"ruleSet": {"rules": rules}})).unwrap();+ Album { smart: Some(Box::new(f)), ..Album::new(AlbumId(id), "Smart") }+ };+ c.apply(Op::AddAlbum { album: smart(2, serde_json::json!([{"field": "album", "op": "is", "value": 1}])) }).unwrap();+ c.apply(Op::AddAlbum { album: smart(3, serde_json::json!([{"field": "album", "op": "gte", "value": 1}])) }).unwrap();+ assert!(c.smart_album_problems(AlbumId(2)).is_empty());+ assert!(c.smart_album_problems(AlbumId(3)).is_empty(), "an old operator is upgraded, not a problem");+ assert!(c.smart_album_problems(AlbumId(1)).is_empty(), "a plain album has no rules");+ c.apply(Op::RemoveAlbum { id: AlbumId(1) }).unwrap();+ let p = c.smart_album_problems(AlbumId(2));+ assert_eq!(p.iter().map(ToString::to_string).collect::<Vec<_>>(), vec!["rule 1: no album 1".to_string()]);+ }++ /// A smart album can test another smart album: "Keywords contain travel" and "Album isn't Excluded+ /// Photos" (red or rejected) leaves out the excluded photos, and follows that album's rules as they+ /// change.+ #[test]+ fn a_smart_album_can_exclude_another() {+ let mut c = Catalog::new();+ let smart = |id: u64, name: &str, rules: serde_json::Value| {+ let f: Filter = serde_json::from_value(serde_json::json!({"ruleSet": rules})).unwrap();+ Album { smart: Some(Box::new(f)), ..Album::new(AlbumId(id), name) }+ };+ c.apply(Op::AddAlbum {+ album: smart(+ 1,+ "Excluded Photos",+ serde_json::json!({"match": "any", "rules": [+ {"field": "label", "op": "is", "value": "red"}, {"field": "flag", "op": "is", "value": "reject"}]}),+ ),+ })+ .unwrap();+ let travel = |c: &mut Catalog, name: &str, label: Option<ColorLabel>, flag: Flag| {+ let id = c.alloc_photo_id();+ let mut p = Photo::new(id, Source::Demo { scene: 1 }, name, "JPEG", 6000, 4000, "2026-09-30T10:00:00");+ p.meta.keywords = vec!["travel".into()];+ p.label = label;+ p.flag = flag;+ c.apply(Op::AddPhoto { photo: Box::new(p) }).unwrap();+ id+ };+ let keep = travel(&mut c, "keep.jpg", None, Flag::Pick);+ let red = travel(&mut c, "red.jpg", Some(ColorLabel::Red), Flag::None);+ let rejected = travel(&mut c, "rejected.jpg", None, Flag::Reject);+ let rules: RuleSet = serde_json::from_value(serde_json::json!({"rules": [+ {"field": "keywords", "op": "contains", "value": "travel"}, {"field": "album", "op": "isNot", "value": 1}]}))+ .unwrap();+ assert!(rules.check(&c).is_empty(), "a smart album can be tested: {:?}", rules.check(&c));+ let matched = |c: &Catalog| c.photos().filter(|p| rules.matches(p, c)).map(|p| p.id).collect::<Vec<_>>();+ assert_eq!(matched(&c), vec![keep]);+ // "is" works the other way round+ let inside: RuleSet = serde_json::from_value(serde_json::json!({"rules": [{"field": "album", "op": "is", "value": 1}]})).unwrap();+ assert_eq!(c.photos().filter(|p| inside.matches(p, &c)).count(), 2);+ let _ = (red, rejected);+ }++ /// An album can't include itself, directly or through other smart albums: the check refuses the+ /// loop for the album being edited, and a loop saved anyway (an older version, a hand-edited file)+ /// neither recurses forever nor crashes: inside it, the album being evaluated counts as holding no+ /// photos, and every album in it is reported.+ #[test]+ fn smart_album_loops_are_refused_and_survived() {+ let mut c = Catalog::new();+ let refers = |to: u64| -> Filter {+ serde_json::from_value(serde_json::json!({"ruleSet": {"rules": [{"field": "album", "op": "isNot", "value": to}]}})).unwrap()+ };+ let smart = |id: u64, f: Filter| Album { smart: Some(Box::new(f)), ..Album::new(AlbumId(id), "S") };+ // A → B → C+ c.apply(Op::AddAlbum { album: smart(3, Filter::default()) }).unwrap();+ c.apply(Op::AddAlbum { album: smart(2, refers(3)) }).unwrap();+ c.apply(Op::AddAlbum { album: smart(1, refers(2)) }).unwrap();+ let rules = |to: u64| refers(to).rule_set.unwrap();+ assert!(rules(1).check_for(&c, Some(AlbumId(3))).iter().any(|p| p.issue == crate::rules::Issue::AlbumLoop), "C → A closes A → B → C → A");+ assert!(rules(3).check_for(&c, Some(AlbumId(3))).iter().any(|p| p.issue == crate::rules::Issue::AlbumLoop), "an album testing itself");+ assert!(rules(1).check_for(&c, None).is_empty(), "a new album can't be in a loop yet");+ assert!(rules(3).check_for(&c, Some(AlbumId(1))).is_empty(), "A testing C again is no loop");+ assert!(!c.album_reaches(AlbumId(3), AlbumId(1)) && c.album_reaches(AlbumId(1), AlbumId(3)));+ // a loop saved anyway: C → A+ c.apply(Op::SetAlbumRules { id: AlbumId(3), rules: Box::new(refers(1)) }).unwrap();+ let id = photo(&mut c, "a.jpg", "2026-09-01T10:00:00");+ let p = c.photo(id).unwrap().clone();+ for a in [1, 2, 3] {+ let _ = c.album_contains(AlbumId(a), &p); // returns, no stack overflow+ assert!(c.smart_album_problems(AlbumId(a)).iter().any(|p| p.issue == crate::rules::Issue::AlbumLoop), "album {a} is reported");+ }+ }++ /// Summaries name the albums Album rules test ("album isn't “Excluded Photos”"), not their ids;+ /// one that is gone shows as its number.+ #[test]+ fn summaries_name_albums() {+ let mut c = Catalog::new();+ c.apply(Op::AddAlbum { album: Album::new(AlbumId(4), "Excluded Photos") }).unwrap();+ let rules: RuleSet = serde_json::from_value(serde_json::json!({"rules": [+ {"field": "keywords", "op": "contains", "value": "travel"},+ {"group": {"match": "any", "rules": [{"field": "album", "op": "isNot", "value": 4}, {"field": "album", "op": "is", "value": 9}]}}]}))+ .unwrap();+ assert_eq!(rules.describe_with(&c), "keywords contains travel and (album isn't “Excluded Photos” or album is #9)");+ let f = Filter { rule_set: Some(rules), ..Default::default() };+ assert!(f.describe_with(&c).contains("album isn't “Excluded Photos”"));+ }++ /// A chain of smart albums each testing the one before twice ("all of: album is X(k-1), album is+ /// X(k-1)") costs a pass per album, not 2^depth: each album's answer for a photo is worked out once+ /// per question. 25 albums deep stays instant.+ #[test]+ fn chains_of_smart_albums_stay_linear() {+ let mut c = Catalog::new();+ let smart = |id: u64, f: Filter| Album { smart: Some(Box::new(f)), ..Album::new(AlbumId(id), "X") };+ c.apply(Op::AddAlbum { album: smart(1, Filter::default()) }).unwrap();+ for k in 2..=26u64 {+ let f: Filter = serde_json::from_value(serde_json::json!({"ruleSet": {"rules": [+ {"field": "album", "op": "is", "value": k - 1}, {"field": "album", "op": "is", "value": k - 1}]}}))+ .unwrap();+ c.apply(Op::AddAlbum { album: smart(k, f) }).unwrap();+ }+ for i in 0..20 {+ photo(&mut c, &format!("p{i}.jpg"), "2026-09-01T10:00:00");+ }+ let start = std::time::Instant::now();+ assert_eq!(c.album_count(AlbumId(26)), 20);+ assert!(start.elapsed() < std::time::Duration::from_secs(2), "took {:?}", start.elapsed());+ }++ /// A smart album's own album filter (not only its rules) counts in loops: A filtered to "in A" is+ /// reported, and so is A filtered to B while B's rules test A.+ #[test]+ fn an_album_filter_counts_in_loops() {+ let mut c = Catalog::new();+ let smart = |id: u64, f: Filter| Album { smart: Some(Box::new(f)), ..Album::new(AlbumId(id), "S") };+ c.apply(Op::AddAlbum { album: smart(1, Filter { album: Some(AlbumId(1)), ..Default::default() }) }).unwrap();+ let loops = |c: &Catalog, id: u64| c.smart_album_problems(AlbumId(id)).iter().any(|p| p.issue == crate::rules::Issue::AlbumLoop);+ assert!(loops(&c, 1), "filtered to itself");+ let tests_3: Filter = serde_json::from_value(serde_json::json!({"ruleSet": {"rules": [{"field": "album", "op": "is", "value": 3}]}})).unwrap();+ c.apply(Op::AddAlbum { album: smart(2, Filter { album: Some(AlbumId(3)), ..Default::default() }) }).unwrap();+ c.apply(Op::AddAlbum {+ album: smart(3, serde_json::from_value(serde_json::json!({"ruleSet": {"rules": [{"field": "album", "op": "is", "value": 2}]}})).unwrap()),+ })+ .unwrap();+ assert!(c.album_reaches(AlbumId(3), AlbumId(2)) && c.album_reaches(AlbumId(2), AlbumId(3)));+ assert!(loops(&c, 2) && loops(&c, 3));+ let _ = tests_3;+ let shown: Vec<String> = c.smart_album_problems(AlbumId(1)).iter().map(ToString::to_string).collect();+ assert!(shown.iter().all(|s| !s.starts_with("rule :")), "{shown:?}");+ }+#[test]fn undated_photos_group_under_unknown_date_and_sort_together() {let mut c = Catalog::new();diff --cc crates/ui-egui/locales/de.jsonindex 403a243e5,7dd479e9e..f129711ae--- a/crates/ui-egui/locales/de.json+++ b/crates/ui-egui/locales/de.json@@@ -1890,8 -1890,63 +1890,67 @@@"Pending photo action cancelled because its library or photo changed": "Pending photo action cancelled because its library or photo changed","ONNX model": "ONNX model","commercial use subject to GPL conditions": "commercial use subject to GPL conditions",+ "Decrease Rating": "Bewertung verringern",+ "Increase Rating": "Bewertung erhöhen",+ "Click to type a value": "Klicken, um einen Wert einzugeben",- "Angle": "Winkel"++ "Angle": "Winkel",+ "Video": "Video",+ "Copyrighted": "Urheberrechtlich geschützt",+ "Public Domain": "Gemeinfrei",+ "Unknown": "Unbekannt",+ "Landscape (wide)": "Querformat",+ "Portrait (tall)": "Hochformat",+ "Square": "Quadratisch",+ "In Color": "Farbig",+ "No Label": "Ohne Markierung",+ "Choose an album…": "Album wählen…",+ "No albums yet": "Noch keine Alben",+ "Fix the marked rules to save this album.": "Korrigiere die markierten Regeln, um dieses Album zu speichern.",+ "Some rules need fixing (Edit Smart Album…):": "Einige Regeln müssen korrigiert werden (Smart-Album bearbeiten…):",+ "isn't a field rules know": "ist kein bekanntes Feld",+ "can't be tested that way": "lässt sich so nicht prüfen",+ "is yes or no": "ist Ja oder Nein",+ "needs a number": "braucht eine Zahl",+ "needs a time like 1/250 or 2": "braucht eine Zeit wie 1/250 oder 2",+ "needs a date like 2026, 2026-08 or 2026-08-14": "braucht ein Datum wie 2026, 2026-08 oder 2026-08-14",+ "has the first date after the second": "das erste Datum liegt nach dem zweiten",+ "needs two values": "braucht zwei Werte",+ "needs a number more than 0": "braucht eine Zahl größer als 0",+ "needs hours, days, weeks, months or years": "braucht Stunden, Tage, Wochen, Monate oder Jahre",+ "isn't one of the choices": "ist keine der Auswahlmöglichkeiten",+ "needs something to look for (or use “is empty”)": "braucht einen Suchbegriff (oder „ist leer“)",+ "needs something to look for (or use “isn't empty”)": "braucht einen Suchbegriff (oder „ist nicht leer“)",+ "needs text": "braucht Text",+ "can't match any rating from 0 to 5": "passt zu keiner Bewertung von 0 bis 5",+ "needs an album": "braucht ein Album",+ "names an album that no longer exists": "nennt ein Album, das es nicht mehr gibt",+ "can't test a folder; choose an album in it": "kann keinen Ordner prüfen; wähle ein Album darin",+ "This group is empty: add a rule or remove it.": "Diese Gruppe ist leer: Füge eine Regel hinzu oder entferne sie.",+ "needs something to look for (or use “are empty”)": "braucht einen Suchbegriff (oder „sind leer“)",+ "needs something to look for (or use “aren't empty”)": "braucht einen Suchbegriff (oder „sind nicht leer“)",+ "Mo": "Mo",+ "Tu": "Di",+ "We": "Mi",+ "Th": "Do",+ "Fr": "Fr",+ "Sa": "Sa",+ "Su": "So",+ "Pick a date": "Datum wählen",+ "would make this album include itself through other smart albums": "würde dieses Album über andere Smart-Alben sich selbst enthalten lassen",+ "Search albums": "Alben suchen",+ "No albums match": "Kein Album passt",+ "This is the album you're editing": "Das ist das Album, das du bearbeitest",+ "It tests this album, so testing it back would loop": "Es prüft dieses Album; es zurückzuprüfen wäre ein Kreis",+ "Copy Name": "Kopiename",+ "In a Stack": "In einem Stapel",+ "File Extension": "Dateiendung",+ "Video Duration": "Videodauer",+ "Keyword Count": "Anzahl Stichwörter",+ "People Count": "Anzahl Personen",+ "Shutter Speed": "Belichtungszeit",+ "Cropped": "Zugeschnitten",+ "Keywords & People": "Stichwörter & Personen",+ "Description": "Beschreibung",+ "Camera Info": "Kamera-Info",+ "Develop": "Bearbeitung"}diff --cc crates/ui-egui/locales/es.jsonindex a8f65f69d,8919c82c4..55135fea5--- a/crates/ui-egui/locales/es.json+++ b/crates/ui-egui/locales/es.json@@@ -1735,8 -1735,63 +1735,67 @@@"Pending photo action cancelled because its library or photo changed": "Pending photo action cancelled because its library or photo changed","ONNX model": "ONNX model","commercial use subject to GPL conditions": "commercial use subject to GPL conditions",+ "Decrease Rating": "Reducir valoración",+ "Increase Rating": "Aumentar valoración",+ "Click to type a value": "Hacer clic para escribir un valor",- "Angle": "Ángulo"++ "Angle": "Ángulo",+ "Video": "Vídeo",+ "Copyrighted": "Con copyright",+ "Public Domain": "Dominio público",+ "Unknown": "Desconocido",+ "Landscape (wide)": "Horizontal (apaisada)",+ "Portrait (tall)": "Vertical (retrato)",+ "Square": "Cuadrada",+ "In Color": "En color",+ "No Label": "Sin etiqueta",+ "Choose an album…": "Elige un álbum…",+ "No albums yet": "Aún no hay álbumes",+ "Fix the marked rules to save this album.": "Corrige las reglas marcadas para guardar este álbum.",+ "Some rules need fixing (Edit Smart Album…):": "Hay reglas que corregir (Editar álbum inteligente…):",+ "isn't a field rules know": "no es un campo conocido",+ "can't be tested that way": "no se puede comprobar así",+ "is yes or no": "es Sí o No",+ "needs a number": "necesita un número",+ "needs a time like 1/250 or 2": "necesita un tiempo como 1/250 o 2",+ "needs a date like 2026, 2026-08 or 2026-08-14": "necesita una fecha como 2026, 2026-08 o 2026-08-14",+ "has the first date after the second": "la primera fecha es posterior a la segunda",+ "needs two values": "necesita dos valores",+ "needs a number more than 0": "necesita un número mayor que 0",+ "needs hours, days, weeks, months or years": "necesita horas, días, semanas, meses o años",+ "isn't one of the choices": "no es ninguna de las opciones",+ "needs something to look for (or use “is empty”)": "necesita algo que buscar (o usa «está vacío»)",+ "needs something to look for (or use “isn't empty”)": "necesita algo que buscar (o usa «no está vacío»)",+ "needs text": "necesita texto",+ "can't match any rating from 0 to 5": "no coincide con ninguna valoración de 0 a 5",+ "needs an album": "necesita un álbum",+ "names an album that no longer exists": "indica un álbum que ya no existe",+ "can't test a folder; choose an album in it": "no puede comprobar una carpeta; elige un álbum dentro",+ "This group is empty: add a rule or remove it.": "Este grupo está vacío: añade una regla o quítalo.",+ "needs something to look for (or use “are empty”)": "necesita algo que buscar (o usa «están vacíos»)",+ "needs something to look for (or use “aren't empty”)": "necesita algo que buscar (o usa «no están vacíos»)",+ "Mo": "Lu",+ "Tu": "Ma",+ "We": "Mi",+ "Th": "Ju",+ "Fr": "Vi",+ "Sa": "Sá",+ "Su": "Do",+ "Pick a date": "Elegir una fecha",+ "would make this album include itself through other smart albums": "haría que este álbum se incluyera a sí mismo a través de otros álbumes inteligentes",+ "Search albums": "Buscar álbumes",+ "No albums match": "Ningún álbum coincide",+ "This is the album you're editing": "Es el álbum que estás editando",+ "It tests this album, so testing it back would loop": "Comprueba este álbum, así que comprobarlo a su vez crearía un bucle",+ "Copy Name": "Nombre de la copia",+ "In a Stack": "En una pila",+ "File Extension": "Extensión del archivo",+ "Video Duration": "Duración del vídeo",+ "Keyword Count": "Número de palabras clave",+ "People Count": "Número de personas",+ "Shutter Speed": "Velocidad de obturación",+ "Cropped": "Recortada",+ "Keywords & People": "Palabras clave y personas",+ "Description": "Descripción",+ "Camera Info": "Información de la cámara",+ "Develop": "Edición"}diff --cc crates/ui-egui/locales/ja.jsonindex 2e8ef447c,b83f0d282..1829c183f--- a/crates/ui-egui/locales/ja.json+++ b/crates/ui-egui/locales/ja.json@@@ -1735,8 -1735,65 +1735,69 @@@"Pending photo action cancelled because its library or photo changed": "Pending photo action cancelled because its library or photo changed","ONNX model": "ONNX model","commercial use subject to GPL conditions": "commercial use subject to GPL conditions",+ "Decrease Rating": "評価を下げる",+ "Increase Rating": "評価を上げる",+ "Click to type a value": "クリックして値を入力",- "Angle": "角度"++ "Angle": "角度",+ "Video": "動画",+ "Copyrighted": "著作権あり",+ "Public Domain": "パブリックドメイン",+ "Unknown": "不明",+ "Landscape (wide)": "横長",+ "Portrait (tall)": "縦長",+ "Square": "正方形",+ "In Color": "カラー",+ "No Label": "ラベルなし",+ "smart album value|Yes": "あり",+ "smart album value|No": "なし",+ "In a Stack": "スタック",+ "Cropped": "切り抜き",+ "Choose an album…": "アルバムを選択…",+ "No albums yet": "アルバムはまだありません",+ "Fix the marked rules to save this album.": "このアルバムを保存するには、印の付いた条件を修正してください。",+ "Some rules need fixing (Edit Smart Album…):": "修正が必要な条件があります(スマートアルバムを編集…):",+ "isn't a field rules know": "不明な項目です",+ "can't be tested that way": "この方法では判定できません",+ "is yes or no": "「あり」か「なし」を選んでください",+ "needs a number": "数値が必要です",+ "needs a time like 1/250 or 2": "1/250 や 2 のようなシャッター速度が必要です",+ "needs a date like 2026, 2026-08 or 2026-08-14": "2026、2026-08、2026-08-14 のような日付が必要です",+ "has the first date after the second": "最初の日付が2番目の日付より後です",+ "needs two values": "2つの値が必要です",+ "needs a number more than 0": "0より大きい数値が必要です",+ "needs hours, days, weeks, months or years": "時間・日・週・月・年のいずれかが必要です",+ "isn't one of the choices": "選択肢にありません",+ "needs something to look for (or use “is empty”)": "検索する語句が必要です(または「が空」を使用)",+ "needs something to look for (or use “isn't empty”)": "検索する語句が必要です(または「が空でない」を使用)",+ "needs text": "文字列が必要です",+ "can't match any rating from 0 to 5": "0〜5 のどの評価にも一致しません",+ "needs an album": "アルバムを選択してください",+ "names an album that no longer exists": "存在しないアルバムが指定されています",+ "can't test a folder; choose an album in it": "フォルダーは判定できません。中のアルバムを選択してください",+ "This group is empty: add a rule or remove it.": "このグループは空です。条件を追加するか、グループを削除してください。",+ "needs something to look for (or use “are empty”)": "検索する語句が必要です(または「が空」を使用)",+ "needs something to look for (or use “aren't empty”)": "検索する語句が必要です(または「が空でない」を使用)",+ "Mo": "月",+ "Tu": "火",+ "We": "水",+ "Th": "木",+ "Fr": "金",+ "Sa": "土",+ "Su": "日",+ "Pick a date": "日付を選択",+ "would make this album include itself through other smart albums": "ほかのスマートアルバムを通じて、このアルバム自身を含むことになります",+ "Search albums": "アルバムを検索",+ "No albums match": "一致するアルバムはありません",+ "This is the album you're editing": "編集中のアルバムです",+ "It tests this album, so testing it back would loop": "このアルバムを条件にしているため、逆に指定すると循環します",+ "Copy Name": "コピー名",+ "File Extension": "拡張子",+ "Video Duration": "ビデオの長さ",+ "Keyword Count": "キーワード数",+ "People Count": "人数",+ "Shutter Speed": "シャッター速度",+ "Keywords & People": "キーワードと人物",+ "Description": "説明",+ "Camera Info": "カメラ情報",+ "Develop": "編集"}diff --cc crates/ui-egui/locales/pt-br.jsonindex 483c4ecc0,54fc72317..6ed8807cd--- a/crates/ui-egui/locales/pt-br.json+++ b/crates/ui-egui/locales/pt-br.json@@@ -1735,8 -1735,63 +1735,67 @@@"Pending photo action cancelled because its library or photo changed": "Pending photo action cancelled because its library or photo changed","ONNX model": "ONNX model","commercial use subject to GPL conditions": "commercial use subject to GPL conditions",+ "Decrease Rating": "Diminuir avaliação",+ "Increase Rating": "Aumentar avaliação",+ "Click to type a value": "Clique para digitar um valor",- "Angle": "Ângulo"++ "Angle": "Ângulo",+ "Video": "Vídeo",+ "Copyrighted": "Protegido por direitos autorais",+ "Public Domain": "Domínio público",+ "Unknown": "Desconhecido",+ "Landscape (wide)": "Paisagem (horizontal)",+ "Portrait (tall)": "Retrato (vertical)",+ "Square": "Quadrada",+ "In Color": "Colorida",+ "No Label": "Sem rótulo",+ "Choose an album…": "Escolha um álbum…",+ "No albums yet": "Ainda não há álbuns",+ "Fix the marked rules to save this album.": "Corrija as regras marcadas para salvar este álbum.",+ "Some rules need fixing (Edit Smart Album…):": "Algumas regras precisam ser corrigidas (Editar álbum inteligente…):",+ "isn't a field rules know": "não é um campo conhecido",+ "can't be tested that way": "não pode ser testado assim",+ "is yes or no": "é Sim ou Não",+ "needs a number": "precisa de um número",+ "needs a time like 1/250 or 2": "precisa de um tempo como 1/250 ou 2",+ "needs a date like 2026, 2026-08 or 2026-08-14": "precisa de uma data como 2026, 2026-08 ou 2026-08-14",+ "has the first date after the second": "a primeira data é posterior à segunda",+ "needs two values": "precisa de dois valores",+ "needs a number more than 0": "precisa de um número maior que 0",+ "needs hours, days, weeks, months or years": "precisa de horas, dias, semanas, meses ou anos",+ "isn't one of the choices": "não é nenhuma das opções",+ "needs something to look for (or use “is empty”)": "precisa de algo para procurar (ou use “está vazio”)",+ "needs something to look for (or use “isn't empty”)": "precisa de algo para procurar (ou use “não está vazio”)",+ "needs text": "precisa de texto",+ "can't match any rating from 0 to 5": "não corresponde a nenhuma avaliação de 0 a 5",+ "needs an album": "precisa de um álbum",+ "names an album that no longer exists": "indica um álbum que não existe mais",+ "can't test a folder; choose an album in it": "não pode testar uma pasta; escolha um álbum dentro dela",+ "This group is empty: add a rule or remove it.": "Este grupo está vazio: adicione uma regra ou remova-o.",+ "needs something to look for (or use “are empty”)": "precisa de algo para procurar (ou use “estão vazios”)",+ "needs something to look for (or use “aren't empty”)": "precisa de algo para procurar (ou use “não estão vazios”)",+ "Mo": "Seg",+ "Tu": "Ter",+ "We": "Qua",+ "Th": "Qui",+ "Fr": "Sex",+ "Sa": "Sáb",+ "Su": "Dom",+ "Pick a date": "Escolher uma data",+ "would make this album include itself through other smart albums": "faria este álbum incluir a si mesmo por meio de outros álbuns inteligentes",+ "Search albums": "Pesquisar álbuns",+ "No albums match": "Nenhum álbum corresponde",+ "This is the album you're editing": "É o álbum que você está editando",+ "It tests this album, so testing it back would loop": "Ele testa este álbum, então testá-lo de volta criaria um ciclo",+ "Copy Name": "Nome da cópia",+ "In a Stack": "Em uma pilha",+ "File Extension": "Extensão do arquivo",+ "Video Duration": "Duração do vídeo",+ "Keyword Count": "Número de palavras-chave",+ "People Count": "Número de pessoas",+ "Shutter Speed": "Velocidade do obturador",+ "Cropped": "Recortada",+ "Keywords & People": "Palavras-chave e pessoas",+ "Description": "Descrição",+ "Camera Info": "Informações da câmera",+ "Develop": "Edição"}diff --cc crates/ui-egui/locales/ru.jsonindex d98c9e863,bfadf8e24..f5323ff1f--- a/crates/ui-egui/locales/ru.json+++ b/crates/ui-egui/locales/ru.json@@@ -1408,8 -1408,99 +1408,103 @@@"Pending photo action cancelled because its library or photo changed": "Pending photo action cancelled because its library or photo changed","ONNX model": "ONNX model","commercial use subject to GPL conditions": "commercial use subject to GPL conditions",+ "Decrease Rating": "Уменьшить оценку",+ "Increase Rating": "Увеличить оценку",+ "Click to type a value": "Щёлкните, чтобы ввести значение",- "Angle": "Угол"++ "Angle": "Угол",+ "Raw": "RAW",+ "Video": "Видео",+ "Copyrighted": "Защищено авторским правом",+ "Public Domain": "Общественное достояние",+ "Unknown": "Неизвестно",+ "Landscape (wide)": "Альбомная",+ "Portrait (tall)": "Книжная",+ "Square": "Квадратная",+ "In Color": "Цветное",+ "No Label": "Без метки",+ "Choose an album…": "Выберите альбом…",+ "No albums yet": "Альбомов пока нет",+ "Fix the marked rules to save this album.": "Исправьте отмеченные условия, чтобы сохранить альбом.",+ "Some rules need fixing (Edit Smart Album…):": "Некоторые условия нужно исправить (Изменить смарт-альбом…):",+ "isn't a field rules know": "неизвестное поле",+ "can't be tested that way": "так проверить нельзя",+ "is yes or no": "только «Да» или «Нет»",+ "needs a number": "нужно число",+ "needs a time like 1/250 or 2": "нужна выдержка вроде 1/250 или 2",+ "needs a date like 2026, 2026-08 or 2026-08-14": "нужна дата вроде 2026, 2026-08 или 2026-08-14",+ "has the first date after the second": "первая дата позже второй",+ "needs two values": "нужны два значения",+ "needs a number more than 0": "нужно число больше 0",+ "needs hours, days, weeks, months or years": "нужны часы, дни, недели, месяцы или годы",+ "isn't one of the choices": "нет среди вариантов",+ "needs something to look for (or use “is empty”)": "нужно указать, что искать (или выберите «пусто»)",+ "needs something to look for (or use “isn't empty”)": "нужно указать, что искать (или выберите «не пусто»)",+ "needs text": "нужен текст",+ "can't match any rating from 0 to 5": "не подходит ни к одной оценке от 0 до 5",+ "needs an album": "нужен альбом",+ "names an album that no longer exists": "указан альбом, которого больше нет",+ "can't test a folder; choose an album in it": "нельзя проверять папку; выберите альбом в ней",+ "This group is empty: add a rule or remove it.": "Эта группа пуста: добавьте условие или удалите её.",+ "needs something to look for (or use “are empty”)": "нужно указать, что искать (или выберите «пусты»)",+ "needs something to look for (or use “aren't empty”)": "нужно указать, что искать (или выберите «не пусты»)",+ "are empty": "пусты",+ "aren't empty": "не пусты",+ "contains": "содержит",+ "doesn't contain": "не содержит",+ "ends with": "заканчивается на",+ "is": "равно",+ "is <": "меньше",+ "is >": "больше",+ "is after": "после",+ "is before": "до",+ "is between": "между",+ "is empty": "пусто",+ "is in the last": "за последние",+ "is unknown": "неизвестна",+ "is ≤": "не больше",+ "is ≥": "не меньше",+ "isn't": "не равно",+ "isn't empty": "не пусто",+ "isn't in the last": "не за последние",+ "starts with": "начинается с",+ "Mo": "Пн",+ "Tu": "Вт",+ "We": "Ср",+ "Th": "Чт",+ "Fr": "Пт",+ "Sa": "Сб",+ "Su": "Вс",+ "Pick a date": "Выбрать дату",+ "would make this album include itself through other smart albums": "альбом включал бы сам себя через другие смарт-альбомы",+ "Search albums": "Поиск альбомов",+ "No albums match": "Нет подходящих альбомов",+ "This is the album you're editing": "Это альбом, который вы изменяете",+ "It tests this album, so testing it back would loop": "Он проверяет этот альбом, поэтому обратная проверка создаст цикл",+ "Copy Name": "Имя копии",+ "In a Stack": "В стопке",+ "File Extension": "Расширение файла",+ "Video Duration": "Длительность видео",+ "Keyword Count": "Число ключевых слов",+ "People Count": "Число людей",+ "Shutter Speed": "Выдержка",+ "Cropped": "Кадрировано",+ "Keywords & People": "Ключевые слова и люди",+ "Description": "Описание",+ "Camera Info": "Сведения о камере",+ "Develop": "Обработка",+ "Pick Flag": "Флаг",+ "Any Searchable Text": "Любой текст для поиска",+ "Filename": "Имя файла",+ "File Type": "Тип файла",+ "File Format": "Формат файла",+ "Edit Date": "Дата изменения",+ "People": "Люди",+ "Focal Length": "Фокусное расстояние",+ "ISO Speed": "ISO",+ "Has GPS": "Есть GPS",+ "Has Edits": "Есть правки",+ "Focus (assisted culling)": "Резкость (помощь в отборе)",+ "Best of Similar Shots": "Лучший из похожих снимков",+ "Date": "Дата",+ "Color Label": "Цветовая метка"}diff --cc crates/ui-egui/locales/zh-hans.jsonindex 5869d53bd,4a0e0aa90..57fc3303b--- a/crates/ui-egui/locales/zh-hans.json+++ b/crates/ui-egui/locales/zh-hans.json@@@ -1735,8 -1735,63 +1735,67 @@@"Pending photo action cancelled because its library or photo changed": "Pending photo action cancelled because its library or photo changed","ONNX model": "ONNX model","commercial use subject to GPL conditions": "commercial use subject to GPL conditions",+ "Decrease Rating": "降低星级",+ "Increase Rating": "提高星级",+ "Click to type a value": "单击以输入数值",- "Angle": "角度"++ "Angle": "角度",+ "Video": "视频",+ "Copyrighted": "受版权保护",+ "Public Domain": "公共领域",+ "Unknown": "未知",+ "Landscape (wide)": "横向",+ "Portrait (tall)": "纵向",+ "Square": "正方形",+ "In Color": "彩色",+ "No Label": "无标签",+ "Choose an album…": "选择相册…",+ "No albums yet": "还没有相册",+ "Fix the marked rules to save this album.": "请修正标记的规则以保存此相册。",+ "Some rules need fixing (Edit Smart Album…):": "有些规则需要修正(编辑智能相册…):",+ "isn't a field rules know": "不是已知的字段",+ "can't be tested that way": "不能这样判断",+ "is yes or no": "只能是“是”或“否”",+ "needs a number": "需要一个数字",+ "needs a time like 1/250 or 2": "需要类似 1/250 或 2 的快门速度",+ "needs a date like 2026, 2026-08 or 2026-08-14": "需要类似 2026、2026-08 或 2026-08-14 的日期",+ "has the first date after the second": "第一个日期晚于第二个",+ "needs two values": "需要两个值",+ "needs a number more than 0": "需要大于 0 的数字",+ "needs hours, days, weeks, months or years": "需要小时、天、周、月或年",+ "isn't one of the choices": "不是可选项之一",+ "needs something to look for (or use “is empty”)": "需要要查找的内容(或使用“为空”)",+ "needs something to look for (or use “isn't empty”)": "需要要查找的内容(或使用“不为空”)",+ "needs text": "需要文本",+ "can't match any rating from 0 to 5": "不匹配 0 到 5 的任何星级",+ "needs an album": "需要选择相册",+ "names an album that no longer exists": "指定的相册已不存在",+ "can't test a folder; choose an album in it": "无法判断文件夹;请选择其中的相册",+ "This group is empty: add a rule or remove it.": "此组为空:请添加规则或将其删除。",+ "needs something to look for (or use “are empty”)": "需要要查找的内容(或使用“为空”)",+ "needs something to look for (or use “aren't empty”)": "需要要查找的内容(或使用“不为空”)",+ "Mo": "一",+ "Tu": "二",+ "We": "三",+ "Th": "四",+ "Fr": "五",+ "Sa": "六",+ "Su": "日",+ "Pick a date": "选择日期",+ "would make this album include itself through other smart albums": "会通过其他智能相册让此相册包含自身",+ "Search albums": "搜索相册",+ "No albums match": "没有匹配的相册",+ "This is the album you're editing": "这是正在编辑的相册",+ "It tests this album, so testing it back would loop": "它引用了此相册,反过来引用会形成循环",+ "Copy Name": "副本名称",+ "In a Stack": "在堆叠中",+ "File Extension": "文件扩展名",+ "Video Duration": "视频时长",+ "Keyword Count": "关键字数量",+ "People Count": "人物数量",+ "Shutter Speed": "快门速度",+ "Cropped": "已裁剪",+ "Keywords & People": "关键字与人物",+ "Description": "描述",+ "Camera Info": "相机信息",+ "Develop": "编辑"}diff --cc crates/ui-egui/locales/zh-hant.jsonindex 936870ab9,2da764951..f72d422e1--- a/crates/ui-egui/locales/zh-hant.json+++ b/crates/ui-egui/locales/zh-hant.json@@@ -1735,8 -1735,63 +1735,67 @@@"Pending photo action cancelled because its library or photo changed": "Pending photo action cancelled because its library or photo changed","ONNX model": "ONNX model","commercial use subject to GPL conditions": "commercial use subject to GPL conditions",+ "Decrease Rating": "降低評分",+ "Increase Rating": "提高評分",+ "Click to type a value": "點擊以輸入數值",- "Angle": "角度"++ "Angle": "角度",+ "Video": "影片",+ "Copyrighted": "受著作權保護",+ "Public Domain": "公有領域",+ "Unknown": "未知",+ "Landscape (wide)": "橫向",+ "Portrait (tall)": "直向",+ "Square": "正方形",+ "In Color": "彩色",+ "No Label": "無標籤",+ "Choose an album…": "選擇相簿…",+ "No albums yet": "還沒有相簿",+ "Fix the marked rules to save this album.": "請修正標記的規則以儲存此相簿。",+ "Some rules need fixing (Edit Smart Album…):": "有些規則需要修正(編輯智慧型相簿…):",+ "isn't a field rules know": "不是已知的欄位",+ "can't be tested that way": "無法這樣判斷",+ "is yes or no": "只能是「是」或「否」",+ "needs a number": "需要一個數字",+ "needs a time like 1/250 or 2": "需要類似 1/250 或 2 的快門速度",+ "needs a date like 2026, 2026-08 or 2026-08-14": "需要類似 2026、2026-08 或 2026-08-14 的日期",+ "has the first date after the second": "第一個日期晚於第二個",+ "needs two values": "需要兩個值",+ "needs a number more than 0": "需要大於 0 的數字",+ "needs hours, days, weeks, months or years": "需要小時、天、週、月或年",+ "isn't one of the choices": "不是可選項之一",+ "needs something to look for (or use “is empty”)": "需要要尋找的內容(或使用「為空」)",+ "needs something to look for (or use “isn't empty”)": "需要要尋找的內容(或使用「不為空」)",+ "needs text": "需要文字",+ "can't match any rating from 0 to 5": "不符合 0 到 5 的任何評分",+ "needs an album": "需要選擇相簿",+ "names an album that no longer exists": "指定的相簿已不存在",+ "can't test a folder; choose an album in it": "無法判斷資料夾;請選擇其中的相簿",+ "This group is empty: add a rule or remove it.": "此群組為空:請新增規則或將其移除。",+ "needs something to look for (or use “are empty”)": "需要要尋找的內容(或使用「為空」)",+ "needs something to look for (or use “aren't empty”)": "需要要尋找的內容(或使用「不為空」)",+ "Mo": "一",+ "Tu": "二",+ "We": "三",+ "Th": "四",+ "Fr": "五",+ "Sa": "六",+ "Su": "日",+ "Pick a date": "選擇日期",+ "would make this album include itself through other smart albums": "會透過其他智慧型相簿讓此相簿包含自身",+ "Search albums": "搜尋相簿",+ "No albums match": "沒有符合的相簿",+ "This is the album you're editing": "這是正在編輯的相簿",+ "It tests this album, so testing it back would loop": "它引用了此相簿,反過來引用會形成循環",+ "Copy Name": "副本名稱",+ "In a Stack": "在堆疊中",+ "File Extension": "副檔名",+ "Video Duration": "影片長度",+ "Keyword Count": "關鍵字數量",+ "People Count": "人物數量",+ "Shutter Speed": "快門速度",+ "Cropped": "已裁切",+ "Keywords & People": "關鍵字與人物",+ "Description": "描述",+ "Camera Info": "相機資訊",+ "Develop": "編輯"}diff --cc crates/ui-egui/src/lib.rsindex edeb5772f,13234bb4f..4074aee01--- a/crates/ui-egui/src/lib.rs+++ b/crates/ui-egui/src/lib.rs@@@ -32,11 -34,13 +34,15 @@@ pub mod themepub mod titlebar;pub mod widgets;+#[cfg(test)]+mod tests_crop_rotate;#[cfg(test)]+ mod tests_album_picker;+ #[cfg(test)]mod tests_curve;#[cfg(test)]+ mod tests_date_picker;+ #[cfg(test)]mod tests_filmstrip;#[cfg(test)]mod tests_grid;diff --cc crates/ui-egui/src/shortcuts.rsindex 37a3c57d6,0ebb0808c..7642ce919--- a/crates/ui-egui/src/shortcuts.rs+++ b/crates/ui-egui/src/shortcuts.rs@@@ -305,18 -294,20 +305,22 @@@ pub fn handle(app: &mut LightcraftApp,let native = |sc: &str| app.native_shortcuts.contains(sc);let mut aliased: Vec<(&str, serde_json::Value)> = Vec::new();let keymap = &app.ui.settings.keymap;+ let grid = library_grid(app);// keys the user gave to a command: the fixed bindings below (aliases, ratings) yield to themlet taken: Vec<(Modifiers, Key)> = keymap.values().filter_map(|s| parse(s)).collect();+ // an open popup (a menu, a date picker's calendar) closes on Esc itself: Esc's command (Back,+ // which also closes dialogs) waits until nothing is open+ let popup_open = egui::Popup::is_any_open(ctx);ctx.input(|i| {for b in bindable() {if let Some(sc) = binding(keymap, b.id, b.default)&& let Some((m, k)) = parse(sc)&& !native(sc)+ && !(k == Key::Escape && popup_open)&& matches(i, m, k)+ && let Some(id) = grid_bracket_command(keymap, grid, b.id, (m, k)){- fire.push(b.id.to_string());+ fire.push(id.to_string());}}for (sc, id, params) in ALIASES {diff --cc docs/parity.mdindex 42714fc59,44f48b20a..ad199a93f--- a/docs/parity.md+++ b/docs/parity.md@@@ -157,8 -157,8 +157,8 @@@ under the UI command that wraps it (a n| LR-LIB-RECENT-ADDED | Recently added | P1 | ✅ | `cmd:library.source` (`recentlyAdded`), `crates/engine/src/view.rs` (`RECENT_DAYS`) | photos imported in the 30 days up to the latest import, newest import first, grouped by import day || LR-LIB-BYDATE | Browse by date | P1 | ✅ | `cmd:library.filter` (`date`), `crates/ui-egui/src/panels/left.rs` (`date_row`), `crates/catalog/src/query.rs` (`date_groups`) | year → month → day tree with library-wide counts; a row filters the current source by that date. Active filters show as removable chips under the grid header (`crates/ui-egui/src/panels/chips.rs`, with “+N more” and Clear all), the header counts “N of M photos” (matching of the source's total), a badge on the top-bar filter icon counts them, and an empty result says no photos match the active filters || LR-LIB-ALBUM | Albums | P0 | ✅ | `cmd:album.create`, `cmd:album.rename`, `cmd:album.delete`, `cmd:album.addPhotos`, `cmd:album.removePhotos`, `cmd:dialog.newAlbum` | photos dragged from the grid onto an album row are added to it (LR-BEHAV-DRAGDROP) |-| LR-LIB-FOLDER | Folders of albums | P0 | ✅ | `cmd:album.create` (`folder`, `parent`), `cmd:album.move`, `cmd:album.reorder`, `cmd:album.sort`, `cmd:dialog.newAlbum` / `cmd:dialog.newFolder` / `cmd:dialog.smartAlbum` / `cmd:dialog.newSmartAlbum` (`parent`), `crates/ui-egui/src/panels/left.rs` (`albums_tree`, `folder_menu`, `disclosure_triangle`), `crates/ui-egui/src/tests_panels.rs` | folders nest and fold with the same disclosure triangle as Local / By Date / Folders / Keywords (`albumToggle:<id>`; the row folds them too; open by default); right-click a folder ▸ New ▸ Create Album… / Create Smart Album… / Create Smart Album from Filter… / Create Folder… creates inside it (the `dialog.new*` commands take `parent`), opening the folders down to the new row; creating is only allowed inside folders; moving: drag an album or folder row onto a folder (outlined when allowed; a closed folder opens after 0.6 s under the pointer; the "Albums" header takes an item that sits in a folder back to the top level while it is dragged), the Move to menu or `album.move` — one undo step each; not onto a plain album, itself or something inside it; drop on the top / bottom half of an album or the edge of a folder to place it there by hand (`cmd:album.reorder`, a line shows the place; ordered per folder, folders stay first, new albums go after the ordered ones; right-click ▸ Sort Contents A–Z or + ▸ Sort Albums A–Z = `cmd:album.sort`) |+| LR-LIB-FOLDER | Folders of albums | P0 | ✅ | `cmd:album.create` (`folder`, `parent`), `cmd:album.move`, `cmd:album.reorder`, `cmd:album.sort`, `cmd:dialog.newAlbum` / `cmd:dialog.newFolder` / `cmd:dialog.smartAlbum` / `cmd:dialog.newSmartAlbum` (`parent`), `crates/ui-egui/src/panels/left.rs` (`albums_tree`, `folder_menu`, `disclosure_triangle`), `crates/ui-egui/src/tests_panels.rs` | Delete removes a folder and its nested albums as one undoable edit, keeps photos in the library and returns a deleted album view to All Photos (issue #501); folders nest and fold with the same disclosure triangle as Local / By Date / Folders / Keywords (`albumToggle:<id>`; the row folds them too; open by default); right-click a folder ▸ New ▸ Create Album… / Create Smart Album… / Create Smart Album from Filter… / Create Folder… creates inside it (the `dialog.new*` commands take `parent`), opening the folders down to the new row; creating is only allowed inside folders; moving: drag an album or folder row onto a folder (outlined when allowed; a closed folder opens after 0.6 s under the pointer; the "Albums" header takes an item that sits in a folder back to the top level while it is dragged), the Move to menu or `album.move` — one undo step each; not onto a plain album, itself or something inside it; drop on the top / bottom half of an album or the edge of a folder to place it there by hand (`cmd:album.reorder`, a line shows the place; ordered per folder, folders stay first, new albums go after the ordered ones; right-click ▸ Sort Contents A–Z or + ▸ Sort Albums A–Z = `cmd:album.sort`) |- | LR-LIB-SMARTALBUM | Smart albums | P1 | ✅ | `cmd:album.createSmart`, `cmd:album.setRules`, `crates/catalog/src/query.rs`, `crates/ui-egui/src/panels/filterbar.rs`, `crates/ui-egui/src/lib.rs` (`album_counts`) | saved filters (rating/flag/label/kind/edited/keyword/camera/lens/date range/text/album), live; match-all only (no any/none rule groups, no rule editor dialog — rules come from the filter bar or `album.setRules`); sidebar counts are cached per catalog revision (and per minute while an “in the last…” rule is used), counted without building id lists |+ | LR-LIB-SMARTALBUM | Smart albums | P1 | ✅ | `cmd:album.createSmart`, `cmd:album.setRules`, `crates/catalog/src/query.rs`, `crates/ui-egui/src/panels/filterbar.rs`, `crates/ui-egui/src/lib.rs` (`album_counts`) | saved filters (rating/flag/label/kind/edited/keyword/camera/lens/date range/text/album) or a rule set from the rule editor (match all / any / none, nested groups; see LRC-LIB-SMARTCOLL), live; sidebar counts are cached per catalog revision (and per minute while an “in the last…” rule is used), counted without building id lists || LR-LIB-SHARED-ALBUM | Shared albums | P2 | ⬜ | | needs a sharing service || LR-LIB-OFFLINE | Keep album offline | P2 | 🚫 | | not applicable: local-first library || LR-LIB-TARGET | Target album | P2 | ✅ | `cmd:album.setTarget`, `cmd:album.toggleTarget` | see LRC-LIB-COLLECTIONS |