A Stop step with its dialog toggle on now shows a Message window with
the recorded text and Continue (when the step allows it) and Stop,
keeping the steps already applied; with the toggle off it ends playback
silently, and Insert Stop turns the toggle on, as measured in the
reference application. Allow Continue is read from the paused playback,
not from the dialog's fields. Agents and headless playback keep the
engine's Stop semantics.
A pause inside a called action now carries its callers (at most 16):
confirming finishes the called action and then each caller after its
call, replayed inside the callers' playback frames so recursion checks
and the single history state still hold. A silent stop ends the callers
too. Fixes#8386.
Co-Authored-By: bommerts <44821497+bommerts@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Paste into another artboard keeps the place on the board (#8788)
Copying from one artboard and pasting with another board (or a layer on it)
selected put the pixels at their old canvas spot on the first board, where
the second board hid them, or in the middle of the view; the new layer still
went beside the selected one, inside the second board.
The clipboard now remembers the artboard a Copy came from (the copied layer's
board, every copied layer's when several are selected, or for Copy Merged the
board under the middle of the copied area). Paste and Paste in Place into a
different board of the same document move the pixels by the offset between
the two boards' origins, so they land at the same spot on the new board, and
the layer goes inside it as before. Pasting on the same board, outside the
boards or into another document is unchanged, and Paste Into / Outside keep
centring on the selection.
Co-Authored-By: Claude <noreply@anthropic.com>
* Paste between artboards: copied layers and true middle for the source board
Review follow-ups:
- With a pixel selection, Copy takes the active layer only, even when several
layers are selected, but the source board was worked out from every
selected layer, so selected layers on another board cancelled it. It now
uses the layers Copy actually takes.
- Copy Merged found the board under the middle of the copied area by halving
each edge first, which rounds 9..11 to 9 and could pick the wrong one of two
boards that meet. The edges are now added before halving.
Adds a test for each, both failing before.
Co-Authored-By: Claude <noreply@anthropic.com>
* Paste between artboards: locked boards and the placement midpoint
Review follow-ups:
- With a locked board itself selected, the pasted layer goes above the board,
not into it, yet it was still moved to the board's spot. The board shift is
now skipped in that case; a layer inside a locked board still lands on it.
- layer_place found the board a new layer lands on by halving each edge
first, so a paste moved to 19..21 had its middle at 19 and was turned away
from a board starting at 20. The edges are now added before halving, as for
the copy's source board.
Adds a test for each, both failing before.
Co-Authored-By: Claude <noreply@anthropic.com>
* Paste between artboards: floored placement middle, pastes join smaller boards
Review follow-ups (FredApps):
- The placement middle truncated toward zero, so content at -4..3 (middle
-0.5) counted as 0 and a board starting at x = 0 took it in. One helper,
layer_place::centre, now adds the edges in i64 and floors the sum; Copy
Merged's source board uses it too, and so does #10512's auto-nesting, with
a byte-identical layer_place.rs so the two merge in either order.
- Pasting onto a smaller board kept the offset from its origin, but the
layer's middle then fell past the board's edge and it was placed outside.
A paste moved onto a board now joins it; the board clips the rest.
Tests: negative-boundary placement, a document without boards, a smaller
board (offset kept, board clips), each failing before where it applies.
Co-Authored-By: Claude <noreply@anthropic.com>
* Paste between artboards: keep a clipped paste's clipping on a board
Review follow-ups (CodeRabbit):
- A paste that joins a board always lost its clipping. It now keeps its own
clipping flag (the copy's, from before placement) while the board holds a
layer it can clip to, and drops it on an empty board, as a new layer does.
- Documented that boards more than the 32-bit range apart can't shift a paste,
which then keeps its usual placement rather than wrapping around.
Adds a test (a clipped group pasted onto a board with a layer and onto an
empty one), failing before.
Co-Authored-By: Claude <noreply@anthropic.com>
---------
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: FredApps <153173854+FredApps@users.noreply.github.com>
* feat(ui-egui): native Pen cursor bitmaps with bounded cache (#9122)
- Render standard Pen cursors (Pen, Freeform Pen, Curvature Pen, Add
Anchor, Delete Anchor, Convert Point) as OS cursor bitmaps to eliminate
presentation/canvas frame dependency and tracking latency.
- Preserve exact 8-offset dark outline and white foreground composition,
native platform scaling, and tool hotspots.
- Implement bounded caching (up to 16 entries) keyed on shape and scale to
ensure zero re-rasterization on warm pointer movement and rapid tool toggling.
- Preserve precise/crosshair mode, vector close-path cursor state, and painted
tooltip fallback for unsupported platforms/viewports.
- Add comprehensive regression tests for rasterization, alpha/color fidelity,
hotspots, lifecycle, and cache bounding.
- Add release benchmark example (cursor_bench) measuring cold rasterization
and warm movement/cache performance with optional PNG artifact export.
- Retain Pencil painted outline: documented that rigid OS cursor hardware
planes cannot preserve document pixel grid snapping across fractional
zoom/scales without continuous drift or per-frame churn.
* fix(ui-egui): correct Pen cursor rasterization, caching, and benchmark (#9122)
- Fix cursor_bench imports to use public tool_cursor::pen with correct frame lifecycle.
- Apply and verify requested native scale per platform in benchmark Context.
- Replace benchmark hardcoded metrics with truthful measured counters and Result error returns.
- Fix Arc::ptr_eq identity checks, unused imports, and Image::from_raw codecs API.
- Add baseline painted fallback measurements to benchmark for real speedup comparisons.
- Keep original single-entry cache for non-Pen shapes and add separately bounded 6-entry Pen cache without whole-cache cloning.
- Preserve fractional-scale logical geometry via subpixel resampling and compensate for OS integer hotspot quantization.
- Add independent comparison test against painted path across scales and backgrounds (light/dark/midgrey).
- Fix Shape::Pen tuple match hazard and doc comments on pen().
- Register cursor_bench in perf/budgets.toml for xtask perf runner integration.
* fix(ui): benchmark cursor preparation inside real egui frames
* feat(ui-egui): visual validation reference, comparison metrics, and contact sheet for native Pen cursors (#9122)
* fix(ui): render cursor reference pairs without duplicate Area ids
* fix(ui): use egui 0.37 frame API in cursor benchmark
* fix(ui): retain rendered cursor textures and restore existing documentation
* fix(ui-egui): restore crisp Pen cursor rasterization and update cursor tests (#9122)
- Eliminate double-resampling blur in Pen cursor rasterization: use direct discrete
vector glyph rasterization matching the painted fallback without fractional softening.
- Update CapsLock test to assert native OS cursor bitmap and fallback Crosshair for
Pen tools, validating exact bitmap RGBA, dimensions, and hotspot.
- Add synthetic test proving mathematical equivalence between straight RGBA hardware
blending and multi-pass painter fallback across dark, midgrey, and light backgrounds.
* test(ui): expect the native bitmap for Precise crosshair cursors
* fix(ui): bound cursor benchmark samples and strengthen bitmap tests
(cherry picked from commit 118c673e5d822742da0a1d99c5aa3a9989b47ff8)
* test(ui): pin cursor percentile rank and glyph-derived hotspots
* test(ui): cover every Pen cursor mapping and per-variant edge samples
---------
Co-authored-by: FredApps <153173854+FredApps@users.noreply.github.com>
* Add headless GPU backend foundation for composition and flat export (issue #8062 PR 1)
* Fix headless GPU readback bounds, API compliance, and error preservation (#8062)
* Fix GPU readback bounds, context thread spawn error, and test parity (#8062)
* Fix BandRenderer Send bound, PNG reborrows, and clippy lints (#8062)
* Fix effect shadow test construction and remove dead code wrappers (#8062)
* Use short reborrows for Headless renderer without lifetime escaping (#8062)
* Fix clippy collapsible_if and ensure multi-band geometry in flat export tests (#8062)
* Fix automation Rect import, add renderer diagnostics, and harden flat export retries (#8062)
* Fix GPU feature test APIs and native target gates
* Verify unsupported GPU effects before testing band seams
* Use compositor buffer ownership API after upstream memory accounting change
* Update export renderer test helper for owned compositor buffers
* Fix headless GPU backend review findings (#10842)
- release a closed document's GPU caches through a BandRenderer hook
- bound the monitored readback wait and report a stalled GPU as device loss
- reject 32-bit float documents before band readback so exports fall back to CPU
- keep previews at 8-bit RGBA and report the palette/Duotone renderer bypass
- retain renderer diagnostics when encoding fails
- strengthen renderer, save-path and GPU diagnostics tests
* Add GPU close-hook and 8-bit preview regression tests (#10842)
* fix(io): correct renderer binding mutability
* Fix remaining headless GPU review findings (#10842)
- release a document's GPU caches when file.close, file.closeAll or
file.closeOthers removes it through a command
- honor cancellation while band readback waits, polling in 100 ms slices
- fault the device after a readback timeout so later exports skip it
- report single-layer, CMYK ink-mixing, ORA and PDF CPU paths to a
requested renderer
- keep fallback warnings in their export instead of leaking them into the
next one
- requeue renderer diagnostics when a renderer-aware save's final write
fails
- write MCP/serve diagnostics without panicking on a broken stderr
- document the actual colour-space contract and drop F32 from the GPU
depth list
* Use question mark for cancellable readback errors
* Keep GPU export diagnostics with their attempt and stop bands on cancel
Encode native .pcraft bytes before draining renderer diagnostics, and
requeue export warnings when a workspace write fails, so callers still
report the adapter or fallback reason with the error.
Move a failed GPU attempt's queued diagnostics into its CPU retry result
instead of leaving them for a later successful export to report.
Stop GPU band readback at the next band after cancellation, and check the
interrupt before each CpuRenderer sink delivery.
Band readback uploads half-precision textures, so reject U16 alongside
F32: their samples cannot survive the upload. Tighten the 8-bit CPU/GPU
parity checks to 1/255.
* Keep headless export warnings when a workspace write fails (#10842)
A capability-scoped save encodes the export, then writes it; when the write
fails, the export warnings (folded together with renderer diagnostics) were
pushed back through `BandRenderer::push_diagnostic`, whose default is a no-op.
A custom renderer that overrides only `drain_diagnostics` therefore lost the
adapter or fallback reason that belonged with the error.
Keep them in `Headless` instead and return them from the next
`drain_diagnostics`, alongside the renderer's own queue. The regression uses a
renderer without a `push_diagnostic` override and checks the warnings survive
the failed write and drain exactly once.
Also name the actual source of the depth limit in the headless GPU matrix:
layer content is uploaded as half-precision textures, not band readback.
* Stop CPU bands and CPU retries on cancellation (#10912)
The CPU retry after a retryable GPU error composes through
`FlatSource::bands`, whose shared `emit` sink did not poll the export
interrupt: a cancel was only observed after the whole composite finished.
Check it once per band, as `CpuRenderer` does, for both RGB and CMYK ink
bands. The flat and streamed-PNG retry branches also check before starting
the full CPU composite again, so a cancelled export returns
`IoError::Cancelled` instead of re-rendering the document.
Tests: band-sink cancellation for RGB and CMYK inks, a renderer call counter
proving a second export reaches the renderer, and a pending `wait_slices`
poll observing cancellation set mid-wait.
* Merge origin/main into GPU foundation (#10842)
* Keep GPU-path diagnostics on every failure path, honour cancel in native copy
- save: export warnings of a failed local write stay in Headless pending diagnostics
- render: preview fallback warnings are returned, drained, and added to the doc.render reply
- io: renderer-neutral fallback wording; native single-layer copy checks cancellation per band
- gpu: gate wait_slices tests off wasm32 (#10842)
---------
Co-authored-by: FredApps <153173854+FredApps@users.noreply.github.com>
* fix(ui): cache adaptive wide angle preview mesh
* test(ui): match explicit constraint stroke color mode
* test(ui): clear unused texture updates in redraw regression
* test(ui): inspect grouped overlay paths independent of animation
* fix(ui): address wide-angle mesh cache review feedback
Repaint after panel edits so overlays catch up, share the proxy rect
between render and overlays, document the dirty invariant, and make the
overlay test measure its own baseline instead of hard-coded layout.
* Remove unused colour format import after integration
---------
Co-authored-by: FredApps <153173854+FredApps@users.noreply.github.com>
An adjustment layer's Make step now loads its `Nm `, `Md ` and `Grup`
keys as the command's `name`, `mode` and `clipToPrevious` params and saves
them back. An unreadable value keeps the step as an unsupported kept step;
`layer.newAdjustmentLayer.*` validates the new params like New Layer and
clips through the clip-group rules. Fixes the remainder of #8384.
Co-Authored-By: bommerts <44821497+bommerts@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A press during Free Transform is now classified for snapping the way the
transform tool's pointer classifies it (box_hit, so a hidden reference
point is no hit): dragging the reference point, or an Alt-drag inside or
outside the box, used to snap as a box move, so the point stuck and snap
lines showed at box edges it never reached.
Measured in the reference application:
- the reference point snaps to the box's nine points (corners, edge
midpoints, centre) and to nothing else (not guides, other layers or the
canvas), even with View > Snap off or Ctrl held during the drag;
- where the point sits on a handle, a press drags the point, so it now
comes first in the hit order;
- a box dragged from inside doesn't snap back to the selection it
transforms (TransformMove leaves the selection out of its targets);
- with Alt held the pointer over the box and around it (the rotation zone
too) is the reference-point pointer, as an Alt-press places the point.
Snap lines are drawn last, above the transform preview and overlays.
Left out of the original PR: its fallback snapping of the point to
guides, layers and the canvas (the reference application doesn't), the
centre dot drawn while Alt is held (an extra), and Ctrl turning the pull
off. The PR text's full-layer-bounds and Alt-scale items were not in
its code.
Co-Authored-By: Furash <4040177+Furash@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Each new coverage tile zeroes 16 KB. The parallel path of
CoverageMap::accumulate did that on the calling thread while building
its work list, so a large dab's new tiles ran one at a time. Create
them inside the parallel section instead.
coverage_bench gains a large-dab line (3457x3457, what a soft 2000 px
tip covers). big_dab_bench's "accumulate" figure is relabelled: it is
a cold first push minus a warm rasterize, not accumulate alone.
Refs #11339
A straight Crop tool crop (image.crop with an explicit rectangle) of a
document whose only artboard covers the whole canvas now fits that board
to the new canvas and clears its size preset. Before, the board kept its
old size and hung past the cropped canvas.
Measured in the reference application: its Crop tool in an artboard
document edits the artboard ("Edit Artboard": the board takes the frame,
content stays where it is), so the visible result matches. Image > Crop
with a selection does nothing there, Image > Trim keeps the board's
size, and a turned crop is impossible with artboards.
Left out of the original PR: the fit on selection crops, Trim and turned
crops (they differ from the reference application), so crop_doc and
Export Layers to Files are unchanged; the printer-query commits
(superseded on main) and the shapes.rs hunk (already on main).
Co-Authored-By: durtyrobbin <76844303+durtyrobbin@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A control request (authorized, not automation input) or an action step (nested run) during a
background Free Transform commit is refused again, as before: the caller needs its answer now,
and a control `run` was answered before the deferred command ran. A click in another document,
or a second one while one already waits, is refused too. A deferred command's error is posted
as a notice, as the commit's own status replaced the status bar's text right after.
Co-Authored-By: DuBearte <DuBearte@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Skip compositing for geometric measurements
* Preserve simple PDF shapes and glyph source ranges
* Preserve text and shapes in PDF export (#10269)
- Export topmost simple text layers as vector glyph outlines with selectable text
- Embed ActualText unicode span and invisible text operators (mode 3 Tr) for 100% extraction
- Support stroked shapes in vector PDF export (centered solid strokes, dashes, line caps/joins)
- Retain glyph style indices in text rendering outlines
* Drop a product name from the glyph outline doc comment
* PDF export: keep path text and synthetic bold raster
* Fix PDF Unicode selection and respect font embedding permissions
* Render the text cache in PDF raster fallback fixtures
* Fix PDF vector selection eligibility and finite text matrices
* Preserve upper PDF vectors and reject overflowing curve controls
* Fix text shape import in PDF regression test
* Cover PDF Unicode map blocks and leading selection whitespace
Normal private merge of public C cd5069078f after saving adapter increment 169ceb32d. Four-path successor delta applied without conflicts; no provider contract migration or copied dependency files.
Combined Actions panel source remains uncompiled and unqualified. No native, Q/target, renderer or public PR effect.
Resolve current folder selectors before capture effects; retain new-draft placement through Save; publish validated definition fields and intended shortcut maps only. Preserve logical set-only behavior, checked physical no-ops and runtime snapshot comparisons.
Route Classic and Modern creation, assignment, duplicate and owned delete by occurrence with revision/origin revalidation. Keep known numeric Play/Conditional calls stable through insertion and reorder. Prepare four engine and three panel adapter controls in existing suites. Source-only: compiler, formatting and tests unrun; public PR unchanged.
Separate destination binding from immutable raw ActionOrigin, retain public struct construction and logical equality, and propagate checked membership errors through existing readers. Prepare contiguous row insert/move/duplicate/delete candidates and both shortcut maps without live publication; reject unrepresentable writer order and first-name changes.
Reuse known Play/Conditional remaps and deletion cleanup. Prepare five narrow provider tests plus delayed UI revision/origin refusal. Command record/draft/assignment adapters are intentionally unwired pending root/C source-contract review. No compiler, formatter, tests, Q/target or public effect.
Keep same-caption occurrences, empty-row order, selection and collapse independent using existing canonical row projection. Prepare focused real egui harness regressions. Modern ambiguous logical group mutations remain disabled pending the separately recorded slot-selector/provider decision.
Source-only private checkpoint. No native tests, formatting, target use or public effects.
Preserve the original panel WIP and merge qualified C pin 2a942f2e normally. Adapt definition-only Reset and latest Undo, shared recording admission, owned dialog routing, WorkPath and Classic physical folder selection/save.
Source-only checkpoint: no compilation, formatting or tests executed. Modern physical presentation and per-occurrence create/assign/duplicate/delete targeting remain pending shared API coordination; public PR unchanged.
- A path being drawn becomes the shape worked out with the target and
settings captured when drawing began, as the commit does.
- With nothing selected, the drawing replaces an old Work Path.
- A draft begun in Shape mode is committed, so a resumed subpath keeps
its layer's other subpaths.
- Without a draft, only the Work Path or a saved path is used.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EZbgszHyuEuWAzxaamteuU
Photoshop shows the bounding box and its handles for a single selected
shape too, with Path Selection and the shape tools. Show it for one or more
selected shape layers.