Skip to content

fix(clerk-js,ui,shared): Display enterprise connection icon on account linking dropdown#8203

Merged
LauraBeatris merged 4 commits intomainfrom
laura/fix-enterprise-account-connect-dropdown-2
Apr 1, 2026
Merged

fix(clerk-js,ui,shared): Display enterprise connection icon on account linking dropdown#8203
LauraBeatris merged 4 commits intomainfrom
laura/fix-enterprise-account-connect-dropdown-2

Conversation

@LauraBeatris
Copy link
Copy Markdown
Member

@LauraBeatris LauraBeatris commented Mar 30, 2026

Description

This PR adds provider and logoPublicUrl to EnterpriseConnection resource and uses it on the enterprise connections dropdown within UserProfile

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

    • Enterprise connection icons with provider logos now appear in the account linking dropdown inside UserProfile.
  • Updates

    • Enterprise connections now include provider names and logo URLs so provider identity and logos are available in the UI.
  • Tests

    • Updated tests to reflect the revised enterprise connection payload shape.

@LauraBeatris LauraBeatris self-assigned this Mar 30, 2026
@vercel
Copy link
Copy Markdown

vercel bot commented Mar 30, 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 Apr 1, 2026 1:23pm

Request Review

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Mar 30, 2026

🦋 Changeset detected

Latest commit: 70f5273

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

This PR includes changesets to release 21 packages
Name Type
@clerk/clerk-js Patch
@clerk/shared Patch
@clerk/ui Patch
@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/hono 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/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

@LauraBeatris LauraBeatris force-pushed the laura/fix-enterprise-account-connect-dropdown-2 branch from c1ab77b to 3786999 Compare March 30, 2026 17:50
@LauraBeatris LauraBeatris force-pushed the laura/fix-enterprise-account-connect-dropdown-2 branch from 8310f2b to 62d4812 Compare March 31, 2026 21:20
@LauraBeatris LauraBeatris changed the title fix(clerk-js,ui): Display enterprise connection icon on account linking dropdown fix(clerk-js,ui,shared): Display enterprise connection icon on account linking dropdown Mar 31, 2026
@LauraBeatris LauraBeatris force-pushed the laura/fix-enterprise-account-connect-dropdown-2 branch from 62d4812 to fcf8917 Compare March 31, 2026 21:22
@LauraBeatris LauraBeatris marked this pull request as ready for review March 31, 2026 21:22
@LauraBeatris LauraBeatris requested a review from a team March 31, 2026 21:22
@LauraBeatris LauraBeatris force-pushed the laura/fix-enterprise-account-connect-dropdown-2 branch from fcf8917 to dee595e Compare March 31, 2026 21:23
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 31, 2026

Caution

Review failed

Pull request was closed or merged during review

📝 Walkthrough

Walkthrough

The pull request adds provider and logoPublicUrl to the EnterpriseConnection resource (shared types and clerk-js class), includes JSON deserialization and snapshot serialization for those fields, and updates the UI Account Linking component to derive provider icon id from provider and use logoPublicUrl for the icon URL. Changesets for patch releases were added for the affected packages.

🚥 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 title clearly identifies the main change: adding provider and logoPublicUrl fields to EnterpriseConnection to display enterprise connection icons in the account linking dropdown UI.
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.

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new bot commented Mar 31, 2026

Open in StackBlitz

@clerk/agent-toolkit

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

@clerk/astro

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

@clerk/backend

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

@clerk/chrome-extension

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

@clerk/clerk-js

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

@clerk/dev-cli

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

@clerk/expo

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

@clerk/expo-passkeys

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

@clerk/express

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

@clerk/fastify

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

@clerk/hono

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

@clerk/localizations

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

@clerk/nextjs

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

@clerk/nuxt

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

@clerk/react

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

@clerk/react-router

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

@clerk/shared

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

@clerk/tanstack-react-start

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

@clerk/testing

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

@clerk/ui

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

@clerk/upgrade

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

@clerk/vue

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

commit: 70f5273

Copy link
Copy Markdown
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

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@packages/ui/src/components/UserProfile/EnterpriseAccountsSection.tsx`:
- Around line 54-55: Add regression tests for EnterpriseAccountsSection to cover
the new provider normalization and logo fallback behavior: write unit/tests that
render the component (or call the helper logic) with connection.provider values
like "oauth_google", "saml_okta", and bare provider names to assert
providerIconId is normalized correctly, and tests that provide
connection.logoPublicUrl as a non-empty string and as empty/undefined to assert
providerIconUrl falls back to the expected empty string or default path; target
the code paths referenced by providerIconId and providerIconUrl (and the similar
logic around lines 76-83) so OAuth/SAML normalization and empty-logo fallback
are covered.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Organization UI (inherited)

Review profile: ASSERTIVE

Plan: Pro

Run ID: cf45c294-5e82-4ab4-882e-e20b33e3b2d8

📥 Commits

Reviewing files that changed from the base of the PR and between cfb8cbe and dee595e.

📒 Files selected for processing (5)
  • .changeset/cozy-lands-grow.md
  • .changeset/polite-camels-chew.md
  • packages/clerk-js/src/core/resources/EnterpriseConnection.ts
  • packages/shared/src/types/enterpriseConnection.ts
  • packages/ui/src/components/UserProfile/EnterpriseAccountsSection.tsx

Comment on lines +54 to +55
const providerIconId = connection.provider.replace(/(oauth_|saml_)/, '').trim() as OAuthProvider;
const providerIconUrl = connection.logoPublicUrl?.trim() || '';
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Add regression tests for the new enterprise icon resolution path before merge.

This introduces new runtime behavior (connection.provider normalization + connection.logoPublicUrl icon source) but no tests were added/updated to cover OAuth/SAML provider values and empty-logo fallback, which leaves this UI path unprotected against regressions.

As per coding guidelines, "**/*: If there are no tests added or modified as part of the PR, please suggest that tests be added to cover the changes."

Also applies to: 76-83

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/ui/src/components/UserProfile/EnterpriseAccountsSection.tsx` around
lines 54 - 55, Add regression tests for EnterpriseAccountsSection to cover the
new provider normalization and logo fallback behavior: write unit/tests that
render the component (or call the helper logic) with connection.provider values
like "oauth_google", "saml_okta", and bare provider names to assert
providerIconId is normalized correctly, and tests that provide
connection.logoPublicUrl as a non-empty string and as empty/undefined to assert
providerIconUrl falls back to the expected empty string or default path; target
the code paths referenced by providerIconId and providerIconUrl (and the similar
logic around lines 76-83) so OAuth/SAML normalization and empty-logo fallback
are covered.

@LauraBeatris LauraBeatris force-pushed the laura/fix-enterprise-account-connect-dropdown-2 branch from ef9d201 to 70f5273 Compare April 1, 2026 13:23
@LauraBeatris LauraBeatris merged commit b289566 into main Apr 1, 2026
43 of 44 checks passed
@LauraBeatris LauraBeatris deleted the laura/fix-enterprise-account-connect-dropdown-2 branch April 1, 2026 13:31
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.

3 participants