Skip to content

Conversation

@joaquim-verges
Copy link
Member

@joaquim-verges joaquim-verges commented Nov 12, 2025


PR-Codex overview

This PR updates the onConnect callback in the AutoConnect component to improve clarity in the variable names, changing otherWallets to allConnectedWallets and updating the corresponding console log message.

Detailed summary

  • Changed parameter name in onConnect from otherWallets to allConnectedWallets.
  • Updated the console log message to reflect the new parameter name, changing from "other wallets that were also connected" to "all connected wallets".

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

Summary by CodeRabbit

  • Breaking Changes
    • Renamed the second parameter in the onConnect callback from "otherWallets" to "allConnectedWallets" (update any AutoConnect callback usage and examples accordingly).

@vercel
Copy link

vercel bot commented Nov 12, 2025

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

Project Deployment Preview Comments Updated (UTC)
docs-v2 Ready Ready Preview Comment Nov 12, 2025 10:54pm
nebula Ready Ready Preview Comment Nov 12, 2025 10:54pm
thirdweb_playground Ready Ready Preview Comment Nov 12, 2025 10:54pm
thirdweb-www Ready Ready Preview Comment Nov 12, 2025 10:54pm
wallet-ui Ready Ready Preview Comment Nov 12, 2025 10:54pm

@changeset-bot
Copy link

changeset-bot bot commented Nov 12, 2025

⚠️ No Changeset found

Latest commit: 9442dc7

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

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 12, 2025

Walkthrough

The onConnect callback signature in AutoConnectProps was updated: the second parameter is renamed from otherWallets to allConnectedWallets. Types and runtime behavior are unchanged; documentation examples were updated to use the new parameter name.

Changes

Cohort / File(s) Summary
AutoConnect callback parameter rename
packages/thirdweb/src/wallets/connection/types.ts
Renamed second parameter of onConnect from otherWallets to allConnectedWallets in the AutoConnectProps type definition; updated documentation examples to reflect the new parameter name.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~5–10 minutes

  • Single public API parameter rename with matching doc/example updates.
  • Check for any additional references/usages across the repo (examples, tests, consumers) to ensure all call sites compile and use the new name.

Pre-merge checks and finishing touches

❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Description check ❓ Inconclusive The PR description includes context and explanation of changes but lacks key template sections like the issue tag, notes for reviewer, and testing information. Consider adding the issue tag (format TEAM-0000), specific notes for reviewers, and details on how the change was tested (unit tests, playground, etc.).
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: renaming the otherWallets parameter to allConnectedWallets in the onConnect callback, which is exactly what the changeset accomplishes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch _SDK_Rename_otherWallets_to_allConnectedWallets_in_onConnect_callback

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between f818d2b and 9442dc7.

📒 Files selected for processing (1)
  • packages/thirdweb/src/wallets/connection/types.ts (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • packages/thirdweb/src/wallets/connection/types.ts
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: Size
  • GitHub Check: Lint Packages
  • GitHub Check: Unit Tests
  • GitHub Check: Analyze (javascript)

Warning

Review ran into problems

🔥 Problems

Errors were encountered while retrieving linked issues.

Errors (1)
  • TEAM-0000: Entity not found: Issue - Could not find referenced Issue.

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

@github-actions github-actions bot added packages SDK Involves changes to the thirdweb SDK labels Nov 12, 2025
Copy link
Member Author


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • merge-queue - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

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

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 6897871 and f818d2b.

📒 Files selected for processing (1)
  • packages/thirdweb/src/wallets/connection/types.ts (1 hunks)
🧰 Additional context used
📓 Path-based instructions (3)
**/*.{ts,tsx}

📄 CodeRabbit inference engine (CLAUDE.md)

**/*.{ts,tsx}: Write idiomatic TypeScript with explicit function declarations and return types
Limit each file to one stateless, single-responsibility function for clarity
Re-use shared types from @/types or local types.ts barrels
Prefer type aliases over interface except for nominal shapes
Avoid any and unknown unless unavoidable; narrow generics when possible
Choose composition over inheritance; leverage utility types (Partial, Pick, etc.)
Comment only ambiguous logic; avoid restating TypeScript in prose

Files:

  • packages/thirdweb/src/wallets/connection/types.ts
**/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (CLAUDE.md)

Load heavy dependencies inside async paths to keep initial bundle lean (lazy loading)

Files:

  • packages/thirdweb/src/wallets/connection/types.ts
packages/thirdweb/src/wallets/**

📄 CodeRabbit inference engine (CLAUDE.md)

packages/thirdweb/src/wallets/**: Unified Wallet and Account interfaces in wallet architecture
Support for in-app wallets (social/email login)
Smart wallets with account abstraction
EIP-1193, EIP-5792, EIP-7702 standard support in wallet modules

Files:

  • packages/thirdweb/src/wallets/connection/types.ts
🧠 Learnings (2)
📚 Learning: 2025-07-18T19:19:55.613Z
Learnt from: CR
Repo: thirdweb-dev/js PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T19:19:55.613Z
Learning: Applies to packages/thirdweb/src/wallets/** : Unified `Wallet` and `Account` interfaces in wallet architecture

Applied to files:

  • packages/thirdweb/src/wallets/connection/types.ts
📚 Learning: 2025-07-18T19:19:55.613Z
Learnt from: CR
Repo: thirdweb-dev/js PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T19:19:55.613Z
Learning: Applies to packages/thirdweb/src/wallets/** : EIP-1193, EIP-5792, EIP-7702 standard support in wallet modules

Applied to files:

  • packages/thirdweb/src/wallets/connection/types.ts
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (8)
  • GitHub Check: E2E Tests (pnpm, webpack)
  • GitHub Check: Lint Packages
  • GitHub Check: E2E Tests (pnpm, vite)
  • GitHub Check: Unit Tests
  • GitHub Check: E2E Tests (pnpm, esbuild)
  • GitHub Check: Build Packages
  • GitHub Check: Size
  • GitHub Check: Analyze (javascript)

Comment on lines +104 to +111
* onConnect={(activeWallet, allConnectedWallets) => {
* console.log("auto connected to", activeWallet)
* console.log("other wallets that were also connected", otherWallets)
* console.log("all connected wallets", allConnectedWallets)
* }}
* />
* ```
*/
onConnect?: (activeWallet: Wallet, otherWallets: Wallet[]) => void;
onConnect?: (activeWallet: Wallet, allConnectedWallets: Wallet[]) => void;
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

Verify semantic accuracy and breaking change impact.

This rename from otherWallets to allConnectedWallets is a breaking change for TypeScript users. The new name implies the array contains ALL connected wallets, but it's unclear whether this includes the activeWallet or only the other wallets (excluding the active one).

Please clarify:

  1. Does allConnectedWallets include the activeWallet parameter, or does it contain only the other connected wallets (excluding the active one)?
  2. If it includes the active wallet, consider adding a JSDoc comment to clarify this behavior.
  3. Ensure all call sites across the codebase have been updated to use the new parameter name.

🏁 Script executed:

#!/bin/bash
# Verify all references to the old parameter name have been updated

# Search for any remaining references to 'otherWallets' in the context of onConnect
rg -n --type ts --type tsx -C 3 'otherWallets'

# Search for all implementations/call sites of the onConnect callback
ast-grep --pattern $'onConnect: ($_, $_) => {
  $$$
}'

# Search for all usages of AutoConnectProps to ensure consistency
rg -n --type ts --type tsx -C 3 'AutoConnectProps'

Length of output: 55


🏁 Script executed:

#!/bin/bash
# Verify all references to the old parameter name have been updated
# Using glob patterns instead of --type flags

# Search for any remaining references to 'otherWallets'
rg -n -C 3 'otherWallets' -g '*.ts' -g '*.tsx'

# Search for onConnect callback usages and implementations
rg -n -C 5 'onConnect' -g '*.ts' -g '*.tsx' | head -100

# Search for AutoConnectProps usages
rg -n -C 3 'AutoConnectProps' -g '*.ts' -g '*.tsx'

Length of output: 21928


🏁 Script executed:

#!/bin/bash
# Find where onConnect callback is actually invoked in autoConnectCore.ts

rg -n -C 10 'props.onConnect' -g '*.ts' -g '*.tsx' | head -200

Length of output: 20554


🏁 Script executed:

#!/bin/bash
# Search for onConnect callback invocation specifically in autoConnectCore.ts
# Look for where the callback is actually called

rg -n 'manager\.onConnect\|props\.onConnect' packages/thirdweb/src/wallets/connection/autoConnectCore.ts -C 15

# Also check the manager onConnect method definition
rg -n 'onConnect' packages/thirdweb/src/wallets/manager/index.ts -C 5

Length of output: 1262


🏁 Script executed:

#!/bin/bash
# Find where onConnect callback is actually invoked in autoConnectCore.ts
rg -n -A 5 -B 5 'handleWalletConnection' packages/thirdweb/src/wallets/connection/autoConnectCore.ts | head -80

# Also check the handleWalletConnection function signature
rg -n -A 10 'const handleWalletConnection' packages/thirdweb/src/wallets/connection/autoConnectCore.ts

Length of output: 1119


Update variable naming in autoConnectCore.ts to match new parameter semantics.

The type definition parameter was renamed from otherWallets to allConnectedWallets, but the internal variable in autoConnectCore.ts (line 172) is still named otherWallets. While the actual callback receives the correct data (all connected wallets) through manager.connect(), this naming mismatch creates confusion.

Rename otherWallets to better reflect that it contains wallets other than the active one being connected, or document why this distinction is maintained internally. The parameter name change to allConnectedWallets should be consistently reflected throughout the codebase for clarity.

🤖 Prompt for AI Agents
In packages/thirdweb/src/wallets/connection/autoConnectCore.ts around line 172,
rename the internal variable currently named otherWallets to allConnectedWallets
(or another clearer name like otherConnectedWallets if you want to emphasize
"other than active") and update every reference/usage in that file so it matches
the onConnect type signature in types.ts; ensure the value passed into the
onConnect callback and any local documentation/comments reflect the new name to
avoid confusion.

@github-actions
Copy link
Contributor

github-actions bot commented Nov 12, 2025

size-limit report 📦

Path Size
@thirdweb-dev/nexus (esm) 104.88 KB (0%)
@thirdweb-dev/nexus (cjs) 316.6 KB (0%)

@codecov
Copy link

codecov bot commented Nov 12, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 54.82%. Comparing base (6c4e684) to head (9442dc7).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8407      +/-   ##
==========================================
- Coverage   54.83%   54.82%   -0.01%     
==========================================
  Files         919      919              
  Lines       60844    60844              
  Branches     4135     4136       +1     
==========================================
- Hits        33364    33359       -5     
- Misses      27379    27383       +4     
- Partials      101      102       +1     
Flag Coverage Δ
packages 54.82% <ø> (-0.01%) ⬇️
see 3 files with indirect coverage changes
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@graphite-app
Copy link
Contributor

graphite-app bot commented Nov 12, 2025

Merge activity

#8407)

<!--

## title your PR with this format: "[SDK/Dashboard/Portal] Feature/Fix: Concise title for the changes"

If you did not copy the branch name from Linear, paste the issue tag here (format is TEAM-0000):

## Notes for the reviewer

Anything important to call out? Be sure to also clarify these in your comments.

## How to test

Unit tests, playground, etc.

-->

<!-- start pr-codex -->

---

## PR-Codex overview
This PR focuses on updating the `onConnect` callback in the `AutoConnect` component to improve clarity in variable naming, changing `otherWallets` to `allConnectedWallets`.

### Detailed summary
- Changed the parameter name in `onConnect` from `otherWallets` to `allConnectedWallets`.
- Updated the console log statement to reflect the new parameter name, changing it from "other wallets that were also connected" to "all connected wallets".

> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`

<!-- end pr-codex -->

<!-- This is an auto-generated comment: release notes by coderabbit.ai -->

## Summary by CodeRabbit

* **Breaking Changes**
  * Updated parameter naming in the AutoConnect callback configuration to align with updated documentation.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

packages SDK Involves changes to the thirdweb SDK

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants