Skip to content

fix(mosaic): Activate new organization in TaskChooseOrganization when the logo upload fails - #10885

Open
kylemac wants to merge 2 commits into
mainfrom
kylemac/mosaic-task-choose-org-logo
Open

kylemac wants to merge 2 commits into
mainfrom
kylemac/mosaic-task-choose-org-logo

Conversation

@kylemac

@kylemac kylemac commented Nov 18, 2026

Copy link
Copy Markdown
Contributor

Description

In Mosaic's TaskChooseOrganization, if the logo upload failed after the organization was created, the new organization was never set active. The user was left with an organization they couldn't use, and the task didn't complete. The legacy component ignores the logo failure and carries on, so this does the same: create, try the logo, then always set active and finish the task.

CreateOrganization keeps its current behavior (the error is shown and the org isn't activated), which also matches legacy.

Follow-up, not in this PR: Mosaic doesn't pre-fill the default logo from organization creation defaults the way legacy does.

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:

@changeset-bot

changeset-bot Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 5e77a17

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

This PR includes changesets to release 2 packages
Name Type
@clerk/mosaic Patch
@clerk/swingset 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

vercel Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
clerk-js-sandbox Ready Ready Preview Nov 18, 2026 1:57am UTC
mosaic-docs Error Error Nov 18, 2026 1:57am UTC
swingset Ready Ready Preview Nov 18, 2026 1:57am UTC

Request Review

@coderabbitai

coderabbitai Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The create-organization model adds an option to wait for a logo upload to settle without propagating its rejection. The choose-organization task enables this option. Tests cover the failed-upload behavior in both the standard organization creation flow and the choose-organization task.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

  • clerk/javascript#10502: Introduces the organization creation and logo upload flow that this change modifies.
Merge Risk: Minimal · up to 5e77a

When a logo upload fails, the choose-organization task now activates the new organization and completes. The standard create-organization flow still shows the error and leaves the organization inactive. Both behaviors have test coverage, and I found no merge-blocking risk.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main change: TaskChooseOrganization in Mosaic now activates the newly created organization and finishes the task when logo upload fails. The raw summary confirms this change in the…
Description check Passed The description explains the bug, the cause (the new organization was never set active when the logo upload failed), and the fix (create, attempt logo, then always activate and complete the task). It …
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the main change: TaskChooseOrganization in Mosaic now activates the newly created organization and finishes the task when logo upload fails. The raw summary confirms this change in the model, the task model, and the tests. The title is specific, follows conventional commit style, and is clear to a reviewer scanning history. It is slightly long at 91 characters.

Full details: Description check

Explanation

The description explains the bug, the cause (the new organization was never set active when the logo upload failed), and the fix (create, attempt logo, then always activate and complete the task). It also states that CreateOrganization keeps its existing behavior and notes a deferred follow-up. This relates directly to the changeset, which adds the activateOnLogoFailure flag and the related tests.

Finishing Touches

Fix failing CI checks

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Warning

Linked repositories: Some configured repositories could not be included in this review. Cross-repository analysis may be incomplete. Please check linked-repository access and settings.

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: clerk/javascript
  • Branch: main
  • File: .coderabbit.yaml
  • Commit: 9f21762
  • Layers: Repository YAML (base), Organization UI (inherited)
  • Review profile: ASSERTIVE
  • Plan: Team
  • Run ID: d066348e-b338-427f-aec3-c93d9a231bf0
Commits

Reviewing files that changed from the base of the PR and between 9f21762 and 5e77a17.

Files selected for processing: 5

  • .changeset/task-choose-org-logo-failure.md
  • packages/mosaic/src/features/create-organization/__tests__/create-organization.feature.test.tsx
  • packages/mosaic/src/features/create-organization/create-organization.model.ts
  • packages/mosaic/src/features/task-choose-organization/__tests__/task-choose-organization.feature.test.tsx
  • packages/mosaic/src/features/task-choose-organization/task-choose-organization.model.ts
Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

Included review availability: This review used your included allowance. 9 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 10 reviews per hour.

@pkg-pr-new

pkg-pr-new Bot commented Nov 18, 2026

Copy link
Copy Markdown

Open in StackBlitz

@clerk/astro

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

@clerk/backend

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

@clerk/chrome-extension

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

@clerk/clerk-js

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

@clerk/electron

npm i https://pkg.pr.new/@clerk/electron@10885

@clerk/electron-passkeys

npm i https://pkg.pr.new/@clerk/electron-passkeys@10885

@clerk/eslint-plugin

npm i https://pkg.pr.new/@clerk/eslint-plugin@10885

@clerk/expo

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

@clerk/expo-biometrics

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

@clerk/expo-google-signin

npm i https://pkg.pr.new/@clerk/expo-google-signin@10885

@clerk/expo-native-components

npm i https://pkg.pr.new/@clerk/expo-native-components@10885

@clerk/expo-passkeys

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

@clerk/express

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

@clerk/fastify

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

@clerk/hono

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

@clerk/localizations

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

@clerk/mosaic

npm i https://pkg.pr.new/@clerk/mosaic@10885

@clerk/nextjs

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

@clerk/nuxt

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

@clerk/react

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

@clerk/react-router

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

@clerk/shared

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

@clerk/tanstack-react-start

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

@clerk/testing

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

@clerk/ui

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

@clerk/upgrade

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

@clerk/vue

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

commit: 5e77a17

@blacksmith-sh

blacksmith-sh Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

Matches Logo upload failure still activates new org

Before, the org was created but the card stayed on 'Logo upload failed' with the session pending and no active org; after, the org became active, the session went active and the task redirected to /done.

Before · Recording

Recording

Watch full video · Original footage · 0:00 Add a logo · 0:01 Create the organization

After · Recording

Recording

Watch full video · Original footage · 0:00 Add a logo · 0:01 Create the organization

Merge-base

Result state

This PR 5e77a171

Result state

Proof on 5e77a171 · mocked: Fake FAPI (MSW) (needs NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY) · Did Proof get it right? Yes · No

View full Proof report · React 👎 or comment @codesmith dismiss this proof to dismiss

This branch was successfully deployed

2 active deployments
Preview – swingset — 5e77a171 Deployed Nov 18, 2026 by vercel[bot]
Preview – clerk-js-sandbox — 5e77a171 Deployed Nov 18, 2026 by vercel[bot]
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.

2 participants