LightCraft: An open-source non-destructive photo editor written by scratch in pure Rust
Merge #2701@da434b059 (presets dropped with no library open are refused) into round3a-integration
francoisgn5223c8095440
diff --cc crates/ui-egui/src/drop_overlay.rsindex 59aa5bd91,000000000..0e4825988mode 100644,000000..100644--- a/crates/ui-egui/src/drop_overlay.rs+++ b/crates/ui-egui/src/drop_overlay.rs@@@ -1,95 -1,0 +1,99 @@@+//! What dropping the files dragged over the window will do: the same sorting the drop applies,+//! shown on a veil over the whole window while the drag lasts.++use egui::{Align2, Color32, Context, Order, Rect, Stroke, StrokeKind, vec2};++use crate::LightcraftApp;+use crate::theme::Tokens;++/// Dropped paths by what becomes of them.+#[derive(Default, Debug, PartialEq)]+pub struct Sorted {+ /// Face models (`.onnx`): the first opens the licence dialog.+ pub models: Vec<String>,+ /// Preset files: imported as presets.+ pub presets: Vec<String>,+ /// Everything else: photos and folders, for the import.+ pub photos: Vec<String>,+}++/// Sort `paths` as a drop does.+pub fn classify(paths: Vec<String>) -> Sorted {+ let (models, rest): (Vec<String>, Vec<String>) = paths.into_iter().partition(|p| crate::is_model_file(p));+ let (presets, photos) = crate::split_presets(rest);+ Sorted { models, presets, photos }+}++/// The lines the card shows for files hovering over the window (`unknown`: how many have no path+/// to look at, as on some platforms and in browsers), for the current settings.+fn lines(app: &LightcraftApp, paths: Vec<String>, unknown: bool) -> Vec<String> {+ if app.ui.dialog.is_some() {+ return vec![crate::i18n::tr("Close the open dialog to drop files here").to_string()];+ }+ let drop = classify(paths);+ let mut out = Vec::new();+ if !drop.models.is_empty() {+ out.push(crate::i18n::tr("Drop to open the face model").to_string());+ }+ let plural = |n: usize| if n == 1 { "" } else { "s" };- if !drop.presets.is_empty() {++ // no library open yet (desktop: the web build's drops import into its session as before):++ // photos wait for the library chosen, presets are refused (the drop handler does the same)++ let waiting = crate::panels::library_problem::holds_drops(app) && !cfg!(target_arch = "wasm32");++ if !drop.presets.is_empty() && waiting {++ out.push(crate::i18n::tr("Open a library first, then drop the presets again").to_string());++ } else if !drop.presets.is_empty() {+ let n = drop.presets.len();+ out.push(crate::i18n::tr_format!("Drop to import {n} preset{}", plural(n), n = n));+ }- if !drop.photos.is_empty() && crate::panels::library_problem::holds_drops(app) {- // no library open yet: they wait for the one chosen (the drop handler holds them)++ if !drop.photos.is_empty() && waiting {+ out.push(crate::i18n::tr("The photos are imported once a library is open").to_string());+ } else if !drop.photos.is_empty() && app.lightroom.is_some() && !cfg!(target_arch = "wasm32") {+ // the drop is refused while a Lightroom catalog import owns the catalog+ out.push(crate::i18n::tr("Finish Lightroom catalog import before adding photos").to_string());+ } else if !drop.photos.is_empty() && crate::import::running(app) && !cfg!(target_arch = "wasm32") {+ out.push(crate::i18n::tr("An import is running. Drop photos when it has finished").to_string());+ } else if !drop.photos.is_empty() {+ let n = drop.photos.len();+ // the web build has no review to open: its drops import at once+ if app.ui.settings.import_dropped_directly || cfg!(target_arch = "wasm32") {+ out.push(crate::i18n::tr_format!("Drop to import {n} item{}", plural(n), n = n));+ } else {+ out.push(crate::i18n::tr_format!("Drop to review {n} item{} for import", plural(n), n = n));+ }+ }+ if out.is_empty() || unknown {+ out.push(crate::i18n::tr("Drop to import").to_string());+ }+ out+}++/// Veil and card while files are dragged over the window.+pub fn show(app: &LightcraftApp, ctx: &Context) {+ let count = ctx.input(|i| i.raw.hovered_files.len());+ if count == 0 {+ return;+ }+ let known: Vec<String> = ctx.input(|i| {+ i.raw.hovered_files.iter().filter_map(|f| f.path.as_ref()).map(|p| p.to_string_lossy().to_string()).filter(|p| !p.is_empty()).collect()+ });+ let lines = lines(app, known.clone(), known.len() < count);+ let t = Tokens::get(ctx);+ let screen = ctx.content_rect();+ let painter = ctx.layer_painter(egui::LayerId::new(Order::Tooltip, egui::Id::new("drop-overlay")));+ painter.rect_filled(screen, 0.0, Color32::from_black_alpha(150));+ painter.rect_stroke(screen.shrink(10.0), 12.0, Stroke::new(2.0, t.accent), StrokeKind::Inside);+ let galleys: Vec<_> = lines.into_iter().map(|l| painter.layout(l, t.semibold(18.0), t.text, (screen.width() - 120.0).max(200.0))).collect();+ let (w, h) = galleys.iter().fold((0.0f32, 0.0f32), |(w, h), g| (w.max(g.size().x), h + g.size().y + 8.0));+ let card = Rect::from_center_size(screen.center(), vec2(w + 64.0, h + 40.0));+ painter.rect_filled(card, 10.0, t.chrome);+ painter.rect_stroke(card, 10.0, Stroke::new(1.0, t.accent), StrokeKind::Inside);+ let mut y = card.top() + 24.0;+ for g in galleys {+ let at = egui::pos2(card.center().x, y);+ let height = g.size().y;+ painter.galley(Align2::CENTER_TOP.anchor_size(at, g.size()).min, g, t.text);+ y += height + 8.0;+ }+ crate::widgets::register(ctx, "dropOverlay", card);+ ctx.request_repaint();+}diff --cc crates/ui-egui/src/lib.rsindex f777b3afd,82ee5d3f8..07997e207--- a/crates/ui-egui/src/lib.rs+++ b/crates/ui-egui/src/lib.rs@@@ -1276,53 -1243,35 +1276,58 @@@ impl LightcraftAppshortcuts::handle(self, ctx);}#[cfg(not(target_arch = "wasm32"))]+ self.handle_dropped_files(ctx);+ }++ /// Files dropped on the window: face models open their licence dialog, presets import as+ /// presets, photos and folders go to the import review (or straight in, Settings ▸ Import).+ #[cfg(not(target_arch = "wasm32"))]+ fn handle_dropped_files(&mut self, ctx: &egui::Context) {+ let dropped: Vec<String> =+ ctx.input(|i| i.raw.dropped_files.iter().map(|f| f.path().to_string_lossy().to_string()).filter(|p| !p.is_empty()).collect());+ if dropped.is_empty() {+ return;+ }+ // a dialog is on screen: the review would replace it, losing what it holds+ if self.ui.dialog.is_some() {+ self.toast(ctx, crate::i18n::tr("Close the open dialog, then drop the files again"));+ return;+ }+ let drop = drop_overlay::classify(dropped);+ if let Some(model) = drop.models.first()+ && let Err(e) = panels::faces::open_dialog(self, model){- let dropped: Vec<String> =- ctx.input(|i| i.raw.dropped_files.iter().map(|f| f.path().to_string_lossy().to_string()).filter(|p| !p.is_empty()).collect());- // preset files import as presets, everything else as photos- // a dropped face model opens its licence dialog; presets and photos as before- let (models, dropped): (Vec<String>, Vec<String>) = dropped.into_iter().partition(|p| is_model_file(p));- if let Some(model) = models.first()- && let Err(e) = panels::faces::open_dialog(self, model)- {- self.toast(ctx, e);- }- let (presets, photos) = split_presets(dropped);- if !presets.is_empty() {- // presets live in a library: with none open they would go with the session it replaces- if panels::library_problem::holds_drops(self) {- self.toast(ctx, crate::i18n::tr("Open a library first, then drop the presets again"));- } else {- let _ = self.run("file.importPresets", serde_json::json!({"paths": presets}));- }+ self.toast(ctx, e);+ }+ if !drop.presets.is_empty() {- let _ = self.run("file.importPresets", serde_json::json!({"paths": drop.presets}));++ // presets live in a library: with none open they would go with the session it replaces++ if panels::library_problem::holds_drops(self) {++ self.toast(ctx, crate::i18n::tr("Open a library first, then drop the presets again"));++ } else {++ let _ = self.run("file.importPresets", serde_json::json!({"paths": drop.presets}));+ }+ }+ if drop.photos.is_empty() {+ return;+ }+ // no library open yet (the launch list, a library that failed to open): they wait for one+ let Some(photos) = panels::library_problem::hold_dropped(self, ctx, drop.photos) else { return };+ if self.lightroom.is_some() {+ self.toast(ctx, crate::i18n::tr("Finish Lightroom catalog import before adding photos"));+ return;+ }+ if import::running(self) {+ self.toast(ctx, crate::i18n::tr("An import is running"));+ return;+ }+ let started = if self.ui.settings.import_dropped_directly {// read and added on a worker thread (dropped folders can be large, or on a slow drive)- let photos = panels::library_problem::hold_dropped(self, ctx, photos).unwrap_or_default();- if !photos.is_empty() {- if self.lightroom.is_some() {- self.toast(ctx, "Finish Lightroom catalog import before adding photos");- } else if let Err(e) = import::start_paths(self, photos) {- self.toast(ctx, e);- }- }+ import::start_paths(self, photos).map(|_| ())+ } else {+ import::open(self, photos).map(|_| ())+ };+ if let Err(e) = started {+ self.toast(ctx, e);}}diff --cc crates/ui-egui/src/tests_drop_import.rsindex d4b362d5b,000000000..9751546dfmode 100644,000000..100644--- a/crates/ui-egui/src/tests_drop_import.rs+++ b/crates/ui-egui/src/tests_drop_import.rs@@@ -1,270 -1,0 +1,277 @@@+//! Files dragged from the file manager onto the window: while they hover, the window says what+//! dropping will do; dropping photos or folders opens the import review (unless Settings ▸ Import+//! says to import dropped files directly); a drop while a dialog is open is refused.++use std::time::Duration;++use serde_json::json;++use crate::headless::Headless;+use crate::state::Dialog;+use crate::{LightcraftApp, Services};++const T: Duration = Duration::from_secs(20);+const SETTLE: Duration = Duration::from_secs(120);++/// A scratch folder that goes away with the test, however it ends.+struct Scratch(std::path::PathBuf);++impl Scratch {+ fn new(tag: &str) -> Scratch {+ let dir = std::env::temp_dir().join(format!("lc-ui-drop-import-{tag}-{}", std::process::id()));+ let _ = std::fs::remove_dir_all(&dir);+ std::fs::create_dir_all(&dir).unwrap();+ Scratch(dir)+ }+ fn path(&self, rel: &str) -> String {+ self.0.join(rel).to_string_lossy().to_string()+ }+}++impl Drop for Scratch {+ fn drop(&mut self) {+ let _ = std::fs::remove_dir_all(&self.0);+ }+}++fn write_png(path: &str, seed: u8) {+ let (w, h) = (24usize, 16usize);+ let data: Vec<[u8; 4]> = (0..w * h).map(|i| [(i % w * 9) as u8, (i / w * 13) as u8, seed, 255]).collect();+ let img = lightcraft_raster::Rgba8 { width: w, height: h, data };+ let bytes = lightcraft_codecs::encode_png(&lightcraft_codecs::EncodeImage::rgba8(&img), &lightcraft_codecs::EncodeMeta::default()).unwrap();+ std::fs::create_dir_all(std::path::Path::new(path).parent().unwrap()).unwrap();+ std::fs::write(path, bytes).unwrap();+}++/// An empty library, a folder `trip` with two photos, a window big enough for the overlay.+fn app(dir: &Scratch) -> Headless {+ write_png(&dir.path("trip/a.png"), 1);+ write_png(&dir.path("trip/b.png"), 2);+ let session = lightcraft_engine::Session::new().with_fs();+ let mut h = Headless::new(LightcraftApp::new(session, Services { png: None, ..Default::default() }), [1300.0, 900.0], 1.0);+ for _ in 0..4 {+ h.step();+ }+ h+}++fn drop_files(h: &mut Headless, paths: &[String], hover: bool) {+ let r = h.request("ui.dropFiles", json!({"paths": paths, "hover": hover}), T);+ assert_eq!(r["ok"], true, "{r}");+ for _ in 0..3 {+ h.step();+ }+}++fn overlay(h: &Headless) -> bool {+ h.app.widgets.iter().any(|(w, _)| w == "dropOverlay")+}++fn said(h: &Headless, word: &str) -> bool {+ h.painted_text().iter().any(|t| t.contains(word))+}++fn photos(h: &Headless) -> usize {+ h.app.session.catalog.photos().count()+}++#[test]+fn hovering_photos_says_they_will_be_reviewed_and_lets_go_when_they_leave() {+ let dir = Scratch::new("hover");+ let mut h = app(&dir);+ assert!(!overlay(&h), "nothing is dragged over the window");+ drop_files(&mut h, &[dir.path("trip/a.png"), dir.path("trip/b.png")], true);+ assert!(overlay(&h), "the window shows where to drop");+ assert!(said(&h, "review 2 items"), "{:?}", h.painted_text());+ drop_files(&mut h, &[], true);+ assert!(!overlay(&h), "the files left the window");+}++#[test]+fn hovering_presets_says_they_will_be_imported_as_presets() {+ let dir = Scratch::new("hover-presets");+ let mut h = app(&dir);+ std::fs::write(dir.path("warm.lcpreset"), "{}").unwrap();+ drop_files(&mut h, &[dir.path("warm.lcpreset")], true);+ assert!(overlay(&h));+ assert!(said(&h, "1 preset"), "{:?}", h.painted_text());+ assert!(!said(&h, "review"), "presets are not reviewed");+}++#[test]+fn hovering_unknown_files_says_only_that_dropping_imports() {+ let dir = Scratch::new("hover-unknown");+ let mut h = app(&dir);+ drop_files(&mut h, &[String::new()], true);+ assert!(overlay(&h));+ assert!(said(&h, "Drop to import"), "{:?}", h.painted_text());+}++#[test]+fn dropping_a_folder_opens_the_import_review_and_imports_nothing_yet() {+ let dir = Scratch::new("review");+ let mut h = app(&dir);+ drop_files(&mut h, &[dir.path("trip")], false);+ assert!(h.step_until(SETTLE, |h| matches!(h.app.ui.dialog, Some(Dialog::Import { .. }))), "the review opens");+ let Some(Dialog::Import { opts }) = &h.app.ui.dialog else { panic!("no import review") };+ assert_eq!(opts.candidates.len(), 2);+ assert_eq!(photos(&h), 0, "nothing is imported until the review is confirmed");+ assert!(!overlay(&h), "the files were let go");+}++#[test]+fn dropping_imports_directly_when_settings_say_so() {+ let dir = Scratch::new("direct");+ let mut h = app(&dir);+ h.app.ui.settings.import_dropped_directly = true;+ drop_files(&mut h, &[dir.path("trip")], false);+ assert!(h.step_until(SETTLE, |h| photos(h) == 2 && h.app.import.is_none()), "both photos arrive");+ assert!(h.app.ui.dialog.is_none(), "no review");+}++#[test]+fn a_drop_while_a_dialog_is_open_leaves_the_dialog_and_imports_nothing() {+ let dir = Scratch::new("dialog");+ let mut h = app(&dir);+ h.app.ui.dialog = Some(Dialog::WhatsNew);+ drop_files(&mut h, &[dir.path("trip/a.png")], true);+ assert!(overlay(&h), "the window still answers the hover");+ assert!(said(&h, "Close the open dialog"), "{:?}", h.painted_text());+ drop_files(&mut h, &[dir.path("trip")], false);+ for _ in 0..30 {+ h.step();+ }+ assert!(matches!(h.app.ui.dialog, Some(Dialog::WhatsNew)), "the open dialog stays");+ assert!(h.app.scan.is_none() && h.app.import.is_none(), "no scan or import started");+ assert_eq!(photos(&h), 0);+ assert!(h.app.ui.toast.is_some(), "the person is told why");+}++/// The scan of a dropped folder finishing while another dialog is open (the face model's licence, Settings…)+/// keeps that dialog; the review opens, with the scan's photos, once it is closed.+#[test]+fn a_finished_scan_waits_for_the_open_dialog_before_opening_the_review() {+ let dir = Scratch::new("waits");+ let mut h = app(&dir);+ crate::import::open(&mut h.app, vec![dir.path("trip")]).unwrap();+ h.app.ui.dialog = Some(Dialog::WhatsNew);+ assert!(h.step_until(SETTLE, |h| h.app.scan.is_none()), "the scan ends");+ for _ in 0..10 {+ h.step();+ }+ assert!(matches!(h.app.ui.dialog, Some(Dialog::WhatsNew)), "the dialog the person had open stays");+ h.app.ui.dialog = None;+ assert!(h.step_until(T, |h| matches!(h.app.ui.dialog, Some(Dialog::Import { .. }))), "the review opens once the dialog is closed");+ let Some(Dialog::Import { opts }) = &h.app.ui.dialog else { panic!("no import review") };+ assert_eq!(opts.candidates.len(), 2, "the scan's photos were kept");+}++/// A drop while an import runs would open a review whose OK replaces the running import: it is+/// refused instead, and the card says so.+#[test]+fn a_drop_while_an_import_runs_is_refused() {+ let dir = Scratch::new("running");+ let mut h = app(&dir);+ write_png(&dir.path("more/c.png"), 3);+ let _scan = crate::import::stall_scan(&mut h.app);+ drop_files(&mut h, &[dir.path("more/c.png")], true);+ assert!(said(&h, "An import is running"), "{:?}", h.painted_text());+ assert!(!said(&h, "review"), "{:?}", h.painted_text());+ drop_files(&mut h, &[dir.path("more")], false);+ for _ in 0..30 {+ h.step();+ }+ assert!(h.app.ui.dialog.is_none(), "no review opened");+ assert!(h.app.scan.is_some() && h.app.import.is_none(), "the running scan was left alone and nothing else started");+ assert!(h.app.ui.toast.is_some(), "the person is told why");+ assert_eq!(photos(&h), 0);+}++/// An import that is running stays the one that runs: a direct drop doesn't start a second.+#[test]+fn a_direct_drop_while_an_import_runs_is_refused_too() {+ let dir = Scratch::new("running-direct");+ let mut h = app(&dir);+ h.app.ui.settings.import_dropped_directly = true;+ write_png(&dir.path("more/c.png"), 3);+ let _scan = crate::import::stall_scan(&mut h.app);+ drop_files(&mut h, &[dir.path("more")], false);+ assert!(h.app.import.is_none(), "no second import");+ assert!(h.app.ui.toast.is_some());+}++/// A Local folder browse scan counts too: a review-first drop would be rejected by `open`, and a+/// direct drop would be replaced when the browse completes.+#[test]+fn a_drop_while_a_browse_scan_runs_is_refused_in_both_modes() {+ for direct in [false, true] {+ let dir = Scratch::new("running-browse");+ let mut h = app(&dir);+ h.app.ui.settings.import_dropped_directly = direct;+ write_png(&dir.path("more/c.png"), 3);+ let _scan = crate::import::stall_scan_of(&mut h.app, true);+ drop_files(&mut h, &[dir.path("more/c.png")], true);+ assert!(said(&h, "An import is running"), "{:?}", h.painted_text());+ drop_files(&mut h, &[dir.path("more")], false);+ for _ in 0..30 {+ h.step();+ }+ assert!(h.app.ui.dialog.is_none() && h.app.import.is_none(), "direct={direct}: nothing started");+ assert!(h.app.scan.is_some(), "the browse was left alone");+ assert!(h.app.ui.toast.is_some(), "the person is told why");+ }+}++/// While a Lightroom catalog import is pending the drop is refused, and the card says so instead of+/// promising a review.+#[test]+fn hovering_photos_while_a_lightroom_import_is_pending_says_they_will_be_refused() {+ let dir = Scratch::new("lightroom");+ let mut h = app(&dir);+ let _task = crate::lightroom_import::stall_import(&mut h.app);+ drop_files(&mut h, &[dir.path("trip")], true);+ assert!(said(&h, "Finish Lightroom catalog import"), "{:?}", h.painted_text());+ assert!(!said(&h, "review"), "{:?}", h.painted_text());+ drop_files(&mut h, &[dir.path("trip")], false);+ assert!(h.app.ui.dialog.is_none(), "no review opened");+ assert!(h.app.ui.toast.is_some(), "the person is told why");+ assert_eq!(photos(&h), 0);+}++/// A script is not told `ok` for the part of a `paths` list that was strings.+#[test]+fn drop_files_with_a_non_string_path_is_rejected_and_drops_nothing() {+ let dir = Scratch::new("badpaths");+ let mut h = app(&dir);+ let r = h.request("ui.dropFiles", json!({"paths": [dir.path("trip"), 7]}), T);+ assert_eq!(r["ok"], false, "{r}");+ for _ in 0..30 {+ h.step();+ }+ assert!(h.app.ui.dialog.is_none(), "nothing was dropped");+ assert_eq!(photos(&h), 0);+}++/// No library open yet (the window of a library that failed to open, or the launch list): the+/// card says the photos wait, and a drop keeps them for the library chosen instead of importing+/// them into the session that library replaces.+#[test]+fn photos_dropped_with_no_library_open_wait_for_one() {+ let dir = Scratch::new("no-library");+ let mut h = app(&dir);+ h.app.library_problem = Some(crate::panels::library_problem::LibraryProblem::new(dir.path("Gone"), "not found"));- drop_files(&mut h, &[dir.path("trip/a.png")], true);++ std::fs::write(dir.path("warm.lcpreset"), "{}").unwrap();++ drop_files(&mut h, &[dir.path("trip/a.png"), dir.path("warm.lcpreset")], true);+ assert!(said(&h, "once a library is open"), "{:?}", h.painted_text());++ assert!(said(&h, "drop the presets again") && !said(&h, "1 preset"), "{:?}", h.painted_text());+ drop_files(&mut h, &[], true);+ drop_files(&mut h, &[dir.path("trip/a.png"), dir.path("trip/b.png")], false);+ assert_eq!(h.app.library_problem.as_ref().map(|p| p.pending_import.len()), Some(2));+ assert!(h.app.ui.dialog.is_none() && h.app.import.is_none(), "no review, no import into the temporary session");+ assert_eq!(photos(&h), 0);++ // a preset belongs to a library: refused, not imported into the session the library replaces++ h.app.ui.toast = None;++ drop_files(&mut h, &[dir.path("warm.lcpreset")], false);++ let toast = h.app.ui.toast.as_ref().map(|t| t.0.clone()).unwrap_or_default();++ assert!(toast.contains("drop the presets again"), "{toast}");+}diff --cc docs/parity-checklist.mdindex 05818ca7d,9bcd04286..d285b88bb--- a/docs/parity-checklist.md+++ b/docs/parity-checklist.md@@@ -70,7 -70,7 +70,7 @@@ differences and missing bindings are i| Id | Feature | Tier | Status | Evidence | Missing / notes ||---|---|---|---|---|---|| LR-IMP-ADD-DIALOG | Add photos/folders | P0 | ✅ | `cmd:file.addPhotos`, `cmd:library.importPreview`, `cmd:library.import` (`mode`, `album`, `albumName`, `preset`, `keywords`), `crates/ui-egui/src/import.rs` | review dialog (Import Photos): the scanned source (a scanned folder is not added to Local), candidate grid with thumbnails and checkboxes (duplicates by path/content marked and unchecked; with several file types, a toggle per type checks or unchecks all of its files, e.g. the raws without the JPEGs beside them, issue #344) filling a resizable window (issue #337), transfer mode (add in place / copy / move, each explained), album (existing/new): the destination picker follows the sidebar folder hierarchy and order, searches full paths, and distinguishes duplicate names by their folder path; folders navigate and smart albums are excluded, with None, New album and album-context preselection retained (#2362; `crates/ui-egui/src/album_picker.rs`, `crates/ui-egui/src/tests_album_picker.rs`); preset, keywords; the folder scan runs on a background thread, shown in the activity stack with ✕ to cancel (a NAS folder no longer freezes the window); the import itself (probing, sidecars, copying / moving files) runs on a worker thread and its batches join the library between frames, shown in the activity stack with ✕ to cancel; one undo step. Drag-and-drop goes through the same background import. File dialogs list the importable extensions (`lightcraft_engine::import::EXTENSIONS`) in any letter case on Linux, where GTK and the desktop portal match globs case-sensitively (`apps/lightcraft/src/dialog_filter.rs`, issue #342; 0.4.0 hid `.JPG` / `.NEF`, issue #705). The folder scan, Browse Folder, drag-and-drop and the sidecar lookup match extensions in any case (`crates/engine/src/tests_import.rs`) |- | LR-IMP-DRAGDROP | Drop files/folders to import | P0 | ✅ | `crates/ui-egui/src/lib.rs` (dropped files → the import review), `crates/ui-egui/src/drop_overlay.rs`, `crates/ui-egui/src/tests_drop_import.rs` | while files are dragged over the window a veil and a card say what dropping does (review N items for import, import N presets, open the face model; a note to close the open dialog first when one is open); photos and folders open the import review as File ▸ Import does (Settings ▸ Import ▸ Import dropped files without review imports them at once; the web build always does); a drop while a dialog is open (also in the web build) or while an import is running is refused with a toast, and the card says so; a finished scan waits for an open dialog to close before its review opens; the control channel's `ui.dropFiles` hovers or drops files for scripts; dropping onto a specific album not supported |-| LR-IMP-DRAGDROP | Drop files/folders to import | P0 | ✅ | `crates/ui-egui/src/lib.rs` (dropped files → `cmd:library.import`) | dropping onto a specific album not supported |++| LR-IMP-DRAGDROP | Drop files/folders to import | P0 | ✅ | `crates/ui-egui/src/lib.rs` (dropped files → the import review), `crates/ui-egui/src/drop_overlay.rs`, `crates/ui-egui/src/tests_drop_import.rs` | while files are dragged over the window a veil and a card say what dropping does (review N items for import, import N presets, open the face model; a note to close the open dialog first when one is open); photos and folders open the import review as File ▸ Import does (Settings ▸ Import ▸ Import dropped files without review imports them at once; the web build always does); with no library open on the desktop (the launch list, a library that couldn't open) photos wait for the library opened and presets are refused, and the card says so; a drop while a dialog is open (also in the web build) or while an import is running is refused with a toast, and the card says so; a finished scan waits for an open dialog to close before its review opens; the control channel's `ui.dropFiles` hovers or drops files for scripts; dropping onto a specific album not supported || LR-IMP-DUPES | Skip duplicates by content | P1 | ✅ | `crates/engine/src/import.rs`, `crates/engine/src/tests_import.rs` | || LR-IMP-DEVICE | Import from camera/card | P1 | ✅ | `cmd:library.devices`, `cmd:file.addFromDevice`, `crates/engine/src/devices.rs` | mounted volumes with a DCIM folder (macOS /Volumes, Linux /media and /run/media, Windows drive letters); File → Import from Device → the import review, copying into the library by default; menus serve the last scan and rescan in the background (never blocking a frame; hot-plugs repaint); copies are verified (a new file, synced, checked against the content hash the scan computed — byte compare with the source when there is none, issue #134; a bad copy is removed and reported as failed, never counted as imported; taken names get -1, -2…, never replaced — issue #96, `crates/engine/src/import_move.rs`); no PTP/MTP (cameras that don't mount as a disk); Settings → Import → Cameras and Cards can open the import review when a camera or card is connected (off by default; a card that was already in doesn't ask, and an open dialog or running import is finished first; `crates/ui-egui/src/import.rs`) || LR-IMP-AUTO | Watched-folder auto import | P2 | ✅ | `cmd:library.autoImport`, `cmd:library.autoImportScan`, `crates/ui-egui/src/panels/settings.rs` | Settings ▸ Import ▸ Auto Import: a watched folder whose new photos are added (in place or copied) once complete, into an optional album; scanned every 3 s |@@@ -798,15 -798,8 +798,15 @@@ Latin stays upright. Advanced Japanese| Date | Change | Summary ||---|---|---|- | 2026-10-23 | minor | LRC-LIB-CATALOG-SWITCH, LR-PREF-GENERAL: Settings ▸ General ▸ At launch (Open the last library / Ask me) with a launch window listing the recent libraries, Alt/Option at launch asks once, File ▸ Open Recent Library ▸ Remove from List and `app.recentLibraries {remove}` (issue #1290); status and counts unchanged (✅) |+ | 2026-10-23 | minor | LRC-LIB-CATALOG-SWITCH, LR-PREF-GENERAL: Settings ▸ General ▸ At launch (Open the last library / Ask me) with a launch window listing the recent libraries, Alt/Option at launch asks once, File ▸ Open Recent Library ▸ Remove from List and `app.recentLibraries {remove}` (issue #1290); photos dropped while no library is open wait for the one opened (presets are refused then); status and counts unchanged (✅) |+| 2026-10-23 | minor | LRC-LIB-CATALOG-IMPORT: Import Lightroom Catalog… (and Open Library's offer for a Lightroom catalog) asks whether the catalog merges into the open library or goes into a new library made next to it; Settings ▸ General or "Don't ask again" switches the question off; `file.importLightroom` takes `into` / `name` / `location` (#2672); status unchanged (🟡) |+| 2026-10-22 | minor | LR-VIEW-INFOOVERLAY: the info overlay shows the star rating and flag, and in the full-screen preview on macOS it starts below the window controls (issue #2460); status unchanged |+| 2026-10-22 | patch | KEY-GRID: both grid rows in View show the cycle shortcut and follow keymap changes; direct bindings and native accelerator ownership are preserved (#2500); status and counts unchanged |+| 2026-10-22 | minor | LRC-PRINT-LAYOUT: the Japanese photo and postcard paper sizes (L判, 2L判, KG判, はがき, 往復はがき, 六切, 四切, 名刺) are selectable in the page setup and Print dialog and print to PDF at their metric sizes |+| 2026-10-22 | minor | #2052 (partial): shared export text adds only Thai faces after Inter and the existing CJK chain. Thai horizontal mark positioning remains incomplete; Arabic fallback is deferred until joining and bidi reordering exist. LR-EXP-WATERMARK reassessed as partial for these layout and font limits; UI fallback unchanged |+| 2026-10-21 | patch | LR-LIB-CAPTURETIME: a capture time that doesn't fully read is left as it is and counted (`unreadable`) instead of shifted into a wrong one; it can't anchor a set that moves other photos; status unchanged || 2026-10-21 | patch | LR-IMP-ADD-DIALOG: reconcile #2362 with current main; deleted-album guard and hierarchical picker retained; counts unchanged |+| 2026-10-20 | patch | Graphic watermark inset regression: Oversized graphics fit the space remaining after the applicable anchor insets, with one aspect-preserving scale before quarter-turn rotation. Centered axes continue to ignore insets. Pixel-bound regressions cover edge/corner anchors, centered placement and all four rotations. Main d999e382 is integrated; HDR size-limit and EXIF-orientation fixes are unchanged. || 2026-10-20 | minor | LR-IMP-ADD-DIALOG: #2362 gives the import review the shared hierarchy/search album picker while retaining None/New album and existing destination IDs; status and feature counts unchanged || 2026-10-21 | patch | KEY-SLIDER-NUDGE: vertical wheel nudges need a click or drag in the slider's row; leaving it (even between two frames) or Tab focus alone does not arm them (issue #1355); status unchanged || 2026-10-21 | minor | KEYC-PANELS: F8 shows / hides the right panel (`view.rightPanel`), with F6 / F7 already bound; ⬜ → 🟡 |