Skip to content

Drop varies text like masked text; name a resized element's changed parent - #146

Merged
tmashara merged 2 commits into
mainfrom
claude/issue-138
Nov 4, 2026
Merged

tmashara merged 2 commits into
mainfrom
claude/issue-138

Conversation

@tmashara

@tmashara tmashara commented Nov 4, 2026

Copy link
Copy Markdown
Owner

Closes #138

Text in a varies region

  • A varies recheck now re-reads the text on both pages with the varying elements hidden, as well as the masks.
  • It uses readText, which is the shot's own text read, now extracted from capture and exported.
  • The varying line is dropped from text, and from the findings it used to repeat across routes, the same way its pixels are painted out.
  • If either re-read fails, both sides keep their original text.
  • Visibility is restored in a finally block, before locate, --computed and --aria run.
  • Shots without a varies result, and runs with --no-recheck, read text exactly as before.

dom names the cause, not the symptom

  • width and height alone now count as a consequence. An element whose only changes are its size looks to its previous sibling or its parent for the cause.
  • A neighbour or parent is named as the cause only if it has its own change other than size. It is listed after the symptom, as the docs describe.
  • Only the parent level is checked. Deeper than that, the docs point to --computed.
  • Upgrade note in docs/accepted.md: an accepted region whose element only resized inside a changed parent now names that parent too, so it needs re-accepting, in CI.

Tests

  • /drifting: text is empty and stdout has no text line. A real h1 text change on the left, next to the varying content, still appears in text.added.
  • /flex-vs-grid with a hook that sets padding-left on a card: the card is named with padding-left, the h3 is still named, and the card is among the first 3 entries of the dom line.
  • /flex-vs-grid with a hook that changes a p's own width under an unchanged parent, and a parent whose only change is width: neither is named as a cause.
  • Locally: typecheck, lint, format:check and npm test pass. The visual files controls, guardrails and accepted pass when run alone.

🤖 Generated with Claude Code

tmashara and others added 2 commits November 4, 2026 09:27
…arent

A varies recheck now re-reads both pages' text with the varying elements
hidden, through the same readText the shot uses for masks, so a footer
clock painted out of the pixels no longer leaks into `text` or findings.

dom treats a width or height change as a consequence: an element whose only
changes are its size looks to its neighbour or parent, and only one with a
change of its own is named as the cause, listed after it.

Closes #138

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…d text, restore style exactly

- A moved-only element still names a parent whose only change is its size;
  only a resized element requires its cause to have a change of its own.
- The varies text re-read hides only elements whose text changed (or exist
  on one load), so a pushed element's text stays; variesSels is shared with
  fmtVaries, whose mask suggestion is unchanged.
- readText restores each style attribute as it was, so no style="" is left
  for --computed to read as a markup change.
- Docs: a width or height change alone is usually a consequence; varies text
  is left out when the element was located.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@tmashara
tmashara merged commit 2fe6f1a into main Nov 4, 2026
3 checks passed
@tmashara
tmashara deleted the claude/issue-138 branch November 4, 2026 09:06
@tmashara tmashara mentioned this pull request Nov 4, 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.

Footer time leaks into text despite varies mask; dom blames h3 width instead of card padding-left at 1440

1 participant