The design language that makes your AI harness better at design.
JavaScript
Test: pin 1D grid-background pass cases in the fixture suite
Abdul Wahab7ddcd533a46a
diff --git a/tests/detect-antipatterns-fixtures.test.mjs b/tests/detect-antipatterns-fixtures.test.mjsindex fb9ee76f9..f7fa1a4d7 100644--- a/tests/detect-antipatterns-fixtures.test.mjs+++ b/tests/detect-antipatterns-fixtures.test.mjs@@ -1278,6 +1278,14 @@ describe('detectHtml — generated-UI tells', () => {}});+ it('codex-grid-background: 1D dashed rules and px-pair line-fields stay legal', async () => {+ const f = await detectHtml(path.join(FIXTURES, 'codex-grid-1d-pass.html'));+ assert.equal(+ f.filter(r => r.antipattern === 'codex-grid-background').length, 0,+ `1D tiled hairlines must not flag, got: ${f.filter(r => r.antipattern === 'codex-grid-background').map(r => r.snippet).join('; ')}`,+ );+ });+it('gemini-tells: both flag cases surface by default and pass cases stay legal', async () => {const findings = await detectHtml(path.join(FIXTURES, 'gemini-tells.html'));// Two flag cases: a CSS img:hover{transform} rule and a Tailwind hover:scale on <img>.diff --git a/tests/fixtures/antipatterns/codex-grid-1d-pass.html b/tests/fixtures/antipatterns/codex-grid-1d-pass.htmlnew file mode 100644index 000000000..f87942f2b--- /dev/null+++ b/tests/fixtures/antipatterns/codex-grid-1d-pass.html@@ -0,0 +1,21 @@+<!doctype html>+<html lang="en">+<head>+ <meta charset="utf-8" />+ <title>codex-grid-background 1D pass cases</title>+ <style>+ body { font-family: system-ui, sans-serif; margin: 0; color: #1a1a1a; background: #fff; }+ .dot-rule { height: 5px; background-image: linear-gradient(90deg, rgba(255,255,255,.75) 5px, transparent 5px); background-size: 10px 5px; background-repeat: repeat-x; }+ .progress-rail { height: 4px; background-image: linear-gradient(90deg, #eee 1px, transparent 1px); background-size: 8px 4px; background-repeat: repeat-x; }+ .line-field { height: 80px; background: linear-gradient(90deg, rgba(23,25,24,.035) 1px, transparent 1px) 0 0 / 40px 40px, #f4f1ea; }+ </style>+</head>+<body>+ <h2>Dotted horizontal rule</h2>+ <div class="dot-rule"></div>+ <h2>Progress rail</h2>+ <div class="progress-rail"></div>+ <h2>Single-axis px-pair line field</h2>+ <div class="line-field"></div>+</body>+</html>