fix(ui): provide CardState to composed OrganizationProfileGeneralPanel default page#9243
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
🦋 Changeset detectedLatest commit: 8208180 The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
@clerk/astro
@clerk/backend
@clerk/chrome-extension
@clerk/clerk-js
@clerk/electron
@clerk/electron-passkeys
@clerk/eslint-plugin
@clerk/expo
@clerk/expo-google-signin
@clerk/expo-passkeys
@clerk/express
@clerk/fastify
@clerk/hono
@clerk/localizations
@clerk/nextjs
@clerk/nuxt
@clerk/react
@clerk/react-router
@clerk/shared
@clerk/tanstack-react-start
@clerk/testing
@clerk/ui
@clerk/upgrade
@clerk/vue
commit: |
API Changes Report
Summary
No API Changes DetectedAll packages have stable APIs with no detected changes. Report generated by Break Check Last ran on |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository YAML (base), Organization UI (inherited) Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
🔗 Linked repositories identifiedCodeRabbit considers these linked repositories for cross-repo context during reviews:
📝 WalkthroughWalkthrough
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Warning Review ran into problems🔥 ProblemsLinked repositories: Couldn't analyze
Errors logged to '/home/jailuser/git/.git/lfs/logs/20260724T165605.503175719.log'. Errors logged to '/home/jailuser/git/.git/lfs/logs/20260724T165726.944916596.log'. Comment |
Description
The composed
OrganizationProfileGeneralPanel(exported from@clerk/ui/experimental) threwCardState not foundwhen a consumer used it in its default, no-children page mode and then clicked Leave organization or Delete organization:Root cause
OrganizationGeneralPagedoes not self-wrap in aCardStateProvider(unlikeAccountPage/SecurityPage, which usewithCardStateProvider). In the mounted<OrganizationProfile />, the missing provider is supplied by the single rootwithCardStateProviderat the component root (OrganizationProfile/index.tsx). The leave/delete confirmation forms calluseCardState()at the form level (useLeaveWithRevalidations,ActionConfirmationPage.tsx:21) — outsideActionConfirmationPage's own self-wrap — so they rely on that root provider.The composed panel is a standalone entry point and did not reproduce that root, so the form-level
useCardState()had no ancestor provider and threw.Fix
Wrap the no-children branch of
OrganizationProfileGeneralPanelin aCardStateProvider, mirroring what the mounted<OrganizationProfile />provides at its root (and what the composed Security panel already does). The nesting withActionConfirmationPage's own provider is identical to production behavior today and is harmless — each provider scopes its own subtree.Checklist
@clerk/uipatch changesetType of change