Turn any idea, plan, or codebase into a beautiful interactive diagram. An agent skill for Claude Code, Codex, and more.
HTML agent-skillsai-agentsarchitecture-diagramclaude-codeclaude-skillscodexcoding-agentsdeepseek-harnessdeveloper-toolsdiagramsdiagrams-as-codedsh-pluginflowchartllmmermaidopencodesequence-diagramsoftware-architecturesystem-designvisualization
test(sequence): a wrapped legacy legend now fits below its content
tt-a1i06c4c2036735
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 00ae0cce..07834f12 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -8,7 +8,7 @@ All notable changes are documented here. Format loosely follows [Keep a Changelo- **Lifecycle schema v2.** New lifecycle diagrams render one row per lane on a shared `col` 0–4 grid, so a state placed under the state it leaves gets a straight transition. The renderer sizes the canvas, widens column gaps for same-row labels, opens row gaps for the tracks their routes need, and routes automatic transitions with a dedicated orthogonal grid router (parallel reciprocal pairs, crossing-minimized tracks, corridor and outer-loop detours). Row titles move to a vertical left gutter, the implied phase rail is replaced by authored transitions, and state text is one step larger. Schema v1 files keep their exact state geometry.- **Lifecycle marks and legend.** Start states get a UML initial marker and states without outgoing transitions a double border, both explained in the legend; decision no longer shares failure's red, and success is green. The lifecycle type sigil moves to the top-left like every other mode.-- **Sequence legend matches the drawing.** Lifelines stop above the legend instead of running through it, message labels take their line's legend color (gray lines keep readable muted text), and the legend names the emphasis variant "main request" / "主路径请求" and the default variant "message" / "普通消息".+- **Sequence legend matches the drawing.** The legend sits 12px below all timeline content and may wrap into that room (an auto-sized canvas grows for it; a too-short authored showcase canvas fails with the exact height), lifelines stop above the legend instead of running through it, message labels take their line's legend color (gray lines keep readable muted text), and the legend names the emphasis variant "main request" / "主路径请求" and the default variant "message" / "普通消息".- **Readable source badges.** The Viewer's source badge is larger, fully opaque, sized to its text, and placed left of the brand mark; lifecycle, workflow, and data-flow label layout now reserve its width, so it no longer covers sigils or labels.- Showcase sequence message names use larger primary type and matching label plates; real browser readability checks now include message labels.- **Clearer Architecture layouts.** Authoring defaults now classify each relationship (main path, branch or store, return, second entrance, fan-out) before placement, with a measured side length for fan-out ports. A passing `finalize` receipt with crossings adds node-move `hints`, backed by new `routeReview` evidence (`sharedNode` on crossings, `crowdedSides` when a side faces more neighbours than it has ports); the Skill allows one bounded, position-only repair for crossings. Automatic routing steps fan-out siblings into free parallel channels and reaches a blocked row of neighbours through one vertical side instead of wrapping around it.diff --git a/archify/test/v1-compatibility.test.mjs b/archify/test/v1-compatibility.test.mjsindex 8cbfb527..6b2e7b0b 100644--- a/archify/test/v1-compatibility.test.mjs+++ b/archify/test/v1-compatibility.test.mjs@@ -248,6 +248,13 @@ test('legacy v1 explicit narrow viewBoxes never hard-fail on an implicit auto le// 8 state kinds plus the non-interactive `final` structural entry// (the col-1 states have no outgoing transitions).assert.equal((svg.match(/data-legend-semantic-kind=/g) || []).length, 9);+ } else if (mode === 'sequence') {+ // A sequence legend wraps into the room below its last message; it stays+ // clear of that content instead of being dropped.+ assert.match(svg, />Legend</, 'a wrapped implicit legend that fits below the content remains visible');+ const title = Number(svg.match(/<text x="[\d.]+" y="([\d.]+)"[^>]*>Legend<\/text>/)[1]);+ const lastMessage = Math.max(...doc.messages.map((message) => message.y));+ assert.ok(title - 12 >= lastMessage + 6 + 12, `legend title ${title} must clear the last message at ${lastMessage}`);} else {assert.doesNotMatch(svg, />Legend</, `${mode}: an unfit implicit legend should degrade without overlap`);}