LightCraft: An open-source non-destructive photo editor written by scratch in pure Rust
Merge PR #2506: Edit Capture Time leaves a capture time it can't fully read
francoisgn77f313a0f2f7
diff --cc crates/ui-egui/src/lib.rsindex 42277581f,d609b917c..17154f4b0--- a/crates/ui-egui/src/lib.rs+++ b/crates/ui-egui/src/lib.rs@@@ -68,8 -65,8 +68,10 @@@ mod tests_button#[cfg(test)]mod tests_canvas_keys;#[cfg(test)]+mod tests_canvas_pan;+#[cfg(test)]+ mod tests_capture_time;+ #[cfg(test)]mod tests_compare;#[cfg(test)]mod tests_copy_paste_dialogs;diff --cc docs/parity-checklist.mdindex 912a05e86,6baa5e6c0..41faea38d--- a/docs/parity-checklist.md+++ b/docs/parity-checklist.md@@@ -113,10 -113,10 +113,10 @@@ differences and missing bindings are i| LR-LIB-REMOVE-ALBUM | Remove from album | P0 | ✅ | `cmd:album.removePhotos`, `crates/engine/src/tests_album_remove.rs`, `crates/ui-egui/src/tests_album_remove.rs` | changes the album only: the photos stay in the library, their library folder and their folder on disk (issue #1805); `id` defaults to the album on screen; returns `{removed, album}`. In a normal album ⌫ removes from the album (as in Lightroom; no confirmation, one undo step), in a smart album it changes nothing and says to edit its rules || LR-LIB-DUPLICATE | Duplicate a photo | P2 | ✅ | `cmd:photo.duplicate` | Photo ▸ Duplicate: a real `-copy` file with the same settings, metadata and albums (virtual copies share the file) || LR-LIB-RENAME | Batch rename | P1 | ✅ | `cmd:photo.rename`, `cmd:photo.renamePreview`, `cmd:photo.renameTokens`, `cmd:dialog.rename`, `crates/engine/src/rename.rs` (`TOKENS`) | template tokens {name} {num} {seq:N} {date:%Y%m%d} {folder} {camera} {lens} {iso} {rating} {title} {creator} {ext} (shared with export naming and import rename); a Tags picker beside every template field (Rename Photos, import Rename, export File name) lists each tag with meaning + live example, the date directives and the rules, and inserts the clicked tag at the text cursor; unknown tags are flagged; preview; renames files on disk with their XMP sidecars (a stem sidecar another file still shares, e.g. raw + JPEG, is copied rather than taken), never overwriting (-1, -2… suffixes; a change of letter case only is checked by file identity, so on case-sensitive volumes `img_1.jpg` next to `IMG_1.JPG` is a collision), rolls back on failure (a file that can't be moved back is reported old → new and the library follows it as an undoable partial rename; the same for undo/redo); undo/redo move the files; virtual copies follow |- | LR-LIB-CAPTURETIME | Edit capture time | P1 | ✅ | `cmd:photo.setCaptureTime`, `cmd:dialog.captureTime`, `crates/catalog/src/dates.rs` | set (the other selected photos shift by the same amount, or `each`), shift by days/hours/minutes, time-zone shift; one undo step, journaled; Info panel button; no “revert to original capture time”. Impossible calendar dates cannot anchor relative shifts; rejection preserves metadata, selection, Undo and Redo. |+ | LR-LIB-CAPTURETIME | Edit capture time | P1 | ✅ | `cmd:photo.setCaptureTime`, `cmd:dialog.captureTime`, `crates/catalog/src/dates.rs` | set (the other selected photos shift by the same amount, or `each`), shift by days/hours/minutes, time-zone shift; one undo step, journaled; Info panel button; no “revert to original capture time”. Impossible calendar dates cannot anchor relative shifts; rejection preserves metadata, selection, Undo and Redo. A capture time that doesn't fully read (cut short, or text after it) is left as it is and counted (`unreadable`); it can't anchor a set that moves other photos, and set alone repairs it. || LR-LIB-SHOWFINDER | Reveal original in file manager | P0 | ✅ | `cmd:app.showInFinder` | ⌘R (see MENU-FILE-SHOWFINDER) || LR-LIB-COVER | Album cover | P2 | ✅ | `cmd:album.setCover` | |-| LR-LIB-CULL | Assisted culling | P2 | 🟡 | `cmd:photo.analyze`, `cmd:dialog.cull`, `crates/pipeline/src/cull.rs` | Photo ▸ Assisted Culling…: focus score (0–100), clipping, burst grouping (look-alike shots within 10 s) with the sharpest marked; reject below a focus score, pick each burst's best; classical measures — no eyes-closed / expression detection |+| LR-LIB-CULL | Assisted culling | P2 | 🟡 | `cmd:photo.analyze`, `cmd:dialog.cull`, `crates/pipeline/src/cull.rs` | Photo ▸ Assisted Culling…: focus score (0–100), clipping, burst grouping (look-alike shots within 10 s, both limits adjustable in the dialog and as `burstGap` / `similarity`, #2275) with the sharpest marked; reject below a focus score, pick each burst's best; classical measures — no eyes-closed / expression detection || LR-LIB-ACTIVITY | Comments & likes | OOS | 🚫 | | || LR-LIB-QUICKCOLL | Quick collection [Classic] | P2 | ✅ | `cmd:album.toggleTarget`, `cmd:album.clearQuick` | B in the grids || LR-LIB-VIRTUALCOPY | Virtual copies [Classic] | P1 | ✅ | `cmd:photo.virtualCopy`, `cmd:photo.delete`, `crates/engine/src/cmd/organize.rs` | “Copy N” badge, stacked with the original, same albums, no XMP writes; deleting a copy dissolves or renumbers the stack (#1493); no “Set Copy as Master” |@@@ -803,27 -797,11 +803,28 @@@ Latin stays upright. Advanced Japanese| Date | Change | Summary ||---|---|---|+| 2026-10-22 | minor | LR-VIEW-INFOOVERLAY: the info overlay shows the star rating and flag, and in the full-screen preview on macOS it starts below the window controls (issue #2460); status unchanged |+| 2026-10-22 | patch | KEY-GRID: both grid rows in View show the cycle shortcut and follow keymap changes; direct bindings and native accelerator ownership are preserved (#2500); status and counts unchanged |+| 2026-10-22 | minor | LRC-PRINT-LAYOUT: the Japanese photo and postcard paper sizes (L判, 2L判, KG判, はがき, 往復はがき, 六切, 四切, 名刺) are selectable in the page setup and Print dialog and print to PDF at their metric sizes |+| 2026-10-21 | patch | LR-IMP-ADD-DIALOG: reconcile #2362 with current main; deleted-album guard and hierarchical picker retained; counts unchanged |+| 2026-10-20 | minor | LR-IMP-ADD-DIALOG: #2362 gives the import review the shared hierarchy/search album picker while retaining None/New album and existing destination IDs; status and feature counts unchanged |+| 2026-10-21 | patch | KEY-SLIDER-NUDGE: vertical wheel nudges need a click or drag in the slider's row; leaving it (even between two frames) or Tab focus alone does not arm them (issue #1355); status unchanged |+| 2026-10-21 | minor | KEYC-PANELS: F8 shows / hides the right panel (`view.rightPanel`), with F6 / F7 already bound; ⬜ → 🟡 |+| 2026-10-20 | minor | LR-PRE-PANEL: the preset applied to a photo is marked again (with its Amount slider) on returning to the photo, until the photo is edited further (#2392); status unchanged (✅) |+| 2026-10-20 | minor | LR-MASK-OVERLAY: creating, picking, duplicating or adding to a mask shows the overlay a mask slider hid (#1800); status unchanged (✅) |+| 2026-10-20 | patch | LRC-LIB-COMPARE, LR-VIEW-SURVEY: in Compare and Survey the Info panel's stars and colour labels and the Set Color Label menu act on the active photo only (they labelled the whole selection), and the panes show the colour label (#2398); statuses unchanged |+ | 2026-10-21 | patch | LR-LIB-CAPTURETIME: a capture time that doesn't fully read is left as it is and counted (`unreadable`) instead of shifted into a wrong one; it can't anchor a set that moves other photos; status unchanged || 2026-10-20 | patch | LR-VIEW-ZOOM: the 20 ms rule clears a slow-drag verdict only on a drag timed at full size; a drag that drafts small leaves it unchanged, as the code does; status unchanged |+| 2026-10-19 | patch | LR-CROP-RECT: on a straightened photo a moved crop slides along the tilted edges, so a box that fills the photo's height reaches its sides (#2299); status unchanged || 2026-10-19 | patch | LR-VIEW-ZOOM: the slow slider-drag verdict is described as per photo and control, as the code keys it; status unchanged |+| 2026-10-18 | patch | LR-META-XMP: Lightroom's profile and version bookkeeping (`CompatibleVersion`, profile digests, lens profile identity, `CropConstrainToUnitSquare`, default-strength lens profile scales) is no longer reported as unimported XMP; status unchanged (✅) |+| 2026-10-19 | minor | LR-CROP-ASPECT: Lock Aspect Ratio is its own row in Help ▸ Keyboard Shortcuts (`crop.lockAspect`, default A, sharing A with Visualize Spots as a contextual pair); statuses unchanged (✅) (`tests_keymap` `lock_aspect_ratio_is_a_listed_row_on_a`, `a_is_the_aspect_lock_under_crop_and_visualize_spots_elsewhere`) || 2026-10-15 | minor | LR-VIEW-ZOOM: a slow slider-drag verdict needs two drags over 20 ms and expires after 30 s (doubling to 240 s); hidden-window frame times are ignored; the slow set forgets its oldest entry, not all (issue #330); status unchanged || 2026-10-15 | minor | LR-BEHAV-BG-TASKS: Reload from Disk reads its files on a worker thread with a cancellable activity row instead of freezing the window on a selection of raws; its result is committed through the command wrapper (XMP sidecars auto-written as before) and an older reload finishing late no longer overwrites a newer one; status unchanged (✅) |+| 2026-10-19 | patch | LR-LIB-STACK: the filmstrip's stack badge expands / collapses the stack like the grid's, and a badge click works on a stack that isn't selected (it is selected first). Statuses and feature counts unchanged. |+| 2026-10-14 | minor | LR-VIEW-ZOOM: Visualize Spots, Point Color range and Visualize HDR render zoom windows; LRC-DEV-SOFTPROOF: output-space proofs on the GPU |+| 2026-10-19 | patch | LR-LIB-RATING: a rating, flag or label that takes the active photo out of the view makes the photo after it active instead of leaving an unseen photo active (→ then went to the view's first photo), and Shift / Auto Advance doesn't step past it (#2312); status unchanged (✅) |+| 2026-10-19 | patch | LR-LIB-CULL: Assisted Culling's burst gap and similarity are adjustable (dialog, `photo.analyze` `burstGap` / `similarity`; #2275). Statuses and feature counts unchanged. || 2026-10-14 | patch | LR-EXP-TYPE: opaque 8-bit PNG/TIFF/WebP use RGB; transparent exports retain alpha (#1670). Statuses and feature counts unchanged. || 2026-10-15 | minor | LRC-PRINT-PAGE: Page Options (Page Numbers, Page Info, Crop Marks) on Single Image and Contact Sheet pages, in the Print dialog, `print.set` and templates; still 🟡 (no identity plate, watermark, photo info or Cut Guides) || 2026-10-15 | minor | LR-IMP-FORMATS: Hasselblad 3FR and FFF show their uncompressed RGB preview (no JPEG in these files) in the grid and loupe until developed, and as the stand-in when a file fails to decode; status unchanged (🟡) |diff --cc docs/whats-new.mdindex 4cfe54ee9,46dff342a..d0a395e71--- a/docs/whats-new.md+++ b/docs/whats-new.md@@@ -1,92 -1,14 +1,101 @@@# What's new in LightCraft+## 2026-10-22++### Find the grid shortcut in View+- Photo Grid and Square Grid now show the grid-cycle shortcut (G by default) in the View menu. The hints follow+ shortcut changes; clicking a menu row still selects that grid (issue #2500).++## 2026-10-21++### Settings window+- Settings is one size on every tab and stays where it is as you go through them; before, each tab made its own+ size and the tabs moved under the pointer. The tabs stay in place while a long page scrolls (in a very short+ LightCraft window, where the page has too little room to scroll by itself, the tabs and the page scroll together), a+ page that goes on below shows a scroll handle without the pointer on it, and each page remembers where it was+ scrolled to, also when Settings is closed and opened again.+- Nothing in Settings runs off the side any more. A row with more choices than fit (the languages on General) wraps+ onto further lines and a long label wraps in its column, where both used to widen the window: in a small+ LightCraft window the labels and the Close button of General ended up off screen.+- The Slideshow tab is one column like the other tabs, with the slide preview first, instead of a column beside the+ preview that made Settings much wider on that tab. The preview stays above the page while it scrolls, so pointing+ at a template further down still shows it there (in a very short window it scrolls with the page instead). Pointing+ at a template no longer pushes its rows out from under the pointer, and the Export buttons wrap.+- A long folder (General ▸ Library ▸ Location, the folder Auto Import watches, the smart previews folder, a monitor+ profile's file) is shortened to its last folders ("…/Pictures/Library") on one line; rest the pointer on it for+ the whole path.+### One star rating control+- The stars in the bottom bar, the Info panel and the filter bar are now one shared control, and the badges on grid+ cells, filmstrip thumbnails and the Compare caption use the same drawing. Hovering a star in the filter bar now+ previews the rating like the others do, and with a star focused (Tab), ← and → lower and raise the rating.+### Progress looks the same everywhere+- Download, scan, denoise and activity progress now use one bar that fills the width it is given, with its text on+ it, and a gentle sweep while the amount of work isn't known yet. Waits that only said "Selecting…", "Waiting to+ start…" or "Installing…" now show a small turning arc beside the text, and a thumbnail still being made shows a+ quiet placeholder that fits the theme in the grid, the filmstrip and Compare. Screen readers hear a progress+ indicator with its percentage.+### Menu names that say what they are+- Switches in the menus are named for what they show, with the check mark saying whether it is on: Filmstrip ✓,+ Focus Point ✓, Clipping ✓, Photo Counts ✓, Mask Overlay ✓ instead of Show Focus Point ✓. No two commands share a+ name any more: View ▸ Detail is now Detail View (the Edit section Detail keeps its name), Window ▸ Edit is Edit+ Panel, and Compare Before and After is Before/After Side by Side, next to Split and Top/Bottom.+- The preview cache command has one name, Discard Preview Cache, in File ▸ Previews and in the toast that confirms+ it. Keyboard shortcuts are unchanged.++### Sharper resampling in HDR and panorama merges+- Merged photos (HDR and panorama) are resampled with a sharper filter (Lanczos-3 instead of bilinear). Moving a+ photo by half a pixel used to lose a third of its finest detail; now it keeps most of it, without halos around+ hard edges such as clipped highlights.++### Scrolling past editing sliders+- Leaving a selected slider disarms its vertical mouse-wheel adjustment (issue #1355), even when the pointer leaves+ and comes back between two screen updates. Scrolling back over it now scrolls the panel instead of unexpectedly+ changing the photo. Click or drag the slider again to adjust it with the vertical wheel; keyboard arrow+ adjustments and an ongoing drag still work. A slider reached with Tab takes the arrow keys but not the wheel:+ click it to scroll-adjust it. Sideways scrolling still adjusts the slider under the pointer without selecting it+ first.++### A pinch no longer re-renders the photo at every zoom step+- Pinching the loupe now keeps the size the fit view is rendered at until the gesture is quiet, as it already did for+ the render sizes and windows. Before, each frame of a pinch asked for a new full-frame render at a new size.++### Fujifilm lens corrections that match the camera+- X-T4 raws now read the lens's own distortion and vignetting tables the way the camera does. Many photos from zoom+ lenses got no distortion correction at all (more than half of those checked from the XF16-55 and XF70-300), and+ corners came out up to 6.5 % brighter than in the camera's JPEG. The corrected photo now lines up with the camera's+ framing. Other recent Fujifilm bodies whose tables have nine knots are read the same way, but only the X-T4 was+ measured. Thumbnails are redrawn when the library next shows them.++### Reference view reliability+- Escape now leaves Reference for Detail without changing the active photo or its edits; the next+ Escape returns to the grid. A dialog, tool or Lights Out still handles Escape first.+- Opening or creating a different library clears the pinned reference. Photo IDs belong to one+ catalog; a pin no longer silently becomes another library's photo with the same numeric ID.+- Missing or Recently Deleted photos cannot be pinned. Deleting the pinned reference stops drawing+ it; re-entering Reference chooses a live photo, and restoring the deleted photo makes it pinnable again.+ In Recently Deleted, Set as Reference Photo is greyed out, and a refusal says to restore the photo.+- Switching library from Reference view goes to the grid instead of an empty Reference canvas. A refused+ or failed switch keeps both the reference and the Compare pair.+- `photo.setReference` refuses an `id` that is not a photo id (a string, a negative or fractional+ number) instead of pinning the active photo; only an absent or null `id` means the active photo.++## 2026-10-20++### Smart albums check File Path rules faster+- A smart album rule on File Path (contains, doesn't contain, is, isn't, starts with, ends with, is empty, isn't+ empty) no longer builds new text for every photo. On a synthetic library of 312,000 photos, a File Path "contains"+ or "doesn't contain" rule took about 17 ms per pass instead of about 62 ms, around 3.5 times faster, with the same+ photos matched; about 6 ms of that is only reading the paths. Paths and rule text with letters beyond A–Z are+ compared as before.+ ## 2026-10-21++ ### Edit Capture Time leaves a capture time it can't read as it was+ - A capture time that is cut short, has seconds that aren't digits or has text after it (a Lightroom catalog's capture+ time is copied as it is) is no longer shifted into a clean-looking wrong time: Edit Capture Time leaves the photo as+ it was and says so, and its preview says the photo's time can't be read instead of previewing a wrong one.+ `photo.setCaptureTime` counts those photos as `unreadable`. Set date & time still repairs such a photo selected on+ its own; with other photos selected it says why it can't move them by the same amount. When the dialog can't make a+ change (a time that isn't a date, a shift past year 9999), it now says why and stays open, instead of closing.## 2026-10-19