Commit Graph
748 Commits
Author SHA1 Message Date
dotCooCoo 5c527ab7ec Merge main into fix/craft-libs-pin-language-packs
Moves every craft-libs crate to craft-libs main 4c330f6, which contains
both 69c746e9 and main's c2a47df pin. The egui (399fc6e) and winit
(3fd7ae6) revs stay as that craft-libs rev uses them, and skrifa stays at
craft-libs 37d0532f until craft-libs#5222 merges.
2026-12-04 18:01:30 -08:00
.CooCoo ecd771c54c Merge pull request #10644 from dotCooCoo/fix/popout-stable-measure
Panels: the Color and Gradient pop-outs run one pass a frame
2026-12-04 17:03:21 -08:00
dotCooCoo 63bc8cbf77 Merge main into fix/cad-clipboard-paste 2026-12-04 14:33:04 -08:00
dotCooCoo 889327e85d Paste: read CAD apps' metafiles on Windows and copied DXF, DWG and HP-GL files
Paste on Windows never read the enhanced metafile that CAD and office
apps put on the clipboard as vector art: windows_formats had no entry for
EMF, so the app pasted their bitmap instead, or nothing. The Windows
clipboard holds an EMF as a handle (CF_ENHMETAFILE, which Windows also
makes from CF_METAFILEPICT), so the app now copies its records with
GetEnhMetaFileBits, at most 64 MiB, and pastes them through
clipboard.importEmf.

A .dxf, .dwg or HP-GL plot file copied in a file manager did not paste,
because file_flavour had no flavour for them, though Open and Place read
all three. They now paste as image/vnd.dxf, image/vnd.dwg and
application/vnd.hp-hpgl through the new command clipboard.importCad
{dataBase64, format: dxf|dwg|hpgl, center?}, read as document.open reads
the file. A file pastes this way only when its bytes are the format, so
a chart script named .plt is not taken for a plot.

Fixes #10819.
2026-12-04 14:32:59 -08:00
dotCooCoo 1bbc32ff82 Dependencies: move the craft-libs pin to craft-libs main (69c746e9)
Every craft-libs dependency moves from 33966c68 to craft-libs main at
69c746e9, which adds the equal-spacing smart guides of a move
(ToolContext::add_measures and ToolHostResponse::measures). The egui and
winit forks stay at the revisions craft-libs pins (399fc6e0, 3fd7ae64).
Cargo.lock changes only the sources of the craft-libs packages.
2026-12-04 12:52:13 -08:00
dotCooCoo 829f85298e Merge main into fix/popout-stable-measure 2026-12-04 10:14:11 -08:00
dotCooCoo 4f9f0924b2 Merge main into fix/craft-libs-pin-language-packs 2026-12-04 10:13:46 -08:00
dotCooCoo 9c08ad9395 Merge main into fix/font-hinting-blue-zone-hang 2026-12-04 10:09:33 -08:00
dotCooCoo 6b0ca1faea Dependencies: move the craft-libs pin to craft-libs main (33966c68)
Every craft-libs dependency moves from 0582d506, the head of
storytold/craft-libs#5281, to craft-libs main at 33966c68. The egui and
winit forks stay at the revisions craft-libs pins (399fc6e0, 3fd7ae64).

- Art dragged off the canvas: craft-libs main still ends the drag session
  when the tool host cancels a press whose canvas was hidden for a pass, so
  art dragged over another document's tab and back to its own canvas was
  not moved. The canvas now starts that session again while the button is
  held. storytold/craft-libs#5281 keeps the session running; the canvas
  code goes with the pin bump that takes it.
- Floating panels: with storytold/craft-libs#4739 in the pin,
  WindowHost::viewports_at skips minimized and hidden windows, so
  os_window_at drops its own minimized check. It keeps the check for an
  open dialog: the palette windows hide a few passes after the dialog
  opens.
- Tests: the hidden-palette test waits the pass in which the palettes show
  again after the dialog closes. The Gradient panel's swatch-drop tests
  show the Gradient panel over the Swatches panel, which fills the room
  under it.
2026-12-04 10:04:00 -08:00
.CooCoo 2675e1291f Merge pull request #10802 from dotCooCoo/fix/open-dwg-files
File formats: DWG drawings open and place through the DXF reader
2026-12-04 09:38:29 -08:00
.CooCoo 603a938d34 Merge pull request #10662 from dotCooCoo/fix/cups-ipv6-ipp-port
Print: CUPS_SERVER IPv6 addresses and IPP_PORT reach the right scheduler
2026-12-04 09:25:27 -08:00
dotCooCoo bf5e7ea76d Merge main into fix/craft-libs-pin-language-packs 2026-12-04 07:37:48 -08:00
dotCooCoo d363ecc800 Tests: the timed-out DWG worker writes no answer
The time-limit test checked only the worker's exit code, which the
test-lint exit-status-only rule rejects. It now also reads the worker's
output and checks that nothing was written before it exited.
2026-12-04 07:01:29 -08:00
dotCooCoo 2e030ec46d Merge main into fix/open-dwg-files 2026-12-04 06:36:17 -08:00
aiongg fb2415818c Merge pull request #10622 from davidmann4/feat/agents-open-window
feat(automation): agents in the open window through the ArtCraft Launcher's switch
2026-12-04 09:24:30 -05:00
dotCooCoo 9c44847ea8 Merge main into fix/open-dwg-files 2026-12-04 05:04:33 -08:00
dotCooCoo d4670a94cf File formats: a DWG being placed can still be opened, and a worker ends by its deadline
- File > Open of a DWG drawing that is being converted for Place no
  longer does nothing: only conversions started for opening count as
  that file already being opened.
- A DWG worker gets an absolute deadline (`--dwg-worker-until`, in
  milliseconds since the UNIX epoch) instead of a time limit counted
  from its own start. `thumbnail` sets it when its own timer starts, so a
  worker started late no longer outlives the thumbnail process. A worker
  whose deadline has passed exits with code 1 at once.
2026-12-04 04:20:45 -08:00
FredApps be3ba1cea7 Merge branch 'main' into codex/10161-interface-font-language 2026-12-04 11:12:18 +01:00
dotCooCoo dbffe7a76c Dependencies: move the craft-libs pin to 0582d506
Move every craft-libs dependency from 77ade517 to 0582d506, which is
craft-libs main at 13198740 (with storytold/craft-libs#5272) plus
storytold/craft-libs#5281. Take the egui fork at 399fc6e0 and the winit
fork at 3fd7ae64, the revisions craft-libs pins. The winit fork no
longer pulls in wayland-protocols-plasma.

Adjust VectorCraft to the new framework behavior:

- The Unsaved Changes question opens on the dialog host as a
  HostedUnsavedChangesDialog.
- The drag session now resolves a release against the targets of the
  release pass and delivers the drop in the next pass. The canvas no
  longer drops art released over a pane itself in that pass, which
  copied the art twice.
- Files the person drops in a pass that carries injected input stay
  confined to the automation roots in the pass that delivers them.
- Dragging art over another document's tab and back to its own canvas
  moves it again: craft-libs#5281 keeps the drag session running when
  the source canvas shows again.
2026-12-04 01:57:51 -08:00
dotCooCoo 0a01b65903 Merge main into fix/popout-stable-measure 2026-12-04 01:53:17 -08:00
dotCooCoo 5c630500b3 File formats: DWG converts off the UI thread, and a thumbnail's worker stops in time
Opening or placing a DWG drawing from the desktop UI converted it on the
UI thread before DXF Import Options opened, so the window stopped
responding until a large drawing was converted. File > Open, Open Recent,
the Home screen, a drop and Place now convert it on a job of their own;
the status bar says "Converting <name>..." and the dialog opens once the
conversion is done. A drawing that can't be converted is reported and
does not go on the recent files. Commands run at once (MCP, scripts)
still convert before they return.

`thumbnail` exits after 20 seconds, but a DWG worker it started kept
running after that. The CLI now starts the worker with
`--dwg-worker-seconds 20`, and a worker started that way exits with code
1 once its time is up.

The CLI `info` test requires the drawing cut to a third and the one cut
to its header to be refused. The File formats row and the DWG entry in
docs/target-app-parity.md name the remaining limits: the web build and
R1.x and R2.x drawings return an error that says to save as DXF.
2026-12-03 21:28:54 -08:00
dotCooCoo 094f60b2fb Tests: DWG opens through the DXF Import Options dialog and the CLI worker
- The DXF Import Options dialog test opens a DWG, confirms it at 1:1
  in model space and places it.
- `vectorcraft-cli info` reads a DWG as the DXF it was written from,
  and five damaged copies (cut short, overwritten, bytes flipped) end
  in an error that names DWG or open with warnings, with the process
  exiting normally.
- The engine's DWG and DXF test modules are listed in order.
2026-12-03 20:36:08 -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 7841c460a1 Fonts: a face without hinting instructions no longer hangs the font list
egui hints text by default, so a TrueType face without hinting
instructions goes through skrifa's automatic hinter. In skrifa 0.44,
which epaint, glifo and usvg use, the hinter's long blue-zone search
never ends for a tall narrow Hebrew letter such as U+05D1, so the
font list stopped responding as soon as a row drew that letter in
such a face.

- Cargo.toml: skrifa 0.44 in [patch.crates-io] comes from craft-libs
  vendor/skrifa, which adds skrifa 0.46's exit to that loop, and
  every craft-libs rev moves to that commit.
- apps/vectorcraft-web/Cargo.toml and xtask/src/pdf_deps.rs: the same
  craft-libs rev.
- font_menu tests: a face built in memory with no hinting
  instructions lays out U+05D1 through egui's Fonts with the default
  text options.

Fixes #10493
2026-12-03 13:04:40 -08:00
dotCooCoo e58a626b41 Merge main into fix/open-dwg-files 2026-12-03 11:57:45 -08:00
dotCooCoo bb4e3308af File formats: DWG drawings open and place through the DXF reader
File > Open, File > Place and document.dxfInfo read DWG drawings. The
craft-libs craft-dwg bridge converts the drawing to DXF bytes and the
existing DXF reader reads them, so a DWG takes the DXF Import Options
(layout, ratio or fit, lineweights, centering, merged layers) and comes
in with the same layers, blocks and units as the DXF it converts to.
What the conversion skips is listed in the warnings.

- vectorcraft-cad: dwg module. On desktop the conversion runs in a copy
  of the program started with --dwg-worker (vectorcraft and
  vectorcraft-cli call serve_if_asked and use_own_worker), so a damaged
  file ends that copy, not the app. Inputs over 512 MiB, or a DXF
  rendition over 1 GiB, are refused. The last conversion (up to 128 MiB
  of DXF), or its error, is kept, so the dialog's layout list, each
  layout preview and the open read the file once. R1.x and R2.x
  drawings are refused with a hint to save as DXF.
- Engine: a read-only dwg format (detected by content or by .dwg),
  in the open and place extension lists, not associated with the app
  by packaging. DWG leaves the unsupported list; exporting to it says
  to export DXF instead, Export As keeps it greyed out, and Save over
  the drawing is refused.
- UI: the DXF Import Options dialog opens for .dwg files on Open,
  Place and a Shift-click with the place cursor.
- NOTICE and licenses/acadrust-0.6.6/: acadrust 0.6.6 (MPL-2.0,
  unmodified) and its third-party notices.
- Docs: docs/mcp.md, docs/file-format-parity.md, docs/roadmap.md and
  the progress line in docs/target-app-parity.md.

Tests build DWG files from DXF drawings with craft-dwg's writer: a DWG
comes in as its DXF does (layers, bounds, strokes, units, blocks), with
the DXF options, through Place, and in dxfInfo; a truncated DWG is an
error; saving or exporting a DWG writes nothing.

Fixes #3450
2026-12-03 11:57:39 -08:00
dotCooCoo 78eba16ad6 Printing: a bare ::1 server is not the local CUPS scheduler
CUPS (cupsSetServer) reads the digits after the last colon of an
unbracketed server name as its port, so `::1` names host `:` on port 1.
scheduler_is_local took any unbracketed name with several colons as a
host without a port and matched `::1` as loopback, so `::1` with
IPP_PORT=8631 used the local PPD folder for a queue on another
scheduler. It now splits such a name at its last colon when the last
group starts with a digit, as CUPS does. The IPv6 loopback is local
only as `[::1]`, which docs/mcp.md now names.
2026-12-03 11:45:43 -08:00
dotCooCoo db1cbf567a Merge main into fix/cups-ipv6-ipp-port 2026-12-03 11:01:48 -08:00
dotCooCoo d180564bb1 Merge main into fix/popout-stable-measure 2026-12-03 10:35:45 -08:00
dotCooCoo 7cba3b786d Links: clicking a link on desktop opens it in the browser again
The desktop app sends every link it opens (Help menu community links, the
app bar's Discord button, Home's Community links, About and credits, help
links in dialogs, the updater's Open URL, an object's URL attribute) as
egui's OpenUrl output. The app built eframe without its `links` feature, so
egui-winit only logged "Cannot open url - feature \"links\" not enabled." and
nothing opened.

Turn on eframe's `links` feature in apps/vectorcraft. Cargo.lock adds
webbrowser 1.2.8. The web build does not use egui-winit and is unchanged.
The feature can be removed once the craft-libs pin includes
storytold/craft-libs#5083, which opens links in the shared app setup.
2026-12-03 09:36:33 -08:00
.CooCoo c55947d2c1 Merge pull request #10727 from dotCooCoo/fix/cli-export-size
CLI: convert and run --export take --width, --height and --background
2026-12-03 08:49:20 -08:00
.CooCoo 80b6acf602 Merge pull request #10656 from dotCooCoo/fix/print-paper-null-and-socket-ppd
Print: file.print refuses a null paper, and only the local scheduler's sockets read its PPDs
2026-12-03 07:35:06 -08:00
.CooCoo 038c381d98 Merge pull request #10384 from dotCooCoo/fix/alt-codes-keypad-only
Type: only keypad digits start an Alt code, and a keypad code with a claimed digit types its character
2026-12-03 07:25:01 -08:00
dotCooCoo eb544fee30 Export: warn when the pixel scale limit changes a requested width or height
A raster width or height that needs more than 64 or less than 0.01
pixels per point was written at the clamped size with no note. The
export now adds a warning naming the requested and the written size,
for MCP export and the CLI's --width and --height alike.
2026-12-03 06:29:23 -08:00
dotCooCoo 89509c31e4 CLI: convert and run --export take --width, --height and --background
The raster export already reads width, height and background, but the
CLI only passed scale and ppi, so those options were reachable through
the MCP export tool alone. convert and run now take --width N,
--height N and --background V and send them for raster outputs only.
A width or height that is not a positive finite number, and a missing
or unreadable background, are refused when the flags are read, for
every output format.

Fixes #10577
2026-12-03 05:58:08 -08:00
dotCooCoo 0998156ce0 Print: with no scheduler named, IPP_PORT decides whether local PPDs apply
With no CUPS_SERVER or ServerName and no CUPS domain socket, CUPS uses
localhost on the IPP_PORT port. The local PPD check treated that case as
local on any port, so with IPP_PORT=8631 the Print dialog listed the local
PPD's sizes instead of those of the scheduler on 8631. The check now
resolves the implicit scheduler the way the IPP lookup does: a CUPS socket
is local, and otherwise localhost on IPP_PORT is local only on port 631.
2026-12-02 19:36:41 -08:00
dotCooCoo 7803df68bc Print: CUPS_SERVER IPv6 addresses and IPP_PORT reach the right scheduler
An IPv6 address named as the CUPS server without brackets (`fd00::cafe`,
or `fd00::cafe:8631` with a port) produced an IPP queue URI with the
address unbracketed, which ipptool rejects, so a queue with no PPD and
no lpoptions sizes listed no paper sizes. ipp_queue_uri now splits the
host and port as cupsSetServer does, brackets an IPv6 host and encodes
a zone separator as %25.

The local PPD check ignored IPP_PORT, so `CUPS_SERVER=localhost` with
`IPP_PORT=8631` read this machine's PPDs for another scheduler's
queues. A server named without a port now takes the IPP_PORT port
before the check.

The IPP fallback and the local PPD check came in #10581.
2026-12-02 19:06:57 -08:00
dotCooCoo 774762bbf6 Print: file.print refuses a null paper, and only the local scheduler's sockets read its PPDs
`file.print` treated `paper: null` like an omitted `paper`; a null value is
now an error, as the params text already says for anything but a keyword.
The Print dialog leaves `paper` out of its job when the driver lists no
keyword for the Size chosen.

A `CUPS_SERVER` or `ServerName` that names a domain socket counted as this
machine's scheduler for any path, so the dialog read `/etc/cups/ppd` for a
second scheduler on another socket. Only CUPS's own sockets, the sockets
the `Listen` lines of `/etc/cups/cupsd.conf` name, and links to either now
read the local PPDs. The IPP lookup asks `localhost:631` for CUPS's own
sockets and links to them only. A `\#` in a `cupsd.conf` path keeps its `#`,
as in `client.conf`.

Follows up #10581.
2026-12-02 18:27:36 -08:00
David MannandClaude Opus 5.5 a7652fff9d fix(agents): address review: edited agent fields only, --when-closed error without a settings folder, docs
- Preferences OK sends only the agent settings changed in the window, before prefs.set, so a refused one
  applies nothing and one changed through prefs.agents while the window is open keeps its value.
- mcp --when-closed error refuses when there is no settings folder instead of going headless.
- Docs: automation roots make plain mcp headless; a session that went headless needs a new MCP session
  for the window; a window-run export may still finish after cancellation; crate docs name the
  closed-app choices.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-12-03 02:58:15 +01: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 df634f8a0b Panels: the Color and Gradient pop-outs run one pass a frame
With the Color or Gradient panel open as a pop-out, every second frame
at rest ran the whole window twice: egui discarded the first pass
because a content column in the panel body measured differently from
the transcript its flyout kept. storytold/craft-libs#4932 fixes the
layout memory, and this moves the craft-libs pin to its head
c2a47dfe, which is craft-libs main 092a2c6b with the fix. The egui and
winit revisions are unchanged.

The bump also brings in craft-libs #4584, #4804, #2415, #4531, #4676,
#3061 and #4050.

Test: with either pop-out open, each of 10 frames at rest runs one pass.
2026-12-02 16:26:28 -08:00
dotCooCoo 15d11beb83 Print: a second scheduler on a loopback port supplies its own paper sizes
A `CUPS_SERVER` or `ServerName` of `localhost`, `127.0.0.1` or `::1` counts
as this machine's scheduler only with no port or port 631. On another port
(a second CUPS instance) the dialog no longer reads `/etc/cups/ppd`, whose
queues belong to the default scheduler, and asks `lpoptions` and IPP
instead.

When the named server is one of CUPS's own domain sockets and neither the
PPD nor `lpoptions` lists sizes, the IPP lookup asks `localhost` on the IPP
default port, as it already does when no server is named. `ipptool` rejects
a URI whose host is a socket path (`httpSeparateURI` in CUPS's
`cups/http-support.c`), so another socket path is not asked.
2026-12-02 15:48:30 -08:00
dotCooCoo fae03ac701 Merge main into fix/print-paper-size-to-cups 2026-12-02 14:27:22 -08:00
dotCooCoo af28b5380c Print: a remote CUPS scheduler supplies its own paper sizes
When CUPS_SERVER or client.conf's ServerName names a remote scheduler,
the Print dialog no longer reads a same-named PPD under /etc/cups/ppd.
The job goes to the remote queue, so the sizes now come from that
server through lpoptions and IPP. A domain socket, localhost, 127.0.0.1
and ::1, with an optional port and /version= suffix, still count as
local and keep the PPD lookup.
2026-12-02 12:51:04 -08:00
dotCooCoo badc85e0d0 Merge main into fix/print-dialog-printer-discovery 2026-12-02 12:10:58 -08:00
dotCooCoo ec8c564a6f Merge main into fix/print-paper-size-to-cups 2026-12-02 11:48:41 -08:00
dotCooCoo f382526eb9 Print: the IPP paper lookup uses IPP_PORT for a server named without a port
ipp_queue_uri built ipp://host/printers/name from CUPS_SERVER or the
client.conf ServerName, so a server named without a port was always asked
on 631, while CUPS clients use IPP_PORT for it. The app now reads
IPP_PORT and passes it in; a port in the server name keeps precedence, and
a bracketed IPv6 host counts as having a port only after its ]. With no
server named, the lookup uses localhost on IPP_PORT only when none of the
CUPS domain sockets exists, since CUPS otherwise talks to its socket.
docs/mcp.md describes the lookup's server and port.
2026-12-02 10:32:46 -08:00
dotCooCoo 11dfa1ce09 Print: the dialog finds printers on a background job
File > Print listed the system's printers on the UI thread when the
dialog opened and on each Refresh, so a slow or unreachable print
server froze the app. The desktop print service now offers its
discovery to a background job; the dialog opens on Default Printer and
PDF File, shows and announces the lookup, and takes the list when it
arrives.

- Discovery on Windows lists the queues without asking each driver for
  its capabilities (`craft::print::printer_queues`).
- PDF File, its preview and Done stay available during the lookup.
  Print to a printer is disabled until the list is applied, and a held
  Print to a printer is not submitted.
- Setup... appears once the lookup has ended, since it reads the
  printers again on Windows.
- Discovery starts on the first pass even when another drawing is
  active, and a lookup that ends without a list leaves Default Printer
  and PDF File.

The Print dialog's discovery came with #8800.
2026-12-02 07:55:04 -08:00
dotCooCoo f5b9e1a04b Print: a client.conf comment no longer spoils the CUPS server name
cups_server() took everything after ServerName, so a line such as
"ServerName print.example.com # office" gave a value that
ipp_queue_uri rejects, and IPP paper discovery was skipped. The value
is now read as CUPS reads the file: the first unescaped # starts a
comment, and \# stands for a literal #. On macOS, which does not read
ServerName, only CUPS_SERVER is used.
2026-12-02 07:39:49 -08:00
dotCooCoo d23dd117ba Print: the job asks CUPS for the paper size chosen
On macOS and Linux the print job carried no media option, so the queue
printed on its default paper whatever Size the Print dialog showed. The
dialog now sends the driver's keyword for the chosen Size, and
file.print takes it as `paper`; the job passes it to CUPS as `media`.
A `paper` that is not a single keyword is an error, and so is `paper`
with file output, with directPdf or on Windows, where the spooler does
not apply it. While the chosen printer's sizes are still loading, Print
is refused and the dialog stays open.

A queue with no PPD on this machine (a driverless or remote printer)
listed no paper sizes. Its sizes now come from `lpoptions -p NAME -l`,
and when its server has no PPD either, from the queue's IPP
media-supported attribute on the scheduler CUPS uses. CUPS's B4 and B5
keywords are the JIS sizes, and ISOB4 and ISOB5 the ISO ones.

Builds on the printer paper lookup in apps/vectorcraft/src/printing.rs
(#10511).
2026-12-02 07:07:42 -08:00