Skip to content

Nightly: staging → main 2026-12-03 - #1837

Merged
emmertex merged 121 commits into
mainfrom
staging
Dec 2, 2026
Merged

emmertex merged 121 commits into
mainfrom
staging

Conversation

@emmertex

@emmertex emmertex commented Dec 2, 2026

Copy link
Copy Markdown
Owner

Nightly batch of staging into main. Merged PRs:

🤖 Generated with Claude Code

blwfish and others added 30 commits December 1, 2026 13:30
…hands on the files it wrote

A batch that stops at its first failed photo (the control channel's foreground
`app.export`) returned only the error: the files written before it stayed on
disk unreported, their photos were not marked exported, plug-ins and Apple
Photos never got them, and a re-run made numbered copies. A headless (MCP)
export cancelled part-way likewise returned the error "cancelled" and dropped
the files it had written. A cancel had no typed field anywhere: each caller
re-derived it from its own flag, and Export with Several Presets missed a
cancel that arrived between its own check and the batch's first progress call.

The engine's batch now ends with a `BatchOutcome` on every path: the results
of the photos it got to (a failure that stops it is recorded as that photo's
`{photo, file, error}` entry) and `stopped: Option<BatchStop>` (`Cancelled` or
`Failed(error)`). `run_batch_outcome` and `export_batch_outcome` return it;
`run_batch_sharing` now returns it too. `run_batch`, `run_batch_cancellable`
and `export_batch` keep their Result shape through `BatchOutcome::into_result`.
The control channel's foreground export uses the outcome: a batch that stopped
before writing anything is still an error; otherwise its result lists what it
wrote plus the failed entry and `stopped: "failed"`, marks those photos
exported, runs the plug-in hooks and Apple Photos, and shows the error as a
toast (menus showed an export's error). The headless export does the same
for a cancel (`stopped: "cancelled"`; Apple Photos skipped, as in the app).
Export with Several Presets reads the batch's own `Cancelled`.

Tests: export::tests::a_batch_cut_short_still_reports_what_it_wrote (stop at
a failure, cancel by progress and by flag at the first photo, before the last
and after the last; one lane and three), lcc-mcp
a_cancelled_headless_batch_reports_and_marks_what_it_wrote (cancel after 1, 2
and all 3 photos) and lcc-ui-egui
a_foreground_export_stopped_by_a_failure_reports_what_it_wrote. Each fails
with the old behaviour put back (files dropped and no typed cancel; headless
Err("cancelled"); control channel error) and passes with the fix.

Manual: none, no user-visible change in the app's own UI (developer reference: docs/control-protocol.md, docs/mcp.md)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…d of skipping the photo

With "If file exists: Skip", a name already written by this same batch (or,
since Export with Several Presets became one export for its own files, by an
earlier preset of the run) counted as a file from an earlier run, so the
second of two photos that render to one name (a RAW and JPEG pair with
{name}, virtual copies, duplicate titles, two presets sharing a folder and a
naming) was reported skipped and never exported. Overwrite already numbered
such a name; Skip did not.

Under Skip a name this run wrote now gets the first number the run hasn't
written either, and the photo is skipped only when a file from before the
export has that numbered name, so running the same export again still skips
everything it wrote. A file from before the export is skipped as before.

Tests: tests_export::skip_numbers_a_name_the_same_batch_wrote (two photos
named alike: first run writes both, second run skips both, a run with only the
numbered file left from before writes the first and skips the second, an empty
folder writes both) and
tests_export_batch::several_presets_under_skip_number_a_name_the_run_wrote
(two presets sharing a folder and naming, and one preset naming two photos
alike; a second run writes nothing). Both fail with the old Skip arm and pass
with the fix. The existing Skip test that skips two photos for one file from
before the export still holds.

Manual: output/export-location.mdx (Skip)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…of embedding an empty one

lcc_meta::write_exif ended in `.write(&[ifd0]).unwrap_or_default()`, so a
serialisation error (a text field past what a classic TIFF holds) became an
empty block: every encoder then embedded `Exif\0\0` with nothing after it,
the copyright and artist vanished, and no caller could tell.

write_exif now returns Result<Vec<u8>, TiffError>. The export's encoders
(8-bit, deep, both gain-map paths) and Edit In's TIFF and PNG go through one
checked helper, export::exif_block, which turns the error into that photo's
export error with what to do (export with Metadata set to None).

Tests: lcc-meta exif::write_tests::a_block_that_cannot_be_serialised_is_an_error_not_an_empty_block
(an IFD chain nested past the writer's depth limit is an Err; an ordinary
block reads back). It fails with the old unwrap_or_default put back. Existing
callers in tests unwrap the Result.

Manual: none, no user-visible change

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Removes F-66C0, B-C9D3, B-F3A3, B-8125 and F-F6BC from doc comments, code
comments and two assert messages.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…hey left out

A TIFF export wrote the ICC profile and XMP (tag 700) but never the Exif
block the export built, so programs that read only EXIF saw no camera,
capture time, GPS, creator or copyright. An OpenEXR export got no metadata
at all, even the copyright under the Copyright choice, and nothing said so:
the formats' differences were written down only in the encoder.

- TIFF: the encoder reads the Exif block (lcc-tiff) and writes it where a
  TIFF keeps it: IFD0's tags (make, model, artist, copyright, description,
  date, orientation) in the image's IFD0, and an Exif IFD and a GPS IFD of
  the file's own that IFD0 points at (new codecs module tiff_exif). Pointer
  tags, the block's image layout, resolution, profile and XMP are not
  copied; IFD-typed and 64-bit values are left out or refused; a block that
  doesn't read fails the encode rather than dropping the metadata. Edit In's
  TIFFs get it too.
- OpenEXR: embedding is left out (the format's standard attributes map
  poorly onto EXIF/XMP fields). Instead the AVIF warning became
  metadata_left_out: an EXR export whose metadata choice included anything
  says per file what it was written without, from the new
  lcc_meta::metadata_fields. Video still carries nothing and says nothing.

Tests: codecs roundtrip::tiff_carries_the_exif_block (8-bit, 16-bit with
alpha, float; with and without compression and associated alpha: every
field reads back, IFD0 points at the file's own Exif and GPS IFDs, image,
ICC and XMP unchanged; no block, no Exif IFD; an unreadable block is an
error), engine tests_exported_contents::every_format_carries_the_metadata_or_says_what_it_left_out
(now also PSD, EXR's warning, a TIFF's Exif copyright in IFD0, and an EXR
under None says nothing), lcc-meta metadata_fields_names_the_exif_part_and_the_rest.
The codecs test and the engine test's TIFF check fail with the encoder's
Exif write taken out; the engine test fails with the EXR warning taken out;
the meta test fails without its de-duplication. exiftool reads the new
TIFFs' IFD0, ExifIFD and GPS groups.

Manual: output/export-formats.mdx (what each format holds; OpenEXR holds
none), output/export-metadata-watermark.mdx (per-format line)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
An HDR JPEG XL export with jxlLossless on was handed the export's float
profile (linear Rec. 2020 matrix/TRC, made for float TIFF and EXR), and the
encoder embeds the ICC profile in every lossless file. jixel then signals
the ICC instead of the colour encoding, so the file declared its PQ code
values linear light. The lossy file was right (it carries the enum
encoding).

encode_jxl now embeds a given profile only in lossless SDR files; an HDR
file (JxlColour::Rec2020Pq, whose samples this encoder makes PQ) always
says Rec. 2100 PQ through the enum encoding, whatever profile is passed.

Tests: codecs roundtrip::jxl_hdr_lossless_says_pq_whatever_profile_it_is_given
(lossy and lossless with the linear profile passed: the header is the PQ
enum, not an ICC; an SDR lossless file still carries its profile) and
engine tests_export::lossless_hdr_jpeg_xl_says_pq (a real HDR export,
lossy and lossless: Rec. 2100 PQ, title kept). Both fail with the old
condition put back (the header is IccProfile).

Manual: output/export-size-sharpen.mdx (PQ JPEG XL, lossy or lossless)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ta policy beyond JPEG

Mutants that passed the whole suite: the WebP VP8X EXIF flag cleared (a
reader that obeys the flag misses the EXIF), a WebP with EXIF but no XMP
written with no EXIF at all (a lost copyright), and the PQ PNG's EXIF line
deleted. The metadata policy (None, Copyright, Copyright & Contact, All, No
camera, Remove Location) was read back from a JPEG only; Edit In's own export
options and the web gallery's mapping were not checked against it.

Tests only, no product change:
- codecs roundtrip::webp_metadata_chunks_and_vp8x_flags_match_what_it_was_given:
  every subset of ICC, EXIF and XMP, lossless and lossy, opaque and
  transparent: each chunk is there once with its bytes, and the VP8X ICC,
  EXIF, XMP and (lossy) alpha bits match the chunks.
- codecs roundtrip::pq_png_carries_its_exif.
- engine tests_exported_contents::the_metadata_policy_holds_in_every_format:
  JPEG, PNG, TIFF, WebP, PSD, JPEG XL and AVIF x every choice x Remove
  Location, read back from the file: rights, contact (Copyright has none,
  Copyright & Contact has), description, keywords, camera, position and
  place; AVIF holds the Exif part only.
- engine tests_edit_in::edit_in_copies_follow_the_export_metadata_policy:
  Edit In's TIFF and PNG copies carry no position inside a private place.
- engine cmd::web::tests::gallery_images_follow_the_export_metadata_policy:
  thumbnails none, large images All or Copyright only.

Each fails with the matching break put back: the EXIF flag cleared, the
EXIF check dropped from the WebP early return, the PQ PNG EXIF line deleted;
Copyright adding the contact, Remove Location not clearing, No camera
keeping the camera; private places ignored (Edit In); gallery thumbnails
given a policy. The gallery's `remove_location` mapping is redundant under
Copyright (export_metadata already returns no location), so breaking it
alone survives.

Manual: none, no user-visible change

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…r, instead of writing the wrong bytes

`app.export {preset: "JPEG (Small)", path: "/x/a.png"}` validated: the preset's
`format` beat the extension of the caller's exact path (`export_format`), so JPEG
bytes were written to `a.png`. The headless extension fix-up only runs when the
merged params have no `format`, and the preset supplies one.

`Session::export_params_or`, the one merge step the desktop app, the headless
backend and the CLI share, now refuses a preset whose format names another than
the extension of `path`, with a message naming the extension to give. Unchanged
on purpose: a path that names no format, the same format under another spelling
(jpg/jpeg, tif/tiff), a preset without `format` (follows the path), `Original`
(takes the source's own extension), and the call's own `format` beside its own
`path` (the format named wins, as documented and as an existing test pins).

Tests: engine tests_export::a_preset_format_is_refused_against_a_path_naming_another
(refusals, agreeing spellings, unnamed extensions, Original, null path, explicit
format unchanged) and mcp tests::a_preset_format_never_writes_a_file_named_for_another
(through the headless backend and the `export` tool: nothing written). Both fail
with the check turned off (the second one wrote a JPEG into `a.png`).

Manual: none, no user-visible change in a page of the manual (docs/mcp.md and
docs/control-protocol.md describe the refusal)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…vious and a preset saved from it

After an export that used Choose folder later, `last_export` held the folder the
picker returned in `dir`. Export with Previous replays `last_export`, and
`app.export` asks for a folder only when it has no `dir`, so the replay (and an
`export.savePreset` without `params`, which saves `last_export`) wrote into the
earlier folder without asking. The existing test said "the next export asks
again" but only checked that `destinationMode` was `chooseLater`.

`ExportOptions::without_chosen_folder` drops `dir` from stored settings whose
mode is Choose folder later (any other mode keeps its folder, a setting as in
Lightroom's presets). Export with Previous and `export.savePreset` without
`params` use it; the mode stays in what is remembered, and the folder stays in
`last_export` for the dialog's prefill and Settings.

Tests: engine tests_export::choose_folder_later_keeps_the_mode_not_the_folder
(the helper per mode, a preset saved from such an export) and the existing ui-egui
headless test export_choose_folder_later_asks_when_the_export_starts, extended to
run `app.exportPrevious` twice and assert the folder dialog is asked each time and
the files go to the folder given now. Both fail with the fix taken out.

Manual: output/export-location, output/export-presets

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ks and destination and records Previous Export

A run of several presets from a command caller (`export.runPresets`: MCP, the
CLI, the control channel) only marked the photos exported. Unlike `app.export`
it skipped the enabled plug-in export hooks and any plug-in export
destination, and never made the photos Previous Export; the app's own run
skipped Previous Export too and had no way to name a destination.

`run_command` now does what a single export does once its files are written:
marks the photos exported, records them as Previous Export, and calls the same
`cmd::plugins::after_export` on every file of the run (results in `plugins`).
`export.runPresets` and `app.runPresets` take `pluginDestination`
(`{plugin, destination, args?}`, validated up front by one shared
`is_plugin_destination`, also used by `app.export`); the app hands it to the
export task whose poll already runs the hooks on a worker, and records
Previous Export when the run starts, as `app.export` does. Not done, because
they can't mean one thing for several presets: Apple Photos (a preset that adds
to it was already refused) and Export with Previous (a run has no single set of
options to repeat); both are stated in the manual and the command help.

Tests: the engine runs a real hook plug-in and destination (hook then
destination, none without a plug-in, an unknown destination reported, Previous
Export set) and refuses malformed destinations before writing; the UI checks
Previous Export after a run and that the task carries the destination. They
fail with the old behaviour put back.

Manual: output/export-presets

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Problem: the DNG export branch called lcc_raw::decode directly, skipping
the per-camera decoder dispatch every other raw read goes through. A camera
set to LibRaw (or one only LibRaw reads) was exported from a different
mosaic than the one the photo shows, or failed to export.

Change: the DNG branch of export now reads through raw_decoder::decode.

Tests: dng_export_reads_the_raw_with_the_cameras_chosen_decoder installs a
stand-in LibRaw for the camera and checks the exported DNG holds its mosaic;
it fails with the direct lcc_raw::decode call put back.

Manual: reference/settings (Raw decoder)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Problem: Email Photo promises small sRGB JPEGs, but a video clip in the
selection takes the rendered-video path, whose size comes only from
videoMaxSide; longEdge does not size a movie. Email Photo never set it, so
the whole clip was transcoded at full size and attached.

Change: Email Photo's export options now also set videoMaxSide to the same
long edge it uses for the stills (its 100..8000 range is inside the movie
range 16..8192; the movie is never upscaled). Only Email Photo changes: the
Export dialog and other exports keep longEdge meaning stills only.

Tests: options carry videoMaxSide at the range's ends and the default; an
end-to-end run of Email Photo on a real 320x180 clip gives 160x90 at a 160
edge and the clip's own size at 320 and 640. It fails without the
videoMaxSide line.

Manual: library/library-tools

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ch-placement

# Conflicts:
#	crates/engine/src/export.rs
#	docs/manual-site/src/content/docs/output/export-location.mdx
fail_closed_bool had been inserted between watermark_from_json and its doc
comment, so the watermark lines documented the wrong function. Comment
position only; no behaviour change. Follow-up to #1785.

Manual: none, no user-visible change.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…a fields

Adds the smart-album fields Has Smart Preview, Has Snapshots, Label Text,
Extended Description, Any Searchable IPTC, Any Searchable EXIF and Last
Exported, and maps the Lightroom criteria for them on import.

Manual: library/collections

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Problem: lcc_pipeline::lut::to_cube replaced only double quotes in the
title, and the look export only trimmed it, so a newline in the title
(the default title holds the photo's file name, and a Unix name may hold a
newline) wrote the rest of itself as lines of the file: an injected
DOMAIN_MAX changed how the look applied with no error, an injected size or
data line made the file unreadable.

Change: one shared rule, lcc_color::cube::title_text (control characters
and the Unicode line/paragraph separators become a space, double quotes are
dropped, white space collapses, nothing left means no TITLE line), used by
Lut3d::to_cube (reached by the look export, develop.exportLut and the LUT
profile writer) and by the camera-look cube writer, which had its own copy.

Tests: unit tests of the rule (\r, \n, \r\n, quotes, a title of only such
characters, other controls, separators), to_cube, the camera-look writer
and look_cube. The to_cube and look_cube tests fail with the old code put
back (the camera-look writer already stripped controls, so only its new
spacing/empty-title assertions change).

Manual: output/more-exports

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
FX-184: put watermark_from_json's doc comment back
…iteria

Issue #1795: Smart albums: smart preview, snapshots, label text and metadata fields
…el filter or a copied-in module

plugin.uninstall {id} with a pixel filter and a plug-in sharing the id removes
neither and names both files; {file} also takes a pixel filter's module.
Installing a plug-in is refused, naming the file, when <id>.wasm already holds
another plug-in or a pixel filter module.

Manual: none, no user-visible change
Sources: own design.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
album.duplicate now accepts a smart collection (same rules) or a collection
set (everything inside it, same order and nesting, as one undo step); saved
creations in a set are skipped and counted. The Collections panel's context
menus gain Duplicate Smart Collection and Duplicate Collection Set.

Manual: library/collections

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011d8t3PUEDpG7cbcW49BKGb
Issue #1797: Plug-in install and uninstall refuse when ids clash with a pixel filter or a copied-in module
blwfish and others added 21 commits December 2, 2026 06:05
… is gone

Problem: encode_jpeg kept a second JPEG writer for ChromaSubsampling::S422
(jpeg-encoder, with its own retyped EXIF/XMP caps, XMP namespace and ICC/JFIF
writers) that nothing in the product reaches: the export, gain map, print,
book and preview callers all pass S444 or S420, and the gain map encoder
mapped S422 to S420 itself. It had to be kept in step with
jpeg_app_segments by hand.

Change: remove the S422 variant (nothing serialises it: ExportOptions does
not hold a subsampling) and the branch, so every JPEG goes through
jpeg_par with the APP segments of jpeg_app_segments. jpeg-encoder moves to
dev-dependencies (tests and the bench example still use it). The segment-cap
and roundtrip tests keep running on both real subsamplings.

Tests: no new test (dead code removed); jpeg_segment_caps and the roundtrip
JPEG tests run on 4:4:4 and 4:2:0.

Manual: none, no user-visible change

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…elds and names them

Problem: a photo whose caption, keywords, alt text or other text exceeded one
JPEG APP1 segment (65,527 bytes of Exif, 65,504 of XMP) failed its export
with "EXIF larger than one APP1 segment" / "extended XMP not supported",
naming no field and no size, and under stop_on_error ended the whole batch.
export_metadata hands the encoder the text uncapped, and the same two refusals
were written out in four places.

Change: a new step before the JPEG encode (export_jpeg_meta, used by the one
export path, PreparedExport::run) leaves out the largest text field, then the
next, until the Exif block and the XMP packet fit, and puts a warning on that
photo's result: which fields (caption, keywords, ...), each one's size, the
photo's metadata size and the 64 KB a JPEG holds, and the formats that keep
it. A gain map JPEG keeps XMP_RESERVE bytes free for its container
description. Other formats are untouched. In codecs the two caps are public
constants (JPEG_MAX_EXIF, JPEG_MAX_XMP) and one message, "<block> is N bytes,
M more than the cap that fit in one JPEG segment", replaces the copies.
Extended XMP is not written.

Tests: export_jpeg_meta (at / one below / one above the XMP cap, largest
first and only as many as needed, a notice over the Exif cap, the gain map
reserve, other formats untouched, 5 MB fields that can never fit still end),
tests_export (a 70 KB caption exports as JPEG without it, warns with its
size, and PNG keeps it), jpeg_segment_caps (the refusal names the block and
the excess), gainmap (the container description fits its reserve). Without
the fitting step the export test fails with the old error; with the cap
comparison mutated the boundary and gain map tests fail; with the old
message the refusal test fails.

Manual: output/export-metadata-watermark, output/export-formats

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…y limit

Problem: codecs exif.rs keeps its own IFD walker beside lcc-tiff, with a
different limit: it refused any directory declaring more than 4096 entries
(and any whose declared table ran past the data), where lcc-tiff reads the
first 8192 and whatever the data holds. A photo whose IFD0 held 4097 to 8192
entries read everywhere else with its Exif but lost its orientation, embedded
thumbnail and Adobe RGB hint on decode (a rotated photo shown upright).

Change: lcc-tiff exports its limit as DEFAULT_MAX_ENTRIES (the value of
ParseOptions::default().max_entries, unchanged), and the codecs walker reads
a directory through lcc_tiff::directory_entries with it: the declared count
cut to the limit and to the entries the data holds, the next IFD followed
only when the table was read whole, an empty or roomless table reads as
nothing. One copy of the limit and of the cut/fit rule. The walker reads at
most four directories per blob, so lcc-tiff's total-entry cap
(max_entries_total) cannot be reached and is not repeated.

Tests (exif.rs): entry counts 1, 4095, 4096, 4097, 8191, 8192, 8193, 9000 and
65535 with the orientation first and last, the entries read matching
lcc_tiff::directory_entries on the same bytes; the thumbnail IFD followed at
4097 and 8192 entries and not after a cut table at 8193; hostile layouts (65535
declared with three present, empty and roomless tables, self-referencing next
and Exif pointers, a table cut mid-entry, every prefix of a valid blob) end
without a panic. With the old 4096 refusal restored the three boundary tests
fail (4097 entries read as nothing).

Manual: none, no user-visible change

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011VFDreSrZaZSYHG2uVG77A
rawler declares the deprecated SPDX id `LGPL-2.1` (= LGPL-2.1-only, already
allowed); cargo deny matches ids literally. `cargo deny check licenses
sources` was rejected, now ok.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011VFDreSrZaZSYHG2uVG77A
rawler doesn't build for wasm32 (its uuid needs a randomness source), and
the xtask wasm check builds every crate there. rawler is now a
non-wasm32 dependency; on the web decode() says dnglab isn't part of
that version (the web build never enables the feature anyway).
cargo clippy -p lcc-dnglab --target wasm32-unknown-unknown -D warnings: ok.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011VFDreSrZaZSYHG2uVG77A
…d the contact sheet command has a row with a real cancel

Problem: export.runPresets and export.contactSheet run the whole job on the calling thread (the CLI, the MCP
server, or the desktop app's UI thread for the control channel). runPresets had a row but no check for a running
background export, which app.runPresets makes (so two exports could write to the same folders at once);
contactSheet had neither a row nor a cancel (`work.run(&mut |_, _| true)`).

Change: both commands now refuse while a top-level `export` row is in flight (`export::ensure_none_running`, backed
by the new `Activity::is_running`; a row being stopped still counts). The contact sheet command runs through
`Prepared::run_with_row`: one row ("Exporting contact sheet") whose cancel flag the run checks before each photo,
so `activity.cancel` stops it with no file written. The commands stay on the calling thread, as every engine
command does: moving them to a worker would change what the CLI and MCP get back, and a window already has the
background forms (`app.runPresets`, `app.contactSheet`). Where the control channel answers on the UI thread the
row's cancel button still can't be clicked until the command returns; `activity.cancel` from another thread
works. Documented in docs/background-tasks.md and the commands' help.

Tests: `the_export_commands_are_refused_while_another_export_runs` (other kinds of task don't block; an export
row, a batch export row and a row already being stopped do; nothing is written; both run once the row ends) and
`a_run_with_a_row_shows_progress_and_a_cancel_stops_it` (the row's kind, label, ✕ and counts while it runs; a
cancel stops it before the next photo and no document is made; the row ends either way). Both fail with the old
behaviour put back (no busy check; `run(&mut |_, _| true)` with no row), and the busy test fails with only the
contactSheet check removed.

Manual: output/more-exports, output/export-presets

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…d its commands refuse there

Problem: the run writes every file with the native writer (`export::write_file`), which the web build doesn't have,
yet the File > More Exports item was enabled there (no `cfg(target_arch)` on `enabled`, and `start` ran the work
inline on wasm32): choosing it made every file fail with a file-system error.

Change: `enabled` is false on the web build and `dialog.runPresets` / `app.runPresets` refuse there with a message
saying why, the way the contact sheet, Print and slideshow export items are greyed out (`!cfg!(wasm32)`). Using
the front end's own writer instead (as the web Export does) is a larger change to the shared run and not done here.
This commit also carries the release notes for FX-217 and this change.

Tests: `the_web_build_greys_out_and_refuses_several_presets` (native build on, web build off and both commands
refused, nothing opened or started; `enabled_on` / `run_on` take the build as an argument so the native test can
check the web side). It fails with the web check removed. `cargo check --target wasm32-unknown-unknown -p lcc-engine
-p lcc-ui-egui` passes.

Manual: output/export-presets

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
… from one table

Seven functions and two inline matches each re-derived what a format does with bit
depth, alpha and HDR. They agreed except in one place: Render to DNG with `hdr` on was
written as a float HDR render (`effective_depth` = F32Hdr, which the format's own
introduction says is intended: highlights above white are kept) while `hdr_output()`
said it was not an HDR output, so the Export preview and the dialog's summary treated
the file as SDR (the preview offered no HDR rendition and said the format was SDR).
`effective_depth` also mapped requests `bit_depths` doesn't list (PNG 32, AVIF 16,
JPEG XL 10) by rules held in separate match arms, and two encoders retyped
`keeps_alpha` as `matches!(Png | Tiff [| Webp])`.

Change: `ExportFormat::caps()` is the one table (offered depths, the sample format a
request is written as, keeps alpha, how HDR is written, whether an HDR file is Rec.
2020). `effective_depth`, `bit_depths`, `hdr_output`, `gain_map`, `keeps_alpha`, the
HDR arm of `effective_space` and the two inline matches read it. `effective_depth` is
now "gain map: 8-bit; HDR output: float HDR; else the format's rule for the request",
so it cannot disagree with `hdr_output` again. Render to DNG is marked as an HDR float
format, so `hdr_output()` is true for it; the file written does not change. For the
other ten formats every answer is identical to before (220 combinations compared
against the old functions). The stored-`bitDepth` drop (`drop_unfit_depth`) already
had one rule, `bit_depths`; its four call sites differ only in when the format is
known, and are unchanged.

Test: `every_format_answers_depth_hdr_alpha_and_space_from_one_table` pins every format
x request (None, 0, 8, 10, 12, 16, 32, 255) x HDR off / single layer / gain map for
depth written, HDR output, gain map and output space, plus offered depths, alpha, the
rule "float HDR depth <=> HDR output without a gain map", and that Edit In offers the
depths Export does. It fails with the old functions on the Render to DNG row.

Manual: output/export-formats

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…back to a taken name

Export, Edit In, Hard Drive publishing, a catalog's copied originals and a tethered
download each numbered a clashing name with a copy of the rule, and the copies had
drifted. Trigger -> wrong outcome: a catalog export with 10,000 same-named originals
returned the taken name after the last number (`unwrap_or(first)`), and the copy then
overwrote the file there; a tethered download fell back to `name-x.ext` and renamed
over it when that was taken; publishing fell back to the wanted name; Edit In named an
OpenEXR copy's XMP sidecar by its own search (`a.xmp` beside `a-3.exr`), so the sidecar
was named for an older copy; the limits were 10,000, 10,000, unbounded, 10,000 and
1,000,000, and one site split a hidden file's name differently.

Change: `lcc_catalog::safe_file` gets `split_extension`, `numbered_name`,
`first_free_numbered` and `NUMBERED_NAME_TRIES` (1,000,000). The export Placer (and its
`split_file_name`), Edit In (`unique_path`, with a group variant that reserves the
sidecar's name with the file's), Hard Drive publishing and catalog transfer consume
them. Transfer, publishing and the tethered download now fail with "no free file name"
when every number is taken instead of using a taken name. The tether crate sits below
the catalog and cannot depend on it, so it keeps its own loop (starting at -1 as ever)
with the same limit and the same failure. Names given in the cases that worked are
unchanged; the one name that differs is a hidden file copied to a catalog's Originals
(`.hid` is now `.hid-2`, was `-2.hid`).

Tests (each fails with the old behaviour put back: fallback to the taken name in
transfer, publish and tether; sidecar reservation in Edit In; an inclusive bound in the
helper): `numbered_names_split_at_the_last_dot_and_start_where_asked`,
`a_copied_original_takes_a_free_name_and_never_a_taken_one`,
`hard_drive_free_name_steps_over_taken_numbers_and_fails_when_none_is_left`,
`a_download_takes_a_free_name_and_never_a_taken_one`,
`a_copy_takes_the_first_free_number_and_a_sidecar_goes_with_its_file`.

Manual: library/stacks, output/publish-services

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…r in one place

The embedded-metadata block (colour profile + Exif block + XMP packet -> `EncodeMeta`)
was built four times in export (8-bit, gain map JPEG, AVIF/JPEG XL gain map, deep
samples) and three more times in Edit In (float TIFF, 8/16-bit TIFF, PNG), each with
its own copy of "which profile": the named profile of the output space in three, the
render's linear matrix profile or the named one of `img.space` in the deep encoder, and
the render's own profile or the named one in Edit In. Any rule on what goes into a file
(a strip, a size rule) had to be repeated seven times, and the two JPEG file-size
budgets each re-added the profile, Exif and XMP lengths by hand.

Change: `export::Embedded` (`new` for parts already built, `of_metadata` for a
`Metadata`, `encode_meta()` for the codecs, `len()` for a file-size limit) is the one
place; the seven sites call it. No input gets a different profile: the same choice is
made at each site, now passed as (space, the render's own profile if any). Before the
refactor the output of all 900 combinations of nine formats, five spaces, with and
without metadata, five depths/HDR settings and gain map on/off was hashed; after it,
every hash is identical (a one-off check, not committed).

Tests: `every_encode_path_embeds_the_profile_of_the_space_it_wrote_and_the_metadata_it_was_given`
(pins, on the old code too, the profile, Exif and XMP of 8-bit JPEG/PNG/TIFF, 16-bit
PNG/TIFF, float TIFF and gain map JPEG in five spaces, with and without metadata, and
the JFIF density) and `embedded_parts_are_what_the_encoders_get_and_what_a_size_limit_counts`.
They pass before and after the change by design (they pin it); the first fails when
the float profile or the gain map's space is changed at the new call site.

Manual: none, no user-visible change

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The three Auto Orient (AI) messages carried the menu triangle (U+25B8) in
every translated catalog; no shipped font has that glyph, so
`translated_catalogs_do_not_use_missing_menu_triangles` failed the full gate
on all three OSes. They now use the arrow the other translated menu paths use.

Manual: none, no user-visible change (the feature is unreleased).

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…and-and-wasm

Export: the run-presets and contact-sheet commands refuse to start beside another export, the contact sheet gets a cancellable row, and the web build greys out Export with Several Presets
Clashing file names are numbered by one rule, and a name that can't be numbered fails instead of reusing a taken one
Export: a failed sidecar under Overwrite says what stays on disk, and the CLI's render writes through the guarded writer
…ata-limits

Export: a JPEG with very long metadata leaves out the largest fields and says so, there is one JPEG writer, and the EXIF walker shares the TIFF reader's entry limit
…-profile

Export: each format's bit depth, alpha and HDR behaviour come from one table, and the colour profile and metadata are put together in one place
clydecbrown and others added 2 commits December 2, 2026 09:31
lcc_testkit::lan_tests(discovery) skips, with a System skip that names
CHROMAFORGE_SKIP_LAN_TESTS, every lcc-peer and lcc-engine test that binds
sockets on all interfaces, so a developer's Mac isn't asked about incoming
connections for each rebuilt test binary. The macOS CI-runner skip moves into
the same function and still applies only to the two tests that need
discovery. A source-scan test in each crate fails for a test that starts the
service without the check.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Issue #1845: one opt-out for the tests that start the device-sync service
@emmertex
emmertex merged commit 60f0ace into main Dec 2, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants