Skip to content

Fix exported SVG canvas bounds - #1134

Merged
raphael merged 1 commit into
mainfrom
fix/svg-export-label-bounds
Aug 20, 2026
Merged

Fix exported SVG canvas bounds#1134
raphael merged 1 commit into
mainfrom
fix/svg-export-label-bounds

Conversation

@raphael

@raphael raphael commented Aug 20, 2026

Copy link
Copy Markdown
Member

Problem

MDL validated complete node, route, and relationship-label geometry, then ignored those checked bounds while exporting. A second approximate calculation could produce a smaller SVG canvas and clip labels at the bottom or right edge.

AURA exposed the failure: its Automation label ended near y=1469 in an SVG whose height was 1417, and its Chat Lifecycle label ended near y=638 in an SVG whose height was 554.

Fix

SVG export now uses the complete bounds that already passed geometry validation and adds the existing 50px outer padding. It no longer recomputes an approximate canvas from mutable nodes and edge text.

Diagram positions, routes, Model DSL, saved manual layouts, and interactive viewport sizing are unchanged.

Validation

  • Added a browser assertion that exported dimensions equal validated dimensions
  • Added a browser check that every relationship-label box is inside the root SVG
  • pnpm test — 20 tests passed
  • pnpm exec tsc --noEmit
  • CHROME_BIN="/Applications/Google Chrome.app/Contents/MacOS/Google Chrome" go test ./...
  • Rendered all 11 AURA views with the fixed binary
  • Reviewed exact-size screenshots of Automation, Chat Lifecycle, Routine Authoring, and Tool Providers; all formerly clipped labels are fully visible

Use the validated complete layout when sizing exported files so routed relationship labels cannot be clipped by a second approximate bounds calculation.
@raphael
raphael merged commit 380d5a0 into main Aug 20, 2026
3 checks passed
@raphael
raphael deleted the fix/svg-export-label-bounds branch August 20, 2026 21:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant