A saved docking value that is not a craft-ui workspace, such as the bare
layout with dockingHidden written before workspaces, no longer migrates:
the window opens with the default layout built from the saved panels,
dockTabs and dock, and its collapsed custom groups are dropped. Workspaces
load as saved. The width a user dragged the native dock to, which egui
remembers under the native dock's panel id, sizes the default column once.
With no document open, Full Screen Mode (and Full Screen Mode With Menu
Bar) showed the start screen on the black full screen pasteboard, where
a light theme's dark text and logo are nearly invisible. Photoshop
refuses Full Screen Mode without a document.
Both modes are now disabled with no document (Cycle Screen Mode too,
unless it would bring a full screen mode back to Standard), and a full
screen mode left with no document - the last one closed - goes back to
Standard Screen Mode.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Autosave: a recovery listing judges each key once, so an autosave in progress isn't listed twice
* Autosave: the recovery listing builds for the browser too
The canvas is a protected `canvas` panel in the docking layout: it never
moves, floats, closes or takes tabs, and accepts side splits, so a panel
dropped on it opens a frame beside it. The dock area fills the space the
menus, bars and toolbar leave, with new dock zones on.
Until the workspace is customized, the layout is built each frame from the
native dock's state: the canvas beside one end-side dock column of the
shown groups, with their tab order, selected tabs, user-set heights and
collapse, and the Studio themes' Properties group floating over the
canvas. The native dock's commands keep acting on that state. ui.set
dockWidth resizes the dock column. A panel no workspace has placed opens
in its native group, or as that group at its native place in the column.
Layouts saved without the canvas load beside it.
CodeRabbit (discussion_r4369684193): an untagged grayscale document is
shown through the default working gray (Dot Gain 20 %-compatible, gamma
1.732), but its unconverted samples were tagged sGray, so the exported
file looked darker than the canvas. They are now tagged with the profile
they are shown in, as Photoshop embeds its working gray.
Test: untagged_documents_embed_the_profile_they_are_assumed_to_be_in
(the gray PNG case).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Clone Stamp already wraps in Pattern Preview (#4997). Blur, Sharpen,
Smudge, Dodge, Burn, Sponge, Mixer Brush, Color Replacement, Background
Eraser, Pattern Stamp, History Brush, Healing Brush and Spot Healing now
take "wrap": true as well, and the canvas sends it while Pattern Preview
is on (#8883).
The sequential-dab tools run their dabs on WorkTiles, moved into
photocraft_paint::retouch and given a wrap tile: each canvas pixel is kept
once and read and written wherever it repeats, so a live stroke and its
commit still give the same pixels. The composite tools go through #4997's
periodic::Composite via one periodic::stroke helper. Spot Healing centres
its sampling window on the stroke, at most one canvas across.
With wrap off, every command takes the path it took before.
An untagged document (a new one in the default working space, or a file
opened without a profile) is treated as sRGB (sGray for grayscale), but
Export As, Save As and Save for Web wrote no profile for it, so viewers
had to guess. Photoshop embeds sRGB IEC61966-2.1 for both a new and a
"Don't Color Manage" document when the profile is embedded.
A flat export to a format that carries profiles now tags an untagged
image with the profile assumed for its mode; the codec still leaves it
out when embedding is off, and formats without profiles are unchanged.
Save for Web does the same when Embed Color Profile is on.
Tests that relied on untagged exports carrying no profile (an EXIF
ColorSpace round trip, the Export As proxy-estimate premise, an Affinity
preview fixture, a WebP lossy check) now say so explicitly.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Repin every craft-libs crate to 2869b8cc. The customized layout is a
craft_ui::docking::Workspace; window.panel.*, window.workspace.* and
ui.dock parse as DockCommand and apply through it. Workspaces saved
before the version field load with their hidden panels, dock-back
places and collapsed groups.
effect_maps_with_nested_rayon_work_do_not_deadlock rendered its document
101 times and failed when the whole run took longer than 120 s. On a
machine busy with other builds the renders slow down far enough to pass
that limit while every render still finishes, and the test then fails
with "effect-map rendering deadlocked (#276)".
The render thread now sends a message after each render, and the test
fails when 120 s pass without one. A render that never finishes still
fails the test after 120 s.
Type on a path keeps its own path, but nothing could edit it: the path
tools showed and edited the work path it was made from, so the text
stayed put. Its own path is now Photoshop's Type Path: with the type
layer selected, Direct Selection (and the anchor tools) show and edit
it, the path.* commands take it with "name": "layer", path.list names
it "<layer> Type Path", and the type is laid along it again.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A crop drag left over by a tool switch (#9223) must not scroll the view
while a panel slider beside the canvas is held.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
In the Crop tool's default mode the active view's camera carries the
crop's turn (View::rotation = -crop_angle). Window > Arrange > Match
Rotation and Match All copied that turn into every other view and
floating window, which stayed turned after the crop was committed.
While the crop drives the camera, the view's own rotation is 0 (picking
the tool straightened it), so that is what gets copied, and the active
view keeps its crop camera.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The edge auto-scroll (#4183) ran only while app.drag was set, but both crop
tools keep their gestures in app.crop.drag / app.pcrop.drag. Frame draws,
moves and classic resizes, and Perspective Crop box, corner and quad drags,
now scroll too; turns and the default mode's camera-driven drags stay as
they were.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A board placed or moved left of / above the origin shifts the whole document
(fit_canvas), but no artboard path moved the Color Sampler points or the
painting symmetry, so they read other pixels afterwards. fit_canvas now returns
its shift and every caller moves both by it, as Canvas Size's sampler map does.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Trim tested the float composite's alpha for > 0, so a pixel the 8-bit image stores as
alpha 0 (e.g. alpha 1/255 on a 40 % layer) still counted as content and kept a margin.
Judge alpha against half a step of the document's depth (8/16 bit); 32 bit is unchanged.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Windows Ctrl both starts a straighten line and is held while drawing it,
which turns snapping off on Move and Up; the press still snapped, so the
frame turned by a different angle. The override now covers the press of
a straighten line too, and every straighten press snaps as a point,
wherever it starts.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With a drawn crop frame, a History panel click (state, snapshot, Step
Forward/Backward or Delete in its menu) or a control-channel
history.selectState resized the document under the frame, which kept its
coordinates, so Enter cropped the old ones. The Edit menu already greys
these while a crop is pending; the panel and the control channel come
through app.run, so crop_ui::intercept now refuses them there and the
panel menu greys them, as for Free Transform.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A press inside an edited, upright Classic Mode frame got the frame-move
snap even when it drew a Straighten line (button armed, or Cmd/Ctrl), so
every point of the line was shifted by the offset that would align the
moved frame, and the frame turned to the wrong angle. The line's ends now
snap as points, as they already do outside the frame.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
An out-of-range value that merely rounded to the document's resolution as f32
was accepted, and keepPrintSize with an own resolution below 1 ppi resampled
the canvas against old.max(1.0), shrinking it to 1 x 1.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
image.crop built an explicit rectangle only when x, y, width and height were
all integers with width and height above 0; anything else fell back to the
selection's bounds, so width 0, a negative or string size, or only some of
the four keys cropped to the selection and reported success. A rectangle
that is passed (any of the four keys non-null) but incomplete or empty is now
a bad-params error and the document is unchanged; {} still crops to the
selection.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Limits::banded() lifted the 2^30 px cap, and the only failure left was a
tile allocation error. Linux overcommits, so the tiles were allocated
anyway and writing them had the out-of-memory killer end the app and
every open document. A valid all-black Deflate RGB8 TIFF declaring
100,000 x 100,000 px (30 GB of pixels) is a few tens of MB on disk and
passes the bomb guard.
- io memory.rs: memory::available() is MemAvailable plus free swap on
Linux, capped by the process's cgroup v2 memory.max (and those above
it) and memory.swap.max; None elsewhere (Windows refuses past its
commit limit, which the importer already reports). check_fits refuses
when the need plus a 512 MiB reserve doesn't fit.
- tiff_to_document checks the layer's tiles plus the working copies of
one group before allocating anything: "not enough memory to open this
100000 x 100000 px image: it needs about 41.7 GB and 7.8 GB is free".
- codecs TiffBands::group_bytes gives the largest group; a single-strip
file is one group (the whole image), which the check now counts.
- TiffBands puts Truncated before MorePages, as the whole-image decode.
- raster: try_write_interleaved reports a wrong length as
AllocationError::LengthMismatch { expected, got }, not SizeOverflow.
- Comments and docs no longer name another editor.
Tests: io a_tiff_larger_than_free_memory_is_refused (300,000^2 black
RGB8, Linux) was OOM-killed in a 4 GB cgroup without the check; memory
unit tests for the policy and the meminfo/cgroup parsing; codecs
a_cut_off_page_of_several_warns_in_the_whole_image_order and
group_bytes_is_the_largest_group_handed_over.
Session::close now forgets which of the document's linked files were
missing, so a document reopened with the same id lists none until the
next look. layer.smartObjects.updateChanged drops a look still running
on a worker thread, which stamped the files earlier and could clear a
missing file the command had just found.
* security(affinity): charge archive names, failed reads, corner arrays, attachments, pages and font names
Bound the remaining per-occurrence and table-driven expansion work left after
#8938: aggregate archive entry-name bytes (copied only for the winning name),
extraction allowance charged before decoding so failed checksums are not free,
CnrD corner arrays charged as curve records, AdCh and gradient arrays charged
as slots (gradient positions copied only up to the stop limit), a document-wide
page-rectangle cap, and per-field and aggregate limits on retained font names.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* security(affinity): charge pixel state-array scans against the slot budget
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* fix(affinity): charge decoded name length and bound PagR rectangle collection
---------
Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
- Dragging every component with Path Selection moves the whole path
(`shape.edit` move), so a live rectangle or ellipse stays live instead of
losing its corner-radius widgets through `path.moveAnchors`.
- Esc and switching tools end a Pen draft with `pen_end`: a refused commit
(a locked layer) keeps the path as the Work Path instead of retrying
`shape.create` and the error on every frame. Return still keeps the draft
to commit again.
- The first component always draws as Combine: `path.setOperation` leaves
it alone (naming only it is refused), and the menu and + / - neither add
a History step for it nor show another operation.
- Only Path Selection, which shows the component selection, changes the
selected components; the Pen tools set the next path's operation.
A release at the press point went through the snapping like any drag's,
so a click inside an edited frame (or a default-mode click moving the
image) or on a handle pulled an edge within reach onto the document's and
recorded a box Undo step; a double-click to commit cropped that rect. A
click now leaves the frame alone, as a Move-tool click leaves the layer.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The filter-type dropdown has an Artboard entry after Mode. With it
picked, the Layers panel lists only the artboards that hold the selected
layers and their contents, as the tree shows them (closed groups stay
closed). With nothing selected, or with a selected layer in no artboard,
the panel is not filtered. The type has no controls of its own.
ui.set {layerFilter: {by: "artboard"}} picks the type. The control
protocol, the ui_set description and the parity table document it.
Reconcile main 486afd82cc while preserving reviewed lifecycle, capture, IME and settings migrations. Include canonical dependency pins and the generated lockfile.
All nine CI stages passed: 11,580 passing test executions, zero failures and 91 ignored across 93 summaries. Native/browser acceptance and paired app performance remain open.
The untouched default frame lets Esc leave full screen (#7315), but the
frame stays the default until the gesture's release, so Esc mid-drag left
full screen and the drag went on. A gesture in progress now keeps Esc.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
An imported file can carry a resolution outside 1..30000 ppi (PNG pHYs 1 px/m, PSD 0, TIFF in
cm), and the Image Size dialog sends it back unchanged on OK; refusing it would block a plain
resize that worked before.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
`image.imageSize` read `resolution` as `as f32` and clamped it to 1..10000, so 1e39 (inf) silently
became 10000 ppi, -5 and 0 became 1 ppi, a string was ignored, and a valid 20000 ppi (allowed by
File > New, Bitmap and the dialog's own field) dropped to 10000. Parse it once like `image.crop`:
non-finite, non-number or outside 1..=MAX_RESOLUTION is an error and the document is untouched;
the keepPrintSize path uses the same value.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>