Skip to content

feat(snapshots): Add diff_threshold field to snapshot manifest#3259

Merged
NicoHinderling merged 4 commits intomasterfrom
add-diff-threshold-snapshot-field
Apr 9, 2026
Merged

feat(snapshots): Add diff_threshold field to snapshot manifest#3259
NicoHinderling merged 4 commits intomasterfrom
add-diff-threshold-snapshot-field

Conversation

@NicoHinderling
Copy link
Copy Markdown
Contributor

Add an optional --diff-threshold CLI flag to the build snapshots command. The value is included in the snapshot manifest JSON sent to the backend.

When set, Sentry will only report images as changed if their pixel difference percentage exceeds the given threshold (e.g. 0.01 = only report changes >= 1%). The backend does not yet consume this field — a follow-up PR in getsentry/sentry will read and apply it during comparison.

Changes:

  • SnapshotsManifest: new diff_threshold: Option<f64> field, skipped when None
  • make_command: new --diff-threshold <THRESHOLD> CLI argument
  • execute: wires the CLI value into the manifest

Add an optional --diff-threshold CLI flag that is passed through to the
backend in the snapshot manifest. When set, Sentry will only report
images as changed if their pixel difference exceeds the given threshold
(e.g. 0.01 = 1%).

Co-Authored-By: Claude <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 9, 2026

Messages
📖 Do not forget to update Sentry-docs with your feature once the pull request gets approved.

Generated by 🚫 dangerJS against 8b593f2

NicoHinderling and others added 2 commits April 9, 2026 13:58
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
@NicoHinderling NicoHinderling marked this pull request as ready for review April 9, 2026 20:59
@NicoHinderling NicoHinderling requested review from a team as code owners April 9, 2026 20:59
Co-Authored-By: Claude <noreply@anthropic.com>
@NicoHinderling NicoHinderling merged commit 1fb5ec5 into master Apr 9, 2026
26 checks passed
@NicoHinderling NicoHinderling deleted the add-diff-threshold-snapshot-field branch April 9, 2026 23:08
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.

3 participants