Skip to content

test(ios): Set diffThreshold to 0.002 on CommentsScreen preview#797

Draft
cameroncooke wants to merge 1 commit intomainfrom
cameroncooke/test/add-diff-threshold-comments-preview
Draft

test(ios): Set diffThreshold to 0.002 on CommentsScreen preview#797
cameroncooke wants to merge 1 commit intomainfrom
cameroncooke/test/add-diff-threshold-comments-preview

Conversation

@cameroncooke
Copy link
Copy Markdown
Contributor

Tighten the snapshot diff tolerance for the StoryScreen_Preview in
CommentsScreen.swift by setting .diffThreshold(0.002) on the preview.

The repo recently adopted SnapshotPreviews + SwiftSnapshotTesting for
uploading previews as snapshots to Sentry (#780). The library's default
diff threshold is lenient enough that small rendering regressions in
the comments screen can slip through unnoticed. 0.002 matches a tight
tolerance while still tolerating sub-pixel antialiasing noise.

This is intentionally a one-preview change so we can observe how the
tighter threshold behaves against the existing baseline before rolling
it out more broadly to other previews.

Tighten the snapshot diff tolerance for the CommentsScreen preview so
small rendering regressions are caught by snapshot testing instead of
being swallowed by a looser default threshold.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@sentry
Copy link
Copy Markdown

sentry Bot commented Apr 24, 2026

📲 Install Builds

iOS

🔗 App Name App ID Version Configuration
HackerNews com.emergetools.hackernews 3.10 (1) Release
HackerNews com.emergetools.hackernews 3.10 (1) AdHoc

⚙️ launchpad-test-ios Build Distribution Settings

@emerge-tools
Copy link
Copy Markdown

emerge-tools Bot commented Apr 24, 2026

📸 Snapshot Test

2 modified, 42 unchanged

Name Added Removed Modified Renamed Unchanged Errored Approval
HackerNews
com.emergetools.hackernews.snapshots
0 0 2 0 42 0 ⏳ Needs approval

🛸 Powered by Emerge Tools

@sentry
Copy link
Copy Markdown

sentry Bot commented Apr 24, 2026

Sentry Snapshot Testing

Name Added Removed Modified Renamed Unchanged Skipped Status
com.emergetools.hackernews
com.emergetools.hackernews
0 0 9 0 123 0 ⏳ Needs approval

⚙️ hackernews-ios Snapshot Settings

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.

1 participant