Commit Graph
225 Commits
Author SHA1 Message Date
dotCooCoo 5f907f863a Merge main into feat/plugin-api-context-menus 2026-11-28 08:46:27 -08:00
.CooCoo ab4b8bb64a Merge pull request #9136 from dotCooCoo/feat/plugin-api-generated-art
Plug-ins: generators draw generated art objects that keep their parameters
2026-11-28 08:06:06 -08:00
.CooCoo 57b715c359 Merge pull request #9829 from dotCooCoo/fix/previewbounds-memo-flake
Tests: hover memo counts hold plug-ins and hyphenation steady
2026-11-28 08:03:26 -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 338a5c7a32 Merge main into fix/previewbounds-memo-flake 2026-11-28 05:18:26 -08:00
dotCooCoo 404776ac04 Plug-ins: the failed-stage deferral test no longer depends on CPU load
effect::tests::failed_and_missing_stages_are_deferred_with_their_reason
installed a plug-in that runs to the default instruction budget (about 51
million instructions for its input) inside a first view, whose budget is
2,000 ms of real time. Under heavy CPU load the run took longer than that,
the view's budget cut it short, and the stage was deferred for time
instead of as failed, so last_error was empty and the assertion at
effect.rs:722 failed. With the test pinned to one core beside 15 busy
loops it failed 3 runs of 3 that way.

The test now gives the plug-in a budget of 100,000 instructions, so the
run ends in an instruction-budget failure long before the view's budget
runs out, and it checks that the error is the instruction budget. The
same test passes 5 runs of 5 beside 15 busy loops and 5 of 5 beside 100.
2026-11-28 04:04:07 -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 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
.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
.CooCoo 235c89c476 Merge pull request #9788 from dotCooCoo/fix/plugin-example-desaturate-keeps-path
Plug-ins: the example Desaturate filter leaves paths as they were
2026-11-27 21:42:06 -08:00
.CooCoo 990637f30d Merge pull request #9839 from dotCooCoo/fix/plugins-tests-without-timing
Plug-ins: loader, registry and dialog tests wait on handshakes instead of spin counts
2026-11-27 21:36:45 -08:00
.CooCoo 35e192f177 Merge pull request #9836 from dotCooCoo/chore/wasmi-2-0-3
Plug-ins: a multi-value br_table gives every target its values (wasmi 2.0.3)
2026-11-27 21:15:11 -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 64eb88e604 Plug-ins: web worker runs end on failure, deadline and automation as on the page
- A panic while a held run's output is applied ends the run, so the
  documents go back to their state before it, and ending a held run
  drops the output handed in for it.
- The worker loads a plug-in with the limits the page sends with the
  run, so its memory limit applies.
- A worker that is ready only after the run's deadline is not sent the
  run, with or without a dialog open.
- A run that holds the documents and fails while a dialog is open ends
  at once and frees them.
- A plug-in command's dialog that automation confirms runs the command
  on the page and returns its result.
- A plug-in file opened or dropped on the web whose worker check fails
  is reported in the Can't open dialog, not only in the status bar.
- The web README lists connect-src among the CSP directives the app
  needs.
2026-11-27 18:39:30 -08:00
dotCooCoo 6e88608a4d Plug-ins: loader, registry and dialog tests wait on handshakes instead of spin counts
The plug-in loader, registry and dialog unit tests decided their results with
yield-count spins (up to 100,000,000 tries) and a 10 s recv_timeout. On a
loaded machine a spin could run out before a worker sent, and a test failed
without a fault.

- Loader tests block on the workers' outcome channel (Loads::record_next) and
  on the jobs' start channel. The stuck-thread tests keep the outcome channel
  of the dropped load and receive the stuck job's outcome, which its worker
  sends after it stops counting the thread as stuck. The window test checks
  that taking outcomes leaves the start limit where it was.
- The registry revision test holds the set and waits for a hook that install
  runs right before it asks for the write lock. The folder-order test drives
  the load on the test thread and receives the other two files' outcomes
  while the first file waits.
- The dialog test counts the conditions Manifest::visible checks and fails
  once it checks more than one per named parameter, so a check that does not
  end fails the test.

Every assertion is kept.
2026-11-27 17:11:33 -08:00
dotCooCoo de8c87c194 Plugins: test-steady is on when the crate is tested in its own shard
The gate's test shard 4 builds vectorcraft-plugins without
vectorcraft-engine, which was the only crate that turned the
test-steady feature on, so `cargo xtask ci shard` stopped at its
feature check on every shard. vectorcraft-plugins now turns the
feature on in its own dev-dependencies, as vectorcraft-pdf and
vectorcraft-affinity do for their test features.
2026-11-27 16:51:29 -08:00
dotCooCoo a93ba163b6 Plug-ins: hostile, time budget and cancel tests check errors, not elapsed time
Three tests in crates/plugins/tests/abi.rs passed or failed on how long a
run took (under 5 s or 3 s), so a slow or loaded runner could fail them and
a fast one could hide a run stopped by the wrong limit.

- hostile_modules_fail_within_their_budget (was _fail_quickly) checks each
  module's error. The endless ones must end with the instruction budget, so
  a run stopped by the 60 s time budget fails the test.
- wall_clock_budget_stops_runaway_plugins gives an endless loop two slices
  of instructions: with a time budget of 0 it ends with the time budget at
  the end of the first slice, and with the default one it ends with the
  instruction budget.
- cancelling_stops_a_run_between_two_slices_of_its_budget gives the loop
  two slices: cancelled, it comes back Cancelled; not cancelled, the same
  plug-in ends with the instruction budget.

Each test fails when its check in Plugin::call_with is removed.
2026-11-27 16:25:42 -08:00
dotCooCoo 57230b2fe4 Plug-ins: a multi-value br_table gives every target its values (wasmi 2.0.3)
wasmi 2.0.0 miscompiles a multi-value br_table whose targets take the
same values when another operand sits under those values: the targets
read their values from slots the branch never wrote
(https://github.com/wasmi-labs/wasmi/pull/2106, fixed in 2.0.2). A
plug-in that branched that way got wrong results. 2.0.1 to 2.0.3 also
fix other miscompilations, a use-after-free on resuming a call on
another store, and memory.grow past a declared maximum bypassing the
resource limiter
(https://github.com/wasmi-labs/wasmi/blob/main/CHANGELOG.md).

Only Cargo.lock changes: the workspace requirement "2.0.0" allows
2.0.3, and wasmi 2.0.3 still uses wasmparser 0.228.

The new abi test runs such a branch table for each of its targets; it
fails on 2.0.0 with the plug-in's unreachable trap.
2026-11-27 15:53:05 -08:00
dotCooCoo 64ada8e7fc Tests: hover memo counts hold plug-ins and hyphenation steady
The Preview Bounds memo checks the fonts, the hyphenation exceptions and
the plug-in revisions on every lookup. Other engine tests change the
hyphenation exceptions and install plug-ins on other threads, so a
change between two hovers refreshed one memo slot and
a_hover_checks_the_memo_as_often_however_many_objects_are_selected
counted 5 checks instead of 4.

- set_hyphenation_exceptions takes the font gate (test_fonts::font_change),
  as composite font changes do, so steady_fonts holds it back too.
- vectorcraft_plugins::steady (feature test-steady) gates every revision
  bump in the plug-in registry and the deferred stages the same way.
- Both counting tests in previewbounds.rs hold both guards, and the
  hyphenation round-trip test holds steady_fonts through its sequence.
2026-11-27 15:23:49 -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 38bffbe8b5 Fix generated art editing in containers and after parameter updates 2026-11-26 12:30:45 -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
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 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 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 5099ce5e55 Plug-ins: unknown keys inside a written style's nested attributes are refused
A paragraph style's hyphenation, justification, tab stops and list, and a
character style's stroke dash, now refuse a key they don't read, naming the
field, as the style's own keys already did. A misspelled nested key no longer
leaves that setting unchanged without an error.
2026-11-25 15:10:16 -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 be44e65acd Merge main into feat/plugin-api-generated-art 2026-11-25 09:48:54 -08:00
dotCooCoo 388e1f29ef Merge main into feat/plugin-api-importers-place 2026-11-25 09:46:45 -08:00
dotCooCoo f6bc3d942a Merge main into feat/plugin-api-run-notices 2026-11-25 09:36:45 -08:00
dotCooCoo 68e08370d3 Merge main into feat/plugin-api-context-menus 2026-11-25 09:23:05 -08:00
dotCooCoo fd7d4976e8 Merge main into feat/plugin-api-live-effect-appearance 2026-11-25 09:09:08 -08:00
BFlat 9a9bdca382 Merge pull request #9088 from dotCooCoo/feat/plugin-api-document-info
Plug-ins: filters and plug-in commands read document information without a selection
2026-11-25 19:33:17 +07:00
dotCooCoo ee179f34dd Merge main into feat/plugin-api-filter-type-images-symbols 2026-11-25 04:26:13 -08:00
dotCooCoo 387952f0ca Merge main into feat/plugin-api-live-effect-appearance 2026-11-25 04:09:03 -08:00