Merge pull request #8425 from dotCooCoo/fix/action-batch-step-numbers

Actions: action.batch errors count steps from 1 and name the member they reject
This commit is contained in:
BFlat
2026-11-18 13:05:15 +07:00
committed by GitHub
7 changed files with 145 additions and 39 deletions
+13 -2
View File
@@ -2308,6 +2308,11 @@ path to a value inside a list or an object, and the document and its undo histor
→ invalid parameters for `view.saved.edit`: `edits[0].delete` must be true or false, not 1
```
A refused step of a `command.batch` gives its command's error as it is. A refused step of an `action.batch` is named
by its place in `commands`, from 1, before its command's error: with `commands` of an Unlock All and the
`view.saved.new` above, the error is
``invalid parameters for `action.batch`: action step 2 (`view.saved.new`) failed: invalid parameters for `view.saved.new`: `zoom` must be a number > 0, not 0``.
A schema nests at most 16 lists and objects. A value that would go past that depth is refused with the same kind of
parameter error, ``invalid parameters for `<id>`: `<path>` is nested too deeply``, where `<path>` is the path to the
value. A schema that is wrong in itself, such as one that nests past 16 levels or puts a list of ids or a point
@@ -7063,8 +7068,14 @@ A null is read as a key left out. When a step fails on a file or data set, that
place in the `commands` sent, from 1, counting the Open steps the batch skips: with `commands` of an Open, an Unlock
All and an Align, a failed Align gives `` action step 3 (`object.align`) failed: `` and the reason. The batch's own
opening of a source file, choosing of a data set and destination save, export or close give their errors without a
step number. This numbering is VectorCraft's own rule. A `prefs.import` step is refused before any file is opened,
with `` commands[1]: `prefs.import` runs on its own, not as a batch step `` (counted from 0, as for an unknown command). An action recorded in the Actions panel leaves the artboard out,
step number. This numbering is VectorCraft's own rule. Before any file is opened, `action.batch` refuses a step
without a command, with a command the engine does not have, with params its command refuses, or with
`command.batch`, `action.batch` (batches cannot nest) or `prefs.import`, and names it the same way, from 1: with
`commands` of an Unlock All and a `prefs.import`, the error is
``invalid parameters for `action.batch`: action step 2 (`prefs.import`) failed: `prefs.import` runs on its own, not as a batch step``.
Override Open skips `document.open` steps, and Override Save points `document.save` and `file.saveAs` steps at the
destination folder. `file.open` and `file.save` are the app's commands, not the engine's, so a step with one is
refused as an unknown command. An action recorded in the Actions panel leaves the artboard out,
and its steps of these commands get the artboard that is active when the action plays. A press with the Selection,
Direct Selection or Group Selection tool inside an artboard makes that artboard the active one; with the Selection
tool, a Shift-click on an empty spot inside an artboard makes it active and keeps the selection. Choosing the Artboard
+1
View File
@@ -873,6 +873,7 @@ Moved from the ROADMAP's "Shipped so far" on 2026-10-10. Update it when a featur
- Batch…: Override Save and Override Export name each file with the extension of the format the step writes, however the step spells the format (`.svg` and `SVG` give `.svg`, `png8` gives `.png`), in `action.batch`.
- Batch…: Override Export writes the files of an Export for Screens or Export Assets step into a folder for each source file or data set inside the destination folder, under the names the export gives them (`action.batch`). The folder and file names drop trailing periods and spaces (`a..svg` gives `a`). When two source files would get the same name that way (compared without case), or a later file's folder or file would take the name of an output an earlier file wrote, of a source file in the destination folder or, for data sets, of a file already there, Batch adds `-2`, `-3`… to the later one's name.
- Batch…: when a step fails on a file or data set, the error names the step by its place in the action's steps, from 1, counting the Open steps the batch skips (`action.batch`). This numbering is VectorCraft's own rule. Tests `cmd::fileio::action_batch::tests::{a_folder_batch_error_names_the_step_in_the_commands_sent, a_recorded_open_that_fails_is_the_first_step, a_data_set_batch_error_names_the_step_in_the_commands_sent, a_redirected_export_that_fails_keeps_its_place, a_source_that_does_not_open_names_no_step}`.
- Batch…: a step refused before any file opens (no command, a command the engine does not have, params its command refuses, a nested batch or `prefs.import`) is named the same way, by its place from 1 and its command id (`action.batch`). Tests `cmd::fileio::action_batch::tests::{a_refused_step_is_named_by_its_place_from_1, the_parameter_check_names_the_refused_step, steps_with_ids_that_are_not_engine_commands_are_refused}`.
- Actions panel menu: Save Actions… writes the current action set with all its actions to a file, and Load Actions… adds the set from such a file to the panel ([Manage a set of actions](https://helpx.adobe.com/illustrator/desktop/automate-visualize-data/automate-actions/manage-a-set-of-actions.html); `ui.actionSet.save`, `ui.actionSet.load`). The file is VectorCraft's own action set file (`.vcactions`); a loaded set named like one in the panel gets the next free number.
- Actions panel menu: Load Actions… keeps a step whose command this build or its installed plug-ins do not have, and reports each one when the set loads: the `ui.actionSet.load` answer lists the action, step and command id (`unknownCommands`, `unknownCount`), and the status bar names the first and the count. An action with such a step included does not play, and the error names the step and its id before any step runs; an excluded one does not stop it. These are VectorCraft's own rules. Tests `panels::actions::tests::{load_actions_reports_steps_with_unknown_commands, load_actions_bounds_what_it_reports_of_unknown_commands, an_action_with_an_unknown_command_does_not_play}`.
- Actions panel menu: Save Actions… does not write a set with a step that sets a folder preference (the Fonts, Plug-ins, Templates and Recovery folders and the two scratch disks) to a folder, and names the action and the preference instead; an empty folder and the scratch disk choices Startup and None save. Export Preferences leaves out both scratch disks, and `ui.inspect` under automation read roots leaves such a folder outside them out of recorded steps. These are VectorCraft's own rules (`ui.actionSet.save`, `prefs.export`).