Skip to content

fix(ui): list Solana wallets through the Wallet Standard - #9994

Merged
manovotny merged 3 commits into
mainfrom
manovotny/ui-solana-wallet-standard
Sep 30, 2026
Merged

manovotny merged 3 commits into
mainfrom
manovotny/ui-solana-wallet-standard

Conversation

@manovotny

@manovotny manovotny commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

Description

@clerk/ui depended on @solana/wallet-adapter-react only to list the Solana wallets installed in the browser. That package depends on @solana-mobile/wallet-adapter-mobile, whose peers are react-native and @solana/web3.js, so every app that installs @clerk/ui also installs React Native, Metro, and web3.js's jayson RPC client. That brings Dependabot alerts into consuming apps that they can't fix themselves (image-size via Metro; stream-json and uuid via jayson).

Signing already skips the adapter: getInjectedWeb3SolanaProviders in @clerk/shared finds the wallet through @wallet-standard/core's getWallets(). This PR builds the button list from that same registry and drops the three @solana/* dependencies from @clerk/ui in favor of @wallet-standard/core. A wallet is listed when it supports a solana: chain, standard:connect, and solana:signMessage, which are the features sign-in calls.

  • The ConnectionProvider and WalletProvider wrappers go away. Nothing used the RPC connection.
  • The list updates when a wallet extension registers after the component mounts.
  • The lazy web3-solana-wallet-buttons chunk drops from about 306 KB to 2 KB. @wallet-standard/core was already in ui-common through @clerk/shared, so that chunk doesn't grow.
  • Behavior change: on Android Chrome the adapter used to add a Mobile Wallet Adapter entry. @clerk/shared can't find that wallet in the Wallet Standard registry, so the button couldn't complete a sign-in. The list now shows only wallets that can.
  • @clerk/clerk-js also drops the three @solana/* packages, which it listed but never imported. @clerk/shared's Solana code only type-imports @solana/wallet-standard and lazy-loads @wallet-standard/core at runtime, which stays.

To try it, enable Solana on a development instance's Web3 page and install a Solana wallet extension such as Phantom (signing needs no funds). Choosing Solana on <SignIn /> lists the installed wallets and signs in with the chosen one; without an extension, it shows the "No Solana Web3 wallets detected" message. Adding a Solana wallet in <UserProfile /> renders the same list.

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:

🤖 Generated with Claude Code

The Solana wallet buttons used @solana/wallet-adapter-react only to list installed wallets. Signing already
goes through @wallet-standard/core in @clerk/shared, so read the list from the same registry and drop the
adapter packages. They pulled React Native, Metro, and @solana/web3.js into every @clerk/ui install.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vercel

vercel Bot commented Sep 30, 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 Sep 30, 2026 4:01am UTC
swingset Ready Ready Preview Sep 30, 2026 4:01am UTC

Request Review

@coderabbitai

coderabbitai Bot commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

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

Review profile: ASSERTIVE

Plan: Team

Run ID: 4789c3dd-afc5-4b85-9a99-3b512a2c48b2

📥 Commits

Reviewing files that changed from the base of the PR and between dae1592 and 4b8da39.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (5)
  • .changeset/ui-solana-wallet-standard.md
  • packages/clerk-js/package.json
  • packages/ui/package.json
  • packages/ui/src/elements/Web3SolanaWalletButtons.tsx
  • packages/ui/src/elements/__tests__/Web3SolanaWalletButtons.test.tsx
🔗 Linked repositories identified

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

💤 Files with no reviewable changes (1)
  • packages/clerk-js/package.json

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


📝 Walkthrough

Walkthrough

The Solana wallet picker now uses the Wallet Standard registry instead of wallet-adapter providers. It displays registered wallets that support a Solana chain, connection, and message signing. The picker updates its list when wallets register or unregister. The change also updates package dependencies, removes the provider wrapper, and adds tests for filtering, registry updates, and wallet selection.

Priority: ➖ Normal

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

Merge Risk: ⚪ Minimal · up to 4b8da

The wallet discovery migration preserves the sign-in selection contract. No merge-blocking issue remains, subject to normal build and test checks.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely identifies the main change: listing Solana wallets through Wallet Standard.
Description check ✅ Passed The description directly explains the Wallet Standard migration, dependency removal, wallet filtering, registration updates, and expected bundle-size reduction.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 2…
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.
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Commit to this branch
  • Create a new PR

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

@changeset-bot

changeset-bot Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 4b8da39

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

This PR includes changesets to release 5 packages
Name Type
@clerk/ui Patch
@clerk/clerk-js Patch
@clerk/chrome-extension Patch
@clerk/electron Patch
@clerk/expo 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

@pkg-pr-new

pkg-pr-new Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

@clerk/astro

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

@clerk/backend

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

@clerk/chrome-extension

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

@clerk/clerk-js

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

@clerk/electron

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

@clerk/electron-passkeys

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

@clerk/eslint-plugin

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

@clerk/expo

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

@clerk/expo-google-signin

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

@clerk/expo-passkeys

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

@clerk/express

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

@clerk/fastify

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

@clerk/hono

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

@clerk/localizations

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

@clerk/mosaic

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

@clerk/nextjs

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

@clerk/nuxt

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

@clerk/react

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

@clerk/react-router

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

@clerk/shared

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

@clerk/tanstack-react-start

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

@clerk/testing

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

@clerk/ui

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

@clerk/upgrade

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

@clerk/vue

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

commit: 4b8da39

clerk-js never imports them. @clerk/shared's Solana code only type-imports @solana/wallet-standard and
lazy-loads @wallet-standard/core at runtime, which stays.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign-in calls standard:connect before signing, so a wallet without it could be listed but never finish.
Also drops the new code comments and rewrites the changeset for people upgrading.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

API Changes Report

Generated by Break Check on 2026-09-30T04:12:57.833Z

Summary

Metric Count
Packages analyzed 19
Packages with changes 1
🔴 Breaking changes 1
🟡 Non-breaking changes 0
🟢 Additions 0

Warning
1 breaking change(s) detected - Major version bump required

🤖 This report was reviewed by claude-sonnet-4-6.

🔴 Breaking changes index (1)

Every breaking change, up front. Full diffs are in the package sections below.

Package Subpath Change
@clerk/ui ./themes/experimental createTheme

@clerk/ui

Current version: 1.37.0
Recommended bump: MAJOR → 2.0.0

Subpath ./themes/experimental

🔴 Breaking Changes (1)

Changed: createTheme
// ... 4 unchanged lines elided ...
      theme: InternalTheme;
    }) => Elements);
    theme?: (BaseTheme | BaseTheme[]) | undefined;
-   options?: Options | undefined;
-   variables?: Variables | undefined;
-   captcha?: CaptchaAppearanceOptions | undefined;
+   options?: import("@clerk/ui/internal").Options | undefined;
+   variables?: import("@clerk/ui/internal").Variables | undefined;
+   captcha?: import("@clerk/ui/internal").CaptchaAppearanceOptions | undefined;
    cssLayerName?: string | undefined;
  }

Static analyzer: Breaking change in function createTheme: Return type changed: {__type:"prebuilt_appearance";name?:string;elements?:((params:{theme:import("@clerk/ui").~InternalTheme;})=>import("@clerk/ui").~Elements)|import("@clerk/ui").~Elements;theme?:(import("@clerk/ui").~BaseTheme|import("@clerk/ui").~BaseTheme[])|undefined;options?:import("@clerk/ui").~Options|undefined;variables?:import("@clerk/ui").~Variables|undefined;captcha?:import("@clerk/ui").~CaptchaAppearanceOptions|undefined;cssLayerName?:string|undefined;} → {__type:"prebuilt_appearance";name?:string;elements?:!unknown|((params:{theme:import("@clerk/ui").~InternalTheme;})=>!unknown);theme?:(!unknown|!unknown[])|undefined;options?:import("@clerk/ui/internal").Options|undefined;variables?:import("@clerk/ui/internal").Variables|undefined;captcha?:import("@clerk/ui/internal").CaptchaAppearanceOptions|undefined;cssLayerName?:string|undefined;}

🤖 AI review (confirmed) (72%): The return type fields options, variables, and captcha now reference types from @clerk/ui/internal, whose referenceResolutions verdict is unknown with packageNotFound: true, meaning the specifier cannot be verified as resolvable; per rule 12, non-resolvable specifiers degrade to any or fail to compile, making this a breaking change regardless of structural equivalence.

Migration: Consumers reading options, variables, or captcha from createTheme's return value should ensure @clerk/ui/internal is resolvable in their project, or avoid relying on the concrete types of those fields until the package resolves correctly.


Report generated by Break Check

Last ran on 4b8da39.

@manovotny

Copy link
Copy Markdown
Contributor Author

The createTheme flag is noise from the build, not this change. The built createTheme.d.ts here is identical to the published @clerk/ui@1.37.0, and #9985 shows the same diff in reverse. No API changes in this PR.

@tmilewski tmilewski left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

There doesn't appear to be any downstream effects to Chrome Extensions (re: Remotely Hosted Code)

@manovotny

Copy link
Copy Markdown
Contributor Author

Tested on this branch's clerk-js sandbox preview in Chrome with Phantom:

  • Sign in with Solana lists Phantom, and choosing it signs the message. The web3 wallet verification comes back verified, and the new wallet moves on to sign-up as expected.
  • With Phantom turned off, the list shows the "No Solana Web3 wallets detected" message.
  • I couldn't test adding a wallet from <UserProfile />. The sandbox instance's enterprise connection hides the Web3 section for its test users. That screen renders the same component.

I also resolved a downstream app's lockfile against the pkg.pr.new build of @clerk/ui. React Native, Metro, jayson, and @solana/web3.js all drop out.

@manovotny
manovotny merged commit 6dbf9a4 into main Sep 30, 2026
126 of 127 checks passed
@manovotny
manovotny deleted the manovotny/ui-solana-wallet-standard branch September 30, 2026 17:29

This branch was successfully deployed

2 active deployments
Preview – swingset — 4b8da39b Deployed Sep 30, 2026 by vercel[bot]
Preview – clerk-js-sandbox — 4b8da39b Deployed Sep 30, 2026 by vercel[bot]
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