ref(snapshots): Add per-image diffThreshold support#114335
Merged
NicoHinderling merged 1 commit intomasterfrom Apr 30, 2026
Conversation
This was referenced Apr 29, 2026
Contributor
Author
a34d2c6 to
a7961b9
Compare
mtopo27
approved these changes
Apr 29, 2026
a7961b9 to
fee151e
Compare
f219e4a to
36d7e60
Compare
Contributor
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit fee151e. Configure here.
fee151e to
dcfb54f
Compare
a643679 to
6cec430
Compare
dcfb54f to
30a0c00
Compare
6cec430 to
c94402b
Compare
30a0c00 to
c41fa47
Compare
c94402b to
3aced66
Compare
c41fa47 to
1c527f9
Compare
3aced66 to
e920ab8
Compare
1c527f9 to
8341e0e
Compare
e920ab8 to
a5fae76
Compare
1b406a8 to
a09a848
Compare
a5fae76 to
4488ab1
Compare
Base automatically changed from
04-28-perf_snapshots_buffer_image_swap_to_eliminate_flash_during_single-view_navigation
to
master
April 30, 2026 00:41
…d value consideration
a09a848 to
1e6255c
Compare
cleptric
pushed a commit
that referenced
this pull request
May 5, 2026
## Summary Adds support for per-image `diff_threshold` values in snapshot comparisons. Previously, only a single global `diff_threshold` applied to all images. Now, individual images in the manifest can specify their own threshold, with per-image taking precedence over global. **Changes:** - Added optional `diff_threshold` field to `ImageMetadata` (validated to `[0.0, 1.0)`) - Updated `compare_snapshots` task to resolve threshold with per-image > global > 0.0 fallback - Resolved effective `diff_threshold` onto each `SnapshotImageResponse` in the API (per-image or global fallback), so it's visible in the frontend metadata tooltip - Enhanced debug logging to show per-image and global threshold values
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Summary
Adds support for per-image
diff_thresholdvalues in snapshot comparisons. Previously, only a single globaldiff_thresholdapplied to all images. Now, individual images in the manifest can specify their own threshold, with per-image taking precedence over global.Changes:
diff_thresholdfield toImageMetadata(validated to[0.0, 1.0))compare_snapshotstask to resolve threshold with per-image > global > 0.0 fallbackdiff_thresholdonto eachSnapshotImageResponsein the API (per-image or global fallback), so it's visible in the frontend metadata tooltip