How to Approve Visual Changes in Argos CI PR
In this article
Argos CI is a visual regression testing tool that compares screenshots of your app before and after a pull request. When a PR introduces visual differences, Argos flags them for review. Approving these changes tells Argos that the new screenshots are intentional and expected, which unblocks the PR and keeps your visual regression suite accurate. Before you start, make sure you have push access to the repository and that the Argos CI check has finished running on the PR. You'll also need a browser and the PR open on GitHub (or GitLab/Bitbucket, depending on your setup).
What You'll Need
- A GitHub (or GitLab/Bitbucket) pull request that has an Argos CI check that has completed.
- Write access to the repository (or at least the ability to comment on the PR).
- A web browser (Chrome, Firefox, Safari, or Edge).
- Optional: The Argos CLI installed locally if you prefer to manage approvals via command line.
Step-by-Step
- Open the Pull Request on your Git hosting platform (e.g., GitHub). Navigate to the PR that has the Argos CI check.
- Find the Argos CI Check in the checks section at the bottom of the PR conversation, or in the “Checks” tab. It will be listed as “Argos CI” or similar. Click on “Details” to open the Argos build page.
- Review the Visual Changes on the Argos build page. You'll see a list of screenshots that have changed. Each screenshot shows a side-by-side comparison: the base (before) and the new (after) version. Use the slider or toggle to inspect differences.
- Determine if Changes Are Intentional. If the changes are expected (e.g., you updated a component), you can approve them. If they are unexpected (e.g., a layout shift caused by an unrelated change), you should reject them and fix the issue.
- Click “Approve” on Each Screenshot that you want to accept. On the Argos build page, each changed screenshot has an “Approve” button (often a checkmark icon). Click it for every screenshot that is correct.
- Alternatively, Use “Approve All” if every change is intentional. Look for a button like “Approve all changes” or a bulk action in the toolbar. This is faster when you have many screenshots that are all expected.
- Add a Comment (Optional) to explain why you approved the changes. This is good practice for team transparency. Type in the comment box on the Argos page and submit.
- Return to the Pull Request on your Git platform. The Argos CI check should now show as “Passed” or “Approved”. If it still shows as “Pending” or “Failed”, wait a few seconds and refresh.
- If the Check Still Shows as Failed, you may need to re-run the check. On GitHub, you can click “Re-run jobs” on the check details. This is sometimes required after approving changes.
- Merge the PR once all checks (including Argos) pass. If you have branch protection rules, they will automatically allow merging after approval.
Common Mistakes
- Approving without reviewing: Clicking “Approve all” without checking each screenshot can let real bugs slip through. Always scan the diff.
- Approving the wrong build: If there are multiple Argos builds (e.g., for different browsers), make sure you are approving the correct one (e.g., Chrome vs. Firefox).
- Not refreshing after approval: The Git check status may not update instantly. Refresh the PR page after approving.
- Approving when you don't have permission: If you see an error like “You are not allowed to approve”, you lack write access. Ask a maintainer.
- Ignoring rejected screenshots: If you reject a screenshot, you must fix the underlying issue and push a new commit. The approval is not enough.
Tips
- Use the keyboard shortcuts on the Argos page (if available) to speed up navigation: e.g., “A” to approve, “R” to reject.
- Set up a review policy in Argos so that only certain team members can approve changes. This prevents accidental approvals.
- Write meaningful comments when approving, especially for non-obvious changes. This helps your team understand why a change is expected.
- Use the “Diff” view to see pixel-level changes. Sometimes the difference is subtle, like a 1px shift.
- Check the “Threshold” settings in your Argos config. If you set a small tolerance, minor changes will be flagged. Adjust it to reduce noise.
Troubleshooting
- Argos check is stuck on “Pending”: Wait a few minutes. If it persists, check the Argos build page for errors. Re-run the check from the Git platform.
- “Approve” button is greyed out: This usually means you don't have permission. Contact a repository admin to grant you write access.
- Approved but check still shows “Failed”: Refresh the page. If it still fails, try re-running the check. If that doesn't work, there might be a new commit that created new changes; approve those as well.
- Changes look identical but Argos flags them: This can happen due to anti-aliasing or rendering differences. Use the “Diff” mode to see if it's a real change. If it's noise, you can increase the threshold in your config.
- Can't find the Argos build link: Look for the check in the PR's “Checks” tab, or in the “Conversation” tab under “All checks have passed”. If it's missing, the CI may not have run—check your CI configuration.
- Accidentally approved a bad change: You can't unapprove directly. Instead, push a new commit that fixes the issue, then reject the new changes or approve them after fixing.
Frequently Asked Questions
Do I need to approve every screenshot individually?
No, you can use the “Approve all” button if all changes are intentional. However, it's safer to review each one, especially if you're not sure.
What happens if I reject a change?
Rejecting a change marks it as a failure. The PR cannot be merged until you fix the issue and push a new commit. The new commit will generate a new build that you must review again.
Can I approve changes from the command line?
Yes, if you have the Argos CLI installed, you can use commands like argos approve with the build ID. Check the Argos documentation for exact syntax.
Will approving changes affect future PRs?
Yes, approving a change updates the baseline for that screenshot. Future PRs will compare against the new version, so only approve changes that are truly intended.
How do I know if a change is intentional?
Review the PR description and the code changes. If the screenshot change aligns with the code changes (e.g., a new button), it's likely intentional. If it's unrelated, it might be a bug.
Can I set up automatic approval for certain files?
Argos doesn't support automatic approval by file pattern. You can configure thresholds to ignore minor changes, but all changes need manual approval or rejection.