Skip to content

Conversation

@LauraBeatris
Copy link
Member

@LauraBeatris LauraBeatris commented Jan 8, 2026

Description

Fix

Now only sets the field value on mount, if the default role matches an item on /roles

CleanShot.2026-01-08.at.18.15.30.mp4

Previously

When organizationSettings.defaultRole does not exist on the options returned by /roles, the field gets initialized with roleField.setValue, but the option cannot be found, therefore it disables the select input:

image image image

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

    • Role selector on the invite members page is no longer disabled when the organization's default role is missing; users can choose alternative roles and send invitations.
  • Tests

    • Added test coverage verifying alternate roles can be selected and invitations sent when the default role isn't available.
  • Chores

    • Added a release changeset entry; no public API changes.

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

@LauraBeatris LauraBeatris self-assigned this Jan 8, 2026
@changeset-bot
Copy link

changeset-bot bot commented Jan 8, 2026

🦋 Changeset detected

Latest commit: 101b80d

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

This PR includes changesets to release 2 packages
Name Type
@clerk/ui Patch
@clerk/chrome-extension 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 Jan 8, 2026

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

Project Deployment Review Updated (UTC)
clerk-js-sandbox Ready Ready Preview, Comment Jan 9, 2026 1:22pm

@LauraBeatris LauraBeatris requested a review from a team January 8, 2026 21:04
@github-actions github-actions bot added the core-3 label Jan 8, 2026
@LauraBeatris LauraBeatris force-pushed the laura/orgs-1154-enable-select-role-on-invite-members-page-even-when-default branch from 6b7589e to 20fa14b Compare January 8, 2026 21:08
@LauraBeatris LauraBeatris marked this pull request as ready for review January 8, 2026 21:08
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 8, 2026

📝 Walkthrough

Walkthrough

Adds a changeset entry for a patch release and fixes a bug where the role selector on the OrganizationProfile invite members page could be disabled when the default role was not present. The default-role initialization was moved from the top level of InviteMembersForm into AsyncRoleSelect, which now obtains defaultRole and sets the field only when the field is empty and the default role is present in the fetched options. A test verifying that other options can be selected when the default is unavailable was added, and an unused React import was removed.

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title accurately describes the main fix: keeping the role select enabled when the default organization role is not available, which aligns with the core issue addressed in the changeset.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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


📜 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 232dbb7 and 101b80d.

📒 Files selected for processing (3)
  • .changeset/social-items-strive.md
  • packages/ui/src/components/OrganizationProfile/InviteMembersForm.tsx
  • packages/ui/src/components/OrganizationProfile/__tests__/InviteMembersPage.test.tsx
🚧 Files skipped from review as they are similar to previous changes (2)
  • packages/ui/src/components/OrganizationProfile/tests/InviteMembersPage.test.tsx
  • packages/ui/src/components/OrganizationProfile/InviteMembersForm.tsx
⏰ 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). (28)
  • GitHub Check: Static analysis
  • GitHub Check: Unit Tests (**)
  • GitHub Check: Unit Tests (shared, clerk-js, RQ)
  • GitHub Check: Publish with pkg-pr-new
  • GitHub Check: Integration Tests (quickstart, chrome, 16)
  • GitHub Check: Integration Tests (nextjs, chrome, 16)
  • GitHub Check: Integration Tests (nextjs, chrome, 15)
  • GitHub Check: Integration Tests (tanstack-react-start, chrome)
  • GitHub Check: Integration Tests (machine, chrome, RQ)
  • GitHub Check: Integration Tests (nextjs, chrome, 16, RQ)
  • GitHub Check: Integration Tests (custom, chrome)
  • GitHub Check: Integration Tests (localhost, chrome)
  • GitHub Check: Integration Tests (nuxt, chrome)
  • GitHub Check: Integration Tests (billing, chrome, RQ)
  • GitHub Check: Integration Tests (machine, chrome)
  • GitHub Check: Integration Tests (react-router, chrome)
  • GitHub Check: Integration Tests (billing, chrome)
  • GitHub Check: Integration Tests (vue, chrome)
  • GitHub Check: Integration Tests (quickstart, chrome, 15)
  • GitHub Check: Integration Tests (ap-flows, chrome)
  • GitHub Check: Integration Tests (sessions:staging, chrome)
  • GitHub Check: Integration Tests (express, chrome)
  • GitHub Check: Integration Tests (sessions, chrome)
  • GitHub Check: Integration Tests (handshake, chrome)
  • GitHub Check: Integration Tests (astro, chrome)
  • GitHub Check: Integration Tests (handshake:staging, chrome)
  • GitHub Check: Integration Tests (generic, chrome)
  • GitHub Check: semgrep-cloud-platform/scan
🔇 Additional comments (1)
.changeset/social-items-strive.md (1)

1-5: LGTM!

The changeset entry is well-formatted with correct YAML frontmatter, appropriate patch-level version bump for a bug fix, and a clear, consumer-friendly description that aligns with the PR objectives.


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

@LauraBeatris LauraBeatris force-pushed the laura/orgs-1154-enable-select-role-on-invite-members-page-even-when-default branch from 20fa14b to 871fea7 Compare January 8, 2026 21:26
@pkg-pr-new
Copy link

pkg-pr-new bot commented Jan 8, 2026

Open in StackBlitz

@clerk/agent-toolkit

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

@clerk/astro

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

@clerk/backend

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

@clerk/chrome-extension

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

@clerk/clerk-js

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

@clerk/dev-cli

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

@clerk/expo

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

@clerk/expo-passkeys

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

@clerk/express

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

@clerk/fastify

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

@clerk/localizations

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

@clerk/nextjs

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

@clerk/nuxt

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

@clerk/react

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

@clerk/react-router

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

@clerk/shared

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

@clerk/tanstack-react-start

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

@clerk/testing

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

@clerk/ui

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

@clerk/upgrade

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

@clerk/vue

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

commit: 101b80d

@LauraBeatris LauraBeatris force-pushed the laura/orgs-1154-enable-select-role-on-invite-members-page-even-when-default branch from 232dbb7 to 101b80d Compare January 9, 2026 13:21
@LauraBeatris LauraBeatris merged commit 87f1fc5 into main Jan 9, 2026
44 checks passed
@LauraBeatris LauraBeatris deleted the laura/orgs-1154-enable-select-role-on-invite-members-page-even-when-default branch January 9, 2026 13:36
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.

4 participants