Main now checks each command's params against its documented list
(#15255), and the Image Processor lists `input`, not the `files` alias, so
the #14748 test that sent `files: []` got "unknown parameter" instead of
the no-source error it checks.
- Curves at 8 bit: evaluate the channel and composite curves at the 256
exact levels instead of between two entries of the 4096-entry table, so
a pencil step between levels 128 and 129 no longer gives level 128 a
fraction that rounds to level 4.
- Color Settings: a later Monitor Profile change keeps "Monitor Color"
only while the values still are what Monitor Color would set.
- Color Settings dialog: a control changed by ui.dialog.set before the
first pass shows Custom instead of becoming the baseline.
- Stored-channel edits (Lab/CMYK, CMYK Channel Mixer) mix through the
selection as v*(1-k) + o*k, exact at full coverage over huge 32-bit
values.
- Action playback: a Channel Mixer step the editor refuses reports the
refusal instead of opening the generic step editor.
- Shortcut set test: assert Cancel closes the confirmation.
- Merge follow-up: Session's colour state is reached through
ColorExt::color()/color_mut() on main now.
The scan now carries the file each stored link path resolved to, and the poll
drops it when the active document's current resolved files differ. Save As
to another folder changes what a relative link resolves to without changing
the stored path.
32-bit documents hold linear light, so the Gray extension colour there is grey 128
decoded as Image > Mode > 32 Bits/Channel decodes it (0.2159), not 128/255.
Main moved the engine to crates/engine-core and the UI to the craft
framework. The Place Embedded selection centring now lives in
engine-core's file_cmds/open.rs (beside main's new ppi field), and the
visible-canvas centre reads the view through
canvas::document_display::active_view (craft CanvasView::visible). The UI
tests answer the file dialog through ScriptedFiles and show the view with
canvas::testing::shown; the engine tests start from crate::session().
The check moves here from the preset store's corrupt-file test, which loads the
tip through the store directly; tools.setBrush is a brush command, so its pick
test goes with the brush tests.
Part of #15710
Step 7 of the engine split (#15710) moves the paint commands into their own
crate. These test changes land first, so the cut moves code and tests as they
are:
- photocraft-engine-core gets a `failpoints` feature (no default) that compiles
the allocation failpoints outside core's own test build; the paint crate's
dev-dependency on core will turn it on, so its allocation-failure tests keep
their injected failures. `allocation` is a public module and the two arming
functions are public under the feature.
- Core tests whose subject is core but whose setup ran a paint command set the
pixels through the document (`tests::fill_active`) or use a core command:
channel copy/paste/clear, Edit > Fade (setup: Invert), Actions import and
playback, patterns, file revert/save/flatten, layer-style rasterize, tone
targets, brush tip loading from the preset store, the filter mask target.
- Tests whose subject is a paint command move beside it: Edit > Fill's result
reservation failure (fill_cmds), and the filter-mask brush stroke
(brush_cmds/filter_mask_stroke_tests.rs); the filter mask save check stays in
core with the mask set through the document.
- The sampler turn test spells out the expected coordinates instead of using a
private core helper; the job cleanup test sets the live commit directly
instead of through the Mixer Brush; the ignored fill timing drops its
comparison with a private helper.
- The .atn table check accepts the paint commands it names when they are not
installed.
No behaviour change in the app.
Part of #15710
The 20s bound failed main's required artcraft-k8s-main gate after 26.86s
while the tile-count and sample assertions passed. Coverage runs have
been 20.6-24.8s. 90s still fails a canvas-wide paint.
Fixes#13620
presets::patterns::sync keeps the library's ids in a local while the presets
change (the accessor borrows the whole session); two atn_cmds tests read a step
into a local before pushing it, and clone an ActionState out of the other session.
Part of #15710.
scripts/engine_split/slot_access.py rewrites the slot fields to their accessors
(Tracked presets deref through one more *), adds the trait imports, turns
s.presets_changed() into presets::presets_changed(s) and points Session::method doc
links at the trait methods. Its fix mode applies what cargo check reports; branch
mode serves open branches and lists their edits to the moved methods. The
definition-span helpers session_state.py uses move to rust_source.py so both
scripts share them (session_state.py's output is unchanged).
This commit is split plus the fix rounds against cargo check of engine-core,
engine, ui-egui and automation (lib and tests). Part of #15710.
ColorState, Tracked<PresetState>, ActionState, ObjectFinderCache, SubjectCache,
Option<Spooler> and Option<PrinterSource> leave Session and become slots, registered
in their owner crate's group of install.rs. Each owner module reads its slots through
one extension trait (ColorExt, PresetsExt, ActionsExt, SmartSelectExt, PrintExt), and
the inherent Session methods outside core-bound files move onto traits (ColorExt,
LinkWatchExt, PresetsExt, PresetStoreExt, SavedPrefsExt). Private helpers become free
functions; presets_changed stays crate-private as a free function.
A session without a slot (made before the install, or after a conflicting one) reads
it at its default and gets it on the first write, as its fields did; its commands
still fail with the install's error. Part of #15710.
In engine-core a bare Session::new() has no commands installed (NotInstalled);
main's tests use crate::session() / crate::install(), so the 33 tests the
batch added under crates/engine now do the same.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
crates/engine/src keeps only facade.rs on main; color_cmds.rs in engine-core
already includes the file at ../color_settings_presets_tests.rs.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
- slots.rs: SlotInit, Install::slot, Session::slot/slot_mut (a missing slot is the registry's error); the preset store is the first slot (preset_store::PresetStoreExt)
- state.rs: the small Session state types and what they need; their modules re-export them
- actions_record.rs: ActionRecording (s.recording) takes the recording and playback fields out of ActionState
- action_history::history_policy_in_use; Clip::from_svg becomes edit_cmds::clip_from_svg
- prefs/saved.rs: SavedPrefs, its readers and the methods that combine preferences, colour settings and presets; ScriptEvents and ShortcutSet move into prefs
- hooks: document_closing, doc_id_reserved, pixels_edited
- tests that compare a whole ActionState also compare s.recording
#7597 started value-checking image.adjustments.*. The new checker only
allowed layer to be an id or a string, so a recorded Action's
{"name":"Receiver"} was rejected and preview_document returned None
in review_mask_action_context_matches_the_addressed_layer. Accept the
same selectors explicit_layer already reads.