Fix glow/gradient detection, fix test performance (280s -> 5s)

Detection improvements:
- Remove SAFE_TAGS from glow check (buttons/links with glows are valid)
- Add gradient color parsing (parseGradientColors) for AI palette
  detection on gradient backgrounds including buttons
- Detect cyan neon text on dark backgrounds as AI palette
- Resolve gradient backgrounds as dark for glow detection
- Fix pure-black false positive on semi-transparent overlays (a >= 0.9)
- Skip low-contrast/gray-on-color when background is a gradient
- Fix "Only font:" double-colon in browser labels

Test performance:
- Split jsdom fixture tests to Node's test runner (bun + jsdom hangs
  after ~13 instances due to resource leak)
- bun test for unit/regex/CLI tests (94 tests, 4s)
- node --test for jsdom fixtures (15 tests, 1.3s)
- Total: 109 tests in ~5s (was 280s+)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Paul Bakaus
2026-03-18 14:49:40 -07:00
co-authored by Claude Opus 4.6
parent 0574bd0be2
commit 4d2ef64935
7 changed files with 622 additions and 344 deletions
+4 -4
View File
@@ -4,8 +4,8 @@
"author": "Paul Bakaus",
"dependencies": {
"archiver": "^7.0.1",
"motion": "^12.23.26",
"playwright": "^1.57.0"
"motion": "^12.38.0",
"playwright": "^1.58.2"
},
"description": "Cross-provider design skills and commands for LLM-powered development tools",
"keywords": [
@@ -25,7 +25,7 @@
"dev": "bun run server/index.js",
"preview": "bun run build && wrangler pages dev",
"deploy": "bun run build && wrangler pages deploy build/",
"test": "bun test",
"test": "bun test tests/build.test.js tests/detect-antipatterns.test.js && node --test tests/detect-antipatterns-fixtures.test.mjs",
"screenshot": "bun run scripts/screenshot-antipatterns.js",
"og-image": "bun run scripts/generate-og-image.js"
},
@@ -33,6 +33,6 @@
"devDependencies": {
"jsdom": "^29.0.0",
"puppeteer": "^24.39.1",
"wrangler": "^4.71.0"
"wrangler": "^4.75.0"
}
}