Skip to content

Conversation

@premiumjibles
Copy link
Contributor

@premiumjibles premiumjibles commented Dec 1, 2025

Summary by CodeRabbit

Release Notes

  • New Features
    • Added multi-network wallet support for Ethereum and Solana with independent connection management per network.
    • Introduced wallet dropdown menu displaying connected networks with per-network actions (connect, disconnect, copy address).
    • Added visual indicators showing which networks are currently connected.
    • Implemented copy-to-clipboard functionality for wallet addresses with user feedback.

✏️ Tip: You can customize this high-level summary in your review settings.

@vercel
Copy link

vercel bot commented Dec 1, 2025

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

Project Deployment Preview Comments Updated (UTC)
shapeshift-agentic Ready Ready Preview Comment Dec 1, 2025 10:20pm

@coderabbitai
Copy link

coderabbitai bot commented Dec 1, 2025

Warning

Rate limit exceeded

@premiumjibles has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 4 minutes and 25 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between fc2b2a6 and 7042da8.

📒 Files selected for processing (2)
  • apps/agentic-chat/src/components/Portfolio/NetworkWalletRow.tsx (1 hunks)
  • apps/agentic-chat/src/components/Portfolio/PortfolioDrawer.tsx (5 hunks)
📝 Walkthrough

Walkthrough

Introduces a new NetworkWalletRow component for rendering individual network wallet actions, and updates PortfolioDrawer to support multi-network wallet management (EVM and Solana) with a dropdown menu interface, per-network connect/disconnect/copy actions, and wallet icon rendering.

Changes

Cohort / File(s) Summary
New NetworkWalletRow component
apps/agentic-chat/src/components/Portfolio/NetworkWalletRow.tsx
New React component rendering a labeled wallet row with optional separator. Displays truncated address with Copy and Disconnect buttons when connected; shows Connect button when disconnected. Accepts label, address, icon, isConnected state, and callback handlers (onConnect, onDisconnect, onCopy).
Multi-network wallet handling in PortfolioDrawer
apps/agentic-chat/src/components/Portfolio/PortfolioDrawer.tsx
Updates component to manage EVM (eip155) and Solana accounts with separate connect/disconnect flows. Replaces simple address display with DropdownMenu showing combined or individual network icons. Adds per-network wallet actions via NetworkWalletRow components, per-network wallet info retrieval, copy-to-clipboard functionality with toast feedback, and cross-network switch-on-disconnect behavior.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20–25 minutes

  • NetworkWalletRow component design: Verify prop contracts, callback semantics, and UI consistency with existing Button/Icon primitives
  • Multi-network state management: Review EVM/Solana account separation logic, state transitions, and conditional rendering in PortfolioDrawer
  • Icon rendering per-network: Confirm icon logic for single vs. combined network display
  • Copy and disconnect flows: Validate clipboard handling, toast integration, and cross-network behavior on disconnect

Possibly related PRs

Poem

🐰 Wallets hop across the blockchain fields,
EVM and Solana, their connections sealed!
Copy, connect, disconnect with glee—
Multi-network magic, quick as can be!

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main change: adding proper multi-network management to the drawer component, which aligns with the primary modifications to PortfolioDrawer.tsx for handling EVM and Solana accounts.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

Copy link

@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

🧹 Nitpick comments (2)
apps/agentic-chat/src/components/Portfolio/NetworkWalletRow.tsx (1)

35-35: Unused group class.

The group class is applied but no group-* utilities are used in the child elements. If this was intended for hover state styling, consider adding the relevant group utilities or removing the unused class.

apps/agentic-chat/src/components/Portfolio/PortfolioDrawer.tsx (1)

90-92: Consider memoizing blockie generation.

makeBlockie is called on every render. While likely fast, the blockies could be memoized since they only change when addresses change.

+import { useMemo } from 'react'
+
 // In component:
-const evmBlockie = evmAccount.address ? makeBlockie(evmAccount.address) : undefined
-const solanaBlockie = solanaAccount.address ? makeBlockie(solanaAccount.address) : undefined
+const evmBlockie = useMemo(
+  () => evmAccount.address ? makeBlockie(evmAccount.address) : undefined,
+  [evmAccount.address]
+)
+const solanaBlockie = useMemo(
+  () => solanaAccount.address ? makeBlockie(solanaAccount.address) : undefined,
+  [solanaAccount.address]
+)
📜 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 c38d6b6 and c111880.

⛔ Files ignored due to path filters (1)
  • bun.lock is excluded by !**/*.lock
📒 Files selected for processing (3)
  • apps/agentic-chat/package.json (1 hunks)
  • apps/agentic-chat/src/components/Portfolio/NetworkWalletRow.tsx (1 hunks)
  • apps/agentic-chat/src/components/Portfolio/PortfolioDrawer.tsx (4 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
apps/agentic-chat/src/components/Portfolio/PortfolioDrawer.tsx (4)
apps/agentic-chat/src/lib/utils.ts (1)
  • truncateAddress (9-12)
apps/agentic-chat/src/components/ui/sheet.tsx (2)
  • Sheet (103-103)
  • SheetContent (103-103)
apps/agentic-chat/src/components/ui/dropdown-menu.tsx (3)
  • DropdownMenu (204-204)
  • DropdownMenuTrigger (206-206)
  • DropdownMenuContent (207-207)
apps/agentic-chat/src/components/Portfolio/NetworkWalletRow.tsx (1)
  • NetworkWalletRow (20-68)
⏰ 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). (1)
  • GitHub Check: main
🔇 Additional comments (5)
apps/agentic-chat/src/components/Portfolio/NetworkWalletRow.tsx (1)

20-67: Well-structured reusable component.

The NetworkWalletRow component cleanly encapsulates the per-network wallet display logic with proper conditional rendering for connected/disconnected states. The defensive check on line 46 (address && onCopy(address)) correctly handles the optional address.

apps/agentic-chat/src/components/Portfolio/PortfolioDrawer.tsx (3)

36-38: Verify which address is displayed when both networks are connected.

The address from the default useAppKitAccount() (line 36) is used for truncatedAddress display (line 88, shown on line 121). When both EVM and Solana wallets are connected, which address is shown may be ambiguous or depend on the last active namespace.

Consider showing the primary/active network address explicitly or displaying both addresses in the trigger button.

Also applies to: 88-88, 121-121


64-80: Good UX pattern for network switching on disconnect.

The disconnect handlers correctly capture the other network's connection state before the async disconnect, then switch to the remaining connected network. This provides a smooth user experience when managing multiple networks.


100-147: Clean dropdown implementation for multi-network wallet management.

The conditional UI logic for displaying stacked blockies when both networks are connected vs. a single wallet icon is a nice UX touch. The NetworkWalletRow components are correctly wired with all required props.

apps/agentic-chat/package.json (1)

38-38: New dependency for blockie generation is appropriate and secure.

The ethereum-blockies-base64 package (v1.0.2) is a mature, lightweight library with MIT license, a single dependency, and no reported security vulnerabilities. The caret versioning constraint is safe for this stable package.

Copy link

@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

♻️ Duplicate comments (1)
apps/agentic-chat/src/components/Portfolio/PortfolioDrawer.tsx (1)

82-86: Missing error handling for clipboard operation.

The navigator.clipboard.writeText can reject if clipboard permissions are denied. This was already flagged in a previous review.

🧹 Nitpick comments (2)
apps/agentic-chat/src/components/Portfolio/PortfolioDrawer.tsx (2)

64-80: Consider adding error handling for disconnect and network switch operations.

Both handlers ignore potential errors from disconnect() and modal?.switchNetwork(). If these operations fail, the UI may not reflect the actual wallet state.

 const handleDisconnectEvm = () => {
   const solanaWasConnected = solanaAccount.isConnected
-  void disconnect({ namespace: 'eip155' }).then(() => {
-    if (solanaWasConnected) {
-      void modal?.switchNetwork(solana)
-    }
-  })
+  void disconnect({ namespace: 'eip155' })
+    .then(() => {
+      if (solanaWasConnected) {
+        void modal?.switchNetwork(solana)
+      }
+    })
+    .catch(() => {
+      toast.error('Failed to disconnect EVM wallet')
+    })
 }

 const handleDisconnectSolana = () => {
   const evmWasConnected = evmAccount.isConnected
-  void disconnect({ namespace: 'solana' }).then(() => {
-    if (evmWasConnected) {
-      void modal?.switchNetwork(mainnet)
-    }
-  })
+  void disconnect({ namespace: 'solana' })
+    .then(() => {
+      if (evmWasConnected) {
+        void modal?.switchNetwork(mainnet)
+      }
+    })
+    .catch(() => {
+      toast.error('Failed to disconnect Solana wallet')
+    })
 }

121-121: Consider clarifying which address is displayed when both networks are connected.

When both EVM and Solana are connected, truncatedAddress shows the address from the generic useAppKitAccount() hook (line 36), but it's unclear to users which network's address this represents. Consider either:

  • Showing both truncated addresses
  • Adding a network indicator (e.g., "EVM: 0x1234...")
  • Showing a count like "2 wallets connected"
📜 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 c111880 and fc2b2a6.

⛔ Files ignored due to path filters (1)
  • bun.lock is excluded by !**/*.lock
📒 Files selected for processing (3)
  • apps/agentic-chat/package.json (1 hunks)
  • apps/agentic-chat/src/components/Portfolio/NetworkWalletRow.tsx (1 hunks)
  • apps/agentic-chat/src/components/Portfolio/PortfolioDrawer.tsx (4 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • apps/agentic-chat/src/components/Portfolio/NetworkWalletRow.tsx
🧰 Additional context used
🧬 Code graph analysis (1)
apps/agentic-chat/src/components/Portfolio/PortfolioDrawer.tsx (4)
apps/agentic-chat/src/lib/utils.ts (1)
  • truncateAddress (9-12)
apps/agentic-chat/src/components/ui/sheet.tsx (2)
  • Sheet (103-103)
  • SheetContent (103-103)
apps/agentic-chat/src/components/ui/dropdown-menu.tsx (3)
  • DropdownMenu (204-204)
  • DropdownMenuTrigger (206-206)
  • DropdownMenuContent (207-207)
apps/agentic-chat/src/components/Portfolio/NetworkWalletRow.tsx (1)
  • NetworkWalletRow (20-68)
⏰ 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). (1)
  • GitHub Check: main
🔇 Additional comments (1)
apps/agentic-chat/src/components/Portfolio/PortfolioDrawer.tsx (1)

127-145: LGTM!

Clean integration of NetworkWalletRow components with proper props for each network. The showSeparator on the Solana row provides good visual distinction between network sections.

@premiumjibles premiumjibles merged commit 3775440 into main Dec 1, 2025
4 checks passed
@premiumjibles premiumjibles deleted the multi-wallet-drawer branch December 1, 2025 22:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants