Skip to content

Add pixel-level visual screenshot diff (in addition to tree diff) #97

@thymikee

Description

@thymikee

Screenshots exist via the screenshot command, and diff snapshot compares the accessibility tree structure. There is no pixel-level visual diff. When building UI, the question is often "does this look right?" not just "is the tree shaped right?" — visual regressions (wrong colors, alignment, cropping) can be missed by tree diffs.

Proposal: Add a diff screenshot (or similar) command that:

  • Captures a screenshot and compares it to a baseline image (e.g. from previous run or a provided path).
  • Uses perceptual hashing or pixel comparison; reports difference (e.g. score or pass/fail) and optionally saves the diff image.
  • Integrates with session/baseline flow where it makes sense (e.g. first run saves baseline, subsequent runs compare).

Acceptance criteria:

  • Command to compare current screenshot to a baseline (file or session-stored)
  • Output includes at least pass/fail or a difference metric; optional diff image output
  • Document baseline storage and CI usage
  • Docs and skill updated

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions