5410 Commits
Author SHA1 Message Date
davidmann4andautocraft-bot[bot] 30475eb688 Merge pull request #18871
Co-authored-by: autocraft-bot[bot] <354215646+autocraft-bot[bot]@users.noreply.github.com>
2026-12-02 01:07:07 +00:00
davidmann4andautocraft-bot[bot] a802dfb5c6 Merge pull request #18820
Co-authored-by: autocraft-bot[bot] <354215646+autocraft-bot[bot]@users.noreply.github.com>
2026-12-02 01:07:07 +00:00
yoriswind 36180076e8 Keep the clipped layer with its converted Background 2026-12-01 16:48:06 -08:00
dholzricandClaude Opus 5.5 71e3c51be4 Define Brush Preset: skip a taken "Sampled Brush N" ignoring case (#18228)
The preset store matches names ignoring ASCII case, so a typed
"sampled brush 1" was still replaced by the default "Sampled Brush 1".

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-12-01 18:43:23 -06:00
FredApps 712f9c4f0c Merge branch 'main' into codex/stamp-two-color-output 2026-12-02 00:41:30 +01:00
dholzricandClaude Opus 5.5 f525f28080 Define Brush Preset: skip a "Sampled Brush N" a preset already uses (#18228)
Storing under a taken name replaced that preset's tip. The default now
skips used numbers and the counter moves to the number it stored.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-12-01 16:57:20 -06:00
dholzricandClaude Opus 5.5 254e334dd0 Define Brush Preset: number "Sampled Brush N" from a session counter (#18228)
The default name was numbered from the presets whose name starts with
"Sampled Brush", so deleting the defaults restarted the count and a typed
or imported "Sampled Brush" name raised it. ToolState now counts the
defaults stored this session; the counter rises only after the preset is
stored and is not saved to settings.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-12-01 14:40:47 -06:00
autocraft-bot[bot] 532a5b32f8 Merge pull request #17974 2026-12-01 15:26:27 +00:00
David MannandClaude Opus 5.5 e03fc040c9 Merge origin/main into the batch branch; pin craft-libs at main 475f6feb (craft-libs#4589 merged)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-12-01 10:04:41 +01:00
David Mann 59a4e6a84c Merge origin/main into the batch branch 2026-12-01 06:13:47 +01:00
David MannandClaude Opus 5.5 5c96c63fbb Color Replacement: refuse one or two colour channels (#17783)
The tool recolours the full colour composite only. In an RGB document a
press, live stroke or paint.colorReplacement with one colour channel
targeted now gives "Could not use the Color Replacement tool because it
only works in full color modes.", with some but not all channels
"...because the target channels do not cover the composite.": nothing
painted, no History state. All channels still paint; other colour modes
were not measured and keep painting. The check sits in the shared
Color Replacement target refusal, so the canvas alert and the command
error use the same text.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-12-01 03:54:06 +01:00
David Mann 243aa0f7af Merge main (7f7d03bf84) into integration-batch-28 2026-12-01 02:40:39 +01:00
David Mann 5290b8aaef Merge #15888 into the merge queue batch
Initialize basic XMP for new documents
2026-12-01 01:20:24 +01:00
David Mann 8548a55429 Merge PR #18135: Quick Mask: own foreground/background pair (#17490) 2026-11-30 23:55:14 +01:00
Elvis33LE 7cbe48c80f CI: Split the panic hunt and cap Linux Rayon pools (#18439)
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.
2026-11-30 15:46:01 -06:00
yoriswind 69097bd31e Merge main for the landed thumbnail timing test fix 2026-11-30 12:56:09 -08:00
David MannandClaude Opus 5.5 d83b11f035 Merge main into fix/17464-fill-history-greyed
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]>
2026-11-30 17:12:49 +01:00
David Mann d113262efd Merge #18149 into the merge queue batch
fix(paint): refuse the Background Eraser on any partial channel target (#18096)
2026-11-30 14:56:11 +01:00
David Mann 2016c78a58 Merge #18210 into the merge queue batch
Background from Layer: convert the background colour to grey in Grayscale documents
2026-11-30 14:56:08 +01:00
David Mann d6bf92e534 Merge #18031 into the merge queue batch
Fill: ignore a pattern phase param (#17468)

# Conflicts:
#	crates/engine-paint/src/cmd/fill_cmds.rs
2026-11-30 14:56:05 +01:00
David Mann 2556678e2f Merge #18048 into the merge queue batch
Fill: colour fills in Monotone documents take the reference's grey value (#17478)
2026-11-30 14:56:00 +01:00
David Mann 76c03b7dd9 Merge #17138 into the merge queue batch
History Brush: the default source is the open snapshot (#12845)
2026-11-30 10:38:21 +01:00
kubuntugamer 5e1884e8b9 fix(paint): refuse the Background Eraser on any partial channel target (#18096)
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.
2026-11-29 22:10:58 -06:00
David MannandClaude Opus 5.5 ccd339273f Quick Mask: own foreground/background pair (#17490)
Quick Mask keeps its own swatch pair, white / black to start, kept across
Quick Mask sessions; leaving gives the normal pair back unchanged. The
pair follows the active document's Quick Mask state (undo, document
switch), is not stored with the preferences, shows grey in the toolbar's
colour chips, and Edit > Fill's Foreground / Background take it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-30 04:35:12 +01:00
David MannandClaude Opus 5.5 f1b68ea9bc Fill: the non-finite phase test now covers Paint Bucket only (#17468)
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]>
2026-11-30 01:24:33 +01:00
David MannandClaude Opus 5.5 57e7779ed8 Fill: Color and Foreground Color convert to the Grayscale document's grey (#17469)
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]>
2026-11-30 00:56:57 +01:00
qvest-ssels 394b380e48 Background from Layer: convert the background colour to grey in Grayscale documents
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.
2026-11-30 00:24:32 +01:00
David MannandClaude Opus 5.5 8fbc6fa707 Fill: grey History in Contents when its source does not match (#17464)
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]>
2026-11-29 23:26:05 +01:00
dholzricandClaude Fable 5.2 7f6e2865b5 Quick Mask: name the enter step "Enter Quick Mask" in History (#17493)
Entering Quick Mask recorded the History state "Edit in Quick Mask".
The reference application names it "Enter Quick Mask". Only the step's
label changes; the menu item keeps "Edit in Quick Mask Mode".

Co-Authored-By: Claude Fable 5.2 <[email protected]>
2026-11-29 11:14:40 -06:00
David Mann a3fc971484 Merge #17886 into the merge queue batch
Name the Transform Again history step
2026-11-29 15:32:29 +01:00
David Mann ed90cf7501 Merge #17524 into the merge queue batch
Layers: Background from Layer is greyed with several layers selected (#17306)
2026-11-29 14:15:36 +01:00
Dan f55005ce12 Name the Transform Again history step (#17860) 2026-11-29 12:34:29 +00:00
qvest-ssels 38a3b5f5b6 Merge remote-tracking branch 'origin/main' into mm-17524
# Conflicts:
#	crates/engine/tests/it/main.rs
2026-11-29 12:28:39 +01:00
qvest-ssels cd8a606c04 Pencil gray: read the foreground in the session's working RGB (#17559) 2026-11-29 11:21:40 +01:00
qvest-ssels eac5901559 Pencil: a Grayscale document takes the foreground through colour management (#17559)
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.
2026-11-29 11:02:23 +01:00
kubuntugamerandCodebuff d9f1c83309 fix(engine): use the reference History names for a layer row's rename, colour and hide (#17364)
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]>
2026-11-28 20:00:50 -06:00
David Mann b7dbd65cdf Merge #17450 into the merge queue batch
Layers: Background from Layer's History state reads "Convert to Background" (#17305)
2026-11-29 00:52:21 +01:00
qvest-ssels 7b86f6c295 Background from Layer: greyed with several layers selected (#17306)
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.
2026-11-29 00:23:47 +01:00
David Mann df4bdd15ac Merge #17420 into the merge queue batch
fix(engine): Collapse All Groups becomes one history step (#17363)
2026-11-28 22:27:14 +01:00
hnoerenberg b14cebb195 fix(engine): "Convert to Background" history step (#17305)
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.
2026-11-28 20:39:40 +01:00
hnoerenberg e29b573919 fix(engine): Collapse All Groups leaves one history step
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.
2026-11-28 18:50:32 +01:00
hnoerenberg 1cbd6afd3b fix(engine-core): Ungroup Layers selects every former child, topmost active
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
2026-11-28 18:46:36 +01:00
hnoerenberg 6f5293e3c1 test(history-brush): make the re-set source recovery checks prove the paint
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.
2026-11-28 13:58:05 +01:00
Madhav Agarwal ddc23e259e Merge main into fix/14608-duplicate-layer-untitled-name 2026-11-28 18:26:44 +05:30
RickiNano c5b500f40a Layers: thumbnail gestures get the reference application's history names (#16786)
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.
2026-11-27 22:04:36 +01:00
David Mann e5645b570e Merge #15154 into the merge queue batch
Actions: load every recorded Content-Aware Fill value and empty steps (#14254)
2026-11-27 12:08:36 +01:00
yoriswind 52a194a0e0 Preserve new-document XMP across the engine-core split 2026-11-26 18:46:22 -08:00
qvest-ssels ab2c75f621 Color Settings: only a legacy blendTextGamma of 1 loads as the box off
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.
2026-11-26 23:47:29 +01:00
hnoerenberg 474d3ee067 test(history): cover the CLI report and the tools that share the source (#12845)
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.
2026-11-26 22:23:26 +01:00
hnoerenberg a6b4d29801 fix(history): default History Brush source is the open snapshot (#12845)
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.
2026-11-26 20:26:58 +01:00