Skip to content
Screenshots in CI

Require screenshots on pull requests

Add a screenshot step to your pull request checks, so a UI change can't merge without showing what it looks like.

How it works #

Once the uploads.sh GitHub App is installed, a check called Check for visuals shows up in a pull request’s checks whenever the PR changes UI files. It sits next to your tests and builds, and looks for screenshots or recordings on the PR from your coding agent, the uploads CLI, or images dragged into the PR on GitHub.

Out of the box the check only reports. It goes neutral (“UI changed, no visuals attached”), so nobody is blocked or notified. Turn on a requirement and it fails until the screenshots are there, then passes on its own when they arrive. Make it a required check in GitHub and it works like a linter for UI changes.

No CI workflow or GitHub Actions step is needed. The check comes from the GitHub App, the same way other GitHub integrations post theirs, and it re-runs on each push, each new upload, and each approval.

The check is built around screenshots and screen recordings today. Other file types, like test reports and logs, may get their own checks later.

Basic setup #

Make sure every pull request that changes your UI has at least one screenshot or recording:

  1. Install the GitHub App on the repository from GitHub. The check starts reporting right away.

  2. Turn on the requirement. A workspace admin can switch on Require screenshots on UI changes under Settings → GitHub in uploads.sh, for every repo in the workspace. Or commit this to one repo’s .uploads.yml:

    .uploads.yml
    comment:
    check:
    require: [uploads]
  3. Make it required in GitHub. In the repo’s Settings → Branches (or Rules), require status checks to pass before merging and add Check for visuals. GitHub only lists a check after it has run once, so open or update a pull request first. The check used to be called uploads.sh; if a rule still requires that name, swap it for the new one.

Every pull request gets the check, and one that changes no UI files is skipped straight away. GitHub counts a skipped check as passing.

Which files count as UI #

By default, changes to .astro, .tsx, .jsx, .vue, .svelte, .html, .css, .scss and .less files, and anything in an email/ folder. It’s the same list the CLI’s pre-PR reminder uses. Deleted files, and files moved without edits, don’t count.

To choose the files yourself for every repo in a workspace, list them under UI file paths in Settings → GitHub. One repo can set its own list under uiPaths, which replaces the workspace list:

.uploads.yml
comment:
uiPaths:
- "apps/web/**"
- "*.css"

A pattern without a slash matches a file name anywhere. One with a slash starts at the repo root. uiPaths: [] turns the check off for that repo.

Ask for more than one screenshot #

List what every UI change should include. The PR comment shows a checklist that ticks itself as files arrive, the check’s summary repeats it, and the check passes once every item is ticked:

.uploads.yml
comment:
check:
require: [before-after, desktop, mobile]
ItemPasses when

uploads (or any)

The PR has at least one image or video. Every other item implies it.
before-after

There’s a capture uploaded with –state before and one with –state after.

desktop, mobile

There’s a capture of each. The AI label decides when it’s set, otherwise the frame’s shape (tall reads as mobile, wide as desktop).

A repo’s check.require replaces the workspace’s Require screenshots on UI changes switch.

What counts #

  • Images and videos uploaded with uploads.sh, from the CLI, the MCP server, or an agent, including ones staged before the PR existed. A PDF, a log, or a JSON file still shows on the pull request. Those files do not meet this check.
  • Images and videos dragged into the PR on GitHub, in the description or a comment. Links to images committed to the same repo (blob/…/shot.png?raw=true) count too. These pass uploads, so contributors without uploads.sh are never stuck. The other items need files uploaded with uploads.sh.
  • Held files. An image or video held for review still counts toward the requirement. A hold never blocks a merge.

Skip a pull request #

A PR that needs no screenshots can skip the requirement with a label: uploads:skip-verify, skip-uploads, or uploads-skip, in any case. The check is skipped right away, and the comment says the requirement was skipped and by which label. A repo can list its own labels instead:

.uploads.yml
comment:
check:
require: [uploads]
skipLabels: ["no-screenshots"]

AI notes #

AI notes are a second look at the screenshots themselves. A note that ran shows up under the checklist in the check’s summary and in the PR comment. A warning is named in the check’s title. They never fail the check.

.uploads.yml
comment:
check:
ai: all
NoteWarns when
ready-screen

A capture uploaded with –state after looks like it is still loading, blank, or showing an error. Before captures are never judged, since a broken screen is a fine before.

identical-before-after

A before and an after are the same picture. A few bits of compression noise still count as the same picture.

A note that ran shows as ok or as a warning. A skipped note stays out of the check and the comment. The check skips a note when it has nothing to judge, such as no file marked as after. It skips the before-and-after note when it has no readable hash to compare. When every note was skipped, the AI notes section is left out. The notes read the AI labels uploads.sh adds to each image, so they need AI labels on for the workspace. Add the uploads:no-ai label to a PR to hide them.

The how-to comment #

A pull request that changes a UI file with nothing attached also gets a short comment. It names the changed files and the ways to add screenshots. It’s the same managed comment the App keeps on every PR, so the first upload replaces it with the normal screenshots.

Ask for screenshots under Settings → GitHub decides when the comment appears:

  • When UI files change (the default): only on PRs that change UI files.
  • On every PR: on any pull request with nothing attached.
  • Never: no comment. The check still reports UI changes.

A repo can set the same thing with noUploadsComment: auto, always, or never. true and false still work and mean auto and never.

Manage it from uploads.sh #

Workspace admins can change these under Settings → GitHub without touching any repo:

  • Require screenshots on UI changes: fail the check on UI changes with nothing attached.
  • UI file paths: which files count as UI changes.
  • Ask for screenshots: when the how-to comment appears.

Each applies to every repo in the workspace. A repo’s .uploads.yml wins where it sets the same thing, and the settings page shows which repo values are in effect.

Check results #

ResultWhen
Success

Every attached file is published, e.g. “3 files attached”, or every required item is there.

Neutral

A file is held for review, or UI files changed with nothing attached and nothing required.

Skipped

A skip label is on, or the PR changes no UI files and has nothing attached. GitHub folds these under “skipped checks” and counts them as passing.

FailureOnly when a requirement is on and the PR is missing something.

Every pull request in a connected repo gets the check, so a skipped run tells you the install works. Backend-only PRs still get no comment by default.

Troubleshooting #

  • No check on the PR. The App isn’t installed on the repo, the repo isn’t connected to a workspace, or the PR comes from a fork and has nothing attached yet. If your org installed the App before checks existed, an org admin has to approve the new Checks permission first. See Permissions & events.
  • Check for visuals isn’t listed in branch protection. GitHub lists a check only after it has run on the repo once. Open or update a pull request, then add it.
  • A mobile capture reads as desktop. Without an AI label, the shape decides. Crop a phone capture to its viewport, or use uploads screenshot --frame for device chrome.
  • A PR is skipped by mistake. Remove the skip label and the check re-evaluates.