Skip to content

Land #542, #523, #528, #527, #538, #529 with review fixes - #547

Merged
bflatastic merged 15 commits into
mainfrom
pr/land-2026-10-09
Oct 8, 2026
Merged

bflatastic merged 15 commits into
mainfrom
pr/land-2026-10-09

Conversation

@bflatastic

Copy link
Copy Markdown
Member

Lands six reviewed PRs in one merge, keeping every contributor's original commit (merged, not rebased, so GitHub marks each PR merged), with our review fixes as separate commits.

Checks

  • Rebased on / merged with origin/main 843f461.
  • cargo xtask ci on this exact tree: all 7 steps passed (fmt, clippy, test, assets, brands, layers, wasm), ~4,050 tests.
  • cargo check -p vectorcraft --target aarch64-apple-darwin (for Fix #433: open only file URLs handed to the app (macOS 27) #523's macOS code): passes.
  • Live, in the integrated app (--control):
    • The ruler menu lists all ten units with Points checked, on the top ruler, the left ruler and the origin box. Millimeters applies, and one undo gives Points back.
    • Left-dragging from the rulers still makes guides.
    • Right-clicks and plain clicks on a ruler make none.
  • Security review of the community diffs: no dependency, build-script, CI or unsafe changes; Fix #433: open only file URLs handed to the app (macOS 27) #523 adds one AppKit call inside existing unsafe-free code.

🤖 Generated with Claude Code

imachus and others added 15 commits October 8, 2026 23:54
…tps URL into a path)

`application:openURLs:` can pass URLs that aren't files, and on macOS 27 `to_file_path()` returns
the path of an https URL ("/a.svg"), so it was queued as a document. Keep the file URLs
(`isFileURL`) before converting; `opened_files_wait_for_the_ui` passes again on macOS 27.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A right-click on either ruler (or the origin box) now opens a context
menu listing the ten document units, the current one checked. Choosing
one runs document.setUnits — the same one-undo-step change as
Preferences ▸ Units ▸ General / Document Setup.

The guide-drag interact on each ruler becomes click-and-drag so the same
widget both drags out guides (left) and opens the unit menu (right); the
origin box gets its own click interact. checked() reports the active unit
so the menu shows the check-mark; the unit labels are already translated
as the Units preference choices.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…em box centre alignment

As decided in #432 (option 2): while the interface is in Japanese, new type starts with em box
top-to-top leading and em box centre character alignment; other languages keep the Roman
baseline, so Latin area type doesn't move.

- The UI tells the engine the language it is drawn in each frame (`Session::ui_language`); without
  a UI, an explicit `interfaceLanguage` preference counts (`Session::japanese_interface`).
- `text.create` and `text.createInPath` (the Type tools' clicks and drags) apply it, and take
  `leadingModel` / `charAlign` to choose; the values used are journaled, so a replay does the same
  in any language.
- `paraStyle.new` / `charStyle.new` made from nothing (no `attrs`, no text selected) carry them.
- Imported text (PDF, SVG, DXF…) keeps the Roman baseline. Saved documents keep what they say.
- docs/mcp.md (New type in a Japanese interface) and the ROADMAP note it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ths)

Corner widgets only ever showed on live rectangles: CornerWidgets::of bailed
out unless the selection's live shape was LiveShape::Rectangle, and
object.setLiveShape only edited rectangle radii. A star is a plain path, so it
had no widgets with either selection tool.

- geom::corners: the corners of any path (anchors without handles between two
  straight sides) and the path with them cut round, inverted round or
  chamfered, each corner a circle tangent to both sides, its radius no larger
  than takes the cut halfway along its shorter side. Rectangles now cut their
  corners with it (bit-identical anchors and layout).
- doc::corners::LiveCorners/set_corners: one model for a live rectangle's,
  a live polygon's (new radii/kinds) and any other path's corners (new
  LiveShape::Path keeping the uncut outline, plain again once nothing is cut);
  radii scale with transforms (Scale Corners) and stay circular.
- object.setLiveShape takes anchor indices for `corners` on any path; polygons
  keep a shared radius as their sides change.
- Widgets: Direct Selection on any path, Selection on live rectangles and
  polygons; placed on each corner's bisector, the drag follows it, the red
  limit outline marks corners at their own limit; the angle preference and
  View > Hide Corner Widget apply. Corners dialog and the Properties and
  Transform panels' Corner Radius (now on polygons too) work on them.
- Tests for the star, the polygon and a pen path in geom, doc, tools, engine
  and ui-egui; docs and ROADMAP.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Every drawing tool now asks one snapper (guides::DrawSnap) for the points it
places: the Pen's and Curvature tool's anchors, the Pencil's ends, the shape
tools' start and dragged corner or radius (Rectangle, Rounded Rectangle,
Ellipse, Polygon, Star, Line Segment, Arc, Spiral, the grids), the Type tool's
click and frame and a new artboard's corners. Points land on other objects'
anchors, centres and paths ("anchor", "center", "path") or line up with their
anchors, edges and centres ("align"); hovering shows it before the press, the
Pen's guides end its rubber band, and the Pen lands on the path being drawn
too. Shift keeps a point to its 45-degree step (from Constrain Angle) or a
box's diagonal and slides it along that way into line with a target.
Preferences > Smart Guides > Construction Guides and Angles now act: a drawn
point near a guide through the point it leaves from lands on it.

Before, the Pen snapped only its press and showed nothing, and the shape tools
re-gathered targets on every drag step from the document showing their own
preview, so the dragged corner stuck to where the last step left it.

Performance: targets are gathered once per document state (keyed on the
document's uid and revision, now in ToolContext), from the art in the window,
and sorted, so the anchors, centres and lines near the pointer are found by
bisection. Leaving objects out of the targets no longer looks up each node's
ancestry (quadratic in the document's size): one pruned walk does it, which
also speeds up the Selection tool's moves and resizes.

The direction handles' HandleSnap (#494) is now a DrawSnap holding its own
targets (Targets::for_handle) for the drag: one cache, one lookup.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Rust 1.98's clippy adds `chunks_exact_to_as_chunks`, which `-D warnings`
turns into an error, so `cargo xtask ci` fails on main with the current
stable toolchain. The EPS stencil-mask loop and the cursor rasterizer
(and two cursor tests) now use `as_chunks`, which yields fixed-size
arrays; like `chunks_exact`, it skips an incomplete last chunk, so
nothing changes in behaviour.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…to-top with em box centre alignment

# Conflicts:
#	ROADMAP.md
The drawing language is process-wide, so a Japanese frame translated the
tests running beside it (Appearance, Attributes, menus). The test now
checks that each frame hands the engine its language without leaving
English.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…gons, pen paths)

# Conflicts:
#	ROADMAP.md
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…tion tool does

# Conflicts:
#	ROADMAP.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

4 participants