Commit Graph
8148 Commits
Author SHA1 Message Date
Hector VillarrealandClaude Opus 5.5 1eb8f7d4da Actions: keep a wrong-typed Smart Sharpen step, read an unpadded Rds (CodeRabbit review on crates/engine/src/cmd/atn_cmds/steps_image.rs:575)
The enum and Boolean gates passed a present key of another type, and
the amount and radius fell back to their defaults. The key gate admits
`Rds` without its padding, but the radius was read as `Rds ` only, so it
played as 1. Every key now goes through `setting`, which reads the key
as the gate admits it and keeps a wrong-typed step as a Photoshop step.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 21:24:40 -06:00
Hector VillarrealandClaude Opus 5.5 7525fde387 Actions: keep an Oil Paint step with a wrong-typed setting (CodeRabbit review on crates/engine/src/cmd/atn_cmds/steps_image.rs:527)
A present lightingOn or numeric key of another type passed the key-name
gate, read as missing and played with Photoshop's default. Each key now
goes through `setting`, so such a step stays a Photoshop step.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 21:23:44 -06:00
Hector VillarrealandClaude Opus 5.5 292f48d0cf Actions: keep a Select Sky step whose sampleAllLayers isn't a Boolean (CodeRabbit review on crates/engine/src/cmd/atn_cmds/steps_image.rs:486)
A wrong-typed sampleAllLayers was read as missing and the step played
with false. A shared `setting` helper now reads a present key with its
expected type and returns None otherwise, so the step stays a Photoshop
step, like settings the command can't represent.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 21:22:46 -06:00
Hector VillarrealandClaude Opus 5.5 1d22ffc1ff Actions: map Photoshop's newer-feature steps (#10610)
Oil Paint (oilPaint), Smart Sharpen (smartSharpen), Focus Area
(focusMask), Select Sky (selectSky) and Remove Background
(removeBackground), recorded by string ID, load as their commands and
save back with the keys and defaults Photoshop records. Oil Paint's and
Select Sky's Photoshop defaults are written out where they differ from
the commands'. Smart Sharpen maps the legacy Lens Blur form with no
noise reduction; other forms stay Photoshop steps. Settings the events
cannot carry refuse the step on export.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 20:51:05 -06:00
Dylan M. Taylor 1f984bffb3 packaging(flatpak): add OCI image build and GHCR publishing helper (#10567) 2026-10-31 18:53:08 -04:00
aiongg 799e129628 Merge pull request #10145 from davidmann4/integration-batch-10
Integration batch: 18 PRs on main
2026-10-31 13:31:44 -04:00
Khawar Zamman Wani f3caa319a2 Keep brush state intact when preset tip loading fails (#10288) 2026-10-31 13:07:18 -04:00
David MannandClaude Opus 5.5 aca609ef49 Merge #8725's current head (6d1aef9bd) into the batch
Its two new commits merge main (8a87a457a, 422ca7bed), both already in the batch.
Their catalog resolutions place the "Edit Brush…" row differently; every row they
hold is already in the batch's catalogs, so the tree is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 15:15:47 +01:00
David MannandClaude Opus 5.5 e46be131e9 Merge #9274's current head (7da275ea6) into the batch
The author's main merge brings one new test (full coverage keeps Threshold over
extreme float channels) and rewords the #9483 tone comment; its main side
(b1cfff9d3) is already in the batch. Docs keep the batch's newer status lines and
revision rows.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 14:43:14 +01:00
David MannandClaude Opus 5.5 130244bace Merge #8571's current head (752daed44) into the batch
752daed44 makes nested SVG images share one XML depth budget in the bounded
parser. The batch's fix-up 1acb1f464 already does that (`xml_left` passed down
to each nested image), and also leaves an image the drawing has no depth left
for out instead of failing the drawing, so the tree keeps the batch's svg.rs and
its test `bounded_embedded_svg_gets_only_the_nesting_depth_the_drawing_left` (511 + 511 levels).
866b9d0e4 merged an older main than the batch has; the batch keeps its own,
reviewed resolutions of those files.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 14:42:49 +01:00
David MannandClaude Opus 5.5 622707a36f Address CodeRabbit review: four findings on the batch
- Channel targeting routes an allow-list of pixel-editing paint commands, not every
  `paint.*` id: the Mixer Brush's Alt-click load and Symmetry no longer follow a colour
  set or get refused with "Rasterize the layer" on a fill layer. Patch and Content-Aware
  Move stay routed (#9274).
- Native vector save-back checks the preview SVG as strictly as stored previews are
  checked on load and PSD export, so a preview with an unreadable embedded image is
  refused instead of stored and later dropped (#8571).
- .pcraft blobs read their zstd frame with framing headroom, so an incompressible
  preview right at its 16 MiB limit still loads; the limit still bounds the data.
- Levels/Curves recall (Alt+shortcut) decides the combined Lab record from the target
  the dialog captured, as remembering does, so a viewed layer mask keeps its settings
  beside a Lab colour set (#9274).

Each comes with a test that fails without it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 14:41:36 +01:00
David Mann 9ec0f51dc1 Merge remote-tracking branch 'origin/main' into HEAD
# Conflicts:
#	crates/ui-egui/src/i18n/nb.tsv
2026-10-31 13:55:06 +01:00
Claude 6d1aef9bd5 Merge storytold/photocraft main into the Fill/Stroke popover branch
Clean merge of 5 upstream commits; scorecard unchanged (12 of 183).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TYsCL5E2GM6hUabP9dmYAv
2026-10-31 06:53:03 +00:00
Dylan M. Taylor 422ca7beda Merge pull request #10420 from aiongg/docs-tidy
docs: tidy agent, contributor and release docs
2026-10-31 01:06:22 -04:00
Dylan M. Taylor e65dca0e46 Merge pull request #10421 from aiongg/update-result-dialog
Updates: shared check-result dialog from craft-update
2026-10-31 01:05:39 -04:00
aiongg 6c1da97387 updates: show check results with craft-update's CheckResultDialog 2026-10-31 04:43:12 +00:00
aiongg 27f9b5be9a docs: tidy wording 2026-10-31 04:25:34 +00:00
aiongg 6d737c219e docs: tidy agent, contributor and release docs 2026-10-31 04:17:45 +00:00
Claude 953728fdd0 Merge storytold/photocraft main into the Fill/Stroke popover branch
15 upstream commits; i18n conflicts were append-only (upstream's entries
first). Scorecard unchanged (12 of 183).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TYsCL5E2GM6hUabP9dmYAv
2026-10-31 03:47:42 +00:00
Brandon ThomasandClaude Opus 5.5 8a87a457ab Release 0.18.0
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
v0.18.0
2026-10-30 23:26:40 -04:00
Brandon ThomasandClaude Opus 5.5 d5b564db93 Flatpak bundle: skip the debuginfo pass manifest-wide (runner has no eu-strip)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 23:26:31 -04:00
David Mann 6d84d33777 Merge PR #8725: feat(ui): Photoshop Fill/Stroke popover and full Color Picker for every colour swatch 2026-10-31 02:05:41 +01:00
David Mann e5b4ea6781 Merge main at e7b7cf11e into integration batch 10
i18n catalogs: main's new rows (#10328) appended after the batch's, as a union.
2026-10-31 02:05:31 +01:00
aiongg e7b7cf11e3 Merge pull request #10328 from davidmann4/fix/10204-reference-app-followup
Follow-up to #10204: match the reference application in ten places (#10327)
2026-10-30 20:54:57 -04:00
Claude 33fac7dbab Merge storytold/photocraft main into the Fill/Stroke popover branch
Clean merge of 1 upstream commit (Flatpak packaging only).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TYsCL5E2GM6hUabP9dmYAv
2026-10-31 00:38:18 +00:00
Dylan M. Taylor 3ff283af35 fix(flatpak): allow reading launcher version pins (#10393)
* fix(flatpak): allow reading launcher version pins

* fix(flatpak): allow reading launcher version pins
2026-10-30 20:11:55 -04:00
David Mann 4380abc007 Merge PR #8725: feat(ui): Photoshop Fill/Stroke popover and full Color Picker for every colour swatch 2026-10-31 00:11:35 +01:00
d53a524334 Integration: the Ctrl+Shift+Enter Pen test starts its draft as a click does (#8015)
Since main's #3464 a Pen draft carries the owner its first click captured
(document, revision, target path). The test built a draft with no owner,
so finishing it took the target from the current UI state, where path.set
had left the old work path selected, and appended to it: the selection
became 0,0 170x80 instead of the triangle plus the square. The test now
captures the owner as main's Ctrl+Enter test does, with the work path not
selected in the Paths panel (the Pen then starts a new work path).

Co-authored-by: mahefanante <42338306+mahefanante@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 00:08:22 +01:00
David Mann 89a5b25072 Merge main at 952c328b3 into integration batch 10 2026-10-31 00:05:12 +01:00
Claude 3bbe455329 Merge storytold/photocraft main into the Fill/Stroke popover branch
Clean merge of 4 upstream commits; scorecard unchanged (12 of 183).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TYsCL5E2GM6hUabP9dmYAv
2026-10-30 21:40:55 +00:00
Dylan M. Taylor 952c328b3d Merge pull request #9893 from TaylorBurke/fix/screen-picker-xwayland-8977
Screen picker: a Wayland desktop picks through the portal when the window runs on Xwayland (#8977)
2026-10-30 14:42:04 -04:00
Dylan M. Taylor 9a6197dd6d Merge pull request #9894 from TaylorBurke/fix/extra-windows-app-id-6697
Extra windows share the main window's app id, so Wayland docks and window rules see them (#6697)
2026-10-30 14:38:48 -04:00
David MannandClaude Opus 5.5 f9b4e677c4 Tests: Rasterize Layer Style keeps a tagged CMYK document's inks (#4035)
#4035's only code change makes Rasterize Layer Style separate its RGB bake
through the document's own CMYK profile, but none of its tests ran that
command (they cover Flatten, Stamp and Merge, which already worked), so
removing the change left every test green.

New test: a tagged CMYK document's layer gets a drop shadow that falls off
the canvas and is rasterized; the inks must come back within the profile's
round trip. Without #4035's change they move by 35 levels (0.137) and the
test fails; with it they pass at 8 and 16 bits.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 19:14:28 +01:00
David MannandClaude Opus 5.5 01b8472845 Integration: compile after merging main at b1cfff9d3
The FIFO export test new on main builds a SmartObject without #8571's
vector_preview field, and #8311's typeBoxOverflow key takes the inspect
snapshot's json! past the default macro recursion limit of 128.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 18:36:42 +01:00
David MannandClaude Opus 5.5 4aa7984eb0 Cutout: non-finite samples count as 0 before tracing
A NaN or infinite sample (32-bit documents can hold them) reached the
region means unchanged, so a region's colour, the edge offsets built from
it and the fill could turn non-finite or leave pixels uncovered. trace now
replaces non-finite channels with 0 before banding (copying the image only
when one is present).

Test: NaN and ±inf samples give finite region colours, outlines and pixels
with full coverage; it fails without the fix. (CodeRabbit review on #10328.)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 16:56:58 +01:00
David MannandClaude Opus 5.5 6e518e4c84 Brush Settings: clicking a section's name turns it on again
Reverts #5165 (merge d9b7c5f7cd). #5165 made a click on a section's name
in Brush Settings (Shape Dynamics, Scattering, …) show its controls
without ticking its box. In the reference application, checked by hand,
clicking the name shows the section's controls and ticks it; clicking the
name of a ticked section leaves it ticked. Only the checkbox turns a
section off. That is what PhotoCraft did before #5165.

brush_panel tests pass (50).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 16:34:03 +01:00
David MannandClaude Opus 5.5 d9cb0edd8d Liquify: no Twirl Counterclockwise tool, Alt with Twirl Clockwise does it
The reference application's Liquify has Twirl Clockwise only; holding
Alt (Option on macOS) while using it twirls counterclockwise. PhotoCraft
had an extra Twirl Counterclockwise tool on the strip, and #9598 had just
given it a mirrored icon.

Twirl Counterclockwise leaves the tool strip (LiquifyTool::ALL, 11 to
10 tools) and the rotate-ccw icon #9598 added goes with it (asset,
icon_data entry, ATTRIBUTION count back to 113). Alt already reversed
Twirl Clockwise at stroke-down; that stays. The TwirlCcw variant stays as
a stroke's direction: Alt-strokes record `twirlCcw`, and filter.liquify
strokes and older saved strokes naming it still replay as Twirl
Clockwise reversed (the command doc says so). Selecting it as the tool
(control channel `tool: "twirlCcw"`, or a preference saved by an older
version) is refused with an error that says to choose twirlCw and hold
Alt; the rest of the settings still apply and the dialog opens.

Tests: the_tool_strip_has_no_twirl_counterclockwise (no such tool, label
or missing icon on the strip, C is Twirl Clockwise, `twirlCcw` as the
tool is an Err and leaves the tool, an old saved preference naming it
opens); alt_with_twirl_clockwise_twirls_counterclockwise (the field
displacement a dab leaves right of the centre points up without Alt and
down, mirrored, with Alt). twirl_counterclockwise_has_its_own_mirrored_icon
and the twirlCcw row of alt_reverses_twirl_and_swaps_pucker_and_bloat
are removed. The i18n labels for Twirl Counterclockwise stay (the
variant's label).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 16:34:03 +01:00
David MannandClaude Opus 5.5 b9613c6caa Compose: Softer outer glows end before Size again, no tail past it
Reverts #8039 ("Compose: Extend Softer outer glows past Size (#7899)"),
which added a range-scaled fading tail beyond Size to Softer outer glows,
on the CPU compositor and the GPU one alike, and widened the effect
margin by it.

The reference application, measured: Outer Glow, Softer, Size 60,
Range 50 % (and 100 % alike), white, Normal, Opacity 100 %, Spread 0,
Noise 0, on an opaque white shape over black (240 x 40 document, shape
over the left 100 px, full height, sampled at row 20): the glow reads 4
at 50 px from the edge, 1 at 54, and 0 from 56 to 70 px. It reaches zero
just before Size; there is no tail beyond it.

The reverted code (the two-box tent) gives, in that setup, 8-bit levels
4, 1, 0, 0, 0 at 50/54/56/60/70 px for Range 50 % (unrounded 3.56,
1.20, 0.49, 0, 0) and 2, 1, 0, 0, 0 for Range 100 % (1.78, 0.60, 0.25,
0, 0); #8039's tail lifted 56-62 px above zero. So the revert stays as
is, CPU and GPU unchanged from before #8039.

Conflicts were formatting-only (later rustfmt of #8039's lines) in
compose effects.rs, effects/paint.rs and gpu fx/builders.rs; resolved to
the pre-#8039 code. The GlowSource/GlowTechnique imports a later commit
kept in gpu fx/tests.rs for #8039's test go with the test.

New test softer_outer_glow_fades_out_before_its_size renders that
document through the CPU compositor at Range 50 % and 100 % and checks
50 and 54 px within 2 levels and 56, 60 and 70 px at exactly 0.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 16:34:03 +01:00
David MannandClaude Opus 5.5 3525a1d2bc Layers: an adjustment layer's name click targets its mask again
Reverts #9703 ("Fix adjustment layer name clicks targeting masks"), which
made a click on an adjustment layer's name target the layer's contents
instead of its mask.

The reference application, measured through scripting (targetChannels):
selecting an adjustment layer from another layer targets its mask, as
before #9703; a masked pixel layer targets its contents; clicking the
content thumbnail still targets the contents. So the behaviour before
#9703 was right.

The revert applied cleanly. Its test asserting the opposite goes with it;
a_new_adjustment_or_fill_layer_shows_its_settings_until_the_mask_thumbnail_is_clicked
again expects a row click on a new adjustment layer to target the mask.
New test selecting_an_adjustment_layer_from_another_layer_targets_its_mask:
for Hue/Saturation and Curves layers, a name click coming from another
layer targets the mask (and painting goes to the mask), the content
thumbnail targets the contents, and a masked pixel layer's name click
targets its contents.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 16:34:03 +01:00
David MannandClaude Opus 5.5 d91195ba29 Filter Gallery › Cutout: tone bands of the channel mean, flat region colours
#8191, #8192, #8193 and #7903 made Cutout trace the image with its own
pipeline: an Oklab bilateral smooth, a median-cut/k-means palette,
lightness stretched towards black and white, colour that drifts inside a
shape, and Catmull-Rom curves. The result looks good but not like the
reference application. Measured there on a portrait, grey ramps, a hue
sweep and squares of known size:

- Tone bands are the plain mean of R, G and B in Number of Levels equal
  steps (4 levels on a 0-255 ramp: steps at 64, 128 and 192). Colours of
  different hue but the same mean share a band, so a saturated blue
  headscarf and the grey around it come out as one averaged colour.
- Each connected region is filled flat with the mean colour of its own
  pixels (ramp bands read 96, 160, 224 = their means). No stretch, no
  drift: about 1,100 distinct colours on the portrait, edges included,
  against 13,000 before.
- Edge Simplicity removes regions by size alone, the same on a 256 px
  and a 600 px canvas: 6 px squares survive at 0-2 and 4 px go; 12 px
  survive at 4; 48 px at 6; 96 px at 7; none at 8. Merged pixels count
  towards the neighbour's mean.
- Outlines are straight-sided polygons that coarsen with Simplicity.
- Edge Fidelity nudges outlines only: 1.9% of the portrait's pixels
  change from 1 to 2, 1.2% from 2 to 3 (PhotoCraft now 2.7% / 1.1%).

So the palette stage becomes the channel-mean band, regions keep their
flat mean colour, outlines stay straight (the Douglas-Peucker vertices,
no curves), and the minimum area follows the measured table. The
smoothing, palette, paper-colour and curve code that no longer runs is
removed, and quantize's median_cut/kmeans are private again.

Against the reference renders (mean absolute difference per channel,
0-255): the portrait at the defaults 4/4/2 went from 27.7 to 3.1, at
8/4/2 from 23.3 to 3.4; grey ramps from 17-47 to 1.7-3.4; the hue sweep
from 39.7 to 2.2; the noisy two-colour image from 57.5 to 1.2. Over 36
cases the summed error went from 676 to 229. The rest is mostly at Edge
Simplicity 7-10, where the reference keeps some mid-sized strips that
are merged here.

Tests: the ramp's band steps and tones; which square sizes survive at
Simplicity 0, 2, 4 and 10; every slider changes a radial gradient; the
region merge picks the neighbour with the longest shared border and
uses the measured area; Edge Fidelity changes 0.2-6% of the pixels;
islands keep their tone at low fidelity; tiling and seam tests as before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 16:34:03 +01:00
David MannandClaude Opus 5.5 28185d6dc3 Shift+right-click menu: Edit Brush… and every painting tool's own Mode list
#4985 added a canvas Shift+right-click popup that worked only for the
Brush and listed only its painting modes. In the reference application
Shift+right-click opens a menu for every painting tool: Edit Brush…
(the Brush Preset picker a plain right-click opens), a separator, then
the tool's own Mode list from its options bar:

- Brush, Pencil: the painting modes with Behind and Clear
- Clone Stamp, Pattern Stamp, History Brush: the blend modes
- Mixer Brush, Color Replacement, Background Eraser: Edit Brush… only
- Eraser: Brush / Pencil / Block (no Edit Brush…)
- Blur, Sharpen, Smudge: Edit Brush… (the reference lists modes too)
- Dodge, Burn: Shadows / Midtones / Highlights; Sponge: Desaturate /
  Saturate
- Healing Brush: its blend modes; Gradient: the blend modes; Paint
  Bucket: the blend modes with Clear (no Edit Brush…)
- Spot Healing, Magic Eraser and non-painting tools: no menu, the
  gesture keeps its old route

brush_mode_menu.rs is now a per-tool item list (Item enum + items(tool))
instead of a Brush-only list. Each row sets exactly what the tool's
options-bar control sets: a brush-based tool's mode through
tools.setBrush (Brush/Pencil also Behind and their own Clear flag), the
Eraser mode, tone range, sponge mode, gradient and bucket modes as tool
options. Blend modes are grouped with separators; the current choice is
checked; Behind and Clear are greyed on the Background layer. The menu
remembers the tool that opened it and closes on a tool change.

Only settings the options bar already has are offered. Not offered yet
(no setting here): Behind for the stamps, History Brush, Gradient and
Paint Bucket; the Blur/Sharpen/Smudge modes; the Spot Healing modes;
the Healing Brush's Sampled/Pattern source and Replace; the History
Brush source.

Control: ui.inspect's brushModeMenu reports tool, mode, choices (the
active tool's labels) and items (label/enabled/checked, separators);
ui.context.choose {id: <label>} picks a row, an unknown or greyed row
is an error that changes nothing.

Tests (kittest): each representative tool's rows in order, choosing a
row sets the options-bar state and journal, Edit Brush… opens the
picker at the click, Behind/Clear greyed on the Background, Magic
Eraser and Spot Healing open nothing; control graceful failure for bad
choices. "Edit Brush…" added to every catalog.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 16:34:03 +01:00
David MannandClaude Opus 5.5 f151843591 Type: a copied type layer gets the destination's point size, not a transform
#9594 fixed type copied between documents of different resolutions
re-laying out at the wrong size on its next edit by running the Image
Size resolution step on the copies: the type kept its point size
(24 pt) and got a compensating transform of src/dst ppi, with box and
path text scaled up to match.

The reference application, measured by script, keeps the pixels and
rewrites the point size instead: 24 pt copied from a 72 ppi document
into a 300 ppi one becomes 5.76 pt (24 x 72/300), and 24 pt from
300 ppi into 72 ppi becomes 100 pt. There is no transform, the
Character panel shows the rewritten size, and later edits keep it.

adapt_copies, which both Copy Layers to Document (Duplicate Layer to
another document, dragging layers between documents) and Paste of a
copied layer go through, now calls canvas_geom::retarget_type_resolution:
every size in points is multiplied by src/dst ppi (font size, leading,
baseline shift, first-line/start/end indents, space before/after) and
the PSD TySh is rebuilt. Box, path and transform are in pixels and stay
as they were; tracking, kerning and auto leading are relative to the
size and stay too. A resolution that isn't a positive number counts as
72 ppi (what the text engine lays it out at), and the scaled sizes stay
finite and above zero. Image Size keeps its own behaviour.

Tests: copy and Paste in Place, 72->300 (5.76 pt) and 300->72 (100 pt):
leading, baseline shift and indent scale, tracking stays, no transform,
the same ink bounds as the source, and after an edit the size is kept
and bounds and coverage match the source's render. Paragraph text keeps
its box and wrapping. Bad and absurd resolutions don't panic or produce
non-finite sizes. The #9594 test is replaced by these.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 16:34:03 +01:00
David Mann 8e01f18a37 Merge PR #8725: feat(ui): Photoshop Fill/Stroke popover and full Color Picker for every colour swatch 2026-10-30 16:07:08 +01:00
298178a5ed Integration: live preview for swatch Color Pickers, no-document options-bar pick, recent colours after success (#8725)
The swatches that now open the full Color Picker changed only on OK, so Photo Filter, B&W Tint,
Gradient Map stops (Properties and Image > Adjustments), the Content-Aware Fill and Select and Mask
overlays, Neon Glow and Save for Web lost the live preview main's popup had. The open picker now
previews its colour on the swatch every frame, Cancel (or OK unchanged) restores the exact opening
value (bit-exact for linear floats), and the Properties panel commits one history step when the
picker closes. A picker closed without OK or a preview changes nothing (a Gradient Map stop at a
PSD's 1229/4096 kept its location on Cancel).

With no document open, the options-bar popover's Color Picker refused OK ("no document open")
before reaching the tool-only path; it now sets the next shape's colour as on main.

A popover swatch the shape refused (a job holding the document) still joined Recently Used Colors;
it now joins only after the edit succeeds. Adds a CAF keys test for an open widget picker, and
fixes the ui-parity date and count the main merge set back.

Co-authored-by: SimoneRecchia <201361065+SimoneRecchia@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 15:44:50 +01:00
David MannandClaude Opus 5.5 ac3dbfd2bc HUD Color Picker: Esc closes the HUD and keeps the picked colour
#6236 made Escape put back the colour the gesture started from. In the
reference application Escape while the right button is held closes the
HUD and keeps the colour picked so far; moving the pointer afterwards
changes nothing (measured: picked 0,40,96 from 40,90,160; after Esc and
a further move it stayed 0,40,96, also after the release).

Escape now ends the gesture like the button release does. The pick is
still one coalesced history step, so Undo takes it back.

Test: Escape closes the HUD with the picked colour kept, a later move
picks nothing, and releasing the button afterwards opens nothing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 15:08:33 +01:00
David MannandClaude Opus 5.5 833e69794d HUD Color Picker: square on the left, current colour under the pointer
#6236 drew the hue strip left of the saturation/value square and opened
the HUD just below the press point. In the reference application the
square is on the left with the hue strip to its right, and the HUD opens
so the colour you start from sits under the pointer: pressing without
moving changes nothing, and a small move nudges the colour from there.

The HUD now uses that layout and placement (still pulled in to stay on
screen near an edge). The rects come from one `layout` function, shared
by drawing, hit-testing and the tests.

Tests: the square is left of the strip and the starting colour's spot is
under the pointer; a mid colour opens with the pointer inside the square
and picks nothing until it moves; near the bottom-right corner the HUD
stays on screen and the press alone picks nothing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 15:07:22 +01:00
David Mann a19139fbda Merge PR #9757: feat(ui): live canvas preview in the text and gradient stop Color Pickers
# Conflicts:
#	docs/ui-parity.md
2026-10-30 15:02:07 +01:00
caebe0ce8b Integration: Color Picker preview under Free Transform, OK redraw, refusals (#9757)
The live text / gradient stop colour preview came before the Free
Transform branch of canvas display_doc, so Ctrl+T on a type layer plus
the swatch's Color Picker drew the layer twice (old place in the copy,
transformed texture on top). It now steps aside while a transform is
open.

After OK the canvas caches still held the preview key, so the 24-36 MP
canvas refreshed in full. OK now counts the shown preview as the
document when it was built from the same params (as type_transform
does), so only the commit's damage is redrawn.

A refused preview (e.g. a missing layer) ran Session::new + document
clone + the command on every frame; the refusal is now remembered for
its key. Params naming no layer (an agent's ui.dialog.set) are not
previewed: the command would fall back to the preview session's
selection, not the user's.

The tests now go through canvas::display_doc, damage_since and
ensure_texture, so removing either canvas hook fails them.

Co-authored-by: saschaweiss <17774249+saschaweiss@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 14:59:19 +01:00
David MannandClaude Opus 5.5 bf80e2d2fa Select and Mask: Shift Edge is a curve on coverage, so hard edges stay put
#5176 made ±100% move the edge by max(radius, feather, 2σ smooth), at
least 1 px. Measured in the reference application (a 100 px square,
Radius/Feather/Smooth each varied, Shift Edge -100/-50/+100):

- A hard selection does not move at all, at any Shift Edge.
- On a feathered edge the result is a fixed per-pixel curve, the same at
  2, 5 and 10 px feather: the pixel's odds a/(1-a) are multiplied by
  49^(shift/100). At -100% a 50% pixel becomes 2%, at -50% 1/8, at
  +100% 98%. The fit holds within ±0.05 in log-odds on every sample.

So Shift Edge is now that curve, applied last as before. It needs no
neighbours, so the morphology callback and the halo/spread it added are
gone, with the ignored benchmark that timed it (matting::morph itself
stays for Select › Modify and the mask view).

Tests: a hard edge is unchanged at ±50/±100%; seven measured
before→after coverage pairs; a feathered edge is pulled in; the engine
refine tests now check the hard edge stays and a feathered one moves.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 14:58:18 +01:00
David Mann c5ad3ed53b Merge PR #9274: Support editing selected color channel sets
# Conflicts:
#	docs/gaps.md
#	docs/ui-parity.md
2026-10-30 14:28:46 +01:00