Poliage

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:

  1. New assets are generated
  2. Each asset is compared pixel-by-pixel against the previous version
  3. A diff manifest is created showing: new, changed, or unchanged assets
  4. Changed assets show exactly which pixels differ

Configuration

Enable and configure diffing in docsync.config.json:

{
  "diffing": {
    "enabled": true,
    "threshold": 0.1,
    "includeAA": false
  }
}
PropertyTypeDefaultDescription
enabledbooleantrueEnable visual diffing
thresholdnumber0.1Sensitivity (0.0 to 1.0)
includeAAbooleanfalseInclude anti-aliasing pixels in diff

Threshold Settings

ThresholdBehavior
0.0Exact match required (very strict)
0.1Catches meaningful changes (recommended)
0.5Only catches significant changes
1.0Almost everything passes

Anti-Aliasing

The includeAA option controls whether anti-aliasing differences are flagged:

  • false (default): Ignores minor rendering differences between browsers/platforms
  • true: 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 assets

Manifest 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.