Commit Graph
11425 Commits
Author SHA1 Message Date
Higgs32584 ea40512df2 Merge remote-tracking branch 'upstream/main' into fix/8208-move-click-after-resize 2026-11-05 10:25:39 -05:00
midasdf 59a75c0bc8 Merge remote-tracking branch 'origin/main' into jp/print-paper-sizes 2026-11-05 23:43:36 +09:00
Khawar Zamman Wani 1dd31879fa Fold relative into Method in the Selective Color editor
The engine reads `relative` after `method`, so a `relative` key added by
`ui.dialog.set` or a recorded step made the Method buttons show one value
while OK applied the other.

Tighten two tests from review: the Properties test now switches colour
through the real dropdown, and the Cancel test takes its baseline before
the edits.
2026-11-05 20:10:42 +05:30
yoriswind 05d3c0bf27 Support recorded Smart Object Stack Modes and video frame edits 2026-11-05 06:24:06 -08:00
dde01384d2 perf(io): stream large PNGs row by row into the layer's tiles (#10259) (#10305)
* perf(io): build JPEG/PNG tiles straight from the decoded rows, in parallel (#10259)

Surface::try_write_rows_with fills tiles row by row on all cores; image_surface
converts from the borrowed decoded rows into it (no per-band copy, no staging
Image). Opaque sources skip the prune scan. import_flat_with checks cancel after
the decode and the tile build and reports progress.

* fix(io): store an F16 target as F32 so its opaque alpha is 1.0

An image without alpha converted to an F16 target got the alpha 0.0: the
opaque-alpha path copied two bytes of 1.0f32. The surface keeps 16-bit float
as 32-bit float anyway, so image_surface now converts an F16 target to F32.

* Format fused tile import integration

* perf(io): decode PNG rows straight into the layer's tiles (#10259)

* test(codecs): PngSuite rows test skips files without a PNG signature (#10259)

* perf(io): stream PNG rows only for images of 32 MiB or more (#10259)

* Update crates/codecs/src/codecs/png.rs

Co-authored-by: aiongg <67543387+aiongg@users.noreply.github.com>

* fix(io): name the image, not the failed reservation, in PNG/JPEG allocation errors (#10259)

A failed surface reservation is one tile or row band, so reporting its bytes as
"a N MB image" was misleading (usually "0 MB"). Report the image's pixel size.

* refactor(codecs): the caller picks the PNG row-group height (#10259)

decode_png_rows takes the rows per group instead of a fixed 256, and io
passes TILE_SIZE, so the groups can't drift from the tile rows they fill.
A group of 0 counts as 1.

* Complete PNG streaming integration with upstream TIFF imports

* Preserve F16 conversion and route default imports through interrupt wrapper

* fix(io): check free memory before PNG tiles, and cancel TIFF imports after the decode (#10259)

import_png_streamed refuses an image whose tiles and one row group the machine
can't hold before the first tile exists, as tiff_to_document does; the
whole-image path (the base PNG path among it) checks the layer's tiles before
allocating them, for images above the streaming size, so a small image still
opens where the reserve alone would have refused it.

import_flat_with now honours the interrupt after a successful TIFF import, as
the whole-image path does; a decode error is still reported as itself.

* fix(io): pass lazy memory probe to PNG importer

* fix(io): handle scratch read errors during flat import

* test(io): respect early TIFF import cancellation

* fix(io): thread ImportOptions decode limits into PNG row streaming

After merging main, the whole-image open path respects
ImportOptions::flat_max_pixel_bytes via decode_limits, but the
streamed PNG path still used DecodeOptions::default(). Pass opts
through so both paths share the same decoder limits.

* fix(io): silence clippy needless_update on DecodeOptions; rustfmt

DecodeOptions only has limits + keep_orientation, so specifying both
and ..Default::default() trips -D clippy::needless_update. Also apply
rustfmt to the decode_png_rows call that gate's fmt check rejected.

---------

Co-authored-by: aiongg <67543387+aiongg@users.noreply.github.com>
Co-authored-by: FredApps <FredApps@users.noreply.github.com>
Co-authored-by: FredApps <fred@apps.local>
2026-11-05 15:10:21 +01:00
yoriswind 247e560230 style(crop): apply scoped formatter to sampling repair 2026-11-05 06:09:56 -08:00
3e27572e7a Artboards: clipping groups move between boards together; pastes off the boards and into masks land right (#11441)
* fix(artboards): move a clipping group between boards as one (#10512 follow-up)

Dragging the base of a clipping mask onto another artboard left its
clipped layers on the old board, released, covering that whole board
(auto_nest moved the base alone and clip_group::settle released the
layers that lost it).

auto_nest now carries the layers clipped to a moving base along, in
order, directly above it on the new board (or at the top level), so
settle keeps them clipped. A clipped layer never changes board on its
own, moved or not: it shows only over its base, so it goes where the
base goes. When any layer of the group can't go (Prevent Auto-Nesting,
the group depth limit), the whole group stays. Still one history step.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(paste): keep a paste from off the boards visible (#10538 follow-up)

Copying a layer that isn't on any artboard and pasting with a layer on
board B selected put the paste inside B, beside that layer, outside B's
area, so B hid it. The clip has no source board, so board_shift doesn't
move it onto B, and layer_place::insertion_point only checked the
content centre when the anchor was the board itself.

insertion_point now applies the same centre rule beside a layer on a
board: a layer edited right after it is made (Place::AutoEditable:
Paste, Place, Type, Shape) whose content is centred off the anchor's
board goes above the board at the top level, as it already does with
the board itself selected. Content centred on the board (Paste at the
view centre there) still lands inside it. Place::Auto (New Layer, fill
and adjustment layers) is unchanged: those layers are empty or cover
the canvas.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(paste): shift a mask or channel paste between artboards (#10538 follow-up)

Pasting into a layer mask, alpha channel or Quick Mask (paste_to_target)
still placed the pixels with paste_offset alone, so with the target
layer on another artboard they no longer landed where a layer paste
does: at the old spot on the source board (in place) or the middle of
the view.

paste_to_target now applies board_shift first, as paste does, for Paste
and Paste in Place alike; Paste Into / Outside keep centring on the
selection (board_shift skips clampToCanvas: false).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(artboards): name the auto-nest plan entry type (clippy type_complexity)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Keep the board shift for a mask paste into a position-locked artboard; an off-board paste above an artboard lands unclipped

- board_shift skips the position-lock guard when the paste adds no layer (a mask paste), since mask edits don't check position locks.
- insert_new: a layer placed directly above an artboard is never clipped to it, and goes past the clipped layers above the slot.
- Tests for both; each fails without its fix.

* Paste into an alpha channel or the Quick Mask keeps document coordinates; only new content above an artboard is unclipped

An alpha channel or the Quick Mask covers the whole document and is on no
board, so the selected layer's board no longer shifts a paste into it. The
unclip-above-an-artboard rule in insert_new now applies only to
Place::AutoEditable (new content placed off a board), so a clipped layer
put Place::Above a board (the layers after a pasted board, a duplicate)
keeps its flag as before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: FredApps <FredApps@users.noreply.github.com>
2026-11-05 14:53:49 +01:00
a3ea9a4277 Guides: integrate edit-session previews and interaction-check scenarios (#9190)
* feat(ui): integrate edit-session guide drafts and interaction-check scenarios

* fix(ui): repaint guide previews after automation field changes

* fix(guides): retain drafts after command refusal

* Restore the upstream Git-source check and keep guide replay local

* Document pending source approval and shared replay workflow

* Clarify that shared CI support for guide replays is pending

* Vendor the guide edit dependency for source review

Keep the edit-session revision and runtime behavior. Track its source, licenses, checksums and lifecycle tests in-tree in response to the source review in #9190. Apply the workspace lint policy to the standalone crate.

* Move edit-session into ui-egui as a module (drop vendor/)

The edit-session code now lives in crates/ui-egui/src/edit_session.rs,
with its tests in edit_session/tests.rs, following the project's module
layout. This removes vendor/edit-session, the path dependency, the
workspace member, the NOTICE entry and the xtask layers entry.

---------

Co-authored-by: Anton Pepperok <perchneko.anton@gmail.com>
Co-authored-by: Perchenko Anton <perchenkoanton@iMac-Perchenko.local>
Co-authored-by: FredApps <FredApps@users.noreply.github.com>
2026-11-05 14:50:22 +01:00
Trevor BrownandClaude Fable 5.1 b05cf6313d Second keys: the dispatch test lists Ctrl+Alt+0 and F9; the test header says what it covers (#11396)
From review: the engine tests check resolution and removal; the UI dispatch test alternate_keys_run_their_command now covers the two new keys as well.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-11-05 08:46:36 -05:00
Trevor BrownandClaude Fable 5.1 ef13c81f4e Menu label test: the Clear Recent File List item is greyed with nothing to clear (#11399)
From review: the test named the empty-list case but did not check it.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-11-05 08:46:31 -05:00
Khawar Zamman Wani ac92cafdfd Keep each colour's values in the Selective Color dialog (#11463)
Image > Adjustments > Selective Color used the generic schema form: one
set of sliders shared by all nine colours, with OK applying them only to
the colour selected at that moment. Switching colour looked like the
values had spread, and edits to other colours were lost.

Make it a dedicated adjustment kind with one editor shared by the dialog
and the Properties panel. Each colour now keeps its own row, and OK and
Preview apply all nine. The older single-colour params from actions and
smart filters fold into the rows.
2026-11-05 19:15:59 +05:30
yoriswind 04a3d0d295 fix(crop): bound the widened sampling read 2026-11-05 05:43:56 -08:00
yoriswind add3c72f91 fix(crop): keep Background fill for a donorless active layer 2026-11-05 05:37:55 -08:00
yoriswind 337794eadc test(crop): size turned controls for the minimum warp budget 2026-11-05 05:36:45 -08:00
David Mann a4a10166df Merge remote-tracking branch 'origin/main' into integration-batch-17
# Conflicts:
#	docs/gaps.md
2026-11-05 14:33:32 +01:00
dotCooCoo 7eea3c1bb3 Merge main into feat/equalize-entire-image 2026-11-05 05:29:50 -08:00
Khawar Zamman WaniandFredApps a38e544faf Make Select and Mask refinement and previews tile-sparse (#10732)
* Make Select and Mask refinement and previews tile-sparse

* Preserve finite mask extent when copying sparse pixels

* Keep solid preview coverage shared during conversion

* Preserve alpha sharing and document sparse refinement limits

* Refine mixed tiles in bounded parallel batches

* Skip guide sampling for constant refinement halos

* Balance sparse refinement batches using measured queue size

* Preserve default alpha and cancel sparse refinement cooperatively

* Address review follow-ups: cancellation after completed flush, stroke assertions, and docstrings

* Fix merge: bind tile bytes to avoid temporary borrow in matting

---------

Co-authored-by: FredApps <fredapps@users.noreply.github.com>
2026-11-05 14:22:03 +01:00
David Mann b613b411b8 Merge remote-tracking branch 'origin/main' into integration-batch-17 2026-11-05 14:11:31 +01:00
David MannandClaude Opus 5.5 88beb84064 Address CodeRabbit: same-named actions in Batch/Droplet, Save and Close format
- Batch and Create Droplet dialogs get a Set dropdown (each set once, each
  action name once) and send the selected action's set, so a loaded library
  with one name in two sets runs the chosen set's action; createDroplet now
  honours `set` with a named action (dialogs.rs:512 finding).
- Droplet capture rewrites an ordinary call to the action's name only while
  that name is unique in the exported list; otherwise it keeps the exported
  index, so a call to the second of two same-named actions still reaches it
  (outside-diff finding on actions_cmds.rs:337).
- Save and Close refuses a source whose bytes Batch would write in another
  format (a Cineon source is encoded as PSD), instead of writing PSD bytes
  under the source's .cin name (batch_run.rs:918 finding).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 14:11:29 +01:00
Hamza a91aa7b888 Elliptical Marquee: anti-aliased edge ramps across the pixel as in Photoshop
An anti-aliased edge pixel held the fraction of its 4x4 sub-samples
inside (17 levels), which made the edge narrower than Photoshop's and
up to 36 levels off in the measured patch. It now ramps linearly over
the pixel's width across the edge: with F the normalised radius at the
pixel centre, coverage = clamp(0.5 - (F - 1) / (|dF/dx| + |dF/dy|)).
An axis-aligned edge gets the pixel's exact area, and a 45 degree edge
ramps over sqrt(2) px. The measured patch now matches within 1 level.

The hard edge is unchanged, and so are ellipses at most 3 px across,
which keep their sub-samples (not measured). The row-span fast path,
the shared full tiles and the run checks stay as they were.

Fixes #11391
2026-11-05 18:09:39 +05:00
Trevor BrownandClaude Fable 5.1 f1c7b034b1 Shortcuts: Ctrl+Alt+0 also zooms to 100% and F9 also opens Actions, the reference's second keys (#11396)
The reference application gives View > 100% a second key, Alt+Ctrl+0 beside Ctrl+1, and Window > Actions a second key, F9 beside Alt+F9. Both are now rows in ALTERNATE_SHORTCUTS (Cmd+Alt+0 in our notation, which is Ctrl+Alt+0 off the Mac), so the menus keep showing the main key and Edit > Keyboard Shortcuts lists and removes them like F2 for Cut.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-11-05 07:56:36 -05:00
Trevor BrownandClaude Fable 5.1 d1779bd1a1 Menus: Combine Shapes, Open Recent, Arrange and Proof Setup items carry the reference's names (#11399)
Seven menu items now read as the reference application names them, in the catalogue rows, the Open Recent item and the engine command labels. Command ids and history step names are unchanged. The translation files get the new English keys, carrying over the existing translations.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-11-05 07:56:03 -05:00
Khawar Zamman WaniandFredApps 384ff664d6 perf: JPEG/PNG open bench with per-phase timings and peak memory (#10259) (#10271)
* perf: JPEG/PNG open bench with per-phase timings and peak memory (#10259)

Adds the flat_open_bench example (import, admission, decode, orient, tiles,
first composite and editable per case, each case in its own process for its
peak RSS), registers it and scenarios P83 to P86 (not enforced) in
perf/budgets.toml, and re-exports image_to_document (doc-hidden) so the bench
can time tile construction. No change to import behaviour.

* fix(compose): preserve special Fill semantics for CMYK adjustments

* Clarify flat-open benchmark RSS provenance

* Run flat-open benchmark provenance regression in CI

* Place benchmark regression module after production items

* chore: drop leftover CMYK proptest seeds from measurement PR

Keeps #10271 scoped to the flat JPEG/PNG open bench. The compose seeds belonged to the CMYK Fill work that already landed via #11001.

---------

Co-authored-by: FredApps <fredapps@users.noreply.github.com>
2026-11-05 13:49:37 +01:00
dotCooCoo f120908767 Merge main into feat/equalize-entire-image 2026-11-05 04:48:33 -08:00
Davit MatchakhelidzeandClaude Sonnet 5.5 50e51b61ef Merge upstream main into ka
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YMTAbGNRxnMEzRvYnQGphF
2026-11-05 16:43:48 +04:00
Davit MatchakhelidzeandClaude Sonnet 5.5 feebde1f0b i18n(ka): Georgian for 23 new strings; LANGUAGES length 29 after the merge
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YMTAbGNRxnMEzRvYnQGphF
2026-11-05 16:43:48 +04:00
274f6d3e26 MCP bridge: waited commands poll the app's job, with progress and cancel (#8130) (#8134)
* MCP headless: waited commands run as jobs, with progress and cancel (#8129)

Headless command_run and command_batch steps that wait (the default) ran
job-capable commands inline while holding the session lock. Cancelling a
long Gaussian Blur did not stop it: it still added its history step, and
doc_inspect and jobs_list queued behind it. No progress was reported.

A waited job-capable command now starts as a background job
(Headless::command_begin) and the server polls it with the lock released
(Headless::job_poll), so other calls are served meanwhile. With a progress
token it sends notifications/progress (strictly increasing, at most ten a
second; for a batch, finished steps plus the current step's fraction).
notifications/cancelled cancels the job and leaves the document unchanged;
a drop guard does the same when rmcp drops the request future. Headless
keeps the outcome of each waited job as sync_jobs sees it end, since
jobs.list keeps only the last few. Both backends share one batch loop,
which runs no further step once the request is cancelled.

Tool hints: jobs_list is read-only, doc_select is non-destructive and
idempotent, and the scoped exports (which refuse to overwrite) are
non-destructive. doc_save's description lost a run of spaces.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* MCP headless: cancel a waited job whose request was dropped before it started

The Abandon guard was created only after command_begin returned. A request
dropped while the start still waited for the session lock left the job it
then started running, and its `waited` entry behind. The guard is now armed
inside the locked closure that starts the job, so dropping the unread output
cancels it. Review feedback on #8132.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* MCP headless: job_poll applies finished jobs before checking the job

A caller polling Headless::job_poll directly, without sync_jobs in between,
kept seeing Running after the worker finished, because the session only
drops a finished job from its running list when its jobs are polled.
job_poll now syncs first. The MCP path already synced in headless_op.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* MCP headless: a cancel that loses the race returns the job's result

job_abandon ignored whether Session::cancel_job cancelled anything and
always dropped the stored outcome, so headless_wait answered `Cancelled`
for a job another request had already applied to the document. It now
returns how the job really ended: Cancelled only when it cancelled the
job, the job's result when it had already ended, and an error when the
job cannot be cancelled (printing) and is still running.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* MCP headless: waited commands run as jobs, with progress and cancel (#8129)

Headless command_run and command_batch steps that wait (the default) ran
job-capable commands inline while holding the session lock. Cancelling a
long Gaussian Blur did not stop it: it still added its history step, and
doc_inspect and jobs_list queued behind it. No progress was reported.

A waited job-capable command now starts as a background job
(Headless::command_begin) and the server polls it with the lock released
(Headless::job_poll), so other calls are served meanwhile. With a progress
token it sends notifications/progress (strictly increasing, at most ten a
second; for a batch, finished steps plus the current step's fraction).
notifications/cancelled cancels the job and leaves the document unchanged;
a drop guard does the same when rmcp drops the request future. Headless
keeps the outcome of each waited job as sync_jobs sees it end, since
jobs.list keeps only the last few. Both backends share one batch loop,
which runs no further step once the request is cancelled.

Tool hints: jobs_list is read-only, doc_select is non-destructive and
idempotent, and the scoped exports (which refuse to overwrite) are
non-destructive. doc_save's description lost a run of spaces.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* MCP headless: cancel a waited job whose request was dropped before it started

The Abandon guard was created only after command_begin returned. A request
dropped while the start still waited for the session lock left the job it
then started running, and its `waited` entry behind. The guard is now armed
inside the locked closure that starts the job, so dropping the unread output
cancels it. Review feedback on #8132.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* MCP bridge: waited commands poll the app's job, with progress and cancel (#8130)

A waited command_run or command_batch step of an engine command now starts it
with engine.execute {wait: false} (sent once) and, when the app runs it as a
background job, polls jobs.list until it ends. A job can run past the bridge's
55s reply timeout, its progress is forwarded, and cancelling or dropping the
request sends jobs.cancel. UI command ids keep wait: true. A failed poll or a
job no longer listed is reported with its id rather than guessed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* MCP bridge: keep the cancel guard armed until jobs.cancel returns; clarify the docs

The cancel branch disarmed the Abandon guard before awaiting jobs.cancel, so a
request future dropped during that await sent no cancel. The control-protocol
table now says polling applies only to a waited command_run. Review feedback
on #8134.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* MCP headless: job_poll applies finished jobs before checking the job

A caller polling Headless::job_poll directly, without sync_jobs in between,
kept seeing Running after the worker finished, because the session only
drops a finished job from its running list when its jobs are polled.
job_poll now syncs first. The MCP path already synced in headless_op.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* MCP headless: a cancel that loses the race returns the job's result

job_abandon ignored whether Session::cancel_job cancelled anything and
always dropped the stored outcome, so headless_wait answered `Cancelled`
for a job another request had already applied to the document. It now
returns how the job really ended: Cancelled only when it cancelled the
job, the job's result when it had already ended, and an error when the
job cannot be cancelled (printing) and is still running.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* MCP bridge: a refused jobs.cancel is not reported as a cancellation

bridge_wait discarded the app's reply to jobs.cancel and always answered
`Cancelled`. The app refuses to cancel a job that is no longer running,
so a job that finished between the jobs.list poll and the cancel was
reported as cancelled although its edit may be applied. A refused cancel
now answers that the job was not cancelled and points to jobs_list.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* MCP bridge: a cancel during a failed poll still cancels the job

When notifications/cancelled arrived while a jobs.list poll was in
flight, and the poll and its retry then failed, bridge_wait disarmed the
Abandon guard and returned the poll error without checking the waiter,
so no jobs.cancel reached the app and the edit ran on after the caller
cancelled it. That error path now sends jobs.cancel first when the
request was cancelled. A failed poll without a cancel still leaves the
job running and names it.

Reported in review of #8134.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* MCP bridge: a cancel doesn't wait for a slow jobs.list poll

bridge_wait checked for a cancel only between polls, so a cancel that
arrived while the app was slow to answer jobs.list waited for the poll,
up to the 55s call timeout, before jobs.cancel was sent. The poll now
races the cancel.

That needs BridgeClient to drop the connection of a call abandoned
before its reply: it kept the one cached connection, so jobs.cancel
queued behind the unanswered poll on the same socket (the app serves a
connection's requests in order), and a half-sent request could share it.
A call now takes the connection out of the cache and returns it only
once answered, as a timeout or lost reply already dropped it.

The poll-error check from the previous commit stays for a cancel that
races a failing poll; its test is replaced by one for the slow poll,
which covers the reviewed case. A BridgeClient test checks that a
dropped call's connection is not reused.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(automation): retain cleanup after failed bridge cancellation

* chore: restart CI for PR #8134

* test(automation): classify the smart object replacement MCP tool

* test(automation): synchronize dropped bridge waits and accept reconnections

* Fix CI after merging upstream

* Fix CI after merging upstream

* Deduplicate Arabic closure messages after upstream merge

* fix(engine): bound active and cancelling background workers

* Fix cancellation and draining in bridge merge

* Test release-aware draining cleanup

* Fix draining regression warning

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Khawar Zamman Wani <wanikhawar@Khawars-MacBook-Air.local>
Co-authored-by: FredApps <fredapps@users.noreply.github.com>
2026-11-05 13:35:13 +01:00
Khawar Zamman Wani 888e87d606 fix(compose): keep CMYK backdrop inks exact at zero Fill (#10985)
An unclipped adjustment layer in a special blend mode at zero Fill still
round tripped its backdrop through brightness. In 32-bit float documents,
Linear Burn and Linear Light moved the inks by a rounding error (0.7 became
0.70000005), and an ink sharing the source's brightness took the source's
value. Zero Fill is the backdrop, so return before blending.
2026-11-05 13:29:38 +01:00
David Mann 4e0d487568 Merge remote-tracking branch 'origin/main' into integration-batch-17
# Conflicts:
#	docs/gaps.md
2026-11-05 13:21:45 +01:00
David MannandClaude Opus 5.5 42e92cb512 Address review: Batch stops, rename targets, Shape Blur memory, sampler releases
- A direct Batch in a script or a CLI command list stops it when it is cancelled,
  cannot write its error log, or ran out of script steps; per-file errors alone
  still continue (CodeRabbit, outside-diff findings on automate_cmds.rs and
  photocraft-cli document.rs).
- Recorded Save steps count against the script's step budget, and a Batch whose
  files failed with the budget spent carries scriptLimitError, so Browse reports
  the failure instead of ok: true (yoriswind).
- actions.rename rewrites a named Batch, nested Play or Conditional call only if
  it resolved to the renamed action before the rename; a Batch with explicit
  steps is left alone (yoriswind: two same-named actions in different sets).
- Shape Blur's run admission counts each worker's f64 prefix sums and, for a
  custom shape, the kernel mask kept for the run plus its worst-case coverage
  runs (yoriswind).
- Every sampler that takes the primary release (Color Picker, Curves/Levels and
  Properties eyedroppers, Curves Cmd-click, Color Range) ends a transform handle
  drag and a Move drag begun before it, not only the Color Picker (#11210 review).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 13:20:01 +01:00
Khawar Zamman Wani 0350b5de16 Select sky beneath an obstructed top border (#9693)
* Select sky beneath an obstructed top border

* sky: enforce adjacent-pixel RGB constraint in obstructed fallback seeds
2026-11-05 13:16:37 +01:00
Davit MatchakhelidzeandClaude Sonnet 5.5 72bb0e399f Merge upstream main into ka
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YMTAbGNRxnMEzRvYnQGphF
2026-11-05 16:14:30 +04:00
Hamza 3ecb46c026 Polygonal Lasso: name its History step and snap Shift diagonals to the shorter offset
select.lasso takes an optional polygonal flag that names the step
"Polygonal Lasso" (Lasso stays the default), and commit_polygon sends
it, so closing by the start point, Enter or a double-click all record
"Polygonal Lasso".

A Shift diagonal now keeps the shorter of the two offsets on both axes
with their signs (100,100 -> Shift-click 200,170 lands on 170,170, as
in Photoshop) instead of keeping the segment's length. Horizontal and
vertical snaps, and which direction a click snaps to, are unchanged.
The rubber band uses the same helper.

Fixes #11393
2026-11-05 17:13:30 +05:00
David MannandClaude Opus 5.5 a5cb392646 transform: follow the selection the box opened with; frame the Background in the controls
- A box now records the Layers panel's selection when it opens and is applied when that
  selection changes. Comparing the layers it moves with the selection's targets closed a box
  over a linked layer at once (main's #11217 adds the link group to the box), and missed a
  group's child leaving the selection (CodeRabbit).
- Move > Show Transform Controls frames the Background among several selected layers, and a
  handle press shows "Could not transform because the layer is locked." and changes nothing,
  as measured in #11101. The Background alone still gets no box.
- The new alert is translated in every catalog that has the Free Transform one.
- Stale comments and edit.transform's params doc no longer say the Background is left out.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 13:07:12 +01:00
mroxsoandhighperfocused 50d485ce76 test(engine): pin the #6958 exposure fixtures in File Info camera data (#6983)
Main fixed the exposure formatting itself in be9f0c250, so what is left
here is the regression coverage the report asked for, asserted through a
real EXIF block: the two reported values (0.031714 s -> 1/32 s,
0.0215 s -> 1/47 s), a reciprocal that rounds to a whole denominator
(1/3 s), and the three-significant-digit decimal fallback for a time too
far from any whole denominator (0.2731 s -> 0.273 s).

Fixes #6958

Co-authored-by: highperfocused <highperfocused@pm.me>
2026-11-05 13:05:38 +01:00
Claude 20d561715b Merge main: it carries this fix now, so only the test is left
main's #5595 split `split_selected` the same way — `a.min(k)` lifted,
`(a - k).max(0.0)` left behind — so its version stays and this branch's
goes. The two differ only in clamping a negative coverage, which the
selection mask cannot hold.

The regression test is not in main and still passes against its code: a
move, then a transform, with the soft edge taken whole and nothing left
at the old place. 119 float and transform tests pass.
2026-11-05 12:01:04 +00:00
Davit Matchakhelidze 3f5785107e Merge upstream main into ka 2026-11-05 15:59:49 +04:00
David Mann 9e9b31c6ed Merge main into fix-transform-several-selection-rules (main e3ecd73569) 2026-11-05 12:51:36 +01:00
Trevor BrownandClaude Fable 5.1 3e5c0e76c2 tests: a Cmd+Alt drag copy is one Move step now (#11383)
The hold-keys test still expected the old "Duplicate + Move" label for a drag that copies a layer; CI caught it.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-11-05 06:49:31 -05:00
David Mann f162c19e81 Merge remote-tracking branch 'origin/main' into integration-batch-17
# Conflicts:
#	crates/ui-egui/src/control/dispatch.rs
#	crates/ui-egui/src/control/params.rs
2026-11-05 12:44:02 +01:00
Hamza ea9a7c931f Marquee: with no selection, Shift and Alt held from the press constrain the shape (#11389)
A Shift or Alt held at the press of a Rectangular or Elliptical Marquee drag picked the selection mode, and did not square or centre until it was released and pressed again, also when nothing was selected, where it picks nothing. The drag now records whether the document had a selection at the press (an empty one counts as none), and only then do held keys pick the mode. Without one, Shift held from the press squares to the drag's shorter side, as measured; Shift pressed during the drag keeps the longer side.
2026-11-05 16:39:06 +05:00
Khawar Zamman Wani e3ecd73569 feat(frame): rework the Frame tool's selection, handles and placement (#8920)
Thanks @wanikhawar — merging the Frame Tool rework.

Summary: Frame Tool selection/handles/placement now distinguish frame vs image (border / click / double-click and Layers thumbnails), with independent transforms, shape variants, Properties/options-bar stroke and fit commands, Convert to Frame, CLI/MCP `layer.frame.*` commands, native `.pcraft` persistence, and PSD export via editable groups + `pcFr` metadata (not Photoshop's native frame type). Tests cover selection, transforms, fitting, locks/hostile geometry, and native/PSD round-trips.
2026-11-05 12:39:02 +01:00
Khawar Zamman Wani 7ba589e01c MCP headless: waited commands run as jobs, with progress and cancel (#8129) (#8132)
Thanks @wanikhawar — merging.

**Summary:** In headless MCP, waited `command_run` / batch steps run job-capable commands as engine jobs (lock released while polling), with progress notifications and cancel/abandon on request drop. Fixes the “cancel does nothing / inspect blocks” behaviour for long filters. Cap of 16 background jobs; docs updated. Stack base for #8134.
2026-11-05 12:28:48 +01:00
Hamza 20d13e5205 Crop: a drawn, moved or resized frame has changed when the gesture changed it
From review: release compared the frame with where it started, so a click on a handle of the untouched frame counted as a change (a Resize that resized nothing), and an Alt-drag from the centre that drew the same frame again counted as none. It now asks whether the gesture changed the frame at some point (drag_moved, including the release's own position); turns and image moves keep their checks.
2026-11-05 16:28:16 +05:00
Khawar Zamman Wani 41cb536813 perf(paint): cache sampled-tip mipmaps between strokes (#9617)
Thanks @wanikhawar — merging.

**Summary:** Sampled brush tip mip pyramids are reused across strokes and symmetry through a bounded LRU (64 entries / 256 MiB); Edit ▸ Purge All releases the cache. Bench + purge/render tests lock the behaviour.
2026-11-05 12:27:06 +01:00
Khawar Zamman Wani 66f1e8b8aa Selection: Grow and Similar match only selected colours, Grow starts from the frontier (#9673)
Thanks @wanikhawar — merging.

**Summary:** Grow and Similar now match selected colours via a BVH `ColorMatcher` (L∞ per channel) instead of one AABB that falsely included intermediate hues; only exact-zero alpha is the transparent wildcard. Contiguous Grow seeds from the selection frontier rather than every selected pixel. Tests + bench included.
2026-11-05 12:26:50 +01:00
David MannandClaude Opus 5.5 7d903ba8fb svg: pass the cache limits main added to import_parsed in the fallback test
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 12:26:31 +01:00
Khawar Zamman Wani 9a390661b5 PSD: flat files keep their spot and alpha channels (#10260)
Thanks @wanikhawar — merging.

**Summary:** Flat PSD import now keeps spot/alpha channels. Alternate Spot Colors (resource 1067) fills in spot inks when DisplayInfo uses an undocumented space; `alpha_channel_names()` centralizes name reads; new `psd_flat_spot_channels` integration tests cover the path.
2026-11-05 12:22:45 +01:00
Khawar Zamman Wani aa08b40071 Home screen: hide the tools, options bar, status bar and docks while Home is up (#11253)
Thanks @wanikhawar — merging.

**Summary:** While the Home screen owns the canvas this frame, hide the tool strip, options bar, status bar, docks, properties panel, and floating editor windows without mutating saved panel prefs. `home_screen_up()` is the single gate (opening jobs / docs win over Home). Adds `home_chrome_tests` for auto-show + toggle round-trip across themes.
2026-11-05 12:22:30 +01:00
Khawar Zamman Wani 43b76a924f fix(compose): align CMYK adjustment Fill and Posterize with split rendering (#11001)
Thanks @wanikhawar — merging.

**Summary:** Aligns CMYK special Fill / Posterize with the RGB compositor’s clipped vs unclipped split from #9501 (`fill_special=true` for unclipped adjustments so Fill changes the blend; clipped keeps Fill as coverage). Posterize goes through `posterize_in` with sample depth. Regression test covers Levels/Posterize across pass-through, isolated group, clipped-on-base, and combined stacks at 8- and 16-bit.

Prefer this over overlapping #10985.
2026-11-05 12:21:48 +01:00