Skip to content

Conversation

@Jibaru
Copy link
Contributor

@Jibaru Jibaru commented Feb 12, 2026

Description

Add username into public user data

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

    • Optional username field added to public user profile data and included in serialized API responses/snapshots.
  • Tests

    • Unit tests updated to cover the new username field in public user data.
  • Chores

    • Changelog updated to document the new public profile field and prepare a minor version bump.

@vercel
Copy link

vercel bot commented Feb 12, 2026

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

Project Deployment Actions Updated (UTC)
clerk-js-sandbox Ready Ready Preview, Comment Feb 12, 2026 8:09pm

Request Review

@changeset-bot
Copy link

changeset-bot bot commented Feb 12, 2026

🦋 Changeset detected

Latest commit: 6df6e01

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

This PR includes changesets to release 20 packages
Name Type
@clerk/clerk-js Minor
@clerk/shared Minor
@clerk/chrome-extension Patch
@clerk/expo Patch
@clerk/agent-toolkit Patch
@clerk/astro Patch
@clerk/backend Patch
@clerk/expo-passkeys Patch
@clerk/express Patch
@clerk/fastify Patch
@clerk/localizations Patch
@clerk/msw Patch
@clerk/nextjs Patch
@clerk/nuxt Patch
@clerk/react-router Patch
@clerk/react Patch
@clerk/tanstack-react-start Patch
@clerk/testing Patch
@clerk/ui Patch
@clerk/vue 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

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 12, 2026

📝 Walkthrough

Walkthrough

Adds an optional username field to PublicUserData: declared in packages/clerk-js/src/core/resources/PublicUserData.ts, mapped from JSON in fromJSON, and included in __internal_toSnapshot. Updates PublicUserDataJSON in packages/shared/src/types/json.ts to include username?: string. Unit tests in packages/clerk-js/src/core/resources/__tests__/PublicUserData.test.ts are updated to assert the new field. A changeset (.changeset/cute-crabs-agree.md) records the addition.

🚥 Pre-merge checks | ✅ 5 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Merge Conflict Detection ⚠️ Warning ❌ Merge conflicts detected (79 files):

⚔️ eslint.config.mjs (content)
⚔️ packages/astro/src/integration/create-integration.ts (content)
⚔️ packages/clerk-js/sandbox/template.html (content)
⚔️ packages/clerk-js/src/core/resources/PublicUserData.ts (content)
⚔️ packages/clerk-js/src/core/resources/__tests__/PublicUserData.test.ts (content)
⚔️ packages/shared/src/types/json.ts (content)
⚔️ packages/ui/src/common/InfiniteListSpinner.tsx (content)
⚔️ packages/ui/src/common/NotificationCountBadge.tsx (content)
⚔️ packages/ui/src/common/PrintableComponent.tsx (content)
⚔️ packages/ui/src/common/organizations/OrganizationPreview.tsx (content)
⚔️ packages/ui/src/components/APIKeys/APIKeyModal.tsx (content)
⚔️ packages/ui/src/components/APIKeys/ApiKeysTable.tsx (content)
⚔️ packages/ui/src/components/APIKeys/CopyAPIKeyModal.tsx (content)
⚔️ packages/ui/src/components/APIKeys/RevokeAPIKeyConfirmationModal.tsx (content)
⚔️ packages/ui/src/components/CreateOrganization/CreateOrganizationForm.tsx (content)
⚔️ packages/ui/src/components/ImpersonationFab/index.tsx (content)
⚔️ packages/ui/src/components/OAuthConsent/OAuthConsent.tsx (content)
⚔️ packages/ui/src/components/OrganizationProfile/ActiveMembersList.tsx (content)
⚔️ packages/ui/src/components/OrganizationProfile/DomainList.tsx (content)
⚔️ packages/ui/src/components/OrganizationProfile/InvitedMembersList.tsx (content)
⚔️ packages/ui/src/components/OrganizationProfile/MembersActions.tsx (content)
⚔️ packages/ui/src/components/OrganizationProfile/OrganizationGeneralPage.tsx (content)
⚔️ packages/ui/src/components/OrganizationProfile/OrganizationMembersTabInvitations.tsx (content)
⚔️ packages/ui/src/components/OrganizationProfile/OrganizationMembersTabRequests.tsx (content)
⚔️ packages/ui/src/components/OrganizationProfile/OrganizationProfileAvatarUploader.tsx (content)
⚔️ packages/ui/src/components/OrganizationProfile/RequestToJoinList.tsx (content)
⚔️ packages/ui/src/components/OrganizationSwitcher/OrganizationSwitcherPopover.tsx (content)
⚔️ packages/ui/src/components/OrganizationSwitcher/OrganizationSwitcherTrigger.tsx (content)
⚔️ packages/ui/src/components/PricingTable/PricingTableDefault.tsx (content)
⚔️ packages/ui/src/components/Statements/Statement.tsx (content)
⚔️ packages/ui/src/components/Subscriptions/SubscriptionsList.tsx (content)
⚔️ packages/ui/src/components/UserButton/SessionActions.tsx (content)
⚔️ packages/ui/src/components/UserButton/UserButtonTopLevelIdentifier.tsx (content)
⚔️ packages/ui/src/components/UserProfile/ConnectedAccountsSection.tsx (content)
⚔️ packages/ui/src/components/UserProfile/DeleteSection.tsx (content)
⚔️ packages/ui/src/components/UserProfile/MfaBackupCodeList.tsx (content)
⚔️ packages/ui/src/components/UserProfile/MfaPhoneCodeScreen.tsx (content)
⚔️ packages/ui/src/components/UserProfile/PasswordSection.tsx (content)
⚔️ packages/ui/src/components/UserProfile/UsernameSection.tsx (content)
⚔️ packages/ui/src/components/devPrompts/KeylessPrompt/index.tsx (content)
⚔️ packages/ui/src/customizables/elementDescriptors.ts (content)
⚔️ packages/ui/src/elements/Actions.tsx (content)
⚔️ packages/ui/src/elements/Alert.tsx (content)
⚔️ packages/ui/src/elements/ArrowBlockButton.tsx (content)
⚔️ packages/ui/src/elements/Avatar.tsx (content)
⚔️ packages/ui/src/elements/Badge.tsx (content)
⚔️ packages/ui/src/elements/Card/CardAlert.tsx (content)
⚔️ packages/ui/src/elements/Card/CardClerkAndPagesTag.tsx (content)
⚔️ packages/ui/src/elements/Card/CardContent.tsx (content)
⚔️ packages/ui/src/elements/ClipboardInput.tsx (content)
⚔️ packages/ui/src/elements/Drawer.tsx (content)
⚔️ packages/ui/src/elements/FieldControl.tsx (content)
⚔️ packages/ui/src/elements/Header.tsx (content)
⚔️ packages/ui/src/elements/InputGroup.tsx (content)
⚔️ packages/ui/src/elements/InputWithIcon.tsx (content)
⚔️ packages/ui/src/elements/LegalConsentCheckbox.tsx (content)
⚔️ packages/ui/src/elements/Modal.tsx (content)
⚔️ packages/ui/src/elements/Navbar.tsx (content)
⚔️ packages/ui/src/elements/OrganizationPreview.tsx (content)
⚔️ packages/ui/src/elements/PasswordInput.tsx (content)
⚔️ packages/ui/src/elements/PhoneInput/index.tsx (content)
⚔️ packages/ui/src/elements/PreviewButton.tsx (content)
⚔️ packages/ui/src/elements/ProfileCard/ProfileCardContent.tsx (content)
⚔️ packages/ui/src/elements/ProfileCard/ProfileCardRoot.tsx (content)
⚔️ packages/ui/src/elements/Select.tsx (content)
⚔️ packages/ui/src/elements/SuccessPage.tsx (content)
⚔️ packages/ui/src/elements/Switch.tsx (content)
⚔️ packages/ui/src/elements/TagInput.tsx (content)
⚔️ packages/ui/src/elements/UserPreview.tsx (content)
⚔️ packages/ui/src/internal/appearance.ts (content)
⚔️ packages/ui/src/primitives/AlertIcon.tsx (content)
⚔️ packages/ui/src/primitives/Badge.tsx (content)
⚔️ packages/ui/src/primitives/Button.tsx (content)
⚔️ packages/ui/src/primitives/FormErrorText.tsx (content)
⚔️ packages/ui/src/primitives/FormSuccessText.tsx (content)
⚔️ packages/ui/src/primitives/Spinner.tsx (content)
⚔️ packages/ui/src/primitives/Table.tsx (content)
⚔️ packages/ui/src/primitives/Th.tsx (content)
⚔️ packages/ui/src/primitives/gapPropertyCompat.ts (content)

These conflicts must be resolved before merging into main.
Resolve conflicts locally and push changes to this branch.
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Linked Issues check ✅ Passed The PR successfully implements the requirement from USER-101 by adding the optional username field to PublicUserData across the type definition, class implementation, serialization logic, and tests.
Out of Scope Changes check ✅ Passed All changes are directly related to adding the username field to PublicUserData as specified in USER-101; no out-of-scope modifications are present.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Title check ✅ Passed The title clearly and concisely summarizes the main change: adding a username field to public user data across clerk-js and shared packages.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


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

Caution

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

⚠️ Outside diff range comments (1)
packages/clerk-js/src/core/resources/PublicUserData.ts (1)

1-44: ⚠️ Potential issue | 🔴 Critical

Update the PublicUserData interface to include the username field.

The PublicUserData interface in packages/shared/src/types/session.ts (lines 322–329) is missing username?: string, but the class implementation in this PR adds it. This breaks the public API contract—consumers relying on the interface type won't see the username property. Add username?: string to the interface to align it with the class implementation and the PublicUserDataJSON type.

@pkg-pr-new
Copy link

pkg-pr-new bot commented Feb 12, 2026

Open in StackBlitz

@clerk/agent-toolkit

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

@clerk/astro

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

@clerk/backend

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

@clerk/chrome-extension

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

@clerk/clerk-js

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

@clerk/dev-cli

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

@clerk/expo

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

@clerk/expo-passkeys

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

@clerk/express

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

@clerk/fastify

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

@clerk/hono

npm i https://pkg.pr.new/@clerk/hono@7832

@clerk/localizations

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

@clerk/nextjs

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

@clerk/nuxt

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

@clerk/react

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

@clerk/react-router

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

@clerk/shared

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

@clerk/tanstack-react-start

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

@clerk/testing

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

@clerk/ui

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

@clerk/upgrade

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

@clerk/vue

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

commit: 6df6e01

@Jibaru Jibaru force-pushed the irueda/user-101-add-username-to-publicuserdata branch from 0a96ab4 to 8c4504d Compare February 12, 2026 18:58
@Jibaru Jibaru force-pushed the irueda/user-101-add-username-to-publicuserdata branch from 8c4504d to 4b230a6 Compare February 12, 2026 19:49
The current field is missing. The fapi endpoints already have the field in response.
@Jibaru Jibaru force-pushed the irueda/user-101-add-username-to-publicuserdata branch from 4b230a6 to 6df6e01 Compare February 12, 2026 20:08
@Jibaru Jibaru changed the title feat: add username into public user data feat(clerk-js,shared): add username into public user data Feb 12, 2026
@Jibaru Jibaru merged commit 2b46024 into main Feb 12, 2026
41 of 44 checks passed
@Jibaru Jibaru deleted the irueda/user-101-add-username-to-publicuserdata branch February 12, 2026 20:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants