From 08dde8783ecce777451bd322d33164cce85f84fe Mon Sep 17 00:00:00 2001 From: bflatastic Date: Fri, 16 Oct 2026 04:36:11 +0700 Subject: [PATCH] =?UTF-8?q?Actions:=20Batch=E2=80=A6=20stays=20in=20the=20?= =?UTF-8?q?Actions=20panel=20menu,=20as=20the=20reference=20app=20has=20it?= =?UTF-8?q?=20(#1938)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crates/engine/src/cmd/fileio/action_batch.rs | 5 +++-- crates/engine/src/cmd/fileio/mod.rs | 4 ++-- crates/ui-egui/src/dialogs/action_batch.rs | 2 +- crates/ui-egui/src/menus.rs | 1 - docs/mcp.md | 4 ++-- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/crates/engine/src/cmd/fileio/action_batch.rs b/crates/engine/src/cmd/fileio/action_batch.rs index 7dfe44ed9..ccc486896 100644 --- a/crates/engine/src/cmd/fileio/action_batch.rs +++ b/crates/engine/src/cmd/fileio/action_batch.rs @@ -1,5 +1,5 @@ //! `action.batch`: play an action's commands on every file in a folder, or on every data set -//! of the open document (File › Automate › Batch / the Actions panel). +//! of the open document (the Actions panel menu's Batch…). //! //! Public options follow the Batch dialog: source Folder or Data Sets; destination None, //! Save and Close, or Folder; Override Open / Save / Export. Cited: @@ -324,7 +324,8 @@ fn is_openable(path: &str) -> bool { OPEN_EXTS.iter().any(|e| *e == ext) || FORMATS.iter().any(|f| f.read && f.extensions.iter().any(|e| *e == ext)) } -#[cfg(all(test, not(target_arch = "wasm32")))] +#[cfg(test)] +#[cfg(not(target_arch = "wasm32"))] mod tests { use super::*; use serde_json::json; diff --git a/crates/engine/src/cmd/fileio/mod.rs b/crates/engine/src/cmd/fileio/mod.rs index 205b11cfb..f2e14c897 100644 --- a/crates/engine/src/cmd/fileio/mod.rs +++ b/crates/engine/src/cmd/fileio/mod.rs @@ -1,6 +1,6 @@ //! Document file I/O for every frontend (desktop, web, CLI, control channel, headless MCP): open, //! save, export and serialize by path or bytes (base64), the format table, `command.batch` and -//! `action.batch` (File › Automate › Batch / the Actions panel). +//! `action.batch` (the Actions panel menu's Batch…). //! //! - `load`: `document.open` (native, legacy, SVG/SVGZ, PDF/.ai/.ait, DXF, raster images). //! - `action_batch`: play an action on every file in a folder or every data set. @@ -152,7 +152,7 @@ pub fn specs() -> Vec { cmd!( "action.batch", "Batch…", - ["File", "Automate"], + [], None, "{commands: [{command, params}] (the action's steps), source?: folder (default) | datasets, folder? (required for folder: the source folder), includeSubdirs?: false, destination?: none (default: leave each file open) | saveAndClose (save over the source and close) | folder (save or export into destinationFolder and close), destinationFolder? (required when destination is folder; also the folder Override Save/Export write into), overrideOpen?: true (skip document.open / file.open steps: the batch opens each source file), overrideSave?: true (point document.save / file.save / file.saveAs at destinationFolder/{stem}.{ext}), overrideExport?: true (point document.export / document.exportForScreens / document.exportSelection the same way), stopOnError?: true, label?} play the commands on every readable file in folder (and its subfolders when includeSubdirs), or on every data set of the open document (source: datasets; File + Data Set Name for Override Save/Export). Caps: 500 files or data sets, 8 folder levels, 256 steps. Batches cannot nest. → {processed: [{path|dataset, result|error}…], count, failed, stopped}", always, diff --git a/crates/ui-egui/src/dialogs/action_batch.rs b/crates/ui-egui/src/dialogs/action_batch.rs index b3030b0ef..01c27b98a 100644 --- a/crates/ui-egui/src/dialogs/action_batch.rs +++ b/crates/ui-egui/src/dialogs/action_batch.rs @@ -1,4 +1,4 @@ -//! Actions panel › Batch… / File › Automate › Batch: play the selected action on every file in a +//! Actions panel menu › Batch…: play the selected action on every file in a //! folder, or on every data set of the open document (`action.batch`). use serde_json::{Value, json}; diff --git a/crates/ui-egui/src/menus.rs b/crates/ui-egui/src/menus.rs index 6e7037265..ae1a6668c 100644 --- a/crates/ui-egui/src/menus.rs +++ b/crates/ui-egui/src/menus.rs @@ -2207,7 +2207,6 @@ pub fn menu_tree_named(english_names: bool) -> Vec<(&'static str, Vec)> { c("Export Selection…", "file.exportSelection"), Sep, c("Package…", "ui.packageDialog"), - sub("Automate", vec![c("Batch…", "ui.batchDialog"), todos("Scripts…", "")]), sub("Scripts", vec![c("Check Script…", "ui.checkScript"), todos("Other Script…", "Cmd+F12")]), Sep, c("Document Setup…", "file.documentSetup"), diff --git a/docs/mcp.md b/docs/mcp.md index e54dbb884..3e164db9c 100644 --- a/docs/mcp.md +++ b/docs/mcp.md @@ -991,7 +991,7 @@ already walks Image Trace. Short agent entry points: `dataset.select`. - Batch: `action.batch {commands, source?: folder|datasets, folder?, destination?: none|saveAndClose|folder, destinationFolder?, overrideOpen?, overrideSave?, overrideExport?, includeSubdirs?, stopOnError?}` plays an - action on every file in a folder or every data set (File › Automate › Batch…). + action on every file in a folder or every data set (the Actions panel menu's Batch…). - Variables: `variable.list`, `variable.define {name, kind: text|visibility|graph}`, `variable.bind {variable, ids?}`, `variable.makeTextDynamic`, `variable.makeVisibilityDynamic`, `variable.makeGraphDynamic`, `variable.unbind`, `dataset.new` / `dataset.set` / `dataset.select` (graph values are CSV as `graph.setData`). @@ -1801,7 +1801,7 @@ for `edit.pasteInPlace`, `edit.pasteInFront` and `edit.pasteInBack`, and to each none, when the step runs. When the document a step runs in has no artboard at that index (for example, after an earlier step deleted the active artboard when it was the last one), the step gets that document's last artboard. In remote mode, MCP's `run_command` calls and each step of the `command_batch` tool get the active artboard too. The -Actions panel plays an action as a `command.batch`. File › Automate › Batch… and the Actions panel's Batch… run +Actions panel plays an action as a `command.batch`. The Actions panel menu's Batch… runs `action.batch`: the same steps on every readable file in a folder (or every data set of the open document), with destination `none` | `saveAndClose` | `folder` and Override Open / Save / Export. Caps: 500 files or data sets, 8 folder levels, 256 steps. An action recorded in the Actions panel leaves the artboard out,