Skip to content

chore: add figma code connect coverage guard to lint pipeline#751

Merged
QuintonJason merged 4 commits into
ci/component-status-guardfrom
ci/figma-coverage-guard
Jun 5, 2026
Merged

chore: add figma code connect coverage guard to lint pipeline#751
QuintonJason merged 4 commits into
ci/component-status-guardfrom
ci/figma-coverage-guard

Conversation

@QuintonJason

@QuintonJason QuintonJason commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

Description

Adds a CI-gated check that every top-level pds-* component is either mapped (has libs/figma/components/<name>.figma.ts) or explicitly waived in a new machine-readable libs/figma/code-connect-waivers.json. Prevents a new component from silently shipping with no Code Connect mapping and no deliberate decision, and flags redundant waivers (component since mapped) and orphaned waivers (component removed) so the waiver list cannot rot.

Seeded the waiver file with the 15 top-level components that currently have no .figma.ts (notes carried over from CODE_CONNECT_COVERAGE.md). No .figma.ts files were authored here — real mappings need Figma node URLs from design and are a paired follow-up; waiving keeps the gap honest and tracked.

Extracts a shared component-enumeration helper (libs/core/scripts/lib/components.mjs) used by both this guard and the component-status guard so their globbing logic can't diverge.

Stacked on #750 (component-status guard) for the shared helper. Review/merge #750 first; this will auto-retarget to main.

Why no workflow changes: gated via lint.figma in run-p lint.*, which the existing nx affected --target=lint job already runs.

Note for #736 author: once CODE_CONNECT_COVERAGE.md lands on main, that doc and this JSON both list the 15 gaps. The clean end-state is rendering the doc from this JSON (single source of truth) — flagged as a follow-up in the JSON's $comment.

New dependencies: none.

Fixes #(no-issue)

Type of change

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

  • Passes on current state (21 mapped, 15 waived, 35 components).

  • Verified it fails for an uncovered component (dropped pds-tooltip waiver), a redundant waiver (pds-button, already mapped), and an orphaned waiver (pds-ghost), then confirmed clean after restore.

  • Confirmed the component-status guard still passes after the shared-helper refactor.

  • run-p lint.* enumerates lint.eslint, lint.figma, lint.status, lint.styles.

  • unit tests

  • e2e tests

  • accessibility tests

  • tested manually

  • other: self-validating checks run against real + simulated drift

Test Configuration:

  • Pine versions: 3.26.1 (current main)
  • OS: macOS 25.3.0
  • Browsers: n/a
  • Screen readers: n/a
  • Misc: tooling-only change

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

Note

Low Risk
Tooling-only change to lint/CI inputs; no runtime component or auth behavior is modified.

Overview
Adds a Figma Code Connect coverage guard to the existing @pine-ds/core lint pipeline so every top-level pds-* component must either have libs/figma/components/<name>.figma.ts or an explicit entry in new libs/figma/code-connect-waivers.json. The check also fails on redundant waivers (component already mapped) and orphaned waivers (component removed).

Wires it as lint.figma under run-p lint.* (no CI workflow changes). Nx gets an implicitDependencies link from core to @pine-ds/figma and extra lint inputs for waivers and .figma.ts files so figma-only changes still run core lint and cache invalidates correctly.

Refactors component discovery into shared libs/core/scripts/lib/components.mjs, used by both the new guard and check-component-status.mjs. Seeds the waiver file with the 15 currently unmapped components and registers the private @pine-ds/figma workspace package.

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

@github-actions github-actions Bot added the package: core Changes have been made to the Core package label Jun 1, 2026
Comment thread libs/core/scripts/check-figma-coverage.mjs Outdated
@QuintonJason QuintonJason added the ran-gauntlet Multi-agent review gauntlet has been run on this branch label Jun 1, 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 1 potential issue.

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 85ef4b7. Configure here.

Comment thread libs/core/package.json
Register @pine-ds/figma as a workspace project and declare an implicit
dependency from core so figma-only PRs still schedule lint.figma, and
add waiver/mapping paths to core lint inputs so Nx cache invalidates
when those files change.
@QuintonJason QuintonJason requested a review from pixelflips June 5, 2026 16:13

@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.

Ran local check and no issues found. LGTM! 👍🏼

@QuintonJason QuintonJason merged commit 0632cd7 into ci/component-status-guard Jun 5, 2026
17 checks passed
@QuintonJason QuintonJason deleted the ci/figma-coverage-guard branch June 5, 2026 17:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

package: core Changes have been made to the Core package ran-gauntlet Multi-agent review gauntlet has been run on this branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants