Skip to content

feat(design): add conformance check and local Studio - #8399

Draft
BillLeoutsakosvl346 wants to merge 1 commit into
stagingfrom
codex/design-system-rollout-clean
Draft

BillLeoutsakosvl346 wants to merge 1 commit into
stagingfrom
codex/design-system-rollout-clean

Conversation

@BillLeoutsakosvl346

@BillLeoutsakosvl346 BillLeoutsakosvl346 commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Add a warning-only design diff check to the existing Test and Build workflow. Product styling findings appear as file and line warnings; an inspection failure fails the check.
  • Analyze EMCN, globals.css, and product source directly at each Git revision. Keep exceptional EMCN ownership decisions in packages/emcn/src/design-ownership.json; the scanner publishes the discovered components and design findings in scan.json.
  • Add a local Design Studio under tools/design-studio. Its explicit refresh command builds a catalog of every discovered EMCN visual export and detected Extra, with source locations, live fixtures where available, and labeled indicative samples elsewhere. It does not add a route to the deployed Sim app.
  • Scope checks to product UI. Landing, docs, native/build code, Monaco presentation, provider branding, and intentional block identity palettes are excluded; browser desktop screens remain in scope.

Product rendering is unchanged. This PR is draft and is not set to merge automatically.

Commands

bun run check:design --base origin/staging --working-tree
bun run check:design --base origin/staging --head HEAD
bun run design:scan --repo . --working-tree --output /tmp/sim-design-scan
bun run studio:refresh
bun run studio:dev

The local diff check includes staged, unstaged, and nonignored new product files. CI compares immutable revisions. Findings advise reviewers; failed inspection is an error. Full scans and Studio captures are run explicitly and stored outside the repository.

Verification

  • 874 script tests across 45 files passed.
  • All 52 repository audits, design and Studio type checks, lint, format, and a frozen lockfile install passed.
  • The immutable design diff reported 23 central design-system changes, no new product findings, and no inspection failures.
  • The full scan completed with 2,358 styling findings and no inspection failures. Studio published 759 EMCN entries and all 2,358 detected Extras. Its 237 missing fixture adapters remain visible as incomplete preview coverage.
  • A local optimized Studio build passed. A fixture-edit regression test verifies that changes to adapters invalidate the published checkout revision.

Coverage limits

New public EMCN exports and finite variants are discovered automatically. An export requiring props or providers can need a fixture adapter. Unsupported static flows remain visible as unchecked, and indicative Extra samples are labeled separately from live source previews. See scripts/design-conformance/README.md and scripts/design-studio/README.md.

@vercel

vercel Bot commented Sep 29, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
docs Ready Ready Preview Sep 29, 2026 6:27am UTC

Request Review

@BillLeoutsakosvl346

Copy link
Copy Markdown
Contributor Author

@greptile review this PR

@BillLeoutsakosvl346

Copy link
Copy Markdown
Contributor Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Sep 29, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@BillLeoutsakosvl346 I have started the AI code review. It will take a few minutes to complete.

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

3 issues found across 91 files

Confidence score: 3/5

  • In scripts/design-conformance/shared/rendered-html.ts, skipping interpolations inside tags can let markup or attributes from dangerouslySetInnerHTML escape the conformance gate; analyze these interpolations or mark unresolved ones as unchecked.
  • In scripts/design-conformance/controls/imperative.ts, an unresolved href alone can incorrectly promote an anchor to an imperative-control candidate; require a statically proven string href or another interaction signal.
  • In scripts/design-conformance/shared/class-map.ts, -0n is treated as unknown and therefore enabled, so the map key may be emitted incorrectly; handle unary minus on BigIntLiteral and classify zero as false.
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/controls/imperative.ts">

<violation number="1" location="scripts/design-conformance/controls/imperative.ts:267">
P2: An unresolved `href` alone promotes this anchor to an imperative control candidate. Require a statically proven string `href` here; otherwise leave the anchor unchecked unless another interaction signal exists.

(Based on your team's feedback about requiring anchor interaction evidence.)</violation>
</file>

<file name="scripts/design-conformance/shared/rendered-html.ts">

<violation number="1" location="scripts/design-conformance/shared/rendered-html.ts:188">
P2: Raw `dangerouslySetInnerHTML` interpolations can contribute markup or attributes, but this gate skips identifiers/calls and every interpolation inside a tag. Analyze or mark unresolved interpolations as unchecked so styling injected through them is not silently missed.</violation>
</file>

<file name="scripts/design-conformance/shared/class-map.ts">

<violation number="1" location="scripts/design-conformance/shared/class-map.ts:25">
P2: `-0n` falls through as unknown because this branch accepts only `NumericLiteral`; callers treat unknown values as enabled and emit the map key. Handle unary minus on `BigIntLiteral` and classify zero as false.

(Based on your team's feedback about falsey class-map entries.)</violation>
</file>

Tip: instead of fixing issues one by one fix them all with cubic

Re-trigger cubic

Comment thread scripts/design-conformance/controls/inventory.ts
Comment thread scripts/design-conformance/controls/static-inputs.ts
Comment thread scripts/design-conformance/styling/conformance.ts Outdated
Comment thread scripts/design-conformance/controls/colour-assignments.ts
Comment thread scripts/design-conformance/styling/appearance.ts
Comment thread scripts/design-conformance/controls/review.ts Outdated
Comment thread scripts/design-conformance/controls/review.ts Outdated
Comment thread scripts/design-conformance/system/central-recipes.ts Outdated
Comment thread scripts/design-conformance/shared/class-map.ts
Comment thread scripts/design-conformance/styling/recipe-diff.ts Outdated
@greptile-apps

greptile-apps Bot commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

[Medium risk] Adds design conformance checking and local Studio tooling.

The PR appears safe to merge based on the current review.

Summary

The PR adds a warning-only design conformance check and a local Design Studio. Since the previous review, it also adds editable-control propagation through static wrappers and checks explicit background-colour fallbacks. No distinct new issue was established in those changes.

Reviews (13) · Last reviewed commit: "feat(design): add conformance check and ..."

Comment thread tools/design-studio/_components/component-fixtures.tsx Outdated
@greptile-apps

This comment has been minimized.

@BillLeoutsakosvl346
BillLeoutsakosvl346 force-pushed the codex/design-system-rollout-clean branch from cb01ce0 to 97026b9 Compare September 29, 2026 03:25
@BillLeoutsakosvl346

Copy link
Copy Markdown
Contributor Author

@greptile review this PR

@BillLeoutsakosvl346

Copy link
Copy Markdown
Contributor Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Sep 29, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@BillLeoutsakosvl346 I have started the AI code review. It will take a few minutes to complete.

@BillLeoutsakosvl346

Copy link
Copy Markdown
Contributor Author

On the unchanged-import coverage note: this is a real static-analysis limit. An unresolved imported styling value stays unchecked in JSON and appears among relevant changed-file diagnostics in text and the CI summary; it is never treated as approved token provenance. Recursively loading every unchanged product dependency would substantially broaden the PR check, so this rollout keeps that boundary explicit and can expand it for concrete missed treatments.

Comment thread scripts/design-conformance/controls/review.ts Outdated

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

All reported issues were addressed across 93 files

Tip: instead of fixing issues one by one fix them all with cubic

Re-trigger cubic

Comment thread scripts/design-conformance/styling/source-summary.ts
Comment thread scripts/design-conformance/controls/colour-assignments.ts Outdated
Comment thread scripts/design-conformance/shared/worktree-source.ts Outdated
Comment thread scripts/design-conformance/system/central-recipes.ts
Comment thread scripts/design-conformance/styling/extract.ts Outdated
Comment thread scripts/design-conformance/controls/imperative.ts
Comment thread scripts/design-conformance/controls/static-inputs.ts
Comment thread scripts/design-conformance/shared/source-revision.ts Outdated
Comment thread scripts/design-conformance/controls/inventory.ts Outdated
Comment thread scripts/design-conformance/controls/review.ts
@BillLeoutsakosvl346

Copy link
Copy Markdown
Contributor Author

@greptile @cubic-dev-ai Please review the current head of this draft PR.

@cubic-dev-ai

cubic-dev-ai Bot commented Sep 29, 2026

Copy link
Copy Markdown
Contributor

@greptile @cubic-dev-ai Please review the current head of this draft PR.

@BillLeoutsakosvl346 I have started the AI code review. It will take a few minutes to complete.

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

All reported issues were addressed across 93 files

Tip: instead of fixing issues one by one fix them all with cubic

Re-trigger cubic

Comment thread scripts/design-conformance/controls/colour-assignments.ts Outdated
Comment thread scripts/design-conformance/styling/source-summary.ts
Comment thread scripts/design-conformance/styling/source-summary.ts
Comment thread scripts/design-conformance/shared/worktree-source.ts Outdated
Comment thread scripts/design-conformance/controls/inventory.ts
Comment thread scripts/design-conformance/shared/source-revision.ts Outdated
Comment thread scripts/design-conformance/styling/extract.ts
Comment thread scripts/design-conformance/shared/rendered-html.ts Outdated
Comment thread scripts/design-conformance/shared/worktree-source.ts Outdated
Comment thread scripts/design-conformance/styling/source-summary.ts
@BillLeoutsakosvl346
BillLeoutsakosvl346 force-pushed the codex/design-system-rollout-clean branch from 3c6fd86 to cf61ba7 Compare September 29, 2026 04:08
@BillLeoutsakosvl346

Copy link
Copy Markdown
Contributor Author

@greptile @cubic-dev-ai Please review the current head of this draft PR.

@cubic-dev-ai

cubic-dev-ai Bot commented Sep 29, 2026

Copy link
Copy Markdown
Contributor

@greptile @cubic-dev-ai Please review the current head of this draft PR.

@BillLeoutsakosvl346 I have started the AI code review. It will take a few minutes to complete.

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

All reported issues were addressed across 93 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

Comment thread scripts/design-conformance/shared/rendered-html.ts Outdated
Comment thread scripts/design-conformance/styling/source-summary.ts
Comment thread scripts/design-conformance/controls/colour-assignments.ts
Comment thread scripts/design-conformance/shared/worktree-source.ts
Comment thread scripts/design-conformance/controls/colour-assignments.ts

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

All reported issues were addressed across 93 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

Comment thread scripts/design-conformance/controls/colour-assignments.ts

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

All reported issues were addressed across 93 files

Reply with feedback, questions, or to request a fix.

Fix all with cubic | Re-trigger cubic

Comment thread scripts/design-conformance/controls/colour-assignments.ts Outdated
Comment thread scripts/design-conformance/controls/inventory.ts
@BillLeoutsakosvl346
BillLeoutsakosvl346 force-pushed the codex/design-system-rollout-clean branch from 3603d59 to bf8b4ce Compare September 29, 2026 05:43
@BillLeoutsakosvl346

Copy link
Copy Markdown
Contributor Author

@greptile @cubic-dev-ai Please review the current head of this draft PR.

@cubic-dev-ai

cubic-dev-ai Bot commented Sep 29, 2026

Copy link
Copy Markdown
Contributor

@greptile @cubic-dev-ai Please review the current head of this draft PR.

@BillLeoutsakosvl346 I have started the AI code review. It will take a few minutes to complete.

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

All reported issues were addressed across 93 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

Comment thread scripts/design-conformance/controls/inventory.ts
Comment thread scripts/design-conformance/controls/colour-assignments.ts Outdated
Comment thread scripts/design-conformance/controls/colour-assignments.ts
@BillLeoutsakosvl346
BillLeoutsakosvl346 force-pushed the codex/design-system-rollout-clean branch from bf8b4ce to 4e880f1 Compare September 29, 2026 05:55
@BillLeoutsakosvl346
BillLeoutsakosvl346 marked this pull request as draft September 29, 2026 05:56
@BillLeoutsakosvl346

Copy link
Copy Markdown
Contributor Author

@greptile @cubic-dev-ai Please review the current head of this draft PR.

@cubic-dev-ai

cubic-dev-ai Bot commented Sep 29, 2026

Copy link
Copy Markdown
Contributor

@greptile @cubic-dev-ai Please review the current head of this draft PR.

@BillLeoutsakosvl346 I have started the AI code review. It will take a few minutes to complete.

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

All reported issues were addressed across 93 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

Comment thread scripts/design-conformance/controls/inventory.ts Outdated
Comment thread scripts/design-conformance/controls/inventory.ts Outdated
@BillLeoutsakosvl346
BillLeoutsakosvl346 force-pushed the codex/design-system-rollout-clean branch from 4e880f1 to c60f585 Compare September 29, 2026 06:11
@BillLeoutsakosvl346

Copy link
Copy Markdown
Contributor Author

@greptile @cubic-dev-ai Please review the current head of this draft PR. The four latest inline findings have been addressed and resolved with tests.

@cubic-dev-ai

cubic-dev-ai Bot commented Sep 29, 2026

Copy link
Copy Markdown
Contributor

@greptile @cubic-dev-ai Please review the current head of this draft PR. The four latest inline findings have been addressed and resolved with tests.

@BillLeoutsakosvl346 I have started the AI code review. It will take a few minutes to complete.

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

1 issue found across 93 files

Confidence score: 4/5

  • In scripts/design-conformance/controls/inventory.ts, omitting contentEditable from expressionTargets leaves wrappers around editable elements out of call-site control records; include both JSX spellings to capture them.
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/controls/inventory.ts">

<violation number="1" location="scripts/design-conformance/controls/inventory.ts:686">
P2: `expressionTargets` drops `contentEditable` before calling `nativeRole`, so wrappers rendering editable elements are omitted from call-site control records. Include both JSX spellings in this attribute list.</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

Comment thread scripts/design-conformance/controls/inventory.ts Outdated
Comment thread scripts/design-conformance/controls/colour-assignments.ts
@BillLeoutsakosvl346
BillLeoutsakosvl346 force-pushed the codex/design-system-rollout-clean branch from c60f585 to cc69023 Compare September 29, 2026 06:25
@BillLeoutsakosvl346

Copy link
Copy Markdown
Contributor Author

@greptile @cubic-dev-ai Please review the current head of this draft PR. The latest editable-wrapper and background-fallback issues are fixed with regression tests.

@cubic-dev-ai

cubic-dev-ai Bot commented Sep 29, 2026

Copy link
Copy Markdown
Contributor

@greptile @cubic-dev-ai Please review the current head of this draft PR. The latest editable-wrapper and background-fallback issues are fixed with regression tests.

@BillLeoutsakosvl346 I have started the AI code review. It will take a few minutes to complete.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

No issues found across 93 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

This branch was successfully deployed

1 active deployment
Preview — cc69023f Deployed Sep 29, 2026 by vercel[bot]
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.

1 participant