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.
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.
A dialog that holds its OK files the answer for the app, which accepts or
refuses it in the next dialog pump. `ui.dialog.confirm` and `ui.dialog.set`
with `action: "confirm"` replied `{"ok": true}` as soon as the answer was
filed, so a client could not tell that the app refused it (a color
adjustment confirmed while another document is active) and the dialog
stayed open.
`ui.dialog.set` with an `action` also replied with the reply to the
confirm or cancel alone. The MCP `answer_dialog` tool reads a reply
without a `dialog` key as an app that did not answer the dialog, and
sends another `ui.dialog.confirm` or `ui.dialog.cancel`: after an
accepted OK that call failed with "no hosted dialog is open" or answered
the dialog under it.
- Both confirm paths answer with `dialog_reply`, and the app holds the
reply of a confirm that waits on the dialog's held OK until the app
answers that opening of the dialog.
- A set with an `action` replies `{dialog, result}`: the dialog as the
set left it, and the reply to its confirm or cancel, also once a held
OK is answered. This covers the hosted dialogs, Preferences and
ScriptUI dialogs; the Simplify and Smooth sliders already replied this
way.
- A held reply shows the paths outside the read root that the request
sent by their file names, as a reply sent at once shows them.
- The app polls the held replies right after the dialog pump, before the
next pass closes an accepted dialog, and after the control requests.
- While a confirm waits on a held OK, the control logic asks for a pass
(a paint while the window is hidden), so a minimized window answers
too. A dialog whose OK waits with no confirm on it, such as Print
during its printer lookup, does not keep the window drawing.
- docs/control-protocol.md describes the held reply and its errors.
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]>
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.
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).
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.
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.
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.
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.
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.
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.
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.
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.
- `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`.
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.
- 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.
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.
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.