Commit Graph
661 Commits
Author SHA1 Message Date
.CooCoo ecf3096ff0 Merge pull request #10867 from dotCooCoo/fix/save-changes-docs-choice
Docs: the save-changes question takes choice dontSave, not discard
2026-12-04 17:03:30 -08:00
dotCooCoo 6c314c4cd6 Docs: the control protocol gives Don't Save in one ui.dialog.set request
ui.dialog.set with fields and action "confirm" sets choice (and
applyToAll) and confirms the same Save Changes question in one request,
so no other dialog is answered between the two. The control-protocol row
now gives that form beside the two-request one, and the Save Changes test
checks the line and sends both one-request forms through the control
handler.
2026-12-04 12:57:51 -08:00
dotCooCoo ff9ee1f33a Merge main into fix/dialog-keys-ui-inspect 2026-12-04 10:48:55 -08:00
dotCooCoo 231d90614b Docs: the save-changes question takes choice dontSave, not discard
The question that Close, Close All and Quit open for a modified
document takes `choice` (`save`, `dontSave` or `cancel`) and, while
more documents wait, `applyToAll`. A `discard` field is refused with
"unknown field `discard`". docs/control-protocol.md, the answer_dialog
row of docs/mcp.md and the control module's doc comment still told
clients to set `discard: true`.

Each text now gives `{field: "choice", value: "dontSave"}`, lists the
values `choice` takes and describes `applyToAll`. The answer_dialog
row gives the choice in one call and the confirm in a second one: the
app answers a `set` with `action` by returning the confirm's result
alone, and answer_dialog then sends a second confirm, which can fail
after the document closed or answer the next document's question.

A test in unsaved.rs checks the requests on the lines that describe
the `{"pending": "saveChanges"}` reply in both docs and sends the same
requests through the control handler: the modified documents close
and no file is written.
2026-12-04 07:29:42 -08:00
David Mann 7c96961420 Merge remote-tracking branch 'upstream/main' into feat/agents-open-window
# Conflicts:
#	apps/vectorcraft-cli/src/main.rs
2026-12-04 00:12:25 +01:00
dotCooCoo 79b9671fdc Merge main into fix/dialog-keys-ui-inspect 2026-12-03 10:39:46 -08:00
.CooCoo ceacaac6d4 Merge pull request #10551 from dotCooCoo/fix/placement-options-after-undo
Links: Placement Options does not edit an image placed after Undo
2026-12-03 07:27:14 -08:00
David MannandClaude Opus 5.5 3e699b4d21 feat(automation): agents in the open window through the ArtCraft Launcher's switch
While the launcher's Settings > AI agents switch names VectorCraft, the
window serves its control channel on loopback with craft-libs' AgentLink
and publishes agent-connection.json; plain `vectorcraft-cli mcp` finds it
on every tool call through the shared Live (challenge handshake, no port or
token in client configs) and otherwise runs headless or follows the
closed-app choice. Agent requests in the window are confined to the agent
folders. Preferences gets an AI Integrations page (the shared Agents page),
saved through the new UI command prefs.agents, which agents can't change.
New MCP tool agent_folders; `--when-closed`; `--connect` deprecated.

Closes #10621, closes #1470, closes #10453.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-12-03 02:07:29 +01:00
dotCooCoo 5d784fb626 Merge main into fix/halftone-grid-styles 2026-12-02 15:15:55 -08:00
dotCooCoo b1a88d652a Merge main into fix/dialog-keys-ui-inspect 2026-12-02 11:50:36 -08:00
dotCooCoo d41bf48738 Vector Halftone: round dots inside the cell keep four anchors
Circle and Ellipse dots that fit inside their cell use the four-anchor
ellipse path again; the quadrant builder is kept for dots that need
clipping. The style tests use a gray fill, so an explicit shape that is
ignored changes the result. docs/control-protocol.md lists the dialog's
style field.
2026-12-02 06:19:35 -08:00
dotCooCoo 628d21f37c Links: Placement Options does not edit an image placed after Undo
Placement Options checked the document and its reverts before OK, but not
Undo or Redo. After undoing the place of the image it opened on, a new
image can take the same id, and OK then changed that image's Placement
Options. OK now refuses after an Undo or Redo in the opening document, as
Create Object Mosaic does, and asks to reopen the dialog.

The guard was missing since the dialog started applying to the images it
opened on (62199b98b3).
2026-12-02 01:37:45 -08:00
.CooCoo d2b21eee81 Merge pull request #10145 from dotCooCoo/fix/placement-options-keeps-links
Links: Placement Options applies to the images it opened on
2026-12-01 09:47:28 -08:00
.CooCoo fd24af05d7 Merge pull request #10118 from dotCooCoo/fix/layer-options-key
MCP: dialog params texts name the keys ui.inspect reports
2026-12-01 09:47:10 -08:00
dotCooCoo ff81deb8d7 MCP: dialog params texts match the keys and fields ui.inspect lists
ui.inspect lists each open dialog with a key and its fields. The params
text of these commands, and docs/mcp.md, docs/control-protocol.md and
docs/target-app-parity.md, named keys and fields that ui.inspect does
not report:

- Recolor Artwork (ui.recolorDialog) and JavaScript Files
  (ui.javascriptFilesDialog) were listed with key null. Both dialogs now
  report the key their texts name: recolor and javascriptFiles.
- Print (file.print) and the print preset editor (ui.printPresetDialog):
  the texts said dialog print and printPreset; the key is null. The
  Print dialog lists section and sheet, not toFile, __section or
  __sheet, and Done is choice: done followed by ui.dialog.confirm, not
  discard: true. printer takes a name from print.printers, or PDF File,
  with which Print saves the job as a PDF.
- Find and Replace (ui.findAndReplace, ui.paramDialog with
  edit.findReplace): the texts said dialog findReplace and named an
  action field that ui.dialog.confirm runs. The key is null, the dialog
  lists no action field, and the texts now name its fields and buttons.
- Check Script (ui.checkScript): the texts said dialog scriptCheck with a
  report field. The key is null and the fields are lines, notes and
  groups; Copy copies the report as text.
- Import Shortcut Set (ui.shortcutImportDialog): the review opens inside
  Keyboard Shortcuts, which ui.inspect does not list. The text no longer
  names a shortcutImport dialog or its fields, and says that
  shortcutSet.read reads a file and matches its entries and
  importMatches.set stores matches.
- Data Recovery: the app asks about one copy at a time, with the field
  choice (recover or discard), not copies and discard.
- Reset Preferences: the question over Preferences is not listed in
  dialogs, and has no resetPreferences key.

Each command has a test that opens the dialog and checks its params text
against what ui.inspect lists.
2026-11-29 18:59:21 -08:00
dotCooCoo 62199b98b3 Links: Placement Options applies to the images it opened on
Opened without ids (the menu, a shortcut or ui.placementOptionsDialog {}),
the dialog read the selected images but sent null ids on OK, and
links.placementOptions read null as the selection at that moment. Selecting
another image while the dialog was open applied the options to that image,
and emptying the selection made OK fail.

links.placementOptions without options now returns {ids, placement}, and
the dialog sends those ids on OK. OK is refused when one of them has been
deleted. Callers that pass ids are unchanged, as is the check that OK edits
only the drawing the dialog opened in.
2026-11-29 15:29:52 -08:00
dotCooCoo e1b3943f46 MCP: tool.options' params text says where its dialog names appear
The params text of tool.options (in both command catalogs) and
docs/control-protocol.md named the dialogs' keys without saying that
they are the `key` ui.inspect reports. The `dialog` field tool.options
returns holds `rotate`, `scale`, `reflect` or `shear` for the transform
tools, `move` for the selection tools and `command` for the Type on a
Path tools.

- The text names both: the `key` in ui.inspect and the returned
  `dialog` field.
- The tool.options test checks the returned `dialog` field against the
  params text as well as the key.
- The ui.menuDialog test checks that the Simplify and Smooth popovers
  are showing when the params text says those commands show a slider.
2026-11-29 14:52:10 -08:00
dotCooCoo 9f6afc8403 MCP: dialog params texts name the keys ui.inspect reports
ui.inspect lists each open dialog with a key. The params text of these
commands, and docs/mcp.md and docs/control-protocol.md, named a key that
no open dialog reports:

- Layer Options (ui.layerOptions, ui.newLayer): layerOptions, now
  ui.layerOptions.
- The Layers panel's Panel Options: layersPanelOptions, now
  ui.layersPanelOptions.
- The Navigator panel's Panel Options: navigatorPanelOptions, now
  ui.navigatorPanelOptions.
- Document Raster Effects Settings (ui.rasterEffectsSettingsDialog):
  rasterEffectsSettings, now document.rasterEffectsSettings.
- The PDF preset editor (ui.pdfPresetDialog): pdfPreset, now pdf-export.
- Save for Web (file.saveForWeb): saveForWeb, now save-for-web.
- The Actions panel's Reset Actions question (ui.actionSet.reset):
  resetActions, now actionsQuestion.

Each command now has a test that opens the dialog and checks that its
params text names the key ui.inspect lists.
2026-11-29 11:06:33 -08:00
dotCooCoo 3cbe61a6d0 MCP: ui.menuDialog's params text names the dialog keys ui.inspect reports
Since the move to the craft UI framework, the dialogs ui.menuDialog
opens report their command id as their `key` in ui.inspect and
ui.dialog, except Transform Each and the envelope dialogs. The params
text, docs/mcp.md and docs/control-protocol.md still named the earlier
kinds (`move`, `scale`, `vectorHalftone`, `rearrangeArtboards`,
`renameArtboards`, `arrangeGrid`, `divideDashes`, `smoothBridge`,
`tangentCircle`, `textTweaker`, `command` and others), which no dialog
reports.

- The params text of ui.menuDialog (and its copy in the MCP catalog)
  says the key is the command id and names the four exceptions, and
  says Smooth, and Simplify until its dialog keeps its settings, show a
  slider rather than a dialog. ui.simplifyAuto and
  ui.simplifyMoreOptions name the Simplify dialog's key
  `object.path.simplify`.
- The params text of tool.options names the keys of the dialogs the
  Rotate, Scale, Reflect, Shear, selection and Type on a Path tools
  open: `object.rotate`, `object.scale`, `object.reflect`,
  `object.shear`, `object.move` and `type.pathOptions`.
- docs/mcp.md and docs/control-protocol.md name the keys the dialogs
  report, Type on a Path Options and Rasterize included.
- Tests open every command the ui.menuDialog params text lists, each of
  those tools' options and Simplify's More Options, and check the key
  against the params text, and that every key the ui.menuDialog text
  names is one a listed command opens.
2026-11-29 06:56:52 -08:00
.CooCoo 70e3cc7e02 Merge pull request #8824 from dotCooCoo/fix/issue-1232
Live Corners: pick any corner widget with Direct Selection
2026-11-28 20:05:41 -08:00
dotCooCoo 87456c5b35 Merge main into fix/issue-1232 2026-11-28 20:00:34 -08:00
dotCooCoo 1ad8134791 Merge main into feat/color-wheel-contrast-lines 2026-11-28 19:38:37 -08:00
.CooCoo b24f5af47c Merge pull request #8099 from dotCooCoo/feat/color-wheel-hex-alpha-css
Part of #978: Show Hex Field in the Color Wheel panel takes hex with an alpha and CSS colors
2026-11-28 08:37:09 -08:00
dotCooCoo 97316b5ce0 Merge main into feat/color-wheel-hex-alpha-css 2026-11-28 08:20:14 -08:00
dotCooCoo af8b62bdd9 Merge main into feat/toolbar-button-rename
Rename Button now opens through the craft UI framework: the dialog is a
hosted parameter dialog like New Toolbar, its OK is held while the label
is refused, and an OK after switching workspaces is refused. The button
context menu item and the button face use the framework Menu and Button;
the face paints the label of its own while the accessible name keeps the
command name after it. Tests drive the dialog through panel_harness.
2026-11-28 03:26:32 -08:00
dotCooCoo e99a3e11cf Merge main into feat/toolbar-command-buttons 2026-11-27 23:03:16 -08:00
dotCooCoo 1d66710671 Selection: Cmd/Ctrl-clicks step through grouped objects under the pointer
With the Selection tool, the first Cmd-click (Ctrl on Windows and Linux)
now always goes to Direct Selection or Group Selection, also over a
selected object: it picks the object under the pointer, a member of a
group included, and arms Select Behind. While Cmd stays held, each
further Cmd-click over the selection selects the next object under the
pointer, counting the members of groups one by one, and comes back to
the topmost after the last. Letting go of Cmd (a pointer, hover or key
event without it), choosing another tool or switching documents ends it.

Before, the first Cmd-click over a selected object selected the object
behind it at once, and Select Behind stepped through whole groups, so a
member lying under another member of the same group could not be
reached that way.

- doc::hit::leaves_at lists the objects a Direct Selection click picks
  under a point, topmost first, in one traversal of the document; a
  clipping mask or a group drawn with its own geometry effects falls back
  to repeated hit tests. The list stops at 256 objects.
- The session keeps the arming (Session::behind_armed) and passes it to
  the tools as ToolContext::behind_armed.
- Docs: docs/control-protocol.md (ui.pointer), docs/mcp.md,
  docs/target-app-parity.md and docs/ui-parity.md.
2026-11-27 18:47:39 -08:00
BFlat 6d701bf953 Merge pull request #8982 from dotCooCoo/fix/save-pdf-partial-bleed-write
Save PDF: a settings object set by ui.dialog.set keeps the options it leaves out
2026-11-27 05:12:09 +07:00
BFlat d7982ef857 Merge pull request #9078 from dotCooCoo/fix/paste-keeps-unwritten-cut
Clipboard: Paste keeps a Copy or Cut whose system clipboard write failed
2026-11-26 16:59:28 +07:00
dotCooCoo 20d0b0073a Merge main into feat/color-wheel-contrast-lines 2026-11-25 23:47:09 -08:00
dotCooCoo dcea6b8f3d Merge main into fix/paste-keeps-unwritten-cut 2026-11-25 21:52:50 -08:00
dotCooCoo 0eec4f510f Toolbars: Dock Toolbar and Float Toolbar run again on the dock
window.toolbar.dock and window.toolbar.float were still listed in the
command catalogs, but the move to the framework dock removed their
handlers, so both returned "unknown command".

- window.toolbar.dock docks a toolbar made with New Toolbar as a column
  of the left or right edge's dock, at the column `order` asks for.
  Without `side` it uses the edge it docks at, else the edge of the
  docked panel it left, else the left.
- window.toolbar.float floats it at x, y, or as the dock floats a panel.
- A hidden toolbar that either command shows brings back the groups torn
  off it, and both commands end a Tab hide.
- window.toolbar.list reports that same edge for a floating toolbar
  instead of always "left".
- place_floating moves an open OS window's record with its rect, as
  float_actions does.

Docs: the params text in both catalogs, docs/mcp.md and
docs/control-protocol.md describe dock columns instead of lanes.
2026-11-25 21:46:05 -08:00
dotCooCoo c7ee18375a Merge main into fix/issue-1232
Main's Cmd lends the Selection tool change passes the shown tool to the corner widgets; the picked and hollow corner widgets take it the same way.
2026-11-25 20:23:27 -08:00
dotCooCoo ecdb9e9757 Merge main into feat/toolbar-command-buttons 2026-11-25 19:03:06 -08:00
dotCooCoo 812b6a2a92 Toolbars: command buttons skip the tool re-homing, and the protocol doc splits the remove rule
- `palette::button_texts` reads the kept palette build as it is and no
  longer recomputes every tool's home on each footer pass; it builds
  only when no build exists for the current catalog.
- `docs/control-protocol.md` states the errors of `toolbar.addCommand`
  apart from `toolbar.removeCommand`, which answers with the unchanged
  list for a command the toolbar has no button for.
- The edit toolbar tests run their lookups in a frame from
  `crate::testing::part_frame`.
2026-11-25 19:01:06 -08:00
BFlat a54d28887c Merge pull request #7718 from dotCooCoo/feat/color-wheel-contrast
Color Wheel: Show Contrast reports the WCAG contrast against the color behind the selection
2026-11-26 08:51:15 +07:00
dotCooCoo 1d6f0340e2 Merge main into feat/color-wheel-contrast
The contrast row, its menu rows and its tests move to the craft UI framework,
as main's Color Wheel panel now uses it:

- The row is a Row with a Swatch named Background (a color well whose value is
  the background's hex value) and Text for the ratio and the AA and AAA
  results, each with the WCAG minimums as its tooltip.
- Show Contrast, Contrast For and Contrast Background are rows of the panel
  menu's items (ui.colorWheel.contrast, contrastFor.<id>,
  contrastBackground.below and contrastBackground.current), after Show
  Opacity. Current Color is gray, and its row answers an error, while the
  active proxy has no solid color.
- The kept background and ratio answer are fields of WheelUi instead of panel
  state. The answer's key also holds whether the Live Paint Bucket paints,
  which changes the proxies' paint without a document revision.
- The row's tests run in the panel's Fixture by accessible name; the drag test
  runs an interaction whose previews set the fill, as the Show Document Colors
  drag test does.
- The settings lists in the params text, docs/mcp.md and the tests take both
  opacity and the contrast keys.
2026-11-25 16:36:08 -08:00
dotCooCoo 2293eaf838 Merge main into feat/color-wheel-contrast-lines 2026-11-25 13:40:51 -08:00
dotCooCoo 16706b8622 Merge main into feat/toolbar-command-buttons 2026-11-25 10:03:22 -08:00
dotCooCoo 2b9999e81f Merge main into fix/save-pdf-partial-bleed-write 2026-11-25 09:29:28 -08:00
dotCooCoo 9cc639d2fc Merge main into fix/save-pdf-partial-bleed-write 2026-11-25 09:29:23 -08:00
dotCooCoo c71fc0a25b Merge main into feat/recolor-preset-library 2026-11-25 09:11:53 -08:00
dotCooCoo ca35b94985 Merge main into fix/width-point-edit-target 2026-11-24 23:08:50 -08:00
BFlat 5158ad606c Merge pull request #9047 from dotCooCoo/fix/ctrl-lends-selection-tool
Selection: Cmd/Ctrl lends Direct Selection until it is released
2026-11-25 11:31:03 +07:00
dotCooCoo b6d24816a8 Toolbars: Rename Button's Label field takes the focus, and a workspace switch closes the dialog
- The Label field takes the keyboard focus with its text selected when the
  dialog opens, so typing right away goes into it.
- Switching workspaces closes Rename Button, so OK cannot rename a button
  of the same name on a toolbar of the same name in the other workspace.
- The params text and docs say a screen reader reads only the label when it
  is the command's label or name, and that a null `label` opens the dialog.
2026-11-24 10:07:35 -08:00
dotCooCoo bfae97f9a5 Toolbars: Rename Button… gives a command button a label of its own
A command button on a toolbar made with New Toolbar showed its
command's label only. Its context menu now has Rename Button…, which
opens a dialog with the button's label; OK gives the button the label
typed, and an empty label gives it back its command's label.

- The label loses the spaces at its ends and has at most 64
  characters. Control characters and characters that change the
  direction of text show as \u{…} escapes on the button.
- The hover text still shows the command's name and shortcut. A
  screen reader says the label and then the command's name, or only
  the label when it is the command's label or name.
- Labels are saved with the toolbar (`labels`, left out when empty,
  so older layouts load unchanged), and Manage Toolbars' copy keeps
  them. Remove from Toolbar and `toolbar.reset` drop a button's label
  with it, and a move keeps it.
- `toolbar.renameCommand {command, toolbar, label?}` sets the label
  (without `label` it opens the dialog), `toolbar.addCommand` takes an
  optional `label`, and `window.toolbar.list` reports `labels`. A
  longer label, a label that is not text or a button the toolbar does
  not have is an error and changes nothing.

Rename Button… and its rules are VectorCraft's own, and so is the
64-character limit.

Docs: docs/control-protocol.md, docs/mcp.md, docs/target-app-parity.md.
2026-11-22 15:56:31 -08:00
dotCooCoo 23b6184c5b Recolor with Preset: reject a color group
ui.recolorDialog with preset: true and a group opened the preset dialog
and dropped the group, so OK recolored the art without rewriting the
group. That call is now an error. The params text and
docs/control-protocol.md say so.
2026-11-22 11:31:42 -08:00
dotCooCoo add7c0f48b Toolbars: a toolbar made with New Toolbar holds menu command buttons
A toolbar made with Window > Toolbars > New Toolbar held tools only. Its
Add Tool... menu now ends in an Add Command submenu that searches every
Command Palette result other than a tool (menu commands, plug-in
commands, effects and panels); a pick adds a button after the tools, and
Remove Command in the same menu lists the buttons by their full names
and takes one off.

- A button shows its command's label without the ellipsis, on up to two
  lines, and its full name and shortcut on hover. A click runs what the
  command's menu item runs, so a command whose item ends in an ellipsis
  opens its dialog; while the item is dimmed, the button is dimmed and a
  click runs nothing and the status line says why.
- Each command is asked whether it can run once per app state, at most
  12 in a frame, and again on a click or a key press.
- The button's context menu has Move Up, Move Down and Remove from
  Toolbar.
- The buttons are saved with the toolbar (`commands`, left out when
  empty, so older layouts load unchanged), and Manage Toolbars' copy keeps
  them. A command that is gone, such as an uninstalled plug-in's, keeps
  its button, dimmed and labeled with its id, until it comes back or is
  removed.
- `toolbar.addCommand {command, toolbar, at?}` adds or moves a button,
  `toolbar.removeCommand {command, toolbar}` takes one off, and
  `window.toolbar.list` reports `commands`. `toolbar.reset` with
  `toolbar` clears them along with the tools. A UI command that fails
  without params, such as `toolbar.addTool`, is not listed and cannot be
  added.

Not done: dragging a menu item or a Command Palette result onto a
toolbar, an Add to Toolbar item in the palette, dragging command buttons
to reorder or remove them, and command icons. Command buttons are
VectorCraft's own.

Docs: docs/control-protocol.md, docs/mcp.md, docs/target-app-parity.md.
2026-11-22 08:36:06 -08:00
dotCooCoo f7b7ca5f86 Recolor with Preset: ask whether to limit colors to a swatch library first
Edit > Edit Colors > Recolor with Preset (1, 2 and 3 Color Job, Color
Library) now opens a Recolor with Preset dialog with a Limit to Library
menu (None, Document Swatches or a library) before Recolor Artwork
opens; OK opens Recolor Artwork with the preset's colors and that
library, and Cancel opens nothing. The menu items run
ui.recolorDialog {preset: true}.

A 1 Color Job limited to the document's swatches, with a spot or global
ink picked for its row, gives gray art tints of that ink linked to its
swatch, so editing the swatch recolors the art.

Opening either dialog over another dialog now ends that dialog as
Cancel does, so a Recolor Artwork preview is rolled back.
2026-11-22 06:47:42 -08:00
dotCooCoo 3859c084d0 Clipboard: Paste keeps a Copy or Cut whose system clipboard write failed
When another app held the system clipboard open or refused the write,
Cut removed the art and kept it in the internal clipboard, but every
Paste command then read the older contents that the other app had left
on the system clipboard, and pasted those contents instead of the cut
art. A failed Copy had the same fault.

A failed write is now recorded whether or not the copied formats have
text. Until another app copies something, every Paste command takes
the internal clipboard, and a paste into type or a text field takes
the copy's text, or nothing when the formats have no text. On macOS
the clipboard service now reports the pasteboard's change count, so a
later copy is noticed whatever the clipboard holds. Linux and the BSDs
have no change count: there a later copy is noticed only when it
changes the clipboard's text, so a failed write is kept only while the
clipboard held text at the failure.

The new tests run a failed Copy or Cut through the six Paste commands
and a paste into type, with the clipboard locked or the write refused,
with and without a change count, with On Copy: Include SVG Code off so
that the formats have no text, and over a picture another app copied.
2026-11-21 23:44:34 -08:00