Skip to content

docs(adr): add Percy automation ADR#515

Merged
HenriqueLimas merged 8 commits intomainfrom
percy-adr
Feb 23, 2026
Merged

docs(adr): add Percy automation ADR#515
HenriqueLimas merged 8 commits intomainfrom
percy-adr

Conversation

@HenriqueLimas
Copy link
Member

Description

Created ADR following changes from #414

@HenriqueLimas HenriqueLimas self-assigned this Feb 12, 2026
Copilot AI review requested due to automatic review settings February 12, 2026 20:33
@changeset-bot
Copy link

changeset-bot bot commented Feb 12, 2026

⚠️ No Changeset found

Latest commit: 6651a0b

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds an ADR documenting the decision to automate Percy visual regression testing with partial builds in GitHub Actions.

Changes:

  • Introduces ADR 0002 describing Percy automation approach (partial PR builds + full main builds).
  • Documents dependency tracking via component-metadata.json and expected tradeoffs.

Comment on lines +19 to +24
- Using the existing `component-metadata.json` mappings (component and submodules fields) to determine snapshot dependencies
- Triggering full builds only when global files change (tokens, variables, mixins)

2. **Full builds for main commits**: Execute and auto-approve the complete snapshot suite on the main branch

3. **Simplified dependency tracking**: Re-use existing component metadata instead of automated code analysis (e.g., mixin dependency detection), as the additional complexity provides minimal benefit
Copy link

Copilot AI Feb 12, 2026

Choose a reason for hiding this comment

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

For clarity/consistency in an ADR, consider formatting field names as code (e.g., component and submodules) and using “Reuse” instead of “Re-use” (common spelling in most style guides).

Suggested change
- Using the existing `component-metadata.json` mappings (component and submodules fields) to determine snapshot dependencies
- Triggering full builds only when global files change (tokens, variables, mixins)
2. **Full builds for main commits**: Execute and auto-approve the complete snapshot suite on the main branch
3. **Simplified dependency tracking**: Re-use existing component metadata instead of automated code analysis (e.g., mixin dependency detection), as the additional complexity provides minimal benefit
- Using the existing `component-metadata.json` mappings (`component` and `submodules` fields) to determine snapshot dependencies
- Triggering full builds only when global files change (tokens, variables, mixins)
2. **Full builds for main commits**: Execute and auto-approve the complete snapshot suite on the main branch
3. **Simplified dependency tracking**: Reuse existing component metadata instead of automated code analysis (e.g., mixin dependency detection), as the additional complexity provides minimal benefit

Copilot uses AI. Check for mistakes.
Copy link
Collaborator

@agliga agliga left a comment

Choose a reason for hiding this comment

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

I would call the file 002-visual-regression-testing
If it ever gets superceeded its hard to see what superceeded it.

I also would add the problem not being about the snapshots but rather we need to test visual regression on our css code.
I think being generic is key with these adrs

I like the steps part and such.
I would add also other frameworks we looked at if we did any why we didn't pick those.

@ianmcburnie
Copy link
Contributor

So we already have a 0002: #509. Even if that one gets rejected, it will stay as 0002

@HenriqueLimas
Copy link
Member Author

I also would add the problem not being about the snapshots but rather we need to test visual regression on our css code.
I think being generic is key with these adrs

My understanding was that this ADR was about automating Percy visual regression, not about visual regression itself as we decided on that already.

I would call the file 002-visual-regression-testing
If it ever gets superceeded its hard to see what superceeded it.

Agree that it should be generic, but as mentioned above I think it should be about the automation so 003-visual-regression-automation

HenriqueLimas and others added 2 commits February 12, 2026 15:22
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@ianmcburnie
Copy link
Contributor

My understanding was that this ADR was about automating Percy visual regression, not about visual regression itself as we decided on that already.

That was my understanding too.

@agliga
Copy link
Collaborator

agliga commented Feb 17, 2026

My understanding was that this ADR was about automating Percy visual regression, not about visual regression itself as we decided on that already.

That was my understanding too.

Hmm I think there's a disconnect here. What prompted in writing this ADR is that we wanted to show that we chose Percy visual regression testing over Vitest snapshot or whatever other testing framework.

If we keep it as is, Im wondering then what is the point of this ADR.
My understanding for ADR is to catch decisions and why we made it.

  • Saying we chose Percy over X other visual regression tools is a good decision record.
  • Saying we chose to automate Percy over not automate Percy seems to get into the area of having too many ADRs for each thing we do.

Our goal is always to automate as many things as we can. The assumption is that we try to automate everything.
IMO, an ADR would make sense if we had tried to automate Percy and decided not to. That goes against our ways of working and we should document that.

It would be like adding changesets instead of just publishing manually. We don't need an ADR for that, we just do it because our goal is to automate everything we can...
But if we were to choose changesets over another tool, that to me makes sense to have an ADR.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@HenriqueLimas
Copy link
Member Author

@agliga make sense, and I agree. I have updated the ADR with the information regarding the visual-html that we discussed in the past. Can you check if I missed any item to be added?

Copy link
Collaborator

@agliga agliga left a comment

Choose a reason for hiding this comment

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

To me this looks great! I think its almost there.

I think there's a couple of minor edits, but Im fine approving after this.

I would also remove any mention of eBay as a whole.
We should talk about this from an open source perspective.

HenriqueLimas and others added 2 commits February 18, 2026 11:14
Co-authored-by: Andrew Gliga <agliga4@gmail.com>
Co-authored-by: Andrew Gliga <agliga4@gmail.com>
agliga
agliga previously approved these changes Feb 19, 2026
Copy link
Contributor

@ianmcburnie ianmcburnie left a comment

Choose a reason for hiding this comment

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

Thanks for this.

ianmcburnie
ianmcburnie previously approved these changes Feb 20, 2026
Copy link
Contributor

@ArtBlue ArtBlue left a comment

Choose a reason for hiding this comment

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

Looks great. Just a couple of minor things.

Key factors in this decision:

1. **Existing infrastructure**: We already have an existing Percy account, eliminating procurement and setup overhead
2. **Cross-browser testing**: Percy provides testing across multiple browsers (Chrome, Firefox, Safari, Edge), which visual-html does not natively support
Copy link
Contributor

Choose a reason for hiding this comment

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

There are a couple of other factors IMO.

  1. Percy has responsive testing out of the box, which also has specific mobile browser testing
  2. Percy is actively being maintained and improved, so we should have more abilities to scale and automate in the future.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Agree with this

Reintroduce the original operational context and implementation details for Percy automation, including partial PR builds, full main builds, and metadata-based dependency tracking. Capture the key cost, speed, and maintenance tradeoffs without duplicating rationale across sections.

Co-authored-by: Cursor <cursoragent@cursor.com>
Copy link
Contributor

@ArtBlue ArtBlue left a comment

Choose a reason for hiding this comment

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

Nice

@HenriqueLimas HenriqueLimas merged commit c15215d into main Feb 23, 2026
3 checks passed
@HenriqueLimas HenriqueLimas deleted the percy-adr branch February 23, 2026 23:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants