feat(design): add advisory conformance check and local Studio - #8313
BillLeoutsakosvl346 wants to merge 57 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
@cubic-dev-ai review this PR |
@BillLeoutsakosvl346 I have started the AI code review. It will take a few minutes to complete. |
|
There was a problem hiding this comment.
All reported issues were addressed across 113 files
Tip: instead of fixing issues one by one fix them all with cubic
Re-trigger cubic
|
@cubic-dev-ai review this PR |
@BillLeoutsakosvl346 I have started the AI code review. It will take a few minutes to complete. |
There was a problem hiding this comment.
All reported issues were addressed across 114 files
Tip: instead of fixing issues one by one fix them all with cubic
Re-trigger cubic
|
@cubic-dev-ai review this PR |
@BillLeoutsakosvl346 I have started the AI code review. It will take a few minutes to complete. |
There was a problem hiding this comment.
All reported issues were addressed across 114 files
Tip: instead of fixing issues one by one fix them all with cubic
Re-trigger cubic
|
@cubic-dev-ai review this PR |
@BillLeoutsakosvl346 I have started the AI code review. It will take a few minutes to complete. |
There was a problem hiding this comment.
All reported issues were addressed across 118 files
You've manually re-run cubic several times on this PR. Each manual re-review checks the full PR again and counts toward your usage quota. To preserve your usage limits, we recommend letting cubic automatically review new commits.
Fix all with cubic | Re-trigger cubic
|
@cubic-dev-ai review this PR |
@BillLeoutsakosvl346 I have started the AI code review. It will take a few minutes to complete. |
There was a problem hiding this comment.
All reported issues were addressed across 119 files
You've manually re-run cubic several times on this PR. Each manual re-review checks the full PR again and counts toward your usage quota. To preserve your usage limits, we recommend letting cubic automatically review new commits.
Fix all with cubic | Re-trigger cubic
|
@cubic-dev-ai review this PR |
@BillLeoutsakosvl346 I have started the AI code review. It will take a few minutes to complete. |
There was a problem hiding this comment.
1 issue found across 119 files
Confidence score: 3/5
- In
scripts/design-conformance/extract.ts, array-valued CVA conditions collapse to the same context, so changes such assize: ['small']tosize: ['large']can evade appearance comparisons; serialize finite literal arrays in the condition context.
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="scripts/design-conformance/extract.ts">
<violation number="1" location="scripts/design-conformance/extract.ts:1351">
P2: Array-valued CVA compound conditions collapse to the same `'<unchecked>'` context, so changing `size: ['small']` to `size: ['large']` is invisible to appearance comparison. Serialize finite literal arrays in the condition signature or report them as unchecked.</violation>
</file>
You've manually re-run cubic several times on this PR. Each manual re-review checks the full PR again and counts toward your usage quota. To preserve your usage limits, we recommend letting cubic automatically review new commits.
Fix all with cubic | Re-trigger cubic
|
@cubic-dev-ai review this PR |
@BillLeoutsakosvl346 I have started the AI code review. It will take a few minutes to complete. |
There was a problem hiding this comment.
No issues found across 119 files
Confidence score: 5/5
- Automated review surfaced no issues in the provided summaries.
- No files require special attention.
You've manually re-run cubic several times on this PR. Each manual re-review checks the full PR again and counts toward your usage quota. To preserve your usage limits, we recommend letting cubic automatically review new commits.
Re-trigger cubic
Summary
@designAllow/@designProtectmetadata; keep longhand permissions specific and reject contradictory shorthand permissions. Central changes remain findings after regeneration.tools/design-studio. All discovered visual EMCN exports and every detected Extra are included. Fixtures declare supported axes/states, and captures verify the intended visible surface. Missing fixtures and failures remain visible.Product appearance is unchanged. Reports and browser images remain outside the repository. This draft targets staging and supersedes the closed draft #7827.
Type of Change
Files by purpose
scripts/design-conformance/: generated facts, shared analysis, ownership validation, diff/CI reports and the rule contract.scripts/generate-design-contracts.ts, root commands and audit runner: generation and read-only freshness checks.scripts/design-scan/,scripts/design-studio/: full scan and explicit local catalog/capture refresh.tools/design-studio/: standalone local UI, real fixtures and labeled indicative source-style samples.Local workflow
Prefer EMCN and global styles where they fit, and explain intentional new treatments in ordinary PR review. Review records never suppress findings or control Studio inclusion. CI checks the diff and infrastructure freshness; full browser captures are explicitly local.
Testing
637ddec1d6: 2,316 → 2,315 findings, with every occurrence reconciled. Fifteen previously missed component-owned overflow/outline overrides appeared; eight false width warnings and eight landing-content findings were removed. Zero inspection failures; no landing/docs/content-engine findings. The class-map fix preserved all 2,315 occurrences and added two explicit unchecked product object classifications.open=falseselection now stays closed.8b7f8413b8; Cubic completed, and all 81 review threads are resolved. Review fixes cover repeated authored occurrences, nested anonymous-layer rule order, effective JSX/object props ordering, ChipModal state labeling, bounded helper-return keys and effective wrapper defaults, statically false class-map entries, React numeric style serialization, and safe generated output paths/descriptors. Exported class-map dispatch follows proven same-file/central consumers, including namespace imports. Bounded CVA configs and flat compound arrays retain source-only change evidence; ambiguous inputs remain unchecked. Central extraction failures fail comparisons on either side and preserve rename origins. A nested-array CLI timeout regression verifies early rejection.Coverage limits
The final refresh includes 759 component/icon/variant entries: 522 captured and 237 Needs fixture (10 base exports and 227 variants). All 2,315 Extra signals have captures: 37 use real source components and 2,278 use explicitly labeled indicative source-style samples. The UI groups these signals into 725 visual treatments and the component entries into 281 sections. Missing fixtures remain visible and keep the overall run incomplete; successful captures do not imply complete coverage.
Source discovery and contract generation are automatic within supported syntax. Intentional customization metadata and fixture props/providers still need human decisions. New values on a supported finite fixture axis are discovered automatically; a new axis requiring different data remains Needs fixture. Captures invalidate conservatively on checkout changes. Exported object classification uses same-file and supplied central consumers; unchanged arbitrary product consumers are not searched by the diff check, so insufficient evidence stays unchecked. Static provenance does not prove runtime selector/theme availability, full CSS cascade or arbitrary JavaScript. Unknown flows remain visible. See
scripts/design-conformance/README.md.Checklist