Skip to content

feat(docs): generate shadcn docs and registry#413

Merged
chakrihacker merged 1 commit into
mainfrom
feat/shadcn-registry-for-v3
Jul 16, 2026
Merged

feat(docs): generate shadcn docs and registry#413
chakrihacker merged 1 commit into
mainfrom
feat/shadcn-registry-for-v3

Conversation

@chakrihacker

@chakrihacker chakrihacker commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Summary

Regenerates the shadcn registry JSON files and docs-site registry artifacts to reflect the @auth0/universal-components-core v3.0.0 release, including new versioned (v3/3.0.0) registry entries.

Why

The registry files were still pinned to @auth0/universal-components-core@2.1.1 and didn't include the new v3-specific files (telemetry provider/hooks, select component, pagination components, tanstack/useId compat utils) introduced in the v3.0.0 core release. Consumers installing components via the shadcn registry would have pulled a stale core version and missed new v3 dependencies.

What

  • Bumped @auth0/universal-components-core dependency from 2.1.13.0.0 across all registry block entries (domain-table, organization-details-edit, organization-member-detail/management, sso-provider-create/edit/table, user-mfa-management, user-passkey-management)
  • Removed the now-unneeded direct @tanstack/react-query dependency from registry entries (superseded by internal tanstack-compat util)
  • Added new shared registry files: use-telemetry.ts, telemetry-provider.tsx, telemetry-constants.ts, css-detection.ts, tanstack-compat.ts, use-id-compat.ts, use-checkpoint-pagination.ts, data-pagination.tsx, pagination.tsx, refresh-indicator.tsx, select.tsx, and common-constants.ts/shared/constants.ts
  • Added new versioned registry tree under docs-site/public/r/v3/3.0.0/** (per-component JSON + aggregate registry.json) for my-account and my-organization components
  • Updated docs-site/public/r/versions.json to add the v3 major version entry (latest: 3.0.0, status stable)
  • Updated packages/react/registry.json to match the same core version bump and new file entries

Packages

  • packages/core
  • packages/react
  • examples

References

Testing

How can this be verified? Note anything intentionally not covered by tests and why.

  1. Run the registry generation script that produced this diff (see scripts/ in this repo) and confirm it's a no-op against the current source (idempotent).
  2. Verify docs-site/public/r/versions.json resolves v33.0.0 and each docs-site/public/r/v3/3.0.0/** file is valid JSON matching the shadcn registry schema.
  3. Spot-check one registry entry (e.g. domain-table.json) — confirm the @auth0/universal-components-core dependency reads 3.0.0 and new files (select.tsx, data-pagination.tsx, etc.) are present with correct target paths.
  • This change adds unit test coverage
  • Tested for both SPA and RWA flows, all example apps working
  • All existing and new tests complete without errors

Checklist

  • Breaking change
  • Requires docs update
  • Backward compatible

Contributing

@coderabbitai

coderabbitai Bot commented Jul 15, 2026

Copy link
Copy Markdown
Contributor
ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 3e8da153-6c6a-48e3-817e-2a91754f6a95

📥 Commits

Reviewing files that changed from the base of the PR and between a6d690d and f251c82.

📒 Files selected for processing (21)
  • docs-site/public/r/domain-table.json
  • docs-site/public/r/organization-details-edit.json
  • docs-site/public/r/organization-member-detail.json
  • docs-site/public/r/organization-member-management.json
  • docs-site/public/r/sso-provider-create.json
  • docs-site/public/r/sso-provider-edit.json
  • docs-site/public/r/sso-provider-table.json
  • docs-site/public/r/user-mfa-management.json
  • docs-site/public/r/user-passkey-management.json
  • docs-site/public/r/v3/3.0.0/my-account/user-mfa-management.json
  • docs-site/public/r/v3/3.0.0/my-account/user-passkey-management.json
  • docs-site/public/r/v3/3.0.0/my-organization/domain-table.json
  • docs-site/public/r/v3/3.0.0/my-organization/organization-details-edit.json
  • docs-site/public/r/v3/3.0.0/my-organization/organization-member-detail.json
  • docs-site/public/r/v3/3.0.0/my-organization/organization-member-management.json
  • docs-site/public/r/v3/3.0.0/my-organization/sso-provider-create.json
  • docs-site/public/r/v3/3.0.0/my-organization/sso-provider-edit.json
  • docs-site/public/r/v3/3.0.0/my-organization/sso-provider-table.json
  • docs-site/public/r/v3/3.0.0/registry.json
  • docs-site/public/r/versions.json
  • packages/react/registry.json
👮 Files not reviewed due to content moderation or server errors (3)
  • docs-site/public/r/v3/3.0.0/my-organization/organization-details-edit.json
  • docs-site/public/r/sso-provider-edit.json
  • docs-site/public/r/v3/3.0.0/my-organization/domain-table.json

📝 Walkthrough

Walkthrough

This PR publishes core 3.0.0 registry bundles, adds versioned MFA, passkey, organization, and SSO blocks, and updates existing bundles with telemetry, pagination, refresh indicators, service hooks, provider wiring, compatibility utilities, and expanded theme/type contracts.

Changes

Core 3.0 registry refresh

Layer / File(s) Summary
Embedded feature bundles
docs-site/public/r/*
Existing registry blocks are upgraded to core 3.0.0 with refreshed services, UI primitives, telemetry, pagination, and provider behavior.
Versioned block catalog
docs-site/public/r/v3/3.0.0/*
New MFA, passkey, organization, and SSO registry blocks are added with embedded source bundles and metadata.
Registry manifests
docs-site/public/r/registry.json, packages/react/registry.json
Block dependencies, file mappings, and core version metadata are updated for the 3.0.0 catalog.
Release metadata
docs-site/public/r/versions.json
Version 3.0.0 is marked as the latest stable v3 release.

Estimated code review effort: 5 (Critical) | ~120 minutes

Possibly related PRs

Suggested labels: enhancement

Suggested reviewers: rax7389

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately reflects the main change: generating shadcn docs and registry artifacts.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/shadcn-registry-for-v3

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown

🚀 Preview deployment

Branch: refs/pull/413/merge
Commit: ec9f92d

📝 Preview URL: https://auth0-universal-components-5mscnebg1-ui-components-217de888.vercel.app


Updated at 2026-07-15T13:09:45.252Z

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.73%. Comparing base (a6d690d) to head (f251c82).

Additional details and impacted files
@@           Coverage Diff            @@
##             main     #413    +/-   ##
========================================
  Coverage   88.73%   88.73%            
========================================
  Files         203      203            
  Lines       17351    17351            
  Branches     1903     2293   +390     
========================================
  Hits        15397    15397            
  Misses       1954     1954            

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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

Actionable comments posted: 20

Note

Due to the large number of review comments, Critical, Major severity comments were prioritized as inline comments.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (5)
docs-site/public/r/organization-details-edit.json (1)

7-25: 🗄️ Data Integrity & Integration | 🔴 Critical | ⚡ Quick win

Registry declares no @tanstack/react-query dependency, but the bundled code requires it at runtime.

The dependencies array no longer lists @tanstack/react-query (per the change summary, it was explicitly removed), yet the bundle still ships files that import it directly: use-organization-details-edit-service.ts (useMutation, useQuery, useQueryClient) and providers/query-provider.tsx (MutationCache, QueryCache, QueryClient, QueryClientProvider). Installing this component fresh via the shadcn CLI will not install @tanstack/react-query, so the generated code will fail to resolve these imports.

🐛 Proposed fix
   "dependencies": [
     "`@auth0/universal-components-core`@3.0.0",
     "`@auth0/auth0-react`@^2.15.1",
     "`@hookform/resolvers`@^5.1.0",
+    "`@tanstack/react-query`@^5.0.0",
     "`@radix-ui/react-label`@^2.1.7",
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs-site/public/r/organization-details-edit.json` around lines 7 - 25, Add
`@tanstack/react-query` back to the dependencies array in
organization-details-edit.json, matching the version required by the bundled
imports in use-organization-details-edit-service.ts and
providers/query-provider.tsx. Keep the existing dependency declarations
unchanged.
docs-site/public/r/organization-member-detail.json (2)

7-23: 🗄️ Data Integrity & Integration | 🔴 Critical | ⚡ Quick win

Same missing @tanstack/react-query dependency as organization-details-edit.json.

This bundle's dependencies array also omits @tanstack/react-query, but use-member-detail-service.ts, use-member-management-service.ts, providers/query-provider.tsx, and multiple *-types.ts files (organization-member-detail-types.ts, organization-member-management-types.ts) import runtime and type symbols from it directly.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs-site/public/r/organization-member-detail.json` around lines 7 - 23,
Update the dependencies array for the organization-member-detail bundle to
include `@tanstack/react-query`, matching the version and dependency declaration
used by organization-details-edit.json.

326-336: 🗄️ Data Integrity & Integration | 🔴 Critical | ⚡ Quick win

Avoid bundling src/types/index.ts here
Its export * from list includes files that aren’t shipped in this registry item, so a standalone install will hit missing-module errors. Import the member-management types directly instead.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs-site/public/r/organization-member-detail.json` around lines 326 - 336,
Remove the `src/types/index.ts` dependency from
`organization-invitation-table-types.ts`, since its barrel exports reference
files absent from this registry item. Import `MemberManagementFilterState`,
`MemberManagementPaginationState`, and `MemberManagementSortConfig` directly
from their shipped member-management type modules, preserving the existing type
usage.

Source: Coding guidelines

docs-site/public/r/sso-provider-create.json (1)

7-25: 🗄️ Data Integrity & Integration | 🔴 Critical | ⚡ Quick win

Restore @tanstack/react-query in this registry entry
src/hooks/my-organization/shared/services/use-sso-provider-create-service.ts, src/hooks/my-organization/use-config.ts, src/hooks/my-organization/use-idp-config.ts, src/providers/query-provider.tsx, and src/lib/utils/tanstack-compat.ts still import it, so leaving it out breaks installs of this registry block.

🐛 Proposed fix
  "dependencies": [
    "`@auth0/universal-components-core`@3.0.0",
    "`@auth0/auth0-react`@^2.15.1",
+   "`@tanstack/react-query`@^5.56.2",
    "`@hookform/resolvers`@^5.1.0",
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs-site/public/r/sso-provider-create.json` around lines 7 - 25, Restore
`@tanstack/react-query` to the dependencies list in the sso-provider-create
registry entry, alongside the other package dependencies, so imports used by the
referenced hooks, query provider, and tanstack compatibility utility resolve
when this registry block is installed.
docs-site/public/r/sso-provider-table.json (1)

7-22: 🎯 Functional Correctness | 🔴 Critical | ⚡ Quick win

Add @tanstack/react-query to the registry dependencies docs-site/public/r/sso-provider-table.json: the bundled files import useQuery, useMutation, useQueryClient, and QueryClientProvider, so standalone installs will fail to resolve those imports.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs-site/public/r/sso-provider-table.json` around lines 7 - 22, Add
`@tanstack/react-query` to the dependencies array in sso-provider-table.json,
preserving the existing dependency entries and versioning convention so bundled
imports resolve for standalone installs.
🟡 Minor comments (6)
docs-site/public/r/v3/3.0.0/my-organization/organization-member-management.json-285-290 (1)

285-290: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

handleNextPage falls through to the invitations pager when on the members tab.

if (activeTab === 'members' && memberNextToken) {...} else if (invitationNextToken) {...} will advance the invitation pagination cursor whenever the members tab is active but memberNextToken is falsy. The UI currently disables the Next control via CSS in that state, so this is likely unreachable today, but the branching logic itself is incorrect and should be tab-scoped explicitly rather than relying on && short-circuiting into the wrong tab's handler.

🐛 Proposed fix
   const handleNextPage = React.useCallback(() => {
-    if (activeTab === 'members' && memberNextToken) {
-      memberGoToNextPage(memberNextToken);
-    } else if (invitationNextToken) {
-      invitationGoToNextPage(invitationNextToken);
+    if (activeTab === 'members') {
+      if (memberNextToken) memberGoToNextPage(memberNextToken);
+    } else if (invitationNextToken) {
+      invitationGoToNextPage(invitationNextToken);
     }
   }, [activeTab, invitationNextToken, memberNextToken, invitationGoToNextPage, memberGoToNextPage]);
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@docs-site/public/r/v3/3.0.0/my-organization/organization-member-management.json`
around lines 285 - 290, Update handleNextPage so pagination is explicitly scoped
by activeTab: when activeTab is 'members', only evaluate memberNextToken and
memberGoToNextPage; otherwise, only evaluate invitationNextToken and
invitationGoToNextPage. Prevent the members branch from falling through to the
invitations pager when no member token exists.
docs-site/public/r/v3/3.0.0/my-organization/sso-provider-create.json-274-284 (1)

274-284: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

fetchConfig/fetchIdpConfig don't actually fetch — they read the cache synchronously.

fetchConfig: async () => await queryClient.getQueryData(configQueryKeys.details()) (line 275) and the analogous fetchIdpConfig (line 281) call getQueryData, which only reads whatever is already cached — it never issues a network request. Callers of these public hook results who invoke fetchConfig()/fetchIdpConfig() expecting a refresh will silently get stale or undefined data instead.

🐛 Proposed fix
-    fetchConfig: async () => await queryClient.getQueryData(configQueryKeys.details()),
+    fetchConfig: async () => {
+      await queryClient.refetchQueries({ queryKey: configQueryKeys.details() });
+    },

Apply the analogous change to fetchIdpConfig using idpConfigQueryKeys.config().

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs-site/public/r/v3/3.0.0/my-organization/sso-provider-create.json` around
lines 274 - 284, Update the fetchConfig callback in useConfig and fetchIdpConfig
in useIdpConfig to perform an actual query refetch through the respective query
objects instead of synchronously reading getQueryData from queryClient. Return
the refetched data while preserving each hook’s existing query keys and public
result shape.
docs-site/public/r/v3/3.0.0/my-organization/sso-provider-table.json-26-26 (1)

26-26: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Inconsistent organization name field between modal and toast (name vs display_name).

SsoProviderTableView passes organizationName={organization?.name} into SsoProviderRemoveFromOrganizationModal, but the corresponding success toast in useSsoProviderTable.ts's handleRemoveConfirm builds its message with organization?.display_name. Auth0 organizations have distinct name (slug) and display_name (human-readable) fields — showing the slug in the confirmation dialog while the toast shows the display name is inconsistent and likely a mistake; the dialog should use organization?.display_name to match.

🐛 Proposed fix
-          organizationName={organization?.name}
+          organizationName={organization?.display_name}
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs-site/public/r/v3/3.0.0/my-organization/sso-provider-table.json` at line
26, Update SsoProviderTableView so SsoProviderRemoveFromOrganizationModal
receives organization?.display_name for organizationName, matching the
display-name field used by handleRemoveConfirm in useSsoProviderTable. Leave the
rest of the modal and organization handling unchanged.
docs-site/public/r/domain-table.json-54-54 (1)

54-54: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

handleView depends on onView but invokes onConfigure.

const handleView = React.useCallback(() => {
  onConfigure(domain);
}, [domain, onView]);

Currently harmless since domain-table.tsx passes the same callback for onView and onConfigure, but the mismatch between what's called and what's declared as a dependency is a latent stale-closure bug — if these two callbacks ever diverge, "View" will invoke a stale onConfigure reference instead of onView.

🐛 Proposed fix
   const handleView = React.useCallback(() => {
-    onConfigure(domain);
-  }, [domain, onView]);
+    onView(domain);
+  }, [domain, onView]);
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs-site/public/r/domain-table.json` at line 54, Correct handleView in
DomainTableActionsColumn to invoke onView(domain) and update its useCallback
dependency list to reference onView alongside domain. Leave handleConfigure and
the other action handlers unchanged.
docs-site/public/r/domain-table.json-71-76 (1)

71-76: 🩺 Stability & Availability | 🟡 Minor | ⚡ Quick win

Aria-live pagination announcement fires on every unrelated re-render.

The effect keys off the entire paginationState object reference. domain-table.tsx builds a new paginationState object literal inline on every render, so this effect (and its textContent update announcing "Content loaded.") fires far more often than actual pagination changes, which is noisy for screen-reader users.

♻️ Proposed fix — key the effect off primitive values instead of object identity
   useEffect(() => {
     if (ariaLiveRegionRef.current) {
       if (isRegular && regularState) {
         ariaLiveRegionRef.current.textContent = `Page ${regularState.currentPage} loaded.`;
       } else if (checkpointState) {
         ariaLiveRegionRef.current.textContent = 'Content loaded.';
       }
     }
-  }, [type, paginationState, isRegular, regularState, checkpointState]);
+  }, [
+    type,
+    isRegular,
+    regularState?.currentPage,
+    checkpointState?.currentPage,
+    checkpointState?.hasNextPage,
+    checkpointState?.hasPreviousPage,
+  ]);
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs-site/public/r/domain-table.json` around lines 71 - 76, Update the
aria-live announcement useEffect in DataPagination so its dependency array uses
the relevant primitive pagination values rather than the paginationState,
regularState, or checkpointState object identities. Track regular currentPage or
checkpoint navigation state as appropriate, preserving the existing announcement
text and behavior while preventing announcements on unrelated re-renders.
docs-site/public/r/v3/3.0.0/my-organization/organization-member-detail.json-212-216 (1)

212-216: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Fix the userId regex guard

/^(?=.{1,1024}$).+\\|.+$/ splits at |, so the second branch matches almost any non-empty string. That makes isValidUserId effectively !!userId and lets invalid IDs enable memberQuery/memberRolesQuery.

🐛 Proposed fix
-  const isValidUserId = !!userId && /^(?=.{1,1024}$).+\\|.+$/.test(userId);
+  const isValidUserId = !!userId && /^(?=.{1,1024}$).+\|.+$/.test(userId);
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs-site/public/r/v3/3.0.0/my-organization/organization-member-detail.json`
around lines 212 - 216, Update the isValidUserId guard in useMemberDetailService
so the userId format validation does not accept arbitrary non-empty strings
after the pipe. Preserve the intended pipe-delimited identifier structure and
1–1024 character limit, ensuring invalid IDs keep memberQuery and
memberRolesQuery disabled.
🧹 Nitpick comments (1)
docs-site/public/r/organization-member-detail.json (1)

213-231: 🗄️ Data Integrity & Integration | 🔵 Trivial | ⚡ Quick win

Reuse the shared query-error toast and align the member-role cache key

  • Replace the local “show once” error effect in useOrganizationMemberDetail with useQueryErrorToast, as in the other edit hooks.
  • assignRolesMutation.onSuccess writes to memberManagementQueryKeys.memberRoles(userId), but the detail view reads memberDetailQueryKeys.memberRoles(userId). Write to the detail key directly.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs-site/public/r/organization-member-detail.json` around lines 213 - 231,
Update useOrganizationMemberDetail to replace the hasShownMemberRolesError ref
and custom error effect with the shared useQueryErrorToast hook, passing the
memberRolesQuery error state and existing fallback translation. In
assignRolesMutation.onSuccess within useMemberManagementService, write updated
roles to memberDetailQueryKeys.memberRoles(userId) instead of
memberManagementQueryKeys.memberRoles(userId), preserving the existing cache
update behavior.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs-site/public/r/domain-table.json`:
- Around line 8-18: Restore `@tanstack/react-query` to the dependencies registry
represented by the domain table, ensuring the entry includes packages directly
imported by use-domain-table-service.ts, query-provider.tsx,
domain-table-types.ts, and tanstack-compat.ts.

In `@docs-site/public/r/organization-details-edit.json`:
- Around line 178-191: Update fetchOrgDetails in
useOrganizationDetailsEditService to trigger the organization-details query
through React Query’s fetch/refetch API instead of synchronously reading the
cache with getQueryData. Preserve the existing
organizationDetailsQueryKeys.details() key and Promise<void> public contract,
and keep the useOrganizationDetailsEdit delegation unchanged.
- Around line 251-287: Update createQueryClient’s MutationCache.onError MFA
retry path so the onRetry handler does not call the internal mutation.execute
method directly. Route the retry through a documented TanStack public trigger or
an existing local compatibility wrapper, while preserving the current success
behavior of clearing GateKeeper state and returning true, and the failure
behavior of returning false.

In `@docs-site/public/r/organization-member-management.json`:
- Around line 281-284: Update resendInvitationMutation so it creates the
replacement invitation before deleting the existing invitation. Preserve the
fetched invitation’s email and roles, then delete the original only after
creation succeeds and return the replacement response; keep the existing success
and error handling intact.
- Around line 281-284: Wire role filters through useMemberManagementService:
pass invitationParams.filters to organization.invitations.list, include
memberParams.filters in the membersQuery query key, and pass it to
organization.members.list. Preserve existing pagination and sorting behavior
while ensuring filter changes refetch and update displayed rows.

In `@docs-site/public/r/sso-provider-create.json`:
- Around line 298-302: The useCoreClientInitialization effect tracks only
authProxyUrl while createCoreClient consumes the full authDetails object. Update
the dependency array in useCoreClientInitialization to include authDetails,
ensuring initialization reruns whenever any authentication detail changes while
preserving the existing telemetry and callback dependencies.
- Line 29: Update the dependency array of SsoProviderCreateView’s wizardSteps
useMemo to include every value read by its factory, especially isLoadingConfig,
filteredStrategies, isLoadingIdpConfig, and idpConfig, so ProviderSelect and
ProviderConfigure receive refreshed asynchronous state. Preserve the existing
step behavior and other dependencies.

In `@docs-site/public/r/sso-provider-table.json`:
- Line 26: Update the columns useMemo dependency array in SsoProviderTableView
to include shouldAllowDeletion and customMessages, matching the values passed to
SsoProviderTableActionsColumn. Preserve the existing column rendering and other
dependencies so async configuration updates refresh the Delete action visibility
and custom messages.

In `@docs-site/public/r/v3/3.0.0/my-account/user-mfa-management.json`:
- Around line 213-215: Update the dependency array of
useCoreClientInitialization so it tracks the full authDetails object consumed by
createCoreClient, rather than only authProxyUrl. Preserve the existing telemetry
and i18n dependencies while ensuring changes to any authDetails field
reinitialize the client.
- Around line 7-23: Add `@tanstack/react-query` to the dependencies list for the
user MFA management registry item, so imports in use-user-mfa-service.ts and
query-provider.tsx resolve from a declared package dependency.

In `@docs-site/public/r/v3/3.0.0/my-account/user-passkey-management.json`:
- Around line 138-140: Update the useCoreClientInitialization effect
dependencies to track the complete memoized authDetails object rather than only
authProxyUrl, ensuring createCoreClient reruns when authentication context or
interface changes while preserving the existing initialization guards and flow.
- Around line 7-20: Add `@tanstack/react-query` to the dependencies array in the
user-passkey-management registry definition, using the version required by the
imported use-user-passkey-service.ts and query-provider.tsx components.

In `@docs-site/public/r/v3/3.0.0/my-organization/organization-member-detail.json`:
- Around line 7-23: Add `@tanstack/react-query` to the dependencies array for this
registry entry, alongside the other TanStack packages, so the embedded
use-member-detail-service.ts, use-member-management-service.ts, and
query-provider.tsx imports resolve correctly.

In
`@docs-site/public/r/v3/3.0.0/my-organization/organization-member-management.json`:
- Around line 279-284: Update resendInvitationMutation to preserve the original
invitation’s identity_provider_id when creating the replacement invitation. Read
it from freshInvitation, falling back to invitation if necessary, and include it
alongside email and roles in the create request while preserving existing resend
behavior.
- Around line 393-398: The standalone src/types/index.ts barrel re-exports
modules not shipped by these items, causing unresolved imports. Remove its
manifest entry from
docs-site/public/r/v3/3.0.0/my-organization/organization-member-management.json:393-398,
docs-site/public/r/v3/3.0.0/registry.json:1571-1574, and
docs-site/public/r/v3/3.0.0/registry.json:1979-1982; no replacement barrel is
required.

In `@docs-site/public/r/v3/3.0.0/my-organization/sso-provider-create.json`:
- Around line 7-25: Add `@tanstack/react-query` to the dependencies array in the
generated sso-provider-create manifest, matching the dependency declaration used
by docs-site/public/r/sso-provider-create.json and the requirements of
use-sso-provider-create-service.ts.
- Around line 298-302: Update the dependency array of
useCoreClientInitialization’s React.useEffect to track the complete authDetails
object rather than only authProxyUrl, ensuring client initialization reruns when
any authentication detail changes. Keep the existing initialization logic
unchanged.
- Line 29: Update the `wizardSteps` `useMemo` dependency array in
`SsoProviderCreateView` to include the referenced `isLoadingConfig`,
`filteredStrategies`, `isLoadingIdpConfig`, and `idpConfig` values, preserving
the existing step definitions and behavior.

In `@docs-site/public/r/v3/3.0.0/my-organization/sso-provider-edit.json`:
- Around line 139-143: Update the columns useMemo in SsoDomainTab to include
every value captured by the actions column render: t, idpDomains, readOnly,
isUpdating, isUpdatingId, customMessages, handleToggleSwitch, and
handleVerifyActionColumn. Preserve the existing column definitions while
ensuring the memo rebuilds when any action-column state or callback changes.

In `@packages/react/registry.json`:
- Around line 12-19: Update the dependency lists for all nine registry blocks in
packages/react/registry.json to include `@tanstack/react-query`, preserving the
existing dependency entries and ordering conventions so CLI-installed consumers
receive the required package.

---

Outside diff comments:
In `@docs-site/public/r/organization-details-edit.json`:
- Around line 7-25: Add `@tanstack/react-query` back to the dependencies array in
organization-details-edit.json, matching the version required by the bundled
imports in use-organization-details-edit-service.ts and
providers/query-provider.tsx. Keep the existing dependency declarations
unchanged.

In `@docs-site/public/r/organization-member-detail.json`:
- Around line 7-23: Update the dependencies array for the
organization-member-detail bundle to include `@tanstack/react-query`, matching the
version and dependency declaration used by organization-details-edit.json.
- Around line 326-336: Remove the `src/types/index.ts` dependency from
`organization-invitation-table-types.ts`, since its barrel exports reference
files absent from this registry item. Import `MemberManagementFilterState`,
`MemberManagementPaginationState`, and `MemberManagementSortConfig` directly
from their shipped member-management type modules, preserving the existing type
usage.

In `@docs-site/public/r/sso-provider-create.json`:
- Around line 7-25: Restore `@tanstack/react-query` to the dependencies list in
the sso-provider-create registry entry, alongside the other package
dependencies, so imports used by the referenced hooks, query provider, and
tanstack compatibility utility resolve when this registry block is installed.

In `@docs-site/public/r/sso-provider-table.json`:
- Around line 7-22: Add `@tanstack/react-query` to the dependencies array in
sso-provider-table.json, preserving the existing dependency entries and
versioning convention so bundled imports resolve for standalone installs.

---

Minor comments:
In `@docs-site/public/r/domain-table.json`:
- Line 54: Correct handleView in DomainTableActionsColumn to invoke
onView(domain) and update its useCallback dependency list to reference onView
alongside domain. Leave handleConfigure and the other action handlers unchanged.
- Around line 71-76: Update the aria-live announcement useEffect in
DataPagination so its dependency array uses the relevant primitive pagination
values rather than the paginationState, regularState, or checkpointState object
identities. Track regular currentPage or checkpoint navigation state as
appropriate, preserving the existing announcement text and behavior while
preventing announcements on unrelated re-renders.

In `@docs-site/public/r/v3/3.0.0/my-organization/organization-member-detail.json`:
- Around line 212-216: Update the isValidUserId guard in useMemberDetailService
so the userId format validation does not accept arbitrary non-empty strings
after the pipe. Preserve the intended pipe-delimited identifier structure and
1–1024 character limit, ensuring invalid IDs keep memberQuery and
memberRolesQuery disabled.

In
`@docs-site/public/r/v3/3.0.0/my-organization/organization-member-management.json`:
- Around line 285-290: Update handleNextPage so pagination is explicitly scoped
by activeTab: when activeTab is 'members', only evaluate memberNextToken and
memberGoToNextPage; otherwise, only evaluate invitationNextToken and
invitationGoToNextPage. Prevent the members branch from falling through to the
invitations pager when no member token exists.

In `@docs-site/public/r/v3/3.0.0/my-organization/sso-provider-create.json`:
- Around line 274-284: Update the fetchConfig callback in useConfig and
fetchIdpConfig in useIdpConfig to perform an actual query refetch through the
respective query objects instead of synchronously reading getQueryData from
queryClient. Return the refetched data while preserving each hook’s existing
query keys and public result shape.

In `@docs-site/public/r/v3/3.0.0/my-organization/sso-provider-table.json`:
- Line 26: Update SsoProviderTableView so SsoProviderRemoveFromOrganizationModal
receives organization?.display_name for organizationName, matching the
display-name field used by handleRemoveConfirm in useSsoProviderTable. Leave the
rest of the modal and organization handling unchanged.

---

Nitpick comments:
In `@docs-site/public/r/organization-member-detail.json`:
- Around line 213-231: Update useOrganizationMemberDetail to replace the
hasShownMemberRolesError ref and custom error effect with the shared
useQueryErrorToast hook, passing the memberRolesQuery error state and existing
fallback translation. In assignRolesMutation.onSuccess within
useMemberManagementService, write updated roles to
memberDetailQueryKeys.memberRoles(userId) instead of
memberManagementQueryKeys.memberRoles(userId), preserving the existing cache
update behavior.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 3e8da153-6c6a-48e3-817e-2a91754f6a95

📥 Commits

Reviewing files that changed from the base of the PR and between a6d690d and f251c82.

📒 Files selected for processing (21)
  • docs-site/public/r/domain-table.json
  • docs-site/public/r/organization-details-edit.json
  • docs-site/public/r/organization-member-detail.json
  • docs-site/public/r/organization-member-management.json
  • docs-site/public/r/sso-provider-create.json
  • docs-site/public/r/sso-provider-edit.json
  • docs-site/public/r/sso-provider-table.json
  • docs-site/public/r/user-mfa-management.json
  • docs-site/public/r/user-passkey-management.json
  • docs-site/public/r/v3/3.0.0/my-account/user-mfa-management.json
  • docs-site/public/r/v3/3.0.0/my-account/user-passkey-management.json
  • docs-site/public/r/v3/3.0.0/my-organization/domain-table.json
  • docs-site/public/r/v3/3.0.0/my-organization/organization-details-edit.json
  • docs-site/public/r/v3/3.0.0/my-organization/organization-member-detail.json
  • docs-site/public/r/v3/3.0.0/my-organization/organization-member-management.json
  • docs-site/public/r/v3/3.0.0/my-organization/sso-provider-create.json
  • docs-site/public/r/v3/3.0.0/my-organization/sso-provider-edit.json
  • docs-site/public/r/v3/3.0.0/my-organization/sso-provider-table.json
  • docs-site/public/r/v3/3.0.0/registry.json
  • docs-site/public/r/versions.json
  • packages/react/registry.json
👮 Files not reviewed due to content moderation or server errors (3)
  • docs-site/public/r/v3/3.0.0/my-organization/organization-details-edit.json
  • docs-site/public/r/sso-provider-edit.json
  • docs-site/public/r/v3/3.0.0/my-organization/domain-table.json

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

Caution

Inline review comments failed to post. This is likely due to GitHub's internal server error or limits when posting large numbers of comments. If you are seeing this consistently it is likely a permissions issue. Please check "Moderation" -> "Code review limits" under your organization settings.

🛑 Comments failed to post (19)
docs-site/public/r/domain-table.json (1)

8-18: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== domain-table.json =="
cat -n docs-site/public/r/domain-table.json | sed -n '1,80p'

echo
echo "== search react-query imports/usages =="
rg -n "`@tanstack/react-query`|useQueryClient|useMutation|useQuery" \
  docs-site/public/r/domain-table.json \
  src/hooks/my-organization/shared/services/use-domain-table-service.ts \
  src/providers/query-provider.tsx \
  src \
  -g '!**/node_modules/**' || true

Repository: auth0/auth0-ui-components

Length of output: 50383


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== referenced files around import/usage lines =="
for f in src/hooks/my-organization/shared/services/use-domain-table-service.ts src/providers/query-provider.tsx; do
  echo "--- $f ---"
  cat -n "$f" | sed -n '1,340p'
  echo
done

Repository: auth0/auth0-ui-components

Length of output: 392


🏁 Script executed:

#!/bin/bash
set -euo pipefail

python3 - <<'PY'
import json
from pathlib import Path

p = Path("docs-site/public/r/domain-table.json")
data = json.loads(p.read_text())
deps = data.get("dependencies")
print("dependencies_count=", len(deps) if isinstance(deps, list) else None)
if isinstance(deps, list):
    for i, dep in enumerate(deps, 1):
        if "react-query" in dep or "tanstack" in dep:
            print("match", i, dep)

print("has_tanstack=", any("`@tanstack/react-query`" in d for d in deps))
PY

Repository: auth0/auth0-ui-components

Length of output: 245


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== files referencing docs-site/public/r/domain-table.json =="
rg -n "domain-table\.json" . -g '!**/node_modules/**' || true

echo
echo "== top-level shape of docs-site/public/r/domain-table.json =="
python3 - <<'PY'
import json
from pathlib import Path
p = Path("docs-site/public/r/domain-table.json")
data = json.loads(p.read_text())
print(type(data).__name__)
if isinstance(data, dict):
    print("keys:", list(data.keys()))
    for k, v in data.items():
        if isinstance(v, list):
            print(k, "len=", len(v))
PY

Repository: auth0/auth0-ui-components

Length of output: 418


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== package manifests mentioning `@tanstack/react-query` =="
rg -n '"`@tanstack/react-query`"' . -g 'package.json' -g '!**/node_modules/**' || true

Repository: auth0/auth0-ui-components

Length of output: 386


🏁 Script executed:

#!/bin/bash
set -euo pipefail

python3 - <<'PY'
import json
from pathlib import Path

p = Path("docs-site/public/r/domain-table.json")
data = json.loads(p.read_text())
hits = []
for f in data.get("files", []):
    content = f.get("content", "")
    if "`@tanstack/react-query`" in content or "useQueryClient" in content or "useMutation" in content or "useQuery" in content:
        hits.append((f.get("path"), [
            token for token in ["`@tanstack/react-query`", "useQueryClient", "useMutation", "useQuery"]
            if token in content
        ]))

print("hits:", len(hits))
for path, tokens in hits:
    print(path, "=>", ", ".join(tokens))
PY

echo
echo "== locate the service/provider files in repo =="
fd -a 'use-domain-table-service.ts|query-provider.tsx|domain-table-actions-column.tsx|data-pagination.tsx' . || true

Repository: auth0/auth0-ui-components

Length of output: 955


🏁 Script executed:

#!/bin/bash
set -euo pipefail

python3 - <<'PY'
import json
from pathlib import Path

p = Path("docs-site/public/r/domain-table.json")
data = json.loads(p.read_text())
for f in data.get("files", []):
    if "react-query" in f.get("content", ""):
        print(f.get("path"))
        print("----")
        for line in f.get("content", "").splitlines():
            if "react-query" in line or "useQuery" in line or "useMutation" in line or "useQueryClient" in line:
                print(line)
        print()
PY

Repository: auth0/auth0-ui-components

Length of output: 1031


Restore @tanstack/react-query in dependencies
src/hooks/my-organization/shared/services/use-domain-table-service.ts, src/providers/query-provider.tsx, src/types/my-organization/domain-management/domain-table-types.ts, and src/lib/utils/tanstack-compat.ts import it directly, so this registry entry ships an incomplete install list.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs-site/public/r/domain-table.json` around lines 8 - 18, Restore
`@tanstack/react-query` to the dependencies registry represented by the domain
table, ensuring the entry includes packages directly imported by
use-domain-table-service.ts, query-provider.tsx, domain-table-types.ts, and
tanstack-compat.ts.
docs-site/public/r/organization-details-edit.json (2)

178-191: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

fetchOrgDetails doesn't actually fetch anything.

const fetchOrgDetails = useCallback(async (): Promise<void> => {
  await queryClient.getQueryData(organizationDetailsQueryKeys.details());
}, [queryClient]);

getQueryData synchronously reads whatever is already cached (or undefined) — it never triggers a network request, so awaiting it is a no-op. fetchOrgDetails is part of the public useOrganizationDetailsEdit return contract, so any consumer calling it expecting a refresh will get silently stale data.

🐛 Proposed fix
-  const fetchOrgDetails = useCallback(async (): Promise<void> => {
-    await queryClient.getQueryData(organizationDetailsQueryKeys.details());
-  }, [queryClient]);
+  const fetchOrgDetails = useCallback(async (): Promise<void> => {
+    await queryClient.invalidateQueries({ queryKey: organizationDetailsQueryKeys.details() });
+  }, [queryClient]);
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs-site/public/r/organization-details-edit.json` around lines 178 - 191,
Update fetchOrgDetails in useOrganizationDetailsEditService to trigger the
organization-details query through React Query’s fetch/refetch API instead of
synchronously reading the cache with getQueryData. Preserve the existing
organizationDetailsQueryKeys.details() key and Promise<void> public contract,
and keep the useOrganizationDetailsEdit delegation unchanged.

251-287: 🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '\n== relevant files ==\n'
git ls-files 'src/**' 'docs-site/**' | rg 'tanstack-compat|query-provider|mutation|cache-types|auth-types'

printf '\n== tanstack compat references ==\n'
rg -n "tanstack-compat|isMutationLoading|getPreviousDataOption|cacheTime|gcTime|execute\\(" src docs-site -g '!**/dist/**' -g '!**/build/**'

printf '\n== query-provider outline ==\n'
ast-grep outline src/providers/query-provider.tsx --view expanded

printf '\n== tanstack compat file outline if present ==\n'
fd -a 'tanstack-compat.*' src docs-site

Repository: auth0/auth0-ui-components

Length of output: 185


🏁 Script executed:

#!/bin/bash
set -euo pipefail

python3 - <<'PY'
from pathlib import Path
for p in [Path('src/providers/query-provider.tsx'), Path('src/types/cache-types.ts')]:
    print(f"\n## {p} ({sum(1 for _ in p.open())} lines)")
    with p.open() as f:
        for i, line in enumerate(f, 1):
            if 1 <= i <= 220:
                print(f"{i:4d}: {line.rstrip()}")
PY

Repository: auth0/auth0-ui-components

Length of output: 525


🏁 Script executed:

#!/bin/bash
set -euo pipefail

node - <<'JS'
try {
  const pkg = require('./package.json');
  console.log('package.json found');
  console.log(JSON.stringify({
    dependencies: pkg.dependencies && pkg.dependencies['`@tanstack/react-query`'],
    devDependencies: pkg.devDependencies && pkg.devDependencies['`@tanstack/react-query`'],
    peerDependencies: pkg.peerDependencies && pkg.peerDependencies['`@tanstack/react-query`'],
  }, null, 2));
} catch (e) {
  console.log('package.json not readable:', e.message);
}
JS

Repository: auth0/auth0-ui-components

Length of output: 185


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Narrow docs or source mentions of MutationCache / execute if any
rg -n "MutationCache|mutation.execute|refetchQueries\\(|cacheTime: cacheConfig.cacheTime|gcTime" src docs-site -g '!**/dist/**' -g '!**/build/**'

Repository: auth0/auth0-ui-components

Length of output: 50382


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Show the TypeScript types for TanStack Query if installed locally in the repo sandbox
node - <<'JS'
const fs = require('fs');
const path = require('path');
const candidates = [
  'node_modules/@tanstack/react-query/build/modern/index.d.ts',
  'node_modules/@tanstack/react-query/build/legacy/index.d.ts',
  'node_modules/@tanstack/react-query/package.json',
];
for (const p of candidates) {
  if (fs.existsSync(p)) {
    console.log('FOUND', p);
    if (p.endsWith('.d.ts')) {
      const text = fs.readFileSync(p, 'utf8');
      const m = text.match(/interface Mutation[^]*?{[^]*?execute\(/m);
      console.log(m ? 'contains Mutation.execute signature' : 'no Mutation.execute match in this file');
    } else if (p.endsWith('package.json')) {
      console.log(fs.readFileSync(p, 'utf8'));
    }
  }
}
JS

Repository: auth0/auth0-ui-components

Length of output: 163


🌐 Web query:

TanStack Query v5 Mutation execute method documented MutationCache onError cacheTime gcTime compat

💡 Result:

In TanStack Query v5, the mutation execution and cache management have specific implementations and terminology: Execution Method The primary method for triggering a mutation is the mutate function returned by the useMutation hook [1][2]. It has the signature: mutate(variables, { onSuccess, onSettled, onError }) [1][2]. Additionally, mutateAsync is available, which performs the same action but returns a promise that resolves on success or throws on error [2][3]. Internally, the class-based Mutation object manages the execution lifecycle, including invoking the mutationFn via a retryer and dispatching status changes [4]. MutationCache and onError The MutationCache is used for global mutation side effects [5][6]. You can define an onError callback when instantiating the MutationCache, which triggers globally whenever any mutation encounters an error [5][6]. The signature for the MutationCache's onError is: onError(error, variables, onMutateResult, mutation, mutationFnContext) [5][7]. Global callbacks provided to the MutationCache are distinct from QueryClient defaultOptions because they are always executed and cannot be overridden by individual mutations [5][6]. gcTime vs. cacheTime (Compatibility) In TanStack Query v5, the property formerly known as cacheTime has been renamed to gcTime (garbage collection time) [8][9]. This rename was implemented because cacheTime was considered misleading—it does not manage the duration of data storage while a query is in active use, but rather the time inactive/unused data remains in memory before being garbage collected [8][9]. There is no "compat" mode for the old name; you must update your code to use gcTime [9].

Citations:


🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf 'top-level:\n'
find . -maxdepth 2 -type d | sort | sed -n '1,120p'

printf '\nfiles mentioning tanstack compat or cache migration:\n'
rg -n "tanstack-compat|isMutationLoading|getPreviousDataOption|cacheTime|gcTime|MutationCache|mutation.execute" . -g '!**/dist/**' -g '!**/build/**' -g '!**/node_modules/**' | sed -n '1,220p'

Repository: auth0/auth0-ui-components

Length of output: 50382


🌐 Web query:

TanStack Query v5 docs MutationCache onError mutation parameter execute method internal public API cacheTime renamed gcTime

💡 Result:

In TanStack Query v5, the MutationCache and related mutation configurations have several key features and updates: Renaming of cacheTime to gcTime The property previously known as cacheTime has been renamed to gcTime (garbage collection time) [1][2][3]. This change was made because the previous name was frequently misunderstood; gcTime more accurately describes the duration that inactive or unused data remains in memory before being garbage collected [2]. MutationCache onError and Callbacks The MutationCache allows you to define global callbacks such as onError, onSuccess, onSettled, and onMutate [4][5]. These global callbacks are distinct from the options provided to useMutation or mutate [4][6]. - Global callbacks on the MutationCache will always be triggered, whereas options passed to individual mutations (via useMutation or the mutate function) can override defaults [4][5]. - The onError parameter in the MutationCache receives several arguments, including error, variables, onMutateResult, the mutation instance, and the MutationFunctionContext [4][7]. - You can return a Promise from these cache-level callbacks, and TanStack Query will await it [4][5]. Interaction and API While the MutationCache serves as the internal storage for mutations, it is generally recommended to interact with mutations through the QueryClient rather than directly accessing the MutationCache [8][5]. Public methods available on the MutationCache include getAll (to retrieve all mutations), subscribe (to listen to cache updates), and clear [5]. For handling errors specifically, developers often use the MutationCache to set up global error-handling logic (e.g., showing toasts), as these will fire for every mutation unless handled otherwise [6]. The meta field can be used to pass arbitrary information through the mutation, which can be useful when you need to distinguish or configure behavior within these global handlers [6][9].

Citations:


🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '== source locations ==\n'
fd -a 'query-provider.tsx|tanstack-compat.ts|cache-types.ts' packages/react docs-site/public -E node_modules

printf '\n== query-provider source ==\n'
sed -n '1,240p' packages/react/src/providers/query-provider.tsx

printf '\n== tanstack compat source ==\n'
sed -n '1,220p' packages/react/src/lib/utils/tanstack-compat.ts

printf '\n== tanstack mutation type surface ==\n'
node - <<'JS'
const fs = require('fs');
const paths = [
  'node_modules/@tanstack/query-core/build/modern/mutation.d.ts',
  'node_modules/@tanstack/query-core/build/legacy/mutation.d.ts',
  'node_modules/@tanstack/react-query/build/modern/index.d.ts',
  'node_modules/@tanstack/react-query/build/legacy/index.d.ts',
];
for (const p of paths) {
  if (!fs.existsSync(p)) continue;
  const text = fs.readFileSync(p, 'utf8');
  const hasExecute = /execute\s*\(/.test(text);
  const hasMutationCacheOnError = /onError.*mutation/i.test(text);
  console.log(`FILE ${p}`);
  console.log(`  execute(): ${hasExecute}`);
  console.log(`  onError/mutation mention: ${hasMutationCacheOnError}`);
}
JS

Repository: auth0/auth0-ui-components

Length of output: 7085


🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '== package manifests mentioning tanstack ==\n'
rg -n '"`@tanstack/react-query`"|tanstack' package.json packages/**/package.json docs-site/package.json 2>/dev/null

printf '\n== packages/react package.json ==\n'
sed -n '1,220p' packages/react/package.json

printf '\n== current cache types source ==\n'
sed -n '1,200p' packages/react/src/types/cache-types.ts

Repository: auth0/auth0-ui-components

Length of output: 4893


🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '== query-core type declarations ==\n'
fd -a 'mutation.d.ts|mutationCache.d.ts|index.d.ts' node_modules/@tanstack -E '*.map' | sed -n '1,80p'

printf '\n== execute references in query-core/react-query d.ts ==\n'
rg -n "execute\\s*\\(" node_modules/@tanstack/query-core node_modules/@tanstack/react-query -g '*.d.ts' -g '*.ts' | sed -n '1,120p'

printf '\n== MutationCache onError signature ==\n'
rg -n "onError\\s*:" node_modules/@tanstack/query-core node_modules/@tanstack/react-query -g '*.d.ts' -g '*.ts' | sed -n '1,120p'

Repository: auth0/auth0-ui-components

Length of output: 308


🌐 Web query:

TanStack Query v5 Mutation object execute method public API query-core mutation.ts execute docs

💡 Result:

In TanStack Query v5, the Mutation class within query-core is primarily an internal abstraction used to manage the lifecycle of mutation instances [1][2]. While it includes an execute method, this method is generally not considered part of the stable public API intended for standard consumer use [1][3]. The execute method has the following signature: execute(variables: TVariables): Promise Functionality and usage: 1. Lifecycle Management: The execute method manages the mutation's lifecycle, including state transitions (pending, success, error), retry logic via internal retryers, and execution of the mutationFn [1][2]. 2. Internal vs. Public Usage: Most users interact with mutations via the useMutation hook (in frameworks like React) or by interacting with the MutationCache via the QueryClient [4][5][1]. Manually instantiating the Mutation class and calling execute is rarely necessary and is discouraged for standard application logic, as it bypasses the integrated observer patterns and hooks provided by the framework-specific adapters [4][1][3]. 3. Implementation: Within mutation.ts, the execute method sets up the mutation function context, initializes a retryer based on provided options (like retry, retryDelay, and networkMode), and dispatches lifecycle events [2]. For most development tasks, such as triggering a mutation, you should use the mutate or mutateAsync methods exposed by the useMutation hook [4][6][7]. These methods provide the correct integration with the component lifecycle and automatic cleanup [7]. Using the internal Mutation class directly is typically reserved for advanced custom integrations or specific tooling requirements [1][3].

Citations:


Avoid calling mutation.execute from the cache callback MutationCache.onError exposes TanStack's internal mutation object, and execute is not a stable public API. That makes the MFA retry path fragile across TanStack bumps; move the retry behind a documented trigger or a local compat wrapper.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs-site/public/r/organization-details-edit.json` around lines 251 - 287,
Update createQueryClient’s MutationCache.onError MFA retry path so the onRetry
handler does not call the internal mutation.execute method directly. Route the
retry through a documented TanStack public trigger or an existing local
compatibility wrapper, while preserving the current success behavior of clearing
GateKeeper state and returning true, and the failure behavior of returning
false.
docs-site/public/r/organization-member-management.json (1)

281-284: 🗄️ Data Integrity & Integration | 🟠 Major | 🏗️ Heavy lift

Resend invitation deletes the original before the replacement is confirmed created — risk of invitation loss.

const resendInvitationMutation = useMutation({
  mutationFn: async (invitation: MemberInvitation) => {
    ...
    const freshInvitation = await ... .organization.invitations.get(invitation.id!);
    await ... .organization.invitations.delete(freshInvitation.id ?? invitation.id!);
    ...
    const response = await ... .organization.invitations.create({ invitees: [{ email, roles }] });
    return Array.isArray(response) ? response[0] : response;
  },

The flow deletes the existing invitation and only afterward attempts to create its replacement. If the create call fails (network error, validation error, rate limit, etc.) after the delete succeeds, the invitation is permanently gone with no compensating action — onError only shows a toast and invalidates the list, it doesn't restore anything. Consider creating the replacement invitation first and only deleting the original after the create succeeds, to avoid data loss on partial failure.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs-site/public/r/organization-member-management.json` around lines 281 -
284, Update resendInvitationMutation so it creates the replacement invitation
before deleting the existing invitation. Preserve the fetched invitation’s email
and roles, then delete the original only after creation succeeds and return the
replacement response; keep the existing success and error handling intact.

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Locate likely source files and related types
git ls-files | rg 'use-member-management-service|organization-(member|invitation)-table|member-management|organization-member-management|organization-invitation-table'

# Quick search for filters / sortConfig usage in the relevant area
rg -n "filters|sortConfig|roleId|memberParams|invitationParams|queryKey: \[" hooks src docs-site/public/r/organization-member-management.json -g '*.ts' -g '*.tsx' -g '*.json'

Repository: auth0/auth0-ui-components

Length of output: 50382


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Map the main hook and related components/types before reading slices
ast-grep outline hooks/my-organization/shared/services/use-member-management-service.ts --view expanded || true
ast-grep outline src --view expanded 2>/dev/null | head -n 200 || true

Repository: auth0/auth0-ui-components

Length of output: 309


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Read the service hook in focused slices
FILE=packages/react/src/hooks/my-organization/shared/services/use-member-management-service.ts
wc -l "$FILE"
sed -n '1,260p' "$FILE"

Repository: auth0/auth0-ui-components

Length of output: 9622


🏁 Script executed:

#!/bin/bash
set -euo pipefail

FILE=packages/react/src/hooks/my-organization/shared/services/use-member-management-service.ts

echo "--- outline ---"
ast-grep outline "$FILE" --view expanded || true

echo "--- key slices ---"
sed -n '1,260p' "$FILE"

Repository: auth0/auth0-ui-components

Length of output: 9927


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Inspect props and filter types used by the tables/service
FILES=(
  packages/react/src/types/my-organization/member-management/organization-member-management-types.ts
  packages/react/src/types/my-organization/member-management/organization-member-table-types.ts
  packages/react/src/types/my-organization/member-management/organization-invitation-table-types.ts
  packages/react/src/hooks/my-organization/use-organization-member-management.ts
)

for f in "${FILES[@]}"; do
  echo "===== $f ====="
  wc -l "$f"
  sed -n '1,260p' "$f"
done

Repository: auth0/auth0-ui-components

Length of output: 25045


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Focus on filter handling and query keys in the service hook
FILE=packages/react/src/hooks/my-organization/shared/services/use-member-management-service.ts

echo "=== lines around query hooks ==="
nl -ba "$FILE" | sed -n '1,260p' | rg -n "invitationsQuery|membersQuery|queryKey|queryFn|filters|sortConfig|SearchFilter|handleRoleFilterChange|memberParams|invitationParams|enabled|setQueryData|invalidateQueries" -n -C 3

echo "=== role filter / query-key related types ==="
rg -n "roleId|filters|sortConfig|SearchFilterProps|MemberManagementSortConfig|MemberManagement.*Params|OrganizationMemberTableProps|OrganizationInvitationTableProps" \
  packages/react/src/types/my-organization/member-management \
  packages/react/src/hooks/my-organization \
  packages/react/src/components/auth0/my-organization/shared/member-management \
  -g '*.ts' -g '*.tsx'

Repository: auth0/auth0-ui-components

Length of output: 232


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Inspect the hook and related types at the exact relevant paths.
for f in \
  packages/react/src/hooks/my-organization/shared/services/use-member-management-service.ts \
  packages/react/src/types/my-organization/member-management/organization-member-management-types.ts \
  packages/react/src/types/my-organization/member-management/organization-member-table-types.ts \
  packages/react/src/types/my-organization/member-management/organization-invitation-table-types.ts \
  packages/react/src/lib/utils/my-organization/member-management/member-management-utils.ts
do
  echo "===== $f ====="
  wc -l "$f"
  sed -n '1,240p' "$f"
done

Repository: auth0/auth0-ui-components

Length of output: 30345


Role filter is a no-op in both tables. invitationParams.filters never reaches organization.invitations.list(...), and memberParams.filters is not included in the members query key or queryFn. The dropdown only updates local state, so the displayed rows never change.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs-site/public/r/organization-member-management.json` around lines 281 -
284, Wire role filters through useMemberManagementService: pass
invitationParams.filters to organization.invitations.list, include
memberParams.filters in the membersQuery query key, and pass it to
organization.members.list. Preserve existing pagination and sorting behavior
while ensuring filter changes refetch and update displayed rows.
docs-site/public/r/sso-provider-create.json (2)

29-29: 🎯 Functional Correctness | 🔴 Critical | ⚡ Quick win

wizardSteps useMemo omits deps it actually reads, freezing Step 1/3 props at stale values.

The memo's factory closes over isLoadingConfig, filteredStrategies, isLoadingIdpConfig, and idpConfig (used for ProviderSelect.isLoading/strategyList and ProviderConfigure.isLoading/idpConfig), but none of them are in the dependency array. Since these query results settle asynchronously shortly after mount — before the user has touched strategy/formData (the deps that actually would trigger recompute) — ProviderSelect can get stuck showing its loading spinner indefinitely instead of the strategy list, and ProviderConfigure can be stuck with a stale/empty idpConfig.

🐛 Proposed fix
     [
       t,
       strategy,
       details,
       configure,
       onNext,
       onPrevious,
       customMessages,
       currentStyles,
       styling,
       createStepActions,
+      isLoadingConfig,
+      filteredStrategies,
+      isLoadingIdpConfig,
+      idpConfig,
     ],
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

    [
      t,
      strategy,
      details,
      configure,
      onNext,
      onPrevious,
      customMessages,
      currentStyles,
      styling,
      createStepActions,
      isLoadingConfig,
      filteredStrategies,
      isLoadingIdpConfig,
      idpConfig,
    ],
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs-site/public/r/sso-provider-create.json` at line 29, Update the
dependency array of SsoProviderCreateView’s wizardSteps useMemo to include every
value read by its factory, especially isLoadingConfig, filteredStrategies,
isLoadingIdpConfig, and idpConfig, so ProviderSelect and ProviderConfigure
receive refreshed asynchronous state. Preserve the existing step behavior and
other dependencies.

298-302: 🩺 Stability & Availability | 🔴 Critical | ⚡ Quick win

Same stale-authDetails useEffect deps issue as flagged for the shared hook.

useCoreClientInitialization only tracks authProxyUrl, not the full authDetails object it passes to createCoreClient. This matters here too via proxy-provider.tsx/spa-provider.tsx (lines 353, 365).

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs-site/public/r/sso-provider-create.json` around lines 298 - 302, The
useCoreClientInitialization effect tracks only authProxyUrl while
createCoreClient consumes the full authDetails object. Update the dependency
array in useCoreClientInitialization to include authDetails, ensuring
initialization reruns whenever any authentication detail changes while
preserving the existing telemetry and callback dependencies.
docs-site/public/r/sso-provider-table.json (1)

26-26: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Stale closure: columns memo is missing shouldAllowDeletion and customMessages deps.

SsoProviderTableView's columns useMemo renders SsoProviderTableActionsColumn with shouldAllowDeletion={shouldAllowDeletion} and customMessages={customMessages}, but neither is in the dependency array ([t, readOnly, editAction, isUpdating, hideDeleteProvider, hideRemoveFromOrganization, handleEdit, handleDelete, handleDeleteFromOrganization, handleToggleEnabled]). Since shouldAllowDeletion comes from the async useConfig() call and typically resolves from false to true after the initial render, the memoized column definitions keep referencing the stale value — the Delete menu item's visibility will not update once config finishes loading.

🐛 Proposed fix
     [
       t,
       readOnly,
       editAction,
       isUpdating,
       hideDeleteProvider,
       hideRemoveFromOrganization,
       handleEdit,
       handleDelete,
       handleDeleteFromOrganization,
       handleToggleEnabled,
+      shouldAllowDeletion,
+      customMessages,
     ],
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

    [
      t,
      readOnly,
      editAction,
      isUpdating,
      hideDeleteProvider,
      hideRemoveFromOrganization,
      handleEdit,
      handleDelete,
      handleDeleteFromOrganization,
      handleToggleEnabled,
      shouldAllowDeletion,
      customMessages,
    ],
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs-site/public/r/sso-provider-table.json` at line 26, Update the columns
useMemo dependency array in SsoProviderTableView to include shouldAllowDeletion
and customMessages, matching the values passed to SsoProviderTableActionsColumn.
Preserve the existing column rendering and other dependencies so async
configuration updates refresh the Delete action visibility and custom messages.
docs-site/public/r/v3/3.0.0/my-account/user-mfa-management.json (2)

7-23: 🗄️ Data Integrity & Integration | 🔴 Critical | ⚡ Quick win

Missing @tanstack/react-query dependency.

use-user-mfa-service.ts (line 201) imports useQuery/useMutation from @tanstack/react-query, and query-provider.tsx also depends on it, but the package isn't declared in this registry item's dependencies.

🐛 Proposed fix
   "dependencies": [
     "`@auth0/universal-components-core`@3.0.0",
     "`@auth0/auth0-react`@^2.15.1",
+    "`@tanstack/react-query`@^5.56.2",
     "`@hookform/resolvers`@^5.1.0",
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs-site/public/r/v3/3.0.0/my-account/user-mfa-management.json` around lines
7 - 23, Add `@tanstack/react-query` to the dependencies list for the user MFA
management registry item, so imports in use-user-mfa-service.ts and
query-provider.tsx resolve from a declared package dependency.

213-215: 🩺 Stability & Availability | 🔴 Critical | ⚡ Quick win

Same stale-authDetails useEffect deps bug in useCoreClientInitialization as flagged elsewhere in this batch (only authProxyUrl tracked instead of the full memoized authDetails object, consumed via proxy-provider.tsx/spa-provider.tsx).

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs-site/public/r/v3/3.0.0/my-account/user-mfa-management.json` around lines
213 - 215, Update the dependency array of useCoreClientInitialization so it
tracks the full authDetails object consumed by createCoreClient, rather than
only authProxyUrl. Preserve the existing telemetry and i18n dependencies while
ensuring changes to any authDetails field reinitialize the client.
docs-site/public/r/v3/3.0.0/my-account/user-passkey-management.json (2)

7-20: 🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '\n== target file ==\n'
sed -n '1,120p' docs-site/public/r/v3/3.0.0/my-account/user-passkey-management.json

printf '\n== locate referenced source files ==\n'
git ls-files | rg 'use-user-passkey-service\.ts$|proxy-provider\.tsx$|spa-provider\.tsx$|packages/react/registry\.json$|my-account/user-passkey-management\.json$'

printf '\n== search for tanstack/react-query usage in registry docs ==\n'
rg -n '"`@tanstack/react-query`"|from "`@tanstack/react-query`"|from '\''`@tanstack/react-query`'\''' docs-site/public/r/v3/3.0.0/my-account packages/react -g '!**/node_modules/**' -g '!**/dist/**'

printf '\n== inspect package registry / item definitions ==\n'
sed -n '1,240p' packages/react/registry.json 2>/dev/null || true
sed -n '1,240p' docs-site/public/r/v3/3.0.0/my-account/user-passkey-management.json

printf '\n== inspect relevant source snippets if present ==\n'
for f in \
  src/hooks/my-account/shared/services/use-user-passkey-service.ts \
  src/components/my-account/proxy-provider.tsx \
  src/components/my-account/spa-provider.tsx
do
  if [ -f "$f" ]; then
    echo "--- $f ---"
    nl -ba "$f" | sed -n '1,260p'
  fi
done
PY

Repository: auth0/auth0-ui-components

Length of output: 50386


🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '\n== target file ==\n'
sed -n '1,120p' docs-site/public/r/v3/3.0.0/my-account/user-passkey-management.json

printf '\n== locate referenced source files ==\n'
git ls-files | rg 'use-user-passkey-service\.ts$|proxy-provider\.tsx$|spa-provider\.tsx$|packages/react/registry\.json$|my-account/user-passkey-management\.json$'

printf '\n== search for tanstack/react-query usage in registry docs ==\n'
rg -n '"`@tanstack/react-query`"|from "`@tanstack/react-query`"|from '\''`@tanstack/react-query`'\''' docs-site/public/r/v3/3.0.0/my-account packages/react -g '!**/node_modules/**' -g '!**/dist/**'

printf '\n== inspect package registry / item definitions ==\n'
sed -n '1,240p' packages/react/registry.json 2>/dev/null || true

printf '\n== inspect relevant source snippets if present ==\n'
for f in \
  src/hooks/my-account/shared/services/use-user-passkey-service.ts \
  src/components/my-account/proxy-provider.tsx \
  src/components/my-account/spa-provider.tsx
do
  if [ -f "$f" ]; then
    echo "--- $f ---"
    nl -ba "$f" | sed -n '1,260p'
  fi
done

Repository: auth0/auth0-ui-components

Length of output: 50384


🏁 Script executed:

#!/bin/bash
set -euo pipefail

python3 - <<'PY'
import json, pathlib
p = pathlib.Path('docs-site/public/r/v3/3.0.0/my-account/user-passkey-management.json')
data = json.loads(p.read_text())
print('dependencies:')
for d in data.get('dependencies', []):
    print('-', d)
print('\nfiles:')
for f in data.get('files', []):
    print('-', f['path'], '| type=', f.get('type'), '| target=', f.get('target'))
    content = f.get('content', '')
    if '`@tanstack/react-query`' in content or 'use-user-passkey-service' in content or 'use-user-passkey' in content:
        print('  contains relevant token(s)')
PY

printf '\n== search for the hook/service files in repo ==\n'
git ls-files | rg 'src/hooks/my-account/(use-user-passkey|shared/services/use-user-passkey-service)\.ts$'

printf '\n== inspect hook/service if present ==\n'
for f in \
  src/hooks/my-account/use-user-passkey.ts \
  src/hooks/my-account/shared/services/use-user-passkey-service.ts
do
  if [ -f "$f" ]; then
    echo "--- $f ---"
    nl -ba "$f" | sed -n '1,260p'
  fi
done

printf '\n== find any registry items that include react-query dependency ==\n'
rg -n '"`@tanstack/react-query`@' docs-site/public/r/v3/3.0.0 -g '*.json'

Repository: auth0/auth0-ui-components

Length of output: 5560


🏁 Script executed:

#!/bin/bash
set -euo pipefail

for f in \
  packages/react/src/hooks/my-account/shared/services/use-user-passkey-service.ts \
  packages/react/src/hooks/my-account/use-user-passkey.ts \
  packages/react/src/providers/query-provider.tsx \
  packages/react/package.json
do
  echo "=== $f ==="
  if [ -f "$f" ]; then
    nl -ba "$f" | sed -n '1,240p'
  else
    echo "(missing)"
  fi
  echo
done

printf '\n== search for react-query imports in packages/react/src ==\n'
rg -n "from '`@tanstack/react-query`'|from \"`@tanstack/react-query`\"|useMutation|useQueryClient|useQuery" packages/react/src -g '!**/dist/**'

Repository: auth0/auth0-ui-components

Length of output: 292


🏁 Script executed:

#!/bin/bash
set -euo pipefail

for f in \
  packages/react/src/hooks/my-account/shared/services/use-user-passkey-service.ts \
  packages/react/src/hooks/my-account/use-user-passkey.ts \
  packages/react/src/providers/query-provider.tsx \
  packages/react/package.json
do
  echo "=== $f ==="
  if [ -f "$f" ]; then
    sed -n '1,240p' "$f" | cat -n
  else
    echo "(missing)"
  fi
  echo
done

printf '\n== react-query mentions in package metadata ==\n'
rg -n '"`@tanstack/react-query`"|`@tanstack/react-query`' packages/react -g 'package.json' -g 'pnpm-lock.yaml' -g 'yarn.lock' -g 'package-lock.json'

Repository: auth0/auth0-ui-components

Length of output: 19792


🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '== tanstack/react-query version in lockfiles ==\n'
rg -n '"`@tanstack/react-query`"|`@tanstack/react-query`@' -g 'pnpm-lock.yaml' -g 'package-lock.json' -g 'yarn.lock' -g '!**/node_modules/**' .

printf '\n== version in package manifests outside packages/react ==\n'
rg -n '"`@tanstack/react-query`"\s*:\s*"[^\"]+"' -g 'package.json' -g '!packages/react/package.json' .

Repository: auth0/auth0-ui-components

Length of output: 536


Add @tanstack/react-query to the registry dependencies.

use-user-passkey-service.ts and query-provider.tsx both import from @tanstack/react-query, but docs-site/public/r/v3/3.0.0/my-account/user-passkey-management.json doesn't declare it. Consumers installing this block can hit unresolved-module errors unless they already have it.

🐛 Proposed fix
   "dependencies": [
     "`@auth0/universal-components-core`@3.0.0",
     "`@auth0/auth0-react`@^2.15.1",
+    "`@tanstack/react-query`@^5.90.11",
     "`@radix-ui/react-dialog`@^1.1.14",
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

  "dependencies": [
    "`@auth0/universal-components-core`@3.0.0",
    "`@auth0/auth0-react`@^2.15.1",
    "`@tanstack/react-query`@^5.90.11",
    "`@radix-ui/react-dialog`@^1.1.14",
    "`@radix-ui/react-dropdown-menu`@^2.1.1",
    "`@radix-ui/react-slot`@^1.2.3",
    "`@radix-ui/react-switch`@^1.1.0",
    "`@radix-ui/react-tooltip`@^1.2.7",
    "class-variance-authority@^0.7.1",
    "clsx@^2.1.1",
    "lucide-react@^1.16.0",
    "sonner@^2.0.5",
    "tailwind-merge@^3.3.0"
  ],
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs-site/public/r/v3/3.0.0/my-account/user-passkey-management.json` around
lines 7 - 20, Add `@tanstack/react-query` to the dependencies array in the
user-passkey-management registry definition, using the version required by the
imported use-user-passkey-service.ts and query-provider.tsx components.

138-140: 🩺 Stability & Availability | 🔴 Critical | ⚡ Quick win

useEffect deps miss most of authDetails, causing stale CoreClient initialization.

Only authProxyUrl is tracked in the effect's dependency array, but the closure captures the whole authDetails object passed to createCoreClient. In SPA mode (spa-provider.tsx), authProxyUrl is always undefined, so when authContext/contextInterface transitions (e.g. Auth0 resolving from unauthenticated → authenticated after mount) the effect never re-runs and the CoreClient keeps using the stale initial auth context.

🐛 Proposed fix
     initializeCoreClient();
-  }, [authProxyUrl, i18nOptions, telemetry, getComponent]);
+  }, [authDetails, i18nOptions, telemetry, getComponent]);

authDetails is memoized upstream (React.useMemo) in both proxy-provider.tsx and spa-provider.tsx, so this is safe from re-render loops.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

/**
 * CoreClient initialization hook.
 * `@module` use-core-client-initialization
 * `@internal`
 */

import type {
  CoreClientInterface,
  AuthDetails,
  I18nInitOptions,
  TelemetryConfig,
  TelemetryComponentGetter,
} from '`@auth0/universal-components-core`';
import { createCoreClient } from '`@auth0/universal-components-core`';
import * as React from 'react';

interface UseCoreClientInitializationProps {
  authDetails: AuthDetails;
  i18nOptions?: I18nInitOptions;
  telemetry: TelemetryConfig;
  getComponent: TelemetryComponentGetter;
}

/**
 * `@internal`
 * `@param` props - Initialization props.
 * `@returns` The initialized CoreClient instance, or null while initializing.
 */
export const useCoreClientInitialization = ({
  authDetails,
  i18nOptions,
  telemetry,
  getComponent,
}: UseCoreClientInitializationProps): CoreClientInterface | null => {
  const { authProxyUrl } = authDetails;
  const [coreClient, setCoreClient] = React.useState<CoreClientInterface | null>(null);

  React.useEffect(() => {
    // Wait for CSS detection to complete before initializing (skip if telemetry disabled)
    if (telemetry.enabled && telemetry.css === 'unknown') {
      return;
    }

    const initializeCoreClient = async () => {
      try {
        const initializedCoreClient = await createCoreClient(
          authDetails,
          i18nOptions,
          telemetry,
          getComponent,
        );
        setCoreClient(initializedCoreClient);
      } catch (error) {
        console.error(error);
      }
    };
    initializeCoreClient();
  }, [authDetails, i18nOptions, telemetry, getComponent]);

  return coreClient;
};
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs-site/public/r/v3/3.0.0/my-account/user-passkey-management.json` around
lines 138 - 140, Update the useCoreClientInitialization effect dependencies to
track the complete memoized authDetails object rather than only authProxyUrl,
ensuring createCoreClient reruns when authentication context or interface
changes while preserving the existing initialization guards and flow.
docs-site/public/r/v3/3.0.0/my-organization/organization-member-detail.json (1)

7-23: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo '--- registry file dependencies ---'
python3 - <<'PY'
import json, pathlib
p = pathlib.Path('docs-site/public/r/v3/3.0.0/my-organization/organization-member-detail.json')
data = json.loads(p.read_text())
deps = data.get('dependencies', [])
for d in deps:
    print(d)
PY

echo
echo '--- search for react-query references in the registry block ---'
rg -n '"`@tanstack/react-query`"|useQuery|useMutation|useQueryClient' docs-site/public/r/v3/3.0.0/my-organization/organization-member-detail.json

echo
echo '--- locate the referenced source files if present in repo ---'
fd -a 'use-member-detail-service.ts|use-member-management-service.ts|query-provider.tsx' .

echo
echo '--- search repo for react-query imports ---'
rg -n 'from\s+[\'\"]`@tanstack/react-query`[\'\"]|`@tanstack/react-query`' .

Repository: auth0/auth0-ui-components

Length of output: 19280


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo '--- top-level keys / structure of the registry file ---'
python3 - <<'PY'
import json, pathlib
p = pathlib.Path('docs-site/public/r/v3/3.0.0/my-organization/organization-member-detail.json')
data = json.loads(p.read_text())
print(sorted(data.keys()))
print('dependencies_count=', len(data.get('dependencies', [])))
print('entries_count=', len(data.get('entries', [])) if isinstance(data.get('entries'), list) else 'n/a')
PY

echo
echo '--- other registry files in same directory mentioning react-query ---'
rg -n '"`@tanstack/react-query`"' docs-site/public/r/v3/3.0.0/my-organization

echo
echo '--- sample nearby registry file dependency list if available ---'
fd -a 'organization-*.json' docs-site/public/r/v3/3.0.0/my-organization | head -n 10

Repository: auth0/auth0-ui-components

Length of output: 417


Add @tanstack/react-query to this registry entry The embedded use-member-detail-service.ts, use-member-management-service.ts, and query-provider.tsx imports still depend on it, but it’s missing from dependencies.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs-site/public/r/v3/3.0.0/my-organization/organization-member-detail.json`
around lines 7 - 23, Add `@tanstack/react-query` to the dependencies array for
this registry entry, alongside the other TanStack packages, so the embedded
use-member-detail-service.ts, use-member-management-service.ts, and
query-provider.tsx imports resolve correctly.
docs-site/public/r/v3/3.0.0/my-organization/organization-member-management.json (2)

279-284: 🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

Revoke-and-resend drops the invitation's identity_provider_id.

resendInvitationMutation recreates the invitation with only email and roles, but never forwards identity_provider_id from the original/fresh invitation. CreateInvitationInput.identity_provider_id is a real, supported field (used by the create modal), so an invitation originally scoped to a specific identity provider silently loses that restriction when a user clicks "revoke and resend."

🐛 Proposed fix
       const response = await coreClient!
         .getMyOrganizationApiClient()
         .organization.invitations.create({
-          invitees: [{ email, roles }],
+          invitees: [{ email, roles }],
+          identity_provider_id: freshInvitation.identity_provider_id ?? invitation.identity_provider_id,
         });
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

  const resendInvitationMutation = useMutation({
    mutationFn: async (invitation: MemberInvitation) => {
      if (resendInvitationAction?.onBefore && !resendInvitationAction.onBefore(invitation)) {
        throw new Error('Resend action cancelled by onBefore');
      }
      const freshInvitation = await coreClient!
        .getMyOrganizationApiClient()
        .organization.invitations.get(invitation.id!);
      await coreClient!
        .getMyOrganizationApiClient()
        .organization.invitations.delete(freshInvitation.id ?? invitation.id!);
      const email = freshInvitation.invitee?.email ?? invitation.invitee?.email ?? '';
      const roles = freshInvitation.roles ?? invitation.roles;
      const response = await coreClient!
        .getMyOrganizationApiClient()
        .organization.invitations.create({
          invitees: [{ email, roles }],
          identity_provider_id: freshInvitation.identity_provider_id ?? invitation.identity_provider_id,
        });
      return Array.isArray(response) ? response[0] : response;
    },
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@docs-site/public/r/v3/3.0.0/my-organization/organization-member-management.json`
around lines 279 - 284, Update resendInvitationMutation to preserve the original
invitation’s identity_provider_id when creating the replacement invitation. Read
it from freshInvitation, falling back to invitation if necessary, and include it
alongside email and roles in the create request while preserving existing resend
behavior.

393-398: 🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

types/index.ts barrel should not be shipped as a standalone file here.

src/types/index.ts re-exports many submodules that are not included in these item manifests, so a standalone install will leave unresolved imports and fail TypeScript compilation. Either remove the src/types/index.ts entry from the affected manifests or replace it with a barrel that only re-exports files shipped by the item.

📍 Affects 2 files
  • docs-site/public/r/v3/3.0.0/my-organization/organization-member-management.json#L393-L398 (this comment)
  • docs-site/public/r/v3/3.0.0/registry.json#L1571-L1574
  • docs-site/public/r/v3/3.0.0/registry.json#L1979-L1982
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@docs-site/public/r/v3/3.0.0/my-organization/organization-member-management.json`
around lines 393 - 398, The standalone src/types/index.ts barrel re-exports
modules not shipped by these items, causing unresolved imports. Remove its
manifest entry from
docs-site/public/r/v3/3.0.0/my-organization/organization-member-management.json:393-398,
docs-site/public/r/v3/3.0.0/registry.json:1571-1574, and
docs-site/public/r/v3/3.0.0/registry.json:1979-1982; no replacement barrel is
required.
docs-site/public/r/v3/3.0.0/my-organization/sso-provider-create.json (3)

7-25: 🗄️ Data Integrity & Integration | 🔴 Critical | ⚡ Quick win

Same missing @tanstack/react-query dependency issue as in docs-site/public/r/sso-provider-create.json (line 8 shows the same 2.1.1 → 3.0.0 core bump but @tanstack/react-query is still absent while use-sso-provider-create-service.ts at line 269 requires it).

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs-site/public/r/v3/3.0.0/my-organization/sso-provider-create.json` around
lines 7 - 25, Add `@tanstack/react-query` to the dependencies array in the
generated sso-provider-create manifest, matching the dependency declaration used
by docs-site/public/r/sso-provider-create.json and the requirements of
use-sso-provider-create-service.ts.

29-29: 🎯 Functional Correctness | 🔴 Critical | ⚡ Quick win

Same wizardSteps useMemo missing-dependencies bug as flagged in docs-site/public/r/sso-provider-create.json (isLoadingConfig, filteredStrategies, isLoadingIdpConfig, idpConfig used but not in deps array).

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs-site/public/r/v3/3.0.0/my-organization/sso-provider-create.json` at line
29, Update the `wizardSteps` `useMemo` dependency array in
`SsoProviderCreateView` to include the referenced `isLoadingConfig`,
`filteredStrategies`, `isLoadingIdpConfig`, and `idpConfig` values, preserving
the existing step definitions and behavior.

298-302: 🩺 Stability & Availability | 🔴 Critical | ⚡ Quick win

Same stale-authDetails useEffect deps bug in useCoreClientInitialization as flagged elsewhere (only authProxyUrl tracked, not the full authDetails object).

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs-site/public/r/v3/3.0.0/my-organization/sso-provider-create.json` around
lines 298 - 302, Update the dependency array of useCoreClientInitialization’s
React.useEffect to track the complete authDetails object rather than only
authProxyUrl, ensuring client initialization reruns when any authentication
detail changes. Keep the existing initialization logic unchanged.
docs-site/public/r/v3/3.0.0/my-organization/sso-provider-edit.json (1)

139-143: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Stale closures: columns useMemo in sso-domain-tab.tsx is missing dependencies.

The columns memo only depends on [t], but its actions column render closes over idpDomains, readOnly, isUpdating, isUpdatingId, customMessages, handleToggleSwitch, and handleVerifyActionColumn. Because these aren't in the dependency array, the rendered action column keeps referencing first-render values of isUpdating/isUpdatingId/idpDomains/readOnly, so the per-row toggle/spinner state can go stale after a user interacts with a domain. Compare with OrganizationInvitationTable/OrganizationMemberTable in this same PR, which correctly list all referenced values.

🐛 Proposed fix
-  const columns: Column<Domain>[] = React.useMemo(
-    () => [
+  const columns: Column<Domain>[] = React.useMemo(
+    () => [
       ...
-    ],
-    [t],
-  );
+    ],
+    [
+      t,
+      idpDomains,
+      readOnly,
+      isUpdating,
+      isUpdatingId,
+      customMessages,
+      handleToggleSwitch,
+      handleVerifyActionColumn,
+    ],
+  );
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

  const columns: Column<Domain>[] = React.useMemo(
    () => [
      {
        type: 'text',
        accessorKey: 'domain',
        title: t('table.columns.name'),
        render: (domain) => (
          <div className="font-medium text-primary truncate">{domain.domain}</div>
        ),
      },
      {
        type: 'text',
        accessorKey: 'status',
        title: t('table.columns.status'),
        render: (domain) => (
          <Badge variant={getStatusBadgeVariant(domain.status)} size={'sm'}>
            {t(`table.domain_statuses.${domain.status}`)}
          </Badge>
        ),
      },
      {
        type: 'actions',
        title: '',
        render: (domain) => (
          <SsoDomainTabActionsColumn
            translatorKey="idp_management.edit_sso_provider.tabs.domains.content"
            idpDomains={idpDomains}
            readOnly={readOnly}
            isUpdating={isUpdating}
            isUpdatingId={isUpdatingId}
            customMessages={customMessages}
            onToggle={handleToggleSwitch}
            handleVerify={handleVerifyActionColumn}
            domain={domain}
          />
        ),
      },
    ],
    [
      t,
      idpDomains,
      readOnly,
      isUpdating,
      isUpdatingId,
      customMessages,
      handleToggleSwitch,
      handleVerifyActionColumn,
    ],
  );
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs-site/public/r/v3/3.0.0/my-organization/sso-provider-edit.json` around
lines 139 - 143, Update the columns useMemo in SsoDomainTab to include every
value captured by the actions column render: t, idpDomains, readOnly,
isUpdating, isUpdatingId, customMessages, handleToggleSwitch, and
handleVerifyActionColumn. Preserve the existing column definitions while
ensuring the memo rebuilds when any action-column state or callback changes.
packages/react/registry.json (1)

12-19: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Confirm every block still importing '`@tanstack/react-query`' also lists it as a dependency
rg -n "from '`@tanstack/react-query`'" -g '*.ts' -g '*.tsx' packages 2>/dev/null
rg -n '"`@tanstack/react-query`' packages/react/registry.json

Repository: auth0/auth0-ui-components

Length of output: 4276


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Show the relevant registry blocks and whether '`@tanstack/react-query`' appears in dependencies.
rg -n -C 4 '"`@tanstack/react-query`"|files|dependencies|user-mfa-management|user-passkey-management|domain-table|organization-details-edit|organization-member-detail|organization-member-management|sso-provider-create|sso-provider-edit|sso-provider-table' packages/react/registry.json

Repository: auth0/auth0-ui-components

Length of output: 37739


Restore @tanstack/react-query in these registry block dependencies. All nine blocks here list hooks/providers that import it directly, so consumers installing them via the CLI won't get a required package auto-installed.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/react/registry.json` around lines 12 - 19, Update the dependency
lists for all nine registry blocks in packages/react/registry.json to include
`@tanstack/react-query`, preserving the existing dependency entries and ordering
conventions so CLI-installed consumers receive the required package.

@chakrihacker
chakrihacker merged commit 5e0ad49 into main Jul 16, 2026
8 checks passed
@chakrihacker
chakrihacker deleted the feat/shadcn-registry-for-v3 branch July 16, 2026 06:04
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.

3 participants