Run the existing panic hunt as eight ignored Nextest cases in one test binary, preserving every command and input, the harness self-test, and the 180-second deadline per test process.
Set RAYON_NUM_THREADS=4 for the Linux gate and no-HEIF job. That limits the default global Rayon pool per process; it does not cap total Nextest concurrency or demonstrate that cluster contention or OOMs are fixed.
The eight cases and self-test passed in hosted Ubuntu and Windows on the earlier merge preview and in the scoped current-main Linux validation. The latter used Rayon two.
Main now has #18016's same_mode_and_depth and #18015's opening default.
fill_source_usable now also requires the same colour mode and bit depth,
so the Fill dialog greys History for a mode or depth mismatch too; the
tests cover 16 Bits/Channel and Grayscale.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The channel check refused a single colour channel of an RGB document and let
two of the three through, erasing them. The reference application refuses any
target that does not cover the composite, so compare the targeted set's size
with the document's colour channels instead of testing for exactly one.
Existing tests pinned the old, unmeasured two-of-three behaviour: the
partial-set matrix now covers CMYK and Lab only, the transparency-lock preview
test targets all three channels, and the multi-channel integration tests check
the refusal on the Background and resolve a named layer on the composite.
Edit > Fill ignores a phase now, so only its angle cases still expect
an error there; Fill's phase cases live in pattern_phase_tests.rs.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
In a Grayscale document Edit > Fill with Color or Foreground Color wrote the
colour's plain luma (blue gave 29). Both now go through swatch_in_doc as
Background Color already did (blue gives 70; the reference measured 69).
Picked CMYK inks are still matched on the colour as picked, and other modes
are unchanged.
The fill-layer test no longer expects a Grayscale Solid Color layer to equal
Edit > Fill; the layer was not measured and keeps its luma grey.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The toolbox background colour went into the composite as RGB and came out
as its luma (117 for RGB 0,200,0); Edit > Fill converts it through the
gray working space (172). Use the same conversion (swatch_in_doc).
Fixes#17308.
The Fill dialog asks the engine whether `edit.fill` with History would find
a usable source (history_source::fill_source_usable, built on
checked_source) and greys History in Contents when not, so the dropdown and
the command never disagree. Today that is a source of another canvas size;
a mode or depth refusal added to checked_source follows on its own.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The Pencil's colour goes through craft-cms into the document's gray
(relative colorimetric, black point compensation) instead of the
Rec. 601 luma sum: the gray profile in 8 and 16 bit, its linear version
in 32 bit. 30,120,200 paints 63.9 % ink in Gray 8 and 82.7 % in Gray 32
(reference 63.5 and 82.7). Masks, channels and documents outside the
default gray working space keep today's colour.
Rename Layer, Layer Color and Hide Layer now read "Name Change", "Color Change"
and "Layer Visibility" in the History panel, as the reference application's
row rename, Colour menu and Hide item do. Showing a hidden layer keeps its
current name, which the issue leaves unmeasured.
Co-Authored-By: Codebuff <[email protected]>
With two or more layers selected the command is disabled and a call
without a layer is refused with the reason; a call that names its layer
converts that layer as before.
The reference application names the single History state that Layer > New >
Background from Layer adds "Convert to Background", so `background_from_layer`
now passes that name to `Session::edit`; the command label reads "Background
from Layer" like the menu row in `crates/ui-egui/src/menu_catalog.rs`. Pixels,
stacking, refusal cases and undo/redo are untouched.
New integration tests in crates/engine/tests/it/background_from_layer_history_name.rs
drive the command headless: one new state, its name, undo/redo keeping it, and
the opposite conversion's "Make Layer" state next door still intact.
The Layers panel's Collapse All Groups runs layer.setExpanded with
{all: true, expanded: false} and no layer. The whole command was treated
as a view change, so closing every group left nothing for Edit > Undo;
Photoshop records one "Collapse All Groups" step for it. The layer-less
close-all now goes through Session::edit with that label, so one undo
reopens the groups that were open. A single or row-addressed toggle,
the open-all form and a close-all over an already-closed tree keep
today's no-step view change.
layer.ungroupLayers left only the topmost former child selected: the edit set
the active layer while the selection still named the removed group, so
fix_selection collapsed it to that one layer. Ungroup now makes every former
direct child the selection with the topmost one active (measured reference row),
the same reselect path Group Layers uses; ungrouping an empty group keeps
today's fallback target. Tests in the new engine integration file cover the
plain group, replacing a selection that held a second layer, a group
holding a group (one level up), and undo restoring the group and the
previous selection.
Fixes#17362
Both recovery checks compared the canvas after the History Brush click against
a pixel the canvas already held: a paint command that returned Ok without
touching pixels passed them, and the deleted-snapshot check looked only at the
red channel. Turn the canvas blue after capturing the snapshot, assert the
canvas changed, and compare all four channels with the captured pixel, so the
assertions fail when the brush paints nothing.
Thumbnail Ctrl+click and Select Pixels are Load Selection (Selection
Change for a shape or a vector mask), Shift+click and the chain name
their direction, and a mask drop is one Add Layer Mask step. The menu
calls (no layer id, plain toggles) keep their names.
Settings saved before the checkbox (#14243) held one number, with 1 meaning off. Any number up to 1
loaded as the box off with 1.45, so a hand-edited 0.5 was silently replaced and not reported. Only
exactly 1 is the off sentinel now; a smaller number is reported as an invalid preference and loads
as 1.45 with the box on, as an out-of-range value in the new format does.
The round-one review found that the new default reaches one more report than the local gates covered:
apps/photocraft-cli/tests/it/orientation.rs compares the whole info JSON of a .pcraft with the same
file re-saved, ignoring the path and the names it knows vary. historySource now names the open
snapshot, which carries the document's own name, so the two documents differed. The test's own
ignore-list grows by that name; the command's report is unchanged, and it still has to match
shape for shape.
Same review: the Art History Brush and Fill > History share the document's one source, so the new
default is pinned for them too where the open snapshot and row 0 hold different pixels; a snapshot
taken with replaceExisting under the document's own name drops the open snapshot (ids are never
reused), which takes the default source with it; the panel's source column gets its first click
test; and a source set on the row that is current when a play folds its steps is pinned through the
play. The fill-keys help line and module header still promised the oldest state held, and two test
comments said the same; they name the open snapshot now.
The History Brush, Fill > History and the Art History Brush restore from one
per-document source. With none set in the History panel the engine asked the
history for it, and the history answers row 0: the oldest state still held.
Once the history is full row 0 is a recent step, so a click painted that step
instead of the image the document opened with.
The default now resolves to the open snapshot, the first History panel
snapshot (the document as opened, named after it), which the states' trimming
never removes. The engine records its id per document, together with the id of
a state chosen with history.setSource - the history reports row 0 both for a
chosen row 0 and for nothing chosen, and it must not be edited here. Deleting
that snapshot leaves the default empty, as for any deleted source; with
History Options > Automatically Create First Snapshot off the default keeps
today's behaviour, the oldest state held.
Blend Text Colors Using Gamma was a 1.0 to 2.2 slider where 1.0 meant off, so turning it off and on lost a custom value. ColorSettings now keeps the field's value (blend_text_gamma, 1.00 to 3.00, two decimals) and the box (blend_text_gamma_on) apart; text_gamma() is what the compositor blends in (1 while the box is off), and the compositor takes up to 3.00. edit.colorSettings still takes a bool for blendTextGamma (the box alone) or a number in range (the value, and the box checked), plus blendTextGammaOn. The dialog shows the checkbox with the field beside it: typing a value checks the box, focusing does not, an out-of-range value alerts "A number between 1.00 and 3.00 is required. Closest value inserted." and an emptied field puts its value back. Settings saved as one number still load: 1 as the box off with 1.45, any other value as the box on with that value (#14243).
Engine split step 8 moved Auto-Align Layers to engine-vector, so the
playback and Undo test in engine-core built a session where
`edit.autoAlignLayers` isn't registered, and no longer exercised the
real command. It moves to the engine integration tests
(`atn_auto_align_play.rs`), where `Session::new()` installs every crate's
commands, and now also checks that playing the step adds one history
state. The import and export tests stay in engine-core.
A PNG frame is flattened for its Alpha Channel choice before the export
pipeline's scratch check, which then saw only the matted copy: a failed
source read could be written as placeholder pixels. Guard the source
frame with Artboards to Files' ScratchGuard across the flatten.
The PNG check compared the literal "png", so ".png" (which the encoder
writes as PNG) skipped the option; resolve the format as io does.
- A duplicated action set goes right after its source on next.
- The Mixer test clicks inside the first green pixel: a click right on the edge maps back a hair short of it.
- Tests install NoWindows: on Windows SystemWindows tells the real mouse, which next's OS file drops follow, so the
tab-drop test read wherever the runner's cursor was.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Auto-Blend collected only the selected pixel layers, so with a type layer or a smart object in
the selection it blended the pixel layers and ignored the rest. The reference application
refuses: the command is not available and no history state is added.
Gives Auto-Blend its own enabled check (a type layer or smart object among the selected layers
makes it unavailable) and the same guard at the start of the run. Auto-Align keeps its check.
With Align Edges on by default the stroked layer renders on 20..81 and
View > Snap To pulls the y = 80 press onto that edge; the test now makes the
layer without Align Edges.
Co-Authored-By: superplay2021 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The PR snapped shapes with a per-edge heuristic (pixel_align.rs, dash-cap tie
rules, a PSD coordinate-frame field threaded through engine, format and caches),
defaulted the option to off, and renamed the existing Rectangle/Triangle
"Align Edges" checkbox to "Snap Bounding Box" next to a second checkbox.
The reference application fits the whole shape at render time: the bounds of
what it paints (fill, or the stroke's outer edge) get a whole-pixel left/top
(a half rounds up) and a whole width/height, and the path is translated and
scaled into that box. Fill and stroke take one transform; curves stay
antialiased; inner edges of several subpaths are not snapped.
- photocraft_vector::align_edges implements that rule; CompiledShape applies it,
so caches, the compositor, previews and extents agree; the fill/stroke split
under layer effects starts from the whole shape's transform.
- Removed pixel_align.rs, the rasterizer helpers it needed, the document-space
drag preview and psd_coordinate_frame (rounding the bounds absorbs the PSD
quantization it was for).
- One Align Edges checkbox (ToolOptions::align_edges, stored and scripted as
useAlignedRendering, older align_edges still read) on every shape tool and the
Pen, on by default and after Reset Tool; it snaps the drag and sets the layer.
- PSD sn2P: written as 1 when on and left out when off, as the reference saves it.
- Dropped the dead path.set param, moved the control-protocol paragraph,
rewrote docs/pixel-aligned-strokes.md, reverted the unrelated raw, font,
Cargo and test-harness changes.
- Tests reproduce the measured cases (rectangles at .25/.4/.5/.6/.75, ellipse
extremes and curve symmetry, 1/2/3 px strokes, rotated rect, Pen triangle,
two subpaths, toggle off, stored path unchanged, one checkbox, Reset Tool).
Co-Authored-By: superplay2021 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Edit > Define Pattern composites the area in the document's pixel format, which stores an Indexed Color document expanded to RGB. Nothing on Pattern said where the tile came from, so a pattern taken from an Indexed image was indistinguishable from an RGB one, and a tool that cares about the difference had nothing to read.
The new field names the source mode. The pixels, the id and what the pattern library lists stay as they were. A pattern read from a file records no source: a .pat or PSD block says what its pixels are, not which document they came from. The library index and .pcraft carry the field, so a defined pattern keeps its source across a restart or a save; files written before it read as no source.
With Path Selection, Delete removes the selected components of a shape
layer, saved path or vector mask (path.deleteComponents), or the targeted
saved path when nothing is selected, instead of deleting the layer.
The Properties panel Fill and Stroke popovers now hold the screen pick and
feed the sampled colour back, as the options bar does.
Fixes#13269
Co-authored-by: Dan <[email protected]>