Commit Graph
1745 Commits
Author SHA1 Message Date
Fahri Meral cc518797a8 Fix #1728: require the JSON-RPC 2.0 envelope and correlate control replies
The server dispatched requests and notifications without ever checking jsonrpc, so a missing or wrong version could invoke tools or flip notification state; Remote accepted any reply with ok/result/error without comparing ids, so a faulty endpoint could attribute a stray result to the current call. handle() now requires jsonrpc 2.0 before dispatch (other envelopes get -32600, or are ignored for notifications, which have no id for a reply) and Remote::call rejects a reply whose id doesn't echo the request's, dropping the connection so the next call starts fresh, with the usual uncertainty error. Three new tests cover wrong/missing versions (incl. batch entries and a state-changing notification) and the mismatch-reconnect; docs/mcp.md documents both. cargo test -p vectorcraft-mcp passes.
2026-10-14 04:31:44 +07:00
bflatastic 5336d80196 command_batch: the step whose result passes the size cap says that it ran (#1727) 2026-10-14 04:31:43 +07:00
Fahri Meral b75ced8a70 Fix #1727: cap MCP framing input, batches and kept command_batch results
The server read stdio lines and remote replies without any byte bound, answered batches of any size, and command_batch kept every step result: one faulty peer or batch could allocate and work without bound. Request lines are now read in bounded chunks (16 MiB; longer lines get a -32600 reply, are skipped, and framing continues), protocol batches hold at most 64 messages, control-channel replies past 256 MiB drop the connection with the usual uncertainty error, command_batch takes at most 256 steps and keeps at most 8 MiB of step results (past that the batch stops with the reason, still closing its atomic undo group). Eight new tests cover the line/batch/step/result caps and the atomic-group close; docs/mcp.md and the command_batch tool text document them. cargo test -p vectorcraft-mcp passes.
2026-10-14 04:31:43 +07:00
ham9zahandClaude Sonnet 5.5 cde7b0ece7 Pen: Space pressed inside the drag threshold moves the anchor by the next move only
The drag threshold kept `last` at the press position until it was crossed, so
Space held when the move that crossed it came moved the anchor by the whole
distance since the press. `last` now follows the pointer while the threshold
swallows the moves, and the threshold is measured from a separate `pressed`.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-14 03:55:41 +07:00
ham9zahandClaude Sonnet 5.5 66a0f457e9 Add a Precise Cursors command and fix the misleading Caps Lock comment
General > Use Precise Cursors already worked and is saved with the other
preferences. This adds a `view.preciseCursors` command that toggles that same
preference, so it can be given a shortcut in Edit > Keyboard Shortcuts. It has
no default shortcut and no View menu item.

The comment in canvas.rs claimed Caps Lock gave precise cursors; nothing reads
Caps Lock (egui has no state for it), so it now describes what the code does.

Tests: for the tools whose own pointer the preference replaces (Pen, the anchor
tools, Curvature, Mesh, Eyedropper, Slice, Blend, Shape Builder) the pointer is
their own when off and a crosshair when on; every state of the Pen's pointer
turns into a crosshair; the preference round-trips through
to_json/apply_prefs; the command toggles it, updates the saved UI state, is
listed in the shortcut editor without a key and can be assigned one; switching
it creates no undo step and leaves the document saved; with system cursors the
glyph fallback is the system crosshair either way. The new label is translated
in the languages that claim complete menus.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-14 03:55:41 +07:00
ham9zahandClaude Sonnet 5.5 3ea4802a53 Pen: test that a click after a smooth anchor curves from its side only
Covers the Illustrator behaviour that a corner placed after a smooth anchor
has no handles, so the segment is shaped by the previous outgoing handle alone.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-14 03:55:41 +07:00
ham9zahandClaude Sonnet 5.5 eace7c749b Pen: ignore pointer movement inside a 3 px drag threshold
A press released within a few screen pixels is a click: the anchor stays a
corner with no handles, as in Illustrator, instead of getting near-zero
handles from a trembling hand. The threshold is in screen pixels, so it
does not change with zoom. It applies to new anchors, closing a path and
pulling a handle out of the last anchor.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-14 03:55:41 +07:00
Dan Green 96d5a14738 Render tests: tests that add fonts no longer run alongside the frame cache tests
tests_fontchange adds fonts to the shared font database, which makes every renderer lay type
out again; a tests_memory test counting the type it kept between frames then failed when one ran
alongside it (about half of the runs of the render tests). The font tests now hold a lock alone,
and the frame cache tests hold it shared.
2026-10-14 03:55:41 +07:00
sanyamsingh001andCodex 4944facd0a CI: isolate text import fuzzing from installed fonts
Co-authored-by: Codex <[email protected]>
2026-10-14 03:55:41 +07:00
Marco Arnulfo e11867128e Color panel: the mode picked last comes back after a restart (fixes #1675) 2026-10-14 03:55:41 +07:00
Gert Pellin ed1e976264 Fix #1748: text.create takes justify, so point type can be centred on its point
text.create, text.createInPath and the MCP add_text tool now take a
`justify` (auto|left|center|right|justifyAll, as text.setStyle). Point
type already laid out centred or right-aligned text around its origin;
it just could not be made that way, so scripts measured the bounds and
moved the text. Changing it afterwards stays text.setStyle {justify}.
2026-10-14 03:55:41 +07:00
Marco Arnulfo d9328c7668 Select > Same: type matches on its characters' fill and stroke (fixes #1737) 2026-10-14 03:55:41 +07:00
Ayberk A. 2f4cc8a1cc Fix #1756: Object → Expand expands repeats
Expand had nothing for live repeats, so a radial, grid or mirror repeat stayed
live. Its Object option now turns every repeat in the selection (inside groups
too, inner ones first) into a group of its instances, keeping the repeat's id
and place, in the same undo step; the dialog enables Object for a repeat.
Expand Repeat shares the code.
2026-10-14 03:55:41 +07:00
Ayberk A. 3024821c32 Fix #1662: slider rails show on Medium Dark
The rail used the fields' border, which on Medium Dark (the default) is all but
the panel's colour; it now uses the buttons' border, which stands out on every
brightness.
2026-10-14 03:55:41 +07:00
Ayberk A. 5fc0be5b85 Part of #1757: the palette test's frame closure needs no mut 2026-10-14 03:55:41 +07:00
Ayberk A. de1ede49a7 Fix #1757: arrow keys move through the command search results
Up and Down move the highlighted result (wrapping at the ends), the pointer
moving over a result highlights it, Enter runs the highlighted one, and a new
query starts from the first again.
2026-10-14 03:55:41 +07:00
bflatastic 3152436020 Brackets: keep to the tools whose size the keys are documented for
The typed [ and ] now reach the Blob Brush, the Eraser and the Symbolism
tools, whose bracket keys are in the public shortcut lists. A size of the
Paintbrush's own (and path.freehand's scale) is left out until its
behaviour is decided: #1661 stays open for that.
2026-10-14 03:55:41 +07:00
Ayberk A. 3f1e72d983 Fix #1661: [ and ] size the Paintbrush, and reach the tools that take them
The tools took `[` and `]` (the Blob Brush's and the Eraser's size, the
Symbolism tools' diameter and, with Shift, intensity), but the app never
passed the keys on: only `ui.key` over MCP reached them.

- The keyboard handler gives a typed `[`, `]`, `{` or `}` (Shift) to the
  active tool when it claims the key. It reads the typed character, so
  layouts where a bracket takes Option or AltGr (Option-8 on a Turkish
  Mac) work too. A field with the keyboard, the Type tool and Cmd/Ctrl
  shortcuts are left as they were.
- The Paintbrush has a size of its own, 10 to start as the Blob Brush's:
  `[` and `]` take a point off or add one, and the next stroke is drawn
  at size / 10 of the stroke weight (path.freehand `scale`). Public
  references describe the keys as changing the size the Paintbrush draws
  with, before drawing, the brush definition left as it is; so the
  stroke weight new art takes stays, and the selected path keeps its
  stroke. Every brush type, as the report and the Tuts+ guide describe;
  the step is our own.
2026-10-14 03:55:41 +07:00
Ayberk A. ef2d678cbf Fix #1679: a filled pencil path keeps a stroke of None
The Pencil gave every path a black stroke when the stroke was None. With Fill
new pencil strokes on and a fill set, the path now keeps no stroke; only a path
that would show nothing (no fill, no stroke) still gets black.
2026-10-14 03:55:40 +07:00
Ayberk A. 1e60a572b1 Fix #1686: Escape in type editing goes to the Selection tool
Escape still ends editing (an empty new point type is discarded) and the type
stays selected; the Type tool now claims Escape while editing and asks for the
Selection tool, so tool shortcuts work again without the mouse.
2026-10-14 03:55:40 +07:00
Ayberk A. e80cc9b49b Fix #1743: Escape cancels a Direct Selection drag
Escape while dragging anchors, handles, segments, objects, a type area, a blend
spine or a marquee with the Direct (or Group) Selection tool cancels the drag:
what it moved goes back and the release after it does nothing.
2026-10-14 03:55:40 +07:00
turtwig f297589c76 Direct Selection stays inside isolation mode
Marquee, anchor clicks, blend spines, and Group Selection only pick the
isolated object and what is inside it. A regression test covers a path
outside an isolated group.
2026-10-14 03:55:40 +07:00
turtwig 89501d73c2 Delete removes every selected anchor and keeps the remainder selected
A fully selected object is deleted along with partial anchors on other
paths. Several anchors on one closed path are removed by their original
indexes. What remains of a path stays selected, so a second Delete
removes it.
2026-10-14 03:55:40 +07:00
BFlat bb8897a2eb Merge pull request #1787 from MarekSpodBiedry/issue-1637
Fix numeric fields reverting a typed value when clicking away instead of pressing Enter (#1637)
2026-10-14 03:53:08 +07:00
BFlat 4d54fa27e3 Merge pull request #1773 from MarekSpodBiedry/issue-1722
Linked files: a change during a drag is applied after the drag, not lost (#1722)
2026-10-14 03:52:41 +07:00
BFlat 7f93a191c7 Merge pull request #1775 from MarekSpodBiedry/issue-1720
Do not journal a failed live preview at commit (#1720)
2026-10-14 03:52:17 +07:00
BFlat 0f0380b827 Merge pull request #1774 from MarekSpodBiedry/issue-1721
Stamp File Info dates only after a save succeeds (#1721)
2026-10-14 03:51:47 +07:00
BFlat ae6d70ae19 Merge pull request #1781 from MarekSpodBiedry/issue-1702
Search each shared name tree node once when finding the editing file (#1702)
2026-10-14 03:51:18 +07:00
BFlat b72ca300ed Merge pull request #1779 from MarekSpodBiedry/issue-1708
Cap Liquify dabs while expanding a segment, not only before it (#1708)
2026-10-14 03:51:00 +07:00
BFlat 4892384168 Merge pull request #1780 from MarekSpodBiedry/issue-1707
Fix scatter X axis ticks looping forever on data near the f64 maximum (#1707)
2026-10-14 03:49:57 +07:00
BFlat 64f875ff34 Merge pull request #1776 from MarekSpodBiedry/issue-1716
Check embedded PNG/JPEG bitmap size from the header before decoding (#1716)
2026-10-14 03:49:29 +07:00
BFlat 4d0f1dd0f8 Merge pull request #1783 from MarekSpodBiedry/issue-1698
Fix #1698: entries read from memory obey the size limits too, not only streamed ones (#1698)
2026-10-14 03:49:09 +07:00
BFlat 1e6c17c54b Merge pull request #1778 from MarekSpodBiedry/issue-1712
Create the staging file owner-only when replacing a document (#1712)
2026-10-14 03:48:51 +07:00
BFlat 6f56ad2e7f Merge pull request #1777 from MarekSpodBiedry/issue-1713
Keep Export for Screens suffix inside the export folder (#1713)
2026-10-14 03:48:36 +07:00
BFlat b374fee789 Merge pull request #1786 from MarekSpodBiedry/issue-1696
Refuse to package over the source document or its linked files (#1696)
2026-10-14 03:47:20 +07:00
BFlat 9abdbb0a71 Merge pull request #1807 from AyberkA0/fix/1710-ruzstd-0.9.1
Fix #1710: ruzstd 0.9.1 (RUSTSEC-2026-0344)
2026-10-14 03:47:05 +07:00
bflatastic d775549258 A press outside a field commits what was typed before the press acts 2026-10-14 03:17:55 +07:00
bflatastic 8a7e36ede8 Background save edited meanwhile: undoing back to the saved state is unmodified (#1721) 2026-10-14 03:17:51 +07:00
bflatastic 7abc1cfa10 Scatter overflow test: data that far off the plot is refused, not drawn (#1707) 2026-10-14 03:17:49 +07:00
bflatastic d82d6e3620 Test that a hostile Export for Screens suffix or prefix stays in the export folder (#1713) 2026-10-14 03:17:47 +07:00
Marco Arnulfo e50bd58146 Cursors: paint the tool cursors on Wayland, where the compositor showed the bitmap twice too big (fixes #1645) 2026-10-14 02:09:09 +07:00
Gert Pellin 3412d3a073 EPS import: a stitched shading keeps its hard colour changes (#1653)
A stitching function's bound became one stop, evaluated at the bound:
the right piece's colour. Where the pieces don't meet, the left piece's
end colour was lost. The colour just before the bound is now a stop at
the same offset too, ahead of the one after it, when the two differ;
continuous stitches keep one stop per bound as before.

Fixes #1653
2026-10-14 02:09:09 +07:00
Gert Pellin 85335e9e14 Scribble: one zig-zag per region, no lines across holes and notches (#1648)
The rows' spans were all chained into one polyline, so where a row had
more than one span the line ran across the hole between them, outside
the shape. A span now continues the previous row's chain whose
connecting line stays inside the shape (the nearest one); otherwise it
starts a chain of its own. In a convex shape the connector always stays
inside, so the result there is unchanged (render goldens pass).

Fixes #1648
2026-10-14 02:09:09 +07:00
Gert Pellin 977b8fb642 Roughen (Smooth): a turn-back stays smooth instead of becoming a cusp (#1643)
Roughen's jitter can put a point behind its predecessor, so the path
turns back. The Catmull-Rom tangent next - prev then shrinks to almost
nothing and the anchor becomes a cusp, which PDF viewers (MuPDF,
poppler, Ghostscript) draw with a miter spike; the preview doesn't.

catmull_rom now keeps the tangent at least half as long as the longer
chord, and where it is shorter (turns of more than about 150 degrees)
points it along the bisector of the two chords: the turn becomes a round
hairpin. Gentler turns keep the plain Catmull-Rom tangent, so Zig Zag,
Scribble and the render goldens are unchanged.

Fixes #1643
2026-10-14 02:09:08 +07:00
bflatastic f05fbfc292 Pathfinder panel: count a group's shapes without copying them 2026-10-14 02:09:08 +07:00
Marco Arnulfo 7ea75b01ba Pathfinder panel: a group selected alone counts its nested shapes, so an expanded stroke keeps the Shape Modes enabled (fixes #1635) 2026-10-14 02:09:07 +07:00
bflatastic 359d9bb833 Distribute spaces the selected anchor points too, and its buttons work with the points of one path (#1636) 2026-10-14 02:09:06 +07:00
Marco Arnulfo dcb963e85b Align: anchor points of one path align to each other, not to the artboard (fixes #1636) 2026-10-14 02:09:06 +07:00
Ayberk A. 0d28ee0872 Fix #1710: ruzstd 0.9.1 (RUSTSEC-2026-0344)
0.9.1 enforces the decompressed size of each block, which 0.9.0 didn't
(memory exhaustion on crafted .ai / Affinity zstd data). The manifests now ask
for at least 0.9.1.
2026-10-13 21:14:00 +03:00
MarekSpodBiedry f4f60b6ac6 Fix numeric fields reverting a typed value when clicking away instead of pressing Enter (#1637) 2026-10-13 18:23:24 +02:00