visualdiff

v0.1.0
io.github.CloudCorpRecords/visualdiff Checked 3 days ago Published 1 month ago

SnapDiff visual diffs: verify UI changes, compare pages, screenshots, HTML to image.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

snapdiff_verify_ui_change

Verify a UI change matches the stated intent. Returns a verdict (pass, expected_change_detected, unexpected_regression, no_change_detected, or needs_human_review), a next_action, and a review_url. Requires a SnapDiff project and a stored page baseline.

ParameterTypeDescription
after *stringURL of the page after the change.
intent *stringDescription of the intended UI change.
page_name *stringName of the page with a stored baseline.
project *stringSnapDiff project slug.
branchstringBranch name for the comparison.
full_pagebooleanWhether to capture the full page instead of the viewport.
ignore_selectorsarrayCSS selectors for elements to ignore in the comparison.
intent_regionsarrayRegions where the intended change is expected.
match_tolerance_percentnumberMatch tolerance as a percentage.
thresholdnumberVisual difference threshold.

snapdiff_compare_pages

Visually compare two web pages and return a diff percentage plus a highlighted diff image. Pass a before and an after URL for an ad-hoc diff, or an after URL with a project and page_name to diff against the stored project baseline.

ParameterTypeDescription
after *stringURL of the page after the change.
beforestringURL of the page before the change.
branchstringBranch name for the comparison.
full_pagebooleanWhether to capture the full page instead of the viewport.
ignore_selectorsarrayCSS selectors for elements to ignore in the comparison.
page_namestringName of the page with a stored baseline.
projectstringSnapDiff project slug.
thresholdnumberVisual difference threshold.

snapdiff_capture_screenshot

Take a screenshot of a web page, to inspect its current layout, verify rendering, or capture a baseline for later comparison.

ParameterTypeDescription
url *stringURL of the page to capture.
dark_modebooleanWhether to capture the page in dark mode.
full_pagebooleanWhether to capture the full page instead of the viewport.
selectorstringCSS selector for the element to capture.
widthnumberViewport width in pixels.

snapdiff_html_to_image

Render HTML/CSS directly to an image, for social cards, OG images, email headers, or any visual built from code without a hosted URL.

ParameterTypeDescription
html *stringHTML markup to render.
cssstringCSS styles to apply to the HTML.
heightnumberImage height in pixels.
widthnumberImage width in pixels.