Skip to content

fix(shared): Prevent stale closures in useReverification hook #6201

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

bratsos
Copy link

@bratsos bratsos commented Jun 26, 2025

Description

Addresses a stale closure bug within the useReverification hook and improves the stability of our test environment.

The primary issue was that the hook could capture an initial version of the fetcher function and would not use the updated version on subsequent re-renders.

Checklist

  • pnpm test runs as expected.
  • pnpm build runs as expected.
  • (If applicable) JSDoc comments have been added or updated for any package exports
  • (If applicable) Documentation has been updated

Type of change

  • 🐛 Bug fix
  • 🌟 New feature
  • 🔨 Breaking change
  • 📖 Refactoring / dependency upgrade / documentation
  • other:

Summary by CodeRabbit

  • New Features

    • Enhanced Jest testing environment to provide global access to the Response API during tests.
  • Bug Fixes

    • Improved the stability and correctness of the useReverification hook by updating its internal logic for handler creation and invocation.
  • Tests

    • Added new tests to verify the runtime behavior and function identity stability of the useReverification hook.

Copy link

changeset-bot bot commented Jun 26, 2025

⚠️ No Changeset found

Latest commit: 5c1071a

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link

vercel bot commented Jun 26, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
clerk-js-sandbox ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 27, 2025 5:01pm

@bratsos bratsos changed the title fix(shared): prevent stale closures in useReverification hook fix(shared): Prevent stale closures in useReverification hook Jun 27, 2025
@@ -14,7 +14,7 @@ const CLERK_API_REVERIFICATION_ERROR_CODE = 'session_reverification_required';
async function resolveResult<T>(result: Promise<T> | T): Promise<T | ReturnType<typeof reverificationError>> {
try {
const r = await result;
if (r instanceof Response) {
if (typeof Response !== 'undefined' && r instanceof Response) {
Copy link
Member

Choose a reason for hiding this comment

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

❓ Just curious, did this ever run in an env where Response was not defined as a global identifier?

Copy link
Author

@bratsos bratsos Jun 27, 2025

Choose a reason for hiding this comment

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

Great question! My tests were failing without this, and after digging a bit deeper, I figured that even though we're using jsdom fetch is not supported and its maintainers have confirmed they won't be using Node's native fetch. This is because they need their own spec-compliant implementation that integrates with jsdom's internals, so the missing Response global is intentional.

Instead of changing the production code to handle this, the best solution was to patch our test environment directly with Node's native fetch APIs (which are stable since v18). This makes the tests pass without altering the hook's logic.

Thanks for the prompt, it definitely led to a better solution 🎉

Copy link
Member

@panteliselef panteliselef left a comment

Choose a reason for hiding this comment

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

Makes sense, nice find. If we have a ticket related to this could you add it on the description of the PR ?

bratsos added 3 commits June 27, 2025 18:22
Configures Jest to use a custom test environment that patches the JSDOM global scope with `fetch`, `Request`, and `Response` from Node.js.

Since Node.js v18+ provides these fetch-related APIs as stable globals, we can reliably polyfill the test environment to ensure they are always available
@bratsos bratsos marked this pull request as ready for review June 27, 2025 16:24
Copy link
Contributor

coderabbitai bot commented Jun 27, 2025

📝 Walkthrough

Walkthrough

A new custom Jest environment, CustomJSDOMEnvironment, was added to ensure the global Response API is available in tests by explicitly assigning it in the environment's global scope. The Jest configuration was updated to use this custom environment instead of the default jsdom. In the useReverification React hook, the memoization approach was changed from useMemo to useCallback, altering when and how the handler function is created and invoked. The corresponding test file was enhanced with runtime behavioral tests using React hooks testing utilities, verifying function identity stability and correct invocation behavior. No changes were made to the public API surfaces.


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 1367d39 and 3c848ac.

📒 Files selected for processing (4)
  • packages/shared/customJSDOMEnvironment.ts (1 hunks)
  • packages/shared/jest.config.js (1 hunks)
  • packages/shared/src/react/__tests__/useReverification.test.ts (2 hunks)
  • packages/shared/src/react/hooks/useReverification.ts (2 hunks)
🧰 Additional context used
📓 Path-based instructions (6)
`**/*.{js,ts,tsx,jsx}`: All code must pass ESLint checks with the project's configuration. Use Prettier for consistent code formatting.

**/*.{js,ts,tsx,jsx}: All code must pass ESLint checks with the project's configuration.
Use Prettier for consistent code formatting.

📄 Source: CodeRabbit Inference Engine (.cursor/rules/development.mdc)

List of files the instruction was applied to:

  • packages/shared/jest.config.js
  • packages/shared/customJSDOMEnvironment.ts
  • packages/shared/src/react/__tests__/useReverification.test.ts
  • packages/shared/src/react/hooks/useReverification.ts
`packages/**`: All publishable packages under the @clerk namespace must be located in the packages/ directory.

packages/**: All publishable packages under the @clerk namespace must be located in the packages/ directory.

📄 Source: CodeRabbit Inference Engine (.cursor/rules/global.mdc)

List of files the instruction was applied to:

  • packages/shared/jest.config.js
  • packages/shared/customJSDOMEnvironment.ts
  • packages/shared/src/react/__tests__/useReverification.test.ts
  • packages/shared/src/react/hooks/useReverification.ts
`**/*.{ts,tsx}`: Maintain comprehensive JSDoc comments for public APIs.

**/*.{ts,tsx}: Maintain comprehensive JSDoc comments for public APIs.

📄 Source: CodeRabbit Inference Engine (.cursor/rules/development.mdc)

List of files the instruction was applied to:

  • packages/shared/customJSDOMEnvironment.ts
  • packages/shared/src/react/__tests__/useReverification.test.ts
  • packages/shared/src/react/hooks/useReverification.ts
`**/*.ts`: Always define explicit return types for functions, especially public ...

**/*.ts: Always define explicit return types for functions, especially public APIs.
Use proper type annotations for variables and parameters where inference isn't clear.
Avoid any type; prefer unknown when type is uncertain, then narrow with type guards.
Use interface for object shapes that might be extended; use type for unions, primitives, and computed types.
Prefer readonly properties for immutable data structures.
Use private for internal implementation details, protected for inheritance, and public explicitly for clarity in public APIs.
Prefer composition and interfaces over deep inheritance chains; use mixins for shared behavior.
Use ES6 imports/exports consistently; avoid barrel files (index.ts re-exports) to prevent circular dependencies.
Use type-only imports (import type { ... }) where possible.
Use as const for literal types and the satisfies operator for type checking without widening.
Enable --incremental and --tsBuildInfoFile for faster builds.
Use ESLint with @typescript-eslint/recommended rules and Prettier for formatting.
Use lint-staged and Husky for pre-commit checks.
Use type-coverage to measure type safety.

📄 Source: CodeRabbit Inference Engine (.cursor/rules/typescript.mdc)

List of files the instruction was applied to:

  • packages/shared/customJSDOMEnvironment.ts
  • packages/shared/src/react/__tests__/useReverification.test.ts
  • packages/shared/src/react/hooks/useReverification.ts
`**/*.{test,spec}.{js,ts,tsx,jsx}`: Unit tests are required for all new functionality.

**/*.{test,spec}.{js,ts,tsx,jsx}: Unit tests are required for all new functionality.

📄 Source: CodeRabbit Inference Engine (.cursor/rules/development.mdc)

List of files the instruction was applied to:

  • packages/shared/src/react/__tests__/useReverification.test.ts
`**/__tests__/**/*.{js,ts,tsx,jsx}`: Test files should be co-located with source files or in `__tests__` directories.

**/__tests__/**/*.{js,ts,tsx,jsx}: Test files should be co-located with source files or in __tests__ directories.

📄 Source: CodeRabbit Inference Engine (.cursor/rules/development.mdc)

List of files the instruction was applied to:

  • packages/shared/src/react/__tests__/useReverification.test.ts
🧠 Learnings (4)
📓 Common learnings
Learnt from: CR
PR: clerk/javascript#0
File: .cursor/rules/development.mdc:0-0
Timestamp: 2025-06-23T12:25:30.457Z
Learning: Use Jest for unit testing and React Testing Library for component testing; use Playwright for end-to-end integration tests.
Learnt from: CR
PR: clerk/javascript#0
File: .cursor/rules/react.mdc:0-0
Timestamp: 2025-06-23T12:25:57.184Z
Learning: Use React Testing Library for unit and integration testing of React components, focusing on behavior rather than implementation details.
Learnt from: CR
PR: clerk/javascript#0
File: .cursor/rules/monorepo.mdc:0-0
Timestamp: 2025-06-23T12:25:40.214Z
Learning: Unit tests are run with Jest and Vitest, integration tests with Playwright, and component testing with React Testing Library, demonstrating a layered testing strategy.
Learnt from: CR
PR: clerk/javascript#0
File: .cursor/rules/react.mdc:0-0
Timestamp: 2025-06-23T12:25:57.184Z
Learning: Optimize rendering in React by using React.memo for expensive components, useCallback for handlers, useMemo for expensive computations, and implement virtualization for large lists.
packages/shared/jest.config.js (11)
Learnt from: CR
PR: clerk/javascript#0
File: .cursor/rules/monorepo.mdc:0-0
Timestamp: 2025-06-23T12:25:40.214Z
Learning: Unit tests are run with Jest and Vitest, integration tests with Playwright, and component testing with React Testing Library, demonstrating a layered testing strategy.
Learnt from: CR
PR: clerk/javascript#0
File: .cursor/rules/development.mdc:0-0
Timestamp: 2025-06-23T12:25:30.457Z
Learning: Use Jest for unit testing and React Testing Library for component testing; use Playwright for end-to-end integration tests.
Learnt from: dstaley
PR: clerk/javascript#6116
File: .changeset/tangy-garlics-say.md:1-2
Timestamp: 2025-06-13T16:09:53.061Z
Learning: In the Clerk JavaScript repository, contributors create intentionally empty changeset files (containing only the YAML delimiters) when a PR touches only non-published parts of the codebase (e.g., sandbox assets). This signals that no package release is required, so such changesets should not be flagged as missing content.
Learnt from: CR
PR: clerk/javascript#0
File: .cursor/rules/monorepo.mdc:0-0
Timestamp: 2025-06-23T12:25:40.214Z
Learning: Environment variables prefixed with CLERK_* and NEXT_PUBLIC_CLERK_* are supported for configuration across different environments.
Learnt from: CR
PR: clerk/javascript#0
File: .cursor/rules/monorepo.mdc:0-0
Timestamp: 2025-06-23T12:25:40.214Z
Learning: Framework packages depend on @clerk/clerk-js for core functionality, while @clerk/shared and @clerk/types provide common utilities and TypeScript definitions used across packages.
Learnt from: CR
PR: clerk/javascript#0
File: .cursor/rules/monorepo.mdc:0-0
Timestamp: 2025-06-23T12:25:40.214Z
Learning: All packages are published under the @clerk namespace on npm, ensuring consistent naming and discoverability.
Learnt from: CR
PR: clerk/javascript#0
File: .cursor/rules/monorepo.mdc:0-0
Timestamp: 2025-06-23T12:25:40.214Z
Learning: ESLint and Prettier are used for code quality and formatting, with custom configurations for different package types.
Learnt from: CR
PR: clerk/javascript#0
File: .cursor/rules/react.mdc:0-0
Timestamp: 2025-06-23T12:25:57.184Z
Learning: Use React Testing Library for unit and integration testing of React components, focusing on behavior rather than implementation details.
Learnt from: CR
PR: clerk/javascript#0
File: .cursor/rules/typescript.mdc:0-0
Timestamp: 2025-06-23T12:26:09.855Z
Learning: Use ESLint with @typescript-eslint/recommended and Prettier for consistent code quality and formatting.
Learnt from: CR
PR: clerk/javascript#0
File: .cursor/rules/typescript.mdc:0-0
Timestamp: 2025-06-23T12:26:09.855Z
Learning: Avoid barrel files (index.ts re-exports) as they can introduce circular dependencies; instead, import directly from modules.
Learnt from: CR
PR: clerk/javascript#0
File: .cursor/rules/react.mdc:0-0
Timestamp: 2025-06-23T12:25:57.184Z
Learning: Export React components as named exports in .jsx or .tsx files to enable better tree-shaking and optimize bundle size.
packages/shared/src/react/__tests__/useReverification.test.ts (11)
Learnt from: CR
PR: clerk/javascript#0
File: .cursor/rules/react.mdc:0-0
Timestamp: 2025-06-23T12:25:57.184Z
Learning: Use React Testing Library for unit and integration testing of React components, focusing on behavior rather than implementation details.
Learnt from: CR
PR: clerk/javascript#0
File: .cursor/rules/monorepo.mdc:0-0
Timestamp: 2025-06-23T12:25:40.214Z
Learning: Unit tests are run with Jest and Vitest, integration tests with Playwright, and component testing with React Testing Library, demonstrating a layered testing strategy.
Learnt from: CR
PR: clerk/javascript#0
File: .cursor/rules/development.mdc:0-0
Timestamp: 2025-06-23T12:25:30.457Z
Learning: Use Jest for unit testing and React Testing Library for component testing; use Playwright for end-to-end integration tests.
Learnt from: CR
PR: clerk/javascript#0
File: .cursor/rules/typescript.mdc:0-0
Timestamp: 2025-06-23T12:26:09.855Z
Learning: Follow a performance checklist: use type-only imports, ensure exports are tree-shaking friendly, avoid circular dependencies, and keep type computations efficient.
Learnt from: CR
PR: clerk/javascript#0
File: .cursor/rules/typescript.mdc:0-0
Timestamp: 2025-06-23T12:26:09.855Z
Learning: Avoid barrel files (index.ts re-exports) as they can introduce circular dependencies; instead, import directly from modules.
Learnt from: CR
PR: clerk/javascript#0
File: .cursor/rules/typescript.mdc:0-0
Timestamp: 2025-06-23T12:26:09.855Z
Learning: Use type-only imports (import type { ... }) to optimize performance and avoid unnecessary code inclusion.
Learnt from: CR
PR: clerk/javascript#0
File: .cursor/rules/typescript.mdc:0-0
Timestamp: 2025-06-23T12:26:09.855Z
Learning: In tests (e.g., with Vitest), use type-safe mocks, test builders, and branded types for isolation and correctness.
Learnt from: panteliselef
PR: clerk/javascript#6097
File: packages/clerk-js/src/ui/elements/LineItems.tsx:89-89
Timestamp: 2025-06-10T09:38:56.214Z
Learning: In packages/clerk-js/src/ui/elements/LineItems.tsx, the Title component's React.forwardRef should use HTMLTableCellElement as the generic type parameter, even though it renders a Dt element. This is the correct implementation according to the codebase maintainer.
Learnt from: LauraBeatris
PR: clerk/javascript#6117
File: packages/clerk-js/src/ui/components/SessionTasks/tasks/ForceOrganizationSelection.tsx:17-21
Timestamp: 2025-06-18T23:27:13.537Z
Learning: In Clerk's JavaScript codebase, query errors from hooks like useOrganizationList are not typically handled in AIO (All-in-One) components. Error handling may be connected with the Card context instead, suggesting a centralized error handling approach rather than component-level error handling.
Learnt from: LauraBeatris
PR: clerk/javascript#6117
File: packages/clerk-js/src/ui/components/SessionTasks/index.tsx:64-83
Timestamp: 2025-06-18T16:33:36.764Z
Learning: In SessionTasks component at packages/clerk-js/src/ui/components/SessionTasks/index.tsx, the useEffect that checks for pending tasks should only run on mount (not react to currentTask/status changes) to handle browser back navigation edge cases without interfering with normal task completion flow managed by nextTask().
Learnt from: panteliselef
PR: clerk/javascript#6159
File: packages/shared/src/react/hooks/usePagesOrInfinite.ts:100-111
Timestamp: 2025-06-23T08:31:52.513Z
Learning: In usePagesOrInfinite hook, when fetchOnMount is false, it's expected that shouldFetch can be true while swrFetcher is null. This creates a valid SWR pattern where a key is provided without a fetcher, allowing manual revalidation later via the mutate function while maintaining cache state management. This is intentional design for manual fetching scenarios.
packages/shared/src/react/hooks/useReverification.ts (11)
Learnt from: CR
PR: clerk/javascript#0
File: .cursor/rules/react.mdc:0-0
Timestamp: 2025-06-23T12:25:57.184Z
Learning: Optimize rendering in React by using React.memo for expensive components, useCallback for handlers, useMemo for expensive computations, and implement virtualization for large lists.
Learnt from: CR
PR: clerk/javascript#0
File: .cursor/rules/react.mdc:0-0
Timestamp: 2025-06-23T12:25:57.184Z
Learning: Implement proper cleanup in useEffect hooks, including event listeners, subscriptions, and abort controllers, to prevent memory leaks.
Learnt from: panteliselef
PR: clerk/javascript#6159
File: packages/shared/src/react/hooks/usePagesOrInfinite.ts:100-111
Timestamp: 2025-06-23T08:31:52.513Z
Learning: In usePagesOrInfinite hook, when fetchOnMount is false, it's expected that shouldFetch can be true while swrFetcher is null. This creates a valid SWR pattern where a key is provided without a fetcher, allowing manual revalidation later via the mutate function while maintaining cache state management. This is intentional design for manual fetching scenarios.
Learnt from: LauraBeatris
PR: clerk/javascript#6117
File: packages/clerk-js/src/ui/components/SessionTasks/index.tsx:64-83
Timestamp: 2025-06-18T16:33:36.764Z
Learning: In SessionTasks component at packages/clerk-js/src/ui/components/SessionTasks/index.tsx, the useEffect that checks for pending tasks should only run on mount (not react to currentTask/status changes) to handle browser back navigation edge cases without interfering with normal task completion flow managed by nextTask().
Learnt from: CR
PR: clerk/javascript#0
File: .cursor/rules/nextjs.mdc:0-0
Timestamp: 2025-06-23T12:25:50.109Z
Learning: Implement proper error handling, request deduplication, and retry logic for data fetching in Next.js.
Learnt from: dstaley
PR: clerk/javascript#6100
File: packages/clerk-js/src/ui/components/OAuthConsent/OAuthConsent.tsx:121-124
Timestamp: 2025-06-16T17:08:58.414Z
Learning: The @clerk/clerk-js package only supports browsers released in the last two years (since May 8, 2023), so modern CSS features like color-mix() are fully supported across all target browsers without requiring fallbacks.
Learnt from: panteliselef
PR: clerk/javascript#6097
File: packages/clerk-js/src/ui/elements/LineItems.tsx:89-89
Timestamp: 2025-06-10T09:38:56.214Z
Learning: In packages/clerk-js/src/ui/elements/LineItems.tsx, the Title component's React.forwardRef should use HTMLTableCellElement as the generic type parameter, even though it renders a Dt element. This is the correct implementation according to the codebase maintainer.
Learnt from: CR
PR: clerk/javascript#0
File: .cursor/rules/monorepo.mdc:0-0
Timestamp: 2025-06-23T12:25:40.214Z
Learning: Framework packages depend on @clerk/clerk-js for core functionality, while @clerk/shared and @clerk/types provide common utilities and TypeScript definitions used across packages.
Learnt from: CR
PR: clerk/javascript#0
File: .cursor/rules/react.mdc:0-0
Timestamp: 2025-06-23T12:25:57.184Z
Learning: Implement robust form validation, error states, and error messages in React forms, ensuring proper submission and reset behavior.
Learnt from: CR
PR: clerk/javascript#0
File: .cursor/rules/monorepo.mdc:0-0
Timestamp: 2025-06-23T12:25:40.214Z
Learning: Environment variables prefixed with CLERK_* and NEXT_PUBLIC_CLERK_* are supported for configuration across different environments.
Learnt from: CR
PR: clerk/javascript#0
File: .cursor/rules/nextjs.mdc:0-0
Timestamp: 2025-06-23T12:25:50.109Z
Learning: Configure cache behavior for fetch requests in Next.js using fetch options like { cache: 'force-cache' } or { next: { revalidate: 60 } }.
🔇 Additional comments (7)
packages/shared/jest.config.js (1)

9-9: LGTM! Custom environment configuration is appropriate.

The change to use a custom JSDOM environment addresses the missing global Response API issue mentioned in the discussion. This ensures tests have access to the necessary web APIs.

packages/shared/customJSDOMEnvironment.ts (1)

1-9: Clean implementation of custom Jest environment.

The custom environment properly extends JSDOM and adds the necessary global Response API. The TypeScript usage with ConstructorParameters is correct, and the implementation is minimal and focused.

packages/shared/src/react/hooks/useReverification.ts (2)

2-2: Correct import change for the stale closure fix.

Replacing useMemo with useCallback is the right approach for this refactor.


213-223: Excellent fix for the stale closure issue.

The change from useMemo to useCallback with dynamic handler creation correctly addresses the stale closure problem:

  • Before: Handler was memoized upfront, potentially capturing stale fetcherRef.current and optionsRef.current values
  • After: Handler is created dynamically on each invocation, ensuring fresh values from refs

The dependencies are now correctly limited to stable values (__internal_openReverification, telemetry), while the refs are accessed at runtime. This maintains performance while fixing the bug.

packages/shared/src/react/__tests__/useReverification.test.ts (3)

1-1: Good test setup changes for runtime testing.

Adding React Testing Library imports and changing to a runtime import with alias enables proper testing of the hook's behavior. This is consistent with the testing guidelines for React hooks.

Also applies to: 5-5


7-15: Appropriate mock setup for useClerk dependency.

The mock provides the necessary stubbed methods (__internal_openReverification and telemetry.record) that the hook requires. This enables isolated testing of the hook's behavior.


55-91: Excellent test coverage for the stale closure fix.

The new runtime tests directly verify the fix works correctly:

  1. Function stability test: Confirms the returned function reference remains stable across re-renders when the fetcher is stable - important for React performance.

  2. Dynamic fetcher test: Verifies the critical fix - that even when an inline fetcher changes on every render, the handler remains stable but correctly calls the latest fetcher with updated arguments.

These tests provide strong evidence that the stale closure issue has been resolved while maintaining expected React behavior patterns.


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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

pkg-pr-new bot commented Jun 27, 2025

Open in StackBlitz

@clerk/agent-toolkit

npm i https://pkg.pr.new/@clerk/agent-toolkit@6201

@clerk/astro

npm i https://pkg.pr.new/@clerk/astro@6201

@clerk/backend

npm i https://pkg.pr.new/@clerk/backend@6201

@clerk/chrome-extension

npm i https://pkg.pr.new/@clerk/chrome-extension@6201

@clerk/clerk-js

npm i https://pkg.pr.new/@clerk/clerk-js@6201

@clerk/dev-cli

npm i https://pkg.pr.new/@clerk/dev-cli@6201

@clerk/elements

npm i https://pkg.pr.new/@clerk/elements@6201

@clerk/clerk-expo

npm i https://pkg.pr.new/@clerk/clerk-expo@6201

@clerk/expo-passkeys

npm i https://pkg.pr.new/@clerk/expo-passkeys@6201

@clerk/express

npm i https://pkg.pr.new/@clerk/express@6201

@clerk/fastify

npm i https://pkg.pr.new/@clerk/fastify@6201

@clerk/localizations

npm i https://pkg.pr.new/@clerk/localizations@6201

@clerk/nextjs

npm i https://pkg.pr.new/@clerk/nextjs@6201

@clerk/nuxt

npm i https://pkg.pr.new/@clerk/nuxt@6201

@clerk/clerk-react

npm i https://pkg.pr.new/@clerk/clerk-react@6201

@clerk/react-router

npm i https://pkg.pr.new/@clerk/react-router@6201

@clerk/remix

npm i https://pkg.pr.new/@clerk/remix@6201

@clerk/shared

npm i https://pkg.pr.new/@clerk/shared@6201

@clerk/tanstack-react-start

npm i https://pkg.pr.new/@clerk/tanstack-react-start@6201

@clerk/testing

npm i https://pkg.pr.new/@clerk/testing@6201

@clerk/themes

npm i https://pkg.pr.new/@clerk/themes@6201

@clerk/types

npm i https://pkg.pr.new/@clerk/types@6201

@clerk/upgrade

npm i https://pkg.pr.new/@clerk/upgrade@6201

@clerk/vue

npm i https://pkg.pr.new/@clerk/vue@6201

commit: 5c1071a

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