From 45e68519a4328ea8ff2923646530053b71fb6085 Mon Sep 17 00:00:00 2001 From: Paul Bakaus Date: Mon, 6 Apr 2026 23:29:44 -0700 Subject: [PATCH] Show full anti-pattern names in overlay labels Removes the 26-character truncation in TYPE_LABELS that cut off long anti-pattern names mid-word (e.g. "icon tile stacked above heading" became "icon tile stacked above he"). The label is sized by content via white-space: nowrap so it grows to fit, and multi-finding overlays that exceed the outline width already fall back to the cycling UI. Co-Authored-By: Claude Opus 4.6 (1M context) --- src/detect-antipatterns-browser.js | 2 +- src/detect-antipatterns.mjs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/detect-antipatterns-browser.js b/src/detect-antipatterns-browser.js index ab487bee2..7e42132af 100644 --- a/src/detect-antipatterns-browser.js +++ b/src/detect-antipatterns-browser.js @@ -1607,7 +1607,7 @@ if (IS_BROWSER) { const TYPE_LABELS = {}; const RULE_CATEGORY = {}; for (const ap of ANTIPATTERNS) { - TYPE_LABELS[ap.id] = ap.name.toLowerCase().substring(0, 26); + TYPE_LABELS[ap.id] = ap.name.toLowerCase(); RULE_CATEGORY[ap.id] = ap.category || 'quality'; } diff --git a/src/detect-antipatterns.mjs b/src/detect-antipatterns.mjs index 94632eed0..103752d83 100644 --- a/src/detect-antipatterns.mjs +++ b/src/detect-antipatterns.mjs @@ -1602,7 +1602,7 @@ if (IS_BROWSER) { const TYPE_LABELS = {}; const RULE_CATEGORY = {}; for (const ap of ANTIPATTERNS) { - TYPE_LABELS[ap.id] = ap.name.toLowerCase().substring(0, 26); + TYPE_LABELS[ap.id] = ap.name.toLowerCase(); RULE_CATEGORY[ap.id] = ap.category || 'quality'; }