Skip to content

Conversation

@MananTank
Copy link
Member

@MananTank MananTank commented Nov 10, 2025


PR-Codex overview

This PR focuses on various UI/UX improvements across the thirdweb components, including adjustments to font weights, styling enhancements, and the addition of fallback options for images. It aims to refine the overall user experience in the Bridge components.

Detailed summary

  • Added flexShrink: 0 to Spacer component.
  • Changed weight from 600 to 500 in multiple Text components.
  • Added fallback backgrounds for images in TokenAndChain and TokenSelection.
  • Improved spacing and layout in SuccessScreen and PaymentReceipt.
  • Introduced tab functionality in TokenSelection for better token management.
  • Updated Skeleton components for loading states.
  • Adjusted button styles and functionality for better usability.

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

Summary by CodeRabbit

  • New Features

    • Token selection: separate "All Tokens" and "Your Tokens" tabs with per-tab paging and "Load More"
    • Payment receipts: per-transaction explorer links and inline copy controls; expanded per-transaction status details
  • UI/UX Improvements

    • Refined typography weights across Bridge screens for clearer hierarchy
    • Adjusted icon sizing and added visual fallbacks for missing chain/token icons
    • Improved spacing, alignment, scrolling and containment in Bridge layouts
    • Minor interaction and skeleton/load-state refinements across flows

@linear
Copy link

linear bot commented Nov 10, 2025

@changeset-bot
Copy link

changeset-bot bot commented Nov 10, 2025

🦋 Changeset detected

Latest commit: 763d3de

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

This PR includes changesets to release 4 packages
Name Type
thirdweb Patch
@thirdweb-dev/nebula Patch
@thirdweb-dev/wagmi-adapter Patch
wagmi-inapp 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

@vercel
Copy link

vercel bot commented Nov 10, 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 10, 2025 6:19pm
nebula Ready Ready Preview Comment Nov 10, 2025 6:19pm
thirdweb_playground Ready Ready Preview Comment Nov 10, 2025 6:19pm
thirdweb-www Ready Ready Preview Comment Nov 10, 2025 6:19pm
wallet-ui Ready Ready Preview Comment Nov 10, 2025 6:19pm

@github-actions github-actions bot added packages SDK Involves changes to the thirdweb SDK labels Nov 10, 2025
@MananTank MananTank marked this pull request as ready for review November 10, 2025 16:33
@MananTank MananTank requested review from a team as code owners November 10, 2025 16:33
Copy link
Member Author

MananTank commented Nov 10, 2025


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.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 10, 2025

Walkthrough

Minor UI/UX updates across Bridge components: reduced typography weights, token selector gained "All Tokens" / "Your Tokens" tabs with per-tab paging, icon fallbacks for missing images, CopyIcon refactored to a Button, receipts now render per-transaction explorer links and copy actions; onCopyToClipboard removed from receipt props.

Changes

Cohort / File(s) Summary
Changeset & Release Notes
\.changeset/wild-steaks-agree.md
Added patch changeset declaring "Various UI/UX Improvements in Bridge components."
Typography adjustments
packages/thirdweb/src/react/web/ui/Bridge/TransactionPayment.tsx, packages/thirdweb/src/react/web/ui/Bridge/common/TokenAndChain.tsx, packages/thirdweb/src/react/web/ui/Bridge/payment-selection/TokenSelection.tsx, packages/thirdweb/src/react/web/ui/Bridge/payment-details/PaymentOverview.tsx
Reduced multiple Text weights from 600 to 500 for currency/token labels and titles.
Amount / fiat layout
packages/thirdweb/src/react/web/ui/Bridge/common/TokenBalanceRow.tsx
Reordered rendering: token amount as primary Text, FiatValue moved after amount and styled as secondary.
Payment receipt & success screen
packages/thirdweb/src/react/web/ui/Bridge/payment-success/PaymentReceipt.tsx, packages/thirdweb/src/react/web/ui/Bridge/payment-success/SuccessScreen.tsx
Receipt now iterates status.transactions, shows per-transaction explorer links and inline CopyIcon buttons, simplified loading/skeleton logic, added scroll container and dividers, removed onCopyToClipboard prop; SuccessScreen spacing and title adjusted.
Token selection: tabs & pagination
packages/thirdweb/src/react/web/ui/Bridge/swap-widget/select-token-ui.tsx, packages/thirdweb/src/react/web/ui/Bridge/swap-widget/select-token.tsx
Added "All Tokens" / "Your Tokens" tabs, per-tab limits (ALL_TOKENS_LIMIT=100, OWNED_TOKENS_LIMIT=50), per-tab load-more, debounced search resets limits, and token props now shaped as { data, isFetching, showMore }.
Chain & token icon fallbacks
packages/thirdweb/src/react/web/ui/Bridge/swap-widget/select-chain.tsx, packages/thirdweb/src/react/web/ui/Bridge/common/selected-token-button.tsx
Use empty-string src fallback, computed iconSizeValue, and theme-aware gradient circular fallback when icon missing; Img dimensions derived from iconSizeValue.
WalletRow icon sizing refactor
packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/swap/WalletRow.tsx
Introduced local iconSizeValue constant for consistent image/icon sizing; adjusted container gap.
CopyIcon component
packages/thirdweb/src/react/web/ui/components/CopyIcon.tsx
Reimplemented as a Button (variant ghost-solid) with padding and radius, removed custom keyboard handler, changed inactive color to secondaryText.
Spacer behavior fix
packages/thirdweb/src/react/web/ui/components/Spacer.tsx
Added flexShrink: 0 to spacer style to prevent shrinking in flex layouts.

Sequence Diagram(s)

sequenceDiagram
    autonumber
    participant User
    participant SelectTokenUI
    participant AllTokens
    participant YourTokens

    User->>SelectTokenUI: Open token selector
    SelectTokenUI->>AllTokens: Load first page (limit:100)
    SelectTokenUI->>YourTokens: Load first page (limit:50)

    alt Viewing "All Tokens"
        User->>AllTokens: Click "Load more"
        AllTokens->>AllTokens: showMore() -> increase visible items
    else Viewing "Your Tokens"
        User->>YourTokens: Click "Load more"
        YourTokens->>YourTokens: showMore() -> increase visible items
    end

    User->>SelectTokenUI: Select token
    SelectTokenUI-->>User: Return selected token
Loading
sequenceDiagram
    autonumber
    participant User
    participant PaymentReceipt
    participant TransactionEntry
    participant Explorer

    User->>PaymentReceipt: Open completed payment
    PaymentReceipt->>PaymentReceipt: Iterate status.transactions

    loop per transaction
        PaymentReceipt->>TransactionEntry: Render hash, timestamp, chain, amounts
        TransactionEntry->>TransactionEntry: Render CopyIcon (Button)
        TransactionEntry->>Explorer: Render external explorer Link
        alt User clicks CopyIcon
            User->>TransactionEntry: Click
            TransactionEntry-->>User: Copy tx hash to clipboard
        else User clicks Link
            User->>Explorer: Open external explorer URL
        end
    end
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

  • Areas needing focused review:
    • packages/.../swap-widget/select-token-ui.tsx — tab logic, paging limits, search debounce, prop-shape changes.
    • packages/.../payment-success/PaymentReceipt.tsx — interface change (removed onCopyToClipboard), per-transaction rendering and explorer link/clipboard behavior.
    • packages/.../components/CopyIcon.tsx — accessibility and keyboard interactions after switching to Button.
    • Icon fallback implementations in select-chain and selected-token-button — sizing and visual parity.

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 12.50% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The PR title clearly and concisely summarizes the main focus: UI/UX improvements in Bridge components, with the issue tag [MNY-303] properly included.
Description check ✅ Passed The description includes the PR-Codex overview with a comprehensive summary of changes, detailed itemization of improvements, and the issue tag [MNY-303], adequately addressing the repository template requirements.
Linked Issues check ✅ Passed The code changes comprehensively address all objectives from MNY-303: transaction hashes with links in PaymentReceipt, token amount as primary display with secondary USD values in TokenBalanceRow and TransactionPayment, tabbed token selection with 100-item limit and pagination in select-token-ui, and fallback icons.
Out of Scope Changes check ✅ Passed All changes are directly aligned with MNY-303 objectives. Font weight adjustments, spacing refinements, CopyIcon refactoring, and layout improvements all support the primary goals of enhancing UI/UX in Bridge components without introducing unrelated functionality.
✨ 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 mny-303

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
Copy link
Contributor

github-actions bot commented Nov 10, 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 10, 2025

Codecov Report

❌ Patch coverage is 6.09319% with 262 lines in your changes missing coverage. Please review.
✅ Project coverage is 54.62%. Comparing base (f6f138c) to head (763d3de).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
...eact/web/ui/Bridge/swap-widget/select-token-ui.tsx 2.11% 139 Missing ⚠️
...t/web/ui/Bridge/payment-success/PaymentReceipt.tsx 5.33% 71 Missing ⚠️
...c/react/web/ui/Bridge/swap-widget/select-chain.tsx 5.88% 16 Missing ⚠️
...src/react/web/ui/Bridge/common/TokenBalanceRow.tsx 0.00% 10 Missing ⚠️
...act/web/ui/Bridge/common/selected-token-button.tsx 0.00% 10 Missing ⚠️
.../web/ui/Bridge/payment-details/PaymentOverview.tsx 0.00% 6 Missing ⚠️
...eb/ui/ConnectWallet/screens/Buy/swap/WalletRow.tsx 0.00% 4 Missing ⚠️
...ct/web/ui/Bridge/payment-success/SuccessScreen.tsx 33.33% 2 Missing ⚠️
...web/src/react/web/ui/Bridge/TransactionPayment.tsx 0.00% 1 Missing ⚠️
...b/src/react/web/ui/Bridge/common/TokenAndChain.tsx 0.00% 1 Missing ⚠️
... and 2 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8388      +/-   ##
==========================================
- Coverage   54.64%   54.62%   -0.02%     
==========================================
  Files         919      919              
  Lines       60704    60753      +49     
  Branches     4112     4113       +1     
==========================================
+ Hits        33171    33188      +17     
- Misses      27431    27463      +32     
  Partials      102      102              
Flag Coverage Δ
packages 54.62% <6.09%> (-0.02%) ⬇️
Files with missing lines Coverage Δ
...es/thirdweb/src/react/web/ui/components/Spacer.tsx 100.00% <100.00%> (ø)
...web/src/react/web/ui/Bridge/TransactionPayment.tsx 6.52% <0.00%> (ø)
...b/src/react/web/ui/Bridge/common/TokenAndChain.tsx 10.77% <0.00%> (ø)
...web/ui/Bridge/payment-selection/TokenSelection.tsx 5.40% <0.00%> (ø)
.../thirdweb/src/react/web/ui/components/CopyIcon.tsx 83.72% <87.50%> (+9.30%) ⬆️
...ct/web/ui/Bridge/payment-success/SuccessScreen.tsx 11.00% <33.33%> (+0.10%) ⬆️
...eb/ui/ConnectWallet/screens/Buy/swap/WalletRow.tsx 19.69% <0.00%> (-0.31%) ⬇️
.../web/ui/Bridge/payment-details/PaymentOverview.tsx 5.07% <0.00%> (+0.01%) ⬆️
...src/react/web/ui/Bridge/common/TokenBalanceRow.tsx 11.11% <0.00%> (ø)
...act/web/ui/Bridge/common/selected-token-button.tsx 7.46% <0.00%> (-0.54%) ⬇️
... and 3 more

... and 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.

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: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
packages/thirdweb/src/react/web/ui/Bridge/payment-success/PaymentReceipt.tsx (1)

24-35: Add TSDoc and explicit return types per coding guidelines.

The coding guidelines for packages/thirdweb/**/*.{ts,tsx} require:

  1. Comprehensive TSDoc with at least one @example for every public symbol
  2. Explicit return type annotations

Missing documentation and return types:

  • TransactionInfo interface (lines 24-35)
  • useTransactionInfo hook (lines 50-119) - needs return type annotation
  • CompletedStepDetailCard component (lines 130-310) - needs return type annotation
  • CompletedStepDetailCardProps interface (lines 121-125)
  • PaymentReceitProps interface (lines 312-332)
  • PaymentReceipt component (lines 334-367) - needs return type annotation

As per coding guidelines

Example for the main export:

/**
 * Displays a detailed payment receipt showing completed transaction information.
 * 
 * @example
 * ```tsx
 * <PaymentReceipt
 *   preparedQuote={quote}
 *   completedStatuses={statuses}
 *   onBack={() => setScreen('success')}
 *   windowAdapter={window}
 * />
 * ```
 * 
 * @beta
 */
export function PaymentReceipt({
  preparedQuote,
  completedStatuses,
  onBack,
  windowAdapter,
}: PaymentReceitProps): JSX.Element {
  // ... implementation
}

Also applies to: 50-119, 130-310, 312-332, 334-367

📜 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 03ee0aa and bda8ae7.

📒 Files selected for processing (14)
  • .changeset/wild-steaks-agree.md (1 hunks)
  • packages/thirdweb/src/react/web/ui/Bridge/TransactionPayment.tsx (1 hunks)
  • packages/thirdweb/src/react/web/ui/Bridge/common/TokenAndChain.tsx (1 hunks)
  • packages/thirdweb/src/react/web/ui/Bridge/common/TokenBalanceRow.tsx (2 hunks)
  • packages/thirdweb/src/react/web/ui/Bridge/common/selected-token-button.tsx (1 hunks)
  • packages/thirdweb/src/react/web/ui/Bridge/payment-details/PaymentOverview.tsx (6 hunks)
  • packages/thirdweb/src/react/web/ui/Bridge/payment-selection/TokenSelection.tsx (1 hunks)
  • packages/thirdweb/src/react/web/ui/Bridge/payment-success/PaymentReceipt.tsx (5 hunks)
  • packages/thirdweb/src/react/web/ui/Bridge/payment-success/SuccessScreen.tsx (4 hunks)
  • packages/thirdweb/src/react/web/ui/Bridge/swap-widget/select-chain.tsx (3 hunks)
  • packages/thirdweb/src/react/web/ui/Bridge/swap-widget/select-token-ui.tsx (18 hunks)
  • packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/swap/WalletRow.tsx (1 hunks)
  • packages/thirdweb/src/react/web/ui/components/CopyIcon.tsx (3 hunks)
  • packages/thirdweb/src/react/web/ui/components/Spacer.tsx (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (4)
  • .changeset/wild-steaks-agree.md
  • packages/thirdweb/src/react/web/ui/components/Spacer.tsx
  • packages/thirdweb/src/react/web/ui/Bridge/payment-selection/TokenSelection.tsx
  • packages/thirdweb/src/react/web/ui/Bridge/common/TokenAndChain.tsx
🧰 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

**/*.{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:

  • packages/thirdweb/src/react/web/ui/Bridge/TransactionPayment.tsx
  • packages/thirdweb/src/react/web/ui/Bridge/common/TokenBalanceRow.tsx
  • packages/thirdweb/src/react/web/ui/Bridge/swap-widget/select-token-ui.tsx
  • packages/thirdweb/src/react/web/ui/Bridge/payment-details/PaymentOverview.tsx
  • packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/swap/WalletRow.tsx
  • packages/thirdweb/src/react/web/ui/Bridge/swap-widget/select-chain.tsx
  • packages/thirdweb/src/react/web/ui/Bridge/payment-success/SuccessScreen.tsx
  • packages/thirdweb/src/react/web/ui/Bridge/payment-success/PaymentReceipt.tsx
  • packages/thirdweb/src/react/web/ui/Bridge/common/selected-token-button.tsx
  • packages/thirdweb/src/react/web/ui/components/CopyIcon.tsx
**/*.{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/react/web/ui/Bridge/TransactionPayment.tsx
  • packages/thirdweb/src/react/web/ui/Bridge/common/TokenBalanceRow.tsx
  • packages/thirdweb/src/react/web/ui/Bridge/swap-widget/select-token-ui.tsx
  • packages/thirdweb/src/react/web/ui/Bridge/payment-details/PaymentOverview.tsx
  • packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/swap/WalletRow.tsx
  • packages/thirdweb/src/react/web/ui/Bridge/swap-widget/select-chain.tsx
  • packages/thirdweb/src/react/web/ui/Bridge/payment-success/SuccessScreen.tsx
  • packages/thirdweb/src/react/web/ui/Bridge/payment-success/PaymentReceipt.tsx
  • packages/thirdweb/src/react/web/ui/Bridge/common/selected-token-button.tsx
  • packages/thirdweb/src/react/web/ui/components/CopyIcon.tsx
packages/thirdweb/**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

packages/thirdweb/**/*.{ts,tsx}: Every public symbol must have comprehensive TSDoc with at least one compiling @example and a custom tag (@beta, @internal, @experimental, etc.)
Comment only ambiguous logic; avoid restating TypeScript in prose
Lazy‑load heavy dependencies inside async paths (e.g., const { jsPDF } = await import("jspdf"))

Files:

  • packages/thirdweb/src/react/web/ui/Bridge/TransactionPayment.tsx
  • packages/thirdweb/src/react/web/ui/Bridge/common/TokenBalanceRow.tsx
  • packages/thirdweb/src/react/web/ui/Bridge/swap-widget/select-token-ui.tsx
  • packages/thirdweb/src/react/web/ui/Bridge/payment-details/PaymentOverview.tsx
  • packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/swap/WalletRow.tsx
  • packages/thirdweb/src/react/web/ui/Bridge/swap-widget/select-chain.tsx
  • packages/thirdweb/src/react/web/ui/Bridge/payment-success/SuccessScreen.tsx
  • packages/thirdweb/src/react/web/ui/Bridge/payment-success/PaymentReceipt.tsx
  • packages/thirdweb/src/react/web/ui/Bridge/common/selected-token-button.tsx
  • packages/thirdweb/src/react/web/ui/components/CopyIcon.tsx
🧠 Learnings (43)
📓 Common learnings
Learnt from: MananTank
Repo: thirdweb-dev/js PR: 7307
File: apps/dashboard/src/app/nebula-app/move-funds/move-funds.tsx:324-346
Timestamp: 2025-06-09T15:15:02.350Z
Learning: In the move-funds functionality, MananTank prefers having both individual toast.promise notifications for each token transfer AND batch summary toasts, even though this creates multiple notifications. This dual notification approach is acceptable for the move-funds user experience.
Learnt from: CR
Repo: thirdweb-dev/js PR: 0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-07-18T19:20:32.530Z
Learning: Applies to dashboard/**/*.{tsx,jsx} : Stick to design-tokens: background (`bg-card`), borders (`border-border`), muted text (`text-muted-foreground`) etc.
Learnt from: CR
Repo: thirdweb-dev/js PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-08-29T15:37:38.513Z
Learning: Applies to apps/{dashboard,playground}/**/*.{ts,tsx} : Stick to design tokens (e.g., bg-card, border-border, text-muted-foreground)
Learnt from: MananTank
Repo: thirdweb-dev/js PR: 8181
File: packages/thirdweb/src/react/web/ui/Bridge/BuyWidget.tsx:27-27
Timestamp: 2025-10-03T23:36:00.631Z
Learning: In packages/thirdweb/src/react/web/ui/Bridge/BuyWidget.tsx, the component intentionally uses a hardcoded English locale (connectLocaleEn) rather than reading from the provider, as BuyWidget is designed to be English-only and does not require internationalization support.
Learnt from: CR
Repo: thirdweb-dev/js PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T19:19:55.613Z
Learning: Applies to apps/{dashboard,playground-web}/**/*.{ts,tsx} : Use design system tokens (e.g., `bg-card`, `border-border`, `text-muted-foreground`)
Learnt from: CR
Repo: thirdweb-dev/js PR: 0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-07-18T19:20:32.530Z
Learning: Applies to dashboard/**/*.{tsx,jsx} : Prefer composable primitives over custom markup: `Button`, `Input`, `Select`, `Tabs`, `Card`, `Sidebar`, `Separator`, `Badge`.
📚 Learning: 2025-10-03T23:36:00.631Z
Learnt from: MananTank
Repo: thirdweb-dev/js PR: 8181
File: packages/thirdweb/src/react/web/ui/Bridge/BuyWidget.tsx:27-27
Timestamp: 2025-10-03T23:36:00.631Z
Learning: In packages/thirdweb/src/react/web/ui/Bridge/BuyWidget.tsx, the component intentionally uses a hardcoded English locale (connectLocaleEn) rather than reading from the provider, as BuyWidget is designed to be English-only and does not require internationalization support.

Applied to files:

  • packages/thirdweb/src/react/web/ui/Bridge/TransactionPayment.tsx
  • packages/thirdweb/src/react/web/ui/Bridge/common/TokenBalanceRow.tsx
  • packages/thirdweb/src/react/web/ui/Bridge/swap-widget/select-token-ui.tsx
  • packages/thirdweb/src/react/web/ui/Bridge/payment-details/PaymentOverview.tsx
  • packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/swap/WalletRow.tsx
  • packages/thirdweb/src/react/web/ui/Bridge/swap-widget/select-chain.tsx
  • packages/thirdweb/src/react/web/ui/Bridge/payment-success/SuccessScreen.tsx
  • packages/thirdweb/src/react/web/ui/Bridge/payment-success/PaymentReceipt.tsx
  • packages/thirdweb/src/react/web/ui/Bridge/common/selected-token-button.tsx
📚 Learning: 2025-06-26T19:46:04.024Z
Learnt from: gregfromstl
Repo: thirdweb-dev/js PR: 7450
File: packages/thirdweb/src/bridge/Webhook.ts:57-81
Timestamp: 2025-06-26T19:46:04.024Z
Learning: In the onramp webhook schema (`packages/thirdweb/src/bridge/Webhook.ts`), the `currencyAmount` field is intentionally typed as `z.number()` while other amount fields use `z.string()` because `currencyAmount` represents fiat currency amounts in decimals (like $10.50), whereas other amount fields represent token amounts in wei (very large integers that benefit from bigint representation). The different naming convention (`currencyAmount` vs `amount`) reflects this intentional distinction.

Applied to files:

  • packages/thirdweb/src/react/web/ui/Bridge/TransactionPayment.tsx
  • packages/thirdweb/src/react/web/ui/Bridge/common/TokenBalanceRow.tsx
📚 Learning: 2025-09-23T19:56:43.668Z
Learnt from: MananTank
Repo: thirdweb-dev/js PR: 8106
File: packages/thirdweb/src/react/web/ui/ConnectWallet/Modal/ConnectEmbed.tsx:482-485
Timestamp: 2025-09-23T19:56:43.668Z
Learning: In packages/thirdweb/src/react/web/ui/ConnectWallet/Modal/ConnectEmbed.tsx, the EmbedContainer uses width: "100vw" intentionally rather than "100%" - this is by design for the bridge widget embedding use case.

Applied to files:

  • packages/thirdweb/src/react/web/ui/Bridge/TransactionPayment.tsx
  • packages/thirdweb/src/react/web/ui/Bridge/common/TokenBalanceRow.tsx
  • packages/thirdweb/src/react/web/ui/Bridge/swap-widget/select-token-ui.tsx
  • packages/thirdweb/src/react/web/ui/Bridge/payment-details/PaymentOverview.tsx
  • packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/swap/WalletRow.tsx
  • packages/thirdweb/src/react/web/ui/Bridge/swap-widget/select-chain.tsx
  • packages/thirdweb/src/react/web/ui/Bridge/payment-success/SuccessScreen.tsx
📚 Learning: 2025-07-18T19:20:32.530Z
Learnt from: CR
Repo: thirdweb-dev/js PR: 0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-07-18T19:20:32.530Z
Learning: Applies to dashboard/**/*client.tsx : Interactive UI that relies on hooks (`useState`, `useEffect`, React Query, wallet hooks).

Applied to files:

  • packages/thirdweb/src/react/web/ui/Bridge/swap-widget/select-token-ui.tsx
  • packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/swap/WalletRow.tsx
  • packages/thirdweb/src/react/web/ui/Bridge/swap-widget/select-chain.tsx
  • packages/thirdweb/src/react/web/ui/Bridge/payment-success/PaymentReceipt.tsx
  • packages/thirdweb/src/react/web/ui/components/CopyIcon.tsx
📚 Learning: 2025-09-24T11:08:43.783Z
Learnt from: MananTank
Repo: thirdweb-dev/js PR: 8106
File: packages/thirdweb/src/react/web/ui/Bridge/bridge-widget/bridge-widget.tsx:34-41
Timestamp: 2025-09-24T11:08:43.783Z
Learning: In BridgeWidgetProps for packages/thirdweb/src/react/web/ui/Bridge/bridge-widget/bridge-widget.tsx, the Swap onError callback signature requires a non-undefined SwapPreparedQuote parameter (unlike Buy's onError which allows undefined quote). This is intentional - SwapWidget's onError is only called when a quote is available.

Applied to files:

  • packages/thirdweb/src/react/web/ui/Bridge/swap-widget/select-token-ui.tsx
  • packages/thirdweb/src/react/web/ui/Bridge/swap-widget/select-chain.tsx
  • packages/thirdweb/src/react/web/ui/Bridge/payment-success/PaymentReceipt.tsx
📚 Learning: 2025-09-18T20:09:57.064Z
Learnt from: MananTank
Repo: thirdweb-dev/js PR: 8069
File: apps/playground-web/src/app/bridge/swap-widget/components/types.ts:3-12
Timestamp: 2025-09-18T20:09:57.064Z
Learning: The SwapWidgetPlaygroundOptions type should not include persistTokenSelections - the playground intentionally hardcodes persistTokenSelections={false} and doesn't expose it as a configurable option to users.

Applied to files:

  • packages/thirdweb/src/react/web/ui/Bridge/swap-widget/select-token-ui.tsx
📚 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 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

Applied to files:

  • packages/thirdweb/src/react/web/ui/Bridge/swap-widget/select-token-ui.tsx
  • packages/thirdweb/src/react/web/ui/Bridge/swap-widget/select-chain.tsx
  • packages/thirdweb/src/react/web/ui/Bridge/payment-success/SuccessScreen.tsx
  • packages/thirdweb/src/react/web/ui/components/CopyIcon.tsx
📚 Learning: 2025-08-29T15:37:38.513Z
Learnt from: CR
Repo: thirdweb-dev/js PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-08-29T15:37:38.513Z
Learning: Applies to apps/{dashboard,playground}/**/*.{ts,tsx} : Import UI primitives from `@/components/ui/_` (e.g., Button, Input, Tabs, Card)

Applied to files:

  • packages/thirdweb/src/react/web/ui/Bridge/swap-widget/select-token-ui.tsx
  • packages/thirdweb/src/react/web/ui/Bridge/swap-widget/select-chain.tsx
  • packages/thirdweb/src/react/web/ui/Bridge/payment-success/SuccessScreen.tsx
  • packages/thirdweb/src/react/web/ui/components/CopyIcon.tsx
📚 Learning: 2025-06-17T18:30:52.976Z
Learnt from: MananTank
Repo: thirdweb-dev/js PR: 7356
File: apps/nebula/src/app/not-found.tsx:1-1
Timestamp: 2025-06-17T18:30:52.976Z
Learning: In the thirdweb/js project, the React namespace is available for type annotations (like React.FC) without needing to explicitly import React. This is project-specific configuration that differs from typical TypeScript/React setups.

Applied to files:

  • packages/thirdweb/src/react/web/ui/Bridge/swap-widget/select-token-ui.tsx
  • packages/thirdweb/src/react/web/ui/Bridge/swap-widget/select-chain.tsx
📚 Learning: 2025-07-18T19:20:32.530Z
Learnt from: CR
Repo: thirdweb-dev/js PR: 0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-07-18T19:20:32.530Z
Learning: Applies to dashboard/**/*client.tsx : Anything that consumes hooks from `tanstack/react-query` or thirdweb SDKs.

Applied to files:

  • packages/thirdweb/src/react/web/ui/Bridge/swap-widget/select-token-ui.tsx
  • packages/thirdweb/src/react/web/ui/Bridge/swap-widget/select-chain.tsx
  • packages/thirdweb/src/react/web/ui/Bridge/payment-success/PaymentReceipt.tsx
📚 Learning: 2025-05-30T17:14:25.332Z
Learnt from: MananTank
Repo: thirdweb-dev/js PR: 7227
File: apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/OpenEditionMetadata.tsx:26-26
Timestamp: 2025-05-30T17:14:25.332Z
Learning: The ModuleCardUIProps interface already includes a client prop of type ThirdwebClient, so when components use `Omit<ModuleCardUIProps, "children" | "updateButton">`, they inherit the client prop without needing to add it explicitly.

Applied to files:

  • packages/thirdweb/src/react/web/ui/Bridge/swap-widget/select-token-ui.tsx
📚 Learning: 2025-07-18T19:20:32.530Z
Learnt from: CR
Repo: thirdweb-dev/js PR: 0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-07-18T19:20:32.530Z
Learning: Applies to dashboard/**/*client.tsx : When you need access to browser APIs (localStorage, window, IntersectionObserver etc.).

Applied to files:

  • packages/thirdweb/src/react/web/ui/Bridge/swap-widget/select-token-ui.tsx
  • packages/thirdweb/src/react/web/ui/Bridge/payment-success/PaymentReceipt.tsx
  • packages/thirdweb/src/react/web/ui/components/CopyIcon.tsx
📚 Learning: 2025-07-18T19:20:32.530Z
Learnt from: CR
Repo: thirdweb-dev/js PR: 0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-07-18T19:20:32.530Z
Learning: Applies to dashboard/**/components/*.client.tsx : Client components must start with `'use client';` before imports.

Applied to files:

  • packages/thirdweb/src/react/web/ui/Bridge/swap-widget/select-token-ui.tsx
  • packages/thirdweb/src/react/web/ui/Bridge/payment-success/PaymentReceipt.tsx
📚 Learning: 2025-08-29T15:37:38.513Z
Learnt from: CR
Repo: thirdweb-dev/js PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-08-29T15:37:38.513Z
Learning: Applies to apps/{dashboard,playground}/**/*.{ts,tsx} : Client Components must start with `'use client'`; handle interactivity with hooks and browser APIs

Applied to files:

  • packages/thirdweb/src/react/web/ui/Bridge/swap-widget/select-token-ui.tsx
  • packages/thirdweb/src/react/web/ui/Bridge/payment-success/PaymentReceipt.tsx
📚 Learning: 2025-06-06T23:46:08.795Z
Learnt from: MananTank
Repo: thirdweb-dev/js PR: 7298
File: apps/dashboard/src/app/nebula-app/move-funds/move-funds.tsx:424-424
Timestamp: 2025-06-06T23:46:08.795Z
Learning: The thirdweb project has an ESLint rule that restricts direct usage of `defineChain`. When it's necessary to use `defineChain` directly, it's acceptable to disable the rule with `// eslint-disable-next-line no-restricted-syntax`.

Applied to files:

  • packages/thirdweb/src/react/web/ui/Bridge/swap-widget/select-token-ui.tsx
📚 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 apps/{dashboard,playground-web}/**/*.{ts,tsx} : Client Components (browser): Begin files with `'use client';`

Applied to files:

  • packages/thirdweb/src/react/web/ui/Bridge/swap-widget/select-token-ui.tsx
📚 Learning: 2025-07-18T19:20:32.530Z
Learnt from: CR
Repo: thirdweb-dev/js PR: 0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-07-18T19:20:32.530Z
Learning: Applies to dashboard/**/*client.tsx : Pages requiring fast transitions where data is prefetched on the client.

Applied to files:

  • packages/thirdweb/src/react/web/ui/Bridge/swap-widget/select-token-ui.tsx
  • packages/thirdweb/src/react/web/ui/Bridge/payment-success/PaymentReceipt.tsx
📚 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 apps/{dashboard,playground-web}/**/*.{ts,tsx} : Use design system tokens (e.g., `bg-card`, `border-border`, `text-muted-foreground`)

Applied to files:

  • packages/thirdweb/src/react/web/ui/Bridge/swap-widget/select-token-ui.tsx
  • packages/thirdweb/src/react/web/ui/Bridge/swap-widget/select-chain.tsx
  • packages/thirdweb/src/react/web/ui/Bridge/payment-success/SuccessScreen.tsx
  • packages/thirdweb/src/react/web/ui/Bridge/common/selected-token-button.tsx
📚 Learning: 2025-07-18T19:20:32.530Z
Learnt from: CR
Repo: thirdweb-dev/js PR: 0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-07-18T19:20:32.530Z
Learning: Applies to dashboard/**/*.{tsx,jsx} : Prefer composable primitives over custom markup: `Button`, `Input`, `Select`, `Tabs`, `Card`, `Sidebar`, `Separator`, `Badge`.

Applied to files:

  • packages/thirdweb/src/react/web/ui/Bridge/swap-widget/select-token-ui.tsx
  • packages/thirdweb/src/react/web/ui/Bridge/swap-widget/select-chain.tsx
  • packages/thirdweb/src/react/web/ui/Bridge/payment-success/SuccessScreen.tsx
  • packages/thirdweb/src/react/web/ui/components/CopyIcon.tsx
📚 Learning: 2025-07-02T20:04:53.982Z
Learnt from: MananTank
Repo: thirdweb-dev/js PR: 7505
File: apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/webhooks/components/webhook-metrics.tsx:40-40
Timestamp: 2025-07-02T20:04:53.982Z
Learning: The Spinner component imported from "@/components/ui/Spinner/Spinner" in the dashboard accepts a className prop, not a size prop. The correct usage is <Spinner className="size-4" />, not <Spinner size="sm" />. The component defaults to "size-4" if no className is provided.

Applied to files:

  • packages/thirdweb/src/react/web/ui/Bridge/swap-widget/select-token-ui.tsx
📚 Learning: 2025-07-18T19:20:32.530Z
Learnt from: CR
Repo: thirdweb-dev/js PR: 0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-07-18T19:20:32.530Z
Learning: Applies to dashboard/**/*.{tsx,jsx} : Use the `container` class with a `max-w-7xl` cap for page width consistency.

Applied to files:

  • packages/thirdweb/src/react/web/ui/Bridge/swap-widget/select-token-ui.tsx
  • packages/thirdweb/src/react/web/ui/Bridge/payment-success/SuccessScreen.tsx
📚 Learning: 2025-07-18T19:20:32.530Z
Learnt from: CR
Repo: thirdweb-dev/js PR: 0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-07-18T19:20:32.530Z
Learning: Applies to dashboard/**/*.{tsx,jsx} : Stick to design-tokens: background (`bg-card`), borders (`border-border`), muted text (`text-muted-foreground`) etc.

Applied to files:

  • packages/thirdweb/src/react/web/ui/Bridge/swap-widget/select-token-ui.tsx
  • packages/thirdweb/src/react/web/ui/Bridge/common/selected-token-button.tsx
📚 Learning: 2025-07-18T19:20:32.530Z
Learnt from: CR
Repo: thirdweb-dev/js PR: 0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-07-18T19:20:32.530Z
Learning: Applies to dashboard/**/layout.tsx : Building layout shells (`layout.tsx`) and top-level pages that mainly assemble data.

Applied to files:

  • packages/thirdweb/src/react/web/ui/Bridge/swap-widget/select-token-ui.tsx
  • packages/thirdweb/src/react/web/ui/Bridge/payment-success/SuccessScreen.tsx
📚 Learning: 2025-07-18T19:20:32.530Z
Learnt from: CR
Repo: thirdweb-dev/js PR: 0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-07-18T19:20:32.530Z
Learning: Applies to dashboard/**/*.{tsx,jsx} : For notices & skeletons rely on `AnnouncementBanner`, `GenericLoadingPage`, `EmptyStateCard`.

Applied to files:

  • packages/thirdweb/src/react/web/ui/Bridge/swap-widget/select-token-ui.tsx
  • packages/thirdweb/src/react/web/ui/Bridge/payment-success/SuccessScreen.tsx
📚 Learning: 2025-07-18T19:20:32.530Z
Learnt from: CR
Repo: thirdweb-dev/js PR: 0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-07-18T19:20:32.530Z
Learning: Applies to dashboard/**/*.{tsx,jsx} : Reuse core UI primitives; avoid re-implementing buttons, cards, modals.

Applied to files:

  • packages/thirdweb/src/react/web/ui/Bridge/swap-widget/select-token-ui.tsx
  • packages/thirdweb/src/react/web/ui/Bridge/payment-success/SuccessScreen.tsx
  • packages/thirdweb/src/react/web/ui/components/CopyIcon.tsx
📚 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/react/web/ui/Bridge/payment-details/PaymentOverview.tsx
📚 Learning: 2025-07-18T19:20:32.530Z
Learnt from: CR
Repo: thirdweb-dev/js PR: 0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-07-18T19:20:32.530Z
Learning: Applies to dashboard/**/*.{tsx,jsx} : Icons come from `lucide-react` or the project-specific `…/icons` exports – never embed raw SVG.

Applied to files:

  • packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/swap/WalletRow.tsx
  • packages/thirdweb/src/react/web/ui/components/CopyIcon.tsx
📚 Learning: 2025-09-17T11:14:35.659Z
Learnt from: MananTank
Repo: thirdweb-dev/js PR: 8044
File: packages/thirdweb/src/react/web/ui/Bridge/swap-widget/swap-ui.tsx:919-930
Timestamp: 2025-09-17T11:14:35.659Z
Learning: In the thirdweb codebase, useCustomTheme() hook can be used inside styled-components callbacks, contrary to the general React Rules of Hooks. This is a valid pattern in their implementation.

Applied to files:

  • packages/thirdweb/src/react/web/ui/Bridge/swap-widget/select-chain.tsx
📚 Learning: 2025-07-18T19:20:32.530Z
Learnt from: CR
Repo: thirdweb-dev/js PR: 0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-07-18T19:20:32.530Z
Learning: Applies to dashboard/**/*.{tsx,jsx} : Responsive helpers follow mobile-first (`max-sm`, `md`, `lg`, `xl`).

Applied to files:

  • packages/thirdweb/src/react/web/ui/Bridge/swap-widget/select-chain.tsx
  • packages/thirdweb/src/react/web/ui/Bridge/payment-success/SuccessScreen.tsx
📚 Learning: 2025-05-29T10:49:52.981Z
Learnt from: MananTank
Repo: thirdweb-dev/js PR: 7177
File: apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/public-pages/erc20/_components/ContractHeader.tsx:26-43
Timestamp: 2025-05-29T10:49:52.981Z
Learning: In React image components, conditional rendering of the entire image container (e.g., `{props.image && <Img />}`) serves a different purpose than fallback handling. The conditional prevents rendering any image UI when no image metadata exists, while the fallback prop handles cases where image metadata exists but the image fails to load. This pattern is intentional to distinguish between "no image intended" vs "image intended but failed to load".

Applied to files:

  • packages/thirdweb/src/react/web/ui/Bridge/swap-widget/select-chain.tsx
  • packages/thirdweb/src/react/web/ui/Bridge/common/selected-token-button.tsx
📚 Learning: 2025-08-09T15:37:30.990Z
Learnt from: MananTank
Repo: thirdweb-dev/js PR: 7822
File: apps/dashboard/src/@/components/contracts/contract-card/contract-publisher.tsx:22-31
Timestamp: 2025-08-09T15:37:30.990Z
Learning: The Img component at apps/dashboard/src/@/components/blocks/Img.tsx properly handles empty string src values by immediately setting status to "fallback" and converting empty strings to undefined in the img element's src attribute, preventing unnecessary network requests.

Applied to files:

  • packages/thirdweb/src/react/web/ui/Bridge/swap-widget/select-chain.tsx
  • packages/thirdweb/src/react/web/ui/Bridge/common/selected-token-button.tsx
📚 Learning: 2025-07-18T19:20:32.530Z
Learnt from: CR
Repo: thirdweb-dev/js PR: 0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-07-18T19:20:32.530Z
Learning: Applies to dashboard/**/*.{tsx,jsx} : Always import from the central UI library under `@/components/ui/*` – e.g. `import { Button } from "@/components/ui/button"`.

Applied to files:

  • packages/thirdweb/src/react/web/ui/Bridge/payment-success/SuccessScreen.tsx
  • packages/thirdweb/src/react/web/ui/components/CopyIcon.tsx
📚 Learning: 2025-07-18T19:20:32.530Z
Learnt from: CR
Repo: thirdweb-dev/js PR: 0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-07-18T19:20:32.530Z
Learning: Applies to dashboard/**/*.{tsx,jsx} : Spacing utilities (`px-*`, `py-*`, `gap-*`) are preferred over custom margins.

Applied to files:

  • packages/thirdweb/src/react/web/ui/Bridge/payment-success/SuccessScreen.tsx
📚 Learning: 2025-08-20T10:35:18.543Z
Learnt from: jnsdls
Repo: thirdweb-dev/js PR: 7888
File: apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/payments/page.tsx:77-81
Timestamp: 2025-08-20T10:35:18.543Z
Learning: The webhooks/payments route exists at apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/webhooks/payments/page.tsx and was added as part of the unified project layout changes.

Applied to files:

  • packages/thirdweb/src/react/web/ui/Bridge/payment-success/PaymentReceipt.tsx
📚 Learning: 2025-07-18T19:20:32.530Z
Learnt from: CR
Repo: thirdweb-dev/js PR: 0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-07-18T19:20:32.530Z
Learning: Applies to dashboard/**/*client.tsx : Use React Query (`tanstack/react-query`) for all client data fetching.

Applied to files:

  • packages/thirdweb/src/react/web/ui/Bridge/payment-success/PaymentReceipt.tsx
📚 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 apps/{dashboard,playground-web}/**/*.{ts,tsx} : Wrap client-side data fetching calls in React Query (`tanstack/react-query`)

Applied to files:

  • packages/thirdweb/src/react/web/ui/Bridge/payment-success/PaymentReceipt.tsx
📚 Learning: 2025-08-29T15:37:38.513Z
Learnt from: CR
Repo: thirdweb-dev/js PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-08-29T15:37:38.513Z
Learning: Applies to apps/{dashboard,playground}/**/*.{ts,tsx} : 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

Applied to files:

  • packages/thirdweb/src/react/web/ui/Bridge/payment-success/PaymentReceipt.tsx
📚 Learning: 2025-07-31T16:17:42.753Z
Learnt from: MananTank
Repo: thirdweb-dev/js PR: 7768
File: apps/playground-web/src/app/navLinks.ts:1-1
Timestamp: 2025-07-31T16:17:42.753Z
Learning: Configuration files that import and reference React components (like icon components from lucide-react) need the "use client" directive, even if they primarily export static data, because the referenced components need to be executed in a client context when used by other client components.

Applied to files:

  • packages/thirdweb/src/react/web/ui/Bridge/payment-success/PaymentReceipt.tsx
  • packages/thirdweb/src/react/web/ui/components/CopyIcon.tsx
📚 Learning: 2025-06-10T00:50:20.795Z
Learnt from: MananTank
Repo: thirdweb-dev/js PR: 7315
File: apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/assets/create/nft/launch-nft.tsx:153-226
Timestamp: 2025-06-10T00:50:20.795Z
Learning: In apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/assets/create/nft/launch-nft.tsx, the updateStatus function correctly expects a complete MultiStepState["status"] object. For pending states, { type: "pending" } is the entire status object. For error states, { type: "error", message: React.ReactNode } is the entire status object. The current code incorrectly spreads the entire step object instead of passing just the status object.

Applied to files:

  • packages/thirdweb/src/react/web/ui/Bridge/payment-success/PaymentReceipt.tsx
📚 Learning: 2025-08-29T15:37:38.513Z
Learnt from: CR
Repo: thirdweb-dev/js PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-08-29T15:37:38.513Z
Learning: Applies to apps/{dashboard,playground}/**/*.{ts,tsx} : Stick to design tokens (e.g., bg-card, border-border, text-muted-foreground)

Applied to files:

  • packages/thirdweb/src/react/web/ui/Bridge/common/selected-token-button.tsx
📚 Learning: 2025-08-28T19:32:53.229Z
Learnt from: MananTank
Repo: thirdweb-dev/js PR: 7939
File: apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/tokens/create/_common/step-card.tsx:50-60
Timestamp: 2025-08-28T19:32:53.229Z
Learning: The Button component in packages/ui/src/components/button.tsx has type="button" as the default when no type prop is explicitly provided. This means explicitly adding type="button" to Button components is redundant unless a different type (like "submit") is specifically needed.

Applied to files:

  • packages/thirdweb/src/react/web/ui/components/CopyIcon.tsx
📚 Learning: 2025-07-07T21:21:47.488Z
Learnt from: saminacodes
Repo: thirdweb-dev/js PR: 7543
File: apps/portal/src/app/pay/page.mdx:4-4
Timestamp: 2025-07-07T21:21:47.488Z
Learning: In the thirdweb-dev/js repository, lucide-react icons must be imported with the "Icon" suffix (e.g., ExternalLinkIcon, RocketIcon) as required by the new linting rule, contrary to the typical lucide-react convention of importing without the suffix.

Applied to files:

  • packages/thirdweb/src/react/web/ui/components/CopyIcon.tsx
🧬 Code graph analysis (10)
packages/thirdweb/src/react/web/ui/Bridge/TransactionPayment.tsx (1)
packages/thirdweb/src/react/web/ui/components/text.tsx (1)
  • Text (18-34)
packages/thirdweb/src/react/web/ui/Bridge/common/TokenBalanceRow.tsx (2)
packages/thirdweb/src/react/web/ui/components/text.tsx (1)
  • Text (18-34)
packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/swap/FiatValue.tsx (1)
  • FiatValue (15-55)
packages/thirdweb/src/react/web/ui/Bridge/swap-widget/select-token-ui.tsx (5)
packages/thirdweb/src/react/web/ui/Bridge/swap-widget/use-bridge-chains.ts (1)
  • useBridgeChains (5-14)
packages/thirdweb/src/react/web/ui/Bridge/swap-widget/use-tokens.ts (2)
  • useTokenBalances (74-123)
  • TokenBalance (42-60)
packages/thirdweb/src/react/web/ui/components/Spacer.tsx (1)
  • Spacer (6-15)
packages/thirdweb/src/react/web/ui/components/basic.tsx (1)
  • Container (80-193)
packages/thirdweb/src/react/web/ui/components/buttons.tsx (1)
  • Button (27-161)
packages/thirdweb/src/react/web/ui/Bridge/payment-details/PaymentOverview.tsx (3)
packages/thirdweb/src/react/web/ui/components/basic.tsx (1)
  • Container (80-193)
packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/fiat/currencies.tsx (1)
  • getFiatCurrencyIcon (103-108)
packages/thirdweb/src/react/web/ui/components/text.tsx (1)
  • Text (18-34)
packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/swap/WalletRow.tsx (2)
packages/thirdweb/src/react/core/design-system/index.ts (1)
  • iconSize (166-176)
packages/thirdweb/src/react/web/ui/components/basic.tsx (1)
  • Container (80-193)
packages/thirdweb/src/react/web/ui/Bridge/swap-widget/select-chain.tsx (2)
packages/thirdweb/src/react/core/design-system/index.ts (2)
  • iconSize (166-176)
  • radius (156-164)
packages/thirdweb/src/react/web/ui/components/basic.tsx (1)
  • Container (80-193)
packages/thirdweb/src/react/web/ui/Bridge/payment-success/SuccessScreen.tsx (1)
packages/thirdweb/src/react/web/ui/components/Spacer.tsx (1)
  • Spacer (6-15)
packages/thirdweb/src/react/web/ui/Bridge/payment-success/PaymentReceipt.tsx (7)
packages/thirdweb/src/react/web/ui/components/Skeleton.tsx (1)
  • Skeleton (10-28)
packages/thirdweb/src/react/core/design-system/index.ts (2)
  • radius (156-164)
  • spacing (142-154)
packages/thirdweb/src/react/web/ui/components/basic.tsx (3)
  • Container (80-193)
  • Line (70-75)
  • ModalHeader (36-68)
packages/thirdweb/src/react/web/ui/components/text.tsx (2)
  • Text (18-34)
  • Link (46-64)
packages/thirdweb/src/react/web/ui/components/ChainName.tsx (1)
  • shorterChainName (32-40)
packages/thirdweb/src/react/web/ui/components/CopyIcon.tsx (1)
  • CopyIcon (12-60)
packages/thirdweb/src/react/web/ui/components/Spacer.tsx (1)
  • Spacer (6-15)
packages/thirdweb/src/react/web/ui/Bridge/common/selected-token-button.tsx (2)
packages/thirdweb/src/react/core/design-system/index.ts (2)
  • iconSize (166-176)
  • radius (156-164)
packages/thirdweb/src/react/web/ui/components/basic.tsx (1)
  • Container (80-193)
packages/thirdweb/src/react/web/ui/components/CopyIcon.tsx (2)
packages/thirdweb/src/react/core/design-system/index.ts (1)
  • radius (156-164)
packages/thirdweb/src/react/web/ui/components/basic.tsx (1)
  • Container (80-193)
⏰ 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: Lint Packages
  • GitHub Check: E2E Tests (pnpm, vite)
  • GitHub Check: E2E Tests (pnpm, esbuild)
  • GitHub Check: E2E Tests (pnpm, webpack)
  • GitHub Check: Unit Tests
  • GitHub Check: Build Packages
  • GitHub Check: Size
  • GitHub Check: Analyze (javascript)
🔇 Additional comments (16)
packages/thirdweb/src/react/web/ui/Bridge/common/selected-token-button.tsx (1)

103-119: LGTM! Consistent fallback UI improves UX.

The addition of the fallback gradient for the chain icon matches the existing token icon fallback pattern (lines 63-70), ensuring visual consistency when icons fail to load. The empty string guard on line 103 correctly triggers the fallback behavior, and the dimensions properly use iconSize.sm to match the Img component's width/height props.

packages/thirdweb/src/react/web/ui/Bridge/TransactionPayment.tsx (1)

222-222: LGTM! Typography weight adjustment aligns with broader UI consistency improvements.

The reduction from weight 600 to 500 creates a more balanced visual hierarchy, consistent with similar typography updates across the Bridge components in this PR.

packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/swap/WalletRow.tsx (1)

50-61: LGTM! Centralized icon sizing improves maintainability.

The computed iconSizeValue eliminates duplication and ensures consistent icon sizing across WalletImage and OutlineWalletIcon. The gap reduction from "md" to "sm" tightens the layout appropriately.

packages/thirdweb/src/react/web/ui/Bridge/swap-widget/select-chain.tsx (1)

174-213: LGTM! Icon fallback and responsive sizing enhance UX.

The gradient fallback provides a polished experience when chain icons are unavailable, and the responsive iconSizeValue ensures appropriate sizing across mobile/desktop contexts. The empty string for src is correctly handled by the Img component's fallback mechanism.

packages/thirdweb/src/react/web/ui/Bridge/common/TokenBalanceRow.tsx (1)

71-94: LGTM! FiatValue component extraction improves code organization.

Replacing inline fiat rendering with the dedicated FiatValue component promotes reusability and maintains consistent fiat display behavior across the Bridge UI.

packages/thirdweb/src/react/web/ui/Bridge/payment-success/SuccessScreen.tsx (1)

94-144: LGTM! Spacing and text refinements improve professional appearance.

The increased spacing from "xxl" to "3xl" and the text change from "Payment Complete" to "Payment Successful" (removing the exclamation) create a more polished, professional success screen.

packages/thirdweb/src/react/web/ui/Bridge/payment-details/PaymentOverview.tsx (1)

66-290: LGTM! Consistent typography and icon sizing improvements.

The weight reduction from 600 to 500 and icon size increase from "md" to "lg" align with the broader UI consistency effort across Bridge components. The added layout comments improve code readability.

packages/thirdweb/src/react/web/ui/Bridge/swap-widget/select-token-ui.tsx (2)

53-111: LGTM! Pagination limits and search reset logic are well-implemented.

The separate constants for ALL_TOKENS_LIMIT (100) and OWNED_TOKENS_LIMIT (50) align with PR objectives. The setSearch callback correctly resets both limits when the user changes their search, ensuring fresh pagination state.


468-709: LGTM! Tab implementation provides excellent UX for token selection.

The "All Tokens" / "Your Tokens" tab UI addresses the PR objective perfectly, with proper active state management, per-tab loading states, and individual "Load More" buttons. The TabButton component's ghost-solid variant with bottom-border active state is clean and intuitive.

packages/thirdweb/src/react/web/ui/components/CopyIcon.tsx (1)

24-58: LGTM! Button component migration improves accessibility and styling.

Replacing the div wrapper with a Button component removes the need for manual keyboard handling (Enter/Space), as Button natively provides this accessibility. The addition of "secondaryText" color for the default state improves icon visibility, and the ghost-solid variant with radius.sm border follows design system conventions.

packages/thirdweb/src/react/web/ui/Bridge/payment-success/PaymentReceipt.tsx (6)

13-13: LGTM! Import updates are appropriate.

The new imports (radius, spacing, Line, CopyIcon, Link) are all properly utilized in the component.

Also applies to: 17-17, 19-19, 22-22


135-139: LGTM! Correct React Query v5+ API usage.

The change from isLoading to isPending aligns with React Query v5+ conventions.


153-153: LGTM! Styling improvements align with design system.

The font weight reduction (600 → 500) matches the PR objectives, and all styling uses appropriate design system tokens.

Also applies to: 161-161, 167-167, 172-186


190-190: LGTM! Layout and labeling improvements enhance clarity.

The Line separator and explicit labels ("Origin Chain", "Destination Chain") improve the visual hierarchy and make the transaction details clearer.

Also applies to: 208-252


254-272: LGTM! Clean Payment ID display with copy functionality.

The CopyIcon integration provides a good user experience for copying the payment ID.


341-364: LGTM! Container layout improvements enhance UX.

The scroll container with height constraints (maxHeight: 500px, minHeight: 400px) provides better handling for varying numbers of transactions, and the spacing adjustments improve the overall visual hierarchy.

@graphite-app
Copy link
Contributor

graphite-app bot commented Nov 10, 2025

Merge activity

<!--

## 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 various UI/UX improvements across multiple components in the `thirdweb` package, particularly enhancing visual consistency and user interaction within the Bridge and Token Selection components.

### Detailed summary
- Adjusted font weights in several components from `600` to `500`.
- Updated `Spacer` component usage for consistent spacing.
- Enhanced `TokenSelection` UI with tabbed navigation for "All Tokens" and "Your Tokens".
- Added fallback images for icons in `TokenAndChain` and `ChainButton`.
- Refactored `CopyIcon` to use a `Button` instead of a `div` for better accessibility.
- Improved loading states and skeletons in `TokenSelectionScreen`.
- Simplified conditional rendering for transaction details in `PaymentReceipt`.

> ✨ 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

* **New Features**
  * Token selection: separate "All Tokens" and "Your Tokens" tabs with per-tab paging and "Load More"
  * Payment receipts: per-transaction explorer links and copy-to-clipboard controls
  * Enhanced success/details views showing expanded per-transaction status entries

* **UI/UX Improvements**
  * Refined typography weights across Bridge screens for clearer hierarchy
  * Adjusted icon sizing and added visual fallbacks for missing chain/token icons
  * Improved spacing, alignment, scrolling and containment in Bridge layouts
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
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 (2)
packages/thirdweb/src/react/web/ui/Bridge/swap-widget/select-chain.tsx (1)

191-209: Replace hardcoded color with theme token in gradient fallback.

The fallback gradient uses a hardcoded "white" color instead of a theme color token, creating inconsistency with the design system used throughout the codebase.

Apply this diff to use a theme color:

         fallback={
           <Container color="secondaryText">
             <Container
               style={{
-                background: `linear-gradient(45deg, white, ${theme.colors.accentText})`,
+                background: `linear-gradient(45deg, ${theme.colors.secondaryButtonBg}, ${theme.colors.accentText})`,
                 borderRadius: radius.full,
                 width: `${iconSizeValue}px`,
                 height: `${iconSizeValue}px`,
               }}
             />
           </Container>
         }

As per coding guidelines

packages/thirdweb/src/react/web/ui/Bridge/swap-widget/select-token-ui.tsx (1)

673-713: Consider ARIA tab attributes for enhanced accessibility.

The current implementation is functionally accessible via the Button component, but adding proper ARIA tab attributes would improve semantics for assistive technologies.

Optionally apply this diff:

 function TabButton(props: {
   isSelected: boolean;
   onSelect: () => void;
   label: string;
 }) {
   const theme = useCustomTheme();
   return (
     <div
       style={{
         paddingBottom: "4px",
         position: "relative",
       }}
+      role="tab"
+      aria-selected={props.isSelected}
     >
       <Button
         variant="ghost-solid"
         onClick={props.onSelect}

And add role="tablist" to the parent Container at line 541:

           <Container
             flex="row"
             gap="xs"
             px="md"
             style={{ borderBottom: `1px solid ${theme.colors.borderColor}` }}
+            role="tablist"
           >
📜 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 7a1e4c1 and 763d3de.

📒 Files selected for processing (14)
  • .changeset/wild-steaks-agree.md (1 hunks)
  • packages/thirdweb/src/react/web/ui/Bridge/TransactionPayment.tsx (1 hunks)
  • packages/thirdweb/src/react/web/ui/Bridge/common/TokenAndChain.tsx (1 hunks)
  • packages/thirdweb/src/react/web/ui/Bridge/common/TokenBalanceRow.tsx (2 hunks)
  • packages/thirdweb/src/react/web/ui/Bridge/common/selected-token-button.tsx (1 hunks)
  • packages/thirdweb/src/react/web/ui/Bridge/payment-details/PaymentOverview.tsx (6 hunks)
  • packages/thirdweb/src/react/web/ui/Bridge/payment-selection/TokenSelection.tsx (1 hunks)
  • packages/thirdweb/src/react/web/ui/Bridge/payment-success/PaymentReceipt.tsx (5 hunks)
  • packages/thirdweb/src/react/web/ui/Bridge/payment-success/SuccessScreen.tsx (4 hunks)
  • packages/thirdweb/src/react/web/ui/Bridge/swap-widget/select-chain.tsx (3 hunks)
  • packages/thirdweb/src/react/web/ui/Bridge/swap-widget/select-token-ui.tsx (18 hunks)
  • packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/swap/WalletRow.tsx (1 hunks)
  • packages/thirdweb/src/react/web/ui/components/CopyIcon.tsx (3 hunks)
  • packages/thirdweb/src/react/web/ui/components/Spacer.tsx (1 hunks)
✅ Files skipped from review due to trivial changes (2)
  • packages/thirdweb/src/react/web/ui/Bridge/common/TokenAndChain.tsx
  • .changeset/wild-steaks-agree.md
🚧 Files skipped from review as they are similar to previous changes (8)
  • packages/thirdweb/src/react/web/ui/Bridge/common/selected-token-button.tsx
  • packages/thirdweb/src/react/web/ui/components/Spacer.tsx
  • packages/thirdweb/src/react/web/ui/components/CopyIcon.tsx
  • packages/thirdweb/src/react/web/ui/Bridge/common/TokenBalanceRow.tsx
  • packages/thirdweb/src/react/web/ui/Bridge/payment-details/PaymentOverview.tsx
  • packages/thirdweb/src/react/web/ui/Bridge/payment-selection/TokenSelection.tsx
  • packages/thirdweb/src/react/web/ui/Bridge/payment-success/SuccessScreen.tsx
  • packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/swap/WalletRow.tsx
🧰 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

**/*.{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:

  • packages/thirdweb/src/react/web/ui/Bridge/TransactionPayment.tsx
  • packages/thirdweb/src/react/web/ui/Bridge/payment-success/PaymentReceipt.tsx
  • packages/thirdweb/src/react/web/ui/Bridge/swap-widget/select-chain.tsx
  • packages/thirdweb/src/react/web/ui/Bridge/swap-widget/select-token-ui.tsx
**/*.{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/react/web/ui/Bridge/TransactionPayment.tsx
  • packages/thirdweb/src/react/web/ui/Bridge/payment-success/PaymentReceipt.tsx
  • packages/thirdweb/src/react/web/ui/Bridge/swap-widget/select-chain.tsx
  • packages/thirdweb/src/react/web/ui/Bridge/swap-widget/select-token-ui.tsx
packages/thirdweb/**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

packages/thirdweb/**/*.{ts,tsx}: Every public symbol must have comprehensive TSDoc with at least one compiling @example and a custom tag (@beta, @internal, @experimental, etc.)
Comment only ambiguous logic; avoid restating TypeScript in prose
Lazy‑load heavy dependencies inside async paths (e.g., const { jsPDF } = await import("jspdf"))

Files:

  • packages/thirdweb/src/react/web/ui/Bridge/TransactionPayment.tsx
  • packages/thirdweb/src/react/web/ui/Bridge/payment-success/PaymentReceipt.tsx
  • packages/thirdweb/src/react/web/ui/Bridge/swap-widget/select-chain.tsx
  • packages/thirdweb/src/react/web/ui/Bridge/swap-widget/select-token-ui.tsx
🧠 Learnings (38)
📓 Common learnings
Learnt from: MananTank
Repo: thirdweb-dev/js PR: 7307
File: apps/dashboard/src/app/nebula-app/move-funds/move-funds.tsx:324-346
Timestamp: 2025-06-09T15:15:02.350Z
Learning: In the move-funds functionality, MananTank prefers having both individual toast.promise notifications for each token transfer AND batch summary toasts, even though this creates multiple notifications. This dual notification approach is acceptable for the move-funds user experience.
Learnt from: CR
Repo: thirdweb-dev/js PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T19:19:55.613Z
Learning: Applies to apps/{dashboard,playground-web}/**/*.{ts,tsx} : Use design system tokens (e.g., `bg-card`, `border-border`, `text-muted-foreground`)
Learnt from: CR
Repo: thirdweb-dev/js PR: 0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-07-18T19:20:32.530Z
Learning: Applies to dashboard/**/*.{tsx,jsx} : Stick to design-tokens: background (`bg-card`), borders (`border-border`), muted text (`text-muted-foreground`) etc.
Learnt from: CR
Repo: thirdweb-dev/js PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-08-29T15:37:38.513Z
Learning: Applies to apps/{dashboard,playground}/**/*.{ts,tsx} : Stick to design tokens (e.g., bg-card, border-border, text-muted-foreground)
📚 Learning: 2025-10-03T23:36:00.631Z
Learnt from: MananTank
Repo: thirdweb-dev/js PR: 8181
File: packages/thirdweb/src/react/web/ui/Bridge/BuyWidget.tsx:27-27
Timestamp: 2025-10-03T23:36:00.631Z
Learning: In packages/thirdweb/src/react/web/ui/Bridge/BuyWidget.tsx, the component intentionally uses a hardcoded English locale (connectLocaleEn) rather than reading from the provider, as BuyWidget is designed to be English-only and does not require internationalization support.

Applied to files:

  • packages/thirdweb/src/react/web/ui/Bridge/TransactionPayment.tsx
  • packages/thirdweb/src/react/web/ui/Bridge/payment-success/PaymentReceipt.tsx
  • packages/thirdweb/src/react/web/ui/Bridge/swap-widget/select-chain.tsx
  • packages/thirdweb/src/react/web/ui/Bridge/swap-widget/select-token-ui.tsx
📚 Learning: 2025-06-26T19:46:04.024Z
Learnt from: gregfromstl
Repo: thirdweb-dev/js PR: 7450
File: packages/thirdweb/src/bridge/Webhook.ts:57-81
Timestamp: 2025-06-26T19:46:04.024Z
Learning: In the onramp webhook schema (`packages/thirdweb/src/bridge/Webhook.ts`), the `currencyAmount` field is intentionally typed as `z.number()` while other amount fields use `z.string()` because `currencyAmount` represents fiat currency amounts in decimals (like $10.50), whereas other amount fields represent token amounts in wei (very large integers that benefit from bigint representation). The different naming convention (`currencyAmount` vs `amount`) reflects this intentional distinction.

Applied to files:

  • packages/thirdweb/src/react/web/ui/Bridge/TransactionPayment.tsx
📚 Learning: 2025-09-23T19:56:43.668Z
Learnt from: MananTank
Repo: thirdweb-dev/js PR: 8106
File: packages/thirdweb/src/react/web/ui/ConnectWallet/Modal/ConnectEmbed.tsx:482-485
Timestamp: 2025-09-23T19:56:43.668Z
Learning: In packages/thirdweb/src/react/web/ui/ConnectWallet/Modal/ConnectEmbed.tsx, the EmbedContainer uses width: "100vw" intentionally rather than "100%" - this is by design for the bridge widget embedding use case.

Applied to files:

  • packages/thirdweb/src/react/web/ui/Bridge/TransactionPayment.tsx
  • packages/thirdweb/src/react/web/ui/Bridge/swap-widget/select-chain.tsx
  • packages/thirdweb/src/react/web/ui/Bridge/swap-widget/select-token-ui.tsx
📚 Learning: 2025-06-10T00:50:20.795Z
Learnt from: MananTank
Repo: thirdweb-dev/js PR: 7315
File: apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/assets/create/nft/launch-nft.tsx:153-226
Timestamp: 2025-06-10T00:50:20.795Z
Learning: In apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/assets/create/nft/launch-nft.tsx, the updateStatus function correctly expects a complete MultiStepState["status"] object. For pending states, { type: "pending" } is the entire status object. For error states, { type: "error", message: React.ReactNode } is the entire status object. The current code incorrectly spreads the entire step object instead of passing just the status object.

Applied to files:

  • packages/thirdweb/src/react/web/ui/Bridge/payment-success/PaymentReceipt.tsx
📚 Learning: 2025-08-20T10:35:18.543Z
Learnt from: jnsdls
Repo: thirdweb-dev/js PR: 7888
File: apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/payments/page.tsx:77-81
Timestamp: 2025-08-20T10:35:18.543Z
Learning: The webhooks/payments route exists at apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/webhooks/payments/page.tsx and was added as part of the unified project layout changes.

Applied to files:

  • packages/thirdweb/src/react/web/ui/Bridge/payment-success/PaymentReceipt.tsx
📚 Learning: 2025-07-18T19:20:32.530Z
Learnt from: CR
Repo: thirdweb-dev/js PR: 0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-07-18T19:20:32.530Z
Learning: Applies to dashboard/**/*client.tsx : Interactive UI that relies on hooks (`useState`, `useEffect`, React Query, wallet hooks).

Applied to files:

  • packages/thirdweb/src/react/web/ui/Bridge/payment-success/PaymentReceipt.tsx
  • packages/thirdweb/src/react/web/ui/Bridge/swap-widget/select-chain.tsx
  • packages/thirdweb/src/react/web/ui/Bridge/swap-widget/select-token-ui.tsx
📚 Learning: 2025-06-09T15:15:02.350Z
Learnt from: MananTank
Repo: thirdweb-dev/js PR: 7307
File: apps/dashboard/src/app/nebula-app/move-funds/move-funds.tsx:324-346
Timestamp: 2025-06-09T15:15:02.350Z
Learning: In the move-funds functionality, MananTank prefers having both individual toast.promise notifications for each token transfer AND batch summary toasts, even though this creates multiple notifications. This dual notification approach is acceptable for the move-funds user experience.

Applied to files:

  • packages/thirdweb/src/react/web/ui/Bridge/payment-success/PaymentReceipt.tsx
  • packages/thirdweb/src/react/web/ui/Bridge/swap-widget/select-token-ui.tsx
📚 Learning: 2025-10-01T22:32:18.080Z
Learnt from: MananTank
Repo: thirdweb-dev/js PR: 8169
File: packages/thirdweb/src/react/web/ui/Bridge/FundWallet.tsx:95-107
Timestamp: 2025-10-01T22:32:18.080Z
Learning: In the thirdweb-dev/js codebase, specifically for React components in packages/thirdweb/src/react/**/*.{ts,tsx} files, do not suggest adding TSDoc blocks to function components. The project maintainer MananTank has explicitly declined these suggestions.

Applied to files:

  • packages/thirdweb/src/react/web/ui/Bridge/payment-success/PaymentReceipt.tsx
📚 Learning: 2025-07-18T19:20:32.530Z
Learnt from: CR
Repo: thirdweb-dev/js PR: 0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-07-18T19:20:32.530Z
Learning: Applies to dashboard/**/*client.tsx : Anything that consumes hooks from `tanstack/react-query` or thirdweb SDKs.

Applied to files:

  • packages/thirdweb/src/react/web/ui/Bridge/payment-success/PaymentReceipt.tsx
  • packages/thirdweb/src/react/web/ui/Bridge/swap-widget/select-chain.tsx
  • packages/thirdweb/src/react/web/ui/Bridge/swap-widget/select-token-ui.tsx
📚 Learning: 2025-07-18T19:20:32.530Z
Learnt from: CR
Repo: thirdweb-dev/js PR: 0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-07-18T19:20:32.530Z
Learning: Applies to dashboard/**/*client.tsx : Use React Query (`tanstack/react-query`) for all client data fetching.

Applied to files:

  • packages/thirdweb/src/react/web/ui/Bridge/payment-success/PaymentReceipt.tsx
📚 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 apps/{dashboard,playground-web}/**/*.{ts,tsx} : Wrap client-side data fetching calls in React Query (`tanstack/react-query`)

Applied to files:

  • packages/thirdweb/src/react/web/ui/Bridge/payment-success/PaymentReceipt.tsx
📚 Learning: 2025-08-29T15:37:38.513Z
Learnt from: CR
Repo: thirdweb-dev/js PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-08-29T15:37:38.513Z
Learning: Applies to apps/{dashboard,playground}/**/*.{ts,tsx} : 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

Applied to files:

  • packages/thirdweb/src/react/web/ui/Bridge/payment-success/PaymentReceipt.tsx
📚 Learning: 2025-07-31T16:17:42.753Z
Learnt from: MananTank
Repo: thirdweb-dev/js PR: 7768
File: apps/playground-web/src/app/navLinks.ts:1-1
Timestamp: 2025-07-31T16:17:42.753Z
Learning: Configuration files that import and reference React components (like icon components from lucide-react) need the "use client" directive, even if they primarily export static data, because the referenced components need to be executed in a client context when used by other client components.

Applied to files:

  • packages/thirdweb/src/react/web/ui/Bridge/payment-success/PaymentReceipt.tsx
📚 Learning: 2025-07-18T19:20:32.530Z
Learnt from: CR
Repo: thirdweb-dev/js PR: 0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-07-18T19:20:32.530Z
Learning: Applies to dashboard/**/components/*.client.tsx : Client components must start with `'use client';` before imports.

Applied to files:

  • packages/thirdweb/src/react/web/ui/Bridge/payment-success/PaymentReceipt.tsx
  • packages/thirdweb/src/react/web/ui/Bridge/swap-widget/select-token-ui.tsx
📚 Learning: 2025-07-18T19:20:32.530Z
Learnt from: CR
Repo: thirdweb-dev/js PR: 0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-07-18T19:20:32.530Z
Learning: Applies to dashboard/**/*client.tsx : When you need access to browser APIs (localStorage, window, IntersectionObserver etc.).

Applied to files:

  • packages/thirdweb/src/react/web/ui/Bridge/payment-success/PaymentReceipt.tsx
  • packages/thirdweb/src/react/web/ui/Bridge/swap-widget/select-token-ui.tsx
📚 Learning: 2025-08-29T15:37:38.513Z
Learnt from: CR
Repo: thirdweb-dev/js PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-08-29T15:37:38.513Z
Learning: Applies to apps/{dashboard,playground}/**/*.{ts,tsx} : Client Components must start with `'use client'`; handle interactivity with hooks and browser APIs

Applied to files:

  • packages/thirdweb/src/react/web/ui/Bridge/payment-success/PaymentReceipt.tsx
  • packages/thirdweb/src/react/web/ui/Bridge/swap-widget/select-token-ui.tsx
📚 Learning: 2025-07-18T19:20:32.530Z
Learnt from: CR
Repo: thirdweb-dev/js PR: 0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-07-18T19:20:32.530Z
Learning: Applies to dashboard/**/*client.tsx : Pages requiring fast transitions where data is prefetched on the client.

Applied to files:

  • packages/thirdweb/src/react/web/ui/Bridge/payment-success/PaymentReceipt.tsx
  • packages/thirdweb/src/react/web/ui/Bridge/swap-widget/select-token-ui.tsx
📚 Learning: 2025-09-24T11:08:43.783Z
Learnt from: MananTank
Repo: thirdweb-dev/js PR: 8106
File: packages/thirdweb/src/react/web/ui/Bridge/bridge-widget/bridge-widget.tsx:34-41
Timestamp: 2025-09-24T11:08:43.783Z
Learning: In BridgeWidgetProps for packages/thirdweb/src/react/web/ui/Bridge/bridge-widget/bridge-widget.tsx, the Swap onError callback signature requires a non-undefined SwapPreparedQuote parameter (unlike Buy's onError which allows undefined quote). This is intentional - SwapWidget's onError is only called when a quote is available.

Applied to files:

  • packages/thirdweb/src/react/web/ui/Bridge/payment-success/PaymentReceipt.tsx
  • packages/thirdweb/src/react/web/ui/Bridge/swap-widget/select-chain.tsx
  • packages/thirdweb/src/react/web/ui/Bridge/swap-widget/select-token-ui.tsx
📚 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 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

Applied to files:

  • packages/thirdweb/src/react/web/ui/Bridge/swap-widget/select-chain.tsx
  • packages/thirdweb/src/react/web/ui/Bridge/swap-widget/select-token-ui.tsx
📚 Learning: 2025-07-18T19:20:32.530Z
Learnt from: CR
Repo: thirdweb-dev/js PR: 0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-07-18T19:20:32.530Z
Learning: Applies to dashboard/**/*.{tsx,jsx} : Prefer composable primitives over custom markup: `Button`, `Input`, `Select`, `Tabs`, `Card`, `Sidebar`, `Separator`, `Badge`.

Applied to files:

  • packages/thirdweb/src/react/web/ui/Bridge/swap-widget/select-chain.tsx
  • packages/thirdweb/src/react/web/ui/Bridge/swap-widget/select-token-ui.tsx
📚 Learning: 2025-08-29T15:37:38.513Z
Learnt from: CR
Repo: thirdweb-dev/js PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-08-29T15:37:38.513Z
Learning: Applies to apps/{dashboard,playground}/**/*.{ts,tsx} : Import UI primitives from `@/components/ui/_` (e.g., Button, Input, Tabs, Card)

Applied to files:

  • packages/thirdweb/src/react/web/ui/Bridge/swap-widget/select-chain.tsx
  • packages/thirdweb/src/react/web/ui/Bridge/swap-widget/select-token-ui.tsx
📚 Learning: 2025-09-17T11:14:35.659Z
Learnt from: MananTank
Repo: thirdweb-dev/js PR: 8044
File: packages/thirdweb/src/react/web/ui/Bridge/swap-widget/swap-ui.tsx:919-930
Timestamp: 2025-09-17T11:14:35.659Z
Learning: In the thirdweb codebase, useCustomTheme() hook can be used inside styled-components callbacks, contrary to the general React Rules of Hooks. This is a valid pattern in their implementation.

Applied to files:

  • packages/thirdweb/src/react/web/ui/Bridge/swap-widget/select-chain.tsx
📚 Learning: 2025-06-17T18:30:52.976Z
Learnt from: MananTank
Repo: thirdweb-dev/js PR: 7356
File: apps/nebula/src/app/not-found.tsx:1-1
Timestamp: 2025-06-17T18:30:52.976Z
Learning: In the thirdweb/js project, the React namespace is available for type annotations (like React.FC) without needing to explicitly import React. This is project-specific configuration that differs from typical TypeScript/React setups.

Applied to files:

  • packages/thirdweb/src/react/web/ui/Bridge/swap-widget/select-chain.tsx
  • packages/thirdweb/src/react/web/ui/Bridge/swap-widget/select-token-ui.tsx
📚 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 apps/{dashboard,playground-web}/**/*.{ts,tsx} : Use design system tokens (e.g., `bg-card`, `border-border`, `text-muted-foreground`)

Applied to files:

  • packages/thirdweb/src/react/web/ui/Bridge/swap-widget/select-chain.tsx
  • packages/thirdweb/src/react/web/ui/Bridge/swap-widget/select-token-ui.tsx
📚 Learning: 2025-07-18T19:20:32.530Z
Learnt from: CR
Repo: thirdweb-dev/js PR: 0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-07-18T19:20:32.530Z
Learning: Applies to dashboard/**/*.{tsx,jsx} : Responsive helpers follow mobile-first (`max-sm`, `md`, `lg`, `xl`).

Applied to files:

  • packages/thirdweb/src/react/web/ui/Bridge/swap-widget/select-chain.tsx
📚 Learning: 2025-05-29T10:49:52.981Z
Learnt from: MananTank
Repo: thirdweb-dev/js PR: 7177
File: apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/public-pages/erc20/_components/ContractHeader.tsx:26-43
Timestamp: 2025-05-29T10:49:52.981Z
Learning: In React image components, conditional rendering of the entire image container (e.g., `{props.image && <Img />}`) serves a different purpose than fallback handling. The conditional prevents rendering any image UI when no image metadata exists, while the fallback prop handles cases where image metadata exists but the image fails to load. This pattern is intentional to distinguish between "no image intended" vs "image intended but failed to load".

Applied to files:

  • packages/thirdweb/src/react/web/ui/Bridge/swap-widget/select-chain.tsx
📚 Learning: 2025-08-09T15:37:30.990Z
Learnt from: MananTank
Repo: thirdweb-dev/js PR: 7822
File: apps/dashboard/src/@/components/contracts/contract-card/contract-publisher.tsx:22-31
Timestamp: 2025-08-09T15:37:30.990Z
Learning: The Img component at apps/dashboard/src/@/components/blocks/Img.tsx properly handles empty string src values by immediately setting status to "fallback" and converting empty strings to undefined in the img element's src attribute, preventing unnecessary network requests.

Applied to files:

  • packages/thirdweb/src/react/web/ui/Bridge/swap-widget/select-chain.tsx
📚 Learning: 2025-07-18T19:20:32.530Z
Learnt from: CR
Repo: thirdweb-dev/js PR: 0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-07-18T19:20:32.530Z
Learning: Applies to dashboard/**/*.{tsx,jsx} : Stick to design-tokens: background (`bg-card`), borders (`border-border`), muted text (`text-muted-foreground`) etc.

Applied to files:

  • packages/thirdweb/src/react/web/ui/Bridge/swap-widget/select-token-ui.tsx
📚 Learning: 2025-09-18T20:09:57.064Z
Learnt from: MananTank
Repo: thirdweb-dev/js PR: 8069
File: apps/playground-web/src/app/bridge/swap-widget/components/types.ts:3-12
Timestamp: 2025-09-18T20:09:57.064Z
Learning: The SwapWidgetPlaygroundOptions type should not include persistTokenSelections - the playground intentionally hardcodes persistTokenSelections={false} and doesn't expose it as a configurable option to users.

Applied to files:

  • packages/thirdweb/src/react/web/ui/Bridge/swap-widget/select-token-ui.tsx
📚 Learning: 2025-05-30T17:14:25.332Z
Learnt from: MananTank
Repo: thirdweb-dev/js PR: 7227
File: apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/OpenEditionMetadata.tsx:26-26
Timestamp: 2025-05-30T17:14:25.332Z
Learning: The ModuleCardUIProps interface already includes a client prop of type ThirdwebClient, so when components use `Omit<ModuleCardUIProps, "children" | "updateButton">`, they inherit the client prop without needing to add it explicitly.

Applied to files:

  • packages/thirdweb/src/react/web/ui/Bridge/swap-widget/select-token-ui.tsx
📚 Learning: 2025-06-06T23:46:08.795Z
Learnt from: MananTank
Repo: thirdweb-dev/js PR: 7298
File: apps/dashboard/src/app/nebula-app/move-funds/move-funds.tsx:424-424
Timestamp: 2025-06-06T23:46:08.795Z
Learning: The thirdweb project has an ESLint rule that restricts direct usage of `defineChain`. When it's necessary to use `defineChain` directly, it's acceptable to disable the rule with `// eslint-disable-next-line no-restricted-syntax`.

Applied to files:

  • packages/thirdweb/src/react/web/ui/Bridge/swap-widget/select-token-ui.tsx
📚 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 apps/{dashboard,playground-web}/**/*.{ts,tsx} : Client Components (browser): Begin files with `'use client';`

Applied to files:

  • packages/thirdweb/src/react/web/ui/Bridge/swap-widget/select-token-ui.tsx
📚 Learning: 2025-07-02T20:04:53.982Z
Learnt from: MananTank
Repo: thirdweb-dev/js PR: 7505
File: apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/webhooks/components/webhook-metrics.tsx:40-40
Timestamp: 2025-07-02T20:04:53.982Z
Learning: The Spinner component imported from "@/components/ui/Spinner/Spinner" in the dashboard accepts a className prop, not a size prop. The correct usage is <Spinner className="size-4" />, not <Spinner size="sm" />. The component defaults to "size-4" if no className is provided.

Applied to files:

  • packages/thirdweb/src/react/web/ui/Bridge/swap-widget/select-token-ui.tsx
📚 Learning: 2025-07-18T19:20:32.530Z
Learnt from: CR
Repo: thirdweb-dev/js PR: 0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-07-18T19:20:32.530Z
Learning: Applies to dashboard/**/*.{tsx,jsx} : Use the `container` class with a `max-w-7xl` cap for page width consistency.

Applied to files:

  • packages/thirdweb/src/react/web/ui/Bridge/swap-widget/select-token-ui.tsx
📚 Learning: 2025-07-18T19:20:32.530Z
Learnt from: CR
Repo: thirdweb-dev/js PR: 0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-07-18T19:20:32.530Z
Learning: Applies to dashboard/**/layout.tsx : Building layout shells (`layout.tsx`) and top-level pages that mainly assemble data.

Applied to files:

  • packages/thirdweb/src/react/web/ui/Bridge/swap-widget/select-token-ui.tsx
📚 Learning: 2025-07-18T19:20:32.530Z
Learnt from: CR
Repo: thirdweb-dev/js PR: 0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-07-18T19:20:32.530Z
Learning: Applies to dashboard/**/*.{tsx,jsx} : For notices & skeletons rely on `AnnouncementBanner`, `GenericLoadingPage`, `EmptyStateCard`.

Applied to files:

  • packages/thirdweb/src/react/web/ui/Bridge/swap-widget/select-token-ui.tsx
📚 Learning: 2025-07-18T19:20:32.530Z
Learnt from: CR
Repo: thirdweb-dev/js PR: 0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-07-18T19:20:32.530Z
Learning: Applies to dashboard/**/*.{tsx,jsx} : Reuse core UI primitives; avoid re-implementing buttons, cards, modals.

Applied to files:

  • packages/thirdweb/src/react/web/ui/Bridge/swap-widget/select-token-ui.tsx
🧬 Code graph analysis (4)
packages/thirdweb/src/react/web/ui/Bridge/TransactionPayment.tsx (1)
packages/thirdweb/src/react/web/ui/components/text.tsx (1)
  • Text (18-34)
packages/thirdweb/src/react/web/ui/Bridge/payment-success/PaymentReceipt.tsx (8)
packages/thirdweb/src/react/web/ui/components/Skeleton.tsx (1)
  • Skeleton (10-28)
packages/thirdweb/src/react/core/design-system/index.ts (2)
  • radius (156-164)
  • spacing (142-154)
packages/thirdweb/src/react/web/ui/components/basic.tsx (3)
  • Container (80-193)
  • Line (70-75)
  • ModalHeader (36-68)
packages/thirdweb/src/react/web/ui/components/text.tsx (2)
  • Text (18-34)
  • Link (46-64)
packages/thirdweb/src/react/web/ui/components/ChainName.tsx (1)
  • shorterChainName (32-40)
packages/thirdweb/src/react/web/ui/components/CopyIcon.tsx (1)
  • CopyIcon (12-60)
packages/thirdweb/src/exports/utils.ts (1)
  • shortenHex (150-150)
packages/thirdweb/src/react/web/ui/components/Spacer.tsx (1)
  • Spacer (6-15)
packages/thirdweb/src/react/web/ui/Bridge/swap-widget/select-chain.tsx (2)
packages/thirdweb/src/react/core/design-system/index.ts (2)
  • iconSize (166-176)
  • radius (156-164)
packages/thirdweb/src/react/web/ui/components/basic.tsx (1)
  • Container (80-193)
packages/thirdweb/src/react/web/ui/Bridge/swap-widget/select-token-ui.tsx (7)
packages/thirdweb/src/react/web/ui/Bridge/swap-widget/use-bridge-chains.ts (1)
  • useBridgeChains (5-14)
packages/thirdweb/src/react/web/ui/Bridge/swap-widget/use-tokens.ts (2)
  • useTokenBalances (74-123)
  • TokenBalance (42-60)
packages/thirdweb/src/react/web/ui/components/Spacer.tsx (1)
  • Spacer (6-15)
packages/thirdweb/src/react/web/ui/components/basic.tsx (1)
  • Container (80-193)
packages/thirdweb/src/react/core/design-system/index.ts (2)
  • spacing (142-154)
  • fontSize (132-140)
packages/thirdweb/src/react/web/ui/components/buttons.tsx (1)
  • Button (27-161)
packages/thirdweb/src/react/web/ui/components/text.tsx (1)
  • Text (18-34)
⏰ 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). (7)
  • GitHub Check: Size
  • GitHub Check: Unit Tests
  • GitHub Check: Build Packages
  • GitHub Check: E2E Tests (pnpm, esbuild)
  • GitHub Check: E2E Tests (pnpm, vite)
  • GitHub Check: Lint Packages
  • GitHub Check: Analyze (javascript)
🔇 Additional comments (7)
packages/thirdweb/src/react/web/ui/Bridge/TransactionPayment.tsx (1)

222-222: LGTM — Typography weight update aligns with design system.

The font weight reduction from 600 to 500 is consistent with the broader UI/UX improvements across Bridge components mentioned in the PR objectives.

packages/thirdweb/src/react/web/ui/Bridge/swap-widget/select-chain.tsx (1)

174-175: LGTM — Responsive icon sizing improves consistency.

The iconSizeValue computation based on isMobile unifies icon sizing logic and makes the component more maintainable.

packages/thirdweb/src/react/web/ui/Bridge/payment-success/PaymentReceipt.tsx (3)

135-139: LGTM — Simplified loading state improves UX.

The switch from isLoading to isPending follows standard React Query patterns, and the simplified skeleton (single element vs. multiple elements) provides a cleaner loading experience.


274-307: LGTM — Transaction hash rendering meets PR objectives.

The per-transaction rendering with copyable hashes and explorer links directly addresses the PR objective: "Include transaction hashes in the UI with links to the project's transaction page and make hashes copyable."


121-125: The review comment is incorrect and can be disregarded.

CompletedStepDetailCard is an internal component not exported from the module. Removing the onCopyToClipboard prop is an internal refactoring and does not constitute a breaking change for external API consumers. Only PaymentReceipt is exported from this file, making CompletedStepDetailCardProps an internal implementation detail rather than part of the public API surface requiring changelog documentation.

Likely an incorrect or invalid review comment.

packages/thirdweb/src/react/web/ui/Bridge/swap-widget/select-token-ui.tsx (2)

1-1: LGTM! Pagination setup is well-structured.

The per-tab pagination limits (100 for all tokens, 50 for owned tokens) align with the PR objectives. The setSearch callback correctly resets both limits when the search changes, ensuring pagination starts fresh with each new search query.

Also applies to: 53-54, 61-64, 107-111


116-134: LGTM! Well-structured data flow enables per-tab pagination.

The enriched token data structures (data, isFetching, showMore) cleanly separate concerns and enable independent pagination control for each tab. The owned tokens pagination uses the API's hasMore signal (line 119), while all tokens use a length-based heuristic (line 129) — both approaches are appropriate for their respective data sources.

Comment on lines +470 to +478
const [activeTab, setActiveTab] = useState<"owned" | "all">("all");
const showSkeletons =
(props.allTokens.isFetching && activeTab === "all") ||
(props.ownedTokens.isFetching && activeTab === "owned");

const showNoTokensFound =
(activeTab === "all" && noAllTokensFound) ||
(activeTab === "owned" && noOwnedTokensFound);

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 | 🟡 Minor

Reset tab to "All Tokens" when wallet disconnects.

If the user switches to the "Your Tokens" tab and then disconnects their wallet, activeTab remains "owned" even though the tabs are hidden. The component then renders the owned-tokens branch (lines 582–597), which displays "No Tokens Found" instead of falling back to the all-tokens list. This creates a confusing experience when the wallet disconnects.

Apply this diff to reset the tab when the wallet disconnects:

+import { useCallback, useEffect, useMemo, useState } from "react";

Then add this effect inside TokenSelectionScreen:

  useEffect(() => {
    if (!props.isWalletConnected && activeTab === "owned") {
      setActiveTab("all");
    }
  }, [props.isWalletConnected, activeTab]);
🤖 Prompt for AI Agents
In packages/thirdweb/src/react/web/ui/Bridge/swap-widget/select-token-ui.tsx
around lines 470 to 478, activeTab can remain "owned" after the wallet
disconnects (tabs get hidden) causing the component to render the owned-tokens
branch and show "No Tokens Found"; add a useEffect that watches
props.isWalletConnected and activeTab and, if props.isWalletConnected is false
and activeTab === "owned", calls setActiveTab("all") to reset to the All Tokens
tab so the UI falls back correctly.

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