Skip to content

Add --hide <sel>, appended to the config's hideSelectors - #108

Merged
tmashara merged 1 commit into
mainfrom
claude/issue-101-hide-flag
Oct 30, 2026
Merged

tmashara merged 1 commit into
mainfrom
claude/issue-101-hide-flag

Conversation

@tmashara

Copy link
Copy Markdown
Owner

Fixes #101

  • --hide <sel> (repeatable, CSS selector) is appended to the config's hideSelectors, the way --mask adds to masks. An empty value exits 2 (--hide needs a value).
  • neutralizeCss now emits one display:none rule per hide selector instead of one joined rule, so an invalid selector (e.g. Playwright syntax like text=Accept) drops only its own rule and the default consent hides survive. Because neutralizeCss changes, the config hash changes too: --rerun-failed against results from an older version reports that the config differs.
  • Docs: --help line and closing note, README options row, skill reference.

Verification

  • Unit: --hide needs a value (no value, --hide=, blank).
  • Visual: /drifting with --no-recheck --hide text=nope --hide [data-drift] exits 0 with 0 diff pixels, and meta.hideSelectors lists both. The bogus selector shows a bad selector no longer disables the others.
  • npm run typecheck, lint, format:check, npm test (360 pass), npm run test:visual (392 pass) locally on macOS.

🤖 Generated with Claude Code

Each hide selector now gets its own display:none rule, so one invalid
selector drops only itself instead of the whole list.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@tmashara
tmashara merged commit 082d3f5 into main Oct 30, 2026
3 checks passed
@tmashara tmashara mentioned this pull request Oct 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CLI flag to hide selectors

1 participant