Repository navigation
Integration batch 34: CI on three platforms, HEIC/AVIF metadata, Dehaze V3, 35 reviewed contributor PRs - #1441
bflatastic wants to merge 99 commits into
Conversation
Generated with Codex.
Holding Alt (Option on macOS) while dragging an Edit slider shows Lightroom's temporary previews: highlight clipping for Exposure, Highlights and Whites, shadow clipping for Shadows and Blacks, greyscale for Sharpening Amount, the detail band for Radius / Detail and the sharpening mask for Masking. They are render overlays (pipeline visualize), drawn the same way after the CPU and GPU renderers; the sharpening views read each renderer's own detail planes. Settings and normal output are unchanged. Fixes #937 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Settings > Performance > Thumbnail cache gets Choose Folder... / Use Library Folder next to the size limit, backed by the new library.thumbnailCacheLocation command. The folder is saved in prefs.json, must be absolute, and is checked before anything moves; cached thumbnails are moved, left or deleted on a change. A chosen folder missing when the library opens is reported and never recreated (thumbnails stay in memory), and the disk cache no longer creates missing parent folders. Also switches one chunks_exact in spots.rs to as_chunks, which clippy 1.99 flags on main. Fixes #903 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…art albums and folder stacks to stacks Smart collections whose rules all have an equivalent (rating, pick, label, edited, ISO/focal/aperture, text rules, nested groups) become smart albums; others stay static with the unmappable rule named in the report. Folder stacks keep Lightroom's order and collapsed state; reimport skips photos already stacked. Report gains smartAlbums, smartAsStatic and stacks. Also satisfies clippy 1.99's chunks_exact_to_as_chunks in spots.rs. Part of #197. Sources: own design, from the Lua rule literal structure in public prose write-ups of the catalog format and synthetic test catalogs. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Preserve page-backed large-catalog import while integrating upstream catalog and documentation changes. Adapt only the sparse test fixture to the shared upstream fixture helper. Use the equivalent complete RGB-triple iterator required by Rust 1.99 Clippy; the same lint failure was reproduced on the exact upstream baseline. Validation: 47 catalog tests, nine spot tests, exact sparse regression, all eight CI gates, and an original synthetic headless import/selection check passed. Generated with Codex.
…frame A Lightroom collection imported whole (11 113 presets, a 42 MB presets.json) made every interaction take seconds: - Session::persist ran after every command and serialized the whole preset list to compare it with the last write: 609 ms per slider tick (release, the real collection). Session::presets is now a PresetList whose generation changes on mutable access; persist serializes only when it (or the profile lists) changed, and skips the write when the bytes hash the same. develop.set: 609 ms -> 2.3 ms; preset.apply: 598 ms -> 3.1 ms. - The Presets panel deep-cloned every preset into a BTreeMap, built a row, widget id and (with thumbnails) a variant render job for each of them every frame. Grouping is cached per generation and only rows in view are laid out: 5041 -> ~20 rows a frame, 2.3 ms with 5000 presets. - The preset pickers (Import dialog, Settings > Import) build only the rows in view. - add_presets and opening a library compared every preset with every other (quadratic); both use hash indexes now. Opening no longer serializes the list once just to remember it. Tests: develop commands don't re-serialize unchanged presets (and a change is still saved), generation semantics, a 20 000-preset import, and the panel building only visible rows (fails on the old code: 5041 rows). An ignored bench (presets_scale_bench, LIGHTCRAFT_BENCH_PRESETS) times a real presets.json. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…GGB / GBRG) The \0MRM block container: PRD sensor size, storage and Bayer cell; WBG as-shot gains in cell order; TTW TIFF for Exif and orientation. Black 0, white from the saturation plateau. 4 CC0 samples pinned in RAW_SAMPLES; DiMAGE 7, 7Hi, A1, A2, A200 and Dynax / Maxxum 7D verified. Also fixes clippy::chunks_exact_to_as_chunks in pipeline/spots.rs. Sources: public prose description of the MRW layout (Dalibor Jelinek's MRW notes) and own black-box analysis of the CC0 samples. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…th their originals New command `photo.renderToDng` (Photo menu): each selected photo (at most 500) is rendered with its edits as a linear 16-bit float DNG `<name>-Rendered.dng` next to its original (never overwriting; a demo photo needs `dir`), added to the library stacked on top of the original, and the new photos are selected. Colour space proPhoto by default (rec2020, adobeRgb, displayP3, srgb). A batch holds a cancellable `renderDng` activity row with progress; cancelling stops between photos and keeps the copies made so far; a failing photo in a batch is listed and the rest carry on. Stacked on #1047. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The engine half is split into `render_dng::prepare` (session: params, per-photo
render setup), `RenderDngJob::run` (no session: render, encode, write next to
the original) and `render_dng::finish` (session: import, stack on the original,
select). `photo.renderToDng` still runs all three in a row (CLI, MCP, web,
scripts). The desktop app intercepts the command when it has a thread-safe
writer and runs `run` on a worker thread, like background exports: the
request answers at once with {background, total}, the `renderDng` activity row
shows progress and its ✕ cancels between photos, and each frame polls for the
result, then adds the DNGs and shows a toast. A panic in the worker is caught
and reported. Toast and labels translated in all nine catalogs.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
heic-rs 0.1.2 to 0.1.4 fix six panics on malformed files, found by fuzzing: four in release builds (a uuid box too small for its extended type, a block starting right of the picture, a conformance window larger than the picture, and a reference row below the picture) and two with overflow checks on (a PCM bit depth above the sample bit depth, a slice QP out of range). The API, MSRV and output are unchanged. Mirrors the same change in PhotoCraft's photocraft-heif.
…#1109) Settings > Import > Auto Import gains Include subfolders (off by default: the watched folder's top level only, as before). On, the scan also lists its subfolders' photos: hidden entries, links to folders and the library's own folder (where copy-mode arrivals go) are skipped; at most 16 levels and 200,000 entries, with a warning when a bound is hit. An unreadable subfolder or a non-Unicode name is skipped with a warning. library.autoImport takes subfolders; library.autoImportScan reports it and listingWarnings.
…kground The scan already ran on a worker thread, but its dialog was modal and closing it stopped the scan, so a large folder on a network share held the app for minutes. While the folder is scanned the dialog's button is now Continue in Background: the dialog closes and the scan goes on under its activity row. When it is done nothing pops up. A notice in the activity stack says how many changes were found (or that the folder isn't there); a click opens the dialog with that result and what was ticked, without scanning again, and ✕ lets go of it. A scan that found nothing to do only says so in a toast. Cancel and the row's ✕ stop the scan as before. One folder at a time: Synchronize Folder on another folder is refused while a background scan runs or its notice waits, so minutes of scanning are not thrown away unasked. Another library opened lets go of the scan. A result looked at later can be stale: Synchronize already refuses a scan whose folder's photos changed meanwhile and scans again. The dialog's one button reads Continue in Background and then Synchronize, so Synchronize is unavailable for 0.6 s after the scan ends: a click meant for the first can't start the second. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A new Help item next to Send Feedback… (which stays a plain new issue). The
dialog takes what happened, hides the home folder and photo file names by
default, can add the two previous runs' logs, and previews the issue. Create
Report writes lightcraft-report-<time>.txt next to the logs (what happened,
the System Info rows and the logs, each up to its last 4 MB), reveals it, and
opens a new GitHub issue pre-filled with the same and the end of this run's
log; the link is kept under 8,000 characters. Nothing is sent by the app.
Without a log (web, --memory) the issue holds the system info only.
The System Info rows move to `bug_report::system_rows`, shared by both dialogs.
`app.reportBug {create: true}` does it without the dialog (agents, tests).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Three boolean expressions clippy now wants simplified (pipeline's normalize_wb, engine's learn_as_shot_wb, per nonminimal_bool), a descriptor_copy only its #[cfg(unix)] test calls (dead on Windows), and desktop_entries_give_their_program is unix-gated (Path::is_absolute decides by the platform, and desktop entries run there). None change behaviour; all four fail cargo xtask ci on this toolchain from main. Co-Authored-By: GLM 5.3 Flash <noreply@z.ai>
…go of Letting go of a scan when another library is opened ran the first time a library was shown too, at launch. A Synchronize Folder dialog opened before that frame (a script, a test) was closed and its scan dropped. It now runs only when a library replaces the one shown before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: GLM 5.3 Flash <noreply@z.ai>
`Gpu::new` refuses software adapters (llvmpipe / lavapipe, WARP): the CPU pipeline is faster. CI runners have nothing else, so the CPU <-> GPU equivalence tests have always skipped there. `LIGHTCRAFT_GPU_ALLOW_SOFTWARE=1` admits them. The app never sets it and the default is unchanged. On lavapipe all 134 compared renders stay within max 1 LSB, mean <= 0.0003 LSB, the same as Metal on an M4 Pro. The two big-source window tests used a 24 MP (288 MB) source. That is over lavapipe's 128 MiB storage binding (the WebGPU default), so geometry ran on the CPU and nothing was uploaded: one test failed and the other passed without checking anything. They now use 3200 x 3200 (117 MiB): above RETAIN_SOURCE_BYTES, so the source is still shared, and uploaded on every adapter. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Three masks (radial, brush, and a linear gradient with Refine Edges or a Subject mask): a global Exposure drag and a mask's own Exposure drag, at loupe and draft size. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Each visible mask's alpha is kept with the stage cache entry and reused while nothing it reads changes: its components, Refine Edges, Invert and Amount, the frame and output size, plus the image (lin_key) and the exposure for the masks that read them. An Exposure drag over gradient and brush masks, or a drag of a mask's own sliders, evaluates no mask. StageCache::bytes now counts the alphas and the blurred chromaticity plane, which it left out. The serial w x h loops of mask evaluation run row-parallel with unchanged arithmetic. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The GPU stage cache mirrors the CPU's: per-mask alpha buffers keyed by masks::alpha_key, copied into the combined alpha buffer on a hit (no readback for CPU-evaluated shapes). GpuStages::bytes counts them and the chromaticity buffer it left out. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
On every pull request and push to main, on standard GitHub-hosted runners: Linux runs `cargo xtask ci`. macOS and Windows run clippy and `cargo test --workspace --no-fail-fast`, the steps whose result depends on the platform. All three then run the GPU test targets on lavapipe, Metal and WARP. That step fails if the tests still skip for lack of an adapter. The dependency cache is saved from main only. The workflow uses only the actions and pins already in release.yml. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ip reads The equivalence of `header_plan` / `preview_plan` broke for the corpus's ARW6 pair: a Compression-32766 strip was holed behind its first 64 KiB prefix, but the header probe validates more there - `parse_tile_header` walks the 13 stream header words of every tile, `stream_halves` reads each stream's index table, and `first_half_shift` decodes the residual stream's first half, which sits behind the earlier streams' data. The probe read zeros (and 0xFF) there and failed with "ARW6 first-half row count outside 2..=7" where the whole file decodes (first corpus case: arw6-sony-ilce7rm6-apsc-land-hq.arw; the corpus is git-ignored, so CI never saw it). `tiff_plan` now asks `arw6_keep` (crates/raw/src/sparse.rs) for those scattered ranges when `image()` reports Compression 32766 for one strip: the tile table, then per tile, in staged rounds so each ask sits in one `Need`, the picture/group tables, the stream header words (positions from the new `arw6::stream_header_positions`, mirroring the group-table walk), then with the real `parse_tile_header` run, the 13 index tables and finally each residual first half (its length A is its index's first entry). A layout that cannot be walked - a corrupt ARW6 - reads whole: `arw6::decode` stops at the same validation of loaded bytes, so the probe is still identical. `parse_tile_table`/`parse_tile_header`/`u16_be` /`u24_be` are now `pub(crate)` for the walker, and `Want::pending_plan` (renamed from `into_plan`) takes `&mut self` so the walk can keep asking after the IFD walk answered. The full-size JPEG these files carry as a `JPEGInterchangeFormat` image (compression 6/7, where 0x0201/0x0202 are the interchange tag and its length and `image()` therefore declines) reached no hole at all and made the plan read it whole: together with the strip work, the header plan now reads 26-28% -> ARW corpus average 1.7% (the two ARW6 files read 2 / 1%); nothing reads the interchange image in header mode, and under `preview_plan` `embedded_preview` wants it, so the hole is header-mode only (the corpus test's 0 / 0xFF fills guard both). Tests: without the corpus, sparse.rs's synthetic single- and two-tile ARW6 files (residual stream past the prefix, Qis::REAL) assert the plan reads past the 512 KiB prefix and probes as the whole file does, for both fills; with it, `sparse_corpus` passes for both real files, both fills, both plans, and the ARW6 decode-sum corpus tests are unchanged. Gates: fmt, clippy -D warnings, heif, parity (+ refreshed summary), layers, assets and wasm all pass; `cargo test --workspace` has no failure that clean main doesn't show on this Windows machine (engine sidecar's 20 fs-fault and ui-egui's denoise-model tests fail there identically with the fix stashed). Co-Authored-By: GLM 5.3 Flash <noreply@z.ai>
…ision
Catalog::library_revision is bumped by every op except develop-only ones
(SetDevelop, SetHistory, PushHistory, SetVersions and batches of them);
revision keeps counting every op. Filter/Sort/RuleSet::reads_develop and
Catalog::{filter,album,smart_albums}_read(s)_develop say whether a view can
change with a develop edit (through Album rules, loops ended by a seen-set),
and Catalog::view_revision gives the key such a view caches on. Rule fields
are classified by an allow-list, so a new field counts as reading develop
state until it is classified on purpose.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Session::visible() and source_total() key on a structured ViewKey compared field by field (no per-frame Debug format of the filter) and on the view revision, so a develop edit re-runs the query only when the filter, sort or smart-album source reads develop state. At 100k photos a drag tick drops from 68 ms (capture-date sort) / 27 ms (file name) to under 0.01 ms. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Library-wide caches that don't read develop state (folder/keyword trees, keyword chips/ticks/names, counts, person names, By Date, filter-bar values, suggestions, smart-album problems, the Missing count, face hints) key on the library revision; people, album counts and the rule dialog's count key on the view revision. The justified grid layout adds the catalog revision to its key since crops and rotations change cell shapes without changing the list. The filmstrip shares the visible list instead of copying it per frame. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… and counts albums by their kind Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…estarts the scan Found using the app on a real library: a folder of 8,700 files on a network share takes about a minute to scan, the dialog says to go on working, and any rating, label or keyword given to one of the folder's photos in that minute made the finished scan count as stale. Synchronize then refused it and scanned again, every time. A scan is current while the folder holds the same photos (virtual copies aside), each the same file in the same place. What the person does to those photos does not change which files are new, missing or moved. It matters only for a photo whose sidecar the scan found news in: reading that would go over the work, so there nothing may have changed, as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…era JPEGs Renders each ARW with the embedded correction on and off and compares it with the camera's own JPEG: residual offsets by radius after a similarity fit, checkerboard line straightness, and the ratio of the camera's correction to LightCraft's. Checked on synthetic boards with known radial distortion (corrected: 0.04 px median, ratio 1.000; 80 % corrected: ratio 1.26, expected about 1.25-1.28). Needs numpy, scipy and opencv-python-headless. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015gRtdWF1E9358FfzhzYqCS
(cherry picked from commit e9178ec)
(cherry picked from commit 6ff9b95)
(cherry picked from commit 72f6528)
(cherry picked from commit af5685c)
Tie background results to their rendered source, borrow cached mattes for the approximation notice, and cover provenance and matte access with regressions. Co-authored-by: Codex <noreply@openai.com> (cherry picked from commit 9922a18)
Discover CR2/CR3 inputs and merge parallel per-file pools in sorted input order. Cover discovery, malformed input reporting and reproducible fitting with CLI tests. Co-authored-by: Codex <noreply@openai.com> (cherry picked from commit 66b6212)
Share phase-aware scales across full and binned development, guard empty and non-finite ranges, invalidate old renders, and add synthetic/property coverage. Co-authored-by: Codex <noreply@openai.com> (cherry picked from commit e211776)
… levels per plane #1069); cargo fmt
|
Two integration follow-ups from re-review:
|
|
Follow-up with diagnostic results: the settings test passed on Linux with every UI request returning ok:true. Immediately before the cache-size click, the button was fully inside the Performance page viewport, and clicking changed cache_mb from 0 to 512. This does not support a settings-layout production fix from the available evidence. The DNG test busy-spins h.step() while waiting for a real worker. Adding a 1 ms sleep after each step passed locally in 27.99 seconds, preserving the 120-second deadline, frame-progress assertion, all four output/stack checks and cleanup. The unmodified test also passed locally in 28.19 seconds, so this is a scheduling-hardening candidate, not a demonstrated fix for the FreeBSD failure. FreeBSD remains unverified. The next useful check is the same instrumented settings interaction and bounded DNG wait in the FreeBSD job; I would not weaken assertions or change production settings behavior based on the Linux result. Checked the current batch head, 377fbed: ec22337 is still not included. |
|
@bflatastic this batch has #1313 at |
|
Can I suggest a large culling of these tests. edit: if i was to hazard a guess, it is claude/claude code to blame for the test issues, maybe a better test directive should be provided for claude to limit low/no value tests |
|
Heads-up from the landing session: this batch has been conflicting with main for a while, and many later PRs are stacked on its members (the Settings series on #1287/#1289, #1232 on #842, …). I'm rebasing this branch onto current main in a separate integration batch so its PRs can land, keeping your reviews and fixes. Your branch is left untouched; if you're mid-way through something here, let me know and I'll hold off. 🤖 Generated with Claude Code |
|
Thanks for the heads-up. Four of my PRs are in this batch: #1124, #1287, #1289 and #1385. None of them is mid-way, so go ahead. Once the new batch lands, the Settings series stacked on #1287/#1289 will conflict: #1299, #1309, #1321, #1326, #1330 and #1333. Tell me when you'd like them rebased onto main and I'll do it. 🤖 Generated with Claude Code |
5.8: accessibility pass — the brush by keyboard, core widgets in the AccessKit tree
Integration batch 34: 35 contributor PRs plus fixes, merged together and checked with
cargo xtask ci(Rust 1.99, Windows).Every PR was first read for malicious content: network calls, process spawning, deletion,
unsafe, build scripts, CI changes, new dependencies and weakened gates. Nothing was found. Each was then checked againstCLAUDE.md: never-crash, pure Rust, clean-room, assets, and everything-is-a-command. Merging this marks each listed PR as merged, except the seven taken as one commit each (marked ⤷), which are closed by hand.What needed a closer look
.github/workflows/ci.yml:cargo xtask cion Linux, clippy and tests on macOS and Windows, GPU tests on software adapters. It runs onpull_request(fork PRs get a read-only token and no secrets) withcontents: read; every action is pinned by SHA, the same SHAsrelease.ymluses. Its checkouts now setpersist-credentials: false. ci: add Linux x64 CI workflow (partially closes gap #9) #941 and test(gpu): preserve active markers across nested panics #1159 add weaker versions of the same and are closed.fsync, tocrates/sysmem(the crate allowedunsafe), with a SAFETY comment and a safe API. It is used only after macOS refuses the full flush with ENOTSUP, as SMB shares do.heic-rspin from 0.1.1 to 0.1.4 (pure Rust, same publisher, checksum matches crates.io).Merged PRs
Our own changes
cherry-pick -x).RENDER_CACHE_VERSION63: A7 III distortion (LR-EDIT-OPTICS-PROFILE: enable Sony ILCE-7M3 (A7 III) embedded distortion correction #1384) and DNG black levels per plane (Normalize DNG black levels per plane with finite-range guards #1069) change renders.mcp/headless.rshunk is dropped (CLI --import <folder> uses the engine's import extensions (#1080) #1119 did that).docs/lightroom-catalog-import.md.cargo xtask parity --write.Checks
cargo xtask cipasses on this branch: fmt, clippy-D warnings, heif, workspace tests, parity, layers, assets and wasm.🤖 Generated with Claude Code