Commit Graph
733 Commits
Author SHA1 Message Date
.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 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 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 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 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 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
dotCooCoo b0bf3506dc Print: a stalled paper-size lookup no longer piles up worker threads
Each printer choice in the Print dialog started a new thread to read the
driver's paper sizes, even while earlier reads were still running. A
driver that stalls (printer enumeration has no time limit) left one
thread behind per printer change.

A new read now waits for the running worker. Only the newest choice is
read once that worker ends. When the newest still-running worker has run
15 seconds, the waiting read starts beside it, up to 4 workers in all. A
read that waits 15 seconds with 4 stalled workers gets no driver sizes,
and the dialog keeps its own sizes.

The lookup came from #10511.
2026-12-02 06:16:59 -08:00
.CooCoo 245af424e0 Merge pull request #10511 from dotCooCoo/fix/print-media-per-printer
Print: the Size list shows the chosen printer's paper sizes
2026-12-02 02:02:07 -08:00
dotCooCoo 5fe4cecf96 Merge main into fix/alt-codes-keypad-only 2026-12-02 00:40:23 -08:00
.CooCoo ed6619523c Merge pull request #10504 from dotCooCoo/fix/toolbar-chips-one-line
Tools: Color, Gradient and None share one line in a one-column rail
2026-12-01 22:45:13 -08:00
dotCooCoo 75834b0279 Merge main into fix/print-media-per-printer 2026-12-01 20:24:47 -08:00
.CooCoo 22bc29d69d Merge pull request #10460 from dotCooCoo/fix/test-lint-mirror-false-alarms
xtask: test-lint mirror leaves out entry reads, never-run follows #[path] modules
2026-12-01 20:19:50 -08:00
dotCooCoo c6c7de257f Dependencies: move the craft-libs pin to craft-libs main 77ade517
craft-libs #4659 (swatch chips that fit a one-column rail) and #4723
have merged, so every craft-libs rev moves from #4659's head edbf2117
to craft-libs main at 77ade517. The egui revisions move to 861d60a6,
the ones that craft-libs rev pins; winit stays at 0dfcec0e. Cargo.lock
changes only the sources of those packages.
2026-12-01 20:14:00 -08:00
dotCooCoo a73e85324a Merge main into fix/toolbar-chips-one-line 2026-12-01 19:43:37 -08:00
.CooCoo 802a869c68 Merge pull request #10517 from dotCooCoo/fix/test-pass-remaining-crates
Tests: assert list lengths and saved names in tool, path, 3D, brush and CAD tests
2026-12-01 19:28:41 -08:00
dotCooCoo c1b9fb98c3 Merge main into fix/test-lint-mirror-false-alarms 2026-12-01 18:24:34 -08:00
dotCooCoo 916d5a76c0 Merge main into fix/print-media-per-printer 2026-12-01 18:06:39 -08:00
dotCooCoo c33f0cfa13 Print: each printer choice reads the driver's paper sizes again
A lookup that was still running when the person chose another printer
stayed in the service, and choosing that printer again returned its old
answer without reading the driver. Reopening the dialog on a printer
whose lookup was still running did the same.

`PrintService::papers` now takes `fresh`, which the dialog sets when it
opens and when the printer changes. The desktop service keeps one lookup
in flight and replaces it on a fresh call or a call for another printer,
so an earlier answer is dropped.
2026-12-01 18:06:39 -08:00
dotCooCoo ccf5765419 Tests: assert counts and saved names in tool, path, 3D, brush and CAD tests
Tests whose all() passed on an empty list now check the list's length or
that it is not empty:
- huge_circles_bridge_with_finite_anchors_or_are_refused (pathops bridge)
- smooth_rounds_corners (pathops ops): the four corners stay, smoothed
- a_held_rotation_turns_the_art_around_its_pin (tools ARAP): one point
  per mesh vertex
- the_eraser_drag_area_matches_the_release_when_pressure_or_a_mode_starts_during_the_drag
  (tools gesture): one released point per press
- every_effect_casts_a_shadow, inflate_cells_across_a_hole_edge_are_cut_to_the_shape,
  a_plane_has_only_a_front_and_a_hollow_solid_none and
  perspective_runs_0_to_160_degrees_with_the_eye_outside_the_object (three-d)
- a_file_two_branches_include_is_followed_from_the_shallower_one
  (scriptcheck): one row per include line
- pens_pick_colors_and_widths (cad HP-GL): four widths
- junk_pressure_brushes_draw_finite_art (brush): all 12 cases draw

Round trips that hold by construction (parse finds the id in ALL) are
replaced with one saved name that must parse and one that must not:
follow_names_parse (pathops shared edge), the shape kinds (pathops
shapes), surfaces_parse_from_their_ids (three-d), the Quick Pen actions
(tools), names_parse_and_serialize_as_names (plugins) and the brush
variation modes, which also compare the serde names with the ids.

crop_keeps_an_instance_whose_art_reaches_the_region (cad) names the
entities written instead of checking that some were.
the_saved_engine_preference_is_found (app) pins the GPU choices the
preferences offer to the three the app reads.
timing_unite_1000_circles (pathops) gets an ignore reason and checks
that Unite gives one shape.

Each changed assertion fails when the code under test is broken (an id
renamed, a list emptied, a flush or instance dropped) and passes when it
is restored.
2026-12-01 17:35:21 -08:00
dotCooCoo 0a20ffb9ed Merge main into fix/print-media-per-printer 2026-12-01 16:57:55 -08:00
dotCooCoo 5d5196b1fd Merge main into fix/print-media-per-printer
# Conflicts:
#	apps/vectorcraft/src/printing.rs
2026-12-01 16:29:02 -08:00