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.
The relocation check matched only the definition's name in the changed
lines, so a branch that changed a line inside builtin() got no report.
It also compares each hunk's old-side line range with the definition's
lines (doc comments and attributes included) in the base version.
- 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
Pick up the shared Camera Raw fixes#3091, #3088 and #3089. The pin
stays before craft-libs#3101, which PhotoCraft's GPU route cannot follow
until photocraft#13519 is ported.
Dragging the toolbar over the canvas offered a box drop area beside it, and
a release there docked the toolbar in a frame of the docked tree, with a
panel header like a window. The toolbar now sets the dock permission
docks_outside_columns(false) (craft-libs#2099, in the pin): the model
refuses every frame placement, so no box shows, and a workspace saved with
the toolbar in a frame loads with it in a dock column.
Tests: the_toolbar_never_docks_beside_the_canvas,
a_saved_toolbar_below_the_canvas_loads_in_a_dock_column; both fail without
the permission.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Core runs every command; the steps that belong to crates above core now run as hooks those
crates register with their command tables (Install.hooks, crates/engine-core/src/hooks.rs):
request params (batch open), redirect (Last Filter), parameter checks (file.new values, filter
params, through validate_params in dispatch and precheck), before the command (the floating
selection drops), run params (Shape Blur's path), after the command (mask view, Fade, script
events and slices, preset store sync), recorded steps keyed by command id with a default, step
origin, journal coalescing, recording flush and preferences applied. install.rs registers every
hook, grouped by the crate that will own it. Before an install there are no hooks, as the
registry lists no commands.
The recording predicates replayable, tool_stroke, shell_view_command and shell_save_command,
and recorded_params, move to actions_record, beside the rest of the recording normalisation;
actions_cmds re-exports the public ones.
The redraw-area helpers (step_damage and the rest of cmd/layer_multi_cmds/damage.rs) are
pipeline logic that dispatch, edit, undo and redo use, so they leave the module the model
crate will take. layer_multi_cmds keeps its public re-exports.
- Close in a floating window closes its document through the guarded
close (a document with unsaved changes asks first, the window stays
meanwhile), as in the reference application; a New Window for Document
view still only closes itself.
- The placed rect is the outer origin with the inner size: the framework
applies its size as the inner size, so a decorated window (system title
bar) grew by its frame every pass.
- The floating status bar's zoom edit uses the window's own scale.
- The Home screen and the batch preview clear the dock target.
- The OS-move release reads the mapped primary button (swapped buttons).
- The window tests use a fixed app-drawn frame, whatever the OS.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The floating window's status bar adds a third zoom field beside the main
status bar's and the Navigator's; the test picks each by its place and
types into all three.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
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.
* algo: delegate Camera Raw Filter to craft_develop::camera_raw (#587)
* algo/camera_raw: put spatial module re-exports in pub mod spatial
* algo/camera_raw: put spatial module re-exports in pub mod spatial
* algo/photo_util: gate hash01 and bilinear to cfg(test)
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
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.
python3 scripts/engine_split/crate_shell.py split, then rustfmt on the files it edited.
The sources and the manifest move to crates/engine-core; core's tests start from
crate::session() (1,673 sites), 32 tests that read the registry first install with
crate::install(), and 12 Session imports the rewrite left unused are dropped.
Along the window's bottom, as in the reference application: the zoom field
and the readout of its own document (the item picked in the main status
bar's menu, by default the dimensions). A zoom typed there sets the
window's view; picking another item changes it in both bars.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
On Windows the app-drawn frame's hit test hands the title bar to the OS,
which runs the move: the app sees neither the press nor the release. A
new primary_down service (GetAsyncKeyState) tells when the button goes
up; a window that moved and ends with the OS pointer on its bar over the
main window's tab strip docks. The drop target is the tab strip, or a
tab-high band at the top of the document area where no strip shows; the
app looks again every 50 ms while such a move lasts and repaints after
docking, so the OS window closes at once.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The press on the floating window's title bar notes where the window is;
the release that ends the OS move (the runtime adds it) docks the document
back into the main window's tabs when the window moved and the pointer is
over the tab strip, or over the document area while nothing is docked.
A click on the bar, or a drop elsewhere, keeps the window floating.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The window is placed with DocumentWindow::first_placed, whose rect the
framework re-applies on every pass; the rect never followed the window, so
a title-bar drag or an OS move snapped back at the next pass. The stored
rect now follows the OS window's outer rect while the window is normal.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
With the app-drawn frame (the default on Windows and Linux) DocumentWindow
leaves the title bar to the app's body, and the floating document window
drew only its canvas: no title, nothing to drag, no caption buttons. The
body now starts with the framework TitleBar (the document's tab title, the
move band, Minimize, Maximize and Close); Close goes the same way as the OS
close. Nothing is drawn with the system frame or on the fallback layer,
which has its own title row.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Rows of craft controls are craft Rows, scopes that only set an id salt are
with_env scopes, the Brush Settings panel sits in a craft Stack, the colour
chips in a centred craft Row, and Preferences' Advanced graphics rows in a
collapsible craft Section. The controls in them read the body's flow facts
(label column, row direction) again, which raw egui containers hid.