Skip to content

Conversation

@joaquim-verges
Copy link
Member

@joaquim-verges joaquim-verges commented Oct 3, 2025


PR-Codex overview

This PR focuses on enhancing the user interface and functionality of the in-app wallet management components, including improved styling and the addition of new features for better user experience.

Detailed summary

  • Updated styles for SelectTrigger and Input components to use bg-background.
  • Wrapped SingleNetworkSelector and CreateServerWallet in a flex container for better layout.
  • Removed redundant CreateServerWallet instances.
  • Added UserIcon to the InAppWalletUsersPageContent.
  • Refined the layout structure and styling in the InAppWalletUsersPageContent.
  • Introduced pagination for server wallets with a new API call for fetching wallets.
  • Separated sections for server wallets and user wallets in the main page layout.

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

Summary by CodeRabbit

  • New Features

    • Added Server Wallets table powered by vault data with pagination.
    • Restored “User wallets” section below server wallets.
  • UI

    • Introduced a cohesive header card with a User icon, updated title/subtitle, and right-aligned search/actions.
    • Rounded, pill-style search input and buttons; refreshed Download CSV button styling.
    • Consolidated “Create Server Wallet” next to the network selector; removed duplicates from empty/footers.
    • Updated table borders and spacing for a cleaner look.
  • Changes

    • Page now supports a page query parameter for pagination.

@changeset-bot
Copy link

changeset-bot bot commented Oct 3, 2025

⚠️ No Changeset found

Latest commit: a8a7311

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 vercel bot temporarily deployed to Preview – wallet-ui October 3, 2025 00:13 Inactive
@vercel vercel bot temporarily deployed to Preview – docs-v2 October 3, 2025 00:13 Inactive
@vercel
Copy link

vercel bot commented Oct 3, 2025

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

Project Deployment Preview Comments Updated (UTC)
thirdweb-www Ready Ready Preview Comment Oct 3, 2025 0:21am
4 Skipped Deployments
Project Deployment Preview Comments Updated (UTC)
docs-v2 Skipped Skipped Oct 3, 2025 0:21am
nebula Skipped Skipped Oct 3, 2025 0:21am
thirdweb_playground Skipped Skipped Oct 3, 2025 0:21am
wallet-ui Skipped Skipped Oct 3, 2025 0:21am

@vercel vercel bot temporarily deployed to Preview – thirdweb_playground October 3, 2025 00:13 Inactive
@vercel vercel bot temporarily deployed to Preview – nebula October 3, 2025 00:13 Inactive
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 3, 2025

Walkthrough

Introduces server-side vault integration and pagination to the wallets page, restructures UI layouts for user and server wallet sections, centralizes CreateServerWallet alongside the network selector, and applies rounded styling updates to search inputs and buttons. No public API changes except Page props adding optional searchParams.page.

Changes

Cohort / File(s) Summary of Changes
Search input styling
apps/dashboard/src/@/components/in-app-wallet-users-content/AdvancedSearchInput.tsx
Adjusted visual classes: rounded-full/rounded-l-full/rounded-r-full and bg-background on select/inputs/button. No behavior changes.
User wallets header/layout
apps/dashboard/src/@/components/in-app-wallet-users-content/in-app-wallet-users-content.tsx
New header card with UserIcon, updated title/subtitle, repositioned AdvancedSearchInput to right column, updated button styling, and adjusted table/bottom container borders/radii. Functionality unchanged.
Server wallets table header/actions
apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/transactions/server-wallets/wallet-table/wallet-table-ui.client.tsx
Moved CreateServerWallet next to SingleNetworkSelector in header. Removed CreateServerWallet from empty state and footer when wallets exist. Presentation/conditional rendering updated only.
Wallets page data flow and pagination
apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/wallets/page.tsx
Added vault client integration (createVaultClient, listEoas), parallel project fetch, managementAccessToken derivation, pagination via searchParams.page (size 5), conditional render of ServerWalletsTable with vault data/error handling, and reintroduced User wallets section below. Page props now include optional searchParams.page.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  participant B as Browser
  participant P as Next.js Page (wallets/page.tsx)
  participant EC as EngineCloud (mgmt token)
  participant VS as Vault SDK (createVaultClient, listEoas)
  participant PS as Project Service (getProject)
  participant SWT as ServerWalletsTable
  participant UWC as InAppWalletUsersPageContent

  B->>P: Request /wallets?page=N
  par Parallel fetch
    P->>PS: getProject(team_slug, project_slug)
    P->>EC: derive managementAccessToken
  end
  P->>VS: createVaultClient(project, managementAccessToken)
  alt vault client and token available
    P->>VS: listEoas({ pageSize: 5, page: N })
    VS-->>P: { wallets, totalPages, totalRecords } or error
  else unavailable
    P-->>P: Fallback to empty wallets data
  end
  P->>SWT: Render with { currentPage, totalPages, totalRecords, wallets, error? }
  P->>UWC: Render User wallets section
  SWT-->>B: Server wallets UI
  UWC-->>B: User wallets UI
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Pre-merge checks and finishing touches

❌ Failed checks (2 warnings)
Check name Status Explanation Resolution
Description Check ⚠️ Warning The PR description leaves the template comments in place and does not populate the required “## Notes for the reviewer” or “## How to test” sections, instead providing only a PR-Codex overview. Replace the commented template with actual headings and content by adding a “## Notes for the reviewer” section with key review points and a “## How to test” section describing steps or tests to validate the changes.
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 (1 passed)
Check name Status Explanation
Title Check ✅ Passed The title succinctly describes the primary change of relocating server wallet sections into the wallets tab within the Dashboard and follows the “[Dashboard] …” prefix convention without extraneous details.
✨ Finishing touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch _Dashboard_Redesign_wallet_UI_with_rounded_elements_and_improved_layout

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 the Dashboard Involves changes to the Dashboard. label Oct 3, 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.

@joaquim-verges joaquim-verges changed the title [Dashboard] Redesign wallet UI with rounded elements and improved layout [Dashboard] Move server wallet sections to wallets tab Oct 3, 2025
@joaquim-verges joaquim-verges marked this pull request as ready for review October 3, 2025 00:13
@joaquim-verges joaquim-verges requested review from a team as code owners October 3, 2025 00:13
Comment on lines +80 to +81
// @ts-expect-error - TODO: fix this
page_size: pageSize,
Copy link
Contributor

Choose a reason for hiding this comment

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

The @ts-expect-error suppression suggests a type mismatch between the parameter name used (page_size) and what the Vault SDK expects. Consider checking the SDK documentation for the correct parameter naming convention - it might be pageSize (camelCase) rather than page_size (snake_case). Addressing this type error would improve code maintainability and prevent potential runtime issues.

Suggested change
// @ts-expect-error - TODO: fix this
page_size: pageSize,
pageSize,

Spotted by Diamond

Fix in Graphite


Is this helpful? React 👍 or 👎 to let us know.

This comment came from an experimental review—please leave feedback if it was helpful/unhelpful. Learn more about experimental comments here.

@codecov
Copy link

codecov bot commented Oct 3, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 56.29%. Comparing base (00b8adf) to head (a8a7311).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #8174   +/-   ##
=======================================
  Coverage   56.29%   56.29%           
=======================================
  Files         906      906           
  Lines       59209    59209           
  Branches     4182     4182           
=======================================
  Hits        33330    33330           
  Misses      25774    25774           
  Partials      105      105           
Flag Coverage Δ
packages 56.29% <ø> (ø)
🚀 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.

@github-actions
Copy link
Contributor

github-actions bot commented Oct 3, 2025

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
thirdweb (esm) 64.6 KB (0%) 1.3 s (0%) 469 ms (+146.85% 🔺) 1.8 s
thirdweb (cjs) 365.75 KB (0%) 7.4 s (0%) 1.9 s (+10.16% 🔺) 9.2 s
thirdweb (minimal + tree-shaking) 5.73 KB (0%) 115 ms (0%) 215 ms (+2711.93% 🔺) 330 ms
thirdweb/chains (tree-shaking) 526 B (0%) 11 ms (0%) 104 ms (+2666.46% 🔺) 115 ms
thirdweb/react (minimal + tree-shaking) 19.13 KB (0%) 383 ms (0%) 218 ms (+2249.63% 🔺) 601 ms

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

🧹 Nitpick comments (1)
apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/wallets/page.tsx (1)

67-83: Sanitize the requested page number.

Number.parseInt can yield NaN or values ≤ 0, which then sends null/negative pages to the vault API. Clamp to at least 1 (and prefer base 10 parsing) so we always request valid pages.

-  const pageSize = 5;
-  const currentPage = Number.parseInt(searchParams.page ?? "1");
+  const pageSize = 5;
+  const parsedPage = Number.parseInt(searchParams.page ?? "1", 10);
+  const currentPage = Number.isFinite(parsedPage) && parsedPage > 0 ? parsedPage : 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 00b8adf and a8a7311.

📒 Files selected for processing (4)
  • apps/dashboard/src/@/components/in-app-wallet-users-content/AdvancedSearchInput.tsx (3 hunks)
  • apps/dashboard/src/@/components/in-app-wallet-users-content/in-app-wallet-users-content.tsx (4 hunks)
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/transactions/server-wallets/wallet-table/wallet-table-ui.client.tsx (1 hunks)
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/wallets/page.tsx (5 hunks)
🧰 Additional context used
📓 Path-based instructions (5)
**/*.{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

**/*.{ts,tsx}: Use explicit function declarations and explicit return types in TypeScript
Limit each file to one stateless, single‑responsibility function
Re‑use shared types from @/types where applicable
Prefer type aliases over interface except for nominal shapes
Avoid any and unknown unless unavoidable; narrow generics when possible
Prefer composition over inheritance; use utility types (Partial, Pick, etc.)
Lazy‑import optional features and avoid top‑level side‑effects to reduce bundle size

Files:

  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/transactions/server-wallets/wallet-table/wallet-table-ui.client.tsx
  • apps/dashboard/src/@/components/in-app-wallet-users-content/AdvancedSearchInput.tsx
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/wallets/page.tsx
  • apps/dashboard/src/@/components/in-app-wallet-users-content/in-app-wallet-users-content.tsx
**/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (CLAUDE.md)

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

Files:

  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/transactions/server-wallets/wallet-table/wallet-table-ui.client.tsx
  • apps/dashboard/src/@/components/in-app-wallet-users-content/AdvancedSearchInput.tsx
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/wallets/page.tsx
  • apps/dashboard/src/@/components/in-app-wallet-users-content/in-app-wallet-users-content.tsx
apps/{dashboard,playground-web}/**/*.{ts,tsx}

📄 CodeRabbit inference engine (CLAUDE.md)

apps/{dashboard,playground-web}/**/*.{ts,tsx}: Import UI primitives from @/components/ui/* (Button, Input, Select, Tabs, Card, Sidebar, Badge, Separator) in dashboard and playground apps
Use NavLink for internal navigation with automatic active states in dashboard and playground apps
Use Tailwind CSS only – no inline styles or CSS modules
Use cn() from @/lib/utils for conditional class logic
Use design system tokens (e.g., bg-card, border-border, text-muted-foreground)
Server Components (Node edge): Start files with import "server-only";
Client Components (browser): Begin files with 'use client';
Always call getAuthToken() to retrieve JWT from cookies on server side
Use Authorization: Bearer header – never embed tokens in URLs
Return typed results (e.g., Project[], User[]) – avoid any
Wrap client-side data fetching calls in React Query (@tanstack/react-query)
Use descriptive, stable queryKeys for React Query cache hits
Configure staleTime/cacheTime in React Query based on freshness (default ≥ 60s)
Keep tokens secret via internal API routes or server actions
Never import posthog-js in server components

Files:

  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/transactions/server-wallets/wallet-table/wallet-table-ui.client.tsx
  • apps/dashboard/src/@/components/in-app-wallet-users-content/AdvancedSearchInput.tsx
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/wallets/page.tsx
  • apps/dashboard/src/@/components/in-app-wallet-users-content/in-app-wallet-users-content.tsx
apps/{dashboard,playground}/**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

apps/{dashboard,playground}/**/*.{ts,tsx}: Import UI primitives from @/components/ui/_ (e.g., Button, Input, Tabs, Card)
Use NavLink for internal navigation to get active state handling
Use Tailwind CSS for styling; no inline styles
Merge class names with cn() from @/lib/utils for conditional classes
Stick to design tokens (e.g., bg-card, border-border, text-muted-foreground)
Server Components must start with import "server-only"; use next/headers, server‑only env, heavy data fetching, and redirect() where appropriate
Client Components must start with 'use client'; handle interactivity with hooks and browser APIs
Server-side data fetching: call getAuthToken() from cookies, send Authorization: Bearer <token> header, and return typed results (avoid any)
Client-side data fetching: wrap calls in React Query with descriptive, stable queryKeys and set sensible staleTime/cacheTime (≥ 60s default); keep tokens secret via internal routes or server actions
Do not import posthog-js in server components (client-side only)

Files:

  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/transactions/server-wallets/wallet-table/wallet-table-ui.client.tsx
  • apps/dashboard/src/@/components/in-app-wallet-users-content/AdvancedSearchInput.tsx
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/wallets/page.tsx
  • apps/dashboard/src/@/components/in-app-wallet-users-content/in-app-wallet-users-content.tsx
apps/{dashboard,playground}/**/*.tsx

📄 CodeRabbit inference engine (AGENTS.md)

Expose a className prop on the root element of every component

Files:

  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/transactions/server-wallets/wallet-table/wallet-table-ui.client.tsx
  • apps/dashboard/src/@/components/in-app-wallet-users-content/AdvancedSearchInput.tsx
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/wallets/page.tsx
  • apps/dashboard/src/@/components/in-app-wallet-users-content/in-app-wallet-users-content.tsx
🧬 Code graph analysis (2)
apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/transactions/server-wallets/wallet-table/wallet-table-ui.client.tsx (2)
apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/transactions/server-wallets/components/create-server-wallet.client.tsx (1)
  • CreateServerWallet (22-168)
apps/dashboard/src/@/components/blocks/NetworkSelectors.tsx (1)
  • SingleNetworkSelector (152-298)
apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/wallets/page.tsx (4)
packages/vault-sdk/src/sdk.ts (2)
  • createVaultClient (111-165)
  • listEoas (326-337)
apps/dashboard/src/@/constants/public-envs.ts (1)
  • NEXT_PUBLIC_THIRDWEB_VAULT_URL (4-5)
apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/transactions/server-wallets/wallet-table/wallet-table.tsx (1)
  • ServerWalletsTable (6-37)
apps/dashboard/src/@/components/in-app-wallet-users-content/in-app-wallet-users-content.tsx (1)
  • InAppWalletUsersPageContent (47-346)
⏰ 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: E2E Tests (pnpm, vite)
  • GitHub Check: Size
  • GitHub Check: Lint Packages
  • GitHub Check: Analyze (javascript)

Comment on lines +48 to +53
const [vaultClient, project] = await Promise.all([
createVaultClient({
baseUrl: NEXT_PUBLIC_THIRDWEB_VAULT_URL,
}).catch(() => undefined),
getProject(params.team_slug, params.project_slug),
]);
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

Fix vault client fallback when env is unset.

Passing baseUrl as an empty string makes createVaultClient throw (the URL constructor rejects ""), so we silently fall back to vaultClient = undefined and the server wallet list never loads unless the env var is set. Coerce the value to undefined so the SDK’s default base URL is used when the env is absent.

-  const [vaultClient, project] = await Promise.all([
-    createVaultClient({
-      baseUrl: NEXT_PUBLIC_THIRDWEB_VAULT_URL,
-    }).catch(() => undefined),
+  const [vaultClient, project] = await Promise.all([
+    createVaultClient({
+      baseUrl: NEXT_PUBLIC_THIRDWEB_VAULT_URL || undefined,
+    }).catch(() => undefined),
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
const [vaultClient, project] = await Promise.all([
createVaultClient({
baseUrl: NEXT_PUBLIC_THIRDWEB_VAULT_URL,
}).catch(() => undefined),
getProject(params.team_slug, params.project_slug),
]);
const [vaultClient, project] = await Promise.all([
createVaultClient({
baseUrl: NEXT_PUBLIC_THIRDWEB_VAULT_URL || undefined,
}).catch(() => undefined),
getProject(params.team_slug, params.project_slug),
]);
🤖 Prompt for AI Agents
In
apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/wallets/page.tsx
around lines 48 to 53, the vault client fallback fails because an empty string
is passed as baseUrl which makes createVaultClient throw; change the baseUrl
argument so that an empty string becomes undefined (e.g. coerce
NEXT_PUBLIC_THIRDWEB_VAULT_URL to undefined when falsy) so the SDK uses its
default URL, and keep the .catch(() => undefined) behavior for any runtime
errors.

@joaquim-verges joaquim-verges merged commit 2dbb9e2 into main Oct 3, 2025
27 checks passed
@joaquim-verges joaquim-verges deleted the _Dashboard_Redesign_wallet_UI_with_rounded_elements_and_improved_layout branch October 3, 2025 01:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Dashboard Involves changes to the Dashboard.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants