mirror of
https://github.com/storytold/lightcraft.git
synced 2026-11-28 09:19:25 +01:00
c35efabd41bd16426946eecc117b20ebcd2ebecd
285
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
0429844cd9 |
never-crash: deny the panic lints in every crate root; GPU asserts become fail paths (#2137) (#2170)
* never-crash: deny the panic lints in every crate root; GPU asserts become fail paths (#2137) The never-crash policy was documented but not machine-checked for the two largest crates: engine and meta carried only #![forbid(unsafe_code)], so a future unwrap/expect/panic would pass cargo xtask ci. Both crate roots now also carry as does xtask (previously un-annotated); the guarded expects in meta/src/xmp.rs and xtask's parity.rs / root() now use the documented #[allow(clippy::expect_used)] + invariant form. crates/gpu: the three production asserts become fail(FailKind::Fatal, ..) + return, so a binding-count mismatch, an over-long readback, or a wrong-length curve fails the render over to the CPU instead of crashing (finish_and_read also early-returns on len == 0, which would have issued a zero-size copy_buffer_to_buffer that wgpu rejects). xtask: new roots check (in ci) verifies every workspace lib root and every binary main.rs carries both attributes; crates/sysmem is the documented exception for forbid(unsafe_code) only. A panic in placement or readback is a fail, not a crash. * audit fixes: roots covers binary and cdylib/rlib roots; render gates on failed() after finish_block (#2137) Two reviewers audited the first commit; both highs it found are fixed here: - roots scanner: the by_ref().any()/any() pair consumed the kind iterator hunting for "lib", so every bin-only root (both app mains, the sam3-worker bin, xtask itself) and the cdylib/rlib web root was silently unchecked — the check covered 29 of the 33 real roots. Kind detection now collects the kinds once and matches lib/rlib/dylib/cdylib/staticlib, with a root_paths regression test over bin, lib and cdylib/rlib targets; unreadable root files now fail with the I/O error instead of a fake policy violation. - render.rs: the caller gates on failed() right after finish_block, so the malformed-curve fail path can no longer reach the band loop's p[y0_at] index on the empty block. - finish_and_read: the len == 0 path now submits the encoder before returning zeros, so a failure staged in the same render stays detectable (the old zero-size copy failed loudly via the error scopes; a bare return would have hidden it). - docs: finish_block and finish_and_read state their failure contracts; USAGE and AGENTS.md name the new roots step in the ci enumeration. * xtask: check a library root at the source path that cargo metadata reports The roots check read src/lib.rs for every library target, so a package that sets its library path was checked on the wrong file. Libraries now use the reported source path, with the same default as binaries when none is given. * xtask: match the crate-root deny lints by whole name, ignoring a trailing comment A lint named only in a trailing comment, or a lint whose name contains another (clippy::panic inside clippy::panic_in_result_fn), satisfied the deny check. Lint names are now compared whole and a trailing comment is ignored. * xtask: read the crate-root attributes from the header, not a fixed 30 lines The roots check read only the first 30 lines of each crate root, so a root whose attributes came after a longer doc header was reported as missing them. The check now reads the inner attributes at the top of the file: it skips blank lines and comments, reads each attribute whole, and stops at the first item. A multi-line list is read in full and a commented-out attribute does not count. * xtask: reword two comments in the roots check Comments only: the lint-name match and the source-path default are described without naming a lint or a build tool. No code changes. * xtask: report a root attribute that overrides the required denies * xtask: accept a runtime manifest dir only when it has a parent * xtask: render the overridden deny attribute without literal braces The write! escaped the braces around the substituted attribute and lint, so the violation printed `#![{allow}({clippy::panic})]`; assert the rendered message in the allow-override test. * Tests: new test helpers meet the crate-root panic lints Main added test helpers after this branch; the deny at the crate root now applies to them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * roots: crates/wincolor is the second crate allowed unsafe Main added it for the Windows colour APIs after this branch; its module docs already say so. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: eliets2 <287273517+eliets2@users.noreply.github.com> Co-authored-by: FredApps <153173854+FredApps@users.noreply.github.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
d729c80a5a |
Detail: Remove Hot Pixels, on for newly imported raws (#1345) (#1350)
* WIP: suppress isolated hot photosites in the raw mosaic (#820) Noise model fitted to the image, candidates 5 sigma above every same-colour neighbour, kept when two or more direct neighbours are lit (real light); adjacent hot pairs are replaced too. LIGHTCRAFT_HOT_PIXELS=0 turns it off, LIGHTCRAFT_HP_DEBUG=1 prints statistics. Renders are cached apart from older ones. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * WIP: hot pixel suppression off by default (LIGHTCRAFT_HOT_PIXELS=1 turns it on) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * #1345: mosaic outlier filter: cache key no longer names the #858 comparison switch (merged upstream) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * #1345: mosaic outlier filter: fixed thresholds (no LIGHTCRAFT_HP_K / _SPOT knobs), statistics under LIGHTCRAFT_PROFILE Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * #1345: Remove Hot Pixels, a box in Detail ▸ Noise Reduction, on for newly imported raws `Detail::nr_outliers` replaces single outlier photosites in the raw mosaic before demosaicing. It is true in `DevelopSettings::for_raw` and false by default, so edits saved before the box existed keep their look. The loaders take the flag (no more `LIGHTCRAFT_HOT_PIXELS`), a decoded source records it, and a cached raw source decoded with the other setting is decoded again. The box shows for raws only (`check:detail.nrOutliers`). * #1345: Remove Hot Pixels off keeps old settings' JSON; smart previews fit either setting - `detail.nr_outliers` is left out of the stored JSON when off, so settings saved before it keep their hash and cached thumbnails. Copy / paste, presets (also at an amount), preset updates and Auto Sync work on `DevelopSettings::to_json_for_merge`, which states it, so turning the box off still carries over. - `DecodedSource::fits_outliers` accepts a smart preview (`from_proxy`): it has no mosaic, so an offline raw with the box on keeps reusing the decoded proxy. (review of #1350) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * #1345: the Detail eye and Reset Detail switch Remove Hot Pixels off `DevelopSettings::removes_hot_pixels` (the box and the Detail section's eye) decides the raw decode in the app, the web worker and the thumbnail bench, so a Detail section that is off contributes nothing here either. Reset Detail resets the box to the general default (off), like the sliders it resets. (review of #1350) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * #1345: the hot pixel limit counts only replaced photosites, and can be set The 0.2 % limit was checked against the candidates before real light was filtered out, so a dense star field reached it with its stars alone and kept its hot pixels too. It now counts the photosites that would be replaced, as the module docs say. The limit is now a parameter (RawImage::suppress_hot_pixels_with, default HOT_PIXEL_MAX_SHARE) and a setting: Settings > Performance > Hot pixel limit, applied with the new command app.hotPixelLimit. Changing it forgets the decoded sources and changes the render cache keys of photos that remove hot pixels; at the default every key stays as it was. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * #1345: the app's default hot pixel limit is the default The setting is an f32: 0.2 % read back as 0.2000000029… % was a new limit, so every start forgot the decoded sources and changed the render keys of photos that remove hot pixels. A value within a millionth of the default now is the default. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Format the imports * Web loader test states what it decodes with * Format the media exports --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: FredApps <153173854+FredApps@users.noreply.github.com> |
||
|
|
61005f3dc1 |
Culling: the loupe uses built previews; photos prepared ahead and in the background (#3077)
* PERF-CULL-0: ui.inspect reports how the loupe showed each photo it was stepped to
perf.loupeSteps records, per step, the ms from the step to the first frame
with anything of the photo, with a full-size picture (camera JPEG, cached
or rendered) and with LightCraft's own render, measured on the frames the
app draws, so culling benchmarks exclude the control channel's round trip.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit 95f0343848fc0a238f80f07ceb292eaf6779aeaa)
* PERF-CULL-1: browsing a folder shows its first photos within a second
The Local view read and hashed every file of the folder before showing any
of them (2,933 EOS R5 C CR3s: 30.6 s to the first photo). It now hands the
files the library lacks straight to the import, ordered the way the view
sorts them (file time for the date sorts), which adds them batch by batch:
first photo 0.9 s, twelve thumbnails 1.4 s, the whole folder in the same
~34 s as before, in the background.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit b766558e7ef4f802919a144da53e444f70e0186b)
* PERF-CULL-2: the loupe makes the next photos' camera previews ahead of the step
Culling steps through photos, and each step waited for the next raw's
embedded JPEG to be read and decoded (p50 187 ms, p95 332 ms on EOS R5 C
CR3s) and then for a full raw develop. Now:
- the loupe's stand-ins for the next five photos in the direction of
travel and the one behind are made ahead (Slot::QuickAhead, priority
just below the loupe's own render) and taken over at the step, so a
step shows the camera JPEG at once (p50 0 ms);
- a slot keeps its photo while the photo stays wanted, so photos that
shift places as the user steps are not made twice;
- decoded camera JPEGs stay in the memory LRU (never on disk), so going
back shows them again without a decode;
- while an arrow key is held (a photo left within 0.25 s), the raw
develop waits until the photo has stayed 0.12 s, and a render queued
for a photo already left is dropped, so the workers make the previews
instead of renders nobody sees.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit 0430b95636d2b6adce8887af7b9464687c95549e)
* PERF-CULL-3: CR3 previews take the smallest embedded JPEG that covers the view; plain sRGB JPEGs decode straight to 8-bit
Upstream's embedded_preview_covering (
|
||
|
|
8972565249 |
LR-PROF-IMPORT: import the user's own DNG camera profiles (.dcp) (#1063)
* LR-PROF-IMPORT: import the user's own DNG camera profiles (.dcp)
profile.import (File > Import Profiles & Presets, drag & drop) now also
reads DNG Camera Profiles: the user's own .dcp files, e.g. made with a
colour-checker tool. They appear in the profile browser and menu under
Camera Profiles with dcp:<camera>-<file> ids; profiles.camera lists them
and profile.deleteCamera / profile.deleteImported remove them. A library
on disk keeps a copy in Profiles/. No profile ships with the app and the
repository holds none: tests build theirs in memory (write_dcp).
lightcraft_raw::dcp parses the file per DNG spec ch. 6 (magic RC in
place of 42; IFD 0 read through the existing DNG colour builders) and
DcpProfile::applied_to puts its matrices, illuminants and look in place
of a raw file's, keeping the shot's white balance, analog balance and
baseline exposure.
Choosing one (develop.profile) replaces the raw file's colour model when
it is decoded, before the starting colour and the white-balance scale
(WbScaleOf) are worked out, so the matrix path takes over from the fitted
JPEG look (CR3/CR2/ARW...) and white balance follows the profile. A
profile without a tone curve of its own (most chart-made ones) keeps the
photo's contrast: the DNG's tone curve, else the tone of the camera-JPEG
fit. The profile travels with SourceRef::File into FileLoader /
PairLoader (new Option<&DcpProfile> argument); a decoded source records
the profile it was made with and is not reused for another. Smart
previews and the web render worker keep the file's own colour; rendered
(non-raw) photos ignore it.
This reverses the documented "Adobe profile formats deliberately
unsupported" stance for user-supplied files only; docs updated.
Split out of #1012.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* LR-PROF-IMPORT: build against upstream main (kelvin_presets, 3-arg loaders)
DcpProfile::applied_to keeps the file's white-balance presets (new
ColorData::kelvin_presets upstream): they are camera facts like as-shot
neutral. Upstream's new FileLoader test closures take the profile argument.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* LR-PROF-IMPORT: hover previews and browser thumbnails develop the hovered camera profile
The loupe's hover preview (preview_job) and the profile browser's thumbnails (variant_job) took
the photo's own decoded source, so hovering an imported camera profile showed the built-in colour
(and hovering a built-in profile while one was applied kept the camera profile's). Both now decode
as the hovered settings develop: the source follows the settings' camera profile, as the main
render does, and a variant's cache key already follows its settings.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* LR-PROF-IMPORT: build against upstream main (face-tile test loader and render_bench take the camera profile)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* CI: the catalog's staging-link test module is Unix-only (unused import broke clippy on Windows)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* CI: same-folder export test expects the '/'-joined subfolder (failed on Windows)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* CI: folder-drop tests build widget ids with the Folders tree's '/' paths (failed on Windows)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* LR-PROF-IMPORT: rustfmt after merging main
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* LR-PROF-IMPORT: a real D750 camera profile as a pinned test corpus, checked against Lightroom
dieli's CC0 Nikon D750 ColorChecker set (Calibrite PROFILER dual-illuminant DCP,
matrix-only; the two chart NEFs; Lightroom Classic 15.6 renders with the profile)
is fetched by cargo xtask corpus --download into corpus/d750-colorchecker/, pinned
to commit f37f4054 and by sha256; nothing is committed.
Tests (skip without the corpus): the profile parses as matrix-only with
Cool White Fluorescent + D55; the matrices blend by inverse temperature; the
matrix-only path inverts the colour matrix and adapts to D50; it takes over the
chart NEFs' colour; imported and applied end to end, the charts develop within
mean dE2000 3.84 (flash) / 3.35 (indoor) of Lightroom's renders.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* LR-PROF-IMPORT: a single .dcp file is a camera profile only, not also an unreadable LUT
profile.import read every plain file that was neither a folder nor a .zip as a .cube LUT, so importing
one .dcp imported the camera profile and also reported it as failed ("stream did not contain valid
UTF-8"). Only .cube files are read as LUTs now.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* LR-PROF-IMPORT: review fixes for imported camera profiles
- A library moved or restored elsewhere finds its camera profiles in its own Profiles/ folder.
- A grid thumbnail is cut from the decoded preview only when that preview used the same camera profile.
- Render and source cache keys carry a fingerprint of the profile file, so a deleted or replaced profile never
has its old renders stand in.
- Camera profiles can be favourites, and favourites/recent entries survive reopening the library.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* LR-PROF-IMPORT: smart previews without the camera profile, current-profile source facts, unsupported files reported
CodeRabbit review of
|
||
|
|
67782d8f65 |
Auto Sync: As Shot, Auto and Temp apply to each selected photo's own white balance (#3571)
* LRC-DEV-AUTOSYNC: Auto Sync carries white balance as a mode or on each photo's own scale: As Shot and Auto per photo, a Temp move keeps each photo's tint (N-A3, note 18) Auto Sync already sets every other setting to the active photo's number. White balance is the exception: main stores the resolved Kelvin and tint with the mode, and Auto Sync copied those numbers. As Shot then gave every selected photo the active photo's camera white, Auto gave them the active photo's Auto white, a Temp move from As Shot gave them the active photo's tint too, and a JPEG beside a raw got the raw's Kelvin read on its own scale. Now (sync_same.rs) the mode goes on each photo and each applies it to itself: As Shot its own camera white, Auto its own white worked out on its own pixels, a light preset its numbers. A typed or dragged Temp or Tint sets the same Kelvin on every raw (an old relative-scale value converted first) and only the slider that moved, and a photo on another scale moves by as much as the active one did. One undo step, as before. Tests (tests/autosync_wb.rs): As Shot / Tungsten / Auto per photo with three different as-shot whites and undo; a typed and a dragged Temp keep each photo's tint; the old relative scale; a JPEG beside a raw. Three of the four fail on main. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * LRC-DEV-AUTOSYNC: Auto's per-photo pixels are read in parallel; the row says which sync does what Review of #3571: - When Auto is synced, the other selected photos' thumbnails that aren't in memory are now decoded in parallel (one per core), not one after another on the UI thread. - The checklist row says the per-photo white balance belongs to Auto Sync, while Sync Settings copies the active photo's stored one. - The row and the test notes now say a Temp is the same number only on a photo of the same scale, and that other photos move by as much as the active photo did. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * LRC-DEV-AUTOSYNC: Auto's per-photo pixels are read a core's worth at a time, each with its decoder's facts Review of #3571: - A large selection no longer holds every decoded thumbnail at once. They are decoded in batches of one per core (at most 16), and each batch's white balance is worked out before the next is decoded. - Each photo's Auto uses the facts its own decoder gave, read right after its source is cached, so a photo pushed out of the cache by later ones never falls back to catalog metadata. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * LRC-DEV-AUTOSYNC: a light preset with a tint of its own on a JPEG carries that tint; Auto's facts are read before the cache can evict them (review of #3585) - On the relative scale the stored numbers are what renders, so a preset the active photo overrides (`develop.wb {mode, tint}`) travels as its numbers, like Custom, not as the preset's tint. - `sources_now` reads each photo's decoder facts before storing the decoded source: the cache's budget may evict that entry at once, and the header facts alone lack the camera colour Auto uses. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: FredApps <153173854+FredApps@users.noreply.github.com> |
||
|
|
2ddb43896b |
PERF-STEP-STALL: stepping and flagging never wait for the drive, and no change is ever dropped (#3557)
* PERF-STEP-STALL: stepping and flagging never wait for the drive; the catalog log is written and synced by its own thread, and nothing handed to it is ever dropped On Windows a write to the catalog log waited for a sync of the same file in flight, and each flag, rating or step synced on the UI thread, so culling on a busy drive froze the window. FsStore now hands log appends to a thread that writes and syncs them in order, batching what arrives during a sync. No change is lost: the thread keeps every byte it has not yet synced. A write or sync that fails is held and retried (cutting any fragment first), later appends are refused with the reason (the engine keeps them queued, as for any failed save), the held records count as unsaved so the quit prompt warns, and a snapshot is made due. Cuts, replaces and reads act on the logical log (synced bytes plus held ones), so the log never has a gap. A clean quit's closing snapshot holds everything; dropping the store waits for the thread. Tests drive a slow drive (a sync hook that sleeps) and a failing one through test-only fault hooks (doc-hidden, keyed by library folder): with 300 ms syncs the slowest flag is 0.2 ms (305 ms with the log written on the caller, as before); every change made during slow saves reopens after a flush, a drop and a close; a failed write is reported, retried and lands with no gap. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * PERF-STEP-STALL: review fixes: a reopen reads what the log thread was handed, the quit check reads the held status now, a covering snapshot clears it, a cut to the synced length reaches the file - open_stores flushes the old journal's log thread before the same library's files are read again (Settings, Libraries; a reopen). - Session::refresh_unsaved, called by the quit check, reads what the log thread holds at that moment, not as of the last frame. - Journal::unwritten is None once a snapshot holds every op (the closing snapshot after a failed log reset no longer makes the quit prompt say changes would be lost); wants_snapshot follows it. - A cut to exactly the synced length with bytes held cuts the file, so bytes a failed sync left there never come back on the next open. - A caller that waits over a minute for the drive gets a timed-out error, not "the writer stopped". Each fix has a test that fails without it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * PERF-STEP-STALL: a reopen and the quit check wait for what the log thread was handed Review of #3557: - Opening the same library again while its log thread can't write what it was handed now fails and keeps the open library (with the held change, retried). Before, the new catalog was read from files missing it. - The quit check flushes the log thread first instead of reading only the failure it had already reported. A change accepted but not yet written, then failed, is saved by the closing snapshot before the window may close; if that fails too, the unsaved prompt shows. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * PERF-STEP-STALL: a reopen goes ahead when the snapshot already holds every change Review of #3557: the reopen was refused whenever the old log's flush failed. When a completed snapshot covers every op, nothing is missing from the files, so the open now goes ahead and only logs the error. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: FredApps <153173854+FredApps@users.noreply.github.com> |
||
|
|
9423635e8c | LR-EDIT-OPTICS-PROFILE: merge main (#3550 took catalog format 10; EmbeddedLens.source moves to format 11) | ||
|
|
749a63ba58 |
LR-MASK-GEOMETRY: review fixes: kept masks stay put and turn with a synced orientation, off-photo clicks refused
- develop_op attaches each old mask from the frame it was drawn on: a mask the photo keeps under its settings before the edit, a mask the edit brings in under the settings it came with (a preset that adds a mask and changes Transform no longer moves the kept one). - A sync or paste that changes the orientation (Crop group without Masks) turns the masks the photo keeps, as Rotate does; Rotate still turns them once. - mask.objectPoint refuses a click on an old Object mask that lands off the photo instead of moving it onto the photo's edge (a hair of rounding still counts as on it). - A linear gradient's guide is cut where the warp can't be undone, so no line joins a warped point to an unwarped one; a handle drag maps the pointer with the mask's live on_photo on the frame its interaction began. - Tests: kept vs brought-in masks, orientation change, off-photo click, pending clicks in mask coordinates (with a model build), guide runs, the detail-pass fallback takes the coarse selection. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
432fbed3d5 |
LR-MASK-GEOMETRY: review fixes: old masks keep their region and frame, clicks and handles in mask coordinates
CodeRabbit's review of #3550: - An old gradient goes onto the photo through the warp's local linear part: a radial's radii and angle, a linear's direction and width (the mean alpha error halves; the largest drops 3x). - Old masks an edit brings in (paste, sync, preset, history step, sidecar) go onto the photo from the settings they came with; masks an edit keeps, from the settings before it. - A click on an old Object mask attaches the mask and the click before the model reads them. - The handles and arrow keys read a mask after Begin Interaction attached it, so a drag never mixes frames; a linear gradient's guides are drawn through the warp. - A brush point the warp can't place lays no dab; a resampled zoomed-in pass takes the whole-photo selection past its own area; mapped boxes sample 16 points per edge. - The CPU and GPU geometry tests also cover a quarter turn. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
2ad7207127 |
LR-MASK-GEOMETRY: masks stay on the photo under lens corrections, Upright, Transform and Rotate
Mask coordinates lived on the corrected frame, so a Transform, Upright or lens-correction change moved the photo under them and the masked look stayed behind, offset from the person it was drawn on (4.3 px on a 240 px render under Vertical 25 + Rotate 4: about 100 px at 6000 px). Rotate Left / Right turned the crop but not the masks. A mask's coordinates are now on the photo before the warp (Mask::on_photo, catalog format 10): the CPU render, the GPU render, Auto Mask brush windows and the on-photo tools map them through the warp (Frame::for_mask, Warp::from_source). Rotate Left / Right turns masks with the photo (mask_space::turn). The AI models see the photo without lens corrections, Upright, Transform, crop or flips, so stored Object / Prompt selections stay on their content and changing those doesn't ask the model again. Older masks (no on_photo) render where they were and move onto the photo, without moving, at their next edit (mask_space::attach). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
29443e117c |
LR-EDIT-OPTICS-PROFILE: merge main (#3430 integration round 3, #3390)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
2cd071c722 |
LR-EDIT-OPTICS-PROFILE: the lens database is offered on first launch and downloads on request (#3073)
Nothing is fetched without the user's click. The first desktop start without a database (and without LIGHTCRAFT_LENSFUN_DIR) asks once, "Download lens profiles?", with the size added up from the pinned files, and Download / Not Now. Download starts the existing pinned download (activity row, cancel); Not Now (or Esc) fetches nothing and the app doesn't ask again. Settings > General > Lens profiles has a Download Lens Database button and a switch that turns the offer back on. The answer is kept in ui.json (lensDatabase: ask / accepted / declined; an unreadable value asks again), and lensfun_download::fetch_on_start is the one place that decides. The CLI and headless MCP never ask and never fetch. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
f267ddb504 |
LR-EDIT-OPTICS-PROFILE: pinned profiles, whole-folder install, shared hosts (review, #3073)
Render caches: a database lens profile is pinned to the photo. A decode never
overrides the catalog's database profile (media::source::pinned_lens), and
the profile is part of the render, thumbnail and variant cache keys
(media::quick::lens_key; only database profiles with the correction on, so
existing thumbnails keep their keys). When a download replaces the
database's files (lens_profiles::replaced), the refresh also re-reads raws
whose profile came from the database and raws that named no lens; an
ordinary start does not. library.refreshLensProfiles takes {all: true}.
Installation: files are staged beside the database folder, SOURCE.txt is
written there last, and the staged folder replaces the old one as a whole;
a failed swap puts the previous database back (and recover() does at the
next start). The app's own folder is read only with its marker, and
installed() checks every pinned file at its pinned size.
Shared hosts: with_default_lens_database() only selects the existing folder;
the permission to fetch is with_lens_auto_download() (desktop only), and the
first-start decision is one function, lensfun_download::fetch_on_start.
CLI render / merge and the headless MCP server select the folder;
lens.downloadDatabase selects the folder it downloads into.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
||
|
|
f619085609 |
LR-LIB-SMARTALBUM: the catalog refuses an edit that makes a smart album include itself
Session::commit now goes through Catalog::apply_new, which looks at what an op would do to which album tests which (AlbumGraph, foresee) before doing it, and refuses one that puts a smart album on a loop: alone, in a batch, or as a new album. Undo, redo, replay and opening a library still bring back what was, loops included. |
||
|
|
b3b792f74d |
LR-EDIT-OPTICS-PROFILE: merge main (file split)
Main split the app's main.rs, the engine and ui-egui tests and the frame loop into modules; the lens-database hunks now live in apps/lightcraft/src/session.rs, crates/ui-egui/src/app/frame.rs and crates/engine/src/tests/lens_refresh.rs. No behaviour change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
9cc8a1c765 | refactor(lightcraft-engine): move tests_*.rs to tests/ | ||
|
|
2ec4add0d6 |
LR-EDIT-OPTICS-PROFILE: lensfun database downloaded on first run, library looked up, Optics names the profile
- lensfun's data/db (CC BY-SA 3.0) is fetched by the desktop app on first run into <config dir>/lensfun, pinned to commit 43f9e001 by name, size and SHA-256, staged until every file is verified, with an activity row (never bundled). LIGHTCRAFT_LENSFUN_URL lists other mirrors; LIGHTCRAFT_LENSFUN_DIR still wins. lens.downloadDatabase / lens.databaseStatus for agents. - The database is read per folder and again after a download; when it changes, library raws without a profile whose lens it knows are probed in the background and get it (untouched photos switch the correction on as import would); ticking Enable Lens Corrections looks those photos up again (library.refreshLensProfiles). - EmbeddedLens records its source (file / lens database); the Optics panel says "Profile: <lens> (lens database)", "Profile: from the file" or "No lens profile found for <lens>." (13 locales). - Tests: pinned download and refusal of a wrong file, the lookup and its edited / untouched rules, and presets / Copy-Paste / Sync carrying only the switch and amounts, each photo keeping its own lens's profile. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> (cherry picked from commit 773740fbb22eb66e7f62bada9cb32b594b6ff4d7) |
||
|
|
3f1e5c21d6 |
Merge PR #2775
# Conflicts: # docs/gaps.md # docs/parity-checklist.md |
||
|
|
522ae832ec | fix: scope relative-date expiry to referenced albums | ||
|
|
18c56f03d4 | fix: expire relative-date view caches on minute change | ||
|
|
144d900c21 |
Merge upstream/main (integration batch 43, #2729, #2737, #2412) into round3a-integration
Conflicts: - apps/lightcraft/src/native_menu.rs: upstream's item swapping (macOS keys given up for real, Help menu not swapped, Settings / Quit tracked) with KEY-GRID's keymap-aware rows. `Item.label` stays the text the row shows (native_item_presentation), so `Item::native_label` reuses it instead of formatting it again; Settings / Quit store theirs through display_item_label, as upstream's native_label did. No early return after a rebuild (upstream). - crates/ui-egui/src/i18n.rs: upstream's tests (#2729: one test per check across languages, gaps reported, never a failure) plus the batch's two new ones (dropped-photos notice, Polish counts); production code as merged. - grid.rs, keyword_list.rs, masking.rs: the translation tests #2729 removed stay removed; the batch's new keyword and segmenter tests stay. - cmd/library.rs, ui-egui/src/lib.rs: both test modules, each with its #[cfg(test)]. - xtask/src/main.rs: #2302's test_selected and upstream's translation_gaps. - docs: tracker / gap rows take both sides' edits, headers list both sides' changes, history rows of both sides newest-first. What's New: one section per date, newest first (the batch had 10-22 above 10-23, and second 10-21 and 10-19 sections); no line lost. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
6c55a76e95 | LR-LIB-FILTER: Cmd+L / Ctrl+L (View > Enable Filters) switches the library filter off and on again as it was | ||
|
|
b20f55ba75 | Merge PR #2503: LRC-LIB-MISSING: the availability worker sweeps a list of fi | ||
|
|
727e66babe |
Merge track r2-t03 into next
# Conflicts: # docs/gaps.md # docs/parity-checklist.md # docs/ui-parity.md # docs/whats-new.md |
||
|
|
f4dd312eac |
Merge PR #2177: LRC-DEV-AUTOSYNC: sync HDR state while retaining per-photo tuning
crates/engine/src/lib.rs: keep both explicit comparison leaves (camera_local_tone and hdr). crates/engine/src/tests.rs: keep both sides' tests. |
||
|
|
81f304a867 | Merge PR #2208: LRC-DEV-AUTOSYNC: sync camera local tone Off | ||
|
|
6234a0c917 |
LRC-LIB-MISSING: the availability worker sweeps a list of files at low priority and gives way to file work
The availability worker that answers "is this file there?" for the grid and the Info panel can now also check a long list of files (every library photo's file, for the sidebar's Missing Photos count), without that list getting in the way: - Availability::sweep takes a list, checked one file at a time and only when nothing is asked; files checked less than 15 s ago are skipped, and one sweep runs at a time. The files found gone are kept (is_gone, gone_len), and gone_generation, which replaces generation, changes only when a file is found gone or back: a file found there at its first check changes nothing the Missing Photos view shows, and wakes nobody. - Availability::restart_sweeps / sweep_in drop what is left of a sweep when another library is opened, and refuse a list that was being made for the old one. - Availability::sweep_yields_to takes a callback; while it says file work is going on (an import, a scan, a folder listing), the worker starts no sweep check. What is asked is still answered at once, and the sweep goes on where it stopped, so a share is not asked for a stat of every file while a scan reads it: 32 readers got 101 files/s alone and 65 files/s with one stat loop beside them. Nothing in the app starts a sweep yet; the worker tests exercise it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
f32116bee1 |
Merge remote-tracking branch 'upstream/main' into fix/strict-ids-params
# Conflicts: # crates/engine/src/cmd/mask_effects.rs # crates/engine/src/cmd/masks.rs # crates/ui-egui/src/control.rs |
||
|
|
21903294bf |
Merge track r1-rawcat into next
crates/ui-egui/locales/{cs,it,pl}-formats.json: kept the translations and added the track's new keys.
docs/parity-checklist.md: newer header line; revision rows from both sides.
docs/whats-new.md: both tracks' 2026-10-15 entries.
|
||
|
|
6196ebb968 |
Merge PR #2280: #2253: crop ratios keep the orientation asked for
docs/parity-checklist.md: LR-CROP-ASPECT keeps #2253's orientation note and #991's fresh-crop lock docs/whats-new.md: 2026-10-18 entry placed between 2026-10-19 and 2026-10-15 |
||
|
|
0a27b0d804 |
Merge PR #1990: #1927: Constrain Crop tightens the stored crop
docs/whats-new.md: both entries kept, 2026-10-19 above 2026-10-15 |
||
|
|
42c7cc03a4 |
Commands: an id or ids that isn't a photo id is an error, not the selection
Several commands read their photo parameters leniently. An `ids` that wasn't a list of whole numbers (`"ids": 3`, `["3"]`) fell back to the selection or the active photo, and an `id` that wasn't a whole number (`"id": "5"`) fell back to the active photo, so a call meant for one photo acted on another: - ids: album.addPhotos / removePhotos / toggleTarget, library.select, develop.set, denoise.queue, faces.index, mask.applyEffect (mask ids) and app.export; - id: photo.relink (relinked the active photo to the file), photo.removeRegion / setRegion, faces.setName, stack.setTop / moveUp / moveDown / split, library.findSimilar, the photo queries, denoise.cancel (cancelled every photo) / status and ui.render. They now refuse such values with an error, as Session::targets already does for the other commands (shared cmd::photo_ids / photo_id). A missing or null value still means the selection or the active photo. |
||
|
|
81f02a6947 |
#2253: crop ratios keep the orientation asked for
set_aspect always turned the ratio to the image's orientation, so a Custom ratio taller than wide came out landscape on a landscape photo, and a ratio picked after X (crop.rotateAspect) turned the crop back. A named ratio now takes the crop's present orientation (landscape, or portrait after X; a square crop follows the image), a custom [w, h] is used as given, and crop.aspect takes orientation: "crop" | "given" to choose. The window reapplies the remembered ratio to an untouched photo with orientation "crop", as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AbegtYaPuwqZ81pGfELsFK |
||
|
|
7b2d7b25ea |
LR-BEHAV-BG-TASKS: an older Reload can't overwrite a newer one; background Reload auto-writes sidecars
Review of #1998. Each reload plan takes a ticket; apply skips a photo a later-started reload has already been applied to, so an older read that finishes last no longer restores the previous dimensions and content hash. The app's background completion now commits through Session::execute_fn, so the XMP sidecar auto-write (and the save) happen as for the command. Regression tests: an_older_reload_does_not_replace_a_newer_one, a_background_reload_writes_the_sidecar_with_auto_write_on. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
debfa644ec |
#1927: a slider drag and unrelated section eyes don't misplace crops
Two more cases from the review of #1990: the end of a slider drag replayed the crop Constrain Crop had fitted during the drag, so Auto Sync still copied the active photo's fitted crop to the others; the end of an interaction now starts again from the original crop when the drag didn't edit the crop. And any section eye counted as a warp change, so turning Light off could refit a hand-drawn crop: only the Geometry and Optics eyes do now. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AbegtYaPuwqZ81pGfELsFK |
||
|
|
29384a0404 | Merge PR #1898: LR-MERGE-HEADLESS: merge dialogs remember the last settings per kind | ||
|
|
23f00822eb |
#1927: Auto Sync fits each photo's own crop under Constrain Crop
The crop fit ran before the Auto Sync delta, so a Geometry edit carried the active photo's fitted crop rect into the delta and onto every other selected photo, replacing (and could enlarge) their own crops. The delta is now taken from the edit as asked, and each target fits its own crop. Review on #1990. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AbegtYaPuwqZ81pGfELsFK |
||
|
|
bc071bb57b |
LRC-DEV-AUTOSYNC: sync camera local tone Off
Compare the typed camera-local-tone flag on both sides of the Auto Sync delta so selected peers receive Off while retaining their own profile id, amount, and unrelated settings. Add regressions for propagation, unchanged values, selection boundaries, and history/serialization behavior. Co-authored-by: Codex <codex@openai.com> |
||
|
|
2218d97e89 |
Merge pull request #2199 from skylartaylor/open-original-media-gate
Open Original: only file types LightCraft reads reach the system opener |
||
|
|
fb8de10b99 |
LRC-DEV-AUTOSYNC: sync HDR state while retaining per-photo tuning
Turning HDR off with Auto Sync active now turns it off for the other selected photos. Enabling HDR preserves existing per-photo HDR tuning. Co-authored-by: Codex <codex@openai.com> |
||
|
|
d54673bb95 |
#2135: only file types LightCraft reads reach the system opener
Photo ▸ Edit In ▸ Open Original in Other Editor handed a photo's stored path straight to `open` / `xdg-open` / `explorer.exe`, with `Path::is_file()` as the only check, and Lightroom catalog import kept original paths exactly as the catalog had them. A crafted `.lrcat` could therefore put `payload.exe`, `start.lnk`, `run.bat`, `page.hta`, `Evil.app` or `go.command` into the library and have it run on one user click. - `lightcraft_engine::open_path`: one gate for every path that leaves LightCraft for the OS. The extension must be one LightCraft reads (`import::EXTENSIONS`, which already covers the Edit In copy formats `tif`/`tiff`/`psd`), it must be a regular file (so a `.app` bundle and any other folder are out), what a link resolves to must be a read type too, and what is handed over is the absolute path. A refusal is the sentence shown to the user. - Open Original and Edit In go through it; a refused photo is listed in `skipped` with the reason, and the menu item is greyed out for a record that can never be opened (extension only, so no disk or share is touched while a menu is drawn). - `lightroom_catalog::refuse_non_media` drops such images where the catalog is read and again where its photos become records, with a warning each, so a refused entry never becomes an openable library record. A virtual copy of a refused original goes with it. Tests: a catalog naming a program (and a virtual copy of it) imports neither while the catalog's real photos do; a library record naming a program is never handed to the stub launcher, which records no invocation, and a program selected beside a photo leaves only the photo, by absolute path. Both fail before this change. Co-Authored-By: Claude <noreply@anthropic.com> |
||
|
|
346681561a | Lightroom import: follow catalog paths only on this computer or the catalog's share | ||
|
|
54c6c43b07 |
#1927: Constrain Crop tightens the stored crop
Constrain Crop only applied at render time, and the Crop tool shows the uncropped view with the stored crop, so in the Crop panel (where the checkbox is) ticking it or moving a Geometry slider changed nothing. Session::set_develop now shrinks the stored crop about its centre until it fits the warped photo when Constrain Crop is turned on, or when an edit changes the warp (Geometry, Upright, lens corrections, section eyes) while it is on. A crop edit itself is kept as drawn. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AbegtYaPuwqZ81pGfELsFK |
||
|
|
a43cb68593 |
LR-MERGE-HEADLESS: merge dialogs remember the last settings per kind
The HDR / Panorama / HDR Panorama dialogs now open with the options of the last merge of that kind instead of the defaults, and those options are kept in the library's prefs.json (Session::last_merge) so they survive a restart. "With Last Settings" and HDR for Each Bracket Set read the same store. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
11351ef141 |
Merge PR #1834 (rebased)
# Conflicts: # crates/ui-egui/locales/cs-formats.json # crates/ui-egui/locales/pl-formats.json # crates/ui-egui/src/lib.rs |
||
|
|
e4519aa710 |
Merge PR #1487 (rebased)
# Conflicts: # docs/parity-checklist.md |
||
|
|
b5733c7649 |
Merge PR #1487
Resolved against rb-base-36: Scanned keeps the base's rewrite flag next to magic and tag; Exif keeps the Panasonic lens fallback; locale catalogs merged (one duplicate key dropped). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
dec7fd4eb2 |
Merge PR #1834
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
8591cdfa6b |
Merge PR #1469 (rebased)
# Conflicts: # crates/engine/src/lib.rs # docs/parity-checklist.md |
||
|
|
b3012745d5 |
Merge PR #1215 (rebased)
# Conflicts: # docs/gaps.md # docs/parity-checklist.md |