Skip to content

varies: label painted-out px, suggest only id/class/attribute masks; rerun lists its own findings - #114

Merged
tmashara merged 1 commit into
mainfrom
claude/issue-113-run-feedback
Nov 2, 2026
Merged

tmashara merged 1 commit into
mainfrom
claude/issue-113-run-feedback

Conversation

@tmashara

@tmashara tmashara commented Nov 2, 2026

Copy link
Copy Markdown
Owner

Refs #113

What changed

  • varies total vs. its regions (item 4). The number is the area of the element boxes that were painted out, not the count of pixels that changed. A 1px-tall region inside a <p> therefore reads as about 48k px. The number is unchanged (the score subtracts it), but it's now labelled: the console row reads varies /a @1440 48,263px painted out …, and the report badge reads "N px painted out, vary per load". docs/output.md explains the difference.
  • Mask suggestions (item 5a). --mask / masks: suggestions now skip selectors whose last compound is a bare tag, optionally with :nth-of-type(n) (for example p:nth-of-type(14) or #main > p:nth-of-type(3)). Masking those would hide real changes too. Selectors ending in an id, class or attribute are still suggested. The varies row still lists every located selector. When nothing survives the filter, both suggestion lines are left out.
  • --rerun-failed reprints old blocks (item 6). Reused shots, including varies shots whose diff was painted down to 0, used to feed the findings, computed unmatched, aria and varies blocks. Those blocks now list only the shots the rerun actually took. Scores, the clean/accepted lists and results.json are unchanged.

Tests

  • New tests/unit/varies.test.ts covers the row label and the selector filter, including [data-testid="a b"].
  • guardrails.test.ts: the varies regex now requires "painted out", and /drifting (.drift) still yields a --mask line.
  • accepted.test.ts: a rerun after a run that printed varies /drifting prints its rerun: line and no varies block.
  • typecheck, lint, format:check and npm test (364) pass, as do the guardrails and accepted visual suites (112) on macOS.

Deferred

  • 1. Side labels: this touches config, the CLI, RunMeta, the report and the markdown export, so it gets its own PR.
  • 5b. No suggestion when the layout moved between loads: there's no reliable signal yet.
  • 7. Collapse text for a hidden subtree: this needs per-element visibility captured on both sides.
  • 8. --only: a design call. It needs an explicit flag rather than CLI routes implicitly taking on config routes' settings.
  • 2 and 3 (publish dedupe, WebP/tiling): these belong to Publish a report: --base-url for the markdown export and renderdiff publish #104.

🤖 Generated with Claude Code

…rerun lists its own findings

The varies count is the element boxes painted out, not the pixels that changed, so the
console row and report badge now say "painted out". Mask suggestions skip selectors that
end in a bare tag (p:nth-of-type(14)), which would hide real changes too. --rerun-failed
lists findings for the shots it reran, not the reused ones.

Refs #113

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@tmashara
tmashara merged commit 211d23f into main Nov 2, 2026
3 checks passed
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