285 Commits

Author SHA1 Message Date
dotCooCoo b852316921 Plug-ins: fix event delivery edge cases from review
- A commit or cancel with no drag open no longer ends an interaction for
  plug-in events.
- A host query that panics during a handler still puts the session back.
- Handler calls after a replayed command are checked as calls from outside.
- A rolled-back batch puts back the events its opens pushed out of the
  32-event queue.
- Installing a plug-in again, the same module included, turns its events
  back on; plugin.info's eventsOff follows the same rule.
- A document added before the first check records its baseline.
- Handler failures show in the status bar from their English templates,
  translated when shown, and event handler time counts toward the frame
  time.
- Tests check that the handler ran in the tested pass, and the script-run
  test no longer writes to other sessions' status bar.
2026-11-30 22:12:19 -08:00
dotCooCoo c04c53ca6c Plug-ins: hold a running script's events and deliver window-key changes in their pass
A delivery between a script's slices no longer gives the opens and saves the
script queued; they wait until the run ends, so a run that fails never gives
the opens of documents it discarded. The desktop app now delivers after the
window keys run, so a selection Escape changes when it leaves isolation mode
reaches plug-ins in that pass, and the handlers' time counts toward the frame
time. The docs state the per-document grouping and the script rule.
2026-11-29 00:24:17 -08:00
dotCooCoo 6227297ae4 Merge main into feat/plugin-api-events
# Conflicts:
#	crates/engine/src/cmd/plugin.rs
#	crates/plugins/src/lib.rs
#	crates/plugins/src/manifest.rs
#	crates/ui-egui/src/tests/plugins.rs
#	docs/plugins.md
2026-11-28 23:13:20 -08:00
dotCooCoo 828eb27097 Merge main into feat/plugin-api-localized-labels
# Conflicts:
#	crates/plugins/src/manifest.rs
#	crates/ui-egui/src/tests/panel_harness.rs
2026-11-28 19:28:43 -08:00
dotCooCoo ebeaa1d91f Merge main into feat/plugin-api-localized-labels 2026-11-28 19:20:09 -08:00
dotCooCoo 2974180502 Merge main into feat/plugin-api-importer-output-kinds
# Conflicts:
#	crates/engine/src/cmd/plugin.rs
#	crates/plugins/src/lib.rs
#	crates/plugins/src/manifest.rs
#	crates/plugins/src/permissions.rs
#	docs/plugins.md
#	docs/target-app-parity.md
2026-11-28 14:21:28 -08:00
dotCooCoo 5f907f863a Merge main into feat/plugin-api-context-menus 2026-11-28 08:46:27 -08:00
dotCooCoo cae99fee0c Merge main into feat/plugin-api-generated-art 2026-11-28 07:15:42 -08:00
dotCooCoo 6eb0428586 Merge main into feat/plugin-api-context-menus 2026-11-28 05:32:32 -08:00
dotCooCoo d22402c570 Merge main into feat/plugin-api-events 2026-11-28 02:31:56 -08:00
.CooCoo 0b933e7a36 Merge pull request #9127 from dotCooCoo/feat/plugins-web-worker
Plug-ins: the web build checks plug-ins and runs filters in a Web Worker
2026-11-28 01:04:54 -08:00
dotCooCoo ab75ac0c13 Plug-ins: a module with a manifest section that lists events must export vc_event
Changes on main needed the events code and its tests to follow them.

- A module that carries its manifest in the `vc_manifest`
  custom section is loaded without being instantiated, and its exports
  are checked by `check_exports`. That check now also requires
  `vc_event` with the type (param i32 i32) (result i32) when the
  manifest lists `events`, as the instantiated path already did. The
  `an_event_plugin_exports_vc_event` test covers a sectioned module
  without `vc_event`, with the wrong type and with the right one.
- JavaScript plug-ins have no `vc_event`, so their manifest may not
  list the permission `events`, next to `settings`, `cache` and
  `commands`. The JavaScript bundle test and docs/plugins.md say so.
- The craft UI framework port removed
  `VectorcraftApp::begin_host_iteration`, so the two UI-pass event
  tests no longer call it.
- On the framework, the whole window draws only on a context with the
  framework's runtime installed. `a_change_made_in_a_ui_pass_is_delivered_in_that_pass`
  drew it on a plain `egui::Context`, where the runtime panics ("the
  runtime plugin's hooks did not run for the previous pass") and the
  test did not finish. It now draws its passes with
  `testing::ui_context` and `testing::part_frame`, as the window tests
  on main do.
2026-11-28 00:19:30 -08:00
dotCooCoo 1ad7a1134f Merge main into feat/plugin-api-generated-art 2026-11-27 23:35:47 -08:00
dotCooCoo 875f49fc8d Merge main into feat/plugins-web-worker
The plug-in runtime keeps main's JavaScript plug-ins beside the web worker's module bytes and checked loads: a JavaScript plug-in's bundle is kept for the worker like a module, and load_checked loads it from its bundle.
2026-11-27 23:05:07 -08:00
dotCooCoo 5a771c52f7 Merge main into feat/plugin-api-live-effect-appearance 2026-11-27 22:50:09 -08:00
dotCooCoo 5b57a9dbe5 Merge main into feat/plugin-api-context-menus 2026-11-27 22:33:09 -08:00
dotCooCoo f850b6b7a3 Merge main into feat/plugin-api-importer-output-kinds 2026-11-27 22:24:08 -08:00
.CooCoo c45a9a2781 Merge pull request #9870 from dotCooCoo/feat/plugins-failed-load-retry
Plug-ins: a plug-in that fails to load is listed and can be retried
2026-11-27 22:17:31 -08:00
dotCooCoo 156fdce3f4 Merge main into feat/plugin-api-events
# Conflicts:
#	crates/engine/src/cmd/plugin.rs
#	crates/plugins/src/lib.rs
#	crates/plugins/src/manifest.rs
#	crates/plugins/src/runtime.rs
#	crates/ui-egui/src/app.rs
#	crates/ui-egui/src/dialogs/tests.rs
#	crates/ui-egui/src/i18n/tests.rs
#	docs/target-app-parity.md
2026-11-27 22:08:03 -08:00
dotCooCoo 41706a3867 Plug-ins: a plug-in that fails to load is listed and can be retried
A stored plug-in that didn't install, for example because its load
panicked or its module is broken, was only written to the log. The
person could not see it or load it again without restarting.

- plugin.list gains failed: [{file, error, from}], the plug-in files
  that didn't load in this process: those of the Plug-ins folder, and
  those the folder report of the Additional Plug-ins Folder (or the
  folder plugin.reload loaded last) lists as failed. Disabled plug-ins,
  files turned off since they failed, and modules skipped because
  another install or removal of their id came first are left out. A
  file that both loads list is listed once, as a stored file. A
  plugin.reload replaces only the folder's rows. Installing or removing
  a plug-in whose module is in a stored file that failed, or a later
  load that installs it, takes the file off the list.
- plugin.retry {file?} loads one of those files again, or all of them,
  with the same checks as the load it failed in, and reports for each
  whether this retry installed it. A folder file's row in the folder
  report moves to loaded or keeps its new error. Under automation read
  roots, a file outside them is not read again, its row stays listed,
  and the reply names it and its folder by their names. Safe Mode
  returns an error.
- plugin.setEnabled {file} also takes the name failed gives a file
  outside the read roots.
- Object › Plug-ins › Plug-ins That Didn't Load… lists the files with
  why; Retry All loads them again under the read roots the list opened
  under, and the status bar says how many loaded. The item is disabled
  while nothing failed.
- A command.batch that runs a filter and then retries a module with
  its id turns Apply Last Filter off, as a reinstall does.

Docs: docs/plugins.md (Plug-ins that didn't load), docs/mcp.md.
2026-11-27 21:06:29 -08:00
dotCooCoo 8c9c5146c4 Plug-ins: the example Desaturate filter leaves paths as they were
The example filter parsed its input with serde_json's default float
parser and handed every object back with its `path`. A coordinate could
come back changed in its last digit, which the host reads as a new path:
a live shape became a plain path after a color-only run, and a compound
path with a hidden, locked or guide member was refused.

The filter now leaves `path` out of each object it returns, so each
object keeps its geometry, as docs/plugins.md advises for a filter that
does not change it. The fixture desaturate.wasm is rebuilt from the
source with build.sh.

Docs: docs/plugins.md.
2026-11-27 12:25:16 -08:00
dotCooCoo dc333ada97 Merge main into feat/plugins-web-worker
Worker completion preserves unapplied typing and discards stale output.
2026-11-26 10:21:21 -08:00
dotCooCoo 4431c965f4 Merge main into feat/plugin-api-javascript-runtime
JavaScript plug-in runtime errors preserve the jobs limit classification.
2026-11-26 10:19:52 -08:00
dotCooCoo f7d39bce07 Merge main into feat/plugin-api-generated-art 2026-11-26 10:13:31 -08:00
dotCooCoo 6ec635ff43 Merge main into feat/plugin-api-context-menus 2026-11-26 09:35:47 -08:00
dotCooCoo 77f2c5f4aa Clarify importer placement order and validation errors 2026-11-26 09:20:34 -08:00
dotCooCoo f64d743ffb Importers: validate paths, artboards, and placed bounds 2026-11-26 08:38:17 -08:00
dotCooCoo 2274a3416d Merge main into feat/plugin-api-importer-output-kinds 2026-11-26 07:25:04 -08:00
BFlat 2c1aebf808 Merge pull request #9054 from dotCooCoo/fix/plugin-grants-integrity
Plug-ins: an edited grants file grants nothing, and its plug-ins ask again
2026-11-26 17:00:02 +07:00
BFlat 2fcfa504fb Merge pull request #9085 from dotCooCoo/feat/plugin-slider-param
Plug-ins: a number parameter can show a slider beside its field
2026-11-26 16:59:14 +07:00
dotCooCoo d71d4092e6 Merge main into feat/plugin-slider-param 2026-11-26 00:17:16 -08:00
dotCooCoo 5220c3ce4b Plug-ins: importer type and images past the canvas open nothing
Type or an image an importer at API level 4 returns that reaches more than 4,000,000 pt from the origin is refused, as the document would drop it on the next open. plugin.list's description and docs/mcp.md name outputKinds and API level 4.
2026-11-25 19:25:40 -08:00
dotCooCoo 1332a448a5 Merge main into feat/plugin-api-importer-output-kinds
Importers at API level 4 also place their type, images and visible layers with File › Place; their artboards are left out.
2026-11-25 19:03:39 -08:00
dotCooCoo 132d2da4a1 Merge main into feat/plugin-api-filter-type-images-symbols 2026-11-25 19:01:04 -08:00
dotCooCoo 594ebcb6e3 Merge main into feat/plugin-api-generated-art 2026-11-25 18:46:05 -08:00
dotCooCoo cb1361c889 Merge main into feat/plugins-web-worker 2026-11-25 18:45:04 -08:00
dotCooCoo 66ed890366 Merge main into feat/plugin-api-javascript-runtime 2026-11-25 18:42:48 -08:00
dotCooCoo 1fb8202f67 Merge main into feat/plugin-api-live-effect-appearance 2026-11-25 18:37:06 -08:00
dotCooCoo 6eec9ff0f3 Merge main into feat/plugin-api-context-menus 2026-11-25 18:25:26 -08:00
BFlat f966e8d664 Merge pull request #9104 from dotCooCoo/feat/plugin-api-last-filter
Plug-ins: Apply Last Filter and Last Filter… repeat the last filter plug-in
2026-11-26 08:50:06 +07:00
BFlat fc34e27d99 Merge pull request #9110 from dotCooCoo/feat/plugin-api-importers-place
Plug-ins: importers whose manifest sets place also read files for File › Place
2026-11-26 08:49:00 +07:00
dotCooCoo 032206d8fe Plug-ins: a left-out piece opacity is 100%, and the PDF test reads back the look
docs/plugins.md said a piece's opacity, when left out, is the object's.
The piece takes no opacity of its own in that case: the object's opacity
applies once to all the pieces together, so the line now says 100%.

The export test also opens the exported PDF and draws it: the piece is
half green and grown by Offset Path, as on the canvas, so a PDF that
drops the opacity or writes the original path fails the test.
2026-11-25 15:08:44 -08:00
dotCooCoo 01d77a45b9 Docs: a host at api 3 that doesn't read writes ignores the key
Hosts from before api 3 refuse the manifest. A host at api 3 without writes
installs the filter, ignores the key and refuses an output that changes the
objects it was given.
2026-11-25 15:00:28 -08:00
dotCooCoo af7ee2fdca Merge main into feat/plugin-api-importer-output-kinds 2026-11-25 14:51:05 -08:00
dotCooCoo 8ecba90108 Merge main into feat/plugin-api-javascript-runtime 2026-11-25 14:38:10 -08:00
dotCooCoo 0e701ffc1a Merge main into feat/plugins-web-worker 2026-11-25 14:21:03 -08:00
dotCooCoo c0fd2170d0 Merge main into feat/plugin-api-filter-type-images-symbols 2026-11-25 13:59:45 -08:00
dotCooCoo 950602cb84 Merge main into fix/plugin-grants-integrity 2026-11-25 13:57:17 -08:00
dotCooCoo 11a831e9a0 Merge main into feat/plugin-api-localized-labels 2026-11-25 10:05:25 -08:00
dotCooCoo be44e65acd Merge main into feat/plugin-api-generated-art 2026-11-25 09:48:54 -08:00