Skip to content

Conversation

@LauraBeatris
Copy link
Member

@LauraBeatris LauraBeatris commented Jan 21, 2026

Description

Port from #7635

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

  • Organization activation now completes successfully even if logo upload fails during setup. Previously, failed logo uploads could interrupt the activation process and block users from completing organization creation. This fix ensures users can finish setting up their organization without delays, providing a more reliable and seamless onboarding experience regardless of upload results.

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

@LauraBeatris LauraBeatris requested a review from a team January 21, 2026 20:43
@LauraBeatris LauraBeatris self-assigned this Jan 21, 2026
@changeset-bot
Copy link

changeset-bot bot commented Jan 21, 2026

🦋 Changeset detected

Latest commit: 0fd9c47

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 21, 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 22, 2026 4:57pm

Request Review

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 21, 2026

📝 Walkthrough

Walkthrough

This pull request patches the @clerk/ui package to handle logo upload failures during organization creation. The TaskChooseOrganization component's CreateOrganizationScreen has been refactored to use an asynchronous logo upload helper function. Instead of setting the logo immediately after organization creation, the new flow invokes uploadOrganizationLogo via Promise.allSettled, allowing it to run concurrently without blocking organization activation if the upload fails. Corresponding test additions verify this behavior, ensuring that setActive is called even when logo upload fails.

🚥 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 pull request title clearly summarizes the main change: handling logo upload failures in TaskChooseOrganization. It is specific, concise, and directly reflects the core objective of the changeset across all modified files.
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.


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: 1

🤖 Fix all issues with AI agents
In
`@packages/ui/src/components/SessionTasks/tasks/TaskChooseOrganization/__tests__/TaskChooseOrganization.test.tsx`:
- Around line 14-26: Remove the locally redeclared FakeOrganizationParams type
in TaskChooseOrganization.test.tsx and rely on the imported
FakeOrganizationParams (import type { FakeOrganizationParams } ...) instead;
delete the duplicate type block (the type declaration that lists id, createdAt,
imageUrl, slug, name, membersCount, pendingInvitationsCount, adminDeleteEnabled,
maxAllowedMemberships) so only the imported symbol FakeOrganizationParams
remains used in the test.

Comment on lines +14 to +27
import type { FakeOrganizationParams } from '../../../../CreateOrganization/__tests__/CreateOrganization.test';

type FakeOrganizationParams = {
id: string;
createdAt?: Date;
imageUrl?: string;
slug: string;
name: string;
membersCount: number;
pendingInvitationsCount: number;
adminDeleteEnabled: boolean;
maxAllowedMemberships: number;
};
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

cat -n packages/ui/src/components/SessionTasks/tasks/TaskChooseOrganization/__tests__/TaskChooseOrganization.test.tsx | head -30

Repository: clerk/javascript

Length of output: 1275


🏁 Script executed:

grep -n "FakeOrganizationParams" packages/ui/src/components/CreateOrganization/__tests__/CreateOrganization.test.tsx | head -20

Repository: clerk/javascript

Length of output: 272


Remove the duplicate FakeOrganizationParams type declaration.

Line 14 imports FakeOrganizationParams from the CreateOrganization test file, but lines 16–26 re-declare it locally. This duplicate identifier causes a TypeScript compiler error that blocks the build.

Suggested fix
-import type { FakeOrganizationParams } from '../../../../CreateOrganization/__tests__/CreateOrganization.test';
-
-type FakeOrganizationParams = {
-  id: string;
-  createdAt?: Date;
-  imageUrl?: string;
-  slug: string;
-  name: string;
-  membersCount: number;
-  pendingInvitationsCount: number;
-  adminDeleteEnabled: boolean;
-  maxAllowedMemberships: number;
-};

Keep only the import and use the imported type.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
import type { FakeOrganizationParams } from '../../../../CreateOrganization/__tests__/CreateOrganization.test';
type FakeOrganizationParams = {
id: string;
createdAt?: Date;
imageUrl?: string;
slug: string;
name: string;
membersCount: number;
pendingInvitationsCount: number;
adminDeleteEnabled: boolean;
maxAllowedMemberships: number;
};
import type { FakeOrganizationParams } from '../../../../CreateOrganization/__tests__/CreateOrganization.test';
🧰 Tools
🪛 Biome (2.1.2)

[error] 16-16: Shouldn't redeclare 'FakeOrganizationParams'. Consider to delete it or rename it.

'FakeOrganizationParams' is defined here:

(lint/suspicious/noRedeclare)

🤖 Prompt for AI Agents
In
`@packages/ui/src/components/SessionTasks/tasks/TaskChooseOrganization/__tests__/TaskChooseOrganization.test.tsx`
around lines 14 - 26, Remove the locally redeclared FakeOrganizationParams type
in TaskChooseOrganization.test.tsx and rely on the imported
FakeOrganizationParams (import type { FakeOrganizationParams } ...) instead;
delete the duplicate type block (the type declaration that lists id, createdAt,
imageUrl, slug, name, membersCount, pendingInvitationsCount, adminDeleteEnabled,
maxAllowedMemberships) so only the imported symbol FakeOrganizationParams
remains used in the test.

@pkg-pr-new
Copy link

pkg-pr-new bot commented Jan 22, 2026

Open in StackBlitz

@clerk/agent-toolkit

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

@clerk/astro

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

@clerk/backend

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

@clerk/chrome-extension

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

@clerk/clerk-js

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

@clerk/dev-cli

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

@clerk/expo

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

@clerk/expo-passkeys

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

@clerk/express

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

@clerk/fastify

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

@clerk/localizations

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

@clerk/nextjs

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

@clerk/nuxt

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

@clerk/react

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

@clerk/react-router

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

@clerk/shared

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

@clerk/tanstack-react-start

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

@clerk/testing

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

@clerk/ui

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

@clerk/upgrade

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

@clerk/vue

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

commit: 0fd9c47

@LauraBeatris LauraBeatris merged commit 7c0ff4a into main Jan 22, 2026
36 checks passed
@LauraBeatris LauraBeatris deleted the laura/create-org-even-if-logo-upload-fails-2 branch January 22, 2026 17:05
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