* Filter Gallery: ⌘+ / ⌘− / ⌘0 / ⌘1 zoom the preview
While the Filter Gallery was open the canvas zoom shortcuts did nothing.
They now step the gallery preview through the same steps as its zoom
bar's − / + buttons (Fit, 12.5 %–400 %); ⌘0 is Fit in View and ⌘1 is
100 %. The keys come from the canvas's View › Zoom In / Zoom Out / Fit on
Screen / 100 % bindings (with Edit › Keyboard Shortcuts overrides),
through the same `nav_shortcut` Liquify's preview uses (#7210).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Filter Gallery: zoom steps from the fitted zoom along the canvas ladder
Like Liquify's preview: ⌘+ / ⌘− and the zoom bar's − / + now step along
`zoom_levels`' ladder (1 %–3200 %) from the zoom on screen. At Fit in View
they step from the zoom Fit shows, so zooming in from a large image's Fit
no longer jumps down to 12.5 %. The zoom menu shows a zoom off its list
(300 %, say) as itself rather than "—".
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Filter Gallery: Zoom Out from a Fit below 1 % stays at Fit
A huge image can fit the preview below the 1 % minimum; stepping down
clamped that Fit up to 1 % first, so Zoom Out enlarged the preview.
When no smaller supported zoom exists, Zoom Out now keeps Fit in View.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* #3763: test that automation refuses edit.installedProfiles
edit.installedProfiles scans the OS and user ICC folders but takes no path
parameter, so the automation policy let it through until it was listed as an
ambient-path command. The test checks every authorize entry point and the
sandboxed Headless session refuse it; without the policy line the first
assertion fails (authorize_engine_command allowed it).
* #4134: test that Liquify undo/redo and brush keys work with a numeric field focused
Ctrl+Z was ignored in Liquify while a slider's text edit had focus, and the
bracket keys could not step a 2 px brush down to 1 px. The tests focus a real
text edit and press Cmd+Z / Cmd+Shift+Z and the bracket keys. Without the fix
Cmd+Z leaves the stroke in place and '[' gives 1.8 instead of 1.0.
* #119: test that Layers panel thumbnails are released with their layer or document
Thumbnail textures of deleted layers and closed documents were kept for the
session. The test deletes a layer and then closes the document and checks the
thumbnail cache. Without prune_thumbs the deleted layer's thumbnail is still
cached.
* #2241: test that Quick Mask and Screen Mode follow the two-column toolbar
The two buttons stayed stacked when the toolbar was widened to two columns.
The test checks they are stacked in one column and share a row once the header
chevron switches to two columns, in three themes. Without the layout the
second assertion fails (the buttons sit on different rows).
* #3425: test that the options bar draws a single full-width border
The options bar drew its own top and bottom separator on top of the panel's
border, doubling the lines. The test renders the bar in three themes and counts
full-width separator-coloured horizontal lines. Without the fix there are three.
* #4139: test that the Free Transform rotate zone draws the turn arrow
The rotate zone hides the OS pointer, so the canvas must draw the curved arrow
itself where the box has no preview overlay. The test hovers just outside a
corner of a box without a preview and checks the pointer is hidden and the
arrow arc is painted. Without the canvas draw call no arrow is painted.
* #4630: test that the scrollbar thumb stays visible under the pointer
The stock thin scroll bar fades its handle to the track's opacity while the
pointer is on it, so the thumb vanished. The test checks every theme's floating
scroll style keeps the handle opaque and more opaque than the track. Without
the override both are 0.6.
* #2209: test that Make/Reset Default buttons wrap with long labels
In languages with long labels (Russian) the two buttons overflowed the page
column in a non-wrapping row. The test draws the page in Russian and checks the
second button wraps to its own right-aligned row. Without main-axis wrap both
sit on one row and run left over the effect list.
* #3425: require exactly one options-bar border
The test allowed zero borders, so it would pass if the options bar lost its border altogether. It now requires exactly one, the panel's, in every theme; with the options bar's own separators restored it still fails (three lines).
* Background redraw: key kept composites on the text gamma, trim them every frame (#8520)
Two gaps in the kept background redraws:
- Color Settings > "Blend Text Colors Using Gamma" is an application
setting that type layers composite with, but it wasn't part of the key.
After toggling it, going back to a kept state (an Alt-click solo and
again, undo/redo) uploaded type edges drawn with the old gamma. The key
now holds the gamma, and a redraw that ran while the gamma changed
(even if changed back, and also while another document was shown)
isn't kept. Every running redraw is checked every frame; two changes
within one frame aren't seen.
- Kept composites were trimmed only when the next deferred redraw
started. A state History dropped (or purged) kept its texels, and
lowering Memory Usage or a small edit that grew a kept document didn't
release them. Each frame now drops dead entries, and the cap is taken
again when Memory Usage or the revision of any kept document changes.
Tests (each fails without its part of the fix):
a_state_drawn_before_the_text_gamma_changed_is_composited_again,
a_redraw_across_a_text_gamma_change_is_not_kept,
a_redraw_across_a_text_gamma_change_and_back_is_not_kept,
a_hidden_documents_redraw_across_a_text_gamma_change_and_back_is_not_kept,
kept_composites_go_when_memory_usage_drops_between_redraws,
kept_composites_go_when_a_small_edit_grows_the_document_past_the_cap,
an_older_kept_composite_goes_when_its_document_grows_past_the_cap,
a_kept_state_history_purged_goes_at_the_next_frame.
Co-authored-by: Michael Higgins <55243596+Higgs32584@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* GPU compositor: test the layer page out-of-memory paths, keep GPU timing after one (#8521)
The PR's tests passed with its fix reverted: main's after-cell evict()
already meets every assert of the zero-budget test, so the out-of-memory
fallback had no test. A test hook (Compositor::fail_layer_allocs) now makes
the next n page textures fail as out of memory, and a parity test covers
the in-place retry, the submit-and-retry, the CPU fallback with a healthy
device, and the next refresh back on the GPU. Each of those fails when its
part of the fix is removed.
A retry that failed after its submit also switched GPU timing off for the
rest of the session: the submit marks the measurement flushed, and
cancelling a flushed measurement stops timing for good. The retry waits
for the GPU, so it now clears that mark (GpuTimer::drained);
an_out_of_memory_refresh_does_not_stop_gpu_timing fails without it.
Co-authored-by: Michael Higgins <55243596+Higgs32584@users.noreply.github.com>
Co-authored-by: FredApps <153173854+FredApps@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Address CodeRabbit review: serialise the OOM timing test with GPU_LOCK
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Michael Higgins <55243596+Higgs32584@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: FredApps <153173854+FredApps@users.noreply.github.com>
has_pixels was inserted between assets_dir's doc line and the function,
so rustdoc attached both lines to has_pixels.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* Plug-ins: refuse a manifest that declares a parameter twice (#9441)
`ordered_params` kept every entry of the `params` object, so a repeated
key gave one value two dialog controls and the last spec won in
`resolve_params`. Refuse the repeated key with an error naming it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Plug-ins: quote the repeated parameter name in the error (#9441)
The duplicate check runs before validate() checks the name, so a key
with control or bidi characters must not reach the message unescaped.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Address CodeRabbit review: a repeated parameter is named before its spec is read
The key was checked after next_entry had parsed the value and after the
64-parameter limit, so a repeated key with a broken second spec, or one
past the limit, reported that error instead of naming the key.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* Export Data Sets as Files keeps outputs in the chosen folder (#9420)
{document} was the document name verbatim, so a document named
../esc/aped.psd wrote outside the chosen folder; separators and reserved
characters in it now become _. A data set named after a Windows device
(nul, CON) gets the same _ every other exporter gives it (nul_.png).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Export Data Sets as Files: a document stem of . or .. becomes _ (#9420)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Address CodeRabbit review: data-set names check every folder, an empty stem is _
A device-named document under `{document}/{name}` made a `nul` folder,
since the device check saw the whole path; it now checks each component.
A document named `.` has an empty stem and gave `.png`; it becomes `_`
like `.` and `..`. The test uses a temp dir that cleans itself up.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* SVG: text reads each font file once instead of once per glyph (#9406)
fontdb re-reads a file source's whole font for every glyph usvg outlines,
about a millisecond a character with the system fonts. The import's font
resolver now loads each chosen face's file once per process (capped at
256 MB) and hands usvg the bytes from memory.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* SVG: a font collection moved into memory keeps its face order (#9406)
fontdb reuses freed slots last-first, so removing a .ttc's faces in order
and loading them again reversed them, and the glyph fallback of a later
text found a different face (MS PGothic instead of MS Gothic).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Address CodeRabbit review: font cache checks size first, validates before swapping
A font file past the cache budget is no longer read (and dropped) on
every lookup: its size is checked first. Read bytes must load the face
before they're cached or the file's on-disk faces are removed, so a file
replaced or cut short since indexing keeps its faces and isn't remembered.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Address CodeRabbit review: font cache misses are single-flight
Two imports missing the cache for the same file at once both read it,
and the later one kept setting its text from its own copy. A miss now
holds a loading lock and looks again once it has it, so the second
import takes the first one's bytes.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* Reveal All: ignore erased, fully transparent pixels (#9379)
The Eraser only clears alpha, so an erased pixel keeps its colour bytes
and Surface::content_bounds counted it: Reveal All (and the Crop tool's
beyond-canvas preview) grew the canvas to pixels nothing shows. Count
only pixels with alpha > 0 outside the canvas, as Photoshop's layer
bounds do.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Reveal All: scan only off-canvas pixels, in parallel (#9379)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
an_ambient_map_or_lut_never_renders_unfiltered_pixels_into_the_stack_cache
compares the process-wide stack_cache_bytes() before and after a denied
render. In the shared tests/it binary other tests render smart objects in
parallel and change that counter, so the test failed about 1 run in 20.
It now runs in its own process, like engine smart_filter_stages and
mask_cache_purge; the fixture moves to tests/support and is shared by
both binaries.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Image Processor, Batch, Lens Correction, Contact Sheet and Create
Droplet took their source and destination folders as typed paths only.
Photoshop picks them with Select Folder… / Choose… buttons.
Their `input` and `output` fields now get the same Browse… folder
picker the `dir` fields of the export dialogs have (#7942).
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Paste kept clipboard pixels where they were whenever that spot lay on
the canvas, whichever document they came from: a whole small document
copied into a larger one landed in its top-left corner. The clipboard
now remembers its source document; Paste keeps pixels in place only
there and centres them in any other, as it already did for pixels that
don't fit. Images from other apps have no source and centre too. Paste
in Place is unchanged.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* fix(engine): defined and imported patterns survive a restart (#9317)
The pattern library lived only in memory: patterns defined with Edit >
Define Pattern or imported from a .pat file were gone after a restart,
while their Patterns panel folders (saved with the preferences) still
named them. Photoshop keeps them.
The preset store now writes the user patterns (the library minus the
built-ins, in order) to patterns.pat, Photoshop's own pattern file
format, whenever their ids, names, sizes or order change, and loads
them when the store attaches. Like actions.json, a file that fails to
load is warned about and never overwritten. The web store accepts the
new record.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Patterns: persist same-id pixel replacements, retry a failed removal
CodeRabbit (discussion_r4369506324, r4369506326):
- an imported .pat whose id is already in the library replaces its
pixels, which the id/name/size key didn't show, so the old pixels came
back after a restart; PatternLibrary::pixels_rev is bumped on such a
replacement and is part of the key;
- a failed patterns.pat removal recorded the empty library as saved and
was never retried, so the deleted pattern came back; it now stays
pending, as a failed write does.
Tests: a_same_id_pattern_replacement_survives_a_restart,
a_failed_patterns_removal_is_retried.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Patterns: persist replaced built-ins and ASL replacements
CodeRabbit (discussion_r4369536978, r4369536981):
- a .pat import that replaced a built-in pattern by id was filtered out
as a built-in and never saved; only built-ins exactly as shipped
(is_pristine_builtin) are skipped now, and on load a saved built-in
takes the shipped one's place unless it changed before attachment;
- style.presets.importAsl replaced patterns by id without bumping
pixels_rev; both imports now go through PatternLibrary::upsert.
Tests: an_imported_builtin_replacement_survives_a_restart,
an_asl_pattern_replacement_bumps_pixels_rev.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* .pat: refuse names and counts the reader won't load, on write too
CodeRabbit (review 5641404908, outside-diff, two findings): now that the
preset store writes the user patterns, a file its own loader rejects or
truncates loses patterns at the next start.
- a name of 65,536+ UTF-16 units (with its NUL) was written although the
reader refuses it; write_pattern refuses it now;
- more than 100,000 patterns were written, and the reader kept the first
100,000 without a word; both now refuse counts over MAX_PAT_PATTERNS.
Tests: a_name_the_reader_refuses_is_refused_on_write,
more_patterns_than_a_pat_file_holds_are_refused.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Patterns: an early same-id import with other pixels is saved
CodeRabbit (review 5641454449, outside-diff, preset_store.rs:1191-1202):
a pattern imported before the store finished loading, with the id, name
and size of a saved one but other pixels, was appended (no pixels_rev
bump), won the merge, and then matched the loaded file's key, so it was
never written and a restart brought the old pixels back. The merge now
bumps pixels_rev when the copy it keeps differs from the saved one.
Test: an_early_same_id_import_wins_and_is_saved.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
MHC evaluated every pixel through a Vec of (offset, weight) taps per
colour, and bilinear branched on the site's colour for every pixel.
A Bayer row has two kinds of pixel that alternate, so both methods now
get one function per row kind with the colours as constants, which
the compiler turns into straight-line code and vectorizes across the row.
The arithmetic is unchanged: MHC's taps keep their order and weights
(kernel / 8, exact in f32), so every sum is the one the tap loop made;
bilinear's expressions are as they were. The tap-loop code stays under
cfg(test) as the reference of a test that compares both methods on all
four Bayer phases, odd sizes, out-of-range values, signed zeros,
infinities and NaN (a NaN may differ in sign or payload only).
Part of #9435.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The transmission came from a minimum filter of the normalised dark
channel, which grows every dark object by its radius: sky beside a dark
building took the building's dark channel, counted as haze-free and kept
its haze. Open it (a maximum filter of the same radius after the
minimum) so dark regions shrink back to their outline, and rescale the
0.95 weight so the slider's overall strength stays the same.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* Crop and Straighten Photos processes only the selection (#9297)
Like Photoshop, File > Automate > Crop and Straighten Photos only searches
the selected area when there is a selection; before, it always split the
whole scan. The found photos are warped from the full canvas, so a photo
reaching past a tight marquee keeps its real pixels.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Address CodeRabbit review: mask unselected pixels before photo detection (#9297)
Pixels inside the selection's bounding box but outside the selection (holes,
gaps between regions) now read as background, so a photo there is not split
off.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Address CodeRabbit review: refuse a selection with no pixel at least half selected (#9297)
A faint feathered selection left every pixel unmasked, so photos outside
it could still be split off. The command now reports that no pixels are
more than 50% selected.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
The Crop Shield's Match Canvas colour fell back to the theme canvas even in
Full Screen Mode, where the document sits on black, so the shield (and the
opaque fill with Show Cropped Area off) was a grey band over the black view.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
file.new takes "artboard": true: the document is one artboard over the
canvas, its background the chosen Background Contents, holding an empty
Layer 1 and no Background layer. The New Document dialog has an
Artboards box under Orientation that sets it.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
A swatch recoloured the selected type layers only with a Type tool, and
shape fills only with a shape or Pen tool. Photoshop 2025 recolours both
whatever the tool (measured with the Move and Brush tools); its Color
panel keeps to the tool-based rule, which is unchanged here.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
The bars were capped at 300 px while the sliders above them fill the
Properties panel; they now take its whole width too.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Image Rotation, rotated Crop, canvas flips and Image Size mapped a shape
layer's gradient fill through map_fill but never its stroke paint, so a
gradient stroke kept its old angle and offset while the fill turned.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
A table with no header peaking at 255 or 1023 was scaled to full range,
so white came out 255 where Photoshop gives 16 or 64. Without a header,
the inferred output depth now starts at 12 bits.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
A comment holding <size>/<data> text was read as the LUT, so a commented
inverse .look rendered as identity. Drop comments before finding tags.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* Image Rotation › Arbitrary turns unlinked layer masks (#9201)
Free Transform's helper moves a pixel mask only when it is linked, so
rotating the whole image (and a turned crop) left unlinked masks of
non-Background layers in place. Warp them too, recursively into groups,
as every other canvas operation does.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Tests: the unlinked mask also turns the right way at 90° (#9201)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Keep CPU grid strokes one device pixel wide at 2x display scale, matching the GPU canvas. Exercise both canvases at both display scales and U8/U16/F32 without changing upstream grid colours.
* Package: never overwrite one link's copy with another, list a missing link once
Copies whose names collided were renamed to "<count>-<name>" once, without
checking that name too: links a/x.png, b/2-x.png and c/x.png packaged the
third over the second's copy, so two layers showed the same image. The name
now steps until no earlier copy has it, ignoring case as macOS and Windows
folders do. A missing link placed on several layers was listed once per layer.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LPBRXWMhtDUsQDdZKmt9eZ
* Contributors: credit softwaregames1 by their GitHub profile name
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LPBRXWMhtDUsQDdZKmt9eZ
* Package: never overwrite a file already in Links
A second package into the same folder picked the same Links/<name> and
replaced the earlier copy. A name taken by a file already there is now
stepped like one taken by another link in this run.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LPBRXWMhtDUsQDdZKmt9eZ
* Apply suggestion from @coderabbitai[bot]
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
---------
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
A Pen press on an endpoint of the Work Path that Make Selection hid no longer carries it on; with
no path selected the new path replaces it, as in Photoshop. The path overlay checks the hide
against the document it draws, so the frame a click into another arranged tile activates that
document doesn't draw the old document's hidden Work Path.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The 3-sample and monochrome fill called `Scale::value` for every sample:
two modulo operations, checked multiplications and a bounds-checked
lookup in `BlackLevels::at` each time. With no per-column black deltas
the black level and range depend on the row and the column phase only,
so they are now worked out once per row and phase, and the samples go
through the same arithmetic as before ((v - black) / range, the finite
check, the white-balance multiply, the clamp). Frames with deltas, or a
repeat pattern wider than 16 columns, keep the per-sample path.
A test compares the new fill with `Scale::value` bit for bit for one and
three samples, several black patterns, deltas, a linearization table and
offset starting columns.
Part of #9435.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
usvg keeps a chain of single-use patterns past 200 levels and resvg draws
every one, so a costly filter at the end of the chain went uncharged. A
referenced root (pattern, mask, clip path, embedded drawing) the check
would skip at the cutoff now makes the drawing too costly; ordinary
children there still count as before.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Orientations that swap rows and columns read the source one column at a
time, a cache line per pixel on a frame that does not fit the cache.
They now copy 32 x 32 pixel tiles, so both sides of a tile stay in L1.
The pixels moved are the same.
A test checks every orientation against `source_xy` on sizes around the
tile side.
Part of #9435.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>