The design language that makes your AI harness better at design.
JavaScript
Merge layout findings into existing overlays instead of stacking
Paul Bakausfda447ee8b0a
diff --git a/.claude/skills/critique/scripts/detect-antipatterns-browser.js b/.claude/skills/critique/scripts/detect-antipatterns-browser.jsindex 6c6e7794b..1ea1210ac 100644--- a/.claude/skills/critique/scripts/detect-antipatterns-browser.js+++ b/.claude/skills/critique/scripts/detect-antipatterns-browser.js@@ -1454,7 +1454,19 @@ if (IS_BROWSER) {for (const f of layoutFindings) {const el = f.el || document.body;delete f.el;- highlight(el, [f]);+ // Merge into existing overlay if this element already has one+ const existing = el._impeccableOverlay;+ if (existing) {+ const label = existing.querySelector('.impeccable-label');+ if (label) {+ const newType = TYPE_LABELS[f.type] || f.type;+ label.textContent += ', ' + newType;+ }+ const tooltip = existing.querySelector('.impeccable-tooltip');+ if (tooltip) tooltip.innerHTML += '<br>' + (f.detail || '');+ } else {+ highlight(el, [f]);+ }allFindings.push({ el, findings: [f] });}diff --git a/source/skills/critique/scripts/detect-antipatterns.mjs b/source/skills/critique/scripts/detect-antipatterns.mjsindex a5385cd66..85c7434d0 100644--- a/source/skills/critique/scripts/detect-antipatterns.mjs+++ b/source/skills/critique/scripts/detect-antipatterns.mjs@@ -1452,7 +1452,19 @@ if (IS_BROWSER) {for (const f of layoutFindings) {const el = f.el || document.body;delete f.el;- highlight(el, [f]);+ // Merge into existing overlay if this element already has one+ const existing = el._impeccableOverlay;+ if (existing) {+ const label = existing.querySelector('.impeccable-label');+ if (label) {+ const newType = TYPE_LABELS[f.type] || f.type;+ label.textContent += ', ' + newType;+ }+ const tooltip = existing.querySelector('.impeccable-tooltip');+ if (tooltip) tooltip.innerHTML += '<br>' + (f.detail || '');+ } else {+ highlight(el, [f]);+ }allFindings.push({ el, findings: [f] });}