Skip to content

Conversation

tmilewski
Copy link
Member

@tmilewski tmilewski commented Oct 16, 2025

Description

Re-exports <UserAvatar /> for Expo Web.

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
    • UserAvatar component is now available on Expo Web, completing support across all Expo platforms.

@tmilewski tmilewski self-assigned this Oct 16, 2025
Copy link

changeset-bot bot commented Oct 16, 2025

🦋 Changeset detected

Latest commit: 6a23737

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

This PR includes changesets to release 1 package
Name Type
@clerk/clerk-expo Minor

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

Copy link

vercel bot commented Oct 16, 2025

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

Project Deployment Preview Comments Updated (UTC)
clerk-js-sandbox Ready Ready Preview Comment Oct 16, 2025 6:26pm

Copy link
Contributor

coderabbitai bot commented Oct 16, 2025

Walkthrough

Adds UserAvatar component to the Clerk Expo integration's web UI components by importing it from Clerk React and exporting it using the existing component wrapping pattern. Includes a changeset documenting the minor release for this addition.

Changes

Cohort / File(s) Summary
Changeset documentation
.changeset/large-doors-repeat.md
Documents a minor release for the Clerk Expo integration, noting that UserAvatar is now available on Expo Web.
UI component export
packages/expo/src/web/uiComponents.tsx
Imported UserAvatar from @clerk/react, added to the base components set, and exported as a new public component with the standard WrapComponent wrapping logic applied.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

The changes follow an established pattern (import → wrap → export) with minimal logic density. The changeset is straightforward documentation, and the component addition applies existing conventions without introducing new patterns or complexity.

Poem

🐰 A rabbit hops with glee today,
UserAvatar's here to stay!
On Expo Web, the avatar gleams,
Wrapped and exported, living our dreams! ✨

Pre-merge checks and finishing touches

✅ 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 clearly and concisely describes the primary change by indicating a new feature in the clerk-expo package to re-export the UserAvatar component, matching both the code changes and the stated objectives.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch tom/expo-reexport-user-avatar

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

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 4f3ceaf and 6a23737.

📒 Files selected for processing (2)
  • .changeset/large-doors-repeat.md (1 hunks)
  • packages/expo/src/web/uiComponents.tsx (2 hunks)
🧰 Additional context used
📓 Path-based instructions (9)
**/*.{js,jsx,ts,tsx}

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

**/*.{js,jsx,ts,tsx}: All code must pass ESLint checks with the project's configuration
Follow established naming conventions (PascalCase for components, camelCase for variables)
Maintain comprehensive JSDoc comments for public APIs
Use dynamic imports for optional features
All public APIs must be documented with JSDoc
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
Profile and optimize critical paths
Validate all inputs and sanitize outputs
Implement proper logging with different levels

Files:

  • packages/expo/src/web/uiComponents.tsx
**/*.{js,jsx,ts,tsx,json,css,scss,md,yaml,yml}

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

Use Prettier for consistent code formatting

Files:

  • packages/expo/src/web/uiComponents.tsx
packages/**/*.{ts,tsx}

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

TypeScript is required for all packages

Files:

  • packages/expo/src/web/uiComponents.tsx
packages/**/*.{ts,tsx,d.ts}

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

Packages should export TypeScript types alongside runtime code

Files:

  • packages/expo/src/web/uiComponents.tsx
**/*.{ts,tsx}

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

Use proper TypeScript error types

**/*.{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
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
Use protected for inheritance hierarchies
Use public explicitly for clarity in public APIs
Prefer readonly for properties that shouldn't change after construction
Prefer composition and interfaces over deep inheritance chains
Use mixins for shared behavior across unrelated classes
Implement dependency injection for loose coupling
Let TypeScript infer when types are obvious
Use const assertions for literal types: as const
Use satisfies operator for type checking without widening
Use mapped types for transforming object types
Use conditional types for type-level logic
Leverage template literal types for string manipulation
Use ES6 imports/exports consistently
Use default exports sparingly, prefer named exports
Use type-only imports: import type { ... } from ...
No any types without justification
Proper error handling with typed errors
Consistent use of readonly for immutable data
Proper generic constraints
No unused type parameters
Proper use of utility types instead of manual type construction
Type-only imports where possible
Proper tree-shaking friendly exports
No circular dependencies
Efficient type computations (avoid deep recursion)

Files:

  • packages/expo/src/web/uiComponents.tsx
**/*.{jsx,tsx}

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

**/*.{jsx,tsx}: Use error boundaries in React components
Minimize re-renders in React components

**/*.{jsx,tsx}: Always use functional components with hooks instead of class components
Follow PascalCase naming for components: 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
Use useState for simple state management
Use useReducer for complex state logic
Implement proper state initialization
Use proper state updates with callbacks
Implement proper state cleanup
Use Context API for theme/authentication
Implement proper state selectors
Use proper state normalization
Implement proper state persistence
Use React.memo for expensive components
Implement proper useCallback for handlers
Use proper useMemo for expensive computations
Implement proper virtualization for lists
Use proper code splitting with React.lazy
Implement proper cleanup in useEffect
Use proper refs for DOM access
Implement proper event listener cleanup
Use proper abort controllers for fetch
Implement proper subscription cleanup
Use proper HTML elements
Implement proper ARIA attributes
Use proper heading hierarchy
Implement proper form labels
Use proper button types
Implement proper focus management
Use proper keyboard shortcuts
Implement proper tab order
Use proper skip links
Implement proper focus traps
Implement proper error boundaries
Use proper error logging
Implement proper error recovery
Use proper error messages
Implement proper error fallbacks
Use proper form validation
Implement proper error states
Use proper error messages
Implement proper form submission
Use proper form reset
Use proper component naming
Implement proper file naming
Use proper prop naming
Implement proper...

Files:

  • packages/expo/src/web/uiComponents.tsx
**/*.{js,ts,tsx,jsx}

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

Support multiple Clerk environment variables (CLERK_, NEXT_PUBLIC_CLERK_, etc.) for configuration.

Files:

  • packages/expo/src/web/uiComponents.tsx
**/*.tsx

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

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

Files:

  • packages/expo/src/web/uiComponents.tsx
.changeset/**

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

Automated releases must use Changesets.

Files:

  • .changeset/large-doors-repeat.md
🧬 Code graph analysis (1)
packages/expo/src/web/uiComponents.tsx (5)
packages/clerk-js/src/ui/lazyModules/components.ts (1)
  • UserAvatar (51-53)
packages/nextjs/src/client-boundary/uiComponents.tsx (1)
  • UserAvatar (26-26)
packages/nextjs/src/index.ts (1)
  • UserAvatar (38-38)
packages/react/src/components/index.ts (1)
  • UserAvatar (12-12)
packages/react/src/components/uiComponents.tsx (1)
  • UserAvatar (644-670)
⏰ 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). (29)
  • GitHub Check: Integration Tests (nextjs, chrome, 15)
  • GitHub Check: Integration Tests (ap-flows, chrome)
  • GitHub Check: Integration Tests (machine, chrome)
  • GitHub Check: Integration Tests (react-router, chrome)
  • GitHub Check: Integration Tests (nextjs, chrome, 14)
  • GitHub Check: Integration Tests (nuxt, chrome)
  • GitHub Check: Integration Tests (billing, chrome)
  • GitHub Check: Integration Tests (sessions, chrome)
  • GitHub Check: Integration Tests (custom, chrome)
  • GitHub Check: Integration Tests (vue, chrome)
  • GitHub Check: Integration Tests (tanstack-react-start, chrome)
  • GitHub Check: Integration Tests (generic, chrome)
  • GitHub Check: Integration Tests (quickstart, chrome)
  • GitHub Check: Integration Tests (express, chrome)
  • GitHub Check: Integration Tests (handshake, chrome)
  • GitHub Check: Integration Tests (expo-web, chrome)
  • GitHub Check: Integration Tests (astro, chrome)
  • GitHub Check: Integration Tests (elements, chrome)
  • GitHub Check: Integration Tests (localhost, chrome)
  • GitHub Check: Integration Tests (handshake:staging, chrome)
  • GitHub Check: Integration Tests (sessions:staging, chrome)
  • GitHub Check: Unit Tests (18, --filter=@clerk/astro --filter=@clerk/backend --filter=@clerk/express --filter=@c...
  • GitHub Check: Static analysis
  • GitHub Check: Publish with pkg-pr-new
  • GitHub Check: Unit Tests (22, **)
  • GitHub Check: Formatting | Dedupe | Changeset
  • GitHub Check: Analyze (javascript-typescript)
  • GitHub Check: semgrep-cloud-platform/scan
  • GitHub Check: semgrep-cloud-platform/scan
🔇 Additional comments (3)
.changeset/large-doors-repeat.md (1)

1-5: LGTM! Changeset correctly documents the new feature.

The minor version bump is appropriate for adding a new public component, and the description clearly communicates the change.

packages/expo/src/web/uiComponents.tsx (2)

14-14: Import follows the established pattern.

The import is correctly placed alphabetically and uses the BaseUserAvatar naming convention consistent with other components in the file.


41-41: Export implementation is correct.

The export follows the same WrapComponent pattern as all other components, ensuring UserAvatar works on web platforms while throwing an appropriate error on native platforms. The type annotation and placement are consistent with the file's conventions.

However, ensure you've tested the component on both web and native platforms to confirm:

  1. UserAvatar renders correctly on Expo Web
  2. The error message displays appropriately when attempted on native

Also, the PR checklist indicates several items remain unchecked:

  • Tests should be run to verify functionality
  • Documentation should be updated since this is a new public API

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

Copy link

pkg-pr-new bot commented Oct 16, 2025

Open in StackBlitz

@clerk/agent-toolkit

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

@clerk/astro

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

@clerk/backend

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

@clerk/chrome-extension

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

@clerk/clerk-js

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

@clerk/dev-cli

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

@clerk/elements

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

@clerk/clerk-expo

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

@clerk/expo-passkeys

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

@clerk/express

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

@clerk/fastify

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

@clerk/localizations

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

@clerk/nextjs

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

@clerk/nuxt

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

@clerk/clerk-react

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

@clerk/react-router

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

@clerk/remix

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

@clerk/shared

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

@clerk/tanstack-react-start

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

@clerk/testing

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

@clerk/themes

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

@clerk/types

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

@clerk/upgrade

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

@clerk/vue

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

commit: 6a23737

@tmilewski tmilewski merged commit 160dc93 into main Oct 16, 2025
42 checks passed
@tmilewski tmilewski deleted the tom/expo-reexport-user-avatar branch October 16, 2025 18:35
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