vectorcraft/crates/engine/src/cmd
Brandon Thomas 3e323bfa2a Robustness: VectorCraft never crashes — no panics in shipped code
Shipped code no longer unwraps, expects or panics: every one of the 124
unwrap()/expect()/panic!/unreachable! sites outside tests now handles the
failure (Result/Option, ?, let-else, defaults) and reports errors to the user.

- Lints: workspace clippy denies unwrap_used, expect_used, panic, todo,
  unimplemented and unreachable; clippy.toml allows them in tests, and
  integration tests, examples and testkit opt out explicitly.
- Safety net (vectorcraft_engine::guard): a panic in a top-level command rolls
  the document back and returns EngineError::Internal; a panicking tool is
  reset; the MCP server answers with an internal error and keeps serving; the
  UI frame and each control request are guarded.
- APIs that hid failures now return them: Rendered::to_png/to_jpeg/to_webp
  return Result (JPEG/WebP errors used to write empty files),
  FontDb::face returns Option, Region::top returns Option.
- Fuzzing: engine/tests/import_fuzz.rs feeds garbage, hostile and mutated SVG
  and PDF through import → render → export (30k cases locally, no panics).
- Docs: AGENTS.md/CLAUDE.md rule, docs/development.md "Robustness" section,
  README pointer and a PR template checklist.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 06:28:59 +07:00
..
fileio Robustness: VectorCraft never crashes — no panics in shipped code 2026-10-05 06:28:59 +07:00
appearance.rs M3.69: target circles target layers, groups and objects; drag them to move appearances 2026-10-05 02:15:41 +07:00
attributes.rs M3.76: Attributes panel with overprint, centre point, path direction, fill rule, image map, URL and note 2026-10-05 03:46:04 +07:00
brushsym.rs Robustness: VectorCraft never crashes — no panics in shipped code 2026-10-05 06:28:59 +07:00
buildcmds.rs Robustness: VectorCraft never crashes — no panics in shipped code 2026-10-05 06:28:59 +07:00
clipboard.rs Rename DrawCraft → VectorCraft: crates (vectorcraft-*), apps, binaries, types, env vars, docs, examples (.vectorcraft); old .drawcraft files and preferences still load. Fix: text bounds exact after opening a file; selection no longer marks a document modified (dirty = content differs from the saved document). Screenshots and renders regenerated. 2026-10-01 14:30:09 -04:00
colorcmds.rs Robustness: VectorCraft never crashes — no panics in shipped code 2026-10-05 06:28:59 +07:00
colormgmt.rs M3.85: spot colours defined in Lab, with Spot Colors options for Lab values or CMYK equivalents 2026-10-05 03:46:57 +07:00
colortheme.rs M3.96: Color Themes panel with a local theme library 2026-10-05 05:08:28 +07:00
create.rs M3.98: radial annotator extent ellipse, aspect handle and off-centre focal point 2026-10-05 04:43:43 +07:00
distortcmds.rs Robustness: VectorCraft never crashes — no panics in shipped code 2026-10-05 06:28:59 +07:00
docinfo.rs M3.45: graphic style links: redefine, break link, options, unused, sort, Select > Same 2026-10-04 23:03:45 +07:00
docmenu.rs M3.55: Edit Colors and Recolor Artwork also recolour gradient meshes, embedded images and pattern fills 2026-10-05 00:16:08 +07:00
draw2.rs Robustness: VectorCraft never crashes — no panics in shipped code 2026-10-05 06:28:59 +07:00
edit.rs M3.91: Object > Flatten Transparency turns transparent art into opaque art that looks the same 2026-10-05 01:36:18 +07:00
effectcmd.rs M3.66: Scale Strokes & Effects scales dashes and effect distances; Scale Corners works 2026-10-05 03:59:37 +07:00
expand.rs M3.98: radial annotator extent ellipse, aspect handle and off-centre focal point 2026-10-05 04:43:43 +07:00
flatten.rs Robustness: VectorCraft never crashes — no panics in shipped code 2026-10-05 06:28:59 +07:00
fonts.rs Robustness: VectorCraft never crashes — no panics in shipped code 2026-10-05 06:28:59 +07:00
freeform.rs M3.97: freeform points drag out to delete, spread ring drags, Lines mode draws lines 2026-10-05 04:43:43 +07:00
gradient.rs M3.83: gradients within, along or across a stroke 2026-10-05 05:47:54 +07:00
graph.rs M12.6: Graphs — the nine graph tools (Column, Stacked Column, Bar, Stacked Bar, Line, Area, Scatter, Pie, Radar), Object → Graph → Type… and Data… (CSV), series groups with legend, regenerate in place keeping moves/scales 2026-10-02 00:16:23 -04:00
help.rs Community links: Help menu (Discord, ArtCraft website, app page, GitHub), Discord button in the header, links on the About and Home screens; engine help.* commands return the URLs (menu clicks open them via the host's browser service) 2026-10-01 14:37:29 -04:00
layer.rs M3.69: target circles target layers, groups and objects; drag them to move appearances 2026-10-05 02:15:41 +07:00
live.rs Robustness: VectorCraft never crashes — no panics in shipped code 2026-10-05 06:28:59 +07:00
maskedit.rs M3.86: Alt-click the mask thumbnail to view only the mask 2026-10-05 03:11:04 +07:00
menucmds.rs Robustness: VectorCraft never crashes — no panics in shipped code 2026-10-05 06:28:59 +07:00
mod.rs Robustness: VectorCraft never crashes — no panics in shipped code 2026-10-05 06:28:59 +07:00
newart.rs M3.65: new-art appearance template (stroke options and graphic styles with nothing selected, New Art Has Basic Appearance) 2026-10-05 04:38:09 +07:00
object.rs Robustness: VectorCraft never crashes — no panics in shipped code 2026-10-05 06:28:59 +07:00
opacitymask.rs M3.69: target circles target layers, groups and objects; drag them to move appearances 2026-10-05 02:15:41 +07:00
overprint.rs M3.76: Attributes panel with overprint, centre point, path direction, fill rule, image map, URL and note 2026-10-05 03:46:04 +07:00
paint.rs M3.98: radial annotator extent ellipse, aspect handle and off-centre focal point 2026-10-05 04:43:43 +07:00
panelcmds.rs M3.8: split the paint/panel command modules and the dialogs into per-area files 2026-10-04 11:22:23 +07:00
path.rs Robustness: VectorCraft never crashes — no panics in shipped code 2026-10-05 06:28:59 +07:00
pathops.rs Robustness: VectorCraft never crashes — no panics in shipped code 2026-10-05 06:28:59 +07:00
patterncmds.rs Robustness: VectorCraft never crashes — no panics in shipped code 2026-10-05 06:28:59 +07:00
prefscmds.rs M3.65: new-art appearance template (stroke options and graphic styles with nothing selected, New Art Has Basic Appearance) 2026-10-05 04:38:09 +07:00
rasterfx.rs Robustness: VectorCraft never crashes — no panics in shipped code 2026-10-05 06:28:59 +07:00
recolor.rs M3.95: Color Guide Limit to Library and Edit or Apply Colors without art 2026-10-05 05:08:15 +07:00
select.rs Robustness: VectorCraft never crashes — no panics in shipped code 2026-10-05 06:28:59 +07:00
stroke.rs M3.65: new-art appearance template (stroke options and graphic styles with nothing selected, New Art Has Basic Appearance) 2026-10-05 04:38:09 +07:00
style.rs M3.65: new-art appearance template (stroke options and graphic styles with nothing selected, New Art Has Basic Appearance) 2026-10-05 04:38:09 +07:00
stylelib.rs M3.80: graphic style libraries in the library panel, with .vcstyles save and load 2026-10-05 03:06:13 +07:00
swatch.rs M3.79: Edit or Apply Color Group opens Recolor Artwork on a colour group 2026-10-05 04:20:27 +07:00
swatchlib.rs M3.95: Color Guide Limit to Library and Edit or Apply Colors without art 2026-10-05 05:08:15 +07:00
tabs.rs M7.6: tab stops and the Tabs panel — left/center/right/decimal stops (align-on character), default stops every ½ inch, text.tabs.set/get/clear, ruler (click adds, drag moves, drag off deletes), Repeat Tab / Delete Tab / Clear All Tabs; control characters no longer draw .notdef boxes 2026-10-02 10:13:24 -04:00
textedit.rs Robustness: VectorCraft never crashes — no panics in shipped code 2026-10-05 06:28:59 +07:00
textstyles.rs Robustness: VectorCraft never crashes — no panics in shipped code 2026-10-05 06:28:59 +07:00
textwrap.rs M7.4: Text Wrap flows on both sides of an object (lines split into every free span, left to right, sharing the baseline; exact interval intersection across the line band) 2026-10-02 09:28:04 -04:00
threads.rs Robustness: VectorCraft never crashes — no panics in shipped code 2026-10-05 06:28:59 +07:00
typecmd.rs Robustness: VectorCraft never crashes — no panics in shipped code 2026-10-05 06:28:59 +07:00
typemenu.rs M7.3: Type → Type on a Path effects (Rainbow, Skew, 3D Ribbon, Stair Step, Gravity): TextObject::path_effect, type.pathOptions {effect}, checked menu items 2026-10-01 22:21:58 -04:00
views.rs M3.88: Show Transparency Grid is per-document engine view state 2026-10-05 03:11:04 +07:00
wand.rs M3.28: proxies look through groups like the paint commands (a group shows its contents' paint, and contents that differ make a "?" proxy), the toolbar and panels share the engine's Session::proxy_paints, Magic Wand and Select Text by Font bump the revision so the cached "?" state follows them; double-click proxy test 2026-10-04 18:22:05 +07:00
xform.rs M3.59: tints of global and spot colours, tint swatches and Global colour balance 2026-10-05 02:29:17 +07:00