Skip to content

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

fix: unify label-width diagnostic phrasing across diagram types

momoyeyu6f4ccf414f27
diff --git a/archify/renderers/dataflow/render-dataflow.mjs b/archify/renderers/dataflow/render-dataflow.mjs
index 203aa636..28fe2c40 100644
--- a/archify/renderers/dataflow/render-dataflow.mjs
+++ b/archify/renderers/dataflow/render-dataflow.mjs
@@ -142,7 +142,7 @@ function validateDataflow() {
}
const estLabelW = textUnits(node.label) * 6.2;
if (estLabelW > node.width + 6) {
- problems.push(`Label "${node.label}" (~${Math.round(estLabelW)}px) is wider than node "${node.id}" (${node.width}px) — shorten the label or increase node.width.`);
+ problems.push(`Label "${node.label}" (~${Math.round(estLabelW)}px) is wider than component "${node.id}" (${node.width}px) — shorten the label or increase node.width.`);
}
const brandRailProblem = brandTopRailProblem(node, node.width, 8);
if (brandRailProblem) problems.push(brandRailProblem);
diff --git a/archify/renderers/lifecycle/render-lifecycle.mjs b/archify/renderers/lifecycle/render-lifecycle.mjs
index 3ad3f602..b385f3b8 100644
--- a/archify/renderers/lifecycle/render-lifecycle.mjs
+++ b/archify/renderers/lifecycle/render-lifecycle.mjs
@@ -400,7 +400,7 @@ function validateLifecycle() {
}
const estLabelW = textUnits(state.label) * 6.2;
if (estLabelW > state.width + 6) {
- problems.push(`Label "${state.label}" (~${Math.round(estLabelW)}px) is wider than state "${state.id}" (${state.width}px) — shorten the label or increase state.width.`);
+ problems.push(`Label "${state.label}" (~${Math.round(estLabelW)}px) is wider than component "${state.id}" (${state.width}px) — shorten the label or increase state.width.`);
}
const brandRailProblem = brandTopRailProblem(state, state.width, 8, 'State');
if (brandRailProblem) problems.push(brandRailProblem);
diff --git a/archify/renderers/sequence/render-sequence.mjs b/archify/renderers/sequence/render-sequence.mjs
index fc381418..0773056a 100644
--- a/archify/renderers/sequence/render-sequence.mjs
+++ b/archify/renderers/sequence/render-sequence.mjs
@@ -204,7 +204,7 @@ function validateSequence() {
for (const participant of participants.values()) {
const estLabelW = textUnits(participant.label) * 6.8;
if (estLabelW > layout.participantW + 6) {
- problems.push(`Label "${participant.label}" (~${Math.round(estLabelW)}px) is wider than the ${layout.participantW}px participant box — shorten it.`);
+ problems.push(`Label "${participant.label}" (~${Math.round(estLabelW)}px) is wider than component "${participant.id}" (${layout.participantW}px) — shorten the label or widen the participant box.`);
}
const brandRailProblem = brandTopRailProblem(participant, layout.participantW, 8, 'Participant');
if (brandRailProblem) problems.push(brandRailProblem);
diff --git a/archify/renderers/workflow/workflow-compiler.mjs b/archify/renderers/workflow/workflow-compiler.mjs
index b3b3b429..5e2564cc 100644
--- a/archify/renderers/workflow/workflow-compiler.mjs
+++ b/archify/renderers/workflow/workflow-compiler.mjs
@@ -2570,7 +2570,7 @@ function validateWorkflow() {
}
const estLabelW = textUnits(node.label) * 6.8;
if (estLabelW > node.width + 6) {
- problems.push(`Label "${node.label}" (~${Math.round(estLabelW)}px) is wider than node "${node.id}" (${node.width}px) — shorten the label or increase node.width.`);
+ problems.push(`Label "${node.label}" (~${Math.round(estLabelW)}px) is wider than component "${node.id}" (${node.width}px) — shorten the label or increase node.width.`);
}
const brandRailProblem = brandTopRailProblem(node, node.width, nodeTextFit.labelMinimum);
if (brandRailProblem) problems.push(brandRailProblem);