Skip to content

fix(v6.52.4): canvas text is readable (ADR-260) - #317

Merged
cgbarlow merged 1 commit into
mainfrom
fix/canvas-text-readable
Oct 5, 2026
Merged

cgbarlow merged 1 commit into
mainfrom
fix/canvas-text-readable

Conversation

@cgbarlow

@cgbarlow cgbarlow commented Oct 5, 2026 •

Copy link
Copy Markdown
Owner

Fixes #315.

Problem

Canvases built through MCP stored the right JSON but rendered with unreadable notes, cut-off titles, empty UML classes and collapsed boundaries. The MCP tool descriptions did not say which keys the canvas reads.

Fix

# Item Change
1 Notes Note text is 12px. The header was 9px. A visual.fontSize override still wins, and the header scales with it.
2 Titles A title wraps to three lines instead of one, then clips. Every title carries the full name as a tooltip, including UML and ArchiMate titles.
3 UML classes The creation prompts ask for data.attributes and data.operations. normalize_canvas_data lifts data.compartments into those keys on save, on read and in patch_diagram, so existing diagrams are fixed when opened, with no data migration. Hydration no longer wipes node-level members the element does not define.
4 Boundaries A boundary keeps its stored height on load. Other nodes are still measured from their content.
5 Edge labels create_diagram, update_diagram and patch_diagram share one block of guidance: node size rules, class member keys, and data.label, data.labelOffsetX, data.labelOffsetY, data.waypoints.

ADR-260, SPEC-260-A, changelog, user guide section, and version bump to 6.52.4. No schema change, no new endpoint.

Not done

  • Automatic nudging of an edge label off a node (the issue marked it optional). It needs a collision-avoidance design of its own. The offset and waypoint keys are now documented, so an author can place the label.

Behaviour to know about

  • A node with a long title is now taller, because the title wraps. A dense diagram may need its nodes spaced out. The GEANZ "no overlapping boxes" spec still passes.
  • If an element stops defining a member key (for example its last attribute is removed), a copy stored on a canvas node keeps showing until that diagram is edited. An empty list on the element clears it. This is the trade-off for keeping node-level members; ADR-260 records it.

Tests

  • New Playwright spec canvas-text-readable.spec.ts against the running app: note font sizes of 12px or more, a wrapped title with its tooltip, a boundary at 520 by 300, and class members shown for both member shapes after hydration. The compartments case failed before the backend change.
  • Backend: 15 new tests for the member lift (create, read of an existing diagram, patch_diagram) and the prompt keys. All 15 failed before the change.
  • Frontend unit: 19 new tests. MCP: 13 new tests.
  • Existing canvas specs pass: GEANZ render fidelity, GEANZ at scale (no overlapping boxes), dynamic list, mobile read-only canvas.
  • Suites: backend 2264 passed and 9 skipped (full run), frontend vitest 1348 passed, MCP 305 passed, CLI 72 passed. svelte-check: 167 errors, the same as main. Surface parity and genericness scripts: clean.

🤖 Generated with Claude Code

https://claude.ai/code/session_01CGz89TSr9RHvWuGQtgcjFv

Canvases built through MCP stored the right JSON but rendered with
unreadable notes, cut-off titles, empty UML classes and collapsed
boundaries.

- Notes: 12px text (the header was 9px).
- Titles: wrap to three lines instead of one, with the full name as a
  tooltip.
- UML classes: the creation prompts now ask for data.attributes and
  data.operations. normalize_canvas_data lifts data.compartments into
  those keys on save and on read, and keeps the data keys of a flat
  node. Hydration no longer wipes node-level members the element does
  not define.
- Boundaries: keep their stored height on load.
- MCP: create_diagram, update_diagram and patch_diagram describe the
  node size rules, the class member keys and the edge label and
  waypoint keys.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01CGz89TSr9RHvWuGQtgcjFv
@cgbarlow
cgbarlow merged commit 37871c5 into main Oct 5, 2026
2 checks passed
@cgbarlow
cgbarlow deleted the fix/canvas-text-readable branch October 5, 2026 04:51
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.

Canvas text hidden or unreadable: note font size, one-line titles, UML compartments, boundary size, edge labels

1 participant