LightCraft: An open-source non-destructive photo editor written by scratch in pure Rust
LR-VIEW-DETAIL: the loupe says when the render behind a stand-in fails
dev-null-undefined31c31b726b52
diff --git a/crates/ui-egui/src/control.rs b/crates/ui-egui/src/control.rsindex cf2dda385..721ebe49a 100644--- a/crates/ui-egui/src/control.rs+++ b/crates/ui-egui/src/control.rs@@ -96,6 +96,8 @@ pub fn inspect(app: &LightcraftApp, ctx: &egui::Context) -> Value {"photo": p.0,"source": src,"pending": app.renderer.is_pending(crate::render::Slot::Main),+ // why its render failed (the loupe then shows a stand-in, or nothing, for good)+ "failed": app.renderer.failure_of(crate::render::Slot::Main, p),// zoomed past the whole-frame render: the window rendered at no more than 100 % (pixels of its frame)"region": app.region_view.map(|r| json!({"full": [r.full.0, r.full.1], "window": [r.window.x, r.window.y, r.window.w, r.window.h], "pending": app.renderer.is_pending(crate::render::Slot::Region)})),// …and the same for the Before side of a Before/After viewdiff --git a/crates/ui-egui/src/headless.rs b/crates/ui-egui/src/headless.rsindex a7fded1c7..0dea81150 100644--- a/crates/ui-egui/src/headless.rs+++ b/crates/ui-egui/src/headless.rs@@ -450,6 +450,50 @@ impl Headless {}}+/// For tests, a render offload: renders wait (stay queued) until `open` is set, then run; those+/// whose slot `fails` picks come back failed, as an undecodable raw's would. Install it with+/// `h.app.renderer.set_offload(Box::new(RenderGate::new(open.clone())))`.+#[cfg(test)]+pub(crate) struct RenderGate {+ open: std::rc::Rc<std::cell::Cell<bool>>,+ fails: fn(crate::render::Slot) -> bool,+ jobs: Vec<(crate::render::Slot, lightcraft_engine::media::RenderJob)>,+}++#[cfg(test)]+impl RenderGate {+ pub(crate) fn new(open: std::rc::Rc<std::cell::Cell<bool>>) -> Self {+ Self::failing(open, |_| false)+ }+ pub(crate) fn failing(open: std::rc::Rc<std::cell::Cell<bool>>, fails: fn(crate::render::Slot) -> bool) -> Self {+ Self { open, fails, jobs: Vec::new() }+ }+}++#[cfg(test)]+impl crate::render::RenderOffload for RenderGate {+ fn try_start(&mut self, slot: crate::render::Slot, job: lightcraft_engine::media::RenderJob) -> Option<lightcraft_engine::media::RenderJob> {+ if !self.open.get() {+ return Some(job);+ }+ self.jobs.push((slot, job));+ None+ }+ fn finished(&mut self) -> Vec<(crate::render::Slot, lightcraft_engine::media::RenderResult, f64)> {+ let fails = self.fails;+ self.jobs+ .drain(..)+ .map(|(slot, job)| {+ let mut r = job.run();+ if fails(slot) {+ r.rendered = Err("no decoder for this raw".into());+ }+ (slot, r, 0.0)+ })+ .collect()+ }+}+#[cfg(test)]mod tests {#[test]@@ -3970,23 +4014,8 @@ mod tests {/// and stops when the render lands.#[test]fn the_loupe_says_rendering_while_an_edit_renders() {- use crate::render::{RenderOffload, Slot};- use lightcraft_engine::media::{RenderJob, RenderResult};+ use crate::render::Slot;use std::{cell::Cell, rc::Rc};- /// Renders wait until the gate opens.- struct Gate(Rc<Cell<bool>>, Vec<(Slot, RenderJob)>);- impl RenderOffload for Gate {- fn try_start(&mut self, slot: Slot, job: RenderJob) -> Option<RenderJob> {- if !self.0.get() {- return Some(job);- }- self.1.push((slot, job));- None- }- fn finished(&mut self) -> Vec<(Slot, RenderResult, f64)> {- self.1.drain(..).map(|(slot, job)| (slot, job.run(), 0.0)).collect()- }- }let pill = |h: &Headless| h.app.widgets.iter().any(|(w, _)| w == "loupe:rendering");let mut h = demo([1000.0, 700.0]);let t = Duration::from_secs(10);@@ -3994,7 +4023,7 @@ mod tests {h.settle(SETTLE);assert!(!pill(&h), "a finished render");let open = Rc::new(Cell::new(false));- h.app.renderer.set_offload(Box::new(Gate(open.clone(), Vec::new())));+ h.app.renderer.set_offload(Box::new(super::RenderGate::new(open.clone())));// half a second in the grid: the loupe draws no framesh.request("ui.set", json!({"view": "photoGrid"}), t);for _ in 0..30 {@@ -4016,6 +4045,46 @@ mod tests {assert!(!h.app.renderer.is_pending(Slot::Main));}+ /// A render that fails while the loupe shows a stand-in (the embedded JPEG, a thumbnail) left+ /// the stand-in up as if it were the photo: the loupe says the photo can't be opened, with the+ /// error on hover, and keeps saying so while a library change retries it.+ #[test]+ fn the_loupe_says_so_when_the_render_behind_a_stand_in_fails() {+ use crate::render::Slot;+ use std::{cell::Cell, rc::Rc};+ let has = |h: &Headless, id: &str| h.app.widgets.iter().any(|(w, _)| w == id);+ let mut h = demo([1000.0, 700.0]);+ let t = Duration::from_secs(10);+ h.request("ui.set", json!({"view": "detail", "right": "none"}), t);+ h.settle(SETTLE);+ assert!(!has(&h, "loupe:renderFailed"));+ let first = h.app.session.active().expect("a photo is open").0;+ // every loupe render fails, as an undecodable raw's would; the rest render+ let open = Rc::new(Cell::new(true));+ h.app.renderer.set_offload(Box::new(super::RenderGate::failing(open.clone(), |s| s == Slot::Main)));+ let other = h.app.session.visible_cloned().get(1).copied().expect("a second photo").0;+ h.request("engine.execute", json!({"command": "library.select", "params": {"ids": [other], "active": other}}), t);+ assert!(h.step_until(SETTLE, |h| has(h, "loupe:renderFailed")), "the failure is said");+ let shown = h.app.loupe_shown.map(|l| l.1);+ assert!(!matches!(shown, Some("render" | "none")), "over a stand-in: {shown:?}");+ assert!(!has(&h, "loupe:rendering"));+ let r = h.request("ui.inspect", json!({}), t);+ assert_eq!(r["result"]["loupe"]["failed"], "no decoder for this raw", "{}", r["result"]["loupe"]);+ // a library change (here a rating) retries it: the failure stays said, no "Rendering…"+ open.set(false);+ h.request("engine.execute", json!({"command": "photo.rate", "params": {"rating": 2}}), t);+ for _ in 0..45 {+ h.step();+ }+ assert!(h.app.renderer.is_pending(Slot::Main), "the retry is held");+ assert!(has(&h, "loupe:renderFailed") && !has(&h, "loupe:rendering"), "no blink while it retries");+ // back on a photo that rendered: nothing to say+ open.set(true);+ h.request("engine.execute", json!({"command": "library.select", "params": {"ids": [first], "active": first}}), t);+ h.app.renderer.set_offload(Box::new(super::RenderGate::new(open.clone())));+ assert!(h.step_until(SETTLE, |h| h.app.loupe_shown.is_some_and(|l| l.1 == "render") && !has(h, "loupe:renderFailed")));+ }+#[test]fn screenshot_request_is_answered_without_a_window() {let mut h = demo([800.0, 500.0]);diff --git a/crates/ui-egui/src/panels/detail.rs b/crates/ui-egui/src/panels/detail.rsindex 6ce9d0ae1..e2c044655 100644--- a/crates/ui-egui/src/panels/detail.rs+++ b/crates/ui-egui/src/panels/detail.rs@@ -623,7 +623,7 @@ pub fn show(app: &mut LightcraftApp, ui: &mut egui::Ui) {} else {shown = draw(Slot::Main, img_rect, canvas);if shown == "none" {- match app.renderer.failure(Slot::Main) {+ match app.renderer.failure_of(Slot::Main, id) {Some(e) => {p.text(canvas.center() - vec2(0.0, 10.0),@@ -759,13 +759,29 @@ pub fn show(app: &mut LightcraftApp, ui: &mut egui::Ui) {} else {&[Slot::Main]};- let coming = !matches!(shown, "none" | "hover") && whole.iter().chain(windows.iter().map(|(v, _)| &v.slot)).any(|s| app.renderer.is_pending(*s));+ let coming = !matches!(shown, "none" | "hover")+ && whole.iter().chain(windows.iter().map(|(v, _)| &v.slot)).any(|s| app.renderer.is_pending(*s) && !app.renderer.retrying(*s));let keys =[Slot::Main, Slot::Before, Slot::Region, Slot::RegionBefore].map(|s| app.renderer.textures.get(&s).filter(|t| t.photo == id).map(|t| t.key));- if ui.ctx().data_mut(|d| rendering_overdue(d.get_temp_mut_or(egui::Id::new("loupe-rendering"), None), keys, coming, now)) {+ let rendering = ui.ctx().data_mut(|d| rendering_overdue(d.get_temp_mut_or(egui::Id::new("loupe-rendering"), None), keys, coming, now));+ // the render failed while a stand-in is up: what is on screen is all there will be (also while+ // a library change retries it)+ let failed = (!rendering+ && !(show_before && !split)+ && !matches!(shown, "render" | "none" | "hover")+ && (!app.renderer.is_pending(Slot::Main) || app.renderer.retrying(Slot::Main)))+ .then(|| app.renderer.failure_of(Slot::Main, id))+ .flatten();+ if rendering || failed.is_some() {// over the photo (the After in two views); in the crop tool's wide margin, under itlet over = if crop_tool { canvas } else { img_rect.intersect(if split { main_area } else { canvas }) };- rendering_pill(ui, canvas, if over.is_positive() { over } else { canvas }, nav);+ let over = if over.is_positive() { over } else { canvas };+ match failed {+ Some(e) => failed_pill(ui, app, &photo, canvas, over, nav, "loupe:renderFailed", e),+ None => {+ loupe_pill(ui, canvas, over, nav, "loupe:rendering", crate::i18n::tr("Rendering…"), false);+ }+ }}if let Some(why) = photo.preview_only.as_deref().filter(|_| !fullscreen) {preview_only_pill(ui, canvas, why);@@ -1121,21 +1137,49 @@ fn rendering_overdue(wait: &mut RenderingWait, keys: [Option<u64>; 4], coming: b*up}-/// The pill saying "Rendering…" (registered as `loupe:rendering`), 12 pt above the bottom of `over`,-/// or just above the Navigator when that is in the way. It says the pixels on screen aren't final,-/// so it isn't an activity row (see docs/background-tasks.md).-fn rendering_pill(ui: &egui::Ui, canvas: Rect, over: Rect, navigator: Option<Rect>) {+/// A pill over the photo, 12 pt above the bottom of `over` or just above the Navigator when that+/// is in the way, registered as `id`; `caution` adds the preview-only pill's caution icon. The+/// loupe's "Rendering…" says the pixels on screen aren't final, so it isn't an activity row (see+/// docs/background-tasks.md); "This photo can't be opened" says the stand-in on screen is all+/// there will be.+fn loupe_pill(ui: &egui::Ui, canvas: Rect, over: Rect, navigator: Option<Rect>, id: &str, text: &str, caution: bool) -> Rect {let t = Tokens::get(ui.ctx());let p = ui.painter_at(canvas);- let g = p.layout_no_wrap(crate::i18n::tr("Rendering…").to_string(), t.font(12.0), Color32::from_gray(225));- let size = vec2(g.size().x + 20.0, 20.0);+ let g = p.layout_no_wrap(text.to_string(), t.font(12.0), Color32::from_gray(225));+ let inset = if caution { 29.0 } else { 10.0 };+ let size = vec2(g.size().x + inset + 10.0, 20.0);let mut r = Rect::from_center_size(pos2(over.center().x, over.bottom() - 12.0 - size.y / 2.0), size);if let Some(nav) = navigator.filter(|n| n.expand(8.0).intersects(r)) {r = Rect::from_min_size(pos2(nav.right() - size.x, nav.top() - 8.0 - size.y), size);}p.rect_filled(r, 10.0, Color32::from_black_alpha(185));- p.galley(pos2(r.left() + 10.0, r.center().y - g.size().y / 2.0), g, Color32::from_gray(225));- register(ui.ctx(), "loupe:rendering", r);+ if caution {+ crate::icons::paint(&p, Rect::from_center_size(pos2(r.left() + 16.0, r.center().y), vec2(13.0, 13.0)), crate::icons::Icon::Info, t.caution);+ }+ p.galley(pos2(r.left() + inset, r.center().y - g.size().y / 2.0), g, Color32::from_gray(225));+ register(ui.ctx(), id, r);+ r+}++/// The caution pill saying a render failed behind the stand-in on screen (see [`loupe_pill`]):+/// "Original offline · no smart preview" when that is why, else "This photo can't be opened", with+/// the error on hover and for screen readers.+#[allow(clippy::too_many_arguments)]+pub(crate) fn failed_pill(+ ui: &egui::Ui,+ app: &LightcraftApp,+ photo: &lightcraft_catalog::Photo,+ canvas: Rect,+ over: Rect,+ navigator: Option<Rect>,+ id: &str,+ error: &str,+) {+ let offline = matches!(&photo.source, lightcraft_catalog::Source::File { path } if app.session.media.availability.is_offline(path));+ let text = crate::i18n::tr(if offline { "Original offline · no smart preview" } else { "This photo can't be opened" });+ let r = loupe_pill(ui, canvas, over, navigator, id, text, true);+ let resp = ui.interact(r, egui::Id::new(("render-failed", id)), Sense::hover()).on_hover_text(error);+ resp.widget_info(|| egui::WidgetInfo::labeled(egui::WidgetType::Label, true, format!("{text}: {error}")));}fn quick_name(q: lightcraft_engine::media::QuickSource) -> &'static str {diff --git a/crates/ui-egui/src/render.rs b/crates/ui-egui/src/render.rsindex 66bce01ff..dfa4ae3d3 100644--- a/crates/ui-egui/src/render.rs+++ b/crates/ui-egui/src/render.rs@@ -197,9 +197,10 @@ pub struct Renderer {stages: HashMap<Slot, Arc<StageCache>>,/// Slot → key of the last quick job requested for it (each is tried once).quick_tried: HashMap<Slot, u64>,- /// Jobs that failed (unreadable or missing file…), by slot and job key, with the error: not- /// requested again until the key changes (an edit, another size) — the grid asks every frame.- failed: HashMap<Slot, (u64, String, u64)>,+ /// Jobs that failed (unreadable or missing file…), by slot and job key, with the error and+ /// the photo: not requested again until the key changes (an edit, another size) — the grid+ /// asks every frame.+ failed: HashMap<Slot, (u64, String, u64, PhotoId)>,/// The catalog revision seen at the last poll: a failure is retried once the catalog changes/// (a relinked or re-imported file).catalog_rev: u64,@@ -541,6 +542,18 @@ impl Renderer {self.failed.get(&slot).map(|f| f.1.as_str())}+ /// Why the last render of `photo` for `slot` failed: a view slot shows one photo after+ /// another, and another photo's error isn't this one's.+ pub fn failure_of(&self, slot: Slot, photo: PhotoId) -> Option<&str> {+ self.failed.get(&slot).filter(|f| f.3 == photo).map(|f| f.1.as_str())+ }++ /// Whether `slot`'s pending render asks again for the key that last failed (a library change+ /// retries failures): what is on screen stays what the failure left until it answers.+ pub fn retrying(&self, slot: Slot) -> bool {+ self.pending.get(&slot).zip(self.failed.get(&slot)).is_some_and(|(p, f)| p.0 == f.0)+ }+/// The slots with a render pending (diagnostics: `ui.inspect`).pub fn pending_slots(&self) -> Vec<String> {self.pending.keys().map(|s| format!("{s:?}")).collect()@@ -700,7 +713,7 @@ impl Renderer {Err(e) => {if !matches!(slot, Slot::Prefetch(_)) {log::warn!("render {slot:?}: {e}");- self.failed.insert(slot, (r.key, e, self.catalog_rev));+ self.failed.insert(slot, (r.key, e, self.catalog_rev, r.photo));}continue;}@@ -947,8 +960,10 @@ mod thumbnail_tests {r.remember_thumb(&p, 384, 77, false);r.pending.insert(Slot::ThumbQuick(p.id), (77, 11));assert!(!r.thumb_current(&p, 384, 10));- r.failed.insert(slot, (77, "no decoder".into(), 0));+ r.failed.insert(slot, (77, "no decoder".into(), 0, p.id));assert!(r.thumb_current(&p, 384, 10));+ assert_eq!(r.failure_of(slot, p.id), Some("no decoder"));+ assert_eq!(r.failure_of(slot, PhotoId(p.id.0 + 1)), None, "another photo's error");r.catalog_rev = 1;assert!(!r.thumb_current(&p, 384, 10));}diff --git a/docs/control-protocol.md b/docs/control-protocol.mdindex b9190d2cb..9d3d192b8 100644--- a/docs/control-protocol.md+++ b/docs/control-protocol.md@@ -44,7 +44,8 @@ their command behavior. That API invokes the app command dispatcher directly; itCocoa menu dispatch. Native menu activation and keyboard accelerator delivery require a separate test.Before capturing a finished Detail view, poll `ui.inspect` until the expected `loupe.photo` is active,-`loupe.source` is `render` or `cached`, `loupe.pending` is false, and the render queues are empty.+`loupe.source` is `render` or `cached`, `loupe.pending` is false, and the render queues are empty — or until+`loupe.failed` is set: that photo's render failed, and what is on screen is all there will be.For the loupe, `cached` is a prior view render keyed by the current photo and develop settings;`thumb`, `small` and `embedded` are separate fallback sources. A presented frame can otherwisecontain an in-progress rendering placeholder. Require loaded thumbnail textures only when the@@ -58,7 +59,7 @@ filmstrip is visible.| `engine.commands` | — | Engine + UI commands: id, label, menu, shortcut, params doc, enabled || `ui.menu.list` | — | Menu entries (flat: id, label, menu path, shortcut, enabled) || `ui.menu.tree` | — | The menu bar as shown (File … Help): items `{id, params?, label, shortcut?, enabled, checked?}`, separators, submenus — the model behind the native macOS menu bar and the in-window menus |-| `ui.inspect` | — | UI state, window, `loupe` (`source`, and `region: {full, window, pending}` when a zoomed view also renders the window on screen at no more than 100 % — `full` is the frame it is cut from, `window` its `[x, y, w, h]` — and `regionBefore` for the Before side of a Before/After view), canvas/image rects, `scroll: {grid, filmstrip}` (scroll offsets in points, `null` until drawn), active photo, selection, perf (`frameMs` = layout, `logicMs` = per-frame logic before it, `updateMs` = both, `maxUpdateMs`, `fps`, render queue …, `gpu` = adapter in use, `gpuReason` = why renders don't use the GPU, `gpuFallback` = latest render redone on the CPU and why — see `docs/gpu-pipeline.md`), status, memory (bytes per cache, see `library.memory`; plus stage caches — `budgetBytes`, `trimmed`, `sharedSourceBytes` (the one device copy of a big original) — and textures), `export: {running: {total, done, current} \| null, last}`, `notices` (warnings waiting to be shown, e.g. a damaged settings file; OK = `button:noticeOk`), `quitPrompt` (why quitting was stopped: tasks that would be cut short are running — `button:quitAnyway` cancels them and quits, `button:quitCancel` keeps working — or unsaved changes: `button:quitRetry` / `button:quitAnyway` / `button:quitCancel`), `import: {done, total, imported, cancelled} \| null` (an import runs on a worker thread), `tasks` (other background work: `Find Missing Photos`, `Auto Import`), `activity` (every long-running task in flight as the activity stack in the top-left corner shows it, same shape as `activity.list`; a row appears once its task is 0.5 s old, ids `activity:row:<id>`, ✕ = `activity:cancel:<id>`, `activity:more` expands past 3 rows), `fileDialogs` (commands waiting on a native file dialog, which runs off the UI thread; they run again with the answer when it closes), `copied` (the text the UI last put on the clipboard, `null` until something is copied) |+| `ui.inspect` | — | UI state, window, `loupe` (`source`, `pending`, `failed` = why its render failed, else `null`, and `region: {full, window, pending}` when a zoomed view also renders the window on screen at no more than 100 % — `full` is the frame it is cut from, `window` its `[x, y, w, h]` — and `regionBefore` for the Before side of a Before/After view), canvas/image rects, `scroll: {grid, filmstrip}` (scroll offsets in points, `null` until drawn), active photo, selection, perf (`frameMs` = layout, `logicMs` = per-frame logic before it, `updateMs` = both, `maxUpdateMs`, `fps`, render queue …, `gpu` = adapter in use, `gpuReason` = why renders don't use the GPU, `gpuFallback` = latest render redone on the CPU and why — see `docs/gpu-pipeline.md`), status, memory (bytes per cache, see `library.memory`; plus stage caches — `budgetBytes`, `trimmed`, `sharedSourceBytes` (the one device copy of a big original) — and textures), `export: {running: {total, done, current} \| null, last}`, `notices` (warnings waiting to be shown, e.g. a damaged settings file; OK = `button:noticeOk`), `quitPrompt` (why quitting was stopped: tasks that would be cut short are running — `button:quitAnyway` cancels them and quits, `button:quitCancel` keeps working — or unsaved changes: `button:quitRetry` / `button:quitAnyway` / `button:quitCancel`), `import: {done, total, imported, cancelled} \| null` (an import runs on a worker thread), `tasks` (other background work: `Find Missing Photos`, `Auto Import`), `activity` (every long-running task in flight as the activity stack in the top-left corner shows it, same shape as `activity.list`; a row appears once its task is 0.5 s old, ids `activity:row:<id>`, ✕ = `activity:cancel:<id>`, `activity:more` expands past 3 rows), `fileDialogs` (commands waiting on a native file dialog, which runs off the UI thread; they run again with the answer when it closes), `copied` (the text the UI last put on the clipboard, `null` until something is copied) || `ui.widgets` | `{filter?}` | On-screen widgets `{id, rect: [x, y, w, h]}` (screen points) || `ui.clickWidget` / `ui.dragWidget` / `ui.hoverWidget` | `{id, count?, button?, fx?, fy?}` (`button: "right"` right-clicks) / `{id, toX?, toY?, dx?, dy?, steps?}` / `{id, fx?, fy?}` | Real egui input on a widget (hover: the pointer rests on it, e.g. for preset/profile previews) || `ui.move` / `ui.click` / `ui.drag` | `{x, y, count?, button?}` / `{x, y, toX, toY, steps?}` | Raw pointer input, screen points |@@ -72,7 +73,7 @@ filmstrip is visible.| `ui.dialog.confirm` / `ui.dialog.cancel` | — | Close the open dialog || `ui.resize` | `{width, height}` | Resize the window || `ui.zoomFactor` | `{factor}` | Set the interface scale (0.5–3; egui's zoom keys are off, Cmd+= / Cmd+- zoom the photo) |-| `ui.screenshot` | `{path?, headless?}` | `{path, width, height}` once the frame (with finished renders) is captured. `headless: true` draws the UI on the CPU (no compositor needed); a windowed capture that gets no frame within 2 s falls back to headless automatically. While the loupe still waits for a render, `ui.widgets {filter: "loupe:rendering"}` lists its "Rendering…" pill |+| `ui.screenshot` | `{path?, headless?}` | `{path, width, height}` once the frame (with finished renders) is captured. `headless: true` draws the UI on the CPU (no compositor needed); a windowed capture that gets no frame within 2 s falls back to headless automatically. While the loupe still waits for a render, `ui.widgets {filter: "loupe:rendering"}` lists its "Rendering…" pill; `loupe:renderFailed` is the pill saying a render failed behind a stand-in || `engine.execute {command: "app.export", params}` | export params (see `docs/mcp.md`), plus `preset`, `dir` / `path`, `ids`, `background` | Writes the files and returns `{files}` (one `{path, width, height, bytes, sidecars}` per file, plus `gpuFallback` — why that render fell back from the GPU to the CPU — when it did; see `docs/gpu-pipeline.md`); with `background: true` (what the Export dialog and menus use) it returns `{background: true, total}` at once and the batch runs on a worker thread — poll `ui.inspect` → `export` || `engine.execute {command: "activity.list"}` | — | The long-running tasks in flight (imports, exports, preview builds, downloads, the face scan…), oldest first: `{tasks: [{id, kind, label, done, total, unit, detail, cancellable, cancelling, ageMs}]}`; `total` 0 = not known yet; `unit` is `count`, `bytes` or `percent`; `label` is English (the app shows it translated) || `engine.execute {command: "activity.cancel"}` | `{id}` or `{all: true}` | Asks the task (or every cancellable one) to stop at its next file or photo → `{cancelled: n}`; an unknown id (it may have just finished) or a task that can't be cancelled is an error |diff --git a/docs/parity-checklist.md b/docs/parity-checklist.mdindex e179277c1..cf188cd65 100644--- a/docs/parity-checklist.md+++ b/docs/parity-checklist.md@@ -125,7 +125,7 @@ differences and missing bindings are in [ui-parity.md](ui-parity.md#shortcuts).|---|---|---|---|---|---|| LR-VIEW-PHOTOGRID | Justified photo grid | P0 | ✅ | `cmd:view.photoGrid`, `cmd:library.groups`, `cmd:library.sort` (`group`), `crates/ui-egui/src/panels/grid.rs`, `crates/catalog/src/dates.rs` | grouped by capture / import / edit date (day headers “Wednesday, 30 September 2026 · 12 photos”, months or years when zoomed out, or a fixed day/month/year/none choice in the sort menu); sticky header; clicking a header selects its photos; stacks never split; scrolls to the active photo only when it changes (or the grid comes back on screen), never on its own || LR-VIEW-SQUAREGRID | Square grid | P0 | ✅ | `cmd:view.squareGrid` | same date headers as the photo grid |-| LR-VIEW-DETAIL | Single-photo view | P0 | ✅ | `cmd:view.detail`, `crates/ui-egui/src/panels/detail.rs` | a “Rendering…” pill at the bottom of the photo (widget `loupe:rendering`; above the Navigator when that is in the way) once a render has been on its way for 0.5 s with nothing new on screen: over a stand-in (the raw's embedded JPEG, a thumbnail), the previous render after an edit, or, zoomed in, the magnified frame waiting for its window; Before views watch their own renders. Always on (Lightroom Classic makes it a View Options choice) |+| LR-VIEW-DETAIL | Single-photo view | P0 | ✅ | `cmd:view.detail`, `crates/ui-egui/src/panels/detail.rs` | a “Rendering…” pill at the bottom of the photo (widget `loupe:rendering`; above the Navigator when that is in the way) once a render has been on its way for 0.5 s with nothing new on screen: over a stand-in (the raw's embedded JPEG, a thumbnail), the previous render after an edit, or, zoomed in, the magnified frame waiting for its window; Before views watch their own renders. Always on (Lightroom Classic makes it a View Options choice). When the render fails behind a stand-in, a caution pill says “This photo can't be opened” (“Original offline · no smart preview” when that is why) with the reason on hover and for screen readers (widget `loupe:renderFailed`; `ui.inspect` → `loupe.failed`) || LR-VIEW-EDIT | Edit view | P0 | ✅ | `cmd:panel.edit` | || LR-VIEW-FULLSCREEN | Full-screen preview | P1 | ✅ | `cmd:view.fullScreenPreview`, `cmd:view.enterFullScreen` | photo on black, arrows step, Esc exits; ⇧⌘F window full screen || LR-VIEW-FILMSTRIP | Filmstrip | P0 | ✅ | `cmd:view.filmstrip`, `crates/ui-egui/src/panels/detail.rs` | the photo context menu on right-click; the mouse wheel scrolls it sideways; it follows the active photo only when that changes (centred if off screen), so a scrolled strip stays put; every selected photo is highlighted, the active one framed in white, as in the grid |diff --git a/docs/whats-new.md b/docs/whats-new.mdindex 7fd189e63..cceb49a29 100644--- a/docs/whats-new.md+++ b/docs/whats-new.md@@ -6,6 +6,10 @@- The loupe says "Rendering…" at the bottom of the photo when what it shows isn't the finished photo yet: thecamera's embedded JPEG while a raw decodes, the previous render while an edit renders, or the magnified framewhile the 1:1 detail is on its way. It appears once that has lasted half a second, so quick renders never show it.+- If LightCraft can't open a photo (its original is on a drive that isn't connected, or the file is damaged) but has+ its embedded JPEG or a thumbnail to show, the loupe now says so at the bottom of the photo ("Original offline · no+ smart preview" or "This photo can't be opened", the reason on hover) instead of showing that preview as if it were+ the photo.### JPEG XL export- Export as JPEG XL (issue #247): Format ▸ JPEG XL in the Export dialog, `format: "jxl"` for agents and the CLI