Skip to content

Conversation

@enesozturk
Copy link
Contributor

@enesozturk enesozturk commented Nov 3, 2025

Description

Removes EventController calls from UI to AppKit class. Previous approach is problematic that the event trigers are tied to UI. For cases like Headless, we cannot trigger CONNECT_SUCCESS if we don't use modal.

Updating the logics as the CONNECT_SUCCESS event will be fired on the connectExternal method which will have the same trigger logics work as is; Auth connections, WC connections, and extension connections.

Type of change

  • Chore (non-breaking change that addresses non-functional tasks, maintenance, or code quality improvements)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Associated Issues

For Linear issues: Closes APKT-xxx
For GH issues: closes #...

Showcase (Optional)

If there is a UI change include the screenshots with before and after state.
If new feature is being introduced, include the link to demo recording.

Checklist

  • Code in this PR is covered by automated tests (Unit tests, E2E tests)
  • My changes generate no new warnings
  • I have reviewed my own code
  • I have filled out all required sections
  • I have tested my changes on the preview link
  • Approver of this PR confirms that the changes are tested on the preview link

Note

Moves CONNECT_SUCCESS event emission from UI to controllers, enriches connectors with explorer wallet metadata (walletRank), and updates logic/tests accordingly.

  • Controllers:
    • ConnectionController: connectExternal now emits CONNECT_SUCCESS (method: email for AUTH, else browser) including walletRank from connector.explorerWallet.order; finalizeWcConnection uses qrcode when no deeplink and skips event when no address.
    • AppKitBaseClient: syncAdapterConnection reconnect flow now includes walletRank in CONNECT_SUCCESS event.
    • ApiController: prefetchWalletRanks calls ConnectorController.extendConnectorsWithExplorerWallets to attach explorer metadata to connectors.
    • ConnectorController: adds extendConnectorsWithExplorerWallets (match by id/rdns) and re-merges enabled connectors.
  • UI:
    • Remove CONNECT_SUCCESS event dispatches from w3m-connecting-wc-browser, w3m-connecting-external-view, and w3m-email-verify-otp-view; fix typo "ChainController".
    • w3m-connector-list stops local mapping to explorer wallets; relies on controller-provided data.
  • Tests:
    • Update/add tests covering controller-emitted events (methods, walletRank, unknown connector), WalletConnect QR vs mobile methods, no-address case, and explorer wallet enrichment mapping; minor refactors/cleanup.

Written by Cursor Bugbot for commit 130589f. This will update automatically on new commits. Configure here.

@changeset-bot
Copy link

changeset-bot bot commented Nov 3, 2025

⚠️ No Changeset found

Latest commit: 130589f

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@vercel
Copy link

vercel bot commented Nov 3, 2025

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

Project Deployment Preview Comments Updated (UTC)
appkit-basic-html Ready Ready Preview Comment Nov 5, 2025 8:00am
appkit-demo Ready Ready Preview Comment Nov 5, 2025 8:00am
appkit-gallery Ready Ready Preview Comment Nov 5, 2025 8:00am
appkit-laboratory Ready Ready Preview Comment Nov 5, 2025 8:00am
10 Skipped Deployments
Project Deployment Preview Comments Updated (UTC)
appkit-basic-example Ignored Ignored Nov 5, 2025 8:00am
appkit-basic-sign-client-example Ignored Ignored Nov 5, 2025 8:00am
appkit-basic-up-example Ignored Ignored Nov 5, 2025 8:00am
appkit-ethers5-bera Ignored Ignored Nov 5, 2025 8:00am
appkit-nansen-demo Ignored Ignored Nov 5, 2025 8:00am
appkit-vue-solana Ignored Ignored Nov 5, 2025 8:00am
appkit-wagmi-cdn-example Ignored Ignored Nov 5, 2025 8:00am
ethereum-provider-wagmi-example Ignored Ignored Nov 5, 2025 8:00am
next-wagmi-solana-bitcoin-example Ignored Ignored Nov 5, 2025 8:00am
vue-wagmi-example Ignored Ignored Nov 5, 2025 8:00am

cursor[bot]

This comment was marked as outdated.

@github-actions
Copy link
Contributor

github-actions bot commented Nov 3, 2025

Visual Regression Test Results ✅ Passed

✨ No visual changes detected

Chromatic Build: https://www.chromatic.com/build?appId=6493191bf4b10fed8ca7353f&number=298
Storybook Preview: https://6493191bf4b10fed8ca7353f-xmlfvoyfyz.chromatic.com/

@github-actions
Copy link
Contributor

github-actions bot commented Nov 3, 2025

📦 Bundle Size Check

All bundles are within size limits

📊 View detailed bundle sizes

> @reown/[email protected] size /home/runner/work/appkit/appkit


> size-limit

@reown/appkit - Main Entry
Size limit:   80 kB
Size:         70.75 kB with all dependencies, minified and gzipped
Loading time: 1.4 s    on slow 3G
Running time: 542 ms   on Snapdragon 410
Total time:   2 s
@reown/appkit/react
Size limit:   230 kB
Size:         227.27 kB with all dependencies, minified and gzipped
Loading time: 4.5 s     on slow 3G
Running time: 776 ms    on Snapdragon 410
Total time:   5.3 s
@reown/appkit/vue
Size limit:   80 kB
Size:         70.75 kB with all dependencies, minified and gzipped
Loading time: 1.4 s    on slow 3G
Running time: 177 ms   on Snapdragon 410
Total time:   1.6 s
@reown/appkit-scaffold-ui
Size limit:   220 kB
Size:         207.26 kB with all dependencies, minified and gzipped
Loading time: 4.1 s     on slow 3G
Running time: 542 ms    on Snapdragon 410
Total time:   4.6 s
@reown/appkit-ui
Size limit:   500 kB
Size:         13.15 kB with all dependencies, minified and gzipped
Loading time: 257 ms   on slow 3G
Running time: 70 ms    on Snapdragon 410
Total time:   327 ms

@github-actions
Copy link
Contributor

github-actions bot commented Nov 3, 2025

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 79.9% 37977 / 47528
🔵 Statements 79.9% 37977 / 47528
🔵 Functions 77.91% 4102 / 5265
🔵 Branches 86.52% 9217 / 10652
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
packages/appkit/src/client/appkit-base-client.ts 72.21% 85.79% 75.1% 72.21% 197, 210-213, 216, 228-229, 235-236, 239, 248, 295-296, 342-343, 381-382, 384-385, 390-391, 471-472, 508-514, 585-586, 608-623, 626, 660-661, 664, 705-709, 716-717, 720-721, 726-727, 738-761, 770-771, 788-808, 812-833, 836-842, 845-851, 854-860, 863-869, 872-882, 885-891, 894-901, 915-924, 927-933, 936-937, 940-941, 960-961, 984-1024, 1031-1043, 1049-1076, 1079-1089, 1121-1122, 1147-1148, 1153, 1168-1184, 1198, 1202-1210, 1241-1242, 1261-1264, 1268-1269, 1271-1272, 1306-1308, 1312-1333, 1338-1339, 1347-1348, 1350-1351, 1445-1446, 1458-1459, 1464, 1487-1492, 1539, 1560-1561, 1570, 1572-1588, 1593, 1639-1640, 1652-1663, 1709-1722, 1767, 1773-1777, 1798-1813, 1816-1817, 1836-1839, 1875-1894, 1926, 1969-1970, 1976-2002, 2223-2224, 2261-2262, 2265-2266, 2282-2285, 2288-2289, 2309-2310, 2313-2314, 2326-2336, 2356-2357, 2360-2367, 2371-2372, 2386, 2394, 2399, 2404-2423, 2426-2435, 2442-2447, 2465-2466, 2469-2470, 2477-2478, 2517-2518, 2589-2590, 2593-2594, 2597-2600, 2603-2604, 2607-2608, 2611-2612, 2615-2616, 2619-2623, 2632-2641, 2650-2661, 1331, 2406-2427
packages/controllers/src/controllers/ApiController.ts 94.81% 96.53% 86.44% 94.81% 121-122, 184, 194-197, 272-273, 508-516, 543, 557, 561, 565, 205
packages/controllers/src/controllers/ConnectionController.ts 84.54% 87.6% 53.84% 84.54% 171, 229-233, 236-240, 282-286, 294-295, 302-321, 336, 340, 344, 348, 352, 356, 360, 364, 368, 445, 449, 471-475, 490-492, 503-504, 539-540, 550-551, 553-554, 562-563, 565-566, 585-586
packages/controllers/src/controllers/ConnectorController.ts 86.7% 97.67% 74.6% 86.7% 61-63, 81-82, 128-130, 141, 196-197, 223-231, 301-321, 338-343, 419, 423
packages/scaffold-ui/src/partials/w3m-connecting-wc-browser/index.ts 83.05% 46.15% 75% 83.05% 20-21, 46-47, 56, 63-67
packages/scaffold-ui/src/partials/w3m-connector-list/index.ts 69.63% 83.6% 63.63% 69.63% 72, 75-77, 82-86, 90-91, 233, 278-332, 367-408, 97-363
packages/scaffold-ui/src/views/w3m-connecting-external-view/index.ts 71.42% 65.21% 71.42% 71.42% 38-39, 65-78, 85-86, 104-105, 108-127, 178
packages/scaffold-ui/src/views/w3m-email-verify-otp-view/index.ts 70.21% 81.81% 50% 70.21% 34-35, 58-64, 68-72
Generated in workflow #16184 for commit 130589f by the Vitest Coverage Report Action

@enesozturk enesozturk requested a review from a team November 4, 2025 06:59
@lukaisailovic
Copy link
Collaborator

@enesozturk Why don't we use ConnectionController and emit the event at the end of the flow?

@github-actions
Copy link
Contributor

github-actions bot commented Nov 5, 2025

Warnings
⚠️

🌐 Non-company domain introduced (host: example.com) in packages/controllers/tests/controllers/ConnectorController.test.ts (line 479): https://example.com/metamask.png

Generated by 🚫 dangerJS against 130589f

@enesozturk enesozturk enabled auto-merge November 5, 2025 08:05
@enesozturk enesozturk added this pull request to the merge queue Nov 5, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Nov 5, 2025
@enesozturk enesozturk added this pull request to the merge queue Nov 7, 2025
Merged via the queue into main with commit f91a5d9 Nov 7, 2025
63 of 64 checks passed
@enesozturk enesozturk deleted the chore/remove-connect-success-event-from-ui branch November 7, 2025 11:04
@github-actions github-actions bot locked and limited conversation to collaborators Nov 7, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants