Commit Graph
77 Commits
Author SHA1 Message Date
aiongg ac0dfaf774 Engine tests before the vector cut: the closed-doc check's coverage floor is a share of core's commands
Core's test process installs only core's commands, so the count of checked commands drops at
each crate cut; the floor is now 85 % of the commands with a parsed doc (91 % today, before and
after the vector cut).
2026-11-24 01:35:39 +00:00
aiongg 4b67fd4b9b Engine tests before the vector cut: the .atn table's commands are checked against the app's registry order
Core's own tests install only core's commands, so the check that every command the .atn table
names exists reads crates/engine/src/install/command_ids.txt, which lists every engine crate's
ids, instead of a list of the commands other crates register.
2026-11-24 00:56:26 +00:00
aiongg bdb340c21c Engine tests before the vector cut: source cache statistics, core cache tests in core, pattern fill placement in the paint tests
Step 8 of the engine split moves the vector commands into their own crate. The
tests in those files that read core's cfg(test) counters, or test core's own
smart-object caches, are changed first:

- smart_cmds::source_cache_statistics() counts SVG source renders and native
  source bytes hashed per thread; it replaces the cfg(test) counters, and the
  test-only memo limit override goes.
- The WarningRenderSources memo tests and the native digest test move to
  core's smart_cmds source_work tests; the digest test sets up the source and
  its verified preview through the document instead of running the vector
  update, with the same assertions.
- The ignored 24 MP update timing test is removed: its memo-off pass needed a
  test-only production setting.
- rasterize_style's tests fill their layer through a local helper instead of
  core's test helper.
- The pattern placement checks for edit.fill and paint.bucket move to the
  paint tests in tests/it, where those commands are installed.
2026-11-23 22:30:00 +00:00
aiongg 3ab64de0ff Move the batch's paint-dependent core tests to the engine crate 2026-11-23 20:54:27 +00:00
aiongg ff2588c2ca Merge storytold main into engine-split-step7 2026-11-23 20:51:19 +00:00
David Mann 5a0390b711 Merge #15629 into the merge queue batch
Canvas Size: Gray extension colour, 128,128,128, also in recorded steps (#14543)
2026-11-23 20:46:50 +01:00
David Mann 965bed1b58 Merge #15400 into the merge queue batch
Place Embedded: centre on the selection, else on the part of the canvas in view (#14102, #14103)
2026-11-23 20:46:45 +01:00
aiongg dc7005d4a4 Engine split step 7: the main batch's core tests that run edit.fill move to the top crate's tests/it 2026-11-23 19:44:48 +00:00
aiongg f226fdc42d Merge remote-tracking branch 'upstream/main' into engine-split-step7
# Conflicts:
#	crates/engine-core/src/cmd/mode_cmds.rs
2026-11-23 19:41:31 +00:00
David Mann a17f46be57 Merge remote-tracking branch 'origin/main' into batch-19-prs-restored 2026-11-23 17:36:02 +01:00
aiongg f4fbdea3c5 Merge remote-tracking branch 'upstream/main' into engine-split-step7 2026-11-23 15:28:07 +00:00
aiongg cbb670962b Engine split step 7: the History Brush format checks' tests move with them to paint's history_source 2026-11-23 15:28:07 +00:00
aiongg 8301a166df Engine split step 7: each engine crate lists its own incomplete-docs commands (handed to the install; core's param_check reads the installed set) 2026-11-23 15:23:10 +00:00
aiongg 9277ac1673 Engine split step 7: hand fixes for the moved tests (test-local copies, flate2 dev-dependency, unused imports, dead test helpers) 2026-11-23 15:08:36 +00:00
David Mann 31b5cf9ea4 Image Processor test: pass the empty file list as input
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.
2026-11-23 16:06:47 +01:00
aiongg a7fd5975a5 Engine split step 7: core tests that run paint commands move to the top crate's tests/it (move_tests.py and its output) 2026-11-23 15:06:31 +00:00
aiongg 850e73c5fb Engine split step 7: the paint crate (installs per crate, registry order from command_ids.txt, helpers moved down, paint-only helpers moved up, live-stroke traits, admit hook, tooling) 2026-11-23 14:16:34 +00:00
aiongg 1086d71fd9 Engine split step 7: engine_cut.py and its paint split (paint modules to crates/engine-paint/src) 2026-11-23 14:06:43 +00:00
aiongg 95334485a6 Merge PhotoCraft main (installed_catalog); craft-libs at next 5c5e0d52c3 2026-11-23 14:03:56 +00:00
David Mann 42236a89fa Merge remote-tracking branch 'origin/main' into HEAD
# Conflicts:
#	Cargo.lock
#	Cargo.toml
#	crates/engine-core/Cargo.toml
#	crates/ipp/Cargo.toml
#	crates/ui-egui/src/tools/analysis/tests.rs
2026-11-23 14:58:08 +01:00
aiongg b0b1718695 Merge pull request #16499 from aiongg/link-scan-save-as
Drop a link scan taken against the old folder after Save As
2026-11-23 08:55:27 -05:00
aiongg 4b52711068 Merge pull request #16487 from aiongg/engine-split-cuts7
Engine tests before the paint cut: failpoints feature, setups without paint commands
2026-11-23 08:55:14 -05:00
aiongg fb5728628a Merge pull request #16486 from aiongg/ui-dead-files
Restore features lost in files no module compiles; delete those files; strict dead-file guard
2026-11-23 08:55:00 -05:00
David Mann 81cc69f17e Address CodeRabbit review; follow main's colour state accessors
- 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.
2026-11-23 13:31:11 +01:00
David Mann a461a65ceb Merge remote-tracking branch 'origin/main' into HEAD
# Conflicts:
#	Cargo.lock
#	Cargo.toml
2026-11-23 13:08:36 +01:00
Dylan M. Taylor 97daf92f58 Merge PhotoCraft main for live font updates
Resolve the manifest and lockfile by using canonical craft-libs next for the live font stack while preserving main’s Camera Raw dependency pins.
2026-11-23 07:05:53 -05:00
aiongg 83d04ac4d9 Drop a link scan taken against another document folder
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.
2026-11-23 10:22:10 +00:00
FredApps 17db1ba448 Merge remote-tracking branch 'upstream/main' into inbox-15255 2026-11-23 10:57:42 +01:00
ljkx 446dd0e38b Canvas Size: Gray keeps the background colour in an Indexed document
Indexed documents were not measured (#14543), so they keep today's behaviour.
2026-11-23 10:32:52 +01:00
ljkx 657abde676 Canvas Size: read the params doc from the installed registry in the test 2026-11-23 09:58:44 +01:00
ljkx 9c6e55f7d7 Canvas Size: Gray is linear grey 128 in a 32-bit document
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.
2026-11-23 09:48:26 +01:00
ljkx 3407dfd7d9 Merge main into fix/14543-canvas-gray 2026-11-23 09:42:27 +01:00
ljkx 440f153c6e Merge main into place-embedded-centre
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().
2026-11-23 09:03:24 +01:00
aiongg 4c6008cfd3 Brush tests: a failed tools.setBrush pick of a preset with a broken tip keeps the current brush
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
2026-11-23 06:57:18 +00:00
aiongg 5ce2127686 Engine tests before the paint cut: failpoints feature, setups without paint commands
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
2026-11-23 06:40:47 +00:00
aiongg 715a8876b0 Merge pull request #16478 from aiongg/engine-split-step6
Engine split step 6: session slots and extension traits
2026-11-23 01:10:33 -05:00
aiongg 6afdd3c3d4 Pin craft-libs to ee30b17c21 (Select and Mask previews after a document edit, #3140, #3145) 2026-11-23 06:06:58 +00:00
FredApps 5b1214ab8a Keep the huge-canvas selection time bound at 90s
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
2026-11-23 11:10:23 +07:00
aiongg cf80a283f2 Engine split step 6: cargo fmt 2026-11-23 03:28:48 +00:00
aiongg 3f9eb0d59d Engine split step 6: compile fixes the script can't make
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.
2026-11-23 03:28:27 +00:00
aiongg 3cbd7b155a Engine split step 6: slot_access.py and its rewrite (slot fields to accessors, trait imports, doc links)
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.
2026-11-23 03:28:27 +00:00
aiongg f314928e1d Engine split step 6: session slots for colour, presets, actions, Object Finder, Select Subject, print; extension traits for the upper crates' Session methods
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.
2026-11-23 03:10:48 +00:00
aiongg 280de1fbf2 Pin craft-libs at 7ab3cf8196 (a rescan with no changes keeps the catalog generation) 2026-11-23 02:43:24 +00:00
aiongg aedabc93fa Merge PhotoCraft main; keep craft-libs at bb7e01295d 2026-11-23 02:25:25 +00:00
David MannandClaude Opus 5.5 3d914bce78 Pin craft-libs next a4e08cdaf2: crop move of a turned document, docked toolbar column and grip cursor (craft-libs#3104, #3105)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-23 02:22:09 +01:00
David MannandClaude Opus 5.5 859fd07b24 test(engine-core): the batch's new tests start from crate::session() after the engine split
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]>
2026-11-23 02:22:09 +01:00
David MannandClaude Opus 5.5 66428d818e Move the batch's Color Settings preset tests to crates/engine-core with the engine split
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]>
2026-11-23 02:22:08 +01:00
David Mann 0888f27f1d Merge #15187 into the merge queue batch 2026-11-23 02:22:08 +01:00
aiongg f9438dbdad Engine split step 5: session slots, state types in core, action recording split, prefs file document, closing hooks
- 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
2026-11-23 01:12:57 +00:00
aiongg 30bb60592b Engine split step 5: session_state.py and its rewrite (recording fields to s.recording, Clip::from_svg callers, preset store reads) 2026-11-23 01:05:50 +00:00