Skip to content

docs: Add Snapshots EA product documentation#17327

Draft
mtopo27 wants to merge 4 commits intomasterfrom
mtopo27/snapshots-ea-product-docs
Draft

docs: Add Snapshots EA product documentation#17327
mtopo27 wants to merge 4 commits intomasterfrom
mtopo27/snapshots-ea-product-docs

Conversation

@mtopo27
Copy link
Copy Markdown
Contributor

@mtopo27 mtopo27 commented Apr 13, 2026

Add three new pages for the Snapshots visual regression testing feature (Early Adopter) at /product/snapshots/.

Snapshots lets users generate PNG screenshots in CI, upload them to Sentry via sentry-cli, and get pixel-level diffs reported as GitHub Checks on pull requests. This is the initial EA documentation covering the core workflow.

Pages added:

  • Snapshots (index.mdx) — Overview, how it works (5-step flow), and prerequisites
  • Upload Snapshots (setup/index.mdx) — Directory format, JSON sidecar metadata, and a complete GitHub Actions workflow
  • Review Snapshots (review-workflow/index.mdx) — Status checks, comparison viewer, approval flow, and project settings

All pages include the EA banner. Screenshot placeholders (IMAGE: ...) are used where real screenshots will be added later.

REFS EME-1029

Add three new pages for the Snapshots visual regression testing feature
(Early Adopter). Covers the overview and prerequisites, upload setup
with CI workflow, and the review/approval workflow with project settings.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel bot commented Apr 13, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
sentry-docs Ready Ready Preview, Comment Apr 14, 2026 7:42pm
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
develop-docs Ignored Ignored Preview Apr 14, 2026 7:42pm

Request Review

@linear-code
Copy link
Copy Markdown

linear-code bot commented Apr 13, 2026

EME-1029 Product Docs

Copy link
Copy Markdown
Contributor

@runningcode runningcode left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good!


## Status Checks

After you upload snapshots from a pull request branch, a **Snapshot Testing** GitHub Check appears on the pull request. If no snapshots changed, the check passes. If any snapshots were added, removed, or modified, the check fails and requires approval.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we explain that the default is that added snapshots don't fail here?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will have that in the settings section and maybe just a link to "if you want to change your failure settings..."

- **Wipe** — Drag a slider across the image to compare base and current branch.
- **Onion** — Overlay both images with an adjustable opacity slider.

IMAGE: Sentry Snapshot comparison viewer showing a modified image with split diff
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we make this a gif of using the onion mode on an ogre ? that would make my day.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lol we'll save that for the EA blog

```json
{
"display_name": "Billing Page",
"group": "Settings"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can also add other fields as extras here, they will become tags.
For example:

  "device": "id:pixel_5",
  "nightMode": true

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

didn't want to put that until they're actually used downstream (my understanding is that it's not in any way atm)

branches: [main]
pull_request:

concurrency:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's leave the concurrency out of this snippet.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

whoops, slipped in, 👍

steps:
- uses: actions/checkout@v4
with:
# Use PR head SHA, not the merge commit — avoids phantom diffs
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is this?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

took from our sentry yml, not sure if we want in example workflow or not: https://github.com/getsentry/sentry/blob/master/.github/workflows/frontend-snapshots.yml#L42

build snapshots "${{ env.SNAPSHOT_OUTPUT_DIR }}"
--app-id <your-app-id>
--project <your-sentry-project>
--head-sha "${{ github.event.pull_request.head.sha || github.sha }}"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

head-sha, vcs-provider and head-repo-name will be auto-detected in github actions so we should rely on that.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

going off our workflow: https://github.com/getsentry/sentry/blob/master/.github/workflows/frontend-snapshots.yml#L86

also how much do we want to write for github actions vs. general? not sure what we do for size/distro

--head-repo-name "${{ github.repository }}"
)

if [[ "${{ github.event_name }}" == "pull_request" ]]; then
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these will also all be auto detected so we should just rely on that.

sentry-cli "${ARGS[@]}"
```

A few things to note about this workflow:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's remove these 3 points. they are slop.


## How It Works

1. **Generate snapshots** — Your CI job produces PNG screenshots however you like: Playwright, Storybook, simulator captures, or any tool that outputs PNGs.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we mention Paparazzi?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will change out 👍


<Include name="feature-available-for-user-group-early-adopter" />

## Status Checks
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we add PR comments on this page as well?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll put mention in the settings but since status check control a core workflow i think worth the callout. tbh this page is all slop rn and will get a rework

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.

2 participants