Skip to content

--computed skips hidden selectors; verdict line counts unstable shots - #139

Merged
tmashara merged 2 commits into
mainfrom
claude/issue-121
Nov 3, 2026
Merged

tmashara merged 2 commits into
mainfrom
claude/issue-121

Conversation

@tmashara

@tmashara tmashara commented Nov 3, 2026 •

Copy link
Copy Markdown
Owner

Refs #121. This covers item 5, part of item 3, and a doc tweak for item 4. Rule coverage (item 1) will come in a separate PR. The side-by-side crop (item 2) is deferred to #113/#104; report --markdown already gives Before/After shots for every width.

User-facing changes

  • --computed and probe skip hideSelectors elements and their subtrees, the same way they skip masked ones.
    • Before this change, a hidden element was still keyed. On /consent (the default #onetrust-consent-sdk) --computed reported dom differs (1) with unmatched +body > div#onetrust-consent-sdk.
    • On metabase docs, the gdpr notice is body > div.gdpr-cookie-notice on some loads and wrapped in div#gdpr-outer-container on others. That made base vs base read dom differs. Hide the wrapper too: the docs now say so.
    • Item 3 is only partly fixed. This PR fixes a hidden banner present on one side only, and one whose own markup varies. It doesn't fix a hidden element that moves among siblings sharing its tag and class: it still counts toward their :nth-of-type, so it still re-keys them. That may be part of the Feedback from a CSS-only docs run (0.12.0): rule coverage, PR crops of clean shots, hidden subtrees in dom, results.json fields #121 base-vs-base case. The indexing stays as it is so keys keep working with querySelector; masks have the same limit today. The docs now say so.
  • The verdict line now gains , N unstable (max Mpx) after the error count when any unaccepted shot had unstable pixels. When there are none it prints nothing extra. report.html and evidence.html reuse this line. A strict parser of the verdict line should allow the new optional clause.
  • reference.md now spells out failed as { left: [], right: [] }, always both, with a jq count.

Tests

  • The "consent chrome" guard rail now runs with --computed and asserts dom 0 and no unmatched elements at 1440 and 375. On main it fails.
  • The ticker test asserts verdict.unstable is { shots: 1, max: 148480 }. parse.ts VERDICT gets the optional group.

🤖 Generated with Claude Code

tmashara and others added 2 commits November 3, 2026 20:37
hideSelectors only injected display:none, so a hidden element was still keyed by
the --computed walk: a banner one side lacked (or that came wrapped on some loads)
read as dom differs, on base vs base too. The walk, and probe's, now skip hidden
elements like masked ones; they still count toward :nth-of-type, so keys keep
working with querySelector.

The verdict line gains ", N unstable (max Mpx)" when any shot had unstable pixels.

Refs #121

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@tmashara
tmashara merged commit e64ae5a into main Nov 3, 2026
3 checks passed
@tmashara
tmashara deleted the claude/issue-121 branch November 3, 2026 19:56
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.

1 participant