Commit Graph
3891 Commits
Author SHA1 Message Date
David Mann 6ff31fa4f8 Merge PR #11437: Shortcuts: Ctrl+/ opens Layer › Lock Layers…, shown in the Layer menu and the Layers panel menu (#11397) 2026-11-06 00:27:52 +01:00
David Mann 9beb5a0cba Merge PR #11444: Selection tools: dragging the outline records Move Selection, as the reference does (#11390) 2026-11-06 00:27:46 +01:00
David Mann 9f88425d83 Merge PR #11456: Shortcuts: Ctrl+Alt+0 also zooms to 100% and F9 also opens Actions, the reference's second keys (#11396) 2026-11-06 00:27:40 +01:00
dotCooCoo b7e5c92195 Merge main into feat/equalize-entire-image 2026-11-05 15:00:22 -08:00
e4e2607c85 Preview spot inks over the RGB/CMYK composite as an overprint (#10276)
* PSD: a flat file's named extra channels are not its transparency

A PSD without layer records had its first extra channel read as the merged
transparency, so the first spot or alpha channel of a flattened document
vanished and its ink punched a transparent hole in the image (psd-tools
cmyk-alpha-spot.psd, cmyk-spot.psd). When the alpha channel names (1045, or
1006 when 1045 is missing) name every extra channel and the first is not
"Transparency", there is none. The import also reads channel names from
1006 when 1045 is missing, and a spot whose DisplayInfo colour space is
unknown takes its ink from the Alternate Spot Colors (1067).

* channel_map: read 1067 records with as_chunks

* Preview spot inks over the RGB/CMYK composite as an overprint

Visible spot channels of RGB and CMYK documents print over the canvas
composite with the Multichannel ink formula, in Channels panel order,
instead of a tint; alpha channels and Quick Mask still tint over them.
Spot channels open visible, and the PSD thumbnail (1036) prints them.
flatten, export and the merged image stay free of spot inks. Ink
colours go through the document's CMYK profile, and into an RGB
document's own profile.

Refs #10249

* channel_view: test solidity over a gray picture

* Thumbnail: matte only inked pixels; test the merged planes directly

Review feedback on #10276: pixels without spot ink keep their
transparency in the thumbnail buffer, and the thumbnail test checks the
saved merged process planes instead of a re-imported flatten.

* Thumbnail spot inks: sample big boxes on a 4x4 grid

Review feedback on #10276: reducing each spot channel no longer scans the
whole document; a thumbnail pixel averages at most 4x4 samples, so a huge
document costs about h x 4 row reads per spot.

* Spot overlay: composite a proxy for the first draw of big documents

The overprint needs the composite under the inks. Rendering the full-resolution
composite to sample every factor-th pixel cost ~1 s for a 24 MP CMYK document.
A proxy document picks the same pixels (nearest-neighbour downsample) for about
1/factor² of the work. Documents with layer effects, vector masks or feathered
masks keep the full-resolution path.

* Proxy: downsample rows in parallel; the overlay proxy leaves out unused channels

The spot overlay's proxy shrank the spot channels, selection and Quick Mask that an
RGB or CMYK composite never reads: about two thirds of its cost. downsample now
reads its rows in parallel, 64 at a time.

* Spot overlay proxy: keep the full-resolution composite under uncached pattern fills

A pattern fill renders its tiles at their own size on a proxy, so the proxy would
sample other pattern pixels. Unless the fill's matching cache is shrunk with the
proxy, use the full-resolution composite.

* Spot overlay proxy: hidden layers don't decide the composite path

Hidden layers and the contents of hidden groups are not composited, so a hidden
feathered mask or pattern fill no longer forces the full-resolution composite
(the same rule as proxy_faithful).

* Update crates/compose/src/multichannel.rs

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

* Spot overlay: only inked pixels replace the canvas; inks through the display transform

Where every visible spot is 0 the overlay stays transparent, so the normal
canvas (display LUT, proofing, 32-bit preview, full resolution) shows; an
empty spot renders no composite. Printed pixels go through the canvas
display transform (sRGB encoding of linear composites, monitor profile,
Proof Colors), keyed into the texture. Ink colours come from one InkSpace
per render: the document's profiles are parsed once, not per spot per
damage rect.

* test(compose): cover hidden spot preview and document approximation

* fix(ui-egui): preserve solo spot channel display when process colours are hidden

Clicking a spot channel row in the Channels panel targets the channel alone
and hides all process colour channels (`vis == 0`). Overprint inks were
previously extracted from `overlays` before checking `vis == 0`, leaving
`overlays` empty and causing the solo channel view to fall back to an active
layer mask (or return `None` if the layer had no mask).

Keep the spot channel in `overlays` so `vis == 0` can select it as the solo
grayscale picture, separating overprint inks only when process colours are
visible (`vis > 0`).

Adds a regression test targeting an existing spot channel in RGB and CMYK on
an unmasked layer and editing it.

* channel_view: document the spot overprint preview as an approximation

* test(ui-egui): solo spot channel wins over an unrelated layer mask

* channel_view: sRGB spot inks, lazy display transform, inked-area composite

Review fixes for the spot overprint preview:

- RGB spot colours are sRGB, like the CMYK, Lab and gray ones: InkSpace now
  converts them into an RGB document's own profile too. In a linear (EXR/HDR),
  Adobe RGB or ProPhoto document an RGB ink showed the wrong colour (brightened
  in a linear one once the canvas sRGB-encoded it).
- The display transform is looked up only when the view is redrawn and inks
  are shown, not every frame before the cache check; display_transform_for
  borrows the proof state (proof_ref) instead of cloning a default CMYK profile.
- Visible spot channels without ink, with nothing else shown, draw no texture:
  render returns None and ensure remembers it, instead of uploading an
  all-transparent document-sized texture. A damage re-render that finds nothing
  clears its rect, so erased ink never lingers.
- Printing a few inked pixels composites only their bounding box when that is
  cheaper than the whole (proxy) composite, and a cached composite is borrowed
  instead of copied.

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

---------

Co-authored-by: aiongg <67543387+aiongg@users.noreply.github.com>
Co-authored-by: FredApps <153173854+FredApps@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 23:34:12 +01:00
e55e2f3577 Place decodes and fits in the background: dropping a large file no longer freezes the window (#10147)
* Place decodes, fits and renders in a background job

File > Place Embedded / Linked started with Session::start, and
Session::start_place_bytes for bytes with no path, now run the decode,
flatten, resize and SVG render on a worker (prepare_place) and insert the
layer when the job is applied (apply_place). Inline callers (execute, the
CLI, headless MCP, actions) behave and return exactly as before. Part of
#10031.

* Dropped and placed files no longer freeze the window on desktop

With background jobs on, File > Place and files dropped on the canvas start
the place as a job (JobsUi.place). Free Transform begins when the layer has
landed, a failed or cancelled place is reported and the drop queue goes on,
and a drop that arrives meanwhile waits for it. The place shows its progress
in the status bar instead of the modal dialog, so the view stays usable.
Part of #10031.

* Tests: compare place job results without the layer id

Layer ids come from a counter shared by every session, so a job and an inline place in two sessions never get the same one.

* Dropped files stay with the document they were dropped on

Each queued canvas drop now carries its document's id. A file is placed
only while that document is active: files dropped on a document in
another tab wait until it is back in view, and are discarded with a
message when it is closed. Web drops, read by the shell after the drop,
go to the document the drop landed on.

Before, the next queued file went into whichever document was active
when the previous place finished, failed or was cancelled, in the
background and inline paths alike.

* Remove the unused file_open import

* fix: address background placement review feedback

* fix: preserve drop targets and interrupt placement pixel stages

* fix: qualify placement inbox document identity

* test: wait for background placement in app drop regression

* fix: retain queued drops while external document jobs run

* test: clone rendered pixels from drop-managed buffers

* test: cover band rows channels and queued-drop resumption

* Place decodes and fits in the background: dropping a large file no longer freezes the window

Placing a file decoded, flattened and resized on the UI thread; a large PNG froze the
window for seconds (#10031). `place_bytes` is split into a session read, `prepare_place`
(decode, flatten, fit, translate, SVG render at placement scale) and `apply_place`, and
runs through `jobs::run`, so File › Place and canvas drops run on a worker with progress
and cancel. The window follows the job: status-bar progress, Free Transform when the layer
lands, and drops queued per target document.

Review fixes on the way:
- a path and byte drop queue entry records its target DocId, so files dropped on one
  document never land in another after a tab switch, and closed documents discard theirs;
- the closed-document notice stays up for a frame instead of being cleared by the next
  queued placement;
- the queue is bounded (32 files / 256 MiB) so drops waiting on another tab cannot grow it
  without limit;
- flatten and resize stop at the job's interrupt, and a place skips the modal progress
  dialog only when the status bar actually shows its progress;
- the placement's `doc` is kept only for SVG input, through the importer's `is_svg_input`;
- the interrupted-composite test uses an opaque fixture that varies by row and channel, and
  checks the composite against the layer's stored pixels.

* Place reads its file in the job, and refuses a huge canvas as before

file.placeEmbedded and file.placeLinked read the whole file in the
command before the job started, so a path dropped on the canvas or
picked in File > Place still blocked the window for the read. The place
now carries the path and reads it in prepare_place: on the job's worker
in the background, on the calling thread inline (wasm, background jobs
off), with the same read_file limit and error text. Whether the source
is a vector one is decided once it has been read.

The job's flatten check returned Other("the document canvas is too large
to flatten"), where the place used to give flattened_checked's
BadParams for file.place naming the canvas size. Both now share
check_flattenable, so the old error type and message are back.

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

* Path drops aren't capped, and a discarded drop wakes the queue

The 32-file cap on the drop queue counted path drops, which hold no
file contents while they wait, so dropping 40 files on the canvas
placed 32 and refused 8 where main placed them all. The count cap now
applies to browser drops only (each holds its whole file); the byte
budget still bounds those.

When place_next_dropped discarded a closed document's files it returned
without asking for another frame, so another document's queued files
waited for the next input event. It now requests a repaint when files
remain, keeping the one frame that shows the notice.

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

---------

Co-authored-by: FredApps <153173854+FredApps@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 22:49:52 +01:00
yoriswind 3ba306e132 docs(crop): clarify content-aware fill targets 2026-11-05 13:32:51 -08:00
6326117c53 Web build: big operations that won't fit fail with an error instead of trapping, and a trap says so (#10129)
* Raster: ask the allocator whether a big operation fits; PSD save reserves its whole output

New photocraft_raster::headroom: ensure(need) tries to reserve the need plus a margin and frees it
at once (web only; native always passes), below(bytes) tells whether less than that can be
allocated, and simulate_available fakes the answer for tests and diagnostics.

PsdFile::to_bytes reserved only the pixel data, so embedded smart-object data and other tagged
blocks grew the output by doubling, which on the web is one unrecoverable huge realloc. It now
reserves the exact encoded length.

* Big operations that won't fit in memory fail with an error instead of trapping

Place, Image Size, a smart-object re-render and Save now ask the allocator whether their estimated
need can be allocated before they start (photocraft_engine::memory_gate, estimates per operation,
photocraft_io::estimate_export_bytes for saves). A refusal changes nothing and says what the
operation needed and what to do (save, Edit > Purge > All, close documents).

A standing notice warns when less than 512 MiB can be allocated, with hysteresis, so the user can
save before anything traps. Notices can now be sticky, which keeps them past the auto-hide delay.

* Web build: a trap says so instead of freezing the page, and ?free-mb simulates low memory

index.html holds a hidden, static 'PhotoCraft stopped' message with a Reload link. web.rs reveals
it when the module traps (the window error event, or an unhandled rejection from a spawned
future), tells running out of memory from an internal error by the panic message a chained panic
hook kept, and skips the Leave site prompt once stopped. ?free-mb=N makes the memory gates and the
low-memory warning see only N MiB, for checking them in a browser.

* Docs: web build memory handling in the gaps list and the parity assessment

* Engine: use is_multiple_of in the megabyte formatter

* Cargo.lock: the web shell depends on photocraft-raster

* Web boot page: carry the stopped message too, as the test that keeps the two pages equal requires

* Save check counts one copy of the document, and runs once per save

The encoded file's buffer is reserved fallibly, so a save it doesn't fit
in fails with an error instead of trapping; counting it as well refused
saves that would have fitted. On the background-save path the check ran
in write_document and again in start_save, which other callers reach
directly; it now runs only in start_save there.

* Review fixes: warning check allocates nothing, PSD merged image counted, automation saves checked

The low-memory warning's periodic check reads the size of linear memory
instead of reserving a block: wasm memory never shrinks, so a trial every
few seconds raised the high-water mark by up to 768 MiB for nothing. The
operation checks keep their trial reservation.

PSD and PSB saves always build a canvas-sized merged image (a placeholder
without maximum compatibility) and hold it raw and encoded; the save
estimate now counts it. The synchronous automation save checks memory
before encoding, as File > Save does, and its test asserts the memory
error.

The trap listeners go in before the app is built, so a trap while
building it shows the stopped message too, and a memory access out of
bounds reads as unexpected rather than as running out of memory.

* Cover layered PSD preflight limitation

* Fix layered PSD test iteration

* Docs: layered PSD preflight limitation in the gaps list

* Web OOM gate: gate direct exports, truthful advice for unbounded PSD sources (#10024)

* Web OOM gate: estimate layered PSDs per layer instead of refusing every real PSD

The PSD check admitted a file only when its color-mode data, image
resources and layer section were all empty. Every Photoshop file has
image resources (at least the resolution), so on the web nearly every
real PSD was refused for Place, PSD smart objects could not render,
and Image Size was refused for documents holding one, whatever the
free memory (u64::MAX never fits).

The color-mode data and image resources hold no pixels, so they are
now only skipped. A layered file reads its layer count from the layer
info (signed, absolute value) and adds a canvas-sized surface and mask
per layer to the flat estimate. Files that are not 8-bit RGB or
grayscale, keep their layers in a Layr tagged block, or whose sections
can't be read stay unbounded and refused, as before.

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

* Web stopped page: match trap messages ignoring case

Safari reports the allocation-failure abort as "Unreachable code
should not be executed" and Firefox says "out of memory", which the
case-sensitive matching missed: the trap was not recognised, or was
shown as an unexpected stop instead of running out of memory.

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

* Export estimate: count the merged image OpenRaster writes

The ORA writer keeps the layers but also flattens the document for
mergedimage.png, a 16 B/px composite of the canvas, which the
estimate left out.

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

---------

Co-authored-by: FredApps <153173854+FredApps@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 22:04:59 +01:00
a3c0b7258c Select Subject: keep parts that run off the image edge and detached parts near the subject (#10160)
* Select Subject: keep parts that run off the image edge and detached parts near the subject

The backdrop pass trained its colour model on the whole frame outside the first
result's box and fixed it as background, so a subject cut off by the edge (a
portrait's torso) taught the backdrop its own colour and was dropped. Frame
pixels of a side that the rest of the frame cannot explain are now left out of
the model and left to the cut; a floor or table running up the sides stays
backdrop.

The first pass also dropped every part under a fifth of the largest, losing a
head behind a thin neck or a tail. Non-speck parts next to the main one are kept.

* Select Subject: stray edge pixels stay backdrop; cache test checks the recompute

A lone odd pixel in the frame (noise, a dead pixel) is not the subject running
out of the picture: only patches of at least half a frame square are released.

The #2865 cache test asserted a bit-identical selection after painting a corner
pixel. One changed pixel can move the cut's edge slightly (the original
algorithm already did on other noise), so it now checks that the mask was
recomputed and still selects the subject.

* Test subject selection against edge and nearby clutter

* Keep narrow edge clutter out of subject selection

* Preserve cropped subject components at image edges

* Keep edge poles and diagonal streaks out of subject selection

A detached part counted as near the subject when its bounding box
overlapped the main part's margin box. A thin diagonal streak from a
corner (a cable, a rail) has a box that reaches the margin without any
of its pixels doing so, and was kept as part of the subject. A part is
now near only when some of its pixels lie inside the margin box.

A patch that runs along an image edge for two frame widths was released
from the backdrop model whatever its colour, so a pole or door frame
along a side edge next to the subject's shoulder was left to the cut,
which could grow the selection along it. A wide patch is now released
only where its extent along the edge overlaps the first-pass blob's
margin box. Beside the subject that box is cut out of the frame, so the
pole only remains above or below it and is not released, while a torso
cut off below a head (the case the release exists for) still lies under
the head's box. Requiring the subject's colour for wide patches too, or
requiring them to touch the box, would drop exactly that torso: its
colour is not in the head-only blob and it is far from the head's box.

The margin box computation moves into margin_box so subject_at_edge
and its tests share it. Tests pin the diagonal streak, the pole beside
the shoulder (on all four edges, with the cropped torso still
released) and clutter that is too far or too small.

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

---------

Co-authored-by: FredApps <153173854+FredApps@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 22:04:32 +01:00
fcb4f4e494 Grow and Similar: budget the colour index and report allocation failures (#9825)
* Select: Grow and Similar index colours under a byte budget and fail instead of aborting

ColorMatcher::new returns a Result, the colour tree is a flat node array reserved at its exact size, and Grow/Similar's mask and frontier stack use fallible allocation so a failure keeps the selection.

* Select: a 1 GiB colour index on 32-bit, and Sample All Layers reports a failed composite

The web build's 256 MiB index budget (about 4.2M colours) refused Grow and
Similar on a noisy 24 MP photo whose index fits easily; 1 GiB admits every
distinct colour of such a photo. The 64-byte charge per colour is an average,
not a worst case, so the comment now says so, and the point list the tree keeps
gives back its doubling slack once the dedupe set is gone.

Sample All Layers renders the composite inside compose, so the selection tools
now pass an allocation checkpoint before it, like the other commands that hand
big work to another crate, and a failure there keeps the selection.

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

---------

Co-authored-by: FredApps <153173854+FredApps@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 22:03:48 +01:00
yoriswind 8bc5399652 Keep unknown Stack Mode None descriptors inert 2026-11-05 12:57:30 -08:00
Trevor BrownandClaude Fable 5.1 cfc63b2b8e The Artboard tool's options bar gets the iPhone 8/7/6 default size, a background control, the Align panel and the gear menu (#11385)
The bar now starts at iPhone 8/7/6, 750 x 1334 px, with a White background and four checked gear entries, all kept as serde tool options that Reset Tool restores. With no board selected, Size, W and H edit those options; the background reaches layer.new.artboard when the tool draws a board; the Align panel runs the matching layer.align command on the selected boards, and the gear's Auto-nest Layers turns the Move tool's auto-nesting on and off.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-11-05 15:21:29 -05:00
Trevor BrownandClaude Fable 5.1 87062ef0c0 The healing slot starts on Spot Healing Brush and the brush slot lists Color Replacement before Mixer Brush (#11375)
TOOL_SECTIONS and Tool::ALL now order the healing slot as Spot Healing, Remove, Healing, Patch, Content-Aware Move, Red Eye and the brush slot as Brush, Pencil, Color Replacement, Mixer Brush. A fresh healing slot shows Spot Healing Brush and J selects it.

Existing tests that expected the old orders (B and J cycles, the brush flyout click, the shortcut override test) are updated. The engine's shortcut table keeps the same order as Tool::ALL, so its two pairs are swapped to match.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-11-05 14:12:50 -05:00
Trevor BrownandClaude Fable 5.1 b9cf495f57 Embed All Linked: tests check each object keeps its own linked file; regenerate the scorecard (#11401)
The Embed All Linked test now gives every fixture a different fill and asserts each embedded source carries its own linked file name and bytes, and leaves the already embedded object alone. docs/scorecard.md is regenerated with cargo xtask scorecard after the parity checklist.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-11-05 14:00:46 -05:00
Saloouu 75df80fe33 Merge main and regenerate the scorecard 2026-11-05 19:18:47 +01:00
Trevor BrownandClaude Fable 5.1 4083cb6cf4 Artboard first-board test: the Background's pixels travel with it and come back on undo (#11387)
The first-board test now samples pixels as well as names and locks: Layer 0 holds the Background's white after the move, Red keeps its red, and the Background restored by undo holds the same white. This catches a regression that swaps in an empty unlocked layer named "Layer 0".

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-11-05 13:06:47 -05:00
Trevor BrownandClaude Fable 5.1 8d33de79b0 Shift+letter cycles a tool group in toolbar order and the anchor point tools no longer take the letter P (#11376)
The group Shift+letter steps through is now sorted by position in TOOL_SECTIONS, so it follows the flyout instead of Tool::ALL. Add Anchor Point, Delete Anchor Point and Convert Point have no default letter, so P cycles only Pen, Freeform Pen and Curvature Pen.

The engine's shortcut table lists the three anchor point tools without a key to match, and two tests that expected the letter P for them are updated.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-11-05 12:53:30 -05:00
Khawar Zamman Wani af2914fd17 Refusal wording holds when memory sets the 32-bit limit; keep non-UTF-8 scratch paths
On a 32-bit build, free RAM or commit headroom can set the limit instead of the
cap, and then 'install the 64-bit build' was wrong. The message now mentions the
cap and says the 64-bit build may open the file.

The verbatim prefix is now removed through path components, so a scratch path with
a non-UTF-8 name still finds its disk. The UNC rewrite is gone: sysinfo lists only
fixed and removable volumes, so a network path can never match. That limitation is
now documented.
2026-11-05 23:22:13 +05:30
Trevor BrownandClaude Fable 5.1 14d9de4f86 Merge upstream/main into fix/smart-objects-menu-11401
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-11-05 12:42:11 -05:00
Trevor BrownandClaude Fable 5.1 712da4f05e Layer > Smart Objects says Reveal in Explorer, Embed Linked and Embed All Linked, in the reference order, without the Warp rows (#11401)
Windows now reads "Reveal in Explorer", Convert to Embedded is "Embed Linked", and a new Embed All Linked command (layer.smartObjects.embedAllLinked) embeds every linked smart object of the document in one history step, refusing the whole step with an error that names a missing file. The three Warp rows leave the submenu; their commands stay registered for scripts and the Edit menu.

The menu parity floor drops from 660 to 658 because three live catalog rows were removed and one added.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-11-05 12:20:09 -05:00
yoriswind 19ac2452a0 Merge Batch 17 while preserving Crop fill and Artboard sizing 2026-11-05 09:15:36 -08:00
yoriswind 8a126888f3 Merge upstream main after integration batch 17 2026-11-05 09:09:02 -08:00
David Mann 405b56c3c2 Merge pull request #11320 from davidmann4/integration-batch-17
Integration batch 17: 14 epic PRs
2026-11-05 18:02:17 +01:00
yoriswind 1a68a20c1c fix(actions): match the fixed-width pixel unit array 2026-11-05 08:50:56 -08:00
yoriswind 9f393ebeb5 Require the null class for edited Stack Mode None provenance 2026-11-05 08:50:31 -08:00
yoriswind b6bb43bc19 Handle edited Stack Modes and cap video frame growth 2026-11-05 08:48:40 -08:00
yoriswind 0bd6c4de71 style(actions): match the Perspective Warp pixel unit directly 2026-11-05 08:47:11 -08:00
Trevor BrownandClaude Fable 5.1 2dd2e0a532 Menus: View › Guides submenu in the reference's order, with Edit Selected Guides and Clear Selected Guides (#11400)
The seven flat guide rows in View move into a View › Guides submenu in the reference's order, joined by two new catalogue commands, view.editSelectedGuides and view.clearSelectedGuides. They run the same helpers the guide right-click menu used, are enabled only while a guide is selected, and return an error with no guide selected. The right-click menu now uses the same ids.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-11-05 11:40:58 -05:00
yoriswind fbccaaeabb style(actions): apply Perspective Warp formatter 2026-11-05 08:40:04 -08:00
Khawar Zamman Wani 83f492f445 Windows scratch room is measured; hard memory refusal names the build's limit
fs::canonicalize returns verbatim paths on Windows, whose prefix never equals a
disk's plain mount point, so free_space always returned None there. That removed
the scratch allowance from import admission (unless a size limit was set) and
turned off the low-disk check.

The PsdHardBudget message said 'on this machine' even when the limit is the fixed
cap of the 32-bit desktop or web build. It now says so and names the build to use.
2026-11-05 22:07:47 +05:30
yoriswind 3feae0e0b6 Actions: map recorded Perspective Warp planes 2026-11-05 08:36:06 -08:00
Trevor BrownandClaude Fable 5.1 3718b5468e Artboard tool: the first board drawn in a document takes the Background in as "Layer 0" (#11387)
Drawing the first artboard now turns the Background into a normal layer named "Layer 0" and moves it into the new board, in the same "New Artboard" step, as the reference does. The engine does this behind a new `takeBackground` param on `layer.new.artboard`, which the Artboard tool's drag sets; the menu command and scripts keep their result.

A document that already has a board, or has no Background, gets the same result as before.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-11-05 11:27:33 -05:00
16eef63294 Type: a duplicated type layer is renamed after its new text (#9023) (#10352)
* Type: a duplicated type layer is renamed after its new text (#9023)

A type layer's name follows its text until the layer is renamed (#483),
but only while the name is exactly the text. A duplicate is "Title copy"
(or "Title copy 2"), so editing its text kept the old name. A name that
is the text plus Duplicate Layer's " copy" or " copy N" now counts as
named after the text too, so the copy takes its new text's name; any
other name is still kept.

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

* Type: a copy of a "… copy" type layer follows its text too (#9023)

Duplicate Layer names a copy of "Draft copy" "Draft copy 2", so the
check now compares the names' roots (the name before " copy" or
" copy N") rather than adding " copy" to the text's name.

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

* Type: a copy keeps its "… copy" name until its text changes (#9023)

A type layer named after its text was renamed after every edit through
the type helpers, so with "Title copy" now counting as named after its
text, Change Type Size, a style-only or kerning edit, Convert to
Paragraph or Point Text, Area Type and Type on a Path renamed the copy
"Title". The name now follows the text only when the text changed; a
layer named exactly after its text gets the same name as before.

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

* Type: a "… copy" name the user typed is kept when the text changes (#9023)

A type layer named "Title copy 2" by hand, with "Title" as its text,
counted as a Duplicate Layer copy and was renamed after its next text
edit. The document now remembers the names the user typed (Rename
Layer, a name Duplicate Layer's dialog didn't offer, type.edit's name)
for the session, and such a name is kept. A name Duplicate Layer made
still follows the text, and so does one an undone rename brings back.

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

* Type: a name given in the Layers panel or by type.create is the user's (#9023)

The Layers panel renames in place with layer.setProps, and type.create
takes a name: neither recorded it in typed_names, so a copy-shaped name
typed there ("Title copy 2" on text "Title") was replaced by the next
text edit. Both now record it, as Rename Layer and type.edit's name do.

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

* Type: a name typed for a duplicate into another document is the user's (#9023)

Duplicate Layer into a new document and Copy Layers to Document take a
name but returned without recording it, so a copy-shaped name typed there
was replaced by the next text edit. A name other than the copy's own is
now recorded in the destination document, as the in-document duplicate
does.

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

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: FredApps <153173854+FredApps@users.noreply.github.com>
2026-11-05 17:27:14 +01:00
Trevor BrownandClaude Fable 5.1 9c58dd8ea0 Menus: Edit › Preferences says Plugins… and Camera Raw… and has the reference's separators (#11398)
The catalogue now labels the Preferences rows "Plugins…" and "Camera Raw…" (was "Plug-ins…" and "Raw Defaults…"), and the engine label and the dialog page name for plugIns say "Plugins" too. Two "---" rows sit after the first entry and before Camera Raw…. Ids and section keys are unchanged, and each translation file gets "Plugins…" and "Plugins" rows next to the old ones.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-11-05 11:24:43 -05:00
David Mann 37f9d3b7d4 Merge remote-tracking branch 'origin/main' into HEAD
# Conflicts:
#	crates/codecs/src/codecs/png.rs
2026-11-05 17:18:28 +01:00
Khawar Zamman Wani f54d605e2c Add recipe-driven checks for PSD exports (#10307)
* Add recipe-driven PSD export checks

* Exercise PSD recipe runner with the headless CLI

* Make PSD oracle tests isolate temporary paths

* Keep inspect output unchanged; PSD write runner as an xtask library

- info --detail adds text runs, anti-aliasing and full layer-effect settings;
  the control channel and MCP inspect output is unchanged.
- The CLI test uses xtask's new library target instead of #[path] includes.
- The runner records revision and dirty state as unknown outside a git checkout.

* psd-write-oracle: name the layer in each check, document versioning, add recipe tests

* Clean up PSD oracle test fixtures on failure with tempfile::TempDir and add docstrings
2026-11-05 17:11:56 +01:00
yoriswind 7604b34cdc Check descriptorless Stack Mode in ATN registry round-trip 2026-11-05 07:33:06 -08:00
midasdf 59a75c0bc8 Merge remote-tracking branch 'origin/main' into jp/print-paper-sizes 2026-11-05 23:43:36 +09:00
yoriswind 05d3c0bf27 Support recorded Smart Object Stack Modes and video frame edits 2026-11-05 06:24:06 -08: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
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
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 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
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