Commit Graph
606 Commits
Author SHA1 Message Date
FredApps 17db1ba448 Merge remote-tracking branch 'upstream/main' into inbox-15255 2026-11-23 10:57:42 +01:00
aiongg cf80a283f2 Engine split step 6: cargo fmt 2026-11-23 03:28:48 +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 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
FredApps 01bce7a310 Merge branch 'main' into feat/param-schema-dispatch
Keep the parameter-schema dispatch, including Clean Brush refusing
unknown keys and the batch test that does not pass steps to Image
Processor. Take main's engine-core split and its new session helper.
2026-11-23 05:55:52 +07:00
aiongg bc727036dd Merge remote-tracking branch 'upstream/main' into engine-precheck-params 2026-11-22 21:47:28 +00:00
aiongg 567633c2f7 Engine split step 3: the Photoshop oracle tests install the commands first
Smart filter re-rendering looks the filters up in the command registry, and
these corpus tests create no session, so they install first like the other
tests that read the registry before a session.
2026-11-22 20:18:44 +00:00
aiongg 519a0c22a3 Engine split step 3: top crate with the wrapper Session
crates/engine keeps the package photocraft-engine: src/facade.rs re-exports
photocraft-engine-core, and its Session wraps core's and installs every engine
command. Core's Session::new() installs nothing; core gets install() and session().
The command registry keeps main's behaviour (empty before an install).

The top crate's dev-dependencies cover tests/ and examples/, including
craft-develop-model (camera raw baseline test) and photocraft-testkit (the
corpus-gated Photoshop oracle test). Dependents that need the core type or
borrowed two fields through the wrapper are fixed at the call site, and tests
that reach the registry before any session install first.

Tooling follows the package: workspace dependency, cl selection, xtask layers,
i18n report, scorecard and corpus paths, nextest overrides, ci-test-times rows,
display-names roots, prefs_usage paths, the engine split scripts, docs, and the
two release-perf steps in ci.yml.

Corpus .atn paths, the layer_menu registry read and the craft-develop-model
dev-dependency are FredApps' fixes from #16431.

Part of #15710
2026-11-22 19:29:06 +00:00
aiongg a210017995 Precheck runs the same parameter checks as dispatch
Session::precheck skipped the file.new value check that dispatch runs, so a
bad file.new passed precheck and failed only at dispatch. Both now call one
function, in dispatch's existing order.
2026-11-22 19:23:37 +00:00
Dylan M. Taylor 309e4c7a65 camera_raw: preserve legacy filter renders and native preview (#16419) 2026-11-22 12:57:39 -05:00
FredApps 7ab20d8e44 Merge branch 'main' into feat/param-schema-dispatch 2026-11-23 00:06:48 +07:00
aiongg cf2e416e31 Merge pull request #15914 from aiongg/ci-pin-toolchain
ci: pin Rust, stop cache evictions, corpus tests in the gate, fewer tests per PR
2026-11-22 12:03:37 -05:00
FredApps 04d1a23e96 Merge branch 'main' into feat/param-schema-dispatch 2026-11-22 23:03:35 +07:00
Dylan M. Taylor 65fc546bba raw, camera_raw: adopt craft-develop 7631ed550 and add explicit parity tests (#587) (#16393)
* raw,camera_raw: bump craft-develop to 7631ed550 and add explicit parity tests (#587)

* raw,camera_raw: cut over develop_sensor demosaic and camera_raw::develop to craft_develop (#587)

* raw,camera_raw: fix craft_develop field names and test imports (#587)

* camera_raw: fix clippy excessive_precision and unnecessary cast lints

* raw,camera_raw: use exact gaussian_taps for sharpening, silence camera_raw_gpu dead_code, update post-cutover pins

* raw,camera_raw: fix highlights sign, <0.3px sharpen noop, non-Bayer/fused parity, and gpu test ignores

* engine: update camera_raw_filter_legacy_baseline_pixels to post-cutover craft_develop baseline

* raw,camera_raw: early-exit noop sharpen, exact full desat, PAD=6 fused margin

* raw,camera_raw: guard <0.3px texture/clarity blur and route fused band demosaic through craft_develop

* io: update default RAW Open baseline pins for craft_develop::sensor::demosaic reflect borders

* io: add Windows libm FNV-1a hash pins for RAW Open baselines
2026-11-22 10:36:03 -05:00
aiongg 3e05a3747b Merge remote-tracking branch 'upstream/main' into HEAD
# Conflicts:
#	.github/workflows/ci.yml
2026-11-22 15:29:46 +00:00
FredApps 257fc03887 Merge branch 'main' into feat/param-schema-dispatch
Keep main's command registry split, and carry the parameter-schema docs
and composed-layer option placement from this branch into the new table
modules.
2026-11-22 22:26:32 +07:00
David Mann 6983c0b381 Merge PR #15985: Tests: run the engine mode x depth x command matrices pairwise (#15932) 2026-11-22 13:25:02 +01:00
David Mann c0d7e28b78 Merge PR #16097: Live-dab replay tests cross commands, cases and depths pairwise (#15931) 2026-11-22 13:24:25 +01:00
David Mann 71495f89e5 Merge remote-tracking branch 'origin/main' into HEAD 2026-11-22 12:23:08 +01:00
FredApps 6e0e587d96 test(raw): verify Camera Raw exposure migration after native reopen (#16387)
* test(raw): verify Camera Raw exposure migration after native reopen

* style(test): format native Camera Raw migration fixture
2026-11-22 17:26:25 +07:00
aiongg 44ac69dede Merge upstream/main into ci-pin-toolchain; gate runs when platforms fails, cold cache clear keeps newer entries, panic_hunt timeout 2026-11-22 05:59:39 +00:00
FredApps c05c4c5fdf fix(raw): preserve legacy Camera Raw curve knot selection (#16373)
Normalize and deduplicate saved point-curve knots in the original f32 domain before using the shared spline. Regression tests pin the LUT and a generated native Smart Filter after save/reopen.
2026-11-22 00:34:27 -05:00
Dylan M. Taylor b8635a8323 feat(raw): wire craft-develop MonotoneCurve and craft-develop-model migrate_camera_raw (#587) (#16370) 2026-11-21 23:55:36 -05:00
David MannandClaude Opus 5.5 cf5347b545 Integration: fix the batch 27 CI failures (fmt, null Image Size percent)
- cargo fmt for the merged Tool list in paint_mouse.rs.
- The #11516 fix refused an exported Image Size step with "percent": null,
  which main's review test treats as omitted. Native playback now omits a
  null percent like a null side or resolution, and export follows it, so
  both still agree. The null case moves from the invalid-percent test to a
  new native + round-trip test.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-22 02:46:35 +01:00
Dylan M. Taylor f3f382697f test(raw): pin pre-cutover Camera Raw SmartFilter and filter baseline (#587) (#16028)
* test(raw): pin pre-cutover Camera Raw SmartFilter and filter baseline (#587)

* test(format): avoid json! macro recursion limit in camera_raw_roundtrip (#587)

* test(format): wrap SmartSource::Embedded bytes in Arc (#587)

* test(engine): use select.deselect in camera_raw_baseline_pin (#587)

* test(raw): capture legacy RAW Open and Camera Raw Filter pixel baselines (#587)

* test(raw): lock Camera Raw Filter baseline pixels and capture RAW Open values (#587)

* test(io): lock legacy RAW Open baseline pixels (#587)

* test(io): capture RAW Open camera WB legacy baseline pixels (#587)

* test(io): lock RAW Open camera WB legacy baseline pixels (#587)
2026-11-21 19:59:28 -05:00
David Mann 8e739f462e Merge PR #16024: engine: file.print.page asks no printer driver while printing is disabled 2026-11-21 19:01:43 +01:00
David Mann 2906b5b34d Merge PR #14272: Artboards to Files: the File Type list matches the reference application (#13635) 2026-11-21 17:25:13 +01:00
aiongg 292cdc6dc5 Menu model derived from MenuFacts: the facts the rows show, through their revisions or as small plain values; state_hash, had_input and the hash-keyed MenuModel go; the native menus re-sync on the bar's revision and the keymap. PresetState.rev gives way to the Tracked revision, saves that rename a document move documents_generation, and the default proof setup shares the built-in profile 2026-11-21 14:07:15 +00:00
aiongg 4c78950e68 Menu facts, step 1: session areas the rules read held in Tracked
The clipboards, the presets, the colour proofs and the image-assets list become
Tracked, so the menu's facts can key on their revisions. DocId derives PlainData
and MemoProps. UI: the recent files and the workspaces become Tracked.
2026-11-21 14:07:15 +00:00
aiongg a3eb80d5dd Memoized views: options bar lead, Brush Preset field, Brush Settings toggle, paint members, Brushes and Color panels
The picker's and the Brushes panel's view states are Tracked; the trials count memoized views.
2026-11-21 14:07:15 +00:00
aiongg cf84333049 Brush and presets are Tracked
The engine's ToolState.brush and ToolState.presets are Tracked, so a memoized view that shows them keys on their revisions; photocraft-paint's brush types derive PlainData.
2026-11-21 14:07:15 +00:00
RickiNano d56bf759c4 Live-dab replay tests cross commands, cases and depths pairwise (#15931)
Each command still meets every stroke case, colour mode and mask target
once, and every command and every case, mode or target still runs at 8,
16 and 32 bits: 90 -> 30, 72 -> 24 and 54 -> 18 strokes.
2026-11-21 11:16:02 +01:00
FredAppsandClaude Opus 5.5 f996f2fc93 engine: file.print.page asks no printer driver while printing is disabled
The panic hunt turns printing off so no command reaches a printer, but
file.print.page still asked the Windows driver for the default printer's
page. On a Windows runner that call hung while holding SPOOLER, so
file.printers, file.printOneCopy and file.package timed out behind it
and main went red (run 44791314463). It now refuses, after checking its
own parameters, when disable_printing or PHOTOCRAFT_NO_PRINT is set.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-20 22:29:14 +01:00
David Mann 55372923bd Merge #15764 into the merge queue batch
fix(actions): Load Actions waits for a running recording
2026-11-20 14:16:39 +01:00
Khawar Zamman Wani ccd450ae5a Tests: run the fused tone oracle on a small area with a matching table threshold (#15932)
tone::adjust now delegates to a private adjust_with that takes the U16
table area threshold (U16_TABLE_AREA, 65_536, unchanged for production).
The fused-tile oracle test passes the area of its small bounds, so U16
still takes the table path for the full area and the holes mask and the
tiled path for the sparse mask, without 256 x 256 areas.

Also drops the empty blocks left by the earlier loop removals in
multi_channel_editing, tone_target_picker and the tone dialog test.
2026-11-20 18:33:10 +05:30
Khawar Zamman Wani eb6bd68405 Tests: run the engine mode x depth x command matrices pairwise (#15932)
The colour-channel tests looped over every mode, depth, command and
target, although the code under test is generic over mode and depth
(restrict_coords, scatter_selected, tone::adjust). Each case now runs a
rotation that keeps every mode, depth, command and target (and the
refusal branches) in at least one case, with all assertions unchanged.

- multi_channel_editing: adjustments/filters/drawing (22 commands, one
  mode and depth each, plus both refusal sides), live brush/eraser, live
  mixer, live retouching, colour adjustments, desaturate, CMYK grayscale
  clips, mask view
- tone_target_picker: gray tone records, native gray pickers, filter mask
  picker
- tone: the fused-tile oracle keeps the 256 x 256 area only for U16, whose
  table needs it
- tone dialog: one depth per (subset, record)
- cmyk_flatten_profile: the synthesised profile uses coarse LUT grids
2026-11-20 18:28:50 +05:30
FredAppsandFredApps abad0deaea Hold the normalized layer selection across engine reads (#15907)
* Hold ordered layer selection across reads

* Migrate UI and automation to the borrowed document selection

* Fix held selection migration diagnostics

* Preserve held selection for unchanged active layer

* Keep owned selection snapshots in engine tests

* Allow consuming a document state without cloning

* Preserve document ownership on close and capture export selection

* Migrate engine integration tests to held selection

* Keep isolate-layer test selection snapshot

* Read the active layer before editing the gradient test document

* Remove redundant selection slice borrows

---------

Co-authored-by: FredApps <[email protected]>
2026-11-20 18:11:54 +07:00
aiongg 5351576daf tests: the corpus tests take a fixed sample per directory; the nightly run sweeps every file
The real-file corpus tests the Linux gate runs took up to 394 s each (the psd-tools mutation
sweep), 780 test-s together. Each now walks a fixed sample chosen for coverage (photocraft-testkit
`corpus`: every colour mode and depth, PSD and PSB, the block kinds outside the large files, each
oracle kind, smart objects, vector blocks, type) and stays under a second. PHOTOCRAFT_FULL_SWEEP=1,
the switch the testkit sweeps already read, takes every file; the nightly run sets it.

- Oracles keep floors for the sample next to the full floors.
- The mutation sweep cuts and corrupts each sampled file 12 times instead of 31.
- The layered TIFF test takes the psd-tools sample.
- The smart-object test imports only files with a placed-layer block (full sweep: 32 s to 5 s).
- The blend-mode tests import once and render only the compared cells.
- The 16.8 MP spot-channel file runs in full sweeps only; the generated files check the same reading.
- The #1606 special-shapes test is the affinity table's row for that file plus its warning check.

Part of #15711
2026-11-20 07:23:46 +00:00
aiongg 66436284a1 panic_hunt: drop the in-test deadline
Part of #15711
2026-11-20 04:14:32 +00:00
aiongg 6cef4c278a Merge pull request #15813 from aiongg/perf-15709b
Key document queries on revisions instead of per-frame walks (#15709)
2026-11-19 18:16:39 -05:00
aiongg abedab1e4d Cache History rows, artboard pages and the snap moving set on revisions
History gets a generation that every change takes a fresh number from, and
the snapshot list one through DocState::snapshots_mut, so the History rows
rebuild only when either moves. Artboard pages and the layers a Move drag
takes along are computed once per document revision; set_active_layer moves
the revision like the other layer selection changes, through one
bump_selection_revision. The view-only revision steps of history options,
the channel eyes and Isolate Layers go through bump_view_revision; Isolate
Layers still marks the document modified.

DocQueries drops every entry when the open document set changes, and counts
what it computes, which the idle trial asserts stays unchanged. Fill layers'
thumbnails key on impl Hash for Fill. A new trial checks the Layers rows'
revision follows a rename and both disclosure toggles.
2026-11-19 20:51:32 +00:00
hnoerenberg 4ff984e166 Merge upstream/main into fix/atn-panel-menu-10706 2026-11-19 19:36:51 +01:00
David MannandClaude Opus 5.5 c30a5bfbd7 Tests: the artboard export scratch test joins the global_state binary
`cargo xtask test-binaries` refuses single-file test binaries under
crates/*/tests. The test sets the scratch disk and the memory budget for
the whole process, so it moves next to scratch_disk.rs in
tests/global_state and takes the same process lock and test volume.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-19 18:36:29 +01:00
David Mann 2cadc69c17 Merge remote-tracking branch 'origin/main' into HEAD
# Conflicts:
#	crates/engine/src/cmd/artboard_cmds.rs
#	crates/ui-egui/src/lib.rs
#	crates/ui-egui/src/menus/view_cmds/dialogs.rs
2026-11-19 18:04:27 +01:00
David MannandClaude Opus 5.5 8edff6734a Tests: follow the newer framework pin
The shared live client now reads integrations.whenAppClosed inside the
framework, so the preference audit lists it as read there. The pin also
brings #12709's Add Anchor Point change (Alt on an anchor no longer
deletes it), so the anchor test expects that, as #13977 does.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-19 17:55:36 +01:00
aiongg c3e218738f Merge pull request #15716 from FredApps/speed-engine-fixtures-15707
Reduce slow engine test fixtures
2026-11-19 09:59:50 -05:00
aiongg 5e6d342b36 Merge pull request #15718 from FredApps/fix/15708-deterministic-spill
Give scratch tests a deterministic volume capacity
2026-11-19 09:58:09 -05:00
hnoerenberg 76d7d2952f fix(actions): Load Actions waits for a running recording
The Actions panel menu kept offering Load Actions… while an action was
recording or a paced playback was waiting, although `actions.load` refuses
both: the person chose a file first and only then got the error, and a load
during a recording replaces the set the recording writes into. Measured on
#10706, the reference application greys that row beside Clear All, Reset and
Replace while recording.

`panels/actions/menu.rs::states` now greys the row with the rule the command
itself checks (the framework leaves `Load` always on), and
`files::load_dialog` reports the reason before the picker opens, so a
keyboard, shortcut or control-channel route never asks for a file the
command would refuse. Two panel-menu tests are red without this change; the
new engine test pins the command's own rule, which already held.
2026-11-19 14:56:34 +01:00
aiongg a8f95bd16d Document layer index and index-ordered selection (#15704)
Document.layers is a LayerTree that builds an id index on first lookup and drops it on any mutable access. Layer lookups and selected_layers use the index instead of walking the document.
2026-11-19 10:07:19 +00:00