Commit Graph
1379 Commits
Author SHA1 Message Date
dotCooCoo d583b8053f Merge main into feat/scripts-pageitem-transforms 2026-12-02 13:09:44 -08:00
dotCooCoo e61533b320 Merge main into feat/scripts-pageitem-transforms 2026-12-02 05:28:03 -08:00
dotCooCoo 4bcdc5d77c Merge main into feat/scripts-api-d8b-tracing 2026-12-02 01:26:36 -08:00
dotCooCoo a1b8b01383 Scripts: refuse moves that make a tracing, and a release that drops added art
- move, remove() and zOrder throw "Only Image Trace can make a tracing",
  with nothing changed, when they would leave an image at the bottom of
  an ordinary group named Image Trace: a path moved out of the group or
  to its top, Send to Back or Send Backward on the image, and Bring to
  Front or Bring Forward on the object below it.
- releaseTracing() throws "Cannot release a tracing containing added
  artwork", with nothing changed, when the tracing holds an object its
  trace did not make. imageTrace.release keeps only the source image, so
  the added object would be deleted.
- The TracingOptions members with no setting and TracingObject.areaCount
  are left out of hasOwnProperty and reflect. Reading them still throws.

Docs: docs/mcp.md.
2026-12-02 01:26:30 -08:00
dotCooCoo 4f942e5ba6 Merge main into fix/engine-test-pass 2026-12-01 19:34:12 -08:00
dotCooCoo 1bfbed4161 Tests: engine command and integration tests check what they claim
Tests that passed on an empty list, a missing write or a fixed sleep now
check the result itself:

- The folder search deadline test waits for the walker to block, then
  ends the search's time with Search::expire instead of sleeping past a
  0.2 s limit. The deadline is kept as nanoseconds after the start so a
  test can move it.
- The stale current layer tests check that the compound path still holds
  only the paths it was made from; the send-to-layer test sets the stale
  id itself, since undo now restores the earlier layer.
- BMP gray export draws a red square and checks it comes out a middle
  gray; a black and white page passed with gray turned off.
- Rewriting an EPS the import read whole checks the file changed and
  reopens with its art.
- The local Affinity sample test is ignored with a reason instead of
  returning at once without AFFINITY_SAMPLES.
- all() checks over anchors, seam fills, graph marks, legend rows, label
  looks, retype fonts, text runs, dimension lines and preflight ids now
  also pin the count or the text, so an empty result fails.
2026-12-01 18:13:43 -08:00
dotCooCoo 21f9323fcf Tests: import_fuzz's two regression tests check that their input reaches the export
svg_type_shifted_two_billion_points_exports_to_pdf now checks that the
SVG import keeps the type's shift of more than 2,000,000,000 pt, and that
the exported PDF leaves the type out, read back with the PDF importer.
Before, it checked only that the export returned Ok, so an import that
dropped or clamped the shift made it pass without reaching the bound.

a_long_thin_shape_with_a_shadow_renders_and_exports now checks that the
Affinity import gives exactly one shape with a drop shadow, more than
3,000,000 pt wide, before it renders and exports it. Before, an import
that dropped the shadow made it pass without drawing one.

The other 66 test-lint hits in import_fuzz.rs are property tests whose
claim is that hostile input loads, renders and exports without a panic.
Their helpers (survive, survive_library and the others) fail the case
through TestCaseError, which the no-assertion rule does not count.
2026-12-01 17:22:04 -08:00
dotCooCoo c012eb8ee9 Merge main into feat/scripts-pageitem-transforms 2026-12-01 15:00:42 -08:00
dotCooCoo a7129f3eed Merge main into feat/scripts-api-d8b-tracing 2026-12-01 14:07:15 -08:00
.CooCoo a5a3e40c5e Merge pull request #9087 from dotCooCoo/feat/scripts-print-printer
Scripts: Document.print prints to an installed printer and app.printerList lists the printers
2026-12-01 13:11:17 -08:00
dotCooCoo 6de89eece9 Merge main into feat/scripts-api-d8b-tracing 2026-12-01 09:00:59 -08:00
dotCooCoo 5530339d99 Merge main into feat/scripts-pageitem-transforms 2026-12-01 09:00:46 -08:00
dotCooCoo a992850228 Merge main into feat/color-randomly
# Conflicts:
#	crates/mcp/src/ui_catalog.rs
#	crates/ui-egui/src/menus/ui_commands.rs
2026-12-01 06:26:48 -08:00
dotCooCoo 8ba55104f0 Merge main into feat/group-rows
# Conflicts:
#	crates/engine/src/cmd/plugin_call/reviewed.rs
#	crates/mcp/src/ui_catalog.rs
#	crates/ui-egui/src/addons/arrange.rs
#	crates/ui-egui/src/menus/ui_commands.rs
#	docs/mcp.md
#	docs/target-app-parity.md
#	docs/ui-parity.md
2026-12-01 06:20:46 -08:00
.CooCoo 83b2c22b78 Merge pull request #10148 from dotCooCoo/feat/corner-marks
Arrange Tools: Mark Bounds of Each draws corner marks or a rectangle on each selected object's bounds
2026-12-01 06:18:27 -08:00
dotCooCoo 99bea87cff Merge main into feat/scripts-api-d8b-tracing 2026-12-01 02:16:37 -08:00
dotCooCoo eadf345932 Merge main into feat/color-randomly 2026-12-01 01:04:32 -08:00
dotCooCoo 3fcb278b24 Merge main into feat/group-rows 2026-12-01 01:03:49 -08:00
dotCooCoo 9c4f01faf1 Merge main into feat/corner-marks 2026-12-01 01:03:01 -08:00
dotCooCoo f08d12949c Tests: run the attached recolor import test on a synthetic document
The recolor adjustment test read test.af from the repository root and
returned early when the file was absent, so it never ran in CI. It now
builds a magenta rectangle with an attached Recolor adjustment in the
test and checks that lightness 1 imports as a white fill, that
lightness 0.5 at hue 0 draws pure red, and that a hidden adjustment
leaves the fill unchanged.
2026-11-30 23:03:43 -08:00
dotCooCoo 21aeb77367 Merge main into feat/scripts-pageitem-transforms 2026-11-30 21:02:41 -08:00
dotCooCoo ea8352c5d7 Merge main into feat/scripts-print-printer 2026-11-30 20:57:56 -08:00
dotCooCoo 805dceafce Merge main into feat/scripts-api-d8b-tracing
# Conflicts:
#	crates/engine/src/tests/script_dom.rs
2026-11-30 17:55:16 -08:00
.CooCoo 251d06b8b3 Merge pull request #10329 from dotCooCoo/fix/script-app-members-checks
Scripts: getIsFileOpen keeps backslashes in Unix file names; DocumentPreset checks its receiver
2026-11-30 16:42:58 -08:00
dotCooCoo 374b31b6f6 Merge main into feat/scripts-api-d8b-tracing 2026-11-30 15:56:12 -08:00
dotCooCoo 7b6c730df6 Merge main into feat/scripts-api-d8b-tracing 2026-11-30 15:48:31 -08:00
dotCooCoo b8ee4686b0 Scripts: getIsFileOpen keeps backslashes in Unix file names; DocumentPreset checks its receiver
app.getIsFileOpen treated any path with a backslash as a Windows path,
turning each backslash into a folder separator and ignoring letter case.
On macOS and Linux a backslash is a character of a file name, so
getIsFileOpen answered true for the path /work/a\b.ai while /work/a/b.ai
was open.
Paths now get the Windows rules only on Windows or when they start with a
drive letter.

DocumentPreset.typename and toString() answered for a preset kept from
an earlier run with #targetengine, while its settings throw a TypeError.
Both now check the preset the way the settings do.

Documents.addDocumentNoUI(startupPreset) was missing. It now makes the
document addDocument(startupPreset) makes.
2026-11-30 15:39:56 -08:00
.CooCoo b8470d947f Merge pull request #5272 from ljkx/fine-nudge-5258
Nudge: Ctrl/Cmd+arrow moves by a tenth of the keyboard increment (#5258)
2026-11-30 15:27:20 -08:00
dotCooCoo 1b2da536cc Merge main into feat/scripts-print-printer 2026-11-30 15:25:50 -08:00
dotCooCoo 540f49b52d Merge main into feat/scripts-pageitem-transforms 2026-11-30 15:24:11 -08:00
dotCooCoo 0c13a1edb2 Scripts: close the review gaps in print, saveAs, File paths and presets
- The 1000% scale limit applies only when Fit to Page is off, since the
  scale factors are not used with it on.
- A script run clears the print command allowance when it ends, so a
  panic inside print cannot leave file.print open to later runs.
- saveAs without options takes the format from the path the script
  names, so a link at that path cannot change it.
- A File the host gives back charges its path to the heap.
- DocumentPreset.typename throws for a preset from an earlier run.
- Documents.addDocumentNoUI throws that it is not available yet.
- The print tests remove their folders when an assertion fails.
2026-11-30 14:54:47 -08:00
.CooCoo cb0a23d293 Merge pull request #9052 from dotCooCoo/feat/scripts-api-d6-save-export-open
Scripts: documents save, export and open through Document.saveAs, exportFile and app.open
2026-11-30 14:36:03 -08:00
.CooCoo 38846fcdf3 Merge pull request #10116 from dotCooCoo/feat/edit-points-only
Selection Tools: Edit Points Only narrows a Direct Selection to its anchor points
2026-11-30 14:19:49 -08:00
.CooCoo 0b55e3160a Merge pull request #10085 from dotCooCoo/fix/color-value-finite
Colors: a color with a component too large to store is refused
2026-11-30 14:19:14 -08:00
.CooCoo 462b851eb7 Merge pull request #10257 from dotCooCoo/fix/merge-duplicate-tests
Tests: merge two duplicate engine tests, keeping every assertion
2026-11-30 14:05:18 -08:00
.CooCoo 5c9e3276a8 Merge pull request #10263 from dotCooCoo/fix/engine-tests-into-it
Tests: nine engine integration test files join the tests/it binary
2026-11-30 13:50:42 -08:00
dotCooCoo b3def332ff Merge main into feat/scripts-print-printer 2026-11-30 11:40:16 -08:00
dotCooCoo c1af5511fb Merge main into feat/scripts-api-d8b-tracing 2026-11-30 11:24:27 -08:00
dotCooCoo b3b3e78a36 Merge main into feat/scripts-pageitem-transforms 2026-11-30 11:07:22 -08:00
dotCooCoo 8a5f206e3c Merge main into feat/scripts-api-d6-save-export-open 2026-11-30 10:55:42 -08:00
.CooCoo 82108c11bd Merge pull request #9277 from dotCooCoo/feat/scripts-app-select-tool
Scripts: app.selectTool picks a tool
2026-11-30 09:44:47 -08:00
dotCooCoo 680fd47b62 Merge main into feat/edit-points-only 2026-11-30 08:18:53 -08:00
dotCooCoo ed0859d0d0 Scripts: kept-default option enumerations and refusal of non-UTF-8 real paths
The enumerations whose default member an option keeps (OutputFlattening,
CompressionQuality, the PDF color, compression, mark and security enums,
and the SVG encoding, DTD, CSS and font enums) are now defined, so a
script that sets an option to its default no longer throws a
ReferenceError; another member still throws as not available yet.

saveAs, exportFile, app.open and close with SAVECHANGES refuse a path
whose real file name is not valid UTF-8 instead of writing to or opening
a file named with a lossy copy of it.
2026-11-30 07:51:17 -08:00
dotCooCoo 81cc0fc797 Tests: nine engine integration test files join the tests/it binary
blend_render_consistency, direct_handle_mirror, ellipse_drag_anchors,
eraser_open_fill, group3_reference, path_fill_hits, pen_space_handle,
preflight and scissors_snap were each a test binary of their own. They
now are modules of crates/engine/tests/it, with their tests unchanged,
so the engine's tests link nine fewer binaries.

The files that stay separate change process-wide state (installed
plug-ins, Safe Mode, the font database, color settings, the working
directory), are run by name from CI or xtask (the Affinity corpus
tests, script_corpus, import_fuzz), or compile for about a minute on
their own (command_sweep), which would make every edit to tests/it
rebuild it.

Docs that named the old paths name the new ones, and the preflight
command in docs/production-preflight.md runs `--test it preflight::`.
2026-11-30 06:19:13 -08:00
dotCooCoo 13b9e22c4c Tests: merge two duplicate engine tests, keeping every assertion
Two engine tests ran the same inputs as another test and checked them
again with a tighter bound or a second check.

- commands_that_do_not_wait_for_a_tool_edit_change_no_document ran every
  junk case of every non-waiting command on the Single and Multi
  fixtures, which every_command_with_junk_params also runs. The junk
  sweep now compares tool_edit_state before and after each of those
  calls as well as its own panic, interaction and invariant checks. The
  tool-edit test keeps only the cases that turn each option on and off
  (option_cases), which the junk sweep does not send.
- turned_colored_inflate_facets_and_seams_cover_their_edges_once drew
  the same turned Inflate in the same solid fill as one case of
  colored_light_surfaces_match_supersampling_at_internal_facet_edges.
  That case now carries its bound (at most one RGB channel more than 3
  levels off, by no more than 4) and the separate test is removed.

Each merged test fails on a fault that only the removed check caught
before: document.info bumping the revision on a non-object params value
fails every_command_with_junk_params ("document.info "str" [Multi]"),
and solid_surface drawing every facet as a fill and a seam stroke fails
the supersampling test (2 channels off, at most 5).

docs/target-app-parity.md and waits_for_tool_edit's doc comment name
the tests that now hold these checks.
2026-11-30 05:29:35 -08:00
ljkxandClaude Opus 5.5 397cb9a472 Merge remote-tracking branch 'origin/main' into fine-nudge-5258
# Conflicts:
#	crates/engine/src/cmd/object/commands.rs
#	docs/ui-parity.md

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-30 13:58:07 +01:00
dotCooCoo f4c911d4d3 Scripts: open options with an importer, null export options and close checks for files that keep every artboard
- document.open refuses page, cropTo, pages and crop when a named importer reads the file (linkPages
  still uses the built-in reader).
- exportFile with explicit null options throws a TypeError for GIF, PNG8 and TIFF too.
- close(SaveOptions.SAVECHANGES) saves a modern .ai or .ait file and an SVG file with Preserve
  Editing whatever range was remembered; a range the save refuses still refuses.
- The script checker keeps a try statement's catch and finally, and an else after a nested
  do-while, inside the loop body; a line break after a label does not start a new statement; a
  this assignment in a function that hides a global clears the global's saved methods; and
  holder.d['saveAs'] = ... no longer counts as a write to d.
- docs/mcp.md describes which files keep every artboard on close.
2026-11-30 03:36:01 -08:00
dotCooCoo 1b8927db9f Merge main into feat/group-rows 2026-11-29 19:10:04 -08:00
dotCooCoo 3a8b8b8f25 Merge main into feat/scripts-api-d6-save-export-open 2026-11-29 19:06:23 -08:00
dotCooCoo c0eb5b898b Merge main into feat/scripts-pageitem-transforms
PathItem now takes PageItem's translate, rotate and resize: main's PathItem versions are removed, and resize on a path keeps main's changeLineWidths percent for the stroke weight. Hidden objects are refused, and an identity transform of an empty path checks its Transformation value and does nothing.
2026-11-29 17:19:24 -08:00