mirror of
https://github.com/pbakaus/impeccable.git
synced 2026-09-12 14:16:28 +03:00
Four gaps the review bots found in the first commit:
- **The hook dropped the waivers when the design system was off.** Both
`design_system_options` paths returned `HookScanOptions::default()` when
`designSystem.enabled` is false, which left `ignore_selectors` empty, so an
opted-out component kept re-firing on every edit in exactly the projects
that have no DESIGN.md. Component ignores are not design-system state; they
travel either way now.
- **The in-page and extension scans never saw the key.** `BrowserConfig`
reads `ignoreSelectors`, but the two JS adapters that build that config
(`browser-bundle/50-scan.js` `collectConfigJson`, `60-offscreen.js`
`configJson`) listed their keys explicitly and dropped it, so the documented
`window.__IMPECCABLE_CONFIG__.ignoreSelectors` path did nothing. Both
forward it now, and the bundle is regenerated.
- **Visual-contrast findings skipped the stamp.** The URL engine's visual pass
produces its findings outside `collect_browser_findings`, so a
`low-contrast` hit on an opted-out component was reported rather than
waived. Each candidate carries its own selector, so the pass now resolves
that element against the same post-reveal snapshot and stamps what the
config waives. Page-level results (`content-hidden-at-rest`, `script-error`)
stay unstamped: they name no element.
- **One bad entry could discard the whole page config.** `ignoreSelectors`
used strict deserialization, so a hand-edited `{}` or `null` in the array
failed the parse of `BrowserConfig`, which the wasm entry points answer with
`unwrap_or_default()` — losing the design system and every other setting.
It now filters bad entries the way `disabledValues` does.
Also: a `files` glob no longer applies to a URL scan. Globs name repo paths,
and `index.html` reaching `https://example.com/index.html` would scope an
ignore to a page the entry never named. URL scans take the unscoped entries
only, which is what the docs already promised.
Assisted-by: Claude Code
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LQBUunp8QttxZqihybNmtL