Commit Graph
36 Commits
Author SHA1 Message Date
Hartmut Nörenberg 5c0bec3036 fix(engine): grey out Straighten Layer where the reference does
Straighten Layer was offered wherever a ruler line existed, so its button was
live for every target and the command turned whatever it was pointed at: it
rotated and cropped the canvas on the Background, turned several selected
layers or a group, failed on a locked layer with `layer "..." is locked`, and
rotated pixels nobody could see on a hidden layer. The reference application
(#12033) keeps the button off for the Background, a multi-layer selection, a
group, Lock All and Lock Position, and answers a hidden target layer with its
alert and no change at all. The command's own `enabled` check now says the
first set, so the options bar, the CLI, the control channel and an action step
all agree about what is offered; the hidden layer stays enabled and is refused
by the command, before it reads anything for the edit, so a refused click
leaves the document, its History and the ruler line exactly as they were. The
states the ticket marks *not measured* keep today's behaviour.
2026-11-07 19:36:53 +01:00
Hector VillarrealandClaude Opus 5.5 4fae869018 Masks: a recorded mask drop replays on another document (CodeRabbit review on cmd.rs:815)
The journal made `layer` portable for layer.layerMask.moveTo but kept `to` as
the document's layer id. Replayed on another document, that id names some
other layer or none: the mask silently went to an unrelated layer or the step
failed. Before the fix, recorded_mask_drop_replays_on_another_document
recorded `"to": 8` and replay moved the mask onto "Extra" instead of "Shadow".

Recording now keeps `to` as the layer's name (from the document before the
step, since a drop on the Background renames it "Layer 0"), plus
`toOccurrence` when several layers share the name. move_mask resolves a name
(requiring `toOccurrence` when it is ambiguous), and explicit calls still take
a numeric id. This matches how layer.moveTo records its drop target
(`target` + `targetOccurrence`).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 22:33:42 -06:00
David MannandClaude Opus 5.5 88beb84064 Address CodeRabbit: same-named actions in Batch/Droplet, Save and Close format
- Batch and Create Droplet dialogs get a Set dropdown (each set once, each
  action name once) and send the selected action's set, so a loaded library
  with one name in two sets runs the chosen set's action; createDroplet now
  honours `set` with a named action (dialogs.rs:512 finding).
- Droplet capture rewrites an ordinary call to the action's name only while
  that name is unique in the exported list; otherwise it keeps the exported
  index, so a call to the second of two same-named actions still reaches it
  (outside-diff finding on actions_cmds.rs:337).
- Save and Close refuses a source whose bytes Batch would write in another
  format (a Cineon source is encoded as PSD), instead of writing PSD bytes
  under the source's .cin name (batch_run.rs:918 finding).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 14:11:29 +01:00
David MannandClaude Opus 5.5 42e92cb512 Address review: Batch stops, rename targets, Shape Blur memory, sampler releases
- A direct Batch in a script or a CLI command list stops it when it is cancelled,
  cannot write its error log, or ran out of script steps; per-file errors alone
  still continue (CodeRabbit, outside-diff findings on automate_cmds.rs and
  photocraft-cli document.rs).
- Recorded Save steps count against the script's step budget, and a Batch whose
  files failed with the budget spent carries scriptLimitError, so Browse reports
  the failure instead of ok: true (yoriswind).
- actions.rename rewrites a named Batch, nested Play or Conditional call only if
  it resolved to the renamed action before the rename; a Batch with explicit
  steps is left alone (yoriswind: two same-named actions in different sets).
- Shape Blur's run admission counts each worker's f64 prefix sums and, for a
  custom shape, the kernel mask kept for the run plus its worst-case coverage
  runs (yoriswind).
- Every sampler that takes the primary release (Color Picker, Curves/Levels and
  Properties eyedroppers, Curves Cmd-click, Color Range) ends a transform handle
  drag and a Move drag begun before it, not only the Color Picker (#11210 review).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 13:20:01 +01: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
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
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
yoriswind 1720af269d Merge current main while preserving recorded Batch safeguards 2026-11-04 10:47:01 -08:00
yoriswind 3edffb77ec Merge current main and preserve named Batch history ownership 2026-11-04 10:34:08 -08:00
yoriswind d9ebb74d49 test: retain embedded indices in scoped Batch sources 2026-11-04 05:48:10 -08:00
yoriswind a629a725f0 Preserve source data and diagnostics during Batch saves 2026-11-04 05:48:09 -08:00
yoriswind 508a35c83d Align Batch playback namespaces and retain child results 2026-11-04 01:51:41 -08:00
yoriswind fc4ca40f39 Merge current main while preserving selected Batch actions 2026-11-04 00:12:49 -08:00
yoriswind 838dca6f5d Document action history ownership and continuation contracts 2026-11-03 22:06:22 -08:00
yoriswind 3028355333 Merge main and retain action history across Batch and Spelling 2026-11-03 12:42:57 -08:00
yoriswind 699683d8eb test(actions): cover grouped and per-step history 2026-11-02 20:08:20 -08:00
David MannandClaude Opus 5.5 3ce04b52f4 Address CodeRabbit review: Batch writes, recording and dialog edge cases
- CLI batch: recursive inputs keep the engine's tree order for {serial};
  --format picks the encoder whatever extension --naming writes; the
  summary prints before --error-log is written.
- Batch: a jobs.cancel during a write keeps that file in `files`;
  Opened Files refuses a default-named result that replaces another open
  document's file; a recorded Save leaves a document changed when Batch
  writes nothing for it.
- Recording: folded Move-tool nudges add whole-pixel steps; a null
  Check Spelling `action` is recorded as Check Spelling.
- Linked files: a document without links lists none missing; a look
  whose links changed while it ran is dropped.
- Save for Web: a null or empty destination opens the picker; a rename
  while the picker is open writes the picked file.
- Actions: a Check Spelling step fails instead of replacing a dialog
  opened by hand.
- Docs: desktop Batch cancel flow, Check Spelling step shape, filter row
  history count.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-03 03:02:19 +01:00
Fabio Lissi 499f7ab609 Merge upstream main into action recording 2026-11-02 14:44:32 -06:00
Fabio Lissi 50360ac4ef Record portable nudges, document switches, and type positions 2026-11-02 11:30:37 -06:00
David Mann 4f899196cb Merge PR #10702: Actions: preserve settings in mapped ATN events
With our fix-up 78cf0cf91f on top of the author's head. Conflicts resolved item by item (Rust), docs as unions; docs/atn.md regenerated at the end.
2026-11-02 02:55:02 +01:00
78cf0cf91f Integration: transform anchor codes, Close save:false, Batch Save As + Close, opacity and thumbnail-click regressions (#10702)
- FTcs reference points used a 3x3 grid (Qcs0..Qcs8). The reference application has
  Qcsa centre, Qcs0..Qcs3 corners clockwise from top-left and Qcs4..Qcs7 the sides
  top/right/bottom/left (measured: 50 % scale, Qcs6 keeps the bottom centre, Qcs1 the
  top-right corner). Qcs8 and Qcsi stay kept steps; nothing writes Qcs8.
- file.close {"save": false} (used by ui-egui tests) became an error; it discards again
  and saves as Svng N.
- Batch never performs the action's Save As, so the scratch document stayed dirty and the
  recorded Close (no Svng -> "save":"ask") failed every file of "...; Save As; Close".
  A Save / Save As save point now marks the document saved.
- Adjustment-layer opacity is quantised to 8 bits on load; a recorded 70 % saved back as
  70.196 %. The whole percent that quantises to the same level is saved again.
- Cmd-clicking a group's thumbnail errored; it loads the whole canvas again as before.
  A recorded Cmd-click on another layer's thumbnail kept the numeric id and failed strict
  Save Actions; it records the layer by name (or as the Background).

Co-authored-by: yoriswind <164435053+yoriswind@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-02 02:53:47 +01:00
yoriswind a5636fa3e7 Preserve embedded Batch action scopes in droplets 2026-11-01 01:14:25 -08:00
Hector VillarrealandClaude Opus 5.5 b544021d49 Actions: recording into an empty loaded set keeps its exact name (CodeRabbit review on crates/engine/src/cmd/atn_cmds/files.rs:65)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 00:59:36 -06:00
Hector VillarrealandClaude Opus 5.5 c69ad0e86c Actions: recording into an existing set keeps its exact name (CodeRabbit follow-up on actions_cmds.rs:373-378)
Test: record_keeps_an_existing_sets_exact_name.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 03:42:23 -06:00
FredApps 73502a6b89 Reconcile Arrange no-op regression with retained command contract 2026-10-29 22:28:41 +01:00
FredApps 63637c4d80 Merge current main into trimmed integration, preserving exclusions and interpolation behavior 2026-10-29 21:31:18 +01:00
FredApps 255ecc81d0 Remove 21 requested PR contributions from the 108-PR integration
Retain 87 PRs. Reconcile overlapping integration fixes and update testing scope.
Removed: #7153 #7742 #5493 #9282 #3455 #9172 #3139 #3967 #4783 #5453 #8347 #1991 #3345 #4042 #4305 #4883 #4890 #5090 #6621 #5870 #5939.

Combined CI pending for this source; historical portable artifact is not applicable.
2026-10-29 18:49:17 +01:00
aiongg 2231233af9 Merge pull request #6590 from wanikhawar/fix/6501-multi-layer-free-transform
Free Transform moves every selected layer (#6501, #3384, #6096)
2026-10-29 12:14:01 -04:00
Khawar Zamman Wani 991ef9907b fix(actions): allow no-op Arrange steps during playback (#8457) 2026-10-29 11:34:13 -04:00
FredApps d98e419542 Merge approved PhotoCraft PR #5176: Play CopyCat, AJ and Line and Color action sets; keep patterns across restarts; Shift Edge scale
Port behavior and regression coverage into current modules; preserve current upstream behavior.
Ported mappings and smart Save into current modules, preserving bounded authorized playback; migrated legacy PAT by committing validated per-pattern assets before atomic authoritative index; preserved same-ID replacements and builtin edits; added temporary-store interruption, corruption, duplicate ID/name and restart regression coverage. Current all-target compilation passed before final ownership guard refinement; focused tests pending.
2026-10-29 05:15:28 +01:00
FredApps 889018cabb Preserve action definition history regression with extended action metadata 2026-10-29 05:05:06 +01:00
FredApps 2f6156bebe Merge approved PhotoCraft PR #5090: Actions: add editable PhotoCraft Essentials starter presets
Port behavior and regression coverage into current modules; preserve current upstream behavior.
Register starter actions and bounded background-blur command in current modules; preserve persistent migration marker and portable JSON defaults compatibility.
2026-10-29 04:18:29 +01:00
FredApps ab9c044fba Merge approved PhotoCraft PR #3461: Replay recorded layer visibility on the intended named layer
Port behavior and regression coverage into current modules; preserve current upstream behavior.
Resolve recorded visibility targets before both engine and shell authorization, preserving bounded playback, paused dialogs and existing journal coalescing; retain ActionState take generation.
2026-10-29 04:16:32 +01:00
FredApps 6e13443ca6 Merge approved PhotoCraft PR #3455: Undo and redo action definition edits from the Actions panel
Port behavior and regression coverage into current modules; preserve current upstream behavior.
Keep action-definition undo separate from document history and preserve upstream panel routing and layout.
2026-10-29 04:12:47 +01:00
Khawar Zamman Wani 37c21e1d77 fix(transform): preserve action targets and clipped previews 2026-10-27 20:09:03 +05:30
aiongg 501b7f3459 refactor(engine): move the *_cmds modules under cmd/ 2026-10-26 22:54:55 +00:00