Visual Diffing
Poliage automatically compares new assets against previous versions to detect UI regressions. This helps you catch unintended visual changes before they reach production.
How It Works
Every time you run scenarios:
- New assets are generated
- Each asset is compared pixel-by-pixel against the previous version
- A diff manifest is created showing: new, changed, or unchanged assets
- Changed assets show exactly which pixels differ
Configuration
Enable and configure diffing in docsync.config.json:
{
"diffing": {
"enabled": true,
"threshold": 0.1,
"includeAA": false
}
}Threshold Settings
Anti-Aliasing
The includeAA option controls whether anti-aliasing differences are flagged:
false(default): Ignores minor rendering differences between browsers/platformstrue: Flags all pixel differences including font smoothing
Keep includeAA: false for most use cases to avoid false positives from cross-platform rendering differences.
Diff Output
After running scenarios, the diff results are available in:
.poliage/output/
├── homepage.png
├── homepage.diff.png # Visual diff overlay
└── manifest.json # Diff status for all assetsManifest Example
{
"assets": [
{ "key": "homepage", "status": "unchanged" },
{ "key": "login-form", "status": "changed", "diffPercent": 2.3 },
{ "key": "new-feature", "status": "new" }
]
}Platform Review
If using Poliage Platform, changed assets automatically enter the Review Queue for approval before going live.