Skip to content

fix(compiler): set jsxFramework in test configs so JSX extraction runs#3635

Merged
segunadebayo merged 1 commit into
chakra-ui:v2from
Adebesin-Cell:fix/compiler-test-jsx-framework
Jun 29, 2026
Merged

fix(compiler): set jsxFramework in test configs so JSX extraction runs#3635
segunadebayo merged 1 commit into
chakra-ui:v2from
Adebesin-Cell:fix/compiler-test-jsx-framework

Conversation

@Adebesin-Cell

Copy link
Copy Markdown
Collaborator

The @pandacss/compiler test suite has been failing on v2 since June 3, and CI doesn't catch it. This sets the one config field that fixes it.

What's wrong

JSX extraction is gated on config.jsxFramework (crates/pandacss_project/src/config.rs): no framework, no JSX scanning. That gate landed on 2026-06-03 (12e4c46fb). The compiler test configs set jsxFactory but never jsxFramework, so from that commit on, every JSX-dependent test in packages/compiler/__tests__ returns empty JSX and fails. The pandacss_extractor crate tests pass because they enable the framework explicitly, so the engine itself is fine — only the JS test configs are stale.

It went unnoticed because CI runs root pnpm test, and the root vitest config excludes packages/compiler/__tests__/**. The suite only runs via pnpm --filter @pandacss/compiler test, which CI never invokes. So it's been green in CI and red locally for months.

The fix

Set jsxFramework: 'react' in the test configs that exercise JSX — the shared createUserConfig and the inline configs in callbacks, recipes, and project. Most snapshots already expected the JSX-derived atoms; they just weren't being produced. One snapshot legitimately changes: a framework-enabled project now generates types/jsx.d.ts, so it's added to the codegen-artifacts list.

pnpm --filter @pandacss/compiler test goes from 24 failing to 0 (199 passing).

Follow-up worth considering

Add the @pandacss/compiler suite to CI (it isn't run today) so this can't silently regress again. Left out of this PR to keep it focused.

@vercel

vercel Bot commented Jun 29, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
panda-docs Error Error Jun 29, 2026 5:35pm

Request Review

@vercel

vercel Bot commented Jun 29, 2026

Copy link
Copy Markdown

@Adebesin-Cell is attempting to deploy a commit to the Chakra UI Team on Vercel.

A member of the Team first needs to authorize it.

@changeset-bot

changeset-bot Bot commented Jun 29, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 8d867b2

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

@segunadebayo segunadebayo merged commit bf24a13 into chakra-ui:v2 Jun 29, 2026
9 of 12 checks passed
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.

2 participants