Skip to content

Turn any idea, plan, or codebase into a beautiful interactive diagram. An agent skill for Claude Code, Codex, and more.

fix(sequence): keep lifelines out of the legend and match label colors

tt-a1id0223da881e1
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 3cacff10..00ae0cce 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -8,6 +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" / "普通消息".
- **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.zip b/archify.zip
index 19ade230..96e4a623 100644
Binary files a/archify.zip and b/archify.zip differ
diff --git a/archify/examples/locales/de.json b/archify/examples/locales/de.json
index d73c3af9..9fd47a59 100644
--- a/archify/examples/locales/de.json
+++ b/archify/examples/locales/de.json
@@ -27,11 +27,11 @@
"legend.workflow.database": "Kontext / Trace",
"legend.workflow.cloud": "Cloud-Dienst",
"legend.workflow.external": "Externes System",
- "legend.sequence.emphasis": "Anfrage",
+ "legend.sequence.emphasis": "Hauptanfrage",
"legend.sequence.return": "Rückgabe",
"legend.sequence.security": "Sicherheit",
"legend.sequence.dashed": "asynchroner Trace",
- "legend.sequence.default": "Standardnachricht",
+ "legend.sequence.default": "Nachricht",
"legend.dataflow.emphasis": "Primärdaten",
"legend.dataflow.security": "Richtlinie / PII",
"legend.dataflow.dashed": "asynchroner Batch",
diff --git a/archify/examples/locales/es.json b/archify/examples/locales/es.json
index bc5e8b74..4f20b09b 100644
--- a/archify/examples/locales/es.json
+++ b/archify/examples/locales/es.json
@@ -27,11 +27,11 @@
"legend.workflow.database": "Contexto / traza",
"legend.workflow.cloud": "Servicio en la nube",
"legend.workflow.external": "Sistema externo",
- "legend.sequence.emphasis": "solicitud",
+ "legend.sequence.emphasis": "solicitud principal",
"legend.sequence.return": "respuesta",
"legend.sequence.security": "seguridad",
"legend.sequence.dashed": "traza asíncrona",
- "legend.sequence.default": "mensaje por defecto",
+ "legend.sequence.default": "mensaje",
"legend.dataflow.emphasis": "datos primarios",
"legend.dataflow.security": "política / PII",
"legend.dataflow.dashed": "lote asíncrono",
diff --git a/archify/examples/locales/fr.json b/archify/examples/locales/fr.json
index 69a1e1bb..d9b1e8d9 100644
--- a/archify/examples/locales/fr.json
+++ b/archify/examples/locales/fr.json
@@ -27,11 +27,11 @@
"legend.workflow.database": "Contexte / trace",
"legend.workflow.cloud": "Service cloud",
"legend.workflow.external": "Système externe",
- "legend.sequence.emphasis": "requête",
+ "legend.sequence.emphasis": "requête principale",
"legend.sequence.return": "retour",
"legend.sequence.security": "sécurité",
"legend.sequence.dashed": "trace asynchrone",
- "legend.sequence.default": "message par défaut",
+ "legend.sequence.default": "message",
"legend.dataflow.emphasis": "donnée principale",
"legend.dataflow.security": "politique / PII",
"legend.dataflow.dashed": "lot asynchrone",
diff --git a/archify/examples/locales/it.json b/archify/examples/locales/it.json
index f38a3f55..37fe4d11 100644
--- a/archify/examples/locales/it.json
+++ b/archify/examples/locales/it.json
@@ -27,11 +27,11 @@
"legend.workflow.database": "Contesto / traccia",
"legend.workflow.cloud": "Servizio cloud",
"legend.workflow.external": "Sistema esterno",
- "legend.sequence.emphasis": "richiesta",
+ "legend.sequence.emphasis": "richiesta principale",
"legend.sequence.return": "risposta",
"legend.sequence.security": "sicurezza",
"legend.sequence.dashed": "traccia asincrona",
- "legend.sequence.default": "messaggio predefinito",
+ "legend.sequence.default": "messaggio",
"legend.dataflow.emphasis": "dati primari",
"legend.dataflow.security": "criterio / PII",
"legend.dataflow.dashed": "batch asincrono",
diff --git a/archify/examples/locales/ja.json b/archify/examples/locales/ja.json
index 2231d8a7..e74d3466 100644
--- a/archify/examples/locales/ja.json
+++ b/archify/examples/locales/ja.json
@@ -27,11 +27,11 @@
"legend.workflow.database": "コンテキスト / トレース",
"legend.workflow.cloud": "クラウドサービス",
"legend.workflow.external": "外部システム",
- "legend.sequence.emphasis": "リクエスト",
+ "legend.sequence.emphasis": "主要リクエスト",
"legend.sequence.return": "戻り値",
"legend.sequence.security": "セキュリティ",
"legend.sequence.dashed": "非同期トレース",
- "legend.sequence.default": "デフォルトメッセージ",
+ "legend.sequence.default": "メッセージ",
"legend.dataflow.emphasis": "主要データ",
"legend.dataflow.security": "ポリシー / PII",
"legend.dataflow.dashed": "非同期バッチ",
diff --git a/archify/examples/locales/ko.json b/archify/examples/locales/ko.json
index a96a8e7c..9ba33d6a 100644
--- a/archify/examples/locales/ko.json
+++ b/archify/examples/locales/ko.json
@@ -27,11 +27,11 @@
"legend.workflow.database": "컨텍스트 / 추적",
"legend.workflow.cloud": "클라우드 서비스",
"legend.workflow.external": "외부 시스템",
- "legend.sequence.emphasis": "요청",
+ "legend.sequence.emphasis": "주요 요청",
"legend.sequence.return": "반환",
"legend.sequence.security": "보안",
"legend.sequence.dashed": "비동기 추적",
- "legend.sequence.default": "기본 메시지",
+ "legend.sequence.default": "메시지",
"legend.dataflow.emphasis": "주요 데이터",
"legend.dataflow.security": "정책 / PII",
"legend.dataflow.dashed": "비동기 배치",
diff --git a/archify/examples/locales/pt.json b/archify/examples/locales/pt.json
index 171ae611..e48a8712 100644
--- a/archify/examples/locales/pt.json
+++ b/archify/examples/locales/pt.json
@@ -27,11 +27,11 @@
"legend.workflow.database": "Contexto / rastreamento",
"legend.workflow.cloud": "Serviço de nuvem",
"legend.workflow.external": "Sistema externo",
- "legend.sequence.emphasis": "solicitação",
+ "legend.sequence.emphasis": "solicitação principal",
"legend.sequence.return": "retorno",
"legend.sequence.security": "segurança",
"legend.sequence.dashed": "rastreamento assíncrono",
- "legend.sequence.default": "mensagem padrão",
+ "legend.sequence.default": "mensagem",
"legend.dataflow.emphasis": "dado principal",
"legend.dataflow.security": "política / PII",
"legend.dataflow.dashed": "lote assíncrono",
diff --git a/archify/examples/locales/ru.json b/archify/examples/locales/ru.json
index 3fd064e1..d86e14f6 100644
--- a/archify/examples/locales/ru.json
+++ b/archify/examples/locales/ru.json
@@ -27,11 +27,11 @@
"legend.workflow.database": "Контекст / трассировка",
"legend.workflow.cloud": "Облачный сервис",
"legend.workflow.external": "Внешняя система",
- "legend.sequence.emphasis": "запрос",
+ "legend.sequence.emphasis": "основной запрос",
"legend.sequence.return": "возврат",
"legend.sequence.security": "безопасность",
"legend.sequence.dashed": "асинхронная трассировка",
- "legend.sequence.default": "обычное сообщение",
+ "legend.sequence.default": "сообщение",
"legend.dataflow.emphasis": "основные данные",
"legend.dataflow.security": "политика / ПДн",
"legend.dataflow.dashed": "асинхронный пакет",
diff --git a/archify/examples/sequence-cache-miss-request.html b/archify/examples/sequence-cache-miss-request.html
index 5d288365..bc6732ba 100644
--- a/archify/examples/sequence-cache-miss-request.html
+++ b/archify/examples/sequence-cache-miss-request.html
@@ -5015,13 +5015,13 @@ OTHER DEALINGS IN THE FONT SOFTWARE.
<rect data-graph-role="structural-frame" data-composition-frame-kind="segment" data-composition-frame-id="2" x="48" y="380" width="984" height="100" rx="10" class="c-lane" stroke-width="1"/>
<!-- Lifelines -->
- <path d="M 118.5 142 L 118.5 495" class="a-default" stroke-width="0.8" stroke-dasharray="3,7"/>
- <path d="M 262.66666666666663 142 L 262.66666666666663 495" class="a-default" stroke-width="0.8" stroke-dasharray="3,7"/>
- <path d="M 406.8333333333333 142 L 406.8333333333333 495" class="a-default" stroke-width="0.8" stroke-dasharray="3,7"/>
- <path d="M 551 142 L 551 495" class="a-default" stroke-width="0.8" stroke-dasharray="3,7"/>
- <path d="M 695.1666666666666 142 L 695.1666666666666 495" class="a-default" stroke-width="0.8" stroke-dasharray="3,7"/>
- <path d="M 839.3333333333333 142 L 839.3333333333333 495" class="a-default" stroke-width="0.8" stroke-dasharray="3,7"/>
- <path d="M 983.5 142 L 983.5 495" class="a-default" stroke-width="0.8" stroke-dasharray="3,7"/>
+ <path d="M 118.5 142 L 118.5 474" class="a-default" stroke-width="0.8" stroke-dasharray="3,7"/>
+ <path d="M 262.66666666666663 142 L 262.66666666666663 474" class="a-default" stroke-width="0.8" stroke-dasharray="3,7"/>
+ <path d="M 406.8333333333333 142 L 406.8333333333333 474" class="a-default" stroke-width="0.8" stroke-dasharray="3,7"/>
+ <path d="M 551 142 L 551 474" class="a-default" stroke-width="0.8" stroke-dasharray="3,7"/>
+ <path d="M 695.1666666666666 142 L 695.1666666666666 474" class="a-default" stroke-width="0.8" stroke-dasharray="3,7"/>
+ <path d="M 839.3333333333333 142 L 839.3333333333333 474" class="a-default" stroke-width="0.8" stroke-dasharray="3,7"/>
+ <path d="M 983.5 142 L 983.5 474" class="a-default" stroke-width="0.8" stroke-dasharray="3,7"/>
<!-- Activations -->
<rect x="257.66666666666663" y="180" width="10" height="294" rx="3" class="c-mask"/>
@@ -5042,7 +5042,7 @@ OTHER DEALINGS IN THE FONT SOFTWARE.
<path data-composition-edge-from="user" data-composition-edge-to="web" data-composition-edge-id="open-page" data-composition-points="125.5,160;255.66666666666663,160" d="M 125.5 160 L 255.66666666666663 160" class="a-default" data-animate="edge" style="--step:0" stroke-width="1.4" marker-end="url(#arrowhead)"/>
<g data-detail="context">
<rect x="154.88333333333333" y="140" width="71.4" height="18" rx="3" class="c-mask"/>
- <text x="190.58333333333331" y="150" class="t-backend" font-size="11" text-anchor="middle">open page</text>
+ <text x="190.58333333333331" y="150" class="t-muted" font-size="11" text-anchor="middle">open page</text>
</g>
</g>
@@ -5050,7 +5050,7 @@ OTHER DEALINGS IN THE FONT SOFTWARE.
<path data-composition-edge-from="web" data-composition-edge-to="api" data-composition-edge-id="dashboard-request" data-composition-points="269.66666666666663,185;399.8333333333333,185" d="M 269.66666666666663 185 L 399.8333333333333 185" class="a-emphasis" data-animate="edge" style="--step:1" stroke-width="1.8" marker-end="url(#arrowhead-emphasis)"/>
<g data-detail="context">
<rect x="282.55" y="165" width="104.39999999999999" height="18" rx="3" class="c-mask"/>
- <text x="334.75" y="175" class="t-backend" font-size="11" text-anchor="middle">GET /dashboard</text>
+ <text x="334.75" y="175" class="t-edge-emphasis" font-size="11" text-anchor="middle">GET /dashboard</text>
</g>
</g>
@@ -5058,7 +5058,7 @@ OTHER DEALINGS IN THE FONT SOFTWARE.
<path data-composition-edge-from="api" data-composition-edge-to="auth" data-composition-edge-id="verify-jwt" data-composition-points="413.8333333333333,210;544,210" d="M 413.8333333333333 210 L 544 210" class="a-security" data-animate="edge" style="--step:2" stroke-width="1.4" marker-end="url(#arrowhead-security)"/>
<g data-detail="context">
<rect x="439.91666666666663" y="190" width="78" height="18" rx="3" class="c-mask"/>
- <text x="478.91666666666663" y="200" class="t-security" font-size="11" text-anchor="middle">verify JWT</text>
+ <text x="478.91666666666663" y="200" class="t-edge-security" font-size="11" text-anchor="middle">verify JWT</text>
</g>
</g>
@@ -5074,7 +5074,7 @@ OTHER DEALINGS IN THE FONT SOFTWARE.
<path data-composition-edge-from="api" data-composition-edge-to="redis" data-composition-edge-id="cache-read" data-composition-points="413.8333333333333,270;688.1666666666666,270" d="M 413.8333333333333 270 L 688.1666666666666 270" class="a-default" data-animate="edge" style="--step:4" stroke-width="1.4" marker-end="url(#arrowhead)"/>
<g data-detail="context">
<rect x="512" y="250" width="78" height="18" rx="3" class="c-mask"/>
- <text x="551" y="260" class="t-backend" font-size="11" text-anchor="middle">read cache</text>
+ <text x="551" y="260" class="t-muted" font-size="11" text-anchor="middle">read cache</text>
</g>
</g>
@@ -5090,7 +5090,7 @@ OTHER DEALINGS IN THE FONT SOFTWARE.
<path data-composition-edge-from="api" data-composition-edge-to="db" data-composition-edge-id="profile-query" data-composition-points="413.8333333333333,330;832.3333333333333,330" d="M 413.8333333333333 330 L 832.3333333333333 330" class="a-emphasis" data-animate="edge" style="--step:6" stroke-width="1.8" marker-end="url(#arrowhead-emphasis)"/>
<g data-detail="context">
<rect x="541.1833333333333" y="310" width="163.79999999999998" height="18" rx="3" class="c-mask"/>
- <text x="623.0833333333333" y="320" class="t-backend" font-size="11" text-anchor="middle">query profile + metrics</text>
+ <text x="623.0833333333333" y="320" class="t-edge-emphasis" font-size="11" text-anchor="middle">query profile + metrics</text>
</g>
</g>
@@ -5106,7 +5106,7 @@ OTHER DEALINGS IN THE FONT SOFTWARE.
<path data-composition-edge-from="api" data-composition-edge-to="redis" data-composition-edge-id="cache-write" data-composition-points="413.8333333333333,390;688.1666666666666,390" d="M 413.8333333333333 390 L 688.1666666666666 390" class="a-dashed" data-animate="edge" style="--step:8" stroke-width="1.4" marker-end="url(#arrowhead-dashed)"/>
<g data-detail="context">
<rect x="515.3" y="370" width="71.4" height="18" rx="3" class="c-mask"/>
- <text x="551" y="380" class="t-messagebus" font-size="11" text-anchor="middle">set cache</text>
+ <text x="551" y="380" class="t-edge-dashed" font-size="11" text-anchor="middle">set cache</text>
</g>
</g>
@@ -5114,7 +5114,7 @@ OTHER DEALINGS IN THE FONT SOFTWARE.
<path data-composition-edge-from="api" data-composition-edge-to="trace" data-composition-edge-id="trace-emit" data-composition-points="413.8333333333333,418;976.5,418" d="M 413.8333333333333 418 L 976.5 418" class="a-dashed" data-animate="edge" style="--step:9" stroke-width="1.4" marker-end="url(#arrowhead-dashed)"/>
<g data-detail="context">
<rect x="656.1666666666666" y="398" width="78" height="18" rx="3" class="c-mask"/>
- <text x="695.1666666666666" y="408" class="t-messagebus" font-size="11" text-anchor="middle">emit trace</text>
+ <text x="695.1666666666666" y="408" class="t-edge-dashed" font-size="11" text-anchor="middle">emit trace</text>
</g>
</g>
@@ -5239,25 +5239,25 @@ OTHER DEALINGS IN THE FONT SOFTWARE.
<!-- Legend -->
<g data-legend="">
<text x="40" y="486" class="t-primary" font-size="12" font-weight="650">Legend</text>
- <g data-legend-semantic-kind="emphasis" data-legend-x="40" data-legend-baseline="506" data-legend-width="78">
+ <g data-legend-semantic-kind="emphasis" data-legend-x="40" data-legend-baseline="506" data-legend-width="103">
<path d="M 40 503 L 74 503" class="a-emphasis" stroke-width="1.8" marker-end="url(#arrowhead-emphasis)"/>
- <text x="83" y="506" class="t-muted" font-size="10" font-weight="500">request</text>
+ <text x="83" y="506" class="t-muted" font-size="10" font-weight="500">main request</text>
</g>
- <g data-legend-semantic-kind="return" data-legend-x="140" data-legend-baseline="506" data-legend-width="73">
- <path d="M 140 503 L 174 503" class="a-default" stroke-width="1.4" stroke-dasharray="3,5" marker-end="url(#arrowhead)"/>
- <text x="183" y="506" class="t-muted" font-size="10" font-weight="500">return</text>
+ <g data-legend-semantic-kind="return" data-legend-x="165" data-legend-baseline="506" data-legend-width="73">
+ <path d="M 165 503 L 199 503" class="a-default" stroke-width="1.4" stroke-dasharray="3,5" marker-end="url(#arrowhead)"/>
+ <text x="208" y="506" class="t-muted" font-size="10" font-weight="500">return</text>
</g>
- <g data-legend-semantic-kind="security" data-legend-x="235" data-legend-baseline="506" data-legend-width="83">
- <path d="M 235 503 L 269 503" class="a-security" stroke-width="1.4" marker-end="url(#arrowhead-security)"/>
- <text x="278" y="506" class="t-muted" font-size="10" font-weight="500">security</text>
+ <g data-legend-semantic-kind="security" data-legend-x="260" data-legend-baseline="506" data-legend-width="83">
+ <path d="M 260 503 L 294 503" class="a-security" stroke-width="1.4" marker-end="url(#arrowhead-security)"/>
+ <text x="303" y="506" class="t-muted" font-size="10" font-weight="500">security</text>
</g>
- <g data-legend-semantic-kind="dashed" data-legend-x="340" data-legend-baseline="506" data-legend-width="98">
- <path d="M 340 503 L 374 503" class="a-dashed" stroke-width="1.4" marker-end="url(#arrowhead-dashed)"/>
- <text x="383" y="506" class="t-muted" font-size="10" font-weight="500">async trace</text>
+ <g data-legend-semantic-kind="dashed" data-legend-x="365" data-legend-baseline="506" data-legend-width="98">
+ <path d="M 365 503 L 399 503" class="a-dashed" stroke-width="1.4" marker-end="url(#arrowhead-dashed)"/>
+ <text x="408" y="506" class="t-muted" font-size="10" font-weight="500">async trace</text>
</g>
- <g data-legend-semantic-kind="default" data-legend-x="460" data-legend-baseline="506" data-legend-width="118">
- <path d="M 460 503 L 494 503" class="a-default" stroke-width="1.4" marker-end="url(#arrowhead)"/>
- <text x="503" y="506" class="t-muted" font-size="10" font-weight="500">default message</text>
+ <g data-legend-semantic-kind="default" data-legend-x="485" data-legend-baseline="506" data-legend-width="78">
+ <path d="M 485 503 L 519 503" class="a-default" stroke-width="1.4" marker-end="url(#arrowhead)"/>
+ <text x="528" y="506" class="t-muted" font-size="10" font-weight="500">message</text>
</g>
</g>
</svg>
diff --git a/archify/renderers/sequence/render-sequence.mjs b/archify/renderers/sequence/render-sequence.mjs
index 7d949323..96ad96a4 100644
--- a/archify/renderers/sequence/render-sequence.mjs
+++ b/archify/renderers/sequence/render-sequence.mjs
@@ -3,8 +3,8 @@ import { fileURLToPath } from 'node:url';
import { esc, renderDefinitions, renderSemanticSigil, textUnits } from '../shared/utils.mjs';
import { animateAttr, focusEdgeAttrs, focusNodeAttrs, focusNodeTitle, loadDiagramWithBrandMarks, writeDiagram, svgAccessibleText, svgRootAttrs } from '../shared/cli.mjs';
import { throwDiagnosticProblems } from '../shared/diagnostics.mjs';
-import { resolveLegend, renderLegend as renderResolvedLegend } from '../shared/legend.mjs';
-import { componentFill, arrowClassMap, rectsOverlap, cleanFlowProblems, cleanCrossingProblems, cleanAmbiguousCorridorProblems, cleanBorderRunProblems, cleanRouteRhythmProblems, cleanLabelRouteClearanceProblems, cleanLabelCanvasContainmentProblems, routePointsValue, asArray, isFinitePoint } from '../shared/geometry.mjs';
+import { measureLegend, resolveLegend, renderLegend as renderResolvedLegend } from '../shared/legend.mjs';
+import { componentFill, arrowClassMap, rectsOverlap, cleanFlowProblems, cleanCrossingProblems, cleanAmbiguousCorridorProblems, cleanBorderRunProblems, cleanRouteRhythmProblems, cleanLabelRouteClearanceProblems, cleanLabelCanvasContainmentProblems, routePointsValue, asArray, isFinitePoint, edgeLabelAccent } from '../shared/geometry.mjs';
import { availableNodeTextWidth, fittedNodeFontSize, minimumNodeTextWidth } from '../shared/text-fit.mjs';
import { brandLabelFitWidth, brandMetadataFor, brandTopRailProblem, renderBrandMark } from '../shared/brand-marks.mjs';
import { translateMessage as i18nText } from '../shared/i18n.mjs';
@@ -348,8 +348,22 @@ function renderParticipant(participant) {
</g>`;
}
-function renderLifeline(participant) {
- return ` <path d="M ${participant.cx} ${layout.lifelineTop} L ${participant.cx} ${layout.lifelineBottom}" class="a-default" stroke-width="0.8" stroke-dasharray="3,7"/>`;
+// Lifelines are drawn only to the timeline's content, and never into the
+// legend band below it. The authored timeline bounds used by validation stay
+// unchanged; only the drawn guide is shortened.
+function lifelineEnd() {
+ const contentBottom = Math.max(
+ layout.lifelineTop,
+ ...asArray(sequence.messages).map((message) => message.y + (message.note ? 22 : 6)),
+ ...asArray(sequence.activations).map((activation) => activation.to),
+ );
+ const legend = measureLegend(legendEntries(), legendLayout());
+ const legendTop = legend?.titleY == null ? Infinity : legend.titleY - 22;
+ return Math.max(Math.min(layout.lifelineBottom, legendTop), contentBottom);
+}
+
+function renderLifeline(participant, end) {
+ return ` <path d="M ${participant.cx} ${layout.lifelineTop} L ${participant.cx} ${end}" class="a-default" stroke-width="0.8" stroke-dasharray="3,7"/>`;
}
function renderSegment(segment, index) {
@@ -378,13 +392,9 @@ function messageLabel(message, x1, x2) {
const center = box ? box.x + box.width / 2 : (x1 + x2) / 2;
const y = message.y - 10;
const labelW = box?.width || Math.max(34, textUnits(message.label) * messageUnitWidth + 12);
- const accent = message.variant === 'security'
- ? 't-security'
- : message.variant === 'dashed'
- ? 't-messagebus'
- : message.variant === 'return'
- ? 't-muted'
- : 't-backend';
+ // A colored line gets a label in the same color, as in the legend swatches.
+ // Gray lines (default and return) keep the readable muted text color.
+ const accent = ['emphasis', 'security', 'dashed'].includes(message.variant) ? edgeLabelAccent(message.variant) : 't-muted';
return ` <g data-detail="context">
<rect x="${center - labelW / 2}" y="${y - 10}" width="${labelW}" height="${layout.labelH}" rx="3" class="c-mask"/>
<text x="${center}" y="${y}" class="${accent}" font-size="${messageFontSize}" text-anchor="middle">${esc(message.label)}</text>
@@ -419,20 +429,27 @@ const LEGEND_CATALOG = [
label: i18nText(sequence.meta.locale, `legend.sequence.${entry.kind}`),
}));
-function renderLegend() {
+function legendEntries() {
const presentKinds = new Set(asArray(sequence.messages).map((message) => message.variant || 'default'));
- const entries = resolveLegend(sequence.meta?.legend, LEGEND_CATALOG, presentKinds);
+ return resolveLegend(sequence.meta?.legend, LEGEND_CATALOG, presentKinds);
+}
+
+function legendLayout() {
+ return {
+ x: 40,
+ baselineY: layout.legendY,
+ width: viewBox[0] - 80,
+ minTitleY: layout.legendY - 30,
+ unfit: sequence.meta?.legend === undefined ? 'hide' : 'error',
+ diagramType: 'sequence',
+ };
+}
+
+function renderLegend() {
return renderResolvedLegend({
- entries,
+ entries: legendEntries(),
locale: sequence.meta.locale,
- layout: {
- x: 40,
- baselineY: layout.legendY,
- width: viewBox[0] - 80,
- minTitleY: layout.legendY - 30,
- unfit: sequence.meta?.legend === undefined ? 'hide' : 'error',
- diagramType: 'sequence',
- },
+ layout: legendLayout(),
renderSwatch: (entry) => `<path d="M ${entry.x} ${entry.baseline - 3} L ${entry.x + 34} ${entry.baseline - 3}" class="${entry.className}" stroke-width="${entry.strokeWidth || 1.4}"${entry.dash ? ` stroke-dasharray="${entry.dash}"` : ''} marker-end="url(#${entry.marker})"/>`,
});
}
@@ -454,7 +471,7 @@ ${renderDefinitions()}
${asArray(sequence.segments).map(renderSegment).join('\n\n')}
<!-- Lifelines -->
-${participantList.map(renderLifeline).join('\n')}
+${participantList.map((participant) => renderLifeline(participant, lifelineEnd())).join('\n')}
<!-- Activations -->
${asArray(sequence.activations).map(renderActivation).join('\n')}
diff --git a/archify/renderers/shared/i18n.mjs b/archify/renderers/shared/i18n.mjs
index 6729ad7c..09f3879a 100644
--- a/archify/renderers/shared/i18n.mjs
+++ b/archify/renderers/shared/i18n.mjs
@@ -41,11 +41,11 @@ const MESSAGE_PAIRS = {
'legend.workflow.database': ['Context / trace', '上下文 / 追踪'],
'legend.workflow.cloud': ['Cloud service', '云服务'],
'legend.workflow.external': ['External system', '外部系统'],
- 'legend.sequence.emphasis': ['request', '请求'],
+ 'legend.sequence.emphasis': ['main request', '主路径请求'],
'legend.sequence.return': ['return', '返回'],
'legend.sequence.security': ['security', '安全'],
'legend.sequence.dashed': ['async trace', '异步追踪'],
- 'legend.sequence.default': ['default message', '默认消息'],
+ 'legend.sequence.default': ['message', '普通消息'],
'legend.dataflow.emphasis': ['primary data', '主要数据'],
'legend.dataflow.security': ['policy / PII', '策略 / PII'],
'legend.dataflow.dashed': ['async batch', '异步批处理'],
diff --git a/archify/test/edge-label-color.test.mjs b/archify/test/edge-label-color.test.mjs
index 4b404c4f..57923ec1 100644
--- a/archify/test/edge-label-color.test.mjs
+++ b/archify/test/edge-label-color.test.mjs
@@ -100,6 +100,32 @@ test('edge labels use the same variant color contract as their paths in every sh
}
});
+test('sequence message labels match their line color and lifelines stop above the legend', () => {
+ const source = JSON.parse(fs.readFileSync(path.join(skillRoot, 'examples/cache-miss-request.sequence.json'), 'utf8'));
+ const variants = ['emphasis', 'security', 'dashed', 'default', 'return'];
+ variants.forEach((variant, index) => {
+ Object.assign(source.messages[index], { id: `message-${variant}`, variant, label: `M${index}` });
+ });
+ const input = path.join(tmp, 'sequence-labels.json');
+ const output = path.join(tmp, 'sequence-labels.html');
+ fs.writeFileSync(input, JSON.stringify(source));
+ const result = spawnSync(process.execPath, [cli, 'render', 'sequence', input, output], { cwd: skillRoot, encoding: 'utf8' });
+ assert.equal(result.status, 0, result.stderr || result.stdout);
+ const html = fs.readFileSync(output, 'utf8');
+ variants.forEach((variant, index) => {
+ // Colored lines share their color with the label; gray lines keep the
+ // readable muted text color.
+ const expected = ['default', 'return'].includes(variant) ? 't-muted' : `t-edge-${variant}`;
+ assert.equal(classForLabel(html, `message-${variant}`, `M${index}`), expected, variant);
+ });
+ const legendTitle = Number(html.match(/<text x="[\d.]+" y="([\d.]+)"[^>]*>Legend<\/text>/)[1]);
+ const lifelineEnds = [...html.matchAll(/<path d="M ([\d.]+) 142 L \1 ([\d.]+)" class="a-default" stroke-width="0.8" stroke-dasharray="3,7"\/>/g)]
+ .map((match) => Number(match[2]));
+ assert.ok(lifelineEnds.length > 0, 'lifelines rendered');
+ // Legend title glyphs start about 12px above their baseline.
+ for (const end of lifelineEnds) assert.ok(end <= legendTitle - 12, `lifeline ends at ${end}, legend title at ${legendTitle}`);
+});
+
test('edge path and label classes resolve to the same theme token', () => {
const template = fs.readFileSync(path.join(skillRoot, 'assets/template.html'), 'utf8');
for (const variant of VARIANTS) {
diff --git a/docs/gallery.html b/docs/gallery.html
index 65c14c14..f614a390 100644
--- a/docs/gallery.html
+++ b/docs/gallery.html
@@ -357,7 +357,7 @@
<div class="receipt-cell"><span class="receipt-label">Artifact</span><span class="receipt-value ok">9/9 pass</span></div>
<div class="receipt-cell"><span class="receipt-label">Composition</span><span class="receipt-value ok" title="0 crossings · 0 border runs · 0 micro segments · 0 cramped turns">SHOWCASE · PASS</span></div>
<div class="receipt-cell"><span class="receipt-label">Graph</span><span class="receipt-value">7N · 12E</span></div>
- <div class="receipt-cell"><span class="receipt-label">SHA-256</span><span class="receipt-value" title="4afe24a92e267e4d46e60560b2e4d15859e1a6278d3b02635d8c8ac99e2d611e">4afe24a92e26</span></div>
+ <div class="receipt-cell"><span class="receipt-label">SHA-256</span><span class="receipt-value" title="79fff23bd5760dcd1ba126ac0c90ca15691cbaf3615108eaa8050a1db989bc98">79fff23bd576</span></div>
</div>
<div class="card-actions">
<a class="card-link primary" href="gallery/artifacts/cache-miss.sequence.html#focus=redis" target="_blank" rel="noopener" data-en="Explore focus ↗" data-zh="探索聚焦路径 ↗">Explore focus ↗</a>
@@ -473,7 +473,7 @@
<div class="receipt-cell"><span class="receipt-label">Artifact</span><span class="receipt-value ok">9/9 pass</span></div>
<div class="receipt-cell"><span class="receipt-label">Composition</span><span class="receipt-value ok" title="0 crossings · 0 border runs · 0 micro segments · 0 cramped turns">SHOWCASE · PASS</span></div>
<div class="receipt-cell"><span class="receipt-label">Graph</span><span class="receipt-value">7N · 14E</span></div>
- <div class="receipt-cell"><span class="receipt-label">SHA-256</span><span class="receipt-value" title="9b46f19e67c8ebec5ff984dd9f5bc520385c805d53630debb24f224ef3b90b5a">9b46f19e67c8</span></div>
+ <div class="receipt-cell"><span class="receipt-label">SHA-256</span><span class="receipt-value" title="e7e35d76885dc248a50139407ce147b58fb8709c53de68d219391380adf6ae40">e7e35d76885d</span></div>
</div>
<div class="card-actions">
<a class="card-link primary" href="gallery/artifacts/async-job-roundtrip.sequence.html#focus=queue" target="_blank" rel="noopener" data-en="Explore focus ↗" data-zh="探索聚焦路径 ↗">Explore focus ↗</a>
@@ -935,8 +935,8 @@ receipt 99 checks / 11 artifacts / deterministic hashes</pre>
"engineeringProfile": null,
"nodeCount": 7,
"edgeCount": 12,
- "artifactBytes": 759977,
- "artifactSha256": "4afe24a92e267e4d46e60560b2e4d15859e1a6278d3b02635d8c8ac99e2d611e",
+ "artifactBytes": 759989,
+ "artifactSha256": "79fff23bd5760dcd1ba126ac0c90ca15691cbaf3615108eaa8050a1db989bc98",
"sourceBytes": 3805,
"sourceSha256": "f5c2e44f9a44000adc7c3b3040c4fcd88fe50b7cf8761302c21eb0c184e5780a",
"checks": [
@@ -1518,8 +1518,8 @@ receipt 99 checks / 11 artifacts / deterministic hashes</pre>
"engineeringProfile": null,
"nodeCount": 7,
"edgeCount": 14,
- "artifactBytes": 759058,
- "artifactSha256": "9b46f19e67c8ebec5ff984dd9f5bc520385c805d53630debb24f224ef3b90b5a",
+ "artifactBytes": 759076,
+ "artifactSha256": "e7e35d76885dc248a50139407ce147b58fb8709c53de68d219391380adf6ae40",
"sourceBytes": 3766,
"sourceSha256": "b8c6c52f1763ede2933c77deb8da59b3e06917bc41d27e66df896136456b859a",
"checks": [
diff --git a/docs/gallery/artifacts/async-job-roundtrip.sequence.html b/docs/gallery/artifacts/async-job-roundtrip.sequence.html
index 835ee8fb..dadebde6 100644
--- a/docs/gallery/artifacts/async-job-roundtrip.sequence.html
+++ b/docs/gallery/artifacts/async-job-roundtrip.sequence.html
@@ -5015,13 +5015,13 @@ OTHER DEALINGS IN THE FONT SOFTWARE.
<rect data-graph-role="structural-frame" data-composition-frame-kind="segment" data-composition-frame-id="2" x="48" y="554" width="724" height="246" rx="10" class="c-lane" stroke-width="1"/>
<!-- Lifelines -->
- <path d="M 62 142 L 62 855" class="a-default" stroke-width="0.8" stroke-dasharray="3,7"/>
- <path d="M 170 142 L 170 855" class="a-default" stroke-width="0.8" stroke-dasharray="3,7"/>
- <path d="M 278 142 L 278 855" class="a-default" stroke-width="0.8" stroke-dasharray="3,7"/>
- <path d="M 386 142 L 386 855" class="a-default" stroke-width="0.8" stroke-dasharray="3,7"/>
- <path d="M 494 142 L 494 855" class="a-default" stroke-width="0.8" stroke-dasharray="3,7"/>
- <path d="M 602 142 L 602 855" class="a-default" stroke-width="0.8" stroke-dasharray="3,7"/>
- <path d="M 710 142 L 710 855" class="a-default" stroke-width="0.8" stroke-dasharray="3,7"/>
+ <path d="M 62 142 L 62 824" class="a-default" stroke-width="0.8" stroke-dasharray="3,7"/>
+ <path d="M 170 142 L 170 824" class="a-default" stroke-width="0.8" stroke-dasharray="3,7"/>
+ <path d="M 278 142 L 278 824" class="a-default" stroke-width="0.8" stroke-dasharray="3,7"/>
+ <path d="M 386 142 L 386 824" class="a-default" stroke-width="0.8" stroke-dasharray="3,7"/>
+ <path d="M 494 142 L 494 824" class="a-default" stroke-width="0.8" stroke-dasharray="3,7"/>
+ <path d="M 602 142 L 602 824" class="a-default" stroke-width="0.8" stroke-dasharray="3,7"/>
+ <path d="M 710 142 L 710 824" class="a-default" stroke-width="0.8" stroke-dasharray="3,7"/>
<!-- Activations -->
<rect x="165" y="174" width="10" height="98" rx="3" class="c-mask"/>
@@ -5044,7 +5044,7 @@ OTHER DEALINGS IN THE FONT SOFTWARE.
<path data-composition-edge-from="client" data-composition-edge-to="api" data-composition-points="69,180;163,180" d="M 69 180 L 163 180" class="a-emphasis" data-animate="edge" style="--step:0" stroke-width="1.8" marker-end="url(#arrowhead-emphasis)"/>
<g data-detail="context">
<rect x="77" y="160" width="78" height="18" rx="3" class="c-mask"/>
- <text x="116" y="170" class="t-backend" font-size="11" text-anchor="middle">POST /jobs</text>
+ <text x="116" y="170" class="t-edge-emphasis" font-size="11" text-anchor="middle">POST /jobs</text>
</g>
</g>
@@ -5052,7 +5052,7 @@ OTHER DEALINGS IN THE FONT SOFTWARE.
<path data-composition-edge-from="api" data-composition-edge-to="queue" data-composition-points="177,222;271,222" d="M 177 222 L 271 222" class="a-emphasis" data-animate="edge" style="--step:1" stroke-width="1.8" marker-end="url(#arrowhead-emphasis)"/>
<g data-detail="context">
<rect x="181.7" y="202" width="84.6" height="18" rx="3" class="c-mask"/>
- <text x="224" y="212" class="t-backend" font-size="11" text-anchor="middle">enqueue job</text>
+ <text x="224" y="212" class="t-edge-emphasis" font-size="11" text-anchor="middle">enqueue job</text>
</g>
</g>
@@ -5068,7 +5068,7 @@ OTHER DEALINGS IN THE FONT SOFTWARE.
<path data-composition-edge-from="queue" data-composition-edge-to="worker" data-composition-points="285,326;379,326" d="M 285 326 L 379 326" class="a-emphasis" data-animate="edge" style="--step:3" stroke-width="1.8" marker-end="url(#arrowhead-emphasis)"/>
<g data-detail="context">
<rect x="302.9" y="306" width="58.199999999999996" height="18" rx="3" class="c-mask"/>
- <text x="332" y="316" class="t-backend" font-size="11" text-anchor="middle">deliver</text>
+ <text x="332" y="316" class="t-edge-emphasis" font-size="11" text-anchor="middle">deliver</text>
</g>
</g>
@@ -5076,7 +5076,7 @@ OTHER DEALINGS IN THE FONT SOFTWARE.
<path data-composition-edge-from="worker" data-composition-edge-to="provider" data-composition-points="393,368;487,368" d="M 393 368 L 487 368" class="a-default" data-animate="edge" style="--step:4" stroke-width="1.4" marker-end="url(#arrowhead)"/>
<g data-detail="context">
<rect x="394.4" y="348" width="91.19999999999999" height="18" rx="3" class="c-mask"/>
- <text x="440" y="358" class="t-backend" font-size="11" text-anchor="middle">perform work</text>
+ <text x="440" y="358" class="t-muted" font-size="11" text-anchor="middle">perform work</text>
</g>
</g>
@@ -5092,7 +5092,7 @@ OTHER DEALINGS IN THE FONT SOFTWARE.
<path data-composition-edge-from="worker" data-composition-edge-to="queue" data-composition-points="379,452;285,452" d="M 379 452 L 285 452" class="a-dashed" data-animate="edge" style="--step:6" stroke-width="1.4" marker-end="url(#arrowhead-dashed)"/>
<g data-detail="context">
<rect x="273.2" y="432" width="117.6" height="18" rx="3" class="c-mask"/>
- <text x="332" y="442" class="t-messagebus" font-size="11" text-anchor="middle">retry if timeout</text>
+ <text x="332" y="442" class="t-edge-dashed" font-size="11" text-anchor="middle">retry if timeout</text>
</g>
</g>
@@ -5100,7 +5100,7 @@ OTHER DEALINGS IN THE FONT SOFTWARE.
<path data-composition-edge-from="worker" data-composition-edge-to="store" data-composition-points="393,494;595,494" d="M 393 494 L 595 494" class="a-emphasis" data-animate="edge" style="--step:7" stroke-width="1.8" marker-end="url(#arrowhead-emphasis)"/>
<g data-detail="context">
<rect x="425.3" y="474" width="137.39999999999998" height="18" rx="3" class="c-mask"/>
- <text x="494" y="484" class="t-backend" font-size="11" text-anchor="middle">persist final state</text>
+ <text x="494" y="484" class="t-edge-emphasis" font-size="11" text-anchor="middle">persist final state</text>
</g>
</g>
@@ -5108,7 +5108,7 @@ OTHER DEALINGS IN THE FONT SOFTWARE.
<path data-composition-edge-from="worker" data-composition-edge-to="notify" data-composition-points="393,566;703,566" d="M 393 566 L 703 566" class="a-dashed" data-animate="edge" style="--step:8" stroke-width="1.4" marker-end="url(#arrowhead-dashed)"/>
<g data-detail="context">
<rect x="499.1" y="546" width="97.8" height="18" rx="3" class="c-mask"/>
- <text x="548" y="556" class="t-messagebus" font-size="11" text-anchor="middle">job.completed</text>
+ <text x="548" y="556" class="t-edge-dashed" font-size="11" text-anchor="middle">job.completed</text>
</g>
</g>
@@ -5116,7 +5116,7 @@ OTHER DEALINGS IN THE FONT SOFTWARE.
<path data-composition-edge-from="notify" data-composition-edge-to="client" data-composition-points="703,608;69,608" d="M 703 608 L 69 608" class="a-dashed" data-animate="edge" style="--step:9" stroke-width="1.4" marker-end="url(#arrowhead-dashed)"/>
<g data-detail="context">
<rect x="333.8" y="588" width="104.39999999999999" height="18" rx="3" class="c-mask"/>
- <text x="386" y="598" class="t-messagebus" font-size="11" text-anchor="middle">signed webhook</text>
+ <text x="386" y="598" class="t-edge-dashed" font-size="11" text-anchor="middle">signed webhook</text>
</g>
</g>
@@ -5124,7 +5124,7 @@ OTHER DEALINGS IN THE FONT SOFTWARE.
<path data-composition-edge-from="client" data-composition-edge-to="api" data-composition-points="69,650;163,650" d="M 69 650 L 163 650" class="a-default" data-animate="edge" style="--step:10" stroke-width="1.4" marker-end="url(#arrowhead)"/>
<g data-detail="context">
<rect x="67.1" y="630" width="97.8" height="18" rx="3" class="c-mask"/>
- <text x="116" y="640" class="t-backend" font-size="11" text-anchor="middle">GET /jobs/:id</text>
+ <text x="116" y="640" class="t-muted" font-size="11" text-anchor="middle">GET /jobs/:id</text>
</g>
</g>
@@ -5132,7 +5132,7 @@ OTHER DEALINGS IN THE FONT SOFTWARE.
<path data-composition-edge-from="api" data-composition-edge-to="store" data-composition-points="177,692;595,692" d="M 177 692 L 595 692" class="a-default" data-animate="edge" style="--step:11" stroke-width="1.4" marker-end="url(#arrowhead)"/>
<g data-detail="context">
<rect x="343.7" y="672" width="84.6" height="18" rx="3" class="c-mask"/>
- <text x="386" y="682" class="t-backend" font-size="11" text-anchor="middle">read status</text>
+ <text x="386" y="682" class="t-muted" font-size="11" text-anchor="middle">read status</text>
</g>
</g>
@@ -5255,21 +5255,21 @@ OTHER DEALINGS IN THE FONT SOFTWARE.
<!-- Legend -->
<g data-legend="">
<text x="40" y="846" class="t-primary" font-size="12" font-weight="650">Legend</text>
- <g data-legend-semantic-kind="emphasis" data-legend-x="40" data-legend-baseline="866" data-legend-width="78">
+ <g data-legend-semantic-kind="emphasis" data-legend-x="40" data-legend-baseline="866" data-legend-width="103">
<path d="M 40 863 L 74 863" class="a-emphasis" stroke-width="1.8" marker-end="url(#arrowhead-emphasis)"/>
- <text x="83" y="866" class="t-muted" font-size="10" font-weight="500">request</text>
+ <text x="83" y="866" class="t-muted" font-size="10" font-weight="500">main request</text>
</g>
- <g data-legend-semantic-kind="return" data-legend-x="140" data-legend-baseline="866" data-legend-width="73">
- <path d="M 140 863 L 174 863" class="a-default" stroke-width="1.4" stroke-dasharray="3,5" marker-end="url(#arrowhead)"/>
- <text x="183" y="866" class="t-muted" font-size="10" font-weight="500">return</text>
+ <g data-legend-semantic-kind="return" data-legend-x="165" data-legend-baseline="866" data-legend-width="73">
+ <path d="M 165 863 L 199 863" class="a-default" stroke-width="1.4" stroke-dasharray="3,5" marker-end="url(#arrowhead)"/>
+ <text x="208" y="866" class="t-muted" font-size="10" font-weight="500">return</text>
</g>
- <g data-legend-semantic-kind="dashed" data-legend-x="235" data-legend-baseline="866" data-legend-width="98">
- <path d="M 235 863 L 269 863" class="a-dashed" stroke-width="1.4" marker-end="url(#arrowhead-dashed)"/>
- <text x="278" y="866" class="t-muted" font-size="10" font-weight="500">async trace</text>
+ <g data-legend-semantic-kind="dashed" data-legend-x="260" data-legend-baseline="866" data-legend-width="98">
+ <path d="M 260 863 L 294 863" class="a-dashed" stroke-width="1.4" marker-end="url(#arrowhead-dashed)"/>
+ <text x="303" y="866" class="t-muted" font-size="10" font-weight="500">async trace</text>
</g>
- <g data-legend-semantic-kind="default" data-legend-x="355" data-legend-baseline="866" data-legend-width="118">
- <path d="M 355 863 L 389 863" class="a-default" stroke-width="1.4" marker-end="url(#arrowhead)"/>
- <text x="398" y="866" class="t-muted" font-size="10" font-weight="500">default message</text>
+ <g data-legend-semantic-kind="default" data-legend-x="380" data-legend-baseline="866" data-legend-width="78">
+ <path d="M 380 863 L 414 863" class="a-default" stroke-width="1.4" marker-end="url(#arrowhead)"/>
+ <text x="423" y="866" class="t-muted" font-size="10" font-weight="500">message</text>
</g>
</g>
</svg>
diff --git a/docs/gallery/artifacts/cache-miss.sequence.html b/docs/gallery/artifacts/cache-miss.sequence.html
index 5d288365..bc6732ba 100644
--- a/docs/gallery/artifacts/cache-miss.sequence.html
+++ b/docs/gallery/artifacts/cache-miss.sequence.html
@@ -5015,13 +5015,13 @@ OTHER DEALINGS IN THE FONT SOFTWARE.
<rect data-graph-role="structural-frame" data-composition-frame-kind="segment" data-composition-frame-id="2" x="48" y="380" width="984" height="100" rx="10" class="c-lane" stroke-width="1"/>
<!-- Lifelines -->
- <path d="M 118.5 142 L 118.5 495" class="a-default" stroke-width="0.8" stroke-dasharray="3,7"/>
- <path d="M 262.66666666666663 142 L 262.66666666666663 495" class="a-default" stroke-width="0.8" stroke-dasharray="3,7"/>
- <path d="M 406.8333333333333 142 L 406.8333333333333 495" class="a-default" stroke-width="0.8" stroke-dasharray="3,7"/>
- <path d="M 551 142 L 551 495" class="a-default" stroke-width="0.8" stroke-dasharray="3,7"/>
- <path d="M 695.1666666666666 142 L 695.1666666666666 495" class="a-default" stroke-width="0.8" stroke-dasharray="3,7"/>
- <path d="M 839.3333333333333 142 L 839.3333333333333 495" class="a-default" stroke-width="0.8" stroke-dasharray="3,7"/>
- <path d="M 983.5 142 L 983.5 495" class="a-default" stroke-width="0.8" stroke-dasharray="3,7"/>
+ <path d="M 118.5 142 L 118.5 474" class="a-default" stroke-width="0.8" stroke-dasharray="3,7"/>
+ <path d="M 262.66666666666663 142 L 262.66666666666663 474" class="a-default" stroke-width="0.8" stroke-dasharray="3,7"/>
+ <path d="M 406.8333333333333 142 L 406.8333333333333 474" class="a-default" stroke-width="0.8" stroke-dasharray="3,7"/>
+ <path d="M 551 142 L 551 474" class="a-default" stroke-width="0.8" stroke-dasharray="3,7"/>
+ <path d="M 695.1666666666666 142 L 695.1666666666666 474" class="a-default" stroke-width="0.8" stroke-dasharray="3,7"/>
+ <path d="M 839.3333333333333 142 L 839.3333333333333 474" class="a-default" stroke-width="0.8" stroke-dasharray="3,7"/>
+ <path d="M 983.5 142 L 983.5 474" class="a-default" stroke-width="0.8" stroke-dasharray="3,7"/>
<!-- Activations -->
<rect x="257.66666666666663" y="180" width="10" height="294" rx="3" class="c-mask"/>
@@ -5042,7 +5042,7 @@ OTHER DEALINGS IN THE FONT SOFTWARE.
<path data-composition-edge-from="user" data-composition-edge-to="web" data-composition-edge-id="open-page" data-composition-points="125.5,160;255.66666666666663,160" d="M 125.5 160 L 255.66666666666663 160" class="a-default" data-animate="edge" style="--step:0" stroke-width="1.4" marker-end="url(#arrowhead)"/>
<g data-detail="context">
<rect x="154.88333333333333" y="140" width="71.4" height="18" rx="3" class="c-mask"/>
- <text x="190.58333333333331" y="150" class="t-backend" font-size="11" text-anchor="middle">open page</text>
+ <text x="190.58333333333331" y="150" class="t-muted" font-size="11" text-anchor="middle">open page</text>
</g>
</g>
@@ -5050,7 +5050,7 @@ OTHER DEALINGS IN THE FONT SOFTWARE.
<path data-composition-edge-from="web" data-composition-edge-to="api" data-composition-edge-id="dashboard-request" data-composition-points="269.66666666666663,185;399.8333333333333,185" d="M 269.66666666666663 185 L 399.8333333333333 185" class="a-emphasis" data-animate="edge" style="--step:1" stroke-width="1.8" marker-end="url(#arrowhead-emphasis)"/>
<g data-detail="context">
<rect x="282.55" y="165" width="104.39999999999999" height="18" rx="3" class="c-mask"/>
- <text x="334.75" y="175" class="t-backend" font-size="11" text-anchor="middle">GET /dashboard</text>
+ <text x="334.75" y="175" class="t-edge-emphasis" font-size="11" text-anchor="middle">GET /dashboard</text>
</g>
</g>
@@ -5058,7 +5058,7 @@ OTHER DEALINGS IN THE FONT SOFTWARE.
<path data-composition-edge-from="api" data-composition-edge-to="auth" data-composition-edge-id="verify-jwt" data-composition-points="413.8333333333333,210;544,210" d="M 413.8333333333333 210 L 544 210" class="a-security" data-animate="edge" style="--step:2" stroke-width="1.4" marker-end="url(#arrowhead-security)"/>
<g data-detail="context">
<rect x="439.91666666666663" y="190" width="78" height="18" rx="3" class="c-mask"/>
- <text x="478.91666666666663" y="200" class="t-security" font-size="11" text-anchor="middle">verify JWT</text>
+ <text x="478.91666666666663" y="200" class="t-edge-security" font-size="11" text-anchor="middle">verify JWT</text>
</g>
</g>
@@ -5074,7 +5074,7 @@ OTHER DEALINGS IN THE FONT SOFTWARE.
<path data-composition-edge-from="api" data-composition-edge-to="redis" data-composition-edge-id="cache-read" data-composition-points="413.8333333333333,270;688.1666666666666,270" d="M 413.8333333333333 270 L 688.1666666666666 270" class="a-default" data-animate="edge" style="--step:4" stroke-width="1.4" marker-end="url(#arrowhead)"/>
<g data-detail="context">
<rect x="512" y="250" width="78" height="18" rx="3" class="c-mask"/>
- <text x="551" y="260" class="t-backend" font-size="11" text-anchor="middle">read cache</text>
+ <text x="551" y="260" class="t-muted" font-size="11" text-anchor="middle">read cache</text>
</g>
</g>
@@ -5090,7 +5090,7 @@ OTHER DEALINGS IN THE FONT SOFTWARE.
<path data-composition-edge-from="api" data-composition-edge-to="db" data-composition-edge-id="profile-query" data-composition-points="413.8333333333333,330;832.3333333333333,330" d="M 413.8333333333333 330 L 832.3333333333333 330" class="a-emphasis" data-animate="edge" style="--step:6" stroke-width="1.8" marker-end="url(#arrowhead-emphasis)"/>
<g data-detail="context">
<rect x="541.1833333333333" y="310" width="163.79999999999998" height="18" rx="3" class="c-mask"/>
- <text x="623.0833333333333" y="320" class="t-backend" font-size="11" text-anchor="middle">query profile + metrics</text>
+ <text x="623.0833333333333" y="320" class="t-edge-emphasis" font-size="11" text-anchor="middle">query profile + metrics</text>
</g>
</g>
@@ -5106,7 +5106,7 @@ OTHER DEALINGS IN THE FONT SOFTWARE.
<path data-composition-edge-from="api" data-composition-edge-to="redis" data-composition-edge-id="cache-write" data-composition-points="413.8333333333333,390;688.1666666666666,390" d="M 413.8333333333333 390 L 688.1666666666666 390" class="a-dashed" data-animate="edge" style="--step:8" stroke-width="1.4" marker-end="url(#arrowhead-dashed)"/>
<g data-detail="context">
<rect x="515.3" y="370" width="71.4" height="18" rx="3" class="c-mask"/>
- <text x="551" y="380" class="t-messagebus" font-size="11" text-anchor="middle">set cache</text>
+ <text x="551" y="380" class="t-edge-dashed" font-size="11" text-anchor="middle">set cache</text>
</g>
</g>
@@ -5114,7 +5114,7 @@ OTHER DEALINGS IN THE FONT SOFTWARE.
<path data-composition-edge-from="api" data-composition-edge-to="trace" data-composition-edge-id="trace-emit" data-composition-points="413.8333333333333,418;976.5,418" d="M 413.8333333333333 418 L 976.5 418" class="a-dashed" data-animate="edge" style="--step:9" stroke-width="1.4" marker-end="url(#arrowhead-dashed)"/>
<g data-detail="context">
<rect x="656.1666666666666" y="398" width="78" height="18" rx="3" class="c-mask"/>
- <text x="695.1666666666666" y="408" class="t-messagebus" font-size="11" text-anchor="middle">emit trace</text>
+ <text x="695.1666666666666" y="408" class="t-edge-dashed" font-size="11" text-anchor="middle">emit trace</text>
</g>
</g>
@@ -5239,25 +5239,25 @@ OTHER DEALINGS IN THE FONT SOFTWARE.
<!-- Legend -->
<g data-legend="">
<text x="40" y="486" class="t-primary" font-size="12" font-weight="650">Legend</text>
- <g data-legend-semantic-kind="emphasis" data-legend-x="40" data-legend-baseline="506" data-legend-width="78">
+ <g data-legend-semantic-kind="emphasis" data-legend-x="40" data-legend-baseline="506" data-legend-width="103">
<path d="M 40 503 L 74 503" class="a-emphasis" stroke-width="1.8" marker-end="url(#arrowhead-emphasis)"/>
- <text x="83" y="506" class="t-muted" font-size="10" font-weight="500">request</text>
+ <text x="83" y="506" class="t-muted" font-size="10" font-weight="500">main request</text>
</g>
- <g data-legend-semantic-kind="return" data-legend-x="140" data-legend-baseline="506" data-legend-width="73">
- <path d="M 140 503 L 174 503" class="a-default" stroke-width="1.4" stroke-dasharray="3,5" marker-end="url(#arrowhead)"/>
- <text x="183" y="506" class="t-muted" font-size="10" font-weight="500">return</text>
+ <g data-legend-semantic-kind="return" data-legend-x="165" data-legend-baseline="506" data-legend-width="73">
+ <path d="M 165 503 L 199 503" class="a-default" stroke-width="1.4" stroke-dasharray="3,5" marker-end="url(#arrowhead)"/>
+ <text x="208" y="506" class="t-muted" font-size="10" font-weight="500">return</text>
</g>
- <g data-legend-semantic-kind="security" data-legend-x="235" data-legend-baseline="506" data-legend-width="83">
- <path d="M 235 503 L 269 503" class="a-security" stroke-width="1.4" marker-end="url(#arrowhead-security)"/>
- <text x="278" y="506" class="t-muted" font-size="10" font-weight="500">security</text>
+ <g data-legend-semantic-kind="security" data-legend-x="260" data-legend-baseline="506" data-legend-width="83">
+ <path d="M 260 503 L 294 503" class="a-security" stroke-width="1.4" marker-end="url(#arrowhead-security)"/>
+ <text x="303" y="506" class="t-muted" font-size="10" font-weight="500">security</text>
</g>
- <g data-legend-semantic-kind="dashed" data-legend-x="340" data-legend-baseline="506" data-legend-width="98">
- <path d="M 340 503 L 374 503" class="a-dashed" stroke-width="1.4" marker-end="url(#arrowhead-dashed)"/>
- <text x="383" y="506" class="t-muted" font-size="10" font-weight="500">async trace</text>
+ <g data-legend-semantic-kind="dashed" data-legend-x="365" data-legend-baseline="506" data-legend-width="98">
+ <path d="M 365 503 L 399 503" class="a-dashed" stroke-width="1.4" marker-end="url(#arrowhead-dashed)"/>
+ <text x="408" y="506" class="t-muted" font-size="10" font-weight="500">async trace</text>
</g>
- <g data-legend-semantic-kind="default" data-legend-x="460" data-legend-baseline="506" data-legend-width="118">
- <path d="M 460 503 L 494 503" class="a-default" stroke-width="1.4" marker-end="url(#arrowhead)"/>
- <text x="503" y="506" class="t-muted" font-size="10" font-weight="500">default message</text>
+ <g data-legend-semantic-kind="default" data-legend-x="485" data-legend-baseline="506" data-legend-width="78">
+ <path d="M 485 503 L 519 503" class="a-default" stroke-width="1.4" marker-end="url(#arrowhead)"/>
+ <text x="528" y="506" class="t-muted" font-size="10" font-weight="500">message</text>
</g>
</g>
</svg>
diff --git a/docs/gallery/manifest.json b/docs/gallery/manifest.json
index ff46b56b..657594ff 100644
--- a/docs/gallery/manifest.json
+++ b/docs/gallery/manifest.json
@@ -287,8 +287,8 @@
"engineeringProfile": null,
"nodeCount": 7,
"edgeCount": 12,
- "artifactBytes": 759977,
- "artifactSha256": "4afe24a92e267e4d46e60560b2e4d15859e1a6278d3b02635d8c8ac99e2d611e",
+ "artifactBytes": 759989,
+ "artifactSha256": "79fff23bd5760dcd1ba126ac0c90ca15691cbaf3615108eaa8050a1db989bc98",
"sourceBytes": 3805,
"sourceSha256": "f5c2e44f9a44000adc7c3b3040c4fcd88fe50b7cf8761302c21eb0c184e5780a",
"checks": [
@@ -870,8 +870,8 @@
"engineeringProfile": null,
"nodeCount": 7,
"edgeCount": 14,
- "artifactBytes": 759058,
- "artifactSha256": "9b46f19e67c8ebec5ff984dd9f5bc520385c805d53630debb24f224ef3b90b5a",
+ "artifactBytes": 759076,
+ "artifactSha256": "e7e35d76885dc248a50139407ce147b58fb8709c53de68d219391380adf6ae40",
"sourceBytes": 3766,
"sourceSha256": "b8c6c52f1763ede2933c77deb8da59b3e06917bc41d27e66df896136456b859a",
"checks": [
diff --git a/examples/sequence-cache-miss-request.html b/examples/sequence-cache-miss-request.html
index 5d288365..bc6732ba 100644
--- a/examples/sequence-cache-miss-request.html
+++ b/examples/sequence-cache-miss-request.html
@@ -5015,13 +5015,13 @@ OTHER DEALINGS IN THE FONT SOFTWARE.
<rect data-graph-role="structural-frame" data-composition-frame-kind="segment" data-composition-frame-id="2" x="48" y="380" width="984" height="100" rx="10" class="c-lane" stroke-width="1"/>
<!-- Lifelines -->
- <path d="M 118.5 142 L 118.5 495" class="a-default" stroke-width="0.8" stroke-dasharray="3,7"/>
- <path d="M 262.66666666666663 142 L 262.66666666666663 495" class="a-default" stroke-width="0.8" stroke-dasharray="3,7"/>
- <path d="M 406.8333333333333 142 L 406.8333333333333 495" class="a-default" stroke-width="0.8" stroke-dasharray="3,7"/>
- <path d="M 551 142 L 551 495" class="a-default" stroke-width="0.8" stroke-dasharray="3,7"/>
- <path d="M 695.1666666666666 142 L 695.1666666666666 495" class="a-default" stroke-width="0.8" stroke-dasharray="3,7"/>
- <path d="M 839.3333333333333 142 L 839.3333333333333 495" class="a-default" stroke-width="0.8" stroke-dasharray="3,7"/>
- <path d="M 983.5 142 L 983.5 495" class="a-default" stroke-width="0.8" stroke-dasharray="3,7"/>
+ <path d="M 118.5 142 L 118.5 474" class="a-default" stroke-width="0.8" stroke-dasharray="3,7"/>
+ <path d="M 262.66666666666663 142 L 262.66666666666663 474" class="a-default" stroke-width="0.8" stroke-dasharray="3,7"/>
+ <path d="M 406.8333333333333 142 L 406.8333333333333 474" class="a-default" stroke-width="0.8" stroke-dasharray="3,7"/>
+ <path d="M 551 142 L 551 474" class="a-default" stroke-width="0.8" stroke-dasharray="3,7"/>
+ <path d="M 695.1666666666666 142 L 695.1666666666666 474" class="a-default" stroke-width="0.8" stroke-dasharray="3,7"/>
+ <path d="M 839.3333333333333 142 L 839.3333333333333 474" class="a-default" stroke-width="0.8" stroke-dasharray="3,7"/>
+ <path d="M 983.5 142 L 983.5 474" class="a-default" stroke-width="0.8" stroke-dasharray="3,7"/>
<!-- Activations -->
<rect x="257.66666666666663" y="180" width="10" height="294" rx="3" class="c-mask"/>
@@ -5042,7 +5042,7 @@ OTHER DEALINGS IN THE FONT SOFTWARE.
<path data-composition-edge-from="user" data-composition-edge-to="web" data-composition-edge-id="open-page" data-composition-points="125.5,160;255.66666666666663,160" d="M 125.5 160 L 255.66666666666663 160" class="a-default" data-animate="edge" style="--step:0" stroke-width="1.4" marker-end="url(#arrowhead)"/>
<g data-detail="context">
<rect x="154.88333333333333" y="140" width="71.4" height="18" rx="3" class="c-mask"/>
- <text x="190.58333333333331" y="150" class="t-backend" font-size="11" text-anchor="middle">open page</text>
+ <text x="190.58333333333331" y="150" class="t-muted" font-size="11" text-anchor="middle">open page</text>
</g>
</g>
@@ -5050,7 +5050,7 @@ OTHER DEALINGS IN THE FONT SOFTWARE.
<path data-composition-edge-from="web" data-composition-edge-to="api" data-composition-edge-id="dashboard-request" data-composition-points="269.66666666666663,185;399.8333333333333,185" d="M 269.66666666666663 185 L 399.8333333333333 185" class="a-emphasis" data-animate="edge" style="--step:1" stroke-width="1.8" marker-end="url(#arrowhead-emphasis)"/>
<g data-detail="context">
<rect x="282.55" y="165" width="104.39999999999999" height="18" rx="3" class="c-mask"/>
- <text x="334.75" y="175" class="t-backend" font-size="11" text-anchor="middle">GET /dashboard</text>
+ <text x="334.75" y="175" class="t-edge-emphasis" font-size="11" text-anchor="middle">GET /dashboard</text>
</g>
</g>
@@ -5058,7 +5058,7 @@ OTHER DEALINGS IN THE FONT SOFTWARE.
<path data-composition-edge-from="api" data-composition-edge-to="auth" data-composition-edge-id="verify-jwt" data-composition-points="413.8333333333333,210;544,210" d="M 413.8333333333333 210 L 544 210" class="a-security" data-animate="edge" style="--step:2" stroke-width="1.4" marker-end="url(#arrowhead-security)"/>
<g data-detail="context">
<rect x="439.91666666666663" y="190" width="78" height="18" rx="3" class="c-mask"/>
- <text x="478.91666666666663" y="200" class="t-security" font-size="11" text-anchor="middle">verify JWT</text>
+ <text x="478.91666666666663" y="200" class="t-edge-security" font-size="11" text-anchor="middle">verify JWT</text>
</g>
</g>
@@ -5074,7 +5074,7 @@ OTHER DEALINGS IN THE FONT SOFTWARE.
<path data-composition-edge-from="api" data-composition-edge-to="redis" data-composition-edge-id="cache-read" data-composition-points="413.8333333333333,270;688.1666666666666,270" d="M 413.8333333333333 270 L 688.1666666666666 270" class="a-default" data-animate="edge" style="--step:4" stroke-width="1.4" marker-end="url(#arrowhead)"/>
<g data-detail="context">
<rect x="512" y="250" width="78" height="18" rx="3" class="c-mask"/>
- <text x="551" y="260" class="t-backend" font-size="11" text-anchor="middle">read cache</text>
+ <text x="551" y="260" class="t-muted" font-size="11" text-anchor="middle">read cache</text>
</g>
</g>
@@ -5090,7 +5090,7 @@ OTHER DEALINGS IN THE FONT SOFTWARE.
<path data-composition-edge-from="api" data-composition-edge-to="db" data-composition-edge-id="profile-query" data-composition-points="413.8333333333333,330;832.3333333333333,330" d="M 413.8333333333333 330 L 832.3333333333333 330" class="a-emphasis" data-animate="edge" style="--step:6" stroke-width="1.8" marker-end="url(#arrowhead-emphasis)"/>
<g data-detail="context">
<rect x="541.1833333333333" y="310" width="163.79999999999998" height="18" rx="3" class="c-mask"/>
- <text x="623.0833333333333" y="320" class="t-backend" font-size="11" text-anchor="middle">query profile + metrics</text>
+ <text x="623.0833333333333" y="320" class="t-edge-emphasis" font-size="11" text-anchor="middle">query profile + metrics</text>
</g>
</g>
@@ -5106,7 +5106,7 @@ OTHER DEALINGS IN THE FONT SOFTWARE.
<path data-composition-edge-from="api" data-composition-edge-to="redis" data-composition-edge-id="cache-write" data-composition-points="413.8333333333333,390;688.1666666666666,390" d="M 413.8333333333333 390 L 688.1666666666666 390" class="a-dashed" data-animate="edge" style="--step:8" stroke-width="1.4" marker-end="url(#arrowhead-dashed)"/>
<g data-detail="context">
<rect x="515.3" y="370" width="71.4" height="18" rx="3" class="c-mask"/>
- <text x="551" y="380" class="t-messagebus" font-size="11" text-anchor="middle">set cache</text>
+ <text x="551" y="380" class="t-edge-dashed" font-size="11" text-anchor="middle">set cache</text>
</g>
</g>
@@ -5114,7 +5114,7 @@ OTHER DEALINGS IN THE FONT SOFTWARE.
<path data-composition-edge-from="api" data-composition-edge-to="trace" data-composition-edge-id="trace-emit" data-composition-points="413.8333333333333,418;976.5,418" d="M 413.8333333333333 418 L 976.5 418" class="a-dashed" data-animate="edge" style="--step:9" stroke-width="1.4" marker-end="url(#arrowhead-dashed)"/>
<g data-detail="context">
<rect x="656.1666666666666" y="398" width="78" height="18" rx="3" class="c-mask"/>
- <text x="695.1666666666666" y="408" class="t-messagebus" font-size="11" text-anchor="middle">emit trace</text>
+ <text x="695.1666666666666" y="408" class="t-edge-dashed" font-size="11" text-anchor="middle">emit trace</text>
</g>
</g>
@@ -5239,25 +5239,25 @@ OTHER DEALINGS IN THE FONT SOFTWARE.
<!-- Legend -->
<g data-legend="">
<text x="40" y="486" class="t-primary" font-size="12" font-weight="650">Legend</text>
- <g data-legend-semantic-kind="emphasis" data-legend-x="40" data-legend-baseline="506" data-legend-width="78">
+ <g data-legend-semantic-kind="emphasis" data-legend-x="40" data-legend-baseline="506" data-legend-width="103">
<path d="M 40 503 L 74 503" class="a-emphasis" stroke-width="1.8" marker-end="url(#arrowhead-emphasis)"/>
- <text x="83" y="506" class="t-muted" font-size="10" font-weight="500">request</text>
+ <text x="83" y="506" class="t-muted" font-size="10" font-weight="500">main request</text>
</g>
- <g data-legend-semantic-kind="return" data-legend-x="140" data-legend-baseline="506" data-legend-width="73">
- <path d="M 140 503 L 174 503" class="a-default" stroke-width="1.4" stroke-dasharray="3,5" marker-end="url(#arrowhead)"/>
- <text x="183" y="506" class="t-muted" font-size="10" font-weight="500">return</text>
+ <g data-legend-semantic-kind="return" data-legend-x="165" data-legend-baseline="506" data-legend-width="73">
+ <path d="M 165 503 L 199 503" class="a-default" stroke-width="1.4" stroke-dasharray="3,5" marker-end="url(#arrowhead)"/>
+ <text x="208" y="506" class="t-muted" font-size="10" font-weight="500">return</text>
</g>
- <g data-legend-semantic-kind="security" data-legend-x="235" data-legend-baseline="506" data-legend-width="83">
- <path d="M 235 503 L 269 503" class="a-security" stroke-width="1.4" marker-end="url(#arrowhead-security)"/>
- <text x="278" y="506" class="t-muted" font-size="10" font-weight="500">security</text>
+ <g data-legend-semantic-kind="security" data-legend-x="260" data-legend-baseline="506" data-legend-width="83">
+ <path d="M 260 503 L 294 503" class="a-security" stroke-width="1.4" marker-end="url(#arrowhead-security)"/>
+ <text x="303" y="506" class="t-muted" font-size="10" font-weight="500">security</text>
</g>
- <g data-legend-semantic-kind="dashed" data-legend-x="340" data-legend-baseline="506" data-legend-width="98">
- <path d="M 340 503 L 374 503" class="a-dashed" stroke-width="1.4" marker-end="url(#arrowhead-dashed)"/>
- <text x="383" y="506" class="t-muted" font-size="10" font-weight="500">async trace</text>
+ <g data-legend-semantic-kind="dashed" data-legend-x="365" data-legend-baseline="506" data-legend-width="98">
+ <path d="M 365 503 L 399 503" class="a-dashed" stroke-width="1.4" marker-end="url(#arrowhead-dashed)"/>
+ <text x="408" y="506" class="t-muted" font-size="10" font-weight="500">async trace</text>
</g>
- <g data-legend-semantic-kind="default" data-legend-x="460" data-legend-baseline="506" data-legend-width="118">
- <path d="M 460 503 L 494 503" class="a-default" stroke-width="1.4" marker-end="url(#arrowhead)"/>
- <text x="503" y="506" class="t-muted" font-size="10" font-weight="500">default message</text>
+ <g data-legend-semantic-kind="default" data-legend-x="485" data-legend-baseline="506" data-legend-width="78">
+ <path d="M 485 503 L 519 503" class="a-default" stroke-width="1.4" marker-end="url(#arrowhead)"/>
+ <text x="528" y="506" class="t-muted" font-size="10" font-weight="500">message</text>
</g>
</g>
</svg>