Skip to content

Conversation

@joaquim-verges
Copy link
Member

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


PR-Codex overview

This PR focuses on restructuring the payment-related sections of the application to introduce a new x402 payment protocol, updating links, descriptions, and sidebar navigation to reflect this change.

Detailed summary

  • Updated href and name for the Payments section to x402.
  • Changed descriptions and titles in several ArticleCardIndex components.
  • Modified links in multiple markdown files to point to the new bridge structure.
  • Renamed sections and headers in page.mdx files to align with x402.
  • Updated sidebar navigation to include x402 related links.
  • Added new metadata and layout components for x402.
  • Adjusted price configuration details in the server documentation.

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

Summary by CodeRabbit

  • New Features

    • Added x402 section to header, learning resources, and documentation navigation.
    • Added redirects for legacy payment docs to new /x402 and /bridge routes.
  • Documentation

    • New x402 docs layout, sidebar and metadata.
    • Expanded chain & token support details (170+ EVM chains) and clearer token/pricing guidance with updated examples.
    • Updated many internal links from /payments/* to /bridge/* and adjusted bridge guides/navigation.

@vercel
Copy link

vercel bot commented Nov 9, 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 1:17am
4 Skipped Deployments
Project Deployment Preview Comments Updated (UTC)
nebula Skipped Skipped Nov 10, 2025 1:17am
thirdweb_playground Skipped Skipped Nov 10, 2025 1:17am
thirdweb-www Skipped Skipped Nov 10, 2025 1:17am
wallet-ui Skipped Skipped Nov 10, 2025 1:17am

@vercel vercel bot temporarily deployed to Preview – thirdweb_playground November 9, 2025 23:56 Inactive
@vercel vercel bot temporarily deployed to Preview – nebula November 9, 2025 23:56 Inactive
@changeset-bot
Copy link

changeset-bot bot commented Nov 9, 2025

⚠️ No Changeset found

Latest commit: 7923a8a

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

This PR includes no changesets

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

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

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

@vercel vercel bot temporarily deployed to Preview – thirdweb-www November 9, 2025 23:57 Inactive
@vercel vercel bot temporarily deployed to Preview – wallet-ui November 9, 2025 23:57 Inactive
@github-actions github-actions bot added the Portal Involves changes to the Portal (docs) codebase. label Nov 9, 2025
Copy link
Member Author


How to use the Graphite Merge Queue

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

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

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

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

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

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

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 9, 2025

Walkthrough

Rehomes x402 docs and routes from /payments/x402/* to /x402/*: adds redirects, exposes x402 in header and learning resources, removes x402 from Payments sidebar, adds a dedicated x402 sidebar and layout, and updates multiple MDX pages and internal links to use the new /x402 and /bridge paths.

Changes

Cohort / File(s) Summary
Route redirects
apps/portal/redirects.mjs
Added redirect mappings from /payments/x402 and related /payments/* paths to new /x402/* and /bridge/* targets to preserve backward compatibility.
Header & Learning resources
apps/portal/src/app/Header.tsx, apps/portal/src/app/page.tsx
Replaced top-level "Payments" link with x402 (href /x402) and updated learning resources/cards to reference /x402.
Payments sidebar removal
apps/portal/src/app/payments/sidebar.tsx
Removed the collapsed x402 subsection (Get Started, Client Side, Server Side, Agents, Facilitator) and its separator.
x402 sidebar added
apps/portal/src/app/x402/sidebar.tsx
Added exported sidebar constant defining navigation for x402: Get Started, Playground, Guides (Client, Server, Agents, Facilitator), and API References.
x402 layout
apps/portal/src/app/x402/layout.tsx
New async React layout component exporting default Layout and metadata, rendering DocLayout with edit button and the x402 sidebar.
x402 MDX updates
apps/portal/src/app/x402/page.mdx, apps/portal/src/app/x402/client/page.mdx, apps/portal/src/app/x402/server/page.mdx, apps/portal/src/app/x402/facilitator/page.mdx
Updated content and links: linked x402 reference, added "Chain and token support" (170+ EVM chains), changed client HTTP tab heading, expanded server token/pricing guidance and examples, and clarified facilitator token/chain statements.
Bridge docs link fixes
apps/portal/src/app/bridge/*.mdx (e.g., custom-data/page.mdx, fund/page.mdx, page.mdx, products/page.mdx, sell/page.mdx, send/page.mdx, swap/page.mdx, tokens/page.mdx, transactions/page.mdx, webhooks/page.mdx)
Updated many internal links from /payments/... to /bridge/..., adjusted token price structure in tokens page, and reworked Guide links and ordering in bridge sidebar.
Bridge sidebar updates
apps/portal/src/app/bridge/sidebar.tsx
Removed Sell Tokens collapsible, added/reshuffled Guide entries (BridgeWidget Script, Fund Wallets, Sell a Product, Pay for Transactions, Send a Payment, Custom Data, Webhooks), and reordered items.

Sequence Diagram(s)

sequenceDiagram
    participant Browser
    participant NextRouter as Next.js Router / Server
    participant DocApp as Docs App (/x402)

    note over Browser,NextRouter `#D3E5FF`: Request to legacy route
    Browser->>NextRouter: GET /payments/x402 or /payments/x402/<path>
    alt redirect rule matches
        NextRouter-->>Browser: 307 Redirect -> /x402 or /x402/<path>
        Browser->>DocApp: GET /x402 or /x402/<path>
        DocApp-->>Browser: 200 OK (x402 page)
    else no match
        NextRouter-->>Browser: 404 / other handling
    end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

  • Areas needing extra attention:
    • Redirect mappings in apps/portal/redirects.mjs (ensure all legacy paths covered, test trailing slashes and wildcard params).
    • New apps/portal/src/app/x402/layout.tsx exports and metadata typing.
    • Multiple MDX link updates across bridge and x402 pages—verify links and examples (numeric units, token addresses, and network fields).

Possibly related PRs

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: moving x402 from the payments section to a top-level section in the portal navigation.
Description check ✅ Passed The description is mostly complete with a clear PR-Codex overview summarizing the restructuring changes, though it lacks explicit sections for Notes for reviewer and How to test as specified in the template.
✨ 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 _Portal_Move_x402_from_payments_to_top-level_section

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between da26cc9 and 7923a8a.

⛔ Files ignored due to path filters (1)
  • apps/portal/src/app/x402/server/x402-protocol-flow.png is excluded by !**/*.png
📒 Files selected for processing (21)
  • apps/portal/redirects.mjs (1 hunks)
  • apps/portal/src/app/Header.tsx (1 hunks)
  • apps/portal/src/app/bridge/custom-data/page.mdx (1 hunks)
  • apps/portal/src/app/bridge/fund/page.mdx (1 hunks)
  • apps/portal/src/app/bridge/page.mdx (1 hunks)
  • apps/portal/src/app/bridge/products/page.mdx (1 hunks)
  • apps/portal/src/app/bridge/sell/page.mdx (1 hunks)
  • apps/portal/src/app/bridge/send/page.mdx (1 hunks)
  • apps/portal/src/app/bridge/sidebar.tsx (1 hunks)
  • apps/portal/src/app/bridge/swap/page.mdx (1 hunks)
  • apps/portal/src/app/bridge/tokens/page.mdx (2 hunks)
  • apps/portal/src/app/bridge/transactions/page.mdx (1 hunks)
  • apps/portal/src/app/bridge/webhooks/page.mdx (1 hunks)
  • apps/portal/src/app/page.tsx (1 hunks)
  • apps/portal/src/app/payments/sidebar.tsx (0 hunks)
  • apps/portal/src/app/x402/client/page.mdx (1 hunks)
  • apps/portal/src/app/x402/facilitator/page.mdx (1 hunks)
  • apps/portal/src/app/x402/layout.tsx (1 hunks)
  • apps/portal/src/app/x402/page.mdx (5 hunks)
  • apps/portal/src/app/x402/server/page.mdx (1 hunks)
  • apps/portal/src/app/x402/sidebar.tsx (1 hunks)
💤 Files with no reviewable changes (1)
  • apps/portal/src/app/payments/sidebar.tsx
✅ Files skipped from review due to trivial changes (2)
  • apps/portal/src/app/bridge/webhooks/page.mdx
  • apps/portal/src/app/bridge/products/page.mdx
🚧 Files skipped from review as they are similar to previous changes (7)
  • apps/portal/src/app/x402/layout.tsx
  • apps/portal/redirects.mjs
  • apps/portal/src/app/Header.tsx
  • apps/portal/src/app/x402/client/page.mdx
  • apps/portal/src/app/page.tsx
  • apps/portal/src/app/x402/server/page.mdx
  • apps/portal/src/app/x402/facilitator/page.mdx
🧰 Additional context used
📓 Path-based instructions (2)
**/*.{ts,tsx}

📄 CodeRabbit inference engine (CLAUDE.md)

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

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

Files:

  • apps/portal/src/app/x402/sidebar.tsx
  • apps/portal/src/app/bridge/sidebar.tsx
**/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (CLAUDE.md)

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

Files:

  • apps/portal/src/app/x402/sidebar.tsx
  • apps/portal/src/app/bridge/sidebar.tsx
🧠 Learnings (28)
📓 Common learnings
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.
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 PR #7888.
📚 Learning: 2025-05-27T19:55:25.056Z
Learnt from: MananTank
Repo: thirdweb-dev/js PR: 7177
File: apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/public-pages/erc20/_hooks/useTokenPriceData.ts:49-49
Timestamp: 2025-05-27T19:55:25.056Z
Learning: In the ERC20 public pages token price data hook (`useTokenPriceData.ts`), direct array access on `json.data[0]` without optional chaining is intentionally correct and should not be changed to use safety checks.

Applied to files:

  • apps/portal/src/app/bridge/tokens/page.mdx
📚 Learning: 2025-08-27T22:11:41.748Z
Learnt from: MananTank
Repo: thirdweb-dev/js PR: 7933
File: apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/tokens/create/token/create-token-page-impl.tsx:465-473
Timestamp: 2025-08-27T22:11:41.748Z
Learning: In the token creation flow (create-token-page-impl.tsx), the createTokenOnUniversalBridge() call is intentionally not awaited (fire-and-forget pattern) to allow the token creation process to complete immediately without waiting for the bridge operation. This is a deliberate design choice to prioritize user experience by not blocking the main flow with supplementary bridge operations.

Applied to files:

  • apps/portal/src/app/bridge/tokens/page.mdx
📚 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:

  • apps/portal/src/app/bridge/tokens/page.mdx
  • apps/portal/src/app/bridge/sell/page.mdx
  • apps/portal/src/app/bridge/transactions/page.mdx
  • apps/portal/src/app/bridge/page.mdx
  • apps/portal/src/app/bridge/swap/page.mdx
  • apps/portal/src/app/bridge/custom-data/page.mdx
  • apps/portal/src/app/bridge/send/page.mdx
  • apps/portal/src/app/bridge/fund/page.mdx
  • apps/portal/src/app/bridge/sidebar.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 PR #7888.

Applied to files:

  • apps/portal/src/app/bridge/transactions/page.mdx
  • apps/portal/src/app/bridge/page.mdx
  • apps/portal/src/app/bridge/swap/page.mdx
  • apps/portal/src/app/bridge/custom-data/page.mdx
  • apps/portal/src/app/bridge/send/page.mdx
  • apps/portal/src/app/bridge/fund/page.mdx
📚 Learning: 2025-07-18T19:19:55.613Z
Learnt from: CR
Repo: thirdweb-dev/js PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T19:19:55.613Z
Learning: Applies to packages/thirdweb/src/wallets/** : EIP-1193, EIP-5792, EIP-7702 standard support in wallet modules

Applied to files:

  • apps/portal/src/app/x402/page.mdx
📚 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: Surface breaking changes prominently in PR descriptions

Applied to files:

  • apps/portal/src/app/x402/page.mdx
  • apps/portal/src/app/bridge/swap/page.mdx
  • apps/portal/src/app/bridge/fund/page.mdx
📚 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 `NavLink` for internal navigation with automatic active states in dashboard and playground apps

Applied to files:

  • apps/portal/src/app/bridge/swap/page.mdx
  • apps/portal/src/app/x402/sidebar.tsx
📚 Learning: 2025-08-07T20:43:21.864Z
Learnt from: MananTank
Repo: thirdweb-dev/js PR: 7812
File: apps/dashboard/src/app/(app)/(dashboard)/published-contract/components/token-banner.tsx:48-60
Timestamp: 2025-08-07T20:43:21.864Z
Learning: In the TokenBanner component at apps/dashboard/src/app/(app)/(dashboard)/published-contract/components/token-banner.tsx, the Link components use target="_blank" with internal application routes (starting with "/") to open pages in new tabs within the same application. These internal links do not require rel="noopener noreferrer" security attributes, which are only needed for external URLs.

Applied to files:

  • apps/portal/src/app/bridge/swap/page.mdx
  • apps/portal/src/app/bridge/sidebar.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} : Use `NavLink` for internal navigation to get active state handling

Applied to files:

  • apps/portal/src/app/bridge/swap/page.mdx
📚 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 `NavLink` (`@/components/ui/NavLink`) for internal navigation so active states are handled automatically.

Applied to files:

  • apps/portal/src/app/bridge/swap/page.mdx
  • apps/portal/src/app/x402/sidebar.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} : Layouts should reuse `SidebarLayout` / `FullWidthSidebarLayout` (`@/components/blocks/SidebarLayout`).

Applied to files:

  • apps/portal/src/app/x402/sidebar.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:

  • apps/portal/src/app/x402/sidebar.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} : Server Components (Node edge): Start files with `import "server-only";`

Applied to files:

  • apps/portal/src/app/x402/sidebar.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 src/exports/react.native.ts : React Native specific exports are in `src/exports/react.native.ts`

Applied to files:

  • apps/portal/src/app/x402/sidebar.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}/**/*.stories.tsx : Add Storybook stories (`*.stories.tsx`) alongside new UI components

Applied to files:

  • apps/portal/src/app/x402/sidebar.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}/**/feature/components/**/index.ts : Expose a barrel `index.ts` when necessary for feature components

Applied to files:

  • apps/portal/src/app/x402/sidebar.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:

  • apps/portal/src/app/x402/sidebar.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/**/index.ts : Group related components in their own folder and expose a single barrel `index.ts` where necessary.

Applied to files:

  • apps/portal/src/app/x402/sidebar.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:

  • apps/portal/src/app/x402/sidebar.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:

  • apps/portal/src/app/x402/sidebar.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:

  • apps/portal/src/app/x402/sidebar.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:

  • apps/portal/src/app/x402/sidebar.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:

  • apps/portal/src/app/x402/sidebar.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:

  • apps/portal/src/app/x402/sidebar.tsx
📚 Learning: 2025-08-20T10:37:10.123Z
Learnt from: jnsdls
Repo: thirdweb-dev/js PR: 7888
File: apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/settings/wallets/page.tsx:1-1
Timestamp: 2025-08-20T10:37:10.123Z
Learning: In apps/dashboard, prefer importing UI components from "workspace/ui/components/*" where possible, as per jnsdls preference, rather than from "@/components/ui/*".

Applied to files:

  • apps/portal/src/app/x402/sidebar.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:

  • apps/portal/src/app/x402/sidebar.tsx
📚 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:

  • apps/portal/src/app/bridge/sidebar.tsx
🧬 Code graph analysis (1)
apps/portal/src/app/x402/sidebar.tsx (4)
apps/portal/src/app/bridge/sidebar.tsx (1)
  • sidebar (8-115)
apps/portal/src/app/payments/sidebar.tsx (1)
  • sidebar (8-116)
apps/portal/src/components/Layouts/DocLayout.tsx (1)
  • SideBar (10-13)
apps/portal/src/icons/index.ts (6)
  • ExternalLinkIcon (4-4)
  • EngineIcon (11-11)
  • TypeScriptIcon (22-22)
  • ReactIcon (21-21)
  • UnityIcon (23-23)
  • UnrealEngineIcon (24-24)
🪛 LanguageTool
apps/portal/src/app/x402/page.mdx

[grammar] ~53-~53: Use a hyphen to join words.
Context: ...o use the thirdweb API to fetch any x402 compatible endpoint and pay for it with ...

(QB_NEW_EN_HYPHEN)


[grammar] ~53-~53: Use a hyphen to join words.
Context: ...he authenticated wallet. See the client side docs for more detail...

(QB_NEW_EN_HYPHEN)


[grammar] ~99-~99: Use a hyphen to join words.
Context: ... for multiple endpoints, see the server side docs for more detail...

(QB_NEW_EN_HYPHEN)


[grammar] ~99-~99: Ensure spelling is correct
Context: ...cilitator) handles settling the payment onchain using your own server wallet. ## Going...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)

⏰ 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). (6)
  • GitHub Check: Unit Tests
  • GitHub Check: Size
  • GitHub Check: E2E Tests (pnpm, vite)
  • GitHub Check: E2E Tests (pnpm, webpack)
  • GitHub Check: Lint Packages
  • GitHub Check: Analyze (javascript)
🔇 Additional comments (15)
apps/portal/src/app/bridge/page.mdx (1)

100-100: Link update is correct and verified.

The documentation link has been properly updated from /payments/send to /bridge/send. The target page exists at apps/portal/src/app/bridge/send/page.mdx, and the change correctly aligns with the PR's route restructuring.

apps/portal/src/app/bridge/custom-data/page.mdx (1)

191-192: Path updates look good.

The navigation links have been correctly updated from /payments/* to /bridge/*, aligning with the documentation reorganization.

apps/portal/src/app/bridge/transactions/page.mdx (1)

89-90: Path updates are correct.

Navigation links properly updated to reference the new /bridge/* paths.

apps/portal/src/app/bridge/fund/page.mdx (1)

77-78: Navigation updates look good.

The links have been correctly migrated to the /bridge/* namespace.

apps/portal/src/app/bridge/sidebar.tsx (1)

23-58: Sidebar reorganization looks good.

The Guides section has been properly expanded with new navigation items, all correctly pointing to /bridge/* paths. The structure is consistent and well-organized.

apps/portal/src/app/bridge/sell/page.mdx (2)

55-55: Path update is correct.

The inline reference to "Send a Payment" now points to the correct /bridge/send path.


62-62: Navigation link updated correctly.

The "Going further" section link now uses the updated /bridge/send path.

apps/portal/src/app/bridge/send/page.mdx (1)

265-266: Navigation paths updated correctly.

The "Going further" links now properly reference /bridge/products and /bridge/tokens.

apps/portal/src/app/bridge/swap/page.mdx (1)

320-322: Navigation updates are correct.

The "Going Further" section links now properly use the /bridge/* paths for Send a Payment and Webhooks.

apps/portal/src/app/bridge/tokens/page.mdx (2)

62-72: API documentation update looks good.

The price structure has been updated to document the new multi-currency prices object format, replacing the simple priceUsd field. The currency codes and example rates are appropriate for documentation purposes.


131-131: Navigation link updated correctly.

The "Send a Payment" link now references the correct /bridge/send path.

apps/portal/src/app/x402/sidebar.tsx (1)

6-77: Well-structured sidebar navigation.

The x402 sidebar provides clean, organized navigation with logical grouping of guides and API references. The consistent use of the x402Slug constant promotes maintainability, and the structure aligns with established patterns in other sidebar files (bridge, payments).

apps/portal/src/app/x402/page.mdx (3)

15-15: Good improvement to protocol discoverability.

Converting the plain x402 reference to a hyperlink makes it easier for users to learn more about the protocol specification.


25-32: Valuable addition documenting technical requirements.

The new "Chain and token support" section provides clear, actionable information about supported chains and token standards. The specific technical requirements (ERC-2612, ERC-3009) help developers understand compatibility constraints upfront.


108-108: Navigation cards updated consistently.

The "Going Further" section card links have been correctly updated to reflect the new top-level /x402/* paths, ensuring consistent navigation throughout the documentation.

Also applies to: 114-114, 120-120

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.

@joaquim-verges joaquim-verges marked this pull request as ready for review November 9, 2025 23:57
@joaquim-verges joaquim-verges requested review from a team as code owners November 9, 2025 23:57
@codecov
Copy link

codecov bot commented Nov 9, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 54.64%. Comparing base (673e51b) to head (7923a8a).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #8386   +/-   ##
=======================================
  Coverage   54.64%   54.64%           
=======================================
  Files         919      919           
  Lines       60704    60704           
  Branches     4112     4112           
=======================================
  Hits        33171    33171           
+ Misses      27432    27431    -1     
- Partials      101      102    +1     
Flag Coverage Δ
packages 54.64% <ø> (ø)
see 1 file 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.

@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%)

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

🧹 Nitpick comments (1)
apps/portal/src/app/x402/page.mdx (1)

4-11: Consider updating metadata to reflect top-level documentation structure.

The metadata still references "x402 Payments" and uses the "payments" icon, but this page is now a top-level x402 section rather than a payments subsection. While not a blocker (the content is appropriate), consider updating the icon or description to align with the new structural hierarchy.

📜 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 f5d5e73 and da26cc9.

⛔ Files ignored due to path filters (1)
  • apps/portal/src/app/x402/server/x402-protocol-flow.png is excluded by !**/*.png
📒 Files selected for processing (10)
  • apps/portal/redirects.mjs (1 hunks)
  • apps/portal/src/app/Header.tsx (1 hunks)
  • apps/portal/src/app/page.tsx (1 hunks)
  • apps/portal/src/app/payments/sidebar.tsx (0 hunks)
  • apps/portal/src/app/x402/client/page.mdx (1 hunks)
  • apps/portal/src/app/x402/facilitator/page.mdx (1 hunks)
  • apps/portal/src/app/x402/layout.tsx (1 hunks)
  • apps/portal/src/app/x402/page.mdx (5 hunks)
  • apps/portal/src/app/x402/server/page.mdx (1 hunks)
  • apps/portal/src/app/x402/sidebar.tsx (1 hunks)
💤 Files with no reviewable changes (1)
  • apps/portal/src/app/payments/sidebar.tsx
🧰 Additional context used
📓 Path-based instructions (2)
**/*.{ts,tsx}

📄 CodeRabbit inference engine (CLAUDE.md)

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

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

Files:

  • apps/portal/src/app/Header.tsx
  • apps/portal/src/app/page.tsx
  • apps/portal/src/app/x402/sidebar.tsx
  • apps/portal/src/app/x402/layout.tsx
**/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (CLAUDE.md)

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

Files:

  • apps/portal/src/app/Header.tsx
  • apps/portal/src/app/page.tsx
  • apps/portal/src/app/x402/sidebar.tsx
  • apps/portal/src/app/x402/layout.tsx
🧠 Learnings (21)
📚 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:

  • apps/portal/src/app/x402/client/page.mdx
  • apps/portal/src/app/page.tsx
  • apps/portal/redirects.mjs
  • apps/portal/src/app/x402/layout.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 `NavLink` for internal navigation with automatic active states in dashboard and playground apps

Applied to files:

  • apps/portal/src/app/Header.tsx
  • apps/portal/src/app/x402/sidebar.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} : Use `NavLink` for internal navigation to get active state handling

Applied to files:

  • apps/portal/src/app/Header.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 `NavLink` (`@/components/ui/NavLink`) for internal navigation so active states are handled automatically.

Applied to files:

  • apps/portal/src/app/Header.tsx
📚 Learning: 2025-08-07T20:43:21.864Z
Learnt from: MananTank
Repo: thirdweb-dev/js PR: 7812
File: apps/dashboard/src/app/(app)/(dashboard)/published-contract/components/token-banner.tsx:48-60
Timestamp: 2025-08-07T20:43:21.864Z
Learning: In the TokenBanner component at apps/dashboard/src/app/(app)/(dashboard)/published-contract/components/token-banner.tsx, the Link components use target="_blank" with internal application routes (starting with "/") to open pages in new tabs within the same application. These internal links do not require rel="noopener noreferrer" security attributes, which are only needed for external URLs.

Applied to files:

  • apps/portal/src/app/Header.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 PR #7888.

Applied to files:

  • apps/portal/src/app/page.tsx
  • apps/portal/redirects.mjs
  • apps/portal/src/app/x402/layout.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} : Layouts should reuse `SidebarLayout` / `FullWidthSidebarLayout` (`@/components/blocks/SidebarLayout`).

Applied to files:

  • apps/portal/src/app/x402/sidebar.tsx
  • apps/portal/src/app/x402/layout.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:

  • apps/portal/src/app/x402/sidebar.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} : Server Components (Node edge): Start files with `import "server-only";`

Applied to files:

  • apps/portal/src/app/x402/sidebar.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 src/exports/react.native.ts : React Native specific exports are in `src/exports/react.native.ts`

Applied to files:

  • apps/portal/src/app/x402/sidebar.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}/**/*.stories.tsx : Add Storybook stories (`*.stories.tsx`) alongside new UI components

Applied to files:

  • apps/portal/src/app/x402/sidebar.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}/**/feature/components/**/index.ts : Expose a barrel `index.ts` when necessary for feature components

Applied to files:

  • apps/portal/src/app/x402/sidebar.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/**/index.ts : Group related components in their own folder and expose a single barrel `index.ts` where necessary.

Applied to files:

  • apps/portal/src/app/x402/sidebar.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:

  • apps/portal/src/app/x402/sidebar.tsx
  • apps/portal/src/app/x402/layout.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:

  • apps/portal/src/app/x402/sidebar.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:

  • apps/portal/src/app/x402/sidebar.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/** : EIP-1193, EIP-5792, EIP-7702 standard support in wallet modules

Applied to files:

  • apps/portal/src/app/x402/facilitator/page.mdx
  • apps/portal/src/app/x402/page.mdx
📚 Learning: 2025-06-03T23:44:40.243Z
Learnt from: joaquim-verges
Repo: thirdweb-dev/js PR: 7268
File: packages/thirdweb/src/wallets/in-app/core/wallet/in-app-core.ts:210-216
Timestamp: 2025-06-03T23:44:40.243Z
Learning: EIP7702 wallets do not need special handling for switching chains, unlike EIP4337 wallets which require reconnection when switching chains. In the switchChain method condition, EIP7702 should be intentionally excluded from the reconnection logic.

Applied to files:

  • apps/portal/src/app/x402/facilitator/page.mdx
📚 Learning: 2025-08-29T23:44:47.512Z
Learnt from: MananTank
Repo: thirdweb-dev/js PR: 7951
File: apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/_layout/contract-page-layout.tsx:38-38
Timestamp: 2025-08-29T23:44:47.512Z
Learning: The ContractPageLayout component in apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/_layout/contract-page-layout.tsx is not the root layout - it's nested within the dashboard layout which already handles footer positioning with min-h-dvh and AppFooter placement. The ContractPageLayout needs flex flex-col grow to properly participate in the parent's flex layout.

Applied to files:

  • apps/portal/src/app/x402/layout.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: Surface breaking changes prominently in PR descriptions

Applied to files:

  • apps/portal/src/app/x402/page.mdx
📚 Learning: 2025-05-27T19:55:25.056Z
Learnt from: MananTank
Repo: thirdweb-dev/js PR: 7177
File: apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/public-pages/erc20/_hooks/useTokenPriceData.ts:49-49
Timestamp: 2025-05-27T19:55:25.056Z
Learning: In the ERC20 public pages token price data hook (`useTokenPriceData.ts`), direct array access on `json.data[0]` without optional chaining is intentionally correct and should not be changed to use safety checks.

Applied to files:

  • apps/portal/src/app/x402/server/page.mdx
🧬 Code graph analysis (2)
apps/portal/src/app/x402/sidebar.tsx (2)
apps/portal/src/app/payments/sidebar.tsx (1)
  • sidebar (8-116)
apps/portal/src/icons/index.ts (6)
  • ExternalLinkIcon (4-4)
  • EngineIcon (11-11)
  • TypeScriptIcon (22-22)
  • ReactIcon (21-21)
  • UnityIcon (23-23)
  • UnrealEngineIcon (24-24)
apps/portal/src/app/x402/layout.tsx (2)
apps/portal/src/components/Layouts/DocLayout.tsx (1)
  • DocLayout (25-76)
apps/portal/src/app/x402/sidebar.tsx (1)
  • sidebar (8-77)
🪛 LanguageTool
apps/portal/src/app/x402/page.mdx

[grammar] ~53-~53: Use a hyphen to join words.
Context: ...o use the thirdweb API to fetch any x402 compatible endpoint and pay for it with ...

(QB_NEW_EN_HYPHEN)


[grammar] ~53-~53: Use a hyphen to join words.
Context: ...he authenticated wallet. See the client side docs for more detail...

(QB_NEW_EN_HYPHEN)


[grammar] ~99-~99: Use a hyphen to join words.
Context: ... for multiple endpoints, see the server side docs for more detail...

(QB_NEW_EN_HYPHEN)


[grammar] ~99-~99: Ensure spelling is correct
Context: ...cilitator) handles settling the payment onchain using your own server wallet. ## Going...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)

⏰ 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). (3)
  • GitHub Check: Size
  • GitHub Check: Lint Packages
  • GitHub Check: Analyze (javascript)
🔇 Additional comments (9)
apps/portal/src/app/x402/client/page.mdx (1)

78-78: LGTM! Improved heading clarity.

The new heading "Fetch with Payment" more accurately describes the functionality and aligns better with the wrapFetchWithPayment function name used in the TypeScript examples.

apps/portal/redirects.mjs (1)

745-746: LGTM! Redirects properly configured.

The redirect mappings correctly handle both the base x402 path and all sub-paths, ensuring backward compatibility for existing links to /payments/x402/*.

apps/portal/src/app/page.tsx (1)

186-191: LGTM! Well-integrated navigation card.

The new x402 ArticleCardIndex is properly structured with an appropriate description and icon, and is logically positioned among related payment and transaction features.

apps/portal/src/app/Header.tsx (1)

46-49: LGTM! Navigation link properly added.

The new x402 navigation item is correctly structured and logically positioned between Payments and Bridge in the main navigation menu.

apps/portal/src/app/x402/facilitator/page.mdx (1)

30-35: LGTM! Improved documentation specificity.

The updated chain and token support section provides more specific information with a helpful reference link. The prerequisite structure makes requirements clearer for developers.

apps/portal/src/app/x402/layout.tsx (1)

1-21: LGTM! Properly structured Next.js layout.

The layout component correctly integrates the x402 sidebar with DocLayout and provides comprehensive metadata for SEO and social sharing. The async layout pattern is appropriate for Next.js 15.

apps/portal/src/app/x402/server/page.mdx (1)

424-451: Verify example token address validity.

The token address 0xf01E52B0BAC3E147f6CAf956a64586865A0aA928 is documented only in the file under review and does not appear elsewhere in the codebase (expected for a documentation example). The address format is valid and the 18-decimal precision with the amount 1000000000000000 (0.001 tokens) are mathematically consistent.

However, verification of whether this is an actual token on Arbitrum remains inconclusive. Recommend manually checking Arbiscan to confirm:

  • If this should reference a real existing token, or
  • If it's intended as a purely illustrative placeholder example
apps/portal/src/app/x402/page.mdx (2)

25-32: Well-structured content addition for chain and token support.

The new "Chain and token support" section clearly communicates the protocol's EVM chain support and token requirements (ERC-2612 or ERC-3009), providing important context for users implementing x402.


53-53: Documentation links successfully updated to new x402 paths.

All internal documentation links have been consistently updated from the old /payments/x402/* structure to the new top-level /x402/* paths:

  • Client Side: /x402/client
  • Server Side: /x402/server
  • Facilitator: /x402/facilitator

Navigation cards in the "Going Further" section match these updated paths. Assuming redirects are in place (as mentioned in PR summary), the migration is coherent.

Confirm that the redirect mappings in apps/portal/redirects.mjs are correctly configured to handle any legacy links to /payments/x402/* paths.

Also applies to: 99-99, 108-108, 114-114, 120-120

# x402 Payments

x402 is an open-source protocol that turns the dormant HTTP 402 Payment Required status code into a fully-featured, on-chain payment layer for APIs, websites, and autonomous agents.
[x402](https://x402.org) is an open-source protocol that turns the dormant HTTP 402 Payment Required status code into a fully-featured, on-chain payment layer for APIs, websites, and autonomous agents.
Copy link
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion | 🟠 Major

Fix hyphenation in compound adjectives and technical terms.

Static analysis flagged several hyphenation issues that should be corrected for consistency and proper English style:

  • Line 53: "x402 compatible" → "x402-compatible"
  • Line 53: "client side docs" → "client-side docs"
  • Line 99: "server side docs" → "server-side docs"
  • Line 99: "onchain" → "on-chain"

Apply this diff to fix the hyphenation:

-You can also use the thirdweb API to fetch any x402 compatible endpoint and pay for it with the authenticated wallet. See the [client side docs](/x402/client) for more details.
+You can also use the thirdweb API to fetch any x402-compatible endpoint and pay for it with the authenticated wallet. See the [client-side docs](/x402/client) for more details.
-You can also create middlewares to handle payment for multiple endpoints, see the [server side docs](/x402/server) for more details. The [facilitator](/x402/facilitator) handles settling the payment onchain using your own server wallet.
+You can also create middlewares to handle payment for multiple endpoints, see the [server-side docs](/x402/server) for more details. The [facilitator](/x402/facilitator) handles settling the payment on-chain using your own server wallet.

Also applies to: 25-32, 53-53, 99-99

🤖 Prompt for AI Agents
In apps/portal/src/app/x402/page.mdx (apply changes at lines 25-32, 53, and 99),
fix hyphenation in compound adjectives and technical terms: replace "x402
compatible" with "x402-compatible", "client side docs" with "client-side docs",
"server side docs" with "server-side docs", and "onchain" with "on-chain";
update each occurrence in the specified lines so the phrases use correct
hyphenation and consistent styling throughout the file.

Comment on lines +1 to +77
import { ExternalLinkIcon, ZapIcon } from "lucide-react";
import type { SideBar } from "@/components/Layouts/DocLayout";
import { EngineIcon, ReactIcon, TypeScriptIcon, UnityIcon } from "@/icons";
import { UnrealEngineIcon } from "../../icons/sdks/UnrealEngineIcon";

const x402Slug = "/x402";

export const sidebar: SideBar = {
links: [
{
href: x402Slug,
name: "Get Started",
icon: <ZapIcon />,
},
{
href: "https://playground.thirdweb.com/payments/x402",
icon: <ExternalLinkIcon />,
name: "Playground",
},
{ separator: true },
{
isCollapsible: false,
links: [
{
href: `${x402Slug}/client`,
name: "Client Side",
},
{
href: `${x402Slug}/server`,
name: "Server Side",
},
{
href: `${x402Slug}/agents`,
name: "Agents",
},
{
href: `${x402Slug}/facilitator`,
name: "Facilitator",
},
],
name: "Guides",
},
{ separator: true },
{
isCollapsible: false,
links: [
{
href: `https://payments.thirdweb.com/reference`,
icon: <EngineIcon />,
name: "REST API",
},
{
href: "/references/typescript/v5",
icon: <TypeScriptIcon />,
name: "TypeScript",
},
{
href: "/references/typescript/v5",
icon: <ReactIcon />,
name: "React",
},
{
href: "/unity",
icon: <UnityIcon />,
name: "Unity",
},
{
href: "/unreal-engine",
icon: <UnrealEngineIcon />,
name: "Unreal Engine",
},
],
name: "API References",
},
],
name: "x402",
};
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

LGTM! Well-structured sidebar navigation.

The new x402 sidebar provides a clean, organized navigation structure with logical grouping of guides and API references. The use of the x402Slug constant promotes maintainability.

Note the UnrealEngineIcon import uses a different path pattern than other icons (line 4). Verify this path is correct:


🏁 Script executed:

#!/bin/bash
# Check UnrealEngineIcon import paths across the codebase
rg "import.*UnrealEngineIcon" --type tsx --type ts -C 1

Length of output: 27


:::


🏁 Script executed:

#!/bin/bash
# Search for UnrealEngineIcon imports with corrected syntax
rg "UnrealEngineIcon" -C 2

Length of output: 12367


🏁 Script executed:

#!/bin/bash
# Find the icons barrel export to check what's exported
fd -e ts -e tsx "icons/index" --or -path "*/icons.ts" --or -path "*/icons.tsx"

Length of output: 244


🏁 Script executed:

#!/bin/bash
# Check if UnrealEngineIcon exists in the icons directory structure
fd "UnrealEngineIcon" -type f

Length of output: 170


Fix import to use consistent barrel export path.

The UnrealEngineIcon is already exported from @/icons (verified in apps/portal/src/icons/index.ts), but the file imports it via a relative path instead. This violates consistency with other icons in the same file and the coding guideline for icon imports.

Update line 4:

import { EngineIcon, ReactIcon, TypeScriptIcon, UnityIcon, UnrealEngineIcon } from "@/icons";

Then remove the separate import statement for UnrealEngineIcon.

Note: The same inconsistency exists in wallets/sidebar.tsx, transactions/sidebar.tsx, payments/sidebar.tsx, and bridge/sidebar.tsx.

🤖 Prompt for AI Agents
In apps/portal/src/app/x402/sidebar.tsx around lines 1 to 77, the
UnrealEngineIcon is imported via a relative path while other icons use the
"@/icons" barrel; update the imports to import UnrealEngineIcon from "@/icons"
together with EngineIcon, ReactIcon, TypeScriptIcon, and UnityIcon, and remove
the separate relative import statement so all icons use the consistent barrel
export; apply the same pattern in the other files mentioned if present.

@joaquim-verges joaquim-verges force-pushed the _Portal_Move_x402_from_payments_to_top-level_section branch from da26cc9 to 7923a8a Compare November 10, 2025 01:05
@vercel vercel bot temporarily deployed to Preview – thirdweb-www November 10, 2025 01:05 Inactive
@vercel vercel bot temporarily deployed to Preview – wallet-ui November 10, 2025 01:05 Inactive
@vercel vercel bot temporarily deployed to Preview – nebula November 10, 2025 01:05 Inactive
@vercel vercel bot temporarily deployed to Preview – thirdweb_playground November 10, 2025 01:05 Inactive
@joaquim-verges joaquim-verges merged commit f6f138c into main Nov 10, 2025
24 checks passed
@joaquim-verges joaquim-verges deleted the _Portal_Move_x402_from_payments_to_top-level_section branch November 10, 2025 02:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Portal Involves changes to the Portal (docs) codebase.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants