Skip to content

Surface lost pseudo-elements, thin lines and re-parented pairs - #32

Merged
tmashara merged 2 commits into
mainfrom
claude/issue-28-pseudo-lines
Oct 29, 2026
Merged

tmashara merged 2 commits into
mainfrom
claude/issue-28-pseudo-lines

Conversation

@tmashara

@tmashara tmashara commented Oct 29, 2026 •

Copy link
Copy Markdown
Owner

Closes #28

  • Pseudo-elements in dom: each picked element now records its ::before/::after (content, width, height, background-color, background-image, top/bottom border width and color, box-shadow; url() origin stripped). A pseudo-element only one side generates shows as -sel::before / +sel::before; one on both that differs as sel::before height 1px→2px. Shares the generated() check with the --computed walk.
  • line regions (src/compare.ts): a region whose differing pixels sit in 1–2 rows spanning ≥ half the compared width gets line: { y, h, side }. Side = which image differs from the rows on both sides of it. Summary prints line -1px@y812 instead of counting it in reg; --progress and the report card list it too.
  • (re-parented): a pair whose parent/grandparent tags differ is flagged (reparented: true in results.json), so a pairing across a structure change isn't read as the cause.
  • New divider control fixture + visual test, tests/unit/compare.test.ts, docs in docs/output.md and the skill's reference.md.

Note: accepted entries fingerprint fmtElements, so an accepted region whose elements now carry (re-parented) or a new pseudo entry reads as new once and needs re-accepting.
Follow-up (not in this PR): a line lost inside a height-change band gets no line or dom label, since band rows are excluded from regions (same as main).

🤖 Generated with Claude Code

tmashara and others added 2 commits October 29, 2026 11:03
- dom: `-sel::before` / `+sel::before` for a pseudo-element only one side
  generates, `sel::after prop l→r` when content, size or background differ.
- A region whose diff is a 1–2px row across at least half the page is
  `line -1px@yN` (signed by the side that draws it) instead of `reg`.
- A pair whose parent or grandparent tags differ is marked `(re-parented)`.

Closes #28

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…line y when widths agree

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@tmashara
tmashara merged commit 6c3b3c2 into main Oct 29, 2026
3 checks passed
@tmashara tmashara mentioned this pull request Oct 29, 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.

Surface removed pseudo-elements and thin lines in dom output

1 participant