Commit Graph
11425 Commits
Author SHA1 Message Date
David MannandClaude Opus 5.5 168cc62e88 Merge main into fix/svg-fallback-cmap-cache
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-11-05 12:21:27 +01:00
Hamza 91fec0df9c Merge remote-tracking branch 'origin/main' into fix/crop-overlay-and-fill-defaults
main added the turning grid and draws the guides for the visible part of the frame (current_guides_for_frame). Kept from both: the canvas calls main's guides with this PR's frame look, and this PR's FrameLook functions sit beside main's visible_frame and turn_grid. The overlay still waits for the crop's first change, except while a turn or a straighten line is in progress, whose guides show from the start as main's tests expect.
2026-11-05 16:12:28 +05:00
David Mann 96a0db8ee7 Merge branch 'main' of https://github.com/storytold/photocraft into pr-11295 2026-11-05 12:08:52 +01:00
David MannandClaude Opus 5.5 105a4e2171 fix(ui): shape box takes no press when hidden, cancels on Esc/tool/document change, turns with the view (#11107)
CodeRabbit review on #11295:
- the handles take no press while View > Extras or Show > Target Path hides them
- Esc, a tool change, a document switch or an edit under the drag drops it unapplied
- the scale cursors follow the view rotation, as Free Transform's
- the outline goes through all four corners, so a rotated view draws it right

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 12:08:52 +01:00
Trevor BrownandClaude Fable 5.1 1b77721927 select.float: a blank or overlong stepName falls back to Move (#11383)
The new History step name for the dropped piece is trimmed and capped at 64 characters, so the control channel cannot plant an unbounded label; a test covers the fallback and the Duplicate name.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-11-05 06:08:50 -05:00
David MannandClaude Opus 5.5 c7aabedcaa Test the Stop document binding in both history modes
A paused Stop continues only on its own document whether or not Create a
single history state is on: the outermost playback captures the history
continuation in both modes, and its resume refuses another document.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 12:01:29 +01:00
Trevor BrownandClaude Fable 5.1 8fdcce3cd1 Lock Layers shortcut test: assert the key the panel menu paints (#11397)
From review: the panel-menu test collected no output, so a hardcoded or missing shortcut text would have passed. It now gathers the text shapes the menu paints and checks the default key, a changed key and a removed binding.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-11-05 06:00:40 -05:00
Trevor BrownandClaude Fable 5.1 cd203aa531 Move tool: History names its steps Move, Nudge and Duplicate as the reference does (#11383)
An Alt+drag copy of a layer is now one step named "Move", arrow-key nudges of the selected layers are named "Nudge" (one per press, or one per bundled run), and an Alt+drag copy of selected pixels is named "Duplicate". Alt+arrow keeps "Duplicate + Move". The Bundle Arrow-Key Nudges preference and its default are unchanged.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-11-05 05:59:44 -05:00
Trevor BrownandClaude Fable 5.1 6d486a4c29 Selection tools: dragging the outline records "Move Selection", as the reference does (#11390)
A drag inside the selection with the Rectangular Marquee, Elliptical Marquee or Lasso now records the History step "Move Selection" instead of "Transform Selection". select.transformSelection takes an optional stepName parameter that accepts only "Move Selection", and the canvas sends it from finish_selection_drag. Select > Transform Selection and arrow-key nudges keep their name.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-11-05 05:59:21 -05:00
David MannandClaude Opus 5.5 16000b01ef Address CodeRabbit review: batch 17 findings
Engine: droplet dependency capture skips disabled steps; a nested Batch
that was cancelled or could not write its error log fails the caller;
runDroplet forwards overrideOpen; actions.rename follows named Batch
steps; Batch steps inside a script count against MAX_SCRIPT_STEPS;
output claims compare destination identity; Save and Close never
replaces a read-only source. ATN: Md must be a BlnM enumeration,
adjustment-layer names must round-trip, Calculations exports a missing
blending as Multiply, Apply Image refuses unnamed-layer transparency.
Filters: Shape Blur records its resolved geometry, reserves its kernel
memory first, and reports a preparation failure as an error, not a
cancel; Crop keeps an artboard preset when the size is unchanged and
fits the board on a turned crop.

Codecs/cms/algo: zero-axis FITS image HDUs are empty; a GIF walk that
breaks off before the trailer fails closed; two-value .3dl shaper rows
are applied; fragmented custom kernels are refused and their work polls
cancellation.

UI: Conditional branches play through panel playback; paused actions
refuse to resume after being replaced; Playback Options OK validates
its fields; transform double-click ignores a hidden pivot; path boxes
snap to a stationary selection; modal blocking uses the effective tool;
a picker-consumed release clears snap lines and ends a Move drag; the
Crop preset control shows Selection and checks only it; Crop box undo
restores frame_from_selection; Bosnian fill labels.

Tests: timing asserts moved to an ignored test, plus the review's
coverage nitpicks.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 11:37:38 +01:00
Trevor BrownandClaude Fable 5.1 fa1814a076 Shortcuts: Ctrl+/ opens Layer › Lock Layers…, shown in the Layer menu and the Layers panel menu (#11397)
layer.lockLayers now defaults to Cmd+/ (Ctrl+/ off the Mac) in its engine spec and in the Layer menu row. The Layers panel menu's Lock Layers… row shows the command's current key, so a key changed in Edit › Keyboard Shortcuts shows up there. Plain / still toggles Lock Transparent Pixels.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-11-05 05:07:47 -05:00
Trevor BrownandClaude Fable 5.1 93da7d742b Move tool: Shift+drag of a layer locks to the eight directions, as the reference does (#11382)
A Shift+drag of a layer locked to the horizontal and vertical axes only, so +80,+80 moved 0,+80. The reference application locks to the nearest of the eight directions (+100,+30 moves +100,0 and +80,+80 moves +80,+80), so MOVE_DIRECTIONS is now 8, with today's hysteresis. Alt+Shift (duplicate and move) uses the same lock. The module doc and the comment above MOVE_DIRECTIONS now describe this rule.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-11-05 04:55:07 -05:00
Khawar Zamman WaniandFredApps 98bcbfab90 perf(io): build JPEG/PNG tiles straight from the decoded rows, in parallel (#10259) (#10281)
* perf(io): build JPEG/PNG tiles straight from the decoded rows, in parallel (#10259)

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

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

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

* Format fused tile import integration

* Route default flat imports through interrupt wrapper

* Remove unused flat import cancellation wrapper

* Exercise options import API in cancellation tests

* Stop flat image tile construction on cancellation

---------

Co-authored-by: FredApps <FredApps@users.noreply.github.com>
2026-11-05 10:33:29 +01:00
yoriswind 1de6c9e2c5 Find active layer donors beyond a turned crop corner window 2026-11-05 01:29:48 -08:00
yoriswind 224dcdc936 Fix content-aware crop targets and history labels 2026-11-05 01:29:48 -08:00
midasdf b60b58af6c Merge remote-tracking branch 'origin/main' into pr
# Conflicts:
#	docs/target-app-parity.md
2026-11-05 18:00:44 +09:00
David Mann cf65810dda Merge remote-tracking branch 'origin/main' into integration-batch-17
# Conflicts:
#	crates/ui-egui/src/i18n/cs.tsv
#	crates/ui-egui/src/i18n/de.tsv
#	crates/ui-egui/src/i18n/el.tsv
#	crates/ui-egui/src/i18n/es.tsv
#	crates/ui-egui/src/i18n/fr.tsv
#	crates/ui-egui/src/i18n/hu.tsv
#	crates/ui-egui/src/i18n/id.tsv
#	crates/ui-egui/src/i18n/it.tsv
#	crates/ui-egui/src/i18n/ja.tsv
#	crates/ui-egui/src/i18n/ko.tsv
#	crates/ui-egui/src/i18n/nl.tsv
#	crates/ui-egui/src/i18n/pl.tsv
#	crates/ui-egui/src/i18n/pt-br.tsv
#	crates/ui-egui/src/i18n/ru.tsv
#	crates/ui-egui/src/i18n/sr.tsv
#	crates/ui-egui/src/i18n/tr.tsv
#	crates/ui-egui/src/i18n/uk.tsv
#	crates/ui-egui/src/i18n/vi.tsv
#	crates/ui-egui/src/i18n/zh-hans.tsv
#	crates/ui-egui/src/i18n/zh-hant.tsv
#	docs/gaps.md
2026-11-05 09:03:28 +01:00
coqui-softwareandFredApps 51131b82cf UI: 2-column Home screen with recent file cards and centered workspace (#7231)
* UI: 2-column Home screen with recent file cards and centered workspace

* Rate-limit live-document thumbnail composition on Home

While an open document is being edited, Home recomposed its preview on the UI
thread on every revision. Regenerate at most every 500 ms, keep showing the
previous preview in between, and schedule a repaint so the last revision is
still drawn.

---------

Co-authored-by: FredApps <FredApps@users.noreply.github.com>
2026-11-05 08:44:21 +01:00
dotCooCoo 97d22397e3 Adjustments: Equalize's dialog refuses OK once its layer or selection changes
The Equalize dialog records the active layer and a hash of the selection
when it opens. If another layer is selected or the selection changes
while it is open, OK returns an error and the dialog stays open, so the
choice is never applied to a different target. OK runs again once the
original layer and selection are back.
2026-11-04 23:41:44 -08:00
dotCooCoo 78d993ba11 Adjustments: Equalize refuses a null selectedAreaOnly
image.adjustments.equalize used the default for `selectedAreaOnly: null`.
It now returns an error for null as it does for every other non-boolean
value, and only an omitted value takes the default. Action export refuses
a step with a null selectedAreaOnly for the same reason.
2026-11-04 23:41:44 -08:00
Hamza b2661918ed Crop: a click inside the untouched frame that draws nothing keeps its untouched look
A press inside the untouched default frame starts a Draw, and release counted every Draw as the first change, so an unmoved click showed the shield, the overlay and the started outline around the same frame. A Draw that leaves the frame it was pressed on is no change, as a click outside it already wasn't.
2026-11-05 12:07:46 +05:00
dotCooCoo a55ef6d585 Merge main into feat/equalize-entire-image 2026-11-04 23:04:09 -08:00
d7d138b1e5 Art History Brush: Opacity on the options bar (#10263) (#10278)
* Art History Brush: Opacity on the options bar (#10263)

The Art History Brush's own brush opacity is shown in its options bar
(0-100%) and sent to paint.artHistoryBrush. It is kept per tool, saved
across launches, set by the 1-0 keys and restored to 100% by Reset Tool,
as the Clone Stamp's is. Tests cover the UI wiring, per-tool persistence,
Reset Tool and stroke output at 8/16/32-bit.

* Update crates/ui-egui/src/panels/options_bar.rs

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

* Art History Brush starts at 100% opacity on first use

A tool picked for the first time takes the outgoing brush; the Art
History Brush now takes it at full opacity, as the issue's default asks,
so a 30% Brush no longer makes the first Art History stroke 30%. Other
tools keep inheriting opacity.

* Art History Brush: document Opacity in the command contract and carry it in tool presets

---------

Co-authored-by: aiongg <67543387+aiongg@users.noreply.github.com>
Co-authored-by: FredApps <FredApps@users.noreply.github.com>
2026-11-05 07:15:57 +01:00
9247c9e40a Port #5212: regenerate the scorecard for the two Playback Options preferences
Co-Authored-By: Zer0C00L01 <12090083+Zer0C00L01@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 06:30:37 +01:00
38acfc5ff8 Port #5212: pace the step after a called action too
A paced Play also waits after a Play Action step that finished on resume, so
every step of a nested playback gets its own frame; keeps play_owned under
the complexity limit by folding the wait into Called::Paced.

Co-Authored-By: Zer0C00L01 <12090083+Zer0C00L01@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 06:25:56 +01:00
Khawar Zamman WaniandFredApps 316e00a97e Bound Photomerge memory and safely reject out-of-budget jobs (#7851) (#10463)
* Reduce Photomerge input and fill memory

* Bounded working-memory budgeting and safe allocation for Photomerge

* Photomerge memory: estimate warped sizes, no RAM ceiling, shared RAM detection

- Budget is half of physical RAM (at least 1 GiB) with no 8 GiB ceiling.
- The pre-flight estimate uses each image's warped extent and the band
  grid's exact bound (band_bytes_bound), at the levels seam_blend uses.
- Auto-Blend keeps its old batching with no single-band cap.
- multiband returns a Result instead of a blank image on failure.
- Physical-memory detection moves to photocraft_engine::memory; the GPU
  budgets reuse it, so PHOTOCRAFT_RAM_MB means the same in both.
- Document memoryBudget; restore comments; tests for the band cap and the
  budget precedence.

* Photomerge: lower the blend's peak and estimate it by phase

- The band build makes its binary coverage straight from the alpha and
  writes each Laplacian level in place, so a band holds two fewer planes.
- The weight sums are freed before the collapse, which adds each level
  in place and frees it as it goes.
- The estimate is the largest phase (warp, ROIs, bands, collapse, output,
  fill) rather than the sum of all of them, and the bands get what is
  left of the budget after the ROIs and accumulators.

Every output pixel is unchanged: each change drops a plane or does the
same elementwise operation in place.

* Fix Photomerge band budget validation and fallible pyramid allocation

* Keep reference pyramid test helpers infallible

* Photomerge: bound source loading with the memory budget

Resolve the budget before any source is read, and admit each flattened
source before its surface is allocated. The accounting charges the
retained surface, the same-canvas temporary the flatten writes while the
source document is alive, and a file import's encoded bytes, with
saturating math so an overflow cannot wrap under a finite budget. Merge
to HDR Pro passes no budget and keeps its previous behaviour.

Tests cover the exact retained-plus-temporary charge, a refused source,
the within/over-budget command paths, the post-load estimate path, and
the unbudgeted HDR loader.

* Photomerge: bound source reads and imports by the remaining budget

Read each source file with what is left of the budget as its limit, lower the importer's own PSD/TIFF preflight or the flat decoders' pixel allowance to the remainder after the retained sources and encoded bytes, and refuse formats with no pre-decode estimate. Charge the decoded document's actual pixels (every layer) plus the flatten's working and output surfaces before flattening. Merge to HDR Pro keeps its unbudgeted read-and-import path.

* Remove redundant TIFF decode options update

* Clean up Photomerge budget Clippy findings

* Accept early decoder admission in source budget regression

* Photomerge: report unreadable sources as file errors; never reserve past a read limit

- A budgeted Photomerge reported a missing or unreadable source file as
  'not enough memory'. Only a file over the remaining budget, or one memory
  cannot hold, is a memory error now; others are file errors, as without a budget.
- read_all_with reserved a whole read chunk before checking the caller's limit
  for a file that grew after it was statted. It now refuses first and caps the
  reservation at the limit.

---------

Co-authored-by: FredApps <153173854+FredApps@users.noreply.github.com>
2026-11-05 06:23:56 +01:00
b152f4175e Move tool: auto-nest layers into the artboard they're dropped on (#10218) (#10512)
* Move tool: auto-nest layers into the artboard they're dropped on (#10218)

In Photoshop a layer dragged with the Move tool onto another artboard joins
that board, and one dragged onto the pasteboard leaves its board. PhotoCraft
had the Prevent Auto-Nesting lock but not the behaviour, so a layer dragged
onto another board stayed in its old board and was clipped away.

layer.translate takes an opt-in "nest" flag. With it, a moved layer whose
centre now lies on a different board joins that board on top of its stack,
and one moved off every board goes to the top level above the board it left,
in the same undo step. The Move tool's drag release sets it, which covers
Alt-drag copies; nudges, actions and scripts are unchanged. Boards,
the Background, empty layers, over-deep groups and layers locked with Prevent
Auto-Nesting stay where they are.

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

* Auto-nesting: true, floored middle for the board under a layer

Review follow-up: board_under found the middle of a dropped layer by halving
each edge first, so a layer at 9..11 counted as centred at 9 and could join
(or stay in) the wrong one of two boards meeting at x = 10.

The middle now comes from one helper, layer_place::centre, shared with the
placement of new and pasted layers: the edges are added in i64 before halving
and the sum is floored, so -4..3 (middle -0.5) is left of a board starting at
x = 0, not on it. Adds regressions for both.

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

* Document the auto-nesting rule and exclusions in layer.translate

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: FredApps <153173854+FredApps@users.noreply.github.com>
2026-11-05 06:18:46 +01:00
Khawar Zamman WaniandFredApps ad59d9962c Type: add OpenType Stylistic Sets submenu (Set 1–20) (#10304)
* Type: add OpenType Stylistic Sets submenu (Set 1–20)

Type > OpenType > Stylistic Sets toggles ss01–ss20 through new
type.openType.stylisticSets.setN commands on the usual formatting scope
(selected characters while editing, else the selected type layers).
The toggle direction and the menu checkmark follow the style at the
selection start. Updates TYPE-218-5 and G8.

Closes #10285

* Stylistic Sets: round-trip test through a full PSD; scorecard parity count

* Stylistic Sets: test PSD round trip on an opened file; record the new-document PSD gap

Documents made in PhotoCraft get no Txt2 block on PSD save, and the set
mask lives only there, so their sets are not saved to PSD yet. The engine
test keeps the .pcraft round trip, an io test covers the PSD round trip
of a file with type objects, and TYPE-218-5 and G8 record the gap.

* Stylistic Sets: share one tag table between the engine and the menu

The engine exports STYLISTIC_SET_TAGS; the Set 1–20 commands index it and
the menu checkmarks read it, so the 20 tags are listed once.

* Stylistic Sets: check malformed menu ids through the resolver, not the menu list

* Scorecard: TYPE-218-5 notes PSD save of stylistic sets in documents made here (#10308)

---------

Co-authored-by: FredApps <FredApps@users.noreply.github.com>
2026-11-05 06:16:54 +01:00
e580cca07a Port #5212: document Playback Options
Co-Authored-By: Zer0C00L01 <12090083+Zer0C00L01@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 06:13:13 +01:00
56ad0add77 Port #5212: Playback Options dialog, Step by Step and Pause For
The Actions panel menu opens Playback Options (Performance: Accelerated,
Step by Step, Pause For 1..60 seconds; History: Create a single history
state), as measured in the reference application. A person's Play in Step
by Step or Pause For parks the action after each step like a step dialog
does and resumes it once the wait is over (web_time), so the whole action
plays from one Play in one history state with the canvas redrawn between
steps. Esc, the Stop button, a new Play, an action list edit or a new
recording end it keeping the applied steps. Agents never wait.

Co-Authored-By: Zer0C00L01 <12090083+Zer0C00L01@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 06:13:13 +01:00
b3ff05ecb7 Port #5212: format the Playback Options engine change
Co-Authored-By: Zer0C00L01 <12090083+Zer0C00L01@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 06:13:12 +01:00
yoriswind 44e6fe3da2 test(actions): separate the Clear All confirmation checks 2026-11-04 21:12:58 -08:00
yoriswind 25562e12ff style(actions): apply the scoped panel formatter 2026-11-04 21:08:33 -08:00
yoriswind 0ea47f0621 refactor(actions): resolve affected panel clippy findings 2026-11-04 21:05:54 -08:00
Khawar Zamman WaniandFredApps efbe97bd53 Fix imported gradient presets sharing selection names (#10521)
* Fix duplicate gradient preset names on import and restore

* Preserve addressable gradient names during duplicate migration

* Preserve gradient identities during import and restore

* Assert restored selected gradient retains its stops

* Pass replace in the duplicate gradient names test after #10640

Main now imports a re-imported .grd beside its group unless replace is set
(#10640). The test re-imports over the same group, so ask for that.

* Use the same replace default for gradient name allocation and group insertion

After #10640 the group insertion defaults replace to false, but the name
allocation still defaulted it to true, so a default re-import created a
sibling group with the same preset names. Resolve replace once and add a
regression for the default and explicit replace paths.

---------

Co-authored-by: FredApps <153173854+FredApps@users.noreply.github.com>
2026-11-05 06:04:12 +01:00
eaa1b7c06e Port #5212: Playback Options in preferences and actions.setPlayback
Accelerated / Step by Step / Pause For (whole seconds 1..60) and Create a
single history state are saved in prefs.actions and set together through
actions.setPlayback, validated before any value is stored. Headless
actions.play keeps running the whole action at once.

Co-Authored-By: Zer0C00L01 <12090083+Zer0C00L01@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 06:03:39 +01:00
yoriswind 8f9c18e513 fix(actions): box the physical recording insert 2026-11-04 21:00:16 -08:00
yoriswind f29d099545 fix(actions): resolve physical placement clippy findings 2026-11-04 20:56:25 -08:00
yoriswind dfb6d608cf fix(actions): authorize confirmed edits with captured dialog fields 2026-11-04 20:42:30 -08:00
Khawar Zamman WaniandFredApps 13b481f892 Expose optional GPU composition and export in photocraft-cli (#10912)
* 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)

* Expose optional GPU rendering in photocraft-cli (#8062)

* Fix GPU feature test APIs and native target gates

* Fix CLI locked metadata, bounded benchmark params, and protocol diagnostics (#8062)

* Verify unsupported GPU effects before testing band seams

* Fix CLI renderer borrows and GPU-enabled test compilation

* Use compositor buffer ownership API after upstream memory accounting change

* Fix GPU CLI lint failures and validate run environment policy

* Update export renderer test helper for owned compositor buffers

* Fix needless benchmark layer name borrow

* 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

* Use valid batch arguments and inspect method in GPU CLI tests

* Add GPU close-hook and 8-bit preview regression tests (#10842)

* Fix GPU CLI review findings (#10912)

- guard the benchmark's modulo divisors for one-pixel dimensions
- count a cold export as GPU only when the renderer context was used
- report every batch file's export warnings, deduplicating only GPU diagnostics
- drain renderer diagnostics before propagating convert and run save errors
- cover renderer use in the GPU precedence, bridge and serve tests

* fix(io): correct renderer binding mutability

* test(cli): verify narrow benchmark inputs and GPU diagnostics

* 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

* 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

* Fix remaining GPU CLI review findings (#10912)

- reject non-UTF-8 PHOTOCRAFT_GPU values instead of silently using the CPU
- release a batch item's document caches before taking the renderer to the
  next item, and report fallbacks once
- count warm benchmark runs that fell back to CPU in the summary
- write serve diagnostics without panicking on a broken stderr
- assert that the batch test's --gpu policy reaches the renderer

* Use question mark for cancellable readback errors

* 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 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.

* Report partial warm fallbacks and CPU fallback on stderr

The averaged GPU Warm row now says how many warm runs fell back to the
CPU and were excluded from the average, through the existing helper.

The single-layer convert diagnostic test checks that the CPU fallback is
reported on stderr, in GPU-enabled and CPU-only builds alike.

* 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)

* Address CodeRabbit review: keep fallback reasons on failed retries, report native-copy and quick-export CPU use, guard diagnostics drain (#10912)

* Accept render diagnostics from the doc.render reply in the serve GPU test (#10912)

---------

Co-authored-by: FredApps <153173854+FredApps@users.noreply.github.com>
2026-11-05 05:39:59 +01:00
2782636025 Fix-up #10788 + #10612: build the merged batch
#10788 adds a preserve_alpha argument to tga_image and makes
flat_transparency_and_channels fallible. The renderer export path the
batch already holds still called the old signatures; it now passes
opts.preserve_alpha and propagates the error like the CPU path.

Both PRs carried the same three tests (scoped source slots, droplet
Batch namespaces, droplet scoped variant limit); git kept both copies.
Keep one of each.

Co-Authored-By: yoriswind <yoriswind@yahoo.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 05:38:01 +01:00
davidvhkandFredApps f1137013a2 feat(paint): add History Brush opacity/flow controls, source selection, and custom icon (#4446)
* feat(paint): add History Brush opacity/flow controls, custom icon, and options bar source label

- Options bar and keyboard shortcuts (digits 0-9 and Shift+digits) for History Brush opacity and flow %
- Options bar displays translated source state or snapshot name with missing-source hint when deleted
- Dedicated clean-room history-brush icon combining Lucide brush with counter-clockwise rewind arc
- Preserved JetBrainsMono attribution in ATTRIBUTION.md and added history-brush icon attribution
- Add contributor credit in people.toml

* History Brush options bar: rustfmt the source label

* Opacity keys: 00 gives Clone Stamp and History Brush their 1% minimum

Their Opacity fields and the retouch command start at 1%, so 00 set a 0%
the stroke then painted at 1% (CodeRabbit). The Brush still goes to 0%.

---------

Co-authored-by: FredApps <FredApps@users.noreply.github.com>
2026-11-05 05:29:57 +01:00
yoriswind 2c66f80520 test(actions): validate the held owner without cloning its lease 2026-11-04 20:27:05 -08:00
yoriswind 7c9617a377 fix(actions): reconcile paused dialog cleanup with canonical ownership 2026-11-04 20:19:52 -08:00
David Mann 5385ebd95b Merge PR #10788: Support recorded dialog filters, Calculations and Batch naming
# Conflicts:
#	crates/engine/src/cmd/actions_cmds.rs
#	crates/engine/src/cmd/automate_cmds.rs
#	crates/engine/src/cmd/file_cmds.rs
#	crates/engine/src/cmd/file_cmds/batch_run.rs
#	crates/engine/src/cmd/file_cmds/tests.rs
#	crates/engine/tests/it/main.rs
#	crates/ui-egui/src/panels/actions.rs
2026-11-05 05:19:44 +01:00
a331258dff bs: Add Bosnian (bs) to the interface languages (#10290)
* Add Bosnian (bs) to the interface languages

bs.tsv: 4,552 rows, Latin script, Ijekavian, the same keys as the newest
catalogs. Wording shared with storytold/craft-i18n locales/bs/; the 306
strings craft-i18n doesn't have yet are new. Every Bosnian locale,
Cyrillic included, resolves to it, as for Serbian; plurals reuse the
one/few/other rule of plural_russian.

Locale and plural tests, live locale case, localization docs and an
ATTRIBUTION row (AI-assisted, not yet reviewed by a native speaker).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013Tayw8nmxoLLmKv13jK93z

* Add Bosnian to the translation license notice; document the locale test

LICENSE-translations.txt now lists the Bosnian catalog and its
provenance (shared with storytold/craft-i18n locales/bs/, AI-assisted,
not yet native-reviewed), as ATTRIBUTION.md points to it. The touched
live locale test gets a doc comment.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013Tayw8nmxoLLmKv13jK93z

* bs: wording from the craft-i18n catalog review

The Bosnian catalog review (storytold/craft-i18n#72) asked for one word
per concept; this catalog follows: pan is "pomjeranje" (not
"pomicanje"), a spreadsheet is "proračunska tabela", Greek & Cyrillic
reads "Grčko pismo i ćirilica". Placeholders and ellipses are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013Tayw8nmxoLLmKv13jK93z

* bs: translate the 30 strings added on main; match Camera Raw labels

Main gained Path operations, the SVG smart object editor, Esc/Return pen
status messages and more since this catalog was written, so the
every-language tests (esc_ends_a_refused_draft_and_return_keeps_it) failed
on bs. Five cameraRaw-context entries (White Balance: As Shot, Tone
Histogram, Show Selected Region, Opened {name}, Loaded Camera Raw settings
from {file}) differed from the plain entries the panel actually draws, which
failed the Camera Raw localization test; they now match.

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: FredApps <FredApps@users.noreply.github.com>
2026-11-05 05:16:02 +01:00
David Mann 5b63b5ca52 Merge PR #10612: Run the selected action in Batch and Create Droplet 2026-11-05 04:58:29 +01:00
David Mann 04291e6055 Merge PR #11210: Expose Move transform controls through the control channel 2026-11-05 04:58:01 +01:00
David Mann e5e443a5ce Merge PR #9315: Layers panel: the filter row lists the artboards that hold the selected layers 2026-11-05 04:58:00 +01:00
David Mann 5031d0f2b9 Merge remote-tracking branch 'origin/main' into integration-batch-17 2026-11-05 04:57:59 +01:00