Skip to content

ci: add Chromatic workflow and clarify release cadence#737

Open
QuintonJason wants to merge 6 commits into
mainfrom
ci/add-chromatic
Open

ci: add Chromatic workflow and clarify release cadence#737
QuintonJason wants to merge 6 commits into
mainfrom
ci/add-chromatic

Conversation

@QuintonJason

@QuintonJason QuintonJason commented May 15, 2026

Copy link
Copy Markdown
Contributor

Description

Two related changes:

  1. Wire up Chromatic visual regression in CI. The @chromatic-com/storybook addon is already configured in libs/core/.storybook/main.js, but no CI workflow ran against it — so visual regressions could ship undetected. This adds .github/workflows/chromatic.yml that builds doc-components → Stencil → Storybook, then publishes to Chromatic on PR and push to main/next. Fork PRs are skipped because repository secrets are unavailable to them.

  2. Document the actual release cadence. CONTRIBUTING.md now explains how Visual regression and Releases work, and the comment block at the top of schedule-release.yml is expanded to make clear that releases are manual / on-demand via workflow_dispatch (and workflow_call) — there is no weekly cron yet. Contributors were sometimes asking when the next release would auto-cut; this answers that.

Required maintainer action: add a CHROMATIC_PROJECT_TOKEN repo secret (from the Pine Chromatic project) before merging. Without it the new workflow will fail at the publish step.

Part of the design-system maturity push — closes the Level-4 "Visual regression testing" gap.

Fixes #(no-issue)

Type of change

  • New feature (non-breaking change which adds functionality)
  • This change requires a documentation update

How Has This Been Tested?

  • Confirmed @chromatic-com/storybook is already installed at libs/core/.storybook/main.js.
  • Verified the workflow only requires a single new secret (CHROMATIC_PROJECT_TOKEN).
  • Verified the fork-PR guard expression matches the official GitHub Actions pattern.

This PR cannot be fully exercised until the maintainer adds the secret; the first run after merge will surface any environmental issues.

  • unit tests
  • e2e tests
  • accessibility tests
  • tested manually (workflow syntax review)
  • other: pending live CI run after secret is added

Test Configuration:

  • Pine versions: 3.25.1 (current main)
  • OS: macOS 25.3.0
  • Browsers: n/a
  • Screen readers: n/a
  • Misc: GitHub Actions

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing tests pass locally with my changes
  • Design has QA'ed and approved this PR

cc @Kajabi/dss-devs


Note

Low Risk
CI and documentation only; no application runtime, auth, or data-path changes. Requires adding CHROMATIC_PROJECT_TOKEN for the job to run.

Overview
Adds Chromatic visual regression to CI via a new workflow that runs on PRs and pushes to main/next. It builds doc-components, Stencil, and static Storybook, then publishes from libs/core when CHROMATIC_PROJECT_TOKEN is set; otherwise it skips gracefully. Fork PRs are excluded from secret use; chromaui/action is pinned by SHA; PR runs use exitZeroOnChanges while main/next use autoAcceptChanges.

CONTRIBUTING documents Chromatic setup (secret, fork behavior) and that releases are manual via workflow_dispatch/workflow_call, not cron. schedule-release.yml comments are expanded to match that on-demand cadence and how to enable a future schedule.

Reviewed by Cursor Bugbot for commit 119d545. Bugbot is set up for automated code reviews on this repo. Configure here.

@QuintonJason QuintonJason requested a review from a team as a code owner May 15, 2026 14:00
@netlify

netlify Bot commented May 15, 2026

Copy link
Copy Markdown

Deploy Preview for pine-design-system ready!

Name Link
🔨 Latest commit 119d545
🔍 Latest deploy log https://app.netlify.com/projects/pine-design-system/deploys/6a1706b29db9670008e4198c
😎 Deploy Preview https://deploy-preview-737--pine-design-system.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Comment thread .github/workflows/chromatic.yml Outdated
Comment thread .github/workflows/chromatic.yml
Comment thread .github/workflows/chromatic.yml
Wire up Chromatic visual regression on PR and push to main/next. The
`@chromatic-com/storybook` addon was already configured in
libs/core/.storybook/main.js but no CI workflow ran against it.

Fork PRs are skipped because repository secrets are unavailable. A
`CHROMATIC_PROJECT_TOKEN` secret must be added by maintainers.

Also clarify (in CONTRIBUTING.md and schedule-release.yml comments)
that releases today run manually via workflow_dispatch — there is no
weekly cron yet — so contributors know where to look when they ask.
Document and apply the per-branch policy for visual regressions:

- PRs use exitZeroOnChanges so the workflow stays green; Chromatic's
  own PR status check is what blocks merge when diffs are unapproved.
  This keeps unrelated required checks visible.
- main (and by extension next via the workflow trigger) auto-accept
  visual diffs into the baseline so post-merge re-approval is not
  required for code that has already passed review.
Avoid failing PR checks until CHROMATIC_PROJECT_TOKEN is added to repo secrets.
Address Aikido supply-chain finding on floating third-party action tag.
Check out PR head SHA, use pinned npm setup composite, and auto-accept
visual changes on both main and next.
@QuintonJason QuintonJason self-assigned this May 27, 2026

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 3c4ba46. Configure here.

Comment thread .github/workflows/chromatic.yml Outdated
Comment thread .github/workflows/chromatic.yml Outdated
Move CHROMATIC_PROJECT_TOKEN check to a step-level gate because secrets
are unavailable in job-level if expressions, and use picomatch extglob
@(main|next) for autoAcceptChanges.
@QuintonJason QuintonJason requested a review from pixelflips May 27, 2026 15:43

@pixelflips pixelflips left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

How do we see the results, and don't forget to add the token, otherwise LGTM! 👍🏼

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.

3 participants