From 1f155375960d33b10b50a4f59678304ccf1e5554 Mon Sep 17 00:00:00 2001 From: Nathaniel Ledford Date: Thu, 29 Oct 2026 15:30:54 -0400 Subject: [PATCH 1/6] LR-VIEW-PHOTOGRID: a thumbnail still loading shows a quiet cue, unlike an unreadable one A grid cell or filmstrip tile whose thumbnail had not arrived was the same plain skeleton as one whose file can't be read until the failure was known. A loading one now shows three small still dots in the icon color (registered as badge:loading:{id} and film:badge:loading:{id}); an unreadable one keeps its "!", and so does an unedited raw whose embedded preview failed. The dots don't move, so they need nothing from Reduce motion, and tiles under 32 pt go without. --- crates/ui-egui/src/panels/detail/filmstrip.rs | 4 +- crates/ui-egui/src/panels/grid.rs | 21 +++- crates/ui-egui/src/render.rs | 6 ++ crates/ui-egui/src/render/thumbnail_tests.rs | 15 +++ crates/ui-egui/src/tests.rs | 1 + crates/ui-egui/src/tests/loading_cell.rs | 96 +++++++++++++++++++ crates/ui-egui/src/tests/progress.rs | 2 + docs/parity-checklist.md | 5 +- docs/whats-new.md | 5 + 9 files changed, 151 insertions(+), 4 deletions(-) create mode 100644 crates/ui-egui/src/tests/loading_cell.rs diff --git a/crates/ui-egui/src/panels/detail/filmstrip.rs b/crates/ui-egui/src/panels/detail/filmstrip.rs index 268d021b204..43090b3bff7 100644 --- a/crates/ui-egui/src/panels/detail/filmstrip.rs +++ b/crates/ui-egui/src/panels/detail/filmstrip.rs @@ -97,7 +97,7 @@ pub(crate) fn filmstrip(app: &mut LightcraftApp, ui: &mut egui::Ui, r: Rect) { continue; } let resp = ui.interact(cr, egui::Id::unique(("film", id.0)), Sense::click_and_drag()); - let failed = app.renderer.thumb(*id).is_none() && app.renderer.failure(Slot::Thumb(*id)).is_some(); + let failed = app.renderer.thumb(*id).is_none() && app.renderer.thumb_failure(*id).is_some(); crate::widgets::announce(&resp, film_spoken(app.session.catalog.photo(*id).map_or("", |p| p.file_name.as_str()), failed)); register(ui, format!("film:{}", id.0), cr); let state = app.session.selection.state_of(*id); @@ -125,6 +125,8 @@ pub(crate) fn filmstrip(app: &mut LightcraftApp, ui: &mut egui::Ui, r: Rect) { p.rect_filled(img_area, 0.0, t.skeleton); if failed { p.text(img_area.center(), Align2::CENTER_CENTER, "!", t.semibold(14.0), t.text); + } else { + crate::panels::grid::paint_loading_cue(p, &t, img_area, "film:badge:loading:", id.0); } } if let Some(tex) = thumb { diff --git a/crates/ui-egui/src/panels/grid.rs b/crates/ui-egui/src/panels/grid.rs index db4dfa1b83e..032481efb5b 100644 --- a/crates/ui-egui/src/panels/grid.rs +++ b/crates/ui-egui/src/panels/grid.rs @@ -854,14 +854,33 @@ fn paint_cell_thumbnail(app: &mut LightcraftApp, p: &egui::Painter, t: &Tokens, p.rect_filled(ph, 0.0, t.skeleton); // not drawn yet (or unreadable): the selection is still visible selection_ring(p, t, ph, state); - if app.renderer.failure(Slot::Thumb(id)).is_some() { + if app.renderer.thumb_failure(id).is_some() { // unreadable / missing file p.text(ph.center(), Align2::CENTER_CENTER, "!", t.semibold(18.0), t.text); + } else { + paint_loading_cue(p, t, ph, "badge:loading:", id.0); } ph } } +/// A quiet cue on a thumbnail's placeholder while the picture is still on its way (an unreadable one +/// says "!" instead): three small dots in the middle, in the icon color (3:1 on every theme's placeholder). It stands still, so +/// Reduce motion has nothing to stop, and it is left off tiles too small to hold it. Registered as +/// `{prefix}{id}` (the grid's `badge:loading:{id}`, the filmstrip's `film:badge:loading:{id}`). +pub(crate) fn paint_loading_cue(p: &egui::Painter, t: &Tokens, rect: Rect, prefix: &str, id: u64) { + const RADIUS: f32 = 1.75; + const GAP: f32 = 7.0; + if rect.width().min(rect.height()) < 32.0 { + return; + } + let middle = rect.center(); + for dx in [-GAP, 0.0, GAP] { + p.circle_filled(middle + vec2(dx, 0.0), RADIUS, t.icon); + } + crate::widgets::register_geometry(p.ctx(), format!("{prefix}{id}"), Rect::from_center_size(middle, vec2(2.0 * (GAP + RADIUS), 2.0 * RADIUS))); +} + fn paint_cell_caption(app: &LightcraftApp, p: &egui::Painter, t: &Tokens, photo: &lightcraft_catalog::Photo, r: Rect, square: bool) { if square && app.ui.show_filenames { let m = &photo.meta; diff --git a/crates/ui-egui/src/render.rs b/crates/ui-egui/src/render.rs index e8c3a907886..770c0f09db1 100644 --- a/crates/ui-egui/src/render.rs +++ b/crates/ui-egui/src/render.rs @@ -1081,6 +1081,12 @@ impl Renderer { self.failed.get(&slot).map(|f| f.1.as_str()) } + /// Why a photo has no grid thumbnail and won't get one: the thumbnail's own render failed, or the embedded + /// preview failed and nothing else is on its way (an unedited raw asks for no other: see `request_thumb`). + pub fn thumb_failure(&self, id: PhotoId) -> Option<&str> { + self.failure(Slot::Thumb(id)).or_else(|| if self.is_pending(Slot::Thumb(id)) { None } else { self.failure(Slot::ThumbQuick(id)) }) + } + /// 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> { diff --git a/crates/ui-egui/src/render/thumbnail_tests.rs b/crates/ui-egui/src/render/thumbnail_tests.rs index b2a87e6522b..281b0b73433 100644 --- a/crates/ui-egui/src/render/thumbnail_tests.rs +++ b/crates/ui-egui/src/render/thumbnail_tests.rs @@ -1945,3 +1945,18 @@ fn stepping_fast_drops_the_queued_before_render() { assert!(!app.renderer.is_pending(slot), "{slot:?} still queued"); } } + +#[test] +fn thumb_failure_reports_only_a_thumbnail_that_will_not_arrive() { + let id = PhotoId(5); + let mut r = Renderer::default(); + assert_eq!(r.thumb_failure(id), None, "nothing failed"); + // An unedited raw asks only for the embedded preview: its failure is final. + r.failed.insert(Slot::ThumbQuick(id), (1, "no embedded preview".into(), 0, id)); + assert_eq!(r.thumb_failure(id), Some("no embedded preview")); + // While the full render is still on its way, the cell is loading, not unreadable. + r.pending.insert(Slot::Thumb(id), (2, 10)); + assert_eq!(r.thumb_failure(id), None, "a pending thumbnail may still arrive"); + r.failed.insert(Slot::Thumb(id), (2, "decode failed".into(), 0, id)); + assert_eq!(r.thumb_failure(id), Some("decode failed")); +} diff --git a/crates/ui-egui/src/tests.rs b/crates/ui-egui/src/tests.rs index f801ee843f2..1dd680b0196 100644 --- a/crates/ui-egui/src/tests.rs +++ b/crates/ui-egui/src/tests.rs @@ -59,6 +59,7 @@ mod library_problem; mod lifecycle_037; mod lightroom_destination; mod lights_out; +mod loading_cell; mod mask_effects; mod masking; mod masking_layout; diff --git a/crates/ui-egui/src/tests/loading_cell.rs b/crates/ui-egui/src/tests/loading_cell.rs new file mode 100644 index 00000000000..c36b56bdb3b --- /dev/null +++ b/crates/ui-egui/src/tests/loading_cell.rs @@ -0,0 +1,96 @@ +//! A grid cell whose thumbnail is still on its way says so, quietly, and differs from one whose file +//! can't be read (which says "!"): until the failure is known the two were the same plain skeleton. +//! The cue is still (nothing to stop for a Reduce motion setting) and drawn from the theme's own colors. + +use std::cell::Cell; +use std::rc::Rc; +use std::time::Duration; + +use lightcraft_catalog::{Op, Photo, PhotoId, Source}; +use lightcraft_engine::Session; + +use crate::headless::{Headless, RenderGate}; +use crate::render::Slot; +use crate::state::ViewMode; +use crate::{LightcraftApp, Services}; + +const SETTLE: Duration = Duration::from_secs(60); + +/// Twelve photos whose files are not there, with every thumbnail render held until the returned gate +/// opens, and then failed (as an unreadable file's would): the cells are loading, then unreadable, at +/// the test's say. +fn app_with_held_thumbnails(view: ViewMode) -> (Headless, Rc>) { + let mut s = Session::new(); + for i in 0..12u64 { + let path = format!("/lightcraft-loading-cell-test/IMG_{i:03}.jpg"); + let p = Photo::new(PhotoId(i + 1), Source::File { path }, &format!("IMG_{i:03}.jpg"), "JPEG", 6000, 4000, "2026-01-01T00:00:00"); + s.catalog.apply(Op::AddPhoto { photo: Box::new(p) }).unwrap(); + } + let mut h = Headless::new(LightcraftApp::new(s, Services { png: None, ..Default::default() }), [1000.0, 700.0], 1.0); + h.app.ui.thumb_size = 160.0; + h.app.ui.view = view; + let open = Rc::new(Cell::new(false)); + h.app.renderer.set_offload(Box::new(RenderGate::failing(open.clone(), |s| matches!(s, Slot::Thumb(_) | Slot::ThumbQuick(_))))); + (h, open) +} + +fn ids(h: &Headless, prefix: &str) -> Vec { + h.app.widgets.iter().filter(|(w, _)| w.starts_with(prefix)).map(|(w, _)| w.clone()).collect() +} + +/// Frames until the grid has its cells. +fn first_grid_frame(h: &mut Headless) { + for _ in 0..20 { + h.step(); + if !ids(h, "thumb:").is_empty() { + return; + } + } + panic!("the grid was never drawn"); +} + +/// Given a grid whose thumbnails have not arrived, when a frame is drawn, then each cell carries the loading cue; and once the +/// files turn out unreadable the cue is gone and the cells say so instead. +#[test] +fn a_cell_still_loading_differs_from_one_that_failed() { + for view in [ViewMode::PhotoGrid, ViewMode::SquareGrid] { + let (mut h, open) = app_with_held_thumbnails(view); + first_grid_frame(&mut h); + let loading = ids(&h, "badge:loading:"); + assert!(loading.len() >= 6, "{view:?}: the cells on screen are loading: {loading:?}"); + assert!(!h.painted_text().iter().any(|t| t == "!"), "{view:?}: none of them has failed yet"); + + open.set(true); + assert!(h.settle(SETTLE)); + assert!(ids(&h, "badge:loading:").is_empty(), "{view:?}: the cue goes once the failure is known: {:?}", ids(&h, "badge:loading:")); + assert!(h.painted_text().iter().any(|t| t == "!"), "{view:?}: an unreadable cell says so"); + } +} + +/// The cue sits inside its cell's placeholder, small and centered. +#[test] +fn the_loading_cue_is_a_small_mark_in_the_middle_of_the_cell() { + let (mut h, _open) = app_with_held_thumbnails(ViewMode::SquareGrid); + first_grid_frame(&mut h); + let cell = |id: &str| h.app.widgets.iter().find(|(w, _)| w == id).map(|(_, r)| *r).unwrap(); + let id = ids(&h, "badge:loading:").remove(0); + let photo = id.trim_start_matches("badge:loading:"); + let cue = cell(&id); + let thumb = cell(&format!("thumb:{photo}")); + assert!(thumb.contains_rect(cue), "{cue:?} in {thumb:?}"); + assert!(cue.width() < thumb.width() / 3.0 && cue.height() < thumb.height() / 3.0, "quiet: {cue:?} in {thumb:?}"); + assert!((cue.center() - thumb.center()).length() < 14.0, "centered: {cue:?} in {thumb:?}"); +} + +/// The filmstrip's tiles tell loading from unreadable the same way. +#[test] +fn the_filmstrip_tells_loading_from_unreadable_too() { + let (mut h, open) = app_with_held_thumbnails(ViewMode::PhotoGrid); + let r = h.request("ui.set", serde_json::json!({"view": "detail"}), SETTLE); + assert_eq!(r["ok"], true, "{r}"); + h.step(); + assert!(!ids(&h, "film:badge:loading:").is_empty(), "the tiles are loading: {:?}", ids(&h, "film:")); + open.set(true); + assert!(h.settle(SETTLE)); + assert!(ids(&h, "film:badge:loading:").is_empty(), "gone once the failure is known"); +} diff --git a/crates/ui-egui/src/tests/progress.rs b/crates/ui-egui/src/tests/progress.rs index 09e9234a0c9..6e3774847e8 100644 --- a/crates/ui-egui/src/tests/progress.rs +++ b/crates/ui-egui/src/tests/progress.rs @@ -191,6 +191,8 @@ fn the_thumbnail_placeholder_stands_apart_in_every_theme() { } let mark = contrast(t.text, t.skeleton); assert!(mark >= 3.0, "{kind:?}: the failure mark on the placeholder is {mark:.2}:1"); + let dots = contrast(t.icon, t.skeleton); + assert!(dots >= 3.0, "{kind:?}: the loading dots on the placeholder are {dots:.2}:1"); } } diff --git a/docs/parity-checklist.md b/docs/parity-checklist.md index 99381ec5f50..eca06531dfb 100644 --- a/docs/parity-checklist.md +++ b/docs/parity-checklist.md @@ -124,12 +124,12 @@ differences and missing bindings are in [ui-parity.md](ui-parity.md#shortcuts). | Id | Feature | Tier | Status | Evidence | Missing / notes | |---|---|---|---|---|---| -| 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; a mouse-wheel notch scrolls a third of the grid's height, in both grids, as in Lightroom Classic (`theme::WHEEL_STRIP_SHARE`; trackpads scroll the points they report); queued embedded thumbnail stand-ins follow viewport priority changes without another extraction (`crates/ui-egui/src/render.rs`, issue #348; full-app visual/timing verification pending); selected photos are ringed in the theme's colours (`Tokens::ring_active` / `ring_selected`, 3:1 or more against the grid in every theme): the active photo gets a 3 pt two-tone ring (a thin inner line against the photo, so it shows on a white photo too), the other selected photos a 1.5 pt ring; the empty view (an empty album or other source in a library with photos, or an empty Recently Deleted) names Import Photos' shortcut as the menu bar writes it and as bound (⌘⇧I on macOS, Ctrl+Shift+I elsewhere), and none when it is unbound | +| 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; a mouse-wheel notch scrolls a third of the grid's height, in both grids, as in Lightroom Classic (`theme::WHEEL_STRIP_SHARE`; trackpads scroll the points they report); queued embedded thumbnail stand-ins follow viewport priority changes without another extraction (`crates/ui-egui/src/render.rs`, issue #348; full-app visual/timing verification pending); selected photos are ringed in the theme's colours (`Tokens::ring_active` / `ring_selected`, 3:1 or more against the grid in every theme): the active photo gets a 3 pt two-tone ring (a thin inner line against the photo, so it shows on a white photo too), the other selected photos a 1.5 pt ring; the empty view (an empty album or other source in a library with photos, or an empty Recently Deleted) names Import Photos' shortcut as the menu bar writes it and as bound (⌘⇧I on macOS, Ctrl+Shift+I elsewhere), and none when it is unbound; a thumbnail still on its way shows three small still dots on its placeholder (`badge:loading:{id}`, `film:badge:loading:{id}`; `crates/ui-egui/src/tests/loading_cell.rs`), an unreadable one the "!" | | LR-VIEW-SQUAREGRID | Square grid | P0 | ✅ | `cmd:view.squareGrid` | same date headers and selection rings 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). 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`). While the camera's embedded JPEG is on screen a “Camera preview” label at the top right says so, with what that means on hover (widget `loupe:cameraPreview`), so colour isn't judged on it. Culling: the stand-ins of the next five photos in the direction of travel and the one behind are made ahead and taken over at the step (`render::Slot::QuickAhead`; EOS R5 C wedding: step to the camera JPEG p50 187 → 0 ms), decoded camera JPEGs stay in memory for a step back, zoomed in on an unedited raw the camera JPEG is shown at full size under the window render until that arrives (100 % in ~0.9 s instead of ~5.6 s, `render::Slot::QuickFull`), and while an arrow key is held the raw render waits until a photo stays 0.12 s (`crates/ui-egui/src/loupe_timing.rs`); `ui.inspect` → `perf.loupeSteps` times each step on the frames drawn | | 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, a third of its width per notch as in Lightroom Classic (trackpads scroll the points they report); it follows the active photo only when that changes (centred if off screen), so a scrolled strip stays put; every selected photo has the selected background; selected photos with a loaded thumbnail also show a ring, the active one in the heavier two-tone ring and the others in the lighter one, in the theme's colours, as in the grid (a selected cell with no thumbnail, still loading or failed, has the background and no ring); a drag from a cell carries the selection (a photo outside it drags alone and replaces it; in Compare it drags alone and leaves the selection, the active photo and the pair as they are) to the same sidebar rows as a drag from the grid, and a click without movement works as before (it selects the photo; in Compare it goes to the active side, see LR-VIEW-COMPARE) | +| 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, a third of its width per notch as in Lightroom Classic (trackpads scroll the points they report); it follows the active photo only when that changes (centred if off screen), so a scrolled strip stays put; every selected photo has the selected background; selected photos with a loaded thumbnail also show a ring, the active one in the heavier two-tone ring and the others in the lighter one, in the theme's colours, as in the grid; a thumbnail still on its way shows three small still dots on its placeholder (`badge:loading:{id}`, `film:badge:loading:{id}`; `crates/ui-egui/src/tests/loading_cell.rs`), an unreadable one the "!" (a selected cell with no thumbnail, still loading or failed, has the background and no ring); a drag from a cell carries the selection (a photo outside it drags alone and replaces it; in Compare it drags alone and leaves the selection, the active photo and the pair as they are) to the same sidebar rows as a drag from the grid, and a click without movement works as before (it selects the photo; in Compare it goes to the active side, see LR-VIEW-COMPARE) | | LR-VIEW-ZOOM | Zoom & pan | P0 | ✅ | `cmd:view.zoomFit`, `cmd:view.zoom100`, `cmd:view.zoomIn`, `cmd:view.zoomOut`, `cmd:view.zoomToggle`, `cmd:view.clickZoom`, `cmd:view.navigate`, `crates/ui-egui/src/panels/detail.rs`, `crates/ui-egui/src/headless.rs` | continuous native pinch / modifier-wheel zoom (Fit–800%, anchored under the pointer), two-finger scroll / touch pan with edge limits; in Detail a middle-button drag (the wheel pressed) pans with a hand cursor whatever tool is active, so Remove / Heal / Clone, mask brushes and Crop don't paint or move meanwhile (`middle_pan`, `tests_canvas_pan.rs`); in Detail a middle-button drag (the wheel pressed) pans with a hand cursor whatever tool is active, so Remove / Heal / Clone, mask brushes and Crop don't paint or move meanwhile (`middle_pan`, `tests_canvas_pan.rs`); Detail (including tools, Before/After and full-screen preview), Compare and Reference; fractional percentages preserve small gestures; image, picker and targeted-adjustment cursors stay steady between gesture events; keyboard steps 25–800 % (not 6–1600 %); Fill in the bottom bar; click / Z / Space eases to the chosen ratio (1:1 default, 2:1, 3:1, 4:1, 8:1). The loupe's cost follows the canvas, not the zoom (issue #323): the whole frame is rendered at about canvas size (at most the 2560 px preview source level unless a larger Preview size is chosen, and never above the GPU's texture side), and once the view is zoomed well past that (more than 25 %) the window on screen is rendered too, cut from a frame of at most the photo's own pixels, so beyond 100 % the GPU magnifies it (`region::plan`, `RenderRequest::window`, `Session::region_job`, `crates/ui-egui/src/region.rs`); 1:1 and 2:1–8:1 are sharp at any photo size. A slider tick takes 7–12 ms on a 1400 × 900 canvas and 11–25 ms on a 2800 × 1700 one at 100 % and 400 % of a 24 MP photo (M1 Max, GPU, `profile_slider_drag`); about 20–25 ms at 100 % on the big canvas is over a 16 ms frame. A slider drag renders the whole frame at full size where the GPU draws the view, so the fit view stays sharp while dragging, and at 0.6 of it where that would be too slow: on the CPU, with an output-device profile proof or the HDR range shown, or for a control whose full-size drafts on this photo went clearly over the 16 ms slider budget (more than 20 ms) in two drags in a row (a LUT profile or refined mask the CPU renders, a photo past a GPU limit, a slow GPU); a draft's time is its render plus the frame that uploads and shows it, and a host frame time over 1 s (a hidden or stalled window) counts as unknown. A slow verdict is per photo and control (the same control on another photo, or another control on this one, is timed afresh) and expires: after 30 s a drag tries full size again, the wait doubling after each slow retry up to 240 s. Only a drag timed at full size changes it: one whose full-size drafts' median time (leaving out the first) is at most 20 ms forgets it; a drag that drafts small from its start (while the verdict holds, or where the GPU does not draw the view) or times fewer than two full-size drafts leaves it unchanged. At most 256 (photo, control) pairs are remembered, the oldest forgotten first. The size is chosen when a drag starts and kept until it ends, unless its full-size drafts take more than twice the budget, when it drops to 0.6 after three of them (`region::DragScale`, issue #330). Zoomed in, the whole-frame draft under the window is the 0.6 one (only the histogram and the window's stand-in use it). Render workers convert the pixels for their textures, not the UI thread. Handing GPU renders to egui without a CPU readback is #1228. A continuous pinch holds the render sizes (and the windows there are) and the size the fit view is shrunk to until it is quiet. A fit view on a canvas up to about 3200 px (a Retina Mac) never decodes the original; larger displays get a window at fit, which does. Diagnostic overlays (Visualize Spots, Point Color range, HDR range) get windows too, tested equal to the whole-frame render's pixels. Photos whose spots or Auto Mask strokes read too far for one window (only photos longer than 8192 px) render the whole frame at the size it is drawn, as before windows; while a preset or profile is hovered, or over a picture that is not the frame (an unsupported raw's embedded JPEG), the whole frame stays canvas-sized. Before/After (side by side, stacked, `\\` and both wipes) gets the same windows on both sides, clipped to their pane or side of the line. Windows render on the GPU like whole frames (equivalence-tested against the CPU), in the browser build too (windows no wider than its GPU's texture side, at most 3072 px), and are not made while hovering a look, nor over a picture that is not the frame (an unsupported raw's embedded JPEG with another crop). No texture is larger than the GPU allows. Spots and Auto Mask brushes work while what a window reads fits one render (8192 px along an axis, 4096 in the browser): the window grows to hold the spot and its source patch, or the dabs near it, and if that would take more (a clone from far away at 8:1) the loupe keeps the whole-frame render instead, and spots with an automatic source pick it from a fixed-size render of the whole frame (so a window's choice can differ from a whole-frame render's, which picks at its own resolution). The wide stages (dehaze, clarity, highlights/shadows base) and Refine Edges on masks read a window margin capped at 768 px; measured on hard-edged blocks that costs at most a few levels at 8:1. the histogram and Navigator come from the whole-frame render. Compare and Reference get the same windows, one per pane (`Slot::CompareRegion`, `panels/compare.rs`), over each pane's whole-frame render (at most 2560 px); while either view is open two originals stay decoded (`MediaCache::set_full_capacity`), so one pane's window does not evict the other's source; a pinch, or a slider drag on the active photo in Reference, keeps the windows there are until it ends. Mask overlays and soft proofing get the same windows (the window carries the overlay or the proof; only an output-device-profile proof renders on the CPU, where a tick at 100 % on a 1400 × 900 canvas takes about 36 ms instead of a full-size 24 MP proof). Verified: a 1:1 window of a 24 MP photo with tone and colour edits is the full-size export to within one level (`one_to_one_window_pixels_are_export_pixels`). Measured on Linux (Ryzen AI Max+ 395, Radeon 8060S, GPU, `profile_slider_drag`): median tick→shown 7 ms at fit, 33 ms at 100 % and 6 ms at 400 % on 1400 × 900; 21 ms at 100 % and 9 ms at 400 % on 2800 × 1700; 36 ms at 100 % with an output-device-profile soft proof (the CPU path) | | LR-VIEW-FOCUSPOINT | Camera focus point overlay and zoom (beyond Lightroom) | P2 | 🟡 | `cmd:view.focusPoint`, `cmd:view.zoomToFocus`, `cmd:view.zoomToggle`, `cmd:photo.reload`, `cmd:photo.readFocusPoints`, `cmd:focus.pump`, `crates/meta/src/focus.rs`, `crates/meta/src/focus_read.rs`, `crates/engine/src/focus_scan.rs`, `crates/engine/src/tests/focus_scan.rs`, `crates/ui-egui/src/panels/detail.rs` (`focus_box`, `draw_focus_point`), `crates/ui-egui/src/panels/compare.rs`, `crates/ui-egui/src/tests/focus_point.rs`, `docs/focus-points.md` | an extra (Lightroom shows no focus points): the AF frame read from the file at import; photos imported earlier get it in the background from a header-only read of each file (about 32 KB, ~100 photos/s from a spinning disk; activity row, cancellable, resumable; Photo ▸ Read Focus Points) as a box on the upright photo, drawn in Detail, Compare and Survey through rotation and crop (View ▸ Focus Point, ⌥F); Toggle Zoom centres on it (View ▸ Zoom to Focus Point, on by default); Info panel row `AF-C · Wide · Animal Eye Tracking`; `meta.focus` in `photo.inspect`. Partial: Sony ILCE-1 and ILCE-7SM3 only (layout checked against 333 files); other Sony bodies and other makers not yet; manual focus and centre-only Wide reports show nothing; Compare panes share one pan, so Z centres on the active photo's point only | | LR-VIEW-NAVIGATOR | Navigator mini map | P1 | ✅ | `cmd:view.navigator`, `crates/ui-egui/src/panels/detail.rs` | shown while zoomed (bottom right); click/drag pans | @@ -820,6 +820,7 @@ Latin stays upright. Advanced Japanese composition remains open. Regression cove | 2026-10-24 | minor | LR-EDIT-DETAIL-DENOISE: the built-in denoiser measures noise by colour channel and ignores texture, and its strength follows the measured noise; status and counts unchanged | | 2026-10-24 | minor | LR-EDIT-DETAIL-DENOISE: the built-in denoiser filters with block-matching collaborative filtering instead of non-local means, and runs that filter on the graphics card where there is one; status and counts unchanged | | 2026-10-23 | minor | LR-EDIT-DETAIL-DENOISE: built-in denoiser, no model needed | +| 2026-10-29 | minor | LR-VIEW-PHOTOGRID, LR-VIEW-FILMSTRIP: a grid cell or filmstrip tile whose thumbnail is still on its way shows three small still dots in the icon color on its placeholder (widget `badge:loading:{id}`, `film:badge:loading:{id}`), so it no longer looks like one whose file can't be read (the "!"); the dots don't move, so a Reduce motion setting has nothing to stop; status unchanged (✅) | | 2026-10-25 | patch | LR-BEHAV-TITLEBAR: the top bar's title-bar gestures come from craft-window's `title_bar`: a double-click follows the system setting, and a press on a button, the search field or a panel floating over the bar never moves the window; status counts unchanged | | 2026-10-24 | minor | KEYC-METADATA, LRC-LIB-KEYWORDS: ⌘⌥K / Ctrl+Alt+K (`tool.enablePainting`, Photo ▸ Enable Painting) paints the painter box's keyword or stops painting; status counts unchanged (KEYC-METADATA stays 🟡) | | 2026-10-24 | minor | KEYC-METADATA: ⌘⇧K / Ctrl+Shift+K (`panel.editKeywords`, Edit Keywords) shows the Keywords panel with its Keyword List open and opens the picked keyword in Edit Keyword Tag; status counts unchanged (KEYC-METADATA stays 🟡) | diff --git a/docs/whats-new.md b/docs/whats-new.md index c0b75f74c62..0e10530d8dc 100644 --- a/docs/whats-new.md +++ b/docs/whats-new.md @@ -146,6 +146,11 @@ ## 2026-10-29 +### Loading thumbnails look different from unreadable ones +- A grid cell or filmstrip tile whose thumbnail hasn't arrived yet now shows three small dots on its gray placeholder. + One whose file can't be read still shows "!". The dots stand still (so a Reduce motion setting has nothing + to stop), and they are left off tiles too small to hold them. + ### A person's page opens in seconds in a large library - Finding the unnamed faces that look like a person (a person's page, and again after each face confirmed there) now runs on every processor core, and each comparison of two faces uses the processor's vector instructions. In a From 0c2ac7a4f61037bdb33d4a29ef34f9d0dcd9b8f3 Mon Sep 17 00:00:00 2001 From: Nathaniel Ledford Date: Thu, 29 Oct 2026 18:52:26 -0400 Subject: [PATCH 2/6] LR-VIEW-PHOTOGRID: the loading cue shows in the smallest square cells, and an old embedded-preview failure no longer shows while a new request is on its way --- crates/ui-egui/src/panels/detail/filmstrip.rs | 5 ++- crates/ui-egui/src/panels/grid.rs | 14 ++++--- crates/ui-egui/src/render.rs | 13 ++++++- crates/ui-egui/src/render/thumbnail_tests.rs | 13 +++++++ crates/ui-egui/src/tests/loading_cell.rs | 38 +++++++++++++++++++ 5 files changed, 75 insertions(+), 8 deletions(-) diff --git a/crates/ui-egui/src/panels/detail/filmstrip.rs b/crates/ui-egui/src/panels/detail/filmstrip.rs index 43090b3bff7..5965b1e9a22 100644 --- a/crates/ui-egui/src/panels/detail/filmstrip.rs +++ b/crates/ui-egui/src/panels/detail/filmstrip.rs @@ -97,6 +97,8 @@ pub(crate) fn filmstrip(app: &mut LightcraftApp, ui: &mut egui::Ui, r: Rect) { continue; } let resp = ui.interact(cr, egui::Id::unique(("film", id.0)), Sense::click_and_drag()); + // asked for first: a failure left by an earlier request is not this tile's verdict once a new one is on its way + crate::panels::grid::request_thumb(app, *id, (256.0 * ppp.min(2.0) / 2.0) as usize * 2, 8); let failed = app.renderer.thumb(*id).is_none() && app.renderer.thumb_failure(*id).is_some(); crate::widgets::announce(&resp, film_spoken(app.session.catalog.photo(*id).map_or("", |p| p.file_name.as_str()), failed)); register(ui, format!("film:{}", id.0), cr); @@ -119,14 +121,13 @@ pub(crate) fn filmstrip(app: &mut LightcraftApp, ui: &mut egui::Ui, r: Rect) { p.text(pos2(cr.right() - 8.0, cr.top() + 10.0), Align2::RIGHT_CENTER, &ph.format, t.semibold(8.5), t.text_dim); } let img_area = Rect::from_min_max(cr.min + vec2(10.0, 22.0), cr.max - vec2(10.0, 8.0)); - crate::panels::grid::request_thumb(app, *id, (256.0 * ppp.min(2.0) / 2.0) as usize * 2, 8); let thumb = app.renderer.thumb(*id); if thumb.is_none() { p.rect_filled(img_area, 0.0, t.skeleton); if failed { p.text(img_area.center(), Align2::CENTER_CENTER, "!", t.semibold(14.0), t.text); } else { - crate::panels::grid::paint_loading_cue(p, &t, img_area, "film:badge:loading:", id.0); + crate::panels::grid::paint_loading_cue(p, &t, img_area, img_area, "film:badge:loading:", id.0); } } if let Some(tex) = thumb { diff --git a/crates/ui-egui/src/panels/grid.rs b/crates/ui-egui/src/panels/grid.rs index 032481efb5b..a2d46ef02e9 100644 --- a/crates/ui-egui/src/panels/grid.rs +++ b/crates/ui-egui/src/panels/grid.rs @@ -858,7 +858,7 @@ fn paint_cell_thumbnail(app: &mut LightcraftApp, p: &egui::Painter, t: &Tokens, // unreadable / missing file p.text(ph.center(), Align2::CENTER_CENTER, "!", t.semibold(18.0), t.text); } else { - paint_loading_cue(p, t, ph, "badge:loading:", id.0); + paint_loading_cue(p, t, img_rect, ph, "badge:loading:", id.0); } ph } @@ -866,12 +866,16 @@ fn paint_cell_thumbnail(app: &mut LightcraftApp, p: &egui::Painter, t: &Tokens, /// A quiet cue on a thumbnail's placeholder while the picture is still on its way (an unreadable one /// says "!" instead): three small dots in the middle, in the icon color (3:1 on every theme's placeholder). It stands still, so -/// Reduce motion has nothing to stop, and it is left off tiles too small to hold it. Registered as -/// `{prefix}{id}` (the grid's `badge:loading:{id}`, the filmstrip's `film:badge:loading:{id}`). -pub(crate) fn paint_loading_cue(p: &egui::Painter, t: &Tokens, rect: Rect, prefix: &str, id: u64) { +/// Reduce motion has nothing to stop. It is left off tiles too small to hold it: judged by the +/// `tile` (the placeholder's cell, smaller than 32 pt either way) and by the `rect` (the +/// placeholder, which must have room for the dots). Registered as `{prefix}{id}` (the grid's +/// `badge:loading:{id}`, the filmstrip's `film:badge:loading:{id}`). +pub(crate) fn paint_loading_cue(p: &egui::Painter, t: &Tokens, tile: Rect, rect: Rect, prefix: &str, id: u64) { const RADIUS: f32 = 1.75; const GAP: f32 = 7.0; - if rect.width().min(rect.height()) < 32.0 { + const CUE_W: f32 = 2.0 * (GAP + RADIUS); + const CUE_H: f32 = 2.0 * RADIUS; + if tile.width().min(tile.height()) < 32.0 || rect.width() < CUE_W || rect.height() < CUE_H { return; } let middle = rect.center(); diff --git a/crates/ui-egui/src/render.rs b/crates/ui-egui/src/render.rs index 770c0f09db1..e7534d6dea1 100644 --- a/crates/ui-egui/src/render.rs +++ b/crates/ui-egui/src/render.rs @@ -1067,6 +1067,12 @@ impl Renderer { self.pool.wait(timeout) } + /// Test seam: a failure left by an earlier request of `slot` for `photo` (a key no later job has). + #[cfg(test)] + pub(crate) fn record_failure_for_test(&mut self, slot: Slot, photo: PhotoId) { + self.failed.insert(slot, (0, "an earlier failure".into(), 0, photo)); + } + /// Test seam: make the renderer look busy without starting a job (capture deadlines). #[cfg(test)] pub(crate) fn force_in_flight_for_test(&mut self, count: usize) { @@ -1083,8 +1089,13 @@ impl Renderer { /// Why a photo has no grid thumbnail and won't get one: the thumbnail's own render failed, or the embedded /// preview failed and nothing else is on its way (an unedited raw asks for no other: see `request_thumb`). + /// A new embedded-preview request (another size or look) is on its way too; a retry of the very + /// request that failed keeps the failure until it answers. pub fn thumb_failure(&self, id: PhotoId) -> Option<&str> { - self.failure(Slot::Thumb(id)).or_else(|| if self.is_pending(Slot::Thumb(id)) { None } else { self.failure(Slot::ThumbQuick(id)) }) + let quick = Slot::ThumbQuick(id); + self.failure(Slot::Thumb(id)).or_else(|| { + if self.is_pending(Slot::Thumb(id)) || (self.is_pending(quick) && !self.retrying(quick)) { None } else { self.failure(quick) } + }) } /// Why the last render of `photo` for `slot` failed: a view slot shows one photo after diff --git a/crates/ui-egui/src/render/thumbnail_tests.rs b/crates/ui-egui/src/render/thumbnail_tests.rs index 281b0b73433..0c33ba02d97 100644 --- a/crates/ui-egui/src/render/thumbnail_tests.rs +++ b/crates/ui-egui/src/render/thumbnail_tests.rs @@ -1960,3 +1960,16 @@ fn thumb_failure_reports_only_a_thumbnail_that_will_not_arrive() { r.failed.insert(Slot::Thumb(id), (2, "decode failed".into(), 0, id)); assert_eq!(r.thumb_failure(id), Some("decode failed")); } + +#[test] +fn thumb_failure_waits_for_a_new_quick_request_but_not_for_a_retry_of_the_failed_one() { + let id = PhotoId(6); + let mut r = Renderer::default(); + r.failed.insert(Slot::ThumbQuick(id), (1, "no embedded preview".into(), 0, id)); + // the size changed: a new embedded-preview request (another key) is on its way, so the cell is loading + r.pending.insert(Slot::ThumbQuick(id), (3, 10)); + assert_eq!(r.thumb_failure(id), None, "a replacement of the failed quick render is pending"); + // the very request that failed is asked for again (after an eviction): until it answers the failure stands + r.pending.insert(Slot::ThumbQuick(id), (1, 10)); + assert_eq!(r.thumb_failure(id), Some("no embedded preview")); +} diff --git a/crates/ui-egui/src/tests/loading_cell.rs b/crates/ui-egui/src/tests/loading_cell.rs index c36b56bdb3b..9a48d6cfffe 100644 --- a/crates/ui-egui/src/tests/loading_cell.rs +++ b/crates/ui-egui/src/tests/loading_cell.rs @@ -94,3 +94,41 @@ fn the_filmstrip_tells_loading_from_unreadable_too() { assert!(h.settle(SETTLE)); assert!(ids(&h, "film:badge:loading:").is_empty(), "gone once the failure is known"); } + +/// A failure left by an earlier request is not this tile's verdict: the filmstrip asks for its +/// thumbnail before it reads the failure, so its first frame says loading, not "!". +#[test] +fn a_filmstrip_tile_asks_for_its_thumbnail_before_it_reads_an_old_failure() { + let (mut h, _open) = app_with_held_thumbnails(ViewMode::Detail); + for i in 1..=12u64 { + h.app.renderer.record_failure_for_test(Slot::ThumbQuick(PhotoId(i)), PhotoId(i)); + } + // the first frame that draws the strip: nothing was asked for yet + let mut drawn = false; + for _ in 0..20 { + h.step(); + if !ids(&h, "film:").is_empty() { + drawn = true; + break; + } + } + assert!(drawn, "the strip is drawn"); + assert!(!h.painted_text().iter().any(|t| t == "!"), "no tile says it can't be opened on an old failure"); +} + +/// The smallest square cells still hold the cue: its size is judged against the cell, and the cue +/// itself must fit the placeholder left inside it. +#[test] +fn the_smallest_square_cells_still_show_the_loading_cue() { + let (mut h, _open) = app_with_held_thumbnails(ViewMode::SquareGrid); + h.app.ui.thumb_size = crate::state::THUMB_SIZE_MIN; + first_grid_frame(&mut h); + let cues = ids(&h, "badge:loading:"); + assert!(!cues.is_empty(), "the cells on screen are loading and say so: {:?}", ids(&h, "thumb:")); + for id in cues { + let photo = id.trim_start_matches("badge:loading:"); + let cue = h.app.widgets.iter().find(|(w, _)| *w == id).map(|(_, r)| *r).unwrap(); + let cell = h.app.widgets.iter().find(|(w, _)| *w == format!("thumb:{photo}")).map(|(_, r)| *r).unwrap(); + assert!(cell.contains_rect(cue), "{cue:?} in {cell:?}"); + } +} From 05fecef1c1b2181cb4ba1013c85ba6ba0dc052f5 Mon Sep 17 00:00:00 2001 From: Nathaniel Ledford Date: Thu, 29 Oct 2026 21:55:08 -0400 Subject: [PATCH 3/6] LR-VIEW-PHOTOGRID: an old full-thumbnail failure no longer shows while a new request is on its way --- crates/ui-egui/src/render.rs | 14 ++++++++------ crates/ui-egui/src/render/thumbnail_tests.rs | 13 +++++++++++++ 2 files changed, 21 insertions(+), 6 deletions(-) diff --git a/crates/ui-egui/src/render.rs b/crates/ui-egui/src/render.rs index e7534d6dea1..e843d2fdc5e 100644 --- a/crates/ui-egui/src/render.rs +++ b/crates/ui-egui/src/render.rs @@ -1089,13 +1089,15 @@ impl Renderer { /// Why a photo has no grid thumbnail and won't get one: the thumbnail's own render failed, or the embedded /// preview failed and nothing else is on its way (an unedited raw asks for no other: see `request_thumb`). - /// A new embedded-preview request (another size or look) is on its way too; a retry of the very - /// request that failed keeps the failure until it answers. + /// A new request of either kind (another size or look, a relinked file) is on its way too; a retry of + /// the very request that failed keeps the failure until it answers. pub fn thumb_failure(&self, id: PhotoId) -> Option<&str> { - let quick = Slot::ThumbQuick(id); - self.failure(Slot::Thumb(id)).or_else(|| { - if self.is_pending(Slot::Thumb(id)) || (self.is_pending(quick) && !self.retrying(quick)) { None } else { self.failure(quick) } - }) + let (full, quick) = (Slot::Thumb(id), Slot::ThumbQuick(id)); + if self.is_pending(full) && !self.retrying(full) { + return None; + } + // a full-render failure that stands, else the embedded preview's, unless a new request of it is on its way + self.failure(full).or_else(|| if self.is_pending(quick) && !self.retrying(quick) { None } else { self.failure(quick) }) } /// Why the last render of `photo` for `slot` failed: a view slot shows one photo after diff --git a/crates/ui-egui/src/render/thumbnail_tests.rs b/crates/ui-egui/src/render/thumbnail_tests.rs index 0c33ba02d97..8de5fd75808 100644 --- a/crates/ui-egui/src/render/thumbnail_tests.rs +++ b/crates/ui-egui/src/render/thumbnail_tests.rs @@ -1973,3 +1973,16 @@ fn thumb_failure_waits_for_a_new_quick_request_but_not_for_a_retry_of_the_failed r.pending.insert(Slot::ThumbQuick(id), (1, 10)); assert_eq!(r.thumb_failure(id), Some("no embedded preview")); } + +#[test] +fn thumb_failure_waits_for_a_new_full_request_but_not_for_a_retry_of_the_failed_one() { + let id = PhotoId(7); + let mut r = Renderer::default(); + r.failed.insert(Slot::Thumb(id), (1, "decode failed".into(), 0, id)); + // the size changed or the file was relinked: a replacement with another key is on its way, so the cell is loading + r.pending.insert(Slot::Thumb(id), (3, 10)); + assert_eq!(r.thumb_failure(id), None, "a replacement of the failed full render is pending"); + // the very request that failed is asked for again: until it answers the failure stands + r.pending.insert(Slot::Thumb(id), (1, 10)); + assert_eq!(r.thumb_failure(id), Some("decode failed")); +} From 5886637822229017d17caf02902876463aedb353 Mon Sep 17 00:00:00 2001 From: Nathaniel Ledford Date: Fri, 6 Nov 2026 07:16:12 -0500 Subject: [PATCH 4/6] LR-VIEW-PHOTOGRID: a new embedded-preview request supersedes an old full-thumbnail failure An edited raw whose full thumbnail failed, with its edit then undone, asks only for the camera's embedded preview, under a key of its own, and the full render's failure stayed in force while that request was on its way: the cell and the filmstrip tile said "!" over a picture that could still arrive. thumb_failure now lets a pending embedded-preview request with another key than the failed render's supersede the failure; the request that failed, asked for again, keeps it until it answers. --- crates/ui-egui/src/render.rs | 14 ++++++++++---- crates/ui-egui/src/render/thumbnail_tests.rs | 16 ++++++++++++++++ 2 files changed, 26 insertions(+), 4 deletions(-) diff --git a/crates/ui-egui/src/render.rs b/crates/ui-egui/src/render.rs index e843d2fdc5e..3c2a54def3e 100644 --- a/crates/ui-egui/src/render.rs +++ b/crates/ui-egui/src/render.rs @@ -1089,15 +1089,21 @@ impl Renderer { /// Why a photo has no grid thumbnail and won't get one: the thumbnail's own render failed, or the embedded /// preview failed and nothing else is on its way (an unedited raw asks for no other: see `request_thumb`). - /// A new request of either kind (another size or look, a relinked file) is on its way too; a retry of - /// the very request that failed keeps the failure until it answers. + /// A new request of either kind (another size or look, a relinked file; an undone edit asks only for the + /// embedded preview, under a key of its own) is on its way too; a retry of the very request that failed + /// keeps the failure until it answers. pub fn thumb_failure(&self, id: PhotoId) -> Option<&str> { let (full, quick) = (Slot::Thumb(id), Slot::ThumbQuick(id)); if self.is_pending(full) && !self.retrying(full) { return None; } - // a full-render failure that stands, else the embedded preview's, unless a new request of it is on its way - self.failure(full).or_else(|| if self.is_pending(quick) && !self.retrying(quick) { None } else { self.failure(quick) }) + if let Some((key, why, ..)) = self.failed.get(&full) { + // the full render failed: that stands unless a new embedded-preview request is on its way (it carries + // its job's key, so the key that failed is the retry) + return if self.pending.get(&quick).is_some_and(|p| p.0 != *key) { None } else { Some(why.as_str()) }; + } + // else the embedded preview's failure, unless a new request of it is on its way + if self.is_pending(quick) && !self.retrying(quick) { None } else { self.failure(quick) } } /// Why the last render of `photo` for `slot` failed: a view slot shows one photo after diff --git a/crates/ui-egui/src/render/thumbnail_tests.rs b/crates/ui-egui/src/render/thumbnail_tests.rs index 8de5fd75808..3e077897ee5 100644 --- a/crates/ui-egui/src/render/thumbnail_tests.rs +++ b/crates/ui-egui/src/render/thumbnail_tests.rs @@ -1986,3 +1986,19 @@ fn thumb_failure_waits_for_a_new_full_request_but_not_for_a_retry_of_the_failed_ r.pending.insert(Slot::Thumb(id), (1, 10)); assert_eq!(r.thumb_failure(id), Some("decode failed")); } + +#[test] +fn thumb_failure_waits_for_a_new_quick_request_after_a_full_failure_but_not_for_a_retry_of_the_failed_one() { + let id = PhotoId(8); + let mut r = Renderer::default(); + // an edited raw's full render failed; its edit was undone, so only the embedded preview is asked for + r.failed.insert(Slot::Thumb(id), (1, "decode failed".into(), 0, id)); + r.pending.insert(Slot::ThumbQuick(id), (3, 10)); + assert_eq!(r.thumb_failure(id), None, "a quick request with another key is on its way: the cell is loading"); + // the very request that failed is asked for again: until it answers the failure stands + r.pending.insert(Slot::ThumbQuick(id), (1, 10)); + assert_eq!(r.thumb_failure(id), Some("decode failed")); + // nothing is on its way + r.pending.clear(); + assert_eq!(r.thumb_failure(id), Some("decode failed")); +} From 0a4a1b597a5d3af0940d75f16fd7a6bc9e3f71c4 Mon Sep 17 00:00:00 2001 From: Nathaniel Ledford Date: Fri, 6 Nov 2026 07:16:12 -0500 Subject: [PATCH 5/6] LR-VIEW-PHOTOGRID: a video's placeholder stays plain, without the loading cue No thumbnail job is ever asked for a video (Session::thumb_job), so the three loading dots on its placeholder promised a picture that never comes, in the grid and the filmstrip. thumb_may_arrive leaves the cue off a video's placeholder in both. --- crates/ui-egui/src/panels/detail/filmstrip.rs | 2 +- crates/ui-egui/src/panels/grid.rs | 9 +++++- crates/ui-egui/src/tests/loading_cell.rs | 32 +++++++++++++++++-- docs/parity-checklist.md | 6 ++-- docs/whats-new.md | 2 +- 5 files changed, 43 insertions(+), 8 deletions(-) diff --git a/crates/ui-egui/src/panels/detail/filmstrip.rs b/crates/ui-egui/src/panels/detail/filmstrip.rs index 5965b1e9a22..0bce7bc0c7d 100644 --- a/crates/ui-egui/src/panels/detail/filmstrip.rs +++ b/crates/ui-egui/src/panels/detail/filmstrip.rs @@ -126,7 +126,7 @@ pub(crate) fn filmstrip(app: &mut LightcraftApp, ui: &mut egui::Ui, r: Rect) { p.rect_filled(img_area, 0.0, t.skeleton); if failed { p.text(img_area.center(), Align2::CENTER_CENTER, "!", t.semibold(14.0), t.text); - } else { + } else if crate::panels::grid::thumb_may_arrive(app, *id) { crate::panels::grid::paint_loading_cue(p, &t, img_area, img_area, "film:badge:loading:", id.0); } } diff --git a/crates/ui-egui/src/panels/grid.rs b/crates/ui-egui/src/panels/grid.rs index a2d46ef02e9..a0fad70db02 100644 --- a/crates/ui-egui/src/panels/grid.rs +++ b/crates/ui-egui/src/panels/grid.rs @@ -857,13 +857,20 @@ fn paint_cell_thumbnail(app: &mut LightcraftApp, p: &egui::Painter, t: &Tokens, if app.renderer.thumb_failure(id).is_some() { // unreadable / missing file p.text(ph.center(), Align2::CENTER_CENTER, "!", t.semibold(18.0), t.text); - } else { + } else if thumb_may_arrive(app, id) { paint_loading_cue(p, t, img_rect, ph, "badge:loading:", id.0); } ph } } +/// Whether a thumbnail of `id` can still arrive, so its placeholder says so with the loading cue: no +/// thumbnail job is ever asked for a video (`Session::thumb_job`: the image decoders can't read one), and +/// its placeholder stays plain. +pub(crate) fn thumb_may_arrive(app: &LightcraftApp, id: PhotoId) -> bool { + !app.session.catalog.photo(id).is_some_and(|p| p.is_video()) +} + /// A quiet cue on a thumbnail's placeholder while the picture is still on its way (an unreadable one /// says "!" instead): three small dots in the middle, in the icon color (3:1 on every theme's placeholder). It stands still, so /// Reduce motion has nothing to stop. It is left off tiles too small to hold it: judged by the diff --git a/crates/ui-egui/src/tests/loading_cell.rs b/crates/ui-egui/src/tests/loading_cell.rs index 9a48d6cfffe..a4541a16ca0 100644 --- a/crates/ui-egui/src/tests/loading_cell.rs +++ b/crates/ui-egui/src/tests/loading_cell.rs @@ -20,10 +20,16 @@ const SETTLE: Duration = Duration::from_secs(60); /// opens, and then failed (as an unreadable file's would): the cells are loading, then unreadable, at /// the test's say. fn app_with_held_thumbnails(view: ViewMode) -> (Headless, Rc>) { + app_with_held_files(view, "jpg", "JPEG") +} + +/// [`app_with_held_thumbnails`] for files of another kind (`extension` and catalog `format`). +fn app_with_held_files(view: ViewMode, extension: &str, format: &str) -> (Headless, Rc>) { let mut s = Session::new(); for i in 0..12u64 { - let path = format!("/lightcraft-loading-cell-test/IMG_{i:03}.jpg"); - let p = Photo::new(PhotoId(i + 1), Source::File { path }, &format!("IMG_{i:03}.jpg"), "JPEG", 6000, 4000, "2026-01-01T00:00:00"); + let name = format!("IMG_{i:03}.{extension}"); + let path = format!("/lightcraft-loading-cell-test/{name}"); + let p = Photo::new(PhotoId(i + 1), Source::File { path }, &name, format, 6000, 4000, "2026-01-01T00:00:00"); s.catalog.apply(Op::AddPhoto { photo: Box::new(p) }).unwrap(); } let mut h = Headless::new(LightcraftApp::new(s, Services { png: None, ..Default::default() }), [1000.0, 700.0], 1.0); @@ -132,3 +138,25 @@ fn the_smallest_square_cells_still_show_the_loading_cue() { assert!(cell.contains_rect(cue), "{cue:?} in {cell:?}"); } } + +/// No thumbnail job is ever asked for a video (the image decoders can't read one), so its placeholder is not +/// "on its way": it stays the plain skeleton it was, in both grids and the filmstrip, before and after the +/// renders are let through. +#[test] +fn a_video_placeholder_never_shows_the_loading_cue() { + for view in [ViewMode::PhotoGrid, ViewMode::SquareGrid] { + let (mut h, open) = app_with_held_files(view, "mp4", "MP4"); + first_grid_frame(&mut h); + assert!(ids(&h, "badge:loading:").is_empty(), "{view:?}: a video has no thumbnail coming: {:?}", ids(&h, "badge:loading:")); + open.set(true); + assert!(h.settle(SETTLE)); + assert!(ids(&h, "badge:loading:").is_empty(), "{view:?}: {:?}", ids(&h, "badge:loading:")); + assert!(!h.painted_text().iter().any(|t| t == "!"), "{view:?}: nothing failed: a video is never read as an image"); + } + let (mut h, _open) = app_with_held_files(ViewMode::PhotoGrid, "mp4", "MP4"); + let r = h.request("ui.set", serde_json::json!({"view": "detail"}), SETTLE); + assert_eq!(r["ok"], true, "{r}"); + h.step(); + assert!(!ids(&h, "film:").is_empty(), "the strip is drawn"); + assert!(ids(&h, "film:badge:loading:").is_empty(), "the filmstrip's video tiles stay plain: {:?}", ids(&h, "film:badge:loading:")); +} diff --git a/docs/parity-checklist.md b/docs/parity-checklist.md index eca06531dfb..9dc69f2ad55 100644 --- a/docs/parity-checklist.md +++ b/docs/parity-checklist.md @@ -124,12 +124,12 @@ differences and missing bindings are in [ui-parity.md](ui-parity.md#shortcuts). | Id | Feature | Tier | Status | Evidence | Missing / notes | |---|---|---|---|---|---| -| 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; a mouse-wheel notch scrolls a third of the grid's height, in both grids, as in Lightroom Classic (`theme::WHEEL_STRIP_SHARE`; trackpads scroll the points they report); queued embedded thumbnail stand-ins follow viewport priority changes without another extraction (`crates/ui-egui/src/render.rs`, issue #348; full-app visual/timing verification pending); selected photos are ringed in the theme's colours (`Tokens::ring_active` / `ring_selected`, 3:1 or more against the grid in every theme): the active photo gets a 3 pt two-tone ring (a thin inner line against the photo, so it shows on a white photo too), the other selected photos a 1.5 pt ring; the empty view (an empty album or other source in a library with photos, or an empty Recently Deleted) names Import Photos' shortcut as the menu bar writes it and as bound (⌘⇧I on macOS, Ctrl+Shift+I elsewhere), and none when it is unbound; a thumbnail still on its way shows three small still dots on its placeholder (`badge:loading:{id}`, `film:badge:loading:{id}`; `crates/ui-egui/src/tests/loading_cell.rs`), an unreadable one the "!" | +| 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; a mouse-wheel notch scrolls a third of the grid's height, in both grids, as in Lightroom Classic (`theme::WHEEL_STRIP_SHARE`; trackpads scroll the points they report); queued embedded thumbnail stand-ins follow viewport priority changes without another extraction (`crates/ui-egui/src/render.rs`, issue #348; full-app visual/timing verification pending); selected photos are ringed in the theme's colours (`Tokens::ring_active` / `ring_selected`, 3:1 or more against the grid in every theme): the active photo gets a 3 pt two-tone ring (a thin inner line against the photo, so it shows on a white photo too), the other selected photos a 1.5 pt ring; the empty view (an empty album or other source in a library with photos, or an empty Recently Deleted) names Import Photos' shortcut as the menu bar writes it and as bound (⌘⇧I on macOS, Ctrl+Shift+I elsewhere), and none when it is unbound; a thumbnail still on its way shows three small still dots on its placeholder (`badge:loading:{id}`, `film:badge:loading:{id}`; `crates/ui-egui/src/tests/loading_cell.rs`), an unreadable one the "!", and a video's placeholder stays plain (no thumbnail is ever asked for a video) | | LR-VIEW-SQUAREGRID | Square grid | P0 | ✅ | `cmd:view.squareGrid` | same date headers and selection rings 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). 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`). While the camera's embedded JPEG is on screen a “Camera preview” label at the top right says so, with what that means on hover (widget `loupe:cameraPreview`), so colour isn't judged on it. Culling: the stand-ins of the next five photos in the direction of travel and the one behind are made ahead and taken over at the step (`render::Slot::QuickAhead`; EOS R5 C wedding: step to the camera JPEG p50 187 → 0 ms), decoded camera JPEGs stay in memory for a step back, zoomed in on an unedited raw the camera JPEG is shown at full size under the window render until that arrives (100 % in ~0.9 s instead of ~5.6 s, `render::Slot::QuickFull`), and while an arrow key is held the raw render waits until a photo stays 0.12 s (`crates/ui-egui/src/loupe_timing.rs`); `ui.inspect` → `perf.loupeSteps` times each step on the frames drawn | | 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, a third of its width per notch as in Lightroom Classic (trackpads scroll the points they report); it follows the active photo only when that changes (centred if off screen), so a scrolled strip stays put; every selected photo has the selected background; selected photos with a loaded thumbnail also show a ring, the active one in the heavier two-tone ring and the others in the lighter one, in the theme's colours, as in the grid; a thumbnail still on its way shows three small still dots on its placeholder (`badge:loading:{id}`, `film:badge:loading:{id}`; `crates/ui-egui/src/tests/loading_cell.rs`), an unreadable one the "!" (a selected cell with no thumbnail, still loading or failed, has the background and no ring); a drag from a cell carries the selection (a photo outside it drags alone and replaces it; in Compare it drags alone and leaves the selection, the active photo and the pair as they are) to the same sidebar rows as a drag from the grid, and a click without movement works as before (it selects the photo; in Compare it goes to the active side, see LR-VIEW-COMPARE) | +| 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, a third of its width per notch as in Lightroom Classic (trackpads scroll the points they report); it follows the active photo only when that changes (centred if off screen), so a scrolled strip stays put; every selected photo has the selected background; selected photos with a loaded thumbnail also show a ring, the active one in the heavier two-tone ring and the others in the lighter one, in the theme's colours, as in the grid; a thumbnail still on its way shows three small still dots on its placeholder (`badge:loading:{id}`, `film:badge:loading:{id}`; `crates/ui-egui/src/tests/loading_cell.rs`), an unreadable one the "!", and a video's placeholder stays plain (a selected cell with no thumbnail, still loading or failed, has the background and no ring); a drag from a cell carries the selection (a photo outside it drags alone and replaces it; in Compare it drags alone and leaves the selection, the active photo and the pair as they are) to the same sidebar rows as a drag from the grid, and a click without movement works as before (it selects the photo; in Compare it goes to the active side, see LR-VIEW-COMPARE) | | LR-VIEW-ZOOM | Zoom & pan | P0 | ✅ | `cmd:view.zoomFit`, `cmd:view.zoom100`, `cmd:view.zoomIn`, `cmd:view.zoomOut`, `cmd:view.zoomToggle`, `cmd:view.clickZoom`, `cmd:view.navigate`, `crates/ui-egui/src/panels/detail.rs`, `crates/ui-egui/src/headless.rs` | continuous native pinch / modifier-wheel zoom (Fit–800%, anchored under the pointer), two-finger scroll / touch pan with edge limits; in Detail a middle-button drag (the wheel pressed) pans with a hand cursor whatever tool is active, so Remove / Heal / Clone, mask brushes and Crop don't paint or move meanwhile (`middle_pan`, `tests_canvas_pan.rs`); in Detail a middle-button drag (the wheel pressed) pans with a hand cursor whatever tool is active, so Remove / Heal / Clone, mask brushes and Crop don't paint or move meanwhile (`middle_pan`, `tests_canvas_pan.rs`); Detail (including tools, Before/After and full-screen preview), Compare and Reference; fractional percentages preserve small gestures; image, picker and targeted-adjustment cursors stay steady between gesture events; keyboard steps 25–800 % (not 6–1600 %); Fill in the bottom bar; click / Z / Space eases to the chosen ratio (1:1 default, 2:1, 3:1, 4:1, 8:1). The loupe's cost follows the canvas, not the zoom (issue #323): the whole frame is rendered at about canvas size (at most the 2560 px preview source level unless a larger Preview size is chosen, and never above the GPU's texture side), and once the view is zoomed well past that (more than 25 %) the window on screen is rendered too, cut from a frame of at most the photo's own pixels, so beyond 100 % the GPU magnifies it (`region::plan`, `RenderRequest::window`, `Session::region_job`, `crates/ui-egui/src/region.rs`); 1:1 and 2:1–8:1 are sharp at any photo size. A slider tick takes 7–12 ms on a 1400 × 900 canvas and 11–25 ms on a 2800 × 1700 one at 100 % and 400 % of a 24 MP photo (M1 Max, GPU, `profile_slider_drag`); about 20–25 ms at 100 % on the big canvas is over a 16 ms frame. A slider drag renders the whole frame at full size where the GPU draws the view, so the fit view stays sharp while dragging, and at 0.6 of it where that would be too slow: on the CPU, with an output-device profile proof or the HDR range shown, or for a control whose full-size drafts on this photo went clearly over the 16 ms slider budget (more than 20 ms) in two drags in a row (a LUT profile or refined mask the CPU renders, a photo past a GPU limit, a slow GPU); a draft's time is its render plus the frame that uploads and shows it, and a host frame time over 1 s (a hidden or stalled window) counts as unknown. A slow verdict is per photo and control (the same control on another photo, or another control on this one, is timed afresh) and expires: after 30 s a drag tries full size again, the wait doubling after each slow retry up to 240 s. Only a drag timed at full size changes it: one whose full-size drafts' median time (leaving out the first) is at most 20 ms forgets it; a drag that drafts small from its start (while the verdict holds, or where the GPU does not draw the view) or times fewer than two full-size drafts leaves it unchanged. At most 256 (photo, control) pairs are remembered, the oldest forgotten first. The size is chosen when a drag starts and kept until it ends, unless its full-size drafts take more than twice the budget, when it drops to 0.6 after three of them (`region::DragScale`, issue #330). Zoomed in, the whole-frame draft under the window is the 0.6 one (only the histogram and the window's stand-in use it). Render workers convert the pixels for their textures, not the UI thread. Handing GPU renders to egui without a CPU readback is #1228. A continuous pinch holds the render sizes (and the windows there are) and the size the fit view is shrunk to until it is quiet. A fit view on a canvas up to about 3200 px (a Retina Mac) never decodes the original; larger displays get a window at fit, which does. Diagnostic overlays (Visualize Spots, Point Color range, HDR range) get windows too, tested equal to the whole-frame render's pixels. Photos whose spots or Auto Mask strokes read too far for one window (only photos longer than 8192 px) render the whole frame at the size it is drawn, as before windows; while a preset or profile is hovered, or over a picture that is not the frame (an unsupported raw's embedded JPEG), the whole frame stays canvas-sized. Before/After (side by side, stacked, `\\` and both wipes) gets the same windows on both sides, clipped to their pane or side of the line. Windows render on the GPU like whole frames (equivalence-tested against the CPU), in the browser build too (windows no wider than its GPU's texture side, at most 3072 px), and are not made while hovering a look, nor over a picture that is not the frame (an unsupported raw's embedded JPEG with another crop). No texture is larger than the GPU allows. Spots and Auto Mask brushes work while what a window reads fits one render (8192 px along an axis, 4096 in the browser): the window grows to hold the spot and its source patch, or the dabs near it, and if that would take more (a clone from far away at 8:1) the loupe keeps the whole-frame render instead, and spots with an automatic source pick it from a fixed-size render of the whole frame (so a window's choice can differ from a whole-frame render's, which picks at its own resolution). The wide stages (dehaze, clarity, highlights/shadows base) and Refine Edges on masks read a window margin capped at 768 px; measured on hard-edged blocks that costs at most a few levels at 8:1. the histogram and Navigator come from the whole-frame render. Compare and Reference get the same windows, one per pane (`Slot::CompareRegion`, `panels/compare.rs`), over each pane's whole-frame render (at most 2560 px); while either view is open two originals stay decoded (`MediaCache::set_full_capacity`), so one pane's window does not evict the other's source; a pinch, or a slider drag on the active photo in Reference, keeps the windows there are until it ends. Mask overlays and soft proofing get the same windows (the window carries the overlay or the proof; only an output-device-profile proof renders on the CPU, where a tick at 100 % on a 1400 × 900 canvas takes about 36 ms instead of a full-size 24 MP proof). Verified: a 1:1 window of a 24 MP photo with tone and colour edits is the full-size export to within one level (`one_to_one_window_pixels_are_export_pixels`). Measured on Linux (Ryzen AI Max+ 395, Radeon 8060S, GPU, `profile_slider_drag`): median tick→shown 7 ms at fit, 33 ms at 100 % and 6 ms at 400 % on 1400 × 900; 21 ms at 100 % and 9 ms at 400 % on 2800 × 1700; 36 ms at 100 % with an output-device-profile soft proof (the CPU path) | | LR-VIEW-FOCUSPOINT | Camera focus point overlay and zoom (beyond Lightroom) | P2 | 🟡 | `cmd:view.focusPoint`, `cmd:view.zoomToFocus`, `cmd:view.zoomToggle`, `cmd:photo.reload`, `cmd:photo.readFocusPoints`, `cmd:focus.pump`, `crates/meta/src/focus.rs`, `crates/meta/src/focus_read.rs`, `crates/engine/src/focus_scan.rs`, `crates/engine/src/tests/focus_scan.rs`, `crates/ui-egui/src/panels/detail.rs` (`focus_box`, `draw_focus_point`), `crates/ui-egui/src/panels/compare.rs`, `crates/ui-egui/src/tests/focus_point.rs`, `docs/focus-points.md` | an extra (Lightroom shows no focus points): the AF frame read from the file at import; photos imported earlier get it in the background from a header-only read of each file (about 32 KB, ~100 photos/s from a spinning disk; activity row, cancellable, resumable; Photo ▸ Read Focus Points) as a box on the upright photo, drawn in Detail, Compare and Survey through rotation and crop (View ▸ Focus Point, ⌥F); Toggle Zoom centres on it (View ▸ Zoom to Focus Point, on by default); Info panel row `AF-C · Wide · Animal Eye Tracking`; `meta.focus` in `photo.inspect`. Partial: Sony ILCE-1 and ILCE-7SM3 only (layout checked against 333 files); other Sony bodies and other makers not yet; manual focus and centre-only Wide reports show nothing; Compare panes share one pan, so Z centres on the active photo's point only | | LR-VIEW-NAVIGATOR | Navigator mini map | P1 | ✅ | `cmd:view.navigator`, `crates/ui-egui/src/panels/detail.rs` | shown while zoomed (bottom right); click/drag pans | @@ -820,7 +820,7 @@ Latin stays upright. Advanced Japanese composition remains open. Regression cove | 2026-10-24 | minor | LR-EDIT-DETAIL-DENOISE: the built-in denoiser measures noise by colour channel and ignores texture, and its strength follows the measured noise; status and counts unchanged | | 2026-10-24 | minor | LR-EDIT-DETAIL-DENOISE: the built-in denoiser filters with block-matching collaborative filtering instead of non-local means, and runs that filter on the graphics card where there is one; status and counts unchanged | | 2026-10-23 | minor | LR-EDIT-DETAIL-DENOISE: built-in denoiser, no model needed | -| 2026-10-29 | minor | LR-VIEW-PHOTOGRID, LR-VIEW-FILMSTRIP: a grid cell or filmstrip tile whose thumbnail is still on its way shows three small still dots in the icon color on its placeholder (widget `badge:loading:{id}`, `film:badge:loading:{id}`), so it no longer looks like one whose file can't be read (the "!"); the dots don't move, so a Reduce motion setting has nothing to stop; status unchanged (✅) | +| 2026-10-29 | minor | LR-VIEW-PHOTOGRID, LR-VIEW-FILMSTRIP: a grid cell or filmstrip tile whose thumbnail is still on its way shows three small still dots in the icon color on its placeholder (widget `badge:loading:{id}`, `film:badge:loading:{id}`), so it no longer looks like one whose file can't be read (the "!"); a video's placeholder stays plain, as no thumbnail is asked for a video; the dots don't move, so a Reduce motion setting has nothing to stop; status unchanged (✅) | | 2026-10-25 | patch | LR-BEHAV-TITLEBAR: the top bar's title-bar gestures come from craft-window's `title_bar`: a double-click follows the system setting, and a press on a button, the search field or a panel floating over the bar never moves the window; status counts unchanged | | 2026-10-24 | minor | KEYC-METADATA, LRC-LIB-KEYWORDS: ⌘⌥K / Ctrl+Alt+K (`tool.enablePainting`, Photo ▸ Enable Painting) paints the painter box's keyword or stops painting; status counts unchanged (KEYC-METADATA stays 🟡) | | 2026-10-24 | minor | KEYC-METADATA: ⌘⇧K / Ctrl+Shift+K (`panel.editKeywords`, Edit Keywords) shows the Keywords panel with its Keyword List open and opens the picked keyword in Edit Keyword Tag; status counts unchanged (KEYC-METADATA stays 🟡) | diff --git a/docs/whats-new.md b/docs/whats-new.md index 0e10530d8dc..ff5808293e3 100644 --- a/docs/whats-new.md +++ b/docs/whats-new.md @@ -149,7 +149,7 @@ ### Loading thumbnails look different from unreadable ones - A grid cell or filmstrip tile whose thumbnail hasn't arrived yet now shows three small dots on its gray placeholder. One whose file can't be read still shows "!". The dots stand still (so a Reduce motion setting has nothing - to stop), and they are left off tiles too small to hold them. + to stop), and they are left off tiles too small to hold them. A video's placeholder stays plain. ### A person's page opens in seconds in a large library - Finding the unnamed faces that look like a person (a person's page, and again after each face confirmed there) now From 568d5c7405b8b0cfc5bb13456055826ede2d09d7 Mon Sep 17 00:00:00 2001 From: Nathaniel Ledford Date: Sun, 8 Nov 2026 07:16:08 -0500 Subject: [PATCH 6/6] LR-VIEW-FILMSTRIP: the checklist's ring parenthetical goes back after "as in the grid" The loading-cue clause had been inserted before it, so it read as describing the video placeholder. Co-Authored-By: Claude --- docs/parity-checklist.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/parity-checklist.md b/docs/parity-checklist.md index 9dc69f2ad55..053867a7034 100644 --- a/docs/parity-checklist.md +++ b/docs/parity-checklist.md @@ -129,7 +129,7 @@ differences and missing bindings are in [ui-parity.md](ui-parity.md#shortcuts). | 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`). While the camera's embedded JPEG is on screen a “Camera preview” label at the top right says so, with what that means on hover (widget `loupe:cameraPreview`), so colour isn't judged on it. Culling: the stand-ins of the next five photos in the direction of travel and the one behind are made ahead and taken over at the step (`render::Slot::QuickAhead`; EOS R5 C wedding: step to the camera JPEG p50 187 → 0 ms), decoded camera JPEGs stay in memory for a step back, zoomed in on an unedited raw the camera JPEG is shown at full size under the window render until that arrives (100 % in ~0.9 s instead of ~5.6 s, `render::Slot::QuickFull`), and while an arrow key is held the raw render waits until a photo stays 0.12 s (`crates/ui-egui/src/loupe_timing.rs`); `ui.inspect` → `perf.loupeSteps` times each step on the frames drawn | | 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, a third of its width per notch as in Lightroom Classic (trackpads scroll the points they report); it follows the active photo only when that changes (centred if off screen), so a scrolled strip stays put; every selected photo has the selected background; selected photos with a loaded thumbnail also show a ring, the active one in the heavier two-tone ring and the others in the lighter one, in the theme's colours, as in the grid; a thumbnail still on its way shows three small still dots on its placeholder (`badge:loading:{id}`, `film:badge:loading:{id}`; `crates/ui-egui/src/tests/loading_cell.rs`), an unreadable one the "!", and a video's placeholder stays plain (a selected cell with no thumbnail, still loading or failed, has the background and no ring); a drag from a cell carries the selection (a photo outside it drags alone and replaces it; in Compare it drags alone and leaves the selection, the active photo and the pair as they are) to the same sidebar rows as a drag from the grid, and a click without movement works as before (it selects the photo; in Compare it goes to the active side, see LR-VIEW-COMPARE) | +| 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, a third of its width per notch as in Lightroom Classic (trackpads scroll the points they report); it follows the active photo only when that changes (centred if off screen), so a scrolled strip stays put; every selected photo has the selected background; selected photos with a loaded thumbnail also show a ring, the active one in the heavier two-tone ring and the others in the lighter one, in the theme's colours, as in the grid (a selected cell with no thumbnail, still loading or failed, has the background and no ring); a thumbnail still on its way shows three small still dots on its placeholder (`badge:loading:{id}`, `film:badge:loading:{id}`; `crates/ui-egui/src/tests/loading_cell.rs`), an unreadable one the "!", and a video's placeholder stays plain; a drag from a cell carries the selection (a photo outside it drags alone and replaces it; in Compare it drags alone and leaves the selection, the active photo and the pair as they are) to the same sidebar rows as a drag from the grid, and a click without movement works as before (it selects the photo; in Compare it goes to the active side, see LR-VIEW-COMPARE) | | LR-VIEW-ZOOM | Zoom & pan | P0 | ✅ | `cmd:view.zoomFit`, `cmd:view.zoom100`, `cmd:view.zoomIn`, `cmd:view.zoomOut`, `cmd:view.zoomToggle`, `cmd:view.clickZoom`, `cmd:view.navigate`, `crates/ui-egui/src/panels/detail.rs`, `crates/ui-egui/src/headless.rs` | continuous native pinch / modifier-wheel zoom (Fit–800%, anchored under the pointer), two-finger scroll / touch pan with edge limits; in Detail a middle-button drag (the wheel pressed) pans with a hand cursor whatever tool is active, so Remove / Heal / Clone, mask brushes and Crop don't paint or move meanwhile (`middle_pan`, `tests_canvas_pan.rs`); in Detail a middle-button drag (the wheel pressed) pans with a hand cursor whatever tool is active, so Remove / Heal / Clone, mask brushes and Crop don't paint or move meanwhile (`middle_pan`, `tests_canvas_pan.rs`); Detail (including tools, Before/After and full-screen preview), Compare and Reference; fractional percentages preserve small gestures; image, picker and targeted-adjustment cursors stay steady between gesture events; keyboard steps 25–800 % (not 6–1600 %); Fill in the bottom bar; click / Z / Space eases to the chosen ratio (1:1 default, 2:1, 3:1, 4:1, 8:1). The loupe's cost follows the canvas, not the zoom (issue #323): the whole frame is rendered at about canvas size (at most the 2560 px preview source level unless a larger Preview size is chosen, and never above the GPU's texture side), and once the view is zoomed well past that (more than 25 %) the window on screen is rendered too, cut from a frame of at most the photo's own pixels, so beyond 100 % the GPU magnifies it (`region::plan`, `RenderRequest::window`, `Session::region_job`, `crates/ui-egui/src/region.rs`); 1:1 and 2:1–8:1 are sharp at any photo size. A slider tick takes 7–12 ms on a 1400 × 900 canvas and 11–25 ms on a 2800 × 1700 one at 100 % and 400 % of a 24 MP photo (M1 Max, GPU, `profile_slider_drag`); about 20–25 ms at 100 % on the big canvas is over a 16 ms frame. A slider drag renders the whole frame at full size where the GPU draws the view, so the fit view stays sharp while dragging, and at 0.6 of it where that would be too slow: on the CPU, with an output-device profile proof or the HDR range shown, or for a control whose full-size drafts on this photo went clearly over the 16 ms slider budget (more than 20 ms) in two drags in a row (a LUT profile or refined mask the CPU renders, a photo past a GPU limit, a slow GPU); a draft's time is its render plus the frame that uploads and shows it, and a host frame time over 1 s (a hidden or stalled window) counts as unknown. A slow verdict is per photo and control (the same control on another photo, or another control on this one, is timed afresh) and expires: after 30 s a drag tries full size again, the wait doubling after each slow retry up to 240 s. Only a drag timed at full size changes it: one whose full-size drafts' median time (leaving out the first) is at most 20 ms forgets it; a drag that drafts small from its start (while the verdict holds, or where the GPU does not draw the view) or times fewer than two full-size drafts leaves it unchanged. At most 256 (photo, control) pairs are remembered, the oldest forgotten first. The size is chosen when a drag starts and kept until it ends, unless its full-size drafts take more than twice the budget, when it drops to 0.6 after three of them (`region::DragScale`, issue #330). Zoomed in, the whole-frame draft under the window is the 0.6 one (only the histogram and the window's stand-in use it). Render workers convert the pixels for their textures, not the UI thread. Handing GPU renders to egui without a CPU readback is #1228. A continuous pinch holds the render sizes (and the windows there are) and the size the fit view is shrunk to until it is quiet. A fit view on a canvas up to about 3200 px (a Retina Mac) never decodes the original; larger displays get a window at fit, which does. Diagnostic overlays (Visualize Spots, Point Color range, HDR range) get windows too, tested equal to the whole-frame render's pixels. Photos whose spots or Auto Mask strokes read too far for one window (only photos longer than 8192 px) render the whole frame at the size it is drawn, as before windows; while a preset or profile is hovered, or over a picture that is not the frame (an unsupported raw's embedded JPEG), the whole frame stays canvas-sized. Before/After (side by side, stacked, `\\` and both wipes) gets the same windows on both sides, clipped to their pane or side of the line. Windows render on the GPU like whole frames (equivalence-tested against the CPU), in the browser build too (windows no wider than its GPU's texture side, at most 3072 px), and are not made while hovering a look, nor over a picture that is not the frame (an unsupported raw's embedded JPEG with another crop). No texture is larger than the GPU allows. Spots and Auto Mask brushes work while what a window reads fits one render (8192 px along an axis, 4096 in the browser): the window grows to hold the spot and its source patch, or the dabs near it, and if that would take more (a clone from far away at 8:1) the loupe keeps the whole-frame render instead, and spots with an automatic source pick it from a fixed-size render of the whole frame (so a window's choice can differ from a whole-frame render's, which picks at its own resolution). The wide stages (dehaze, clarity, highlights/shadows base) and Refine Edges on masks read a window margin capped at 768 px; measured on hard-edged blocks that costs at most a few levels at 8:1. the histogram and Navigator come from the whole-frame render. Compare and Reference get the same windows, one per pane (`Slot::CompareRegion`, `panels/compare.rs`), over each pane's whole-frame render (at most 2560 px); while either view is open two originals stay decoded (`MediaCache::set_full_capacity`), so one pane's window does not evict the other's source; a pinch, or a slider drag on the active photo in Reference, keeps the windows there are until it ends. Mask overlays and soft proofing get the same windows (the window carries the overlay or the proof; only an output-device-profile proof renders on the CPU, where a tick at 100 % on a 1400 × 900 canvas takes about 36 ms instead of a full-size 24 MP proof). Verified: a 1:1 window of a 24 MP photo with tone and colour edits is the full-size export to within one level (`one_to_one_window_pixels_are_export_pixels`). Measured on Linux (Ryzen AI Max+ 395, Radeon 8060S, GPU, `profile_slider_drag`): median tick→shown 7 ms at fit, 33 ms at 100 % and 6 ms at 400 % on 1400 × 900; 21 ms at 100 % and 9 ms at 400 % on 2800 × 1700; 36 ms at 100 % with an output-device-profile soft proof (the CPU path) | | LR-VIEW-FOCUSPOINT | Camera focus point overlay and zoom (beyond Lightroom) | P2 | 🟡 | `cmd:view.focusPoint`, `cmd:view.zoomToFocus`, `cmd:view.zoomToggle`, `cmd:photo.reload`, `cmd:photo.readFocusPoints`, `cmd:focus.pump`, `crates/meta/src/focus.rs`, `crates/meta/src/focus_read.rs`, `crates/engine/src/focus_scan.rs`, `crates/engine/src/tests/focus_scan.rs`, `crates/ui-egui/src/panels/detail.rs` (`focus_box`, `draw_focus_point`), `crates/ui-egui/src/panels/compare.rs`, `crates/ui-egui/src/tests/focus_point.rs`, `docs/focus-points.md` | an extra (Lightroom shows no focus points): the AF frame read from the file at import; photos imported earlier get it in the background from a header-only read of each file (about 32 KB, ~100 photos/s from a spinning disk; activity row, cancellable, resumable; Photo ▸ Read Focus Points) as a box on the upright photo, drawn in Detail, Compare and Survey through rotation and crop (View ▸ Focus Point, ⌥F); Toggle Zoom centres on it (View ▸ Zoom to Focus Point, on by default); Info panel row `AF-C · Wide · Animal Eye Tracking`; `meta.focus` in `photo.inspect`. Partial: Sony ILCE-1 and ILCE-7SM3 only (layout checked against 333 files); other Sony bodies and other makers not yet; manual focus and centre-only Wide reports show nothing; Compare panes share one pan, so Z centres on the active photo's point only | | LR-VIEW-NAVIGATOR | Navigator mini map | P1 | ✅ | `cmd:view.navigator`, `crates/ui-egui/src/panels/detail.rs` | shown while zoomed (bottom right); click/drag pans |