Skip to content

Integration batch 35: 61 reviewed community PRs (never-crash, raw decode, imports, UI fixes) - #1682

Merged
echelon merged 138 commits into
mainfrom
claude/integrate-batch-35
Oct 14, 2026
Merged

echelon merged 138 commits into
mainfrom
claude/integrate-batch-35

Conversation

@echelon

@echelon echelon commented Oct 14, 2026

Copy link
Copy Markdown
Member

Integration batch 35: 61 community PRs, screened, merged together and checked on Linux (workspace clippy -D warnings, workspace tests, parity, layers, assets, wasm).

Screening

Every PR was read before merging, without running its code. The checks covered:

  • network access, process spawning and file deletion;
  • unsafe, dependencies, build.rs, CI and packaging changes;
  • binaries and large assets;
  • weakened gates, hidden Unicode and prompt-injection text;
  • CLAUDE.md rules: never-crash, clean-room and the process-version rule.

Contributor accounts were checked for age and activity. Nothing malicious was found. #1571 (no https→http redirects) and #1574 (MCP doesn't resend a request whose reply was lost) harden existing code.

What needed a closer look

Merged PRs

PR Author Title
#1132 @THEtheChad fix(ui-egui): #1046 decide on typed error kinds, not error message text
#1410 @dev-null-undefined LR-IMP-PREVIEW-READ: raw thumbnails and stand-ins decode the smallest embedded JPEG that is big enough
#1419 @dev-null-undefined M5.6: Dehaze while zoomed no longer resamples the whole original on every pan and slider step
#1421 @dev-null-undefined M5.7: perf harnesses for slider latency, zoom windows and photo loading (examples only)
#1423 @alvarohn LR-MERGE-HDR: keep the reference frame's lens corrections in HDR merges
#1427 @sanyamsingh001 LR-MASK-OBJECTS: open the configured model folder and preserve retry
#1429 @radialmonster LR-SIDEBAR-LOCAL-SYNC: Synchronize Folder in the Local folder menu
#1432 @Claudio911015 Recently Deleted shows deleted Local (browsed) photos (Fixes #1430)
#1434 @marcoarnulfo Test: the 1:1 window is drawn with the screen's profile (#1365)
#1439 @ArekatlaNishanthchowdary Issue #1200: portable mode, a portable.txt beside the executable keeps settings in LightCraftData
#1443 @bitshiftza People view: faces cut from the embedded preview, not the raw (#1440)
#1445 @s17sh70x2jfl031ag i18n(pt-br): fix plurals and inconsistencies, translate AI Denoise
#1451 @marcoarnulfo LR-IMP-PREVIEW-READ: a raw whose embedded preview can't be read still gets a thumbnail
#1452 @marcoarnulfo LR-IMP-ADD-DIALOG: an import ends showing its first photo, in All Photos when the view doesn't hold it, unless another photo was chosen meanwhile
#1453 @smposara LR-IMP-CAMERA-COVERAGE: verify Canon EOS RP CR3 pixel for pixel
#1454 @wstock LR-VIEW-COMPARE: ⌘/Ctrl- and Shift-clicks on the filmstrip select in Compare (#187 follow-up)
#1456 @wstock Visualize: the all-masks overlay shows the union of the masks, not the last one
#1459 @radialmonster LR-RAW-DNG: DNGs exported by earlier LightCraft versions render with the right colours again (follow-up to #1177)
#1477 @dev-null-undefined LRC-LIB-CATALOG-IMPORT: an ARW6 is described from the whole file, not a partial read
#1483 @PiMinusMax Raw source: no second copy of a full-size picture after the colour model
#1533 @endthestart Never crash: Fix overflow in mask.move with a huge delta
#1535 @endthestart Never crash: Fix i32 overflow in the NEF and PEF Huffman predictors (#1515)
#1536 @endthestart LRC-LIB-CATALOG-IMPORT: Open catalogs whose tables are all still in the WAL
#1537 @endthestart xtask parity: Fail when docs/gaps.md lists a gap more than once
#1539 @endthestart Never crash: Fix demosaic panic on a NaN black level
#1541 @endthestart Never crash: Refuse raw data with two samples per pixel (#1511)
#1542 @endthestart Never crash: Fix export size panic for very long strips
#1543 @endthestart Never crash: Cap enlarged exports at 512 MP and check memory first
#1544 @endthestart Never crash: Fix overflow on a BigTIFF IFD with a huge entry count (#1516)
#1546 @endthestart Never crash: Cap the spot radius so huge spot sizes render (#1519)
#1550 @endthestart Never crash: Fix panic dragging a tone curve point between close neighbours
#1557 @endthestart Never crash: Render demo scenes at most at their own size
#1558 @endthestart Never crash: Fix defringe radius overflow for amounts past the sliders
#1559 @endthestart Never crash: Limit how much a preset zip can unpack
#1560 @endthestart Never crash: Give the loupe a finite aspect for a zero-size crop
#1561 @endthestart Never crash: Fix blur overflow and hangs on sliver crops
#1562 @endthestart Never crash: Read the edge pixel for bilinear samples outside the picture
#1563 @eliets2 Edit: Select Only Active Photo (Cmd+Shift+D)
#1565 @endthestart Never crash: Repair damaged catalog snapshots on open
#1567 @NavidZamanKhan fix(develop): reject invalid settings groups before mutation
#1569 @notdezzi Packaging: confirm a successful uninstall with the completion dialog (fixes #892)
#1570 @endthestart LR-EDIT-OPTICS-PROFILE: Apply Nikon's in-file distortion correction for the Z 6II, Z 8 and Z f
#1571 @MarekSpodBiedry Fetch: refuse a redirect from https to http (#1531)
#1572 @MarekSpodBiedry Reject a LeakyRelu alpha that is not a single float instead of reading it as 0 (#1530)
#1573 @MarekSpodBiedry Check the SAM weight shape against the header before reading the tensor (#1529)
#1574 @MarekSpodBiedry MCP: do not resend a request whose reply was lost, report an unknown outcome (#1526)
#1576 @MarekSpodBiedry Reject PEF streams that end before the pixels do instead of decoding zero padding (#1514)
#1577 @MarekSpodBiedry Reject RAW TIFFs with missing or undecodable image chunks (#1513)
#1578 @MarekSpodBiedry Refuse Open/New Library while an import is running (#1509)
#1579 @MarekSpodBiedry Preview disk cache: ignore symlinked shard directories (#1504)
#1580 @MarekSpodBiedry Reserve the name with an exclusive create when hard links are unavailable (#1503)
#1581 @MarekSpodBiedry Recheck file contents before deleting a moved original (#1500)
#1583 @nledford PERF-IMPORT: a scan, an import and a sidecar write no longer make a table of the whole library first
#1597 @PiMinusMax Before/After button: Show Original () does not light it (fixes #1497)
#1598 @NavidZamanKhan fix(ui): report find-missing failures and timeouts correctly
#1652 @marcoarnulfo Search: clearing the filters empties the search field too
#1653 @eliets2 Fix zero-feather spot boundaries producing black pixels
#1655 @eliets2 Reject non-finite denoise inputs and tile overflow
#1661 @marcoarnulfo Loupe: the filter pill sits as far from the left edge as from the top
#1666 @skybluu Avoid duplicated camera make in exported DNG identity
#1667 @skybluu Document command-local release build overrides for low-memory builders

Checks

On this branch (Linux):

  • cargo clippy --workspace --all-targets -- -D warnings is clean;
  • cargo test --workspace passes;
  • cargo xtask parity, layers, assets and wasm pass.

🤖 Generated with Claude Code

THEtheChad and others added 30 commits October 11, 2026 16:26
…models

EngineError gains Cancelled and ModelMissing { model: AiModel } and a
kind() -> ErrorKind, so frontends decide on what an error is rather than
on its words. The face detector, SAM 3 model checks and the Lightroom
job produce them at the source; the error text is unchanged, so control
channel and MCP clients see the same `error` strings.

Background results that cross the wire as JSON get an additive flag
instead: SAM 3 download status `cancelled`, Apple Photos import outcome
`cancelled: true` next to `skipped`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
LightcraftApp::run_typed keeps the engine's ErrorKind in a CommandError;
run() is run_typed(..).map_err(|e| e.message), so its callers are
untouched. The face detector offer and the SAM 3 download dialog decide
on ModelMissing, the SAM 3 download toast and the Apple Photos note on
the `cancelled` flag, and a Lightroom inspect/import on its own cancel
flag only, so a failure that mentions "cancelled" is still a failure.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rror kinds

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ng (examples only)

- drag_latency (ui-egui example): the whole app driven headless at 60 frames a second; per develop control,
  the latency of each drag tick until its draft is the loupe (or, with ZOOM, the zoom window) texture, the
  ticks never shown, the UI thread's frame time and the time to the full-quality render after release.
- drag_tick_bench (engine example): the UI-thread work of one drag tick outside the render.
- render_bench: ONLY=window (a 1:1 zoom window cut from the original: first window, pan, slider changes;
  GPU_ONLY=1, DUMP=file for pixel A/B), ONLY=load / load1 / jpeg (+ LOADONLY=1): the steps of opening a photo.
  The window rows carry no colon in their names, so `cargo xtask bench` records each of them (parser test).
- open_timeline (ui-egui example): opening raws in Detail through the real app logic, headless with the GPU.

Co-Authored-By: Claude <noreply@anthropic.com>
Merged HDR DNGs lost the camera's embedded lens correction: load_frame strips the lens opcodes from each
source (frames are merged uncorrected) and write_linear_dng wrote no OpcodeList3, so Optics ▸ Enable Lens
Corrections did nothing on the result (Sony ILCE-7M3/7RM4A, Panasonic/Leica, DNGs with their own opcodes).

Each raw frame now keeps the lens corrections it applies (the DNG 1.6 skip rule already applied),
re-expressed for the default crop develop keeps by the new Opcode::cropped: the centre moves into the crop
and coefficients are rescaled for the crop's farthest corner. HdrResult carries the reference frame's and the
DNG writes them as its OpcodeList3. Frames turned before merging (mixed orientations) and panoramas carry none.

Tests: cropped corrections give the crop of the corrected whole (WarpRectilinear, WarpRectilinear2 with and
without reciprocal, FixVignetteRadial); an HDR merge of cropped, corrected brackets, upright and vertical, gives
the same profile correction as its reference photo (fails without the fix). Real brackets not measured yet.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015gRtdWF1E9358FfzhzYqCS
Open the configured SAM directory itself and preserve the pending mask
action and existing files when folder creation or the opener fails.
Run the Linux desktop opener in a background task and deliver failures
to the UI for retry. Directory creation remains synchronous.

Cover configured paths, creation and opener failures, retry state and
worker completion.

Partially addresses #366; model download hosting remains unresolved.
Credit: sanyamsingh001

Co-authored-by: Codex <codex@openai.com>
A Local folder that holds library photos (or has a folder with some inside)
now offers Synchronize Folder... like the Folders section. The check reads
the cached Folders tree only. Headless test covers shown and not shown.
A photo browsed in a Local folder is flagged deleted by photo.delete, but
Filter::matches_in dropped every browsed photo from views without a folder,
so it vanished from the folder and never reached Recently Deleted: it could
not be restored and sat in the catalog invisibly (a deleted record is also
never forgotten as an untouched Local one).

Deleted browsed photos now match the Recently Deleted filter, so they can be
restored; the library view still excludes browsed photos.
Conflicts: crates/engine/src/tests_merge.rs (#1123's test landed where this branch's is; both kept),
docs/parity-checklist.md (the LR-MERGE-HDR row: both notes) and docs/whats-new.md (both entries).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015gRtdWF1E9358FfzhzYqCS
…s settings in LightCraftData

As in PhotoCraft: when portable.txt (or LightCraft.portable) sits next to the
executable, config_dir() is <exe dir>/LightCraftData, so settings, logs and
models stay with a portable copy instead of %APPDATA%. LIGHTCRAFT_CONFIG_DIR
still wins and is used without probing beside the executable. A portable
folder that can't be written logs a warning and the platform folder is used.
The check runs once per process.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…kept in the thumbnail cache (#1440)

An unedited raw's face tile is cut from its largest embedded preview, read
the planned way (header and JPEG, never the sensor data), when the preview
holds at least 3/4 of the tile's pixels across the face; otherwise, and for
edited photos and other files, it is developed as before. Tiles keep going
to the memory + on-disk thumbnail cache, now at 16 px size steps so the
thumbnail slider reuses them. The planned preview path carries an Adobe RGB
preview colour space and applies it instead of declining to the whole-file
read (Sony alpha 1 previews).
Many pt-BR format strings dropped the English plural argument with
{:.0}, so nouns never became plural ("Exportada 5 foto"). Also fixes
the gender of "matiz" and two terms that disagreed with the catalog.
Four CC0 EOS RP samples from raw.pixls.us (lossless RAW and C-RAW, full
frame and 1.6x crop mode) now have exact full-sensor regressions against
the DNGLab 0.8.0 black-box oracle (Windows binary, checked first against
the documented M50 RAW hash). The decoder already matched; no decoder
change was needed. Crop mode is a single 4032x2656 tile, full frame two
3192-wide tiles.

docs/cr3.md also records that the white level is Canon's specular white,
which at the -1/3-stop ISOs (e.g. 11062 at ISO 5000) is well below the
sensor's saturation point.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… gets a thumbnail (fixes #1448)

The grid queues no render behind an unedited raw's quick thumbnail, since the embedded JPEG is
meant to be the thumbnail. But whether that JPEG can be read is only known when the quick job
runs, and `quick_thumb_job` had no fallback: when the preview loader returned nothing the job
failed with "no quick preview", the failure was remembered for that key, and the cell stayed
empty until an edit changed it. The quick job now carries the real thumbnail job as its last
resort, as `quick_view_job` already does for the loupe.
…tos when the view doesn't hold it, unless another photo was chosen meanwhile (fixes #1446)
The AI Denoise panel, model download and settings were still in English
in Brazilian Portuguese; this translates its 98 strings.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…Compare

In Compare a filmstrip click goes to `compare.set` (#747), so the grid's
modifier clicks never reached `library.select` and multi-select from the
filmstrip was impossible there (#187 follow-up). A ⌘/Ctrl-click now toggles
the photo and a Shift-click extends from the active photo, as in the grid;
the two photos shown stay selected and the active photo is unchanged, so a
rating key still acts on a photo that is on screen. A plain click still
replaces the active side.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NH3itd85jPuM6wNjgcGfEH
…e last one

`Overlay::AllMasks` painted each mask's plane in turn, and every mask view
rewrites the whole image from its alpha (White on Black writes `255·a`,
Image on Black multiplies by `a`…), so each plane wiped the ones before it
and only the last visible mask showed. The planes are now merged (per-pixel
max) and painted once; the GPU path goes through the same `apply`.

The test added with #919 could not pass: besides the above, its hidden-mask
check expected the plain pixel under White on Black, where everything
outside the masks is black by definition (as the single-mask test asserts).

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NH3itd85jPuM6wNjgcGfEH
…ed CFAPattern reading; the writer now marks its spec-anchored files 'LightCraft DNG 2'
…colour model

`fit` to the source's own size copies the whole picture (`resize` returns a clone). The raw path
called it unconditionally, so every full-size decode (an export, and its denoised twin) made a
second float RGB buffer: 288 MB and 160 ms at 24 MP, ~390 MB and 225 ms at 33 MP. The JPEG and
preview paths in the same file already fit only when the picture is larger than `max_edge`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… a partial read

header_plan skipped an ARW6's strip but its first 64 KB and then said Ready, while the ARW6
header probe (Mode::Header) validates every tile: its picture header, stream tables and the
first lines of its residual stream, which lie in the skipped bytes. The probe of the partly
read buffer then failed ("ARW6 first-half row count outside 2..=7") where the whole file
succeeds: sparse_corpus failed on arw6-sony-ilce7rm6-apsc-land-c.arw, the first ARW6 file it
reads (it stops at the first failure). Like NEF, ORF and PEF, whose header probes read
samples, an ARW6 now gets HeaderPlan::Whole from the header plan. The preview plan is
unchanged: the embedded preview reads no tile, and the 13 ARW previews in the corpus are
still read from 21 % of their bytes.

Only the test reads the header plan today (the app's partial reads use preview_plan), so no
import changes. New test: a synthetic two-tile ARW6 whose second tile lies past a first one
of bulk size (Ready before, Whole now). sparse_corpus passes on the 8 ILCE-7RM6 ARW6 files.

cargo test --workspace: 3205 passed, 1 failed, visualize::tests::
all_masks_overlay_shows_every_visible_mask_at_once, which fails on main b3d392b too
(PR #1456 addresses it); fmt, clippy, parity, layers, assets and wasm pass.

Sources: own design.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…d slider step resampled the whole original)

A windowed render dehazes with the whole frame's airlight, estimated on a 384 px proxy of the frame
(`local::frame_airlight`). Every window asked for that proxy again, so every pan of a 1:1 view and every
slider step while zoomed sampled the whole original down to it on the CPU: ~200 ms of CPU on a 64 MP raw.

The proxy (taken before white balance) is now kept for the last 4 (source fingerprint, frame, size); white
balance, the dark channel and the percentile still run on it every time. Same pixels: the GPU window of
`render_bench` is byte-identical.

`optics::fingerprint` indexed the first pixel of an empty image; it now hashes only the dimensions then.

render_bench ONLY=window GPU_ONLY=1 on a 64 MP Sony ILCE-7RM6 raw (RTX 4070 Ti SUPER, 4-CPU quota), CPU time:
pan 208-212 -> 9-11 ms, exposure change 200-204 -> 4 ms, NR change 211-217 -> 13 ms.

Co-Authored-By: Claude <noreply@anthropic.com>
A new library command narrows the selection to the active photo and keeps
that photo active. It is bound to Cmd+Shift+D (Ctrl+Shift+D on Windows and
Linux), listed in the Edit menu and the keyboard shortcut editor, and
disabled while there is no active photo. The binding does not collide with
any existing binding or alias.
Cover the chord in the photo grid, the square grid and the detail view
(selection narrowed, active photo kept, last edit undo step untouched), a
focused text field keeping the key, rebinding and unbinding in the keymap,
and the command refusing to run without an active photo.
… embedded JPEG that covers them

`embedded_preview_srgb` (the loupe stand-in and the grid thumbnail of an unedited raw) decoded the
largest embedded JPEG whatever the size asked for: a 512 px thumbnail of a Sony A7R VI ARW decoded
its 9984 x 6656 JPEG (5.6 MB) although the file holds a 1616 x 1080 one (0.3 MB).

`lightcraft_raw::embedded_preview_covering(bytes, min_edge)` returns the smallest of a TIFF-based
raw's JPEGs whose long edge is at least `min_edge` and that is a copy of the largest one: aspect
ratio within 1 % (not a letterboxed thumbnail of another shape) and the same number of components
(not the grey semantic masks of an iPhone ProRAW DNG); else the largest, as `embedded_preview`.
The colour-space handling stays in `decode_raw_preview` (a `covering` argument); an unsupported
raw's editing source and the camera-look fit keep the largest JPEG, so a source never depends on
its size level.

On 120 raws of every make in the corpus at 256 / 512 / 1600 px: wherever the largest JPEG is still
chosen the output is identical byte for byte; where a smaller one is (Sony, Nikon, Panasonic,
Adobe DNG) orientation matches, the size is equal or 1-2 px off, mean difference <= 4.7 / 255.

- Rebased onto #1020: its plan route (`preview_window` -> `planned_preview`) now takes the box size and picks
  with `embedded_preview_covering` too, so a TIFF raw read through the sparse plan gets the whole file's JPEG.

Co-Authored-By: Claude <noreply@anthropic.com>
…ecklist

Add the Cmd+Shift+D row to the library shortcut table with a short note on
what it does and where it can be rebound, add a checklist row for it with
status partial (covered by headless key tests; the native macOS menu path
is not verified), and update the checklist's Last updated line, revision
history and the summary counts that this one row changes.
…ixes #892)

The MSI never included WiX's ExitDialog: the Publish events point at it, but only
a DialogRef pulls the UI extension's fragment (with its on-exit=success show) into
the package, so every successful run ended silently. Reference it, and note that
the shared completion page is the uninstall confirmation; packaging-lint now fails
when the reference is lost again.

🤖 Generated with [ZCode](https://zcode.ai)

Co-Authored-By: ZCode <noreply@zcode.ai>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet