Skip to content

Conversation

@kduprey
Copy link
Member

@kduprey kduprey commented Dec 18, 2025

Description

This PR ports over #7489 into core 3, which improves the error hanlding and UX when users deal with an unverified wallet identifier.

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

  • Bug Fixes

    • Fixed Web3 connection error handling in UserProfile component for improved error messaging
  • Improvements

    • Web3 wallet actions now properly reflect wallet verification status

✏️ Tip: You can customize this high-level summary in your review settings.

…with verification status (#7489)

Signed-off-by: Kenton Duprey <[email protected]>
@kduprey kduprey requested a review from tmilewski December 18, 2025 20:59
@kduprey kduprey self-assigned this Dec 18, 2025
@changeset-bot
Copy link

changeset-bot bot commented Dec 18, 2025

🦋 Changeset detected

Latest commit: 82bf86e

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@clerk/clerk-js Patch
@clerk/chrome-extension Patch
@clerk/expo Patch

Not sure what this means? Click here to learn what changesets are.

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

@vercel
Copy link

vercel bot commented Dec 18, 2025

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

Project Deployment Review Updated (UTC)
clerk-js-sandbox Ready Ready Preview, Comment Dec 18, 2025 8:59pm

@pkg-pr-new
Copy link

pkg-pr-new bot commented Dec 18, 2025

Open in StackBlitz

@clerk/agent-toolkit

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

@clerk/astro

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

@clerk/backend

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

@clerk/chrome-extension

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

@clerk/clerk-js

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

@clerk/dev-cli

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

@clerk/expo

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

@clerk/expo-passkeys

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

@clerk/express

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

@clerk/fastify

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

@clerk/localizations

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

@clerk/nextjs

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

@clerk/nuxt

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

@clerk/react

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

@clerk/react-router

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

@clerk/shared

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

@clerk/tanstack-react-start

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

@clerk/testing

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

@clerk/ui

npm i https://pkg.pr.new/@clerk/ui@7511

@clerk/upgrade

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

@clerk/vue

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

commit: 82bf86e

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 18, 2025

📝 Walkthrough

Walkthrough

This pull request updates Clerk JS with a patch release that improves Web3 connection error handling in the UserProfile component. The Web3Form component now uses a dedicated web3CallbackErrorHandler utility and refactors its error handling approach, while inline error UI rendering is removed. The Web3Section component updates the Web3WalletMenu signature to include an isVerified prop, which affects conditional logic for wallet actions. Test fixtures for PasswordSection are expanded with new fields: enterprise_connection_id and last_authenticated_at, reflecting updated data structures for enterprise connections and authentication tracking.

Pre-merge checks

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main changes: error handling updates and Web3WalletMenu verification status checks, with a reference to the porting context.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

📜 Recent review details

Configuration used: Repository YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 2c4ce1a and 82bf86e.

📒 Files selected for processing (4)
  • .changeset/busy-frogs-type.md (1 hunks)
  • packages/ui/src/components/UserProfile/Web3Form.tsx (2 hunks)
  • packages/ui/src/components/UserProfile/Web3Section.tsx (3 hunks)
  • packages/ui/src/components/UserProfile/__tests__/PasswordSection.test.tsx (8 hunks)
🧰 Additional context used
📓 Path-based instructions (18)
**/*.{js,jsx,ts,tsx}

📄 CodeRabbit inference engine (.cursor/rules/development.mdc)

All code must pass ESLint checks with the project's configuration

Files:

  • packages/ui/src/components/UserProfile/__tests__/PasswordSection.test.tsx
  • packages/ui/src/components/UserProfile/Web3Form.tsx
  • packages/ui/src/components/UserProfile/Web3Section.tsx
**/*.{js,jsx,ts,tsx,json,md,yml,yaml}

📄 CodeRabbit inference engine (.cursor/rules/development.mdc)

Use Prettier for consistent code formatting

Files:

  • packages/ui/src/components/UserProfile/__tests__/PasswordSection.test.tsx
  • packages/ui/src/components/UserProfile/Web3Form.tsx
  • packages/ui/src/components/UserProfile/Web3Section.tsx
packages/**/src/**/*.{ts,tsx}

📄 CodeRabbit inference engine (.cursor/rules/development.mdc)

TypeScript is required for all packages

Files:

  • packages/ui/src/components/UserProfile/__tests__/PasswordSection.test.tsx
  • packages/ui/src/components/UserProfile/Web3Form.tsx
  • packages/ui/src/components/UserProfile/Web3Section.tsx
**/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (.cursor/rules/development.mdc)

Follow established naming conventions (PascalCase for components, camelCase for variables)

Files:

  • packages/ui/src/components/UserProfile/__tests__/PasswordSection.test.tsx
  • packages/ui/src/components/UserProfile/Web3Form.tsx
  • packages/ui/src/components/UserProfile/Web3Section.tsx
packages/**/src/**/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (.cursor/rules/development.mdc)

packages/**/src/**/*.{ts,tsx,js,jsx}: Maintain comprehensive JSDoc comments for public APIs
Use tree-shaking friendly exports
Validate all inputs and sanitize outputs
All public APIs must be documented with JSDoc
Use dynamic imports for optional features
Provide meaningful error messages to developers
Include error recovery suggestions where applicable
Log errors appropriately for debugging
Lazy load components and features when possible
Implement proper caching strategies
Use efficient data structures and algorithms
Implement proper logging with different levels

Files:

  • packages/ui/src/components/UserProfile/__tests__/PasswordSection.test.tsx
  • packages/ui/src/components/UserProfile/Web3Form.tsx
  • packages/ui/src/components/UserProfile/Web3Section.tsx
**/*.{test,spec}.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (.cursor/rules/development.mdc)

**/*.{test,spec}.{ts,tsx,js,jsx}: Unit tests are required for all new functionality
Verify proper error handling and edge cases
Include tests for all new features

Files:

  • packages/ui/src/components/UserProfile/__tests__/PasswordSection.test.tsx
**/*.ts?(x)

📄 CodeRabbit inference engine (.cursor/rules/development.mdc)

Use proper TypeScript error types

Files:

  • packages/ui/src/components/UserProfile/__tests__/PasswordSection.test.tsx
  • packages/ui/src/components/UserProfile/Web3Form.tsx
  • packages/ui/src/components/UserProfile/Web3Section.tsx
**/*.tsx

📄 CodeRabbit inference engine (.cursor/rules/development.mdc)

**/*.tsx: Use error boundaries in React components
Minimize re-renders in React components

**/*.tsx: Use proper type definitions for props and state in React components
Leverage TypeScript's type inference where possible in React components
Use proper event types for handlers in React components
Implement proper generic types for reusable React components
Use proper type guards for conditional rendering in React components

Files:

  • packages/ui/src/components/UserProfile/__tests__/PasswordSection.test.tsx
  • packages/ui/src/components/UserProfile/Web3Form.tsx
  • packages/ui/src/components/UserProfile/Web3Section.tsx
**/*.{test,spec,e2e}.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (.cursor/rules/development.mdc)

Use real Clerk instances for integration tests

Files:

  • packages/ui/src/components/UserProfile/__tests__/PasswordSection.test.tsx
**/*.{md,tsx}

📄 CodeRabbit inference engine (.cursor/rules/development.mdc)

Update documentation for API changes

Files:

  • packages/ui/src/components/UserProfile/__tests__/PasswordSection.test.tsx
  • packages/ui/src/components/UserProfile/Web3Form.tsx
  • packages/ui/src/components/UserProfile/Web3Section.tsx
**/*.test.tsx

📄 CodeRabbit inference engine (.cursor/rules/development.mdc)

Use React Testing Library for component testing

Files:

  • packages/ui/src/components/UserProfile/__tests__/PasswordSection.test.tsx
**/*.{jsx,tsx}

📄 CodeRabbit inference engine (.cursor/rules/react.mdc)

**/*.{jsx,tsx}: Always use functional components with hooks instead of class components
Follow PascalCase naming for components (e.g., UserProfile, NavigationMenu)
Keep components focused on a single responsibility - split large components
Limit component size to 150-200 lines; extract logic into custom hooks
Use composition over inheritance - prefer smaller, composable components
Export components as named exports for better tree-shaking
One component per file with matching filename and component name
Separate UI components from business logic components
Use useState for simple state management in React components
Use useReducer for complex state logic in React components
Implement proper state initialization in React components
Use proper state updates with callbacks in React components
Implement proper state cleanup in React components
Use Context API for theme/authentication state management
Implement proper state persistence in React applications
Use React.memo for expensive components
Implement proper useCallback for handlers in React components
Use proper useMemo for expensive computations in React components
Implement proper virtualization for lists in React components
Use proper code splitting with React.lazy in React applications
Implement proper cleanup in useEffect hooks
Use proper refs for DOM access in React components
Implement proper event listener cleanup in React components
Use proper abort controllers for fetch in React components
Implement proper subscription cleanup in React components
Use proper HTML elements for semantic HTML in React components
Implement proper ARIA attributes for accessibility in React components
Use proper heading hierarchy in React components
Implement proper form labels in React components
Use proper button types in React components
Implement proper focus management for keyboard navigation in React components
Use proper keyboard shortcuts in React components
Implement proper tab order in React components
Use proper ...

Files:

  • packages/ui/src/components/UserProfile/__tests__/PasswordSection.test.tsx
  • packages/ui/src/components/UserProfile/Web3Form.tsx
  • packages/ui/src/components/UserProfile/Web3Section.tsx
**/*.{test,spec}.{jsx,tsx}

📄 CodeRabbit inference engine (.cursor/rules/react.mdc)

**/*.{test,spec}.{jsx,tsx}: Use React Testing Library for unit testing React components
Test component behavior, not implementation details
Use proper test queries in React Testing Library tests
Implement proper test isolation in React component tests
Use proper test coverage in React component tests
Test component interactions in integration tests
Use proper test data in React component tests
Implement proper test setup in React component tests
Use proper test cleanup in React component tests
Implement proper test assertions in React component tests
Use proper test structure for React component tests

Files:

  • packages/ui/src/components/UserProfile/__tests__/PasswordSection.test.tsx
**/*.{ts,tsx}

📄 CodeRabbit inference engine (.cursor/rules/typescript.mdc)

**/*.{ts,tsx}: 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
Implement type guards for unknown types using the pattern function isType(value: unknown): value is Type
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 in classes
Use protected for inheritance hierarchies
Use public explicitly for clarity in public APIs
Use mixins for shared behavior across unrelated classes in TypeScript
Use generic constraints with bounded type parameters like <T extends { id: string }>
Use utility types like Omit, Partial, and Pick for data transformation instead of manual type construction
Use discriminated unions instead of boolean flags for state management and API responses
Use mapped types for transforming object types
Use conditional types for type-level logic
Leverage template literal types for string manipulation at the type level
Use ES6 imports/exports consistently
Use default exports sparingly, prefer named exports
Document functions with JSDoc comments including @param, @returns, @throws, and @example tags
Create custom error classes that extend Error for specific error types
Use the Result pattern for error handling instead of throwing exceptions
Use optional chaining (?.) and nullish coalescing (??) operators for safe property access
Let TypeScript infer obvious types to reduce verbosity
Use const assertions with as const for literal types
Use satisfies operator for type checking without widening types
Declare readonly arrays and objects for immutable data structures
Use spread operator and array spread for immutable updates instead of mutations
Use lazy loading for large types...

Files:

  • packages/ui/src/components/UserProfile/__tests__/PasswordSection.test.tsx
  • packages/ui/src/components/UserProfile/Web3Form.tsx
  • packages/ui/src/components/UserProfile/Web3Section.tsx
**/*.test.{ts,tsx}

📄 CodeRabbit inference engine (.cursor/rules/monorepo.mdc)

Use React Testing Library for component testing

Files:

  • packages/ui/src/components/UserProfile/__tests__/PasswordSection.test.tsx
**/*.{js,ts,jsx,tsx}

📄 CodeRabbit inference engine (.cursor/rules/monorepo.mdc)

Use ESLint with custom configurations tailored for different package types

Files:

  • packages/ui/src/components/UserProfile/__tests__/PasswordSection.test.tsx
  • packages/ui/src/components/UserProfile/Web3Form.tsx
  • packages/ui/src/components/UserProfile/Web3Section.tsx
**/*.{js,ts,jsx,tsx,json,md,yml,yaml}

📄 CodeRabbit inference engine (.cursor/rules/monorepo.mdc)

Use Prettier for code formatting across all packages

Files:

  • packages/ui/src/components/UserProfile/__tests__/PasswordSection.test.tsx
  • packages/ui/src/components/UserProfile/Web3Form.tsx
  • packages/ui/src/components/UserProfile/Web3Section.tsx
**/*

⚙️ CodeRabbit configuration file

If there are no tests added or modified as part of the PR, please suggest that tests be added to cover the changes.

**/*: Only comment on issues that would block merging, ignore minor or stylistic concerns.
Restrict feedback to errors, security risks, or functionality-breaking problems.
Do not post comments on code style, formatting, or non-critical improvements.
Keep reviews short: flag only issues that make the PR unsafe to merge.
Group similar issues into a single comment instead of posting multiple notes.
Skip repetition: if a pattern repeats, mention it once at a summary level only.
Do not add general suggestions, focus strictly on merge-blocking concerns.
If there are no critical problems, respond with minimal approval (e.g., 'Looks good'). Do not add additional review.
Avoid line-by-line commentary unless it highlights a critical bug or security hole.
Highlight only issues that could cause runtime errors, data loss, or severe maintainability issues.
Ignore minor optimization opportunities, focus solely on correctness and safety.
Provide a top-level summary of critical blockers rather than detailed per-line notes.
Comment only when the issue must be resolved before merge, otherwise remain silent.
When in doubt, err on the side of fewer comments, brevity and blocking issues only.
Avoid posting any refactoring issues.

Files:

  • packages/ui/src/components/UserProfile/__tests__/PasswordSection.test.tsx
  • packages/ui/src/components/UserProfile/Web3Form.tsx
  • packages/ui/src/components/UserProfile/Web3Section.tsx
🧬 Code graph analysis (1)
packages/ui/src/components/UserProfile/Web3Form.tsx (1)
packages/ui/src/utils/web3CallbackErrorHandler.ts (1)
  • web3CallbackErrorHandler (10-23)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (25)
  • GitHub Check: Integration Tests (quickstart, chrome, 15)
  • GitHub Check: Integration Tests (machine, chrome, RQ)
  • GitHub Check: Integration Tests (nextjs, chrome, 15)
  • GitHub Check: Integration Tests (machine, chrome)
  • GitHub Check: Integration Tests (billing, chrome)
  • GitHub Check: Integration Tests (nextjs, chrome, 16, RQ)
  • GitHub Check: Integration Tests (nextjs, chrome, 16)
  • GitHub Check: Integration Tests (quickstart, chrome, 16)
  • GitHub Check: Integration Tests (react-router, chrome)
  • GitHub Check: Integration Tests (billing, chrome, RQ)
  • GitHub Check: Integration Tests (custom, chrome)
  • GitHub Check: Integration Tests (handshake, chrome)
  • GitHub Check: Integration Tests (vue, chrome)
  • GitHub Check: Integration Tests (astro, chrome)
  • GitHub Check: Integration Tests (tanstack-react-start, chrome)
  • GitHub Check: Integration Tests (nuxt, chrome)
  • GitHub Check: Integration Tests (ap-flows, chrome)
  • GitHub Check: Integration Tests (sessions, chrome)
  • GitHub Check: Integration Tests (handshake:staging, chrome)
  • GitHub Check: Integration Tests (express, chrome)
  • GitHub Check: Integration Tests (generic, chrome)
  • GitHub Check: Integration Tests (sessions:staging, chrome)
  • GitHub Check: Integration Tests (localhost, chrome)
  • GitHub Check: Analyze (javascript-typescript)
  • GitHub Check: semgrep-cloud-platform/scan
🔇 Additional comments (2)
packages/ui/src/components/UserProfile/Web3Form.tsx (1)

64-67: LGTM - Error handling improved.

The refactor to use web3CallbackErrorHandler provides better error messages when a Web3 wallet extension is missing, improving the user experience.

packages/ui/src/components/UserProfile/__tests__/PasswordSection.test.tsx (1)

142-160: LGTM - Test fixtures updated consistently.

The addition of enterprise_connection_id and last_authenticated_at fields to test fixtures correctly reflects the expanded data model for enterprise connections.

Also applies to: 218-237, 387-405, 464-482


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

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Caution

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

⚠️ Outside diff range comments (1)
packages/ui/src/components/UserProfile/Web3Section.tsx (1)

98-150: Add tests for Web3Section wallet verification logic.

The changes introduce verification checks for setting primary web3 wallets but no test file exists for Web3Section, while similar sections (EmailsSection, PhoneSection, etc.) have dedicated tests. Add tests covering:

  • Verified wallets can be set as primary
  • Unverified wallets cannot be set as primary
  • Menu actions display correctly based on verification status
📜 Review details

Configuration used: Repository YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 2c4ce1a and 82bf86e.

📒 Files selected for processing (4)
  • .changeset/busy-frogs-type.md (1 hunks)
  • packages/ui/src/components/UserProfile/Web3Form.tsx (2 hunks)
  • packages/ui/src/components/UserProfile/Web3Section.tsx (3 hunks)
  • packages/ui/src/components/UserProfile/__tests__/PasswordSection.test.tsx (8 hunks)
🧰 Additional context used
📓 Path-based instructions (18)
**/*.{js,jsx,ts,tsx}

📄 CodeRabbit inference engine (.cursor/rules/development.mdc)

All code must pass ESLint checks with the project's configuration

Files:

  • packages/ui/src/components/UserProfile/__tests__/PasswordSection.test.tsx
  • packages/ui/src/components/UserProfile/Web3Form.tsx
  • packages/ui/src/components/UserProfile/Web3Section.tsx
**/*.{js,jsx,ts,tsx,json,md,yml,yaml}

📄 CodeRabbit inference engine (.cursor/rules/development.mdc)

Use Prettier for consistent code formatting

Files:

  • packages/ui/src/components/UserProfile/__tests__/PasswordSection.test.tsx
  • packages/ui/src/components/UserProfile/Web3Form.tsx
  • packages/ui/src/components/UserProfile/Web3Section.tsx
packages/**/src/**/*.{ts,tsx}

📄 CodeRabbit inference engine (.cursor/rules/development.mdc)

TypeScript is required for all packages

Files:

  • packages/ui/src/components/UserProfile/__tests__/PasswordSection.test.tsx
  • packages/ui/src/components/UserProfile/Web3Form.tsx
  • packages/ui/src/components/UserProfile/Web3Section.tsx
**/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (.cursor/rules/development.mdc)

Follow established naming conventions (PascalCase for components, camelCase for variables)

Files:

  • packages/ui/src/components/UserProfile/__tests__/PasswordSection.test.tsx
  • packages/ui/src/components/UserProfile/Web3Form.tsx
  • packages/ui/src/components/UserProfile/Web3Section.tsx
packages/**/src/**/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (.cursor/rules/development.mdc)

packages/**/src/**/*.{ts,tsx,js,jsx}: Maintain comprehensive JSDoc comments for public APIs
Use tree-shaking friendly exports
Validate all inputs and sanitize outputs
All public APIs must be documented with JSDoc
Use dynamic imports for optional features
Provide meaningful error messages to developers
Include error recovery suggestions where applicable
Log errors appropriately for debugging
Lazy load components and features when possible
Implement proper caching strategies
Use efficient data structures and algorithms
Implement proper logging with different levels

Files:

  • packages/ui/src/components/UserProfile/__tests__/PasswordSection.test.tsx
  • packages/ui/src/components/UserProfile/Web3Form.tsx
  • packages/ui/src/components/UserProfile/Web3Section.tsx
**/*.{test,spec}.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (.cursor/rules/development.mdc)

**/*.{test,spec}.{ts,tsx,js,jsx}: Unit tests are required for all new functionality
Verify proper error handling and edge cases
Include tests for all new features

Files:

  • packages/ui/src/components/UserProfile/__tests__/PasswordSection.test.tsx
**/*.ts?(x)

📄 CodeRabbit inference engine (.cursor/rules/development.mdc)

Use proper TypeScript error types

Files:

  • packages/ui/src/components/UserProfile/__tests__/PasswordSection.test.tsx
  • packages/ui/src/components/UserProfile/Web3Form.tsx
  • packages/ui/src/components/UserProfile/Web3Section.tsx
**/*.tsx

📄 CodeRabbit inference engine (.cursor/rules/development.mdc)

**/*.tsx: Use error boundaries in React components
Minimize re-renders in React components

**/*.tsx: Use proper type definitions for props and state in React components
Leverage TypeScript's type inference where possible in React components
Use proper event types for handlers in React components
Implement proper generic types for reusable React components
Use proper type guards for conditional rendering in React components

Files:

  • packages/ui/src/components/UserProfile/__tests__/PasswordSection.test.tsx
  • packages/ui/src/components/UserProfile/Web3Form.tsx
  • packages/ui/src/components/UserProfile/Web3Section.tsx
**/*.{test,spec,e2e}.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (.cursor/rules/development.mdc)

Use real Clerk instances for integration tests

Files:

  • packages/ui/src/components/UserProfile/__tests__/PasswordSection.test.tsx
**/*.{md,tsx}

📄 CodeRabbit inference engine (.cursor/rules/development.mdc)

Update documentation for API changes

Files:

  • packages/ui/src/components/UserProfile/__tests__/PasswordSection.test.tsx
  • packages/ui/src/components/UserProfile/Web3Form.tsx
  • packages/ui/src/components/UserProfile/Web3Section.tsx
**/*.test.tsx

📄 CodeRabbit inference engine (.cursor/rules/development.mdc)

Use React Testing Library for component testing

Files:

  • packages/ui/src/components/UserProfile/__tests__/PasswordSection.test.tsx
**/*.{jsx,tsx}

📄 CodeRabbit inference engine (.cursor/rules/react.mdc)

**/*.{jsx,tsx}: Always use functional components with hooks instead of class components
Follow PascalCase naming for components (e.g., UserProfile, NavigationMenu)
Keep components focused on a single responsibility - split large components
Limit component size to 150-200 lines; extract logic into custom hooks
Use composition over inheritance - prefer smaller, composable components
Export components as named exports for better tree-shaking
One component per file with matching filename and component name
Separate UI components from business logic components
Use useState for simple state management in React components
Use useReducer for complex state logic in React components
Implement proper state initialization in React components
Use proper state updates with callbacks in React components
Implement proper state cleanup in React components
Use Context API for theme/authentication state management
Implement proper state persistence in React applications
Use React.memo for expensive components
Implement proper useCallback for handlers in React components
Use proper useMemo for expensive computations in React components
Implement proper virtualization for lists in React components
Use proper code splitting with React.lazy in React applications
Implement proper cleanup in useEffect hooks
Use proper refs for DOM access in React components
Implement proper event listener cleanup in React components
Use proper abort controllers for fetch in React components
Implement proper subscription cleanup in React components
Use proper HTML elements for semantic HTML in React components
Implement proper ARIA attributes for accessibility in React components
Use proper heading hierarchy in React components
Implement proper form labels in React components
Use proper button types in React components
Implement proper focus management for keyboard navigation in React components
Use proper keyboard shortcuts in React components
Implement proper tab order in React components
Use proper ...

Files:

  • packages/ui/src/components/UserProfile/__tests__/PasswordSection.test.tsx
  • packages/ui/src/components/UserProfile/Web3Form.tsx
  • packages/ui/src/components/UserProfile/Web3Section.tsx
**/*.{test,spec}.{jsx,tsx}

📄 CodeRabbit inference engine (.cursor/rules/react.mdc)

**/*.{test,spec}.{jsx,tsx}: Use React Testing Library for unit testing React components
Test component behavior, not implementation details
Use proper test queries in React Testing Library tests
Implement proper test isolation in React component tests
Use proper test coverage in React component tests
Test component interactions in integration tests
Use proper test data in React component tests
Implement proper test setup in React component tests
Use proper test cleanup in React component tests
Implement proper test assertions in React component tests
Use proper test structure for React component tests

Files:

  • packages/ui/src/components/UserProfile/__tests__/PasswordSection.test.tsx
**/*.{ts,tsx}

📄 CodeRabbit inference engine (.cursor/rules/typescript.mdc)

**/*.{ts,tsx}: 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
Implement type guards for unknown types using the pattern function isType(value: unknown): value is Type
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 in classes
Use protected for inheritance hierarchies
Use public explicitly for clarity in public APIs
Use mixins for shared behavior across unrelated classes in TypeScript
Use generic constraints with bounded type parameters like <T extends { id: string }>
Use utility types like Omit, Partial, and Pick for data transformation instead of manual type construction
Use discriminated unions instead of boolean flags for state management and API responses
Use mapped types for transforming object types
Use conditional types for type-level logic
Leverage template literal types for string manipulation at the type level
Use ES6 imports/exports consistently
Use default exports sparingly, prefer named exports
Document functions with JSDoc comments including @param, @returns, @throws, and @example tags
Create custom error classes that extend Error for specific error types
Use the Result pattern for error handling instead of throwing exceptions
Use optional chaining (?.) and nullish coalescing (??) operators for safe property access
Let TypeScript infer obvious types to reduce verbosity
Use const assertions with as const for literal types
Use satisfies operator for type checking without widening types
Declare readonly arrays and objects for immutable data structures
Use spread operator and array spread for immutable updates instead of mutations
Use lazy loading for large types...

Files:

  • packages/ui/src/components/UserProfile/__tests__/PasswordSection.test.tsx
  • packages/ui/src/components/UserProfile/Web3Form.tsx
  • packages/ui/src/components/UserProfile/Web3Section.tsx
**/*.test.{ts,tsx}

📄 CodeRabbit inference engine (.cursor/rules/monorepo.mdc)

Use React Testing Library for component testing

Files:

  • packages/ui/src/components/UserProfile/__tests__/PasswordSection.test.tsx
**/*.{js,ts,jsx,tsx}

📄 CodeRabbit inference engine (.cursor/rules/monorepo.mdc)

Use ESLint with custom configurations tailored for different package types

Files:

  • packages/ui/src/components/UserProfile/__tests__/PasswordSection.test.tsx
  • packages/ui/src/components/UserProfile/Web3Form.tsx
  • packages/ui/src/components/UserProfile/Web3Section.tsx
**/*.{js,ts,jsx,tsx,json,md,yml,yaml}

📄 CodeRabbit inference engine (.cursor/rules/monorepo.mdc)

Use Prettier for code formatting across all packages

Files:

  • packages/ui/src/components/UserProfile/__tests__/PasswordSection.test.tsx
  • packages/ui/src/components/UserProfile/Web3Form.tsx
  • packages/ui/src/components/UserProfile/Web3Section.tsx
**/*

⚙️ CodeRabbit configuration file

If there are no tests added or modified as part of the PR, please suggest that tests be added to cover the changes.

**/*: Only comment on issues that would block merging, ignore minor or stylistic concerns.
Restrict feedback to errors, security risks, or functionality-breaking problems.
Do not post comments on code style, formatting, or non-critical improvements.
Keep reviews short: flag only issues that make the PR unsafe to merge.
Group similar issues into a single comment instead of posting multiple notes.
Skip repetition: if a pattern repeats, mention it once at a summary level only.
Do not add general suggestions, focus strictly on merge-blocking concerns.
If there are no critical problems, respond with minimal approval (e.g., 'Looks good'). Do not add additional review.
Avoid line-by-line commentary unless it highlights a critical bug or security hole.
Highlight only issues that could cause runtime errors, data loss, or severe maintainability issues.
Ignore minor optimization opportunities, focus solely on correctness and safety.
Provide a top-level summary of critical blockers rather than detailed per-line notes.
Comment only when the issue must be resolved before merge, otherwise remain silent.
When in doubt, err on the side of fewer comments, brevity and blocking issues only.
Avoid posting any refactoring issues.

Files:

  • packages/ui/src/components/UserProfile/__tests__/PasswordSection.test.tsx
  • packages/ui/src/components/UserProfile/Web3Form.tsx
  • packages/ui/src/components/UserProfile/Web3Section.tsx
🧬 Code graph analysis (1)
packages/ui/src/components/UserProfile/Web3Form.tsx (1)
packages/ui/src/utils/web3CallbackErrorHandler.ts (1)
  • web3CallbackErrorHandler (10-23)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (25)
  • GitHub Check: Integration Tests (quickstart, chrome, 15)
  • GitHub Check: Integration Tests (machine, chrome, RQ)
  • GitHub Check: Integration Tests (nextjs, chrome, 15)
  • GitHub Check: Integration Tests (machine, chrome)
  • GitHub Check: Integration Tests (billing, chrome)
  • GitHub Check: Integration Tests (nextjs, chrome, 16, RQ)
  • GitHub Check: Integration Tests (nextjs, chrome, 16)
  • GitHub Check: Integration Tests (quickstart, chrome, 16)
  • GitHub Check: Integration Tests (react-router, chrome)
  • GitHub Check: Integration Tests (billing, chrome, RQ)
  • GitHub Check: Integration Tests (custom, chrome)
  • GitHub Check: Integration Tests (handshake, chrome)
  • GitHub Check: Integration Tests (vue, chrome)
  • GitHub Check: Integration Tests (astro, chrome)
  • GitHub Check: Integration Tests (tanstack-react-start, chrome)
  • GitHub Check: Integration Tests (nuxt, chrome)
  • GitHub Check: Integration Tests (ap-flows, chrome)
  • GitHub Check: Integration Tests (sessions, chrome)
  • GitHub Check: Integration Tests (handshake:staging, chrome)
  • GitHub Check: Integration Tests (express, chrome)
  • GitHub Check: Integration Tests (generic, chrome)
  • GitHub Check: Integration Tests (sessions:staging, chrome)
  • GitHub Check: Integration Tests (localhost, chrome)
  • GitHub Check: Analyze (javascript-typescript)
  • GitHub Check: semgrep-cloud-platform/scan
🔇 Additional comments (2)
packages/ui/src/components/UserProfile/Web3Form.tsx (1)

64-67: LGTM - Error handling improved.

The refactor to use web3CallbackErrorHandler provides better error messages when a Web3 wallet extension is missing, improving the user experience.

packages/ui/src/components/UserProfile/__tests__/PasswordSection.test.tsx (1)

142-160: LGTM - Test fixtures updated consistently.

The addition of enterprise_connection_id and last_authenticated_at fields to test fixtures correctly reflects the expanded data model for enterprise connections.

Also applies to: 218-237, 387-405, 464-482

@kduprey kduprey merged commit 323e66d into main Dec 18, 2025
48 checks passed
@kduprey kduprey deleted the kenton/port-7489-to-core-3 branch December 18, 2025 21:52
brkalow pushed a commit that referenced this pull request Jan 5, 2026
…ion status, port from core 2 (#7511)

Signed-off-by: Kenton Duprey <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants