Skip to content

Conversation

@MananTank
Copy link
Member

@MananTank MananTank commented Dec 19, 2025


PR-Codex overview

This PR updates the Checkout Widget and Swap Widget components, enhancing their documentation and functionality. It replaces image formats, introduces a new IframeCodePreview component, and modifies sidebar links for better navigation.

Detailed summary

  • Replaced swap-dark.png and swap-light.png with swap-dark.jpg and swap-light.jpg.
  • Added IframeCodePreview component in iframe-code-preview.tsx.
  • Updated sendMessageToParent function to send structured messages.
  • Modified sidebar links for Widgets and Checkout Widget.
  • Enhanced documentation for Checkout Widget and Swap Widget with new features and examples.
  • Added iframe integration details and customization options in the Checkout widget iframe documentation.

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

Summary by CodeRabbit

  • New Features

    • Added an iframe code-preview with "Code" and "Preview" tabs for live iframe examples.
  • Documentation

    • New Checkout Widget docs (React + iframe) with integration guides, examples, options, and event-listening examples.
    • New Swap Widget docs with usage examples and API reference.
    • Swap page asset format updates.
  • Improvements

    • Reorganized sidebar to surface Widgets (Bridge, Checkout, Swap).
    • Standardized postMessage event payload shape for widget events—please verify event handling.

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

@vercel vercel bot temporarily deployed to Preview – nebula December 19, 2025 20:47 Inactive
@linear
Copy link

linear bot commented Dec 19, 2025

@changeset-bot
Copy link

changeset-bot bot commented Dec 19, 2025

⚠️ No Changeset found

Latest commit: 800503d

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

vercel bot commented Dec 19, 2025

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

Project Deployment Review Updated (UTC)
docs-v2 Ready Ready Preview, Comment Dec 19, 2025 10:29pm
thirdweb-www Ready Ready Preview, Comment Dec 19, 2025 10:29pm
3 Skipped Deployments
Project Deployment Review Updated (UTC)
nebula Skipped Skipped Dec 19, 2025 10:29pm
thirdweb_playground Skipped Skipped Dec 19, 2025 10:29pm
wallet-ui Skipped Skipped Dec 19, 2025 10:29pm

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 19, 2025

Walkthrough

Refactors checkout embed messaging to send a single structured content object; adds an iframe code-preview React component; introduces MDX docs for Checkout and Swap widgets; updates swap image extensions; and reorganizes the portal sidebar to surface widget docs and links.

Changes

Cohort / File(s) Summary
Checkout Widget Embed (messaging)
apps/dashboard/src/app/bridge/checkout-widget/CheckoutWidgetEmbed.client.tsx
Replaced sendMessageToParent(type, data) with sendMessageToParent(content: object); onSuccess/onError now call sendMessageToParent with structured content objects (e.g., { source: "checkout-widget", type: "success" }, { source: "checkout-widget", type: "error", message }) and post that object via window.parent.postMessage(content, "*").
Iframe Code Preview Component
apps/portal/src/app/bridge/checkout-widget/iframe/iframe-code-preview.tsx
Added IframeCodePreview({ src }) React component rendering "Code" and "Preview" tabs: a syntax-highlighted iframe snippet and a live iframe preview (height 700px, full width, no border).
Checkout Widget Docs (MDX)
apps/portal/src/app/bridge/checkout-widget/page.mdx, apps/portal/src/app/bridge/checkout-widget/react/page.mdx, apps/portal/src/app/bridge/checkout-widget/iframe/page.mdx
Added three MDX documentation pages with metadata exports, images, features, usage examples (React and iframe), integration notes, event-listening examples, and CTAs.
Swap Widget Docs & Assets
apps/portal/src/app/bridge/swap-widget/page.mdx, apps/portal/src/app/bridge/swap/page.mdx
Added swap-widget MDX doc with metadata and examples; updated swap/page.mdx to import JPG variants (swap-dark.jpg, swap-light.jpg) instead of PNG.
Sidebar Navigation
apps/portal/src/app/bridge/sidebar.tsx
Reorganized sidebar: renamed "Guides" → "Widgets", added "Bridge Widget" and "Checkout Widget" subsections (React, Iframe, Script links), added "Swap Widget", and restored a separate "Guides" section with original and new guide links.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

  • Inspect apps/dashboard/src/app/bridge/checkout-widget/CheckoutWidgetEmbed.client.tsx to verify postMessage content shape, origin validation, and any consumers/listeners expecting the old { source, type, data } envelope.
  • Review apps/portal/src/app/bridge/checkout-widget/iframe/iframe-code-preview.tsx for accessibility, correct code escaping in the snippet, and iframe attributes/sandboxing.
  • Verify MDX metadata exports and asset path changes (.jpg vs .png) in affected apps/portal/.../page.mdx files.
  • Confirm sidebar link targets and nesting in apps/portal/src/app/bridge/sidebar.tsx.

Pre-merge checks and finishing touches

❌ Failed checks (2 warnings)
Check name Status Explanation Resolution
Out of Scope Changes check ⚠️ Warning Several changes appear unrelated to the MNY-345 objective: Swap Widget documentation, image format replacements (png to jpg), and sendMessageToParent function modifications extend beyond checkout widget iframe documentation scope. Separate out-of-scope changes (Swap Widget docs, swap image formats, sendMessageToParent signature) into distinct PRs aligned with their respective objectives.
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 (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically references the main change: adding Checkout widget iframe documentation to the Portal, with an issue tag properly included.
Description check ✅ Passed The description includes a PR-Codex overview with a detailed summary of changes, though the template sections (Notes for the reviewer, How to test) are not filled out.
Linked Issues check ✅ Passed The PR implements documentation for the checkout widget iframe as required by MNY-345, including the new IframeCodePreview component and comprehensive iframe documentation.
✨ 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-345

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.

@MananTank MananTank marked this pull request as ready for review December 19, 2025 20:47
@MananTank MananTank requested review from a team as code owners December 19, 2025 20:47
@github-actions github-actions bot added Dashboard Involves changes to the Dashboard. Portal Involves changes to the Portal (docs) codebase. labels Dec 19, 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.

@codecov
Copy link

codecov bot commented Dec 19, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 53.24%. Comparing base (0ff8b9f) to head (800503d).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #8581   +/-   ##
=======================================
  Coverage   53.24%   53.24%           
=======================================
  Files         922      922           
  Lines       61414    61414           
  Branches     4026     4026           
=======================================
  Hits        32699    32699           
  Misses      28617    28617           
  Partials       98       98           
Flag Coverage Δ
packages 53.24% <ø> (ø)
🚀 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)
apps/dashboard/src/app/bridge/checkout-widget/CheckoutWidgetEmbed.client.tsx (1)

103-110: Improve type safety for message payload.

The content: object parameter is too loose and bypasses TypeScript's type checking. Consider defining a proper type for the message structure to ensure type safety and document the expected payload shape.

🔎 Proposed fix
+type CheckoutWidgetMessage =
+  | { source: "checkout-widget"; type: "success" }
+  | { source: "checkout-widget"; type: "error"; message: string };
+
-function sendMessageToParent(content: object) {
+function sendMessageToParent(content: CheckoutWidgetMessage): void {
   try {
     window.parent.postMessage(content, "*");
   } catch (error) {
     console.error("Failed to send post message to parent window");
     console.error(error);
   }
 }

Based on coding guidelines: "Avoid any and unknown unless unavoidable" and "Write idiomatic TypeScript with explicit function declarations and return types"

📜 Review details

Configuration used: Organization 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 0ff8b9f and 2ab1e15.

⛔ Files ignored due to path filters (2)
  • apps/portal/src/app/bridge/checkout-widget/checkout-widget-dark.jpg is excluded by !**/*.jpg
  • apps/portal/src/app/bridge/checkout-widget/checkout-widget.jpg is excluded by !**/*.jpg
📒 Files selected for processing (6)
  • apps/dashboard/src/app/bridge/checkout-widget/CheckoutWidgetEmbed.client.tsx (1 hunks)
  • apps/portal/src/app/bridge/checkout-widget/iframe/iframe-code-preview.tsx (1 hunks)
  • apps/portal/src/app/bridge/checkout-widget/iframe/page.mdx (1 hunks)
  • apps/portal/src/app/bridge/checkout-widget/page.mdx (1 hunks)
  • apps/portal/src/app/bridge/checkout-widget/react/page.mdx (1 hunks)
  • apps/portal/src/app/bridge/sidebar.tsx (2 hunks)
🧰 Additional context used
📓 Path-based instructions (9)
**/*.{ts,tsx}

📄 CodeRabbit inference engine (CLAUDE.md)

**/*.{ts,tsx}: Write idiomatic TypeScript with explicit function declarations and return types
Limit each TypeScript 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 in TypeScript
Avoid any and unknown in TypeScript unless unavoidable; narrow generics when possible
Choose composition over inheritance; leverage utility types (Partial, Pick, etc.) in TypeScript

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

Files:

  • apps/portal/src/app/bridge/checkout-widget/iframe/iframe-code-preview.tsx
  • apps/dashboard/src/app/bridge/checkout-widget/CheckoutWidgetEmbed.client.tsx
  • apps/portal/src/app/bridge/sidebar.tsx
**/*.{js,jsx,ts,tsx,json}

📄 CodeRabbit inference engine (AGENTS.md)

Biome governs formatting and linting; its rules live in biome.json. Run pnpm fix & pnpm lint before committing, ensure there are no linting errors

Files:

  • apps/portal/src/app/bridge/checkout-widget/iframe/iframe-code-preview.tsx
  • apps/dashboard/src/app/bridge/checkout-widget/CheckoutWidgetEmbed.client.tsx
  • apps/portal/src/app/bridge/sidebar.tsx
**/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (AGENTS.md)

Lazy-import optional features; avoid top-level side-effects

Files:

  • apps/portal/src/app/bridge/checkout-widget/iframe/iframe-code-preview.tsx
  • apps/dashboard/src/app/bridge/checkout-widget/CheckoutWidgetEmbed.client.tsx
  • apps/portal/src/app/bridge/sidebar.tsx
apps/{dashboard,playground-web}/src/**/*.{ts,tsx}

📄 CodeRabbit inference engine (CLAUDE.md)

apps/{dashboard,playground-web}/src/**/*.{ts,tsx}: Import UI component primitives from @/components/ui/* (Button, Input, Select, Tabs, Card, Sidebar, Badge, Separator) in dashboard and playground
Use Tailwind CSS only – no inline styles or CSS modules in dashboard and playground
Use cn() from @/lib/utils for conditional Tailwind class merging
Use design system tokens for styling (backgrounds: bg-card, borders: border-border, muted text: text-muted-foreground)
Expose className prop on root element for component overrides

Files:

  • apps/dashboard/src/app/bridge/checkout-widget/CheckoutWidgetEmbed.client.tsx
apps/dashboard/src/**/*.{ts,tsx}

📄 CodeRabbit inference engine (CLAUDE.md)

apps/dashboard/src/**/*.{ts,tsx}: Use NavLink for internal navigation with automatic active states in dashboard
Start server component files with import "server-only"; in Next.js
Read cookies/headers with next/headers in server components
Access server-only environment variables in server components
Perform heavy data fetching in server components
Implement redirect logic with redirect() from next/navigation in server components
Begin client component files with 'use client'; directive in Next.js
Handle interactive UI with React hooks (useState, useEffect, React Query, wallet hooks) in client components
Access browser APIs (localStorage, window, IntersectionObserver) in client components
Support fast transitions with prefetched data in client components
Always call getAuthToken() to retrieve JWT from cookies on server side
Use Authorization: Bearer header for API calls – never embed tokens in URLs
Return typed results (Project[], User[]) from server-side data fetches – avoid any
Wrap client-side API calls in React Query (@tanstack/react-query)
Use descriptive, stable queryKeys in React Query for cache hits
Configure staleTime/cacheTime in React Query based on freshness (default ≥ 60s)
Keep tokens secret via internal API routes or server actions
Never import posthog-js in server components – only use analytics client-side

Files:

  • apps/dashboard/src/app/bridge/checkout-widget/CheckoutWidgetEmbed.client.tsx
apps/dashboard/**/*.{ts,tsx}

📄 CodeRabbit inference engine (.cursor/rules/dashboard.mdc)

apps/dashboard/**/*.{ts,tsx}: Always import from the central UI library under @/components/ui/* for reusable core UI components like Button, Input, Select, Tabs, Card, Sidebar, Separator, Badge
Use NavLink from @/components/ui/NavLink for internal navigation to ensure active states are handled automatically
For notices and skeletons, rely on AnnouncementBanner, GenericLoadingPage, and EmptyStateCard components
Import icons from lucide-react or the project-specific …/icons exports; never embed raw SVG
Keep components pure; fetch data outside using server components or hooks and pass it down via props
Use Tailwind CSS as the styling system; avoid inline styles or CSS modules
Merge class names with cn from @/lib/utils to keep conditional logic readable
Stick to design tokens: use bg-card, border-border, text-muted-foreground and other Tailwind variables instead of hard-coded colors
Use spacing utilities (px-*, py-*, gap-*) instead of custom margins
Follow mobile-first responsive design with Tailwind helpers (max-sm, md, lg, xl)
Never hard-code colors; always use Tailwind variables
Combine class names via cn, and expose className prop if useful in components
Use React Query (@tanstack/react-query) for all client-side data fetching with typed hooks

Files:

  • apps/dashboard/src/app/bridge/checkout-widget/CheckoutWidgetEmbed.client.tsx
apps/dashboard/**/*.client.tsx

📄 CodeRabbit inference engine (.cursor/rules/dashboard.mdc)

apps/dashboard/**/*.client.tsx: Name component files after the component in PascalCase; append .client.tsx when the component is interactive
Client components must start with 'use client'; directive before imports

Files:

  • apps/dashboard/src/app/bridge/checkout-widget/CheckoutWidgetEmbed.client.tsx
apps/{dashboard,playground}/**/*.{tsx,ts}

📄 CodeRabbit inference engine (AGENTS.md)

apps/{dashboard,playground}/**/*.{tsx,ts}: Import UI primitives from @/components/ui/_ (Button, Input, Select, Tabs, Card, Sidebar, Badge, Separator) in Dashboard and Playground apps
Use NavLink for internal navigation so active states are handled automatically
Use Tailwind CSS for styling – no inline styles or CSS modules
Merge class names with cn() from @/lib/utils to keep conditional logic readable
Stick to design tokens for styling: backgrounds (bg-card), borders (border-border), muted text (text-muted-foreground), etc.
Server Components: Read cookies/headers with next/headers, access server-only environment variables or secrets, perform heavy data fetching, implement redirect logic with redirect() from next/navigation, and start files with import 'server-only'; to prevent client bundling
Client Components: Begin files with 'use client'; before imports, handle interactive UI relying on React hooks (useState, useEffect, React Query, wallet hooks), access browser APIs (localStorage, window, IntersectionObserver, etc.), and support fast transitions with client-side data prefetching
For client-side data fetching: Wrap calls in React Query (@tanstack/react-query), use descriptive and stable queryKeys for cache hits, configure staleTime / cacheTime based on freshness requirements (default ≥ 60 s), and keep tokens secret by calling internal API routes or server actions

Files:

  • apps/dashboard/src/app/bridge/checkout-widget/CheckoutWidgetEmbed.client.tsx
apps/{dashboard,playground}/**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

apps/{dashboard,playground}/**/*.{ts,tsx}: For server-side data fetching: Always call getAuthToken() to retrieve the JWT from cookies and inject the token as an Authorization: Bearer header – never embed it in the URL. Return typed results (Project[], User[], …) – avoid any
Never import posthog-js in server components; analytics reporting is client-side only

Files:

  • apps/dashboard/src/app/bridge/checkout-widget/CheckoutWidgetEmbed.client.tsx
⏰ 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: E2E Tests (pnpm, webpack)
  • GitHub Check: E2E Tests (pnpm, vite)
  • GitHub Check: Lint Packages
  • GitHub Check: Size
  • GitHub Check: E2E Tests (pnpm, esbuild)
  • GitHub Check: Unit Tests
  • GitHub Check: Analyze (javascript)
🔇 Additional comments (6)
apps/portal/src/app/bridge/sidebar.tsx (1)

22-102: LGTM! Navigation restructuring is well-organized.

The sidebar restructuring clearly separates Widgets (Bridge Widget, Checkout Widget) from Guides, and the nested link structure is consistent and follows established patterns.

apps/dashboard/src/app/bridge/checkout-widget/CheckoutWidgetEmbed.client.tsx (1)

86-98: LGTM! Message structure is well-designed.

The refactored message structure with explicit source and type fields is clean and matches the documentation examples in the iframe page. The error handling includes the error message appropriately.

apps/portal/src/app/bridge/checkout-widget/react/page.mdx (1)

1-98: LGTM! Documentation is clear and well-structured.

The React component documentation provides clear examples, proper metadata, and helpful links to API reference and playground. The code examples are syntactically correct and demonstrate both basic usage and ThirdwebProvider setup.

apps/portal/src/app/bridge/checkout-widget/page.mdx (1)

1-71: LGTM! Overview page provides clear navigation.

The overview page effectively introduces the Checkout widget features and provides clear navigation to integration options (iframe and React component). The metadata and structure are consistent with other documentation pages.

apps/portal/src/app/bridge/checkout-widget/iframe/page.mdx (2)

139-157: LGTM! Event listening documentation matches implementation perfectly.

The postMessage event structure documented here (checking source, type, and message fields) aligns exactly with the payload structure sent by CheckoutWidgetEmbed.client.tsx. The origin verification is also a good security practice.


1-157: Well-documented iframe integration guide.

The page provides comprehensive documentation for iframe integration, including required parameters, customization options, and event handling. The examples using IframeCodePreview effectively demonstrate both code and live previews.

@github-actions
Copy link
Contributor

github-actions bot commented Dec 19, 2025

size-limit report 📦

Path Size
@thirdweb-dev/nexus (esm) 105.66 KB (0%)
@thirdweb-dev/nexus (cjs) 319.47 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: 0

Caution

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

⚠️ Outside diff range comments (1)
apps/portal/src/app/bridge/sidebar.tsx (1)

116-125: Fix React reference link across multiple sidebar files.

Both TypeScript and React entries incorrectly link to /references/typescript/v5. No /references/react documentation exists in the codebase. This pattern appears in multiple sidebar files (bridge, x402, wallets, react/v5). Either provide React reference documentation at a distinct URL, or clarify the intended behavior with a comment if the shared reference is intentional.

🧹 Nitpick comments (1)
apps/portal/src/app/bridge/checkout-widget/iframe/page.mdx (1)

139-156: Consider improving code indentation in the event listener example.

The nested if blocks inside the origin check have inconsistent indentation, which may confuse readers. The inner if statements appear at the same indentation level as the outer block's body.

🔎 Suggested formatting improvement
 window.addEventListener("message", (event) => {
-
   // verify that message is from thirdweb checkout widget iframe
   if (
     event.origin === "https://thirdweb.com" && event.data.source === "checkout-widget"
   ) {
-
-  if (event.data.type === "success") {
-    console.log("Purchase successful!");
-  }
-
-  if (event.data.type === "error") {
-    console.error("Purchase failed with error:", event.data.message);
-  }
+    if (event.data.type === "success") {
+      console.log("Purchase successful!");
+    }
+
+    if (event.data.type === "error") {
+      console.error("Purchase failed with error:", event.data.message);
+    }
   }
-
 });
📜 Review details

Configuration used: Organization 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 2ab1e15 and 14448ed.

⛔ Files ignored due to path filters (6)
  • apps/portal/src/app/bridge/checkout-widget/checkout-widget-dark.jpg is excluded by !**/*.jpg
  • apps/portal/src/app/bridge/checkout-widget/checkout-widget.jpg is excluded by !**/*.jpg
  • apps/portal/src/app/bridge/swap/swap-dark.jpg is excluded by !**/*.jpg
  • apps/portal/src/app/bridge/swap/swap-dark.png is excluded by !**/*.png
  • apps/portal/src/app/bridge/swap/swap-light.jpg is excluded by !**/*.jpg
  • apps/portal/src/app/bridge/swap/swap-light.png is excluded by !**/*.png
📒 Files selected for processing (8)
  • apps/dashboard/src/app/bridge/checkout-widget/CheckoutWidgetEmbed.client.tsx (1 hunks)
  • apps/portal/src/app/bridge/checkout-widget/iframe/iframe-code-preview.tsx (1 hunks)
  • apps/portal/src/app/bridge/checkout-widget/iframe/page.mdx (1 hunks)
  • apps/portal/src/app/bridge/checkout-widget/page.mdx (1 hunks)
  • apps/portal/src/app/bridge/checkout-widget/react/page.mdx (1 hunks)
  • apps/portal/src/app/bridge/sidebar.tsx (2 hunks)
  • apps/portal/src/app/bridge/swap-widget/page.mdx (1 hunks)
  • apps/portal/src/app/bridge/swap/page.mdx (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • apps/portal/src/app/bridge/swap/page.mdx
🚧 Files skipped from review as they are similar to previous changes (4)
  • apps/dashboard/src/app/bridge/checkout-widget/CheckoutWidgetEmbed.client.tsx
  • apps/portal/src/app/bridge/checkout-widget/react/page.mdx
  • apps/portal/src/app/bridge/checkout-widget/iframe/iframe-code-preview.tsx
  • apps/portal/src/app/bridge/checkout-widget/page.mdx
🧰 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 TypeScript 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 in TypeScript
Avoid any and unknown in TypeScript unless unavoidable; narrow generics when possible
Choose composition over inheritance; leverage utility types (Partial, Pick, etc.) in TypeScript

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

Files:

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

📄 CodeRabbit inference engine (AGENTS.md)

Biome governs formatting and linting; its rules live in biome.json. Run pnpm fix & pnpm lint before committing, ensure there are no linting errors

Files:

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

📄 CodeRabbit inference engine (AGENTS.md)

Lazy-import optional features; avoid top-level side-effects

Files:

  • apps/portal/src/app/bridge/sidebar.tsx
🪛 Gitleaks (8.30.0)
apps/portal/src/app/bridge/swap-widget/page.mdx

[high] 84-84: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.

(generic-api-key)


[high] 115-115: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.

(generic-api-key)


[high] 130-130: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.

(generic-api-key)

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

1-157: LGTM!

The documentation is well-structured with clear examples covering ThirdwebProvider setup, default token configuration, and various prefill options. The metadata export follows the established pattern.

Note: The static analysis warnings about "Generic API Key" on lines 84, 115, and 130 are false positives - these are well-known public ERC20 token contract addresses (Base USDC: 0x833589fcd6edb6e08f4c7c32d4f71b54bda02913), not secret keys.

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

21-61: LGTM!

The navigation restructuring is well-organized with clear groupings for Widgets (Bridge Widget, Checkout Widget, Swap Widget) and a separate Guides section. The nested link structure is consistent across widget types.

apps/portal/src/app/bridge/checkout-widget/iframe/page.mdx (1)

1-63: LGTM!

The documentation is comprehensive, covering iframe integration parameters, customization options, and the IframeCodePreview component usage. The metadata export follows the established pattern.

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

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

63-72: Minor formatting nit: stray empty line in array.

Line 72 has an empty line inside the links array. Per the coding guidelines, running pnpm fix should normalize formatting if this is unintentional.

🔎 Suggested fix
         {
           href: `${bridgeSlug}/swap`,
           name: "Swap Tokens",
         },
-
         {
           href: `${bridgeSlug}/fund`,
📜 Review details

Configuration used: Organization 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 14448ed and afdf71f.

⛔ Files ignored due to path filters (6)
  • apps/portal/src/app/bridge/checkout-widget/checkout-widget-dark.jpg is excluded by !**/*.jpg
  • apps/portal/src/app/bridge/checkout-widget/checkout-widget.jpg is excluded by !**/*.jpg
  • apps/portal/src/app/bridge/swap/swap-dark.jpg is excluded by !**/*.jpg
  • apps/portal/src/app/bridge/swap/swap-dark.png is excluded by !**/*.png
  • apps/portal/src/app/bridge/swap/swap-light.jpg is excluded by !**/*.jpg
  • apps/portal/src/app/bridge/swap/swap-light.png is excluded by !**/*.png
📒 Files selected for processing (8)
  • apps/dashboard/src/app/bridge/checkout-widget/CheckoutWidgetEmbed.client.tsx (1 hunks)
  • apps/portal/src/app/bridge/checkout-widget/iframe/iframe-code-preview.tsx (1 hunks)
  • apps/portal/src/app/bridge/checkout-widget/iframe/page.mdx (1 hunks)
  • apps/portal/src/app/bridge/checkout-widget/page.mdx (1 hunks)
  • apps/portal/src/app/bridge/checkout-widget/react/page.mdx (1 hunks)
  • apps/portal/src/app/bridge/sidebar.tsx (2 hunks)
  • apps/portal/src/app/bridge/swap-widget/page.mdx (1 hunks)
  • apps/portal/src/app/bridge/swap/page.mdx (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • apps/portal/src/app/bridge/swap/page.mdx
🚧 Files skipped from review as they are similar to previous changes (4)
  • apps/portal/src/app/bridge/checkout-widget/page.mdx
  • apps/portal/src/app/bridge/checkout-widget/iframe/page.mdx
  • apps/dashboard/src/app/bridge/checkout-widget/CheckoutWidgetEmbed.client.tsx
  • apps/portal/src/app/bridge/checkout-widget/react/page.mdx
🧰 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 TypeScript 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 in TypeScript
Avoid any and unknown in TypeScript unless unavoidable; narrow generics when possible
Choose composition over inheritance; leverage utility types (Partial, Pick, etc.) in TypeScript

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

Files:

  • apps/portal/src/app/bridge/sidebar.tsx
  • apps/portal/src/app/bridge/checkout-widget/iframe/iframe-code-preview.tsx
**/*.{js,jsx,ts,tsx,json}

📄 CodeRabbit inference engine (AGENTS.md)

Biome governs formatting and linting; its rules live in biome.json. Run pnpm fix & pnpm lint before committing, ensure there are no linting errors

Files:

  • apps/portal/src/app/bridge/sidebar.tsx
  • apps/portal/src/app/bridge/checkout-widget/iframe/iframe-code-preview.tsx
**/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (AGENTS.md)

Lazy-import optional features; avoid top-level side-effects

Files:

  • apps/portal/src/app/bridge/sidebar.tsx
  • apps/portal/src/app/bridge/checkout-widget/iframe/iframe-code-preview.tsx
🪛 Gitleaks (8.30.0)
apps/portal/src/app/bridge/swap-widget/page.mdx

[high] 84-84: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.

(generic-api-key)


[high] 115-115: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.

(generic-api-key)


[high] 130-130: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.

(generic-api-key)

⏰ 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: E2E Tests (pnpm, vite)
  • GitHub Check: Lint Packages
  • GitHub Check: Unit Tests
  • GitHub Check: Build Packages
  • GitHub Check: Size
  • GitHub Check: Analyze (javascript)
🔇 Additional comments (10)
apps/portal/src/app/bridge/sidebar.tsx (3)

22-42: LGTM!

The section rename to "Widgets" and the Bridge Widget nested link structure are well-organized and follow the established patterns in the file.


43-56: LGTM!

The Checkout Widget section is well-structured and follows the same pattern as Bridge Widget, maintaining consistency across widget documentation entries.


57-61: LGTM!

The Swap Widget entry is appropriately structured as a simple link without nested sub-pages, which is fine if it's a single-page documentation entry.

apps/portal/src/app/bridge/checkout-widget/iframe/iframe-code-preview.tsx (2)

1-1: LGTM!

The imports are clean and all components are used within the file.


3-34: Component structure is clean; existing comments remain applicable.

The component follows single-responsibility principle and provides a clear code/preview experience. The implementation is straightforward and well-organized.

Note: Previous review comments about the missing explicit return type (line 3) and height consistency (lines 15, 26) are still applicable.

apps/portal/src/app/bridge/swap-widget/page.mdx (5)

1-18: LGTM!

The imports and metadata are properly structured. The image format change from PNG to JPG aligns with the PR objectives.


20-39: LGTM!

The introduction and features section is clear and comprehensive.


40-69: LGTM!

The setup examples are clear and demonstrate proper usage patterns for the SwapWidget component.


71-138: Configuration examples are well-structured; Gitleaks warnings are false positives.

The examples clearly demonstrate different configuration scenarios. The Gitleaks warnings on lines 84, 115, and 130 are false positives—these are public Ethereum contract addresses (Base USDC: 0x833589fcd6edb6e08f4c7c32d4f71b54bda02913), not API keys or secrets.


140-157: LGTM!

The API reference and playground links provide helpful next steps for users.

@graphite-app
Copy link
Contributor

graphite-app bot commented Dec 19, 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 updating the `Checkout Widget` and `Swap Widget` components to enhance their functionality and improve user experience, including new image formats, additional features, and documentation updates.

### Detailed summary
- Replaced `.png` images with `.jpg` for `swap-dark` and `swap-light`.
- Added `IframeCodePreview` component for iframe integration in `Checkout Widget`.
- Updated `sendMessageToParent` function to use a single object parameter.
- Enhanced sidebar with new links for `Checkout Widget` and `Swap Widget`.
- Expanded documentation for `Checkout Widget` and `Swap Widget` with features, examples, and API references.

> ✨ 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**
  * Added an iframe code-preview component with "Code" and "Preview" tabs for live iframe examples.

* **Documentation**
  * New Checkout Widget docs (React + iframe) with integration guides, examples, options, and event-listening examples.
  * New Swap Widget docs with usage examples and API reference.
  * Swap page asset updates (image format changes).

* **Improvements**
  * Reorganized sidebar to surface Widgets (Bridge, Checkout, Swap).
  * Updated widget postMessage event payload shape — consumers should verify event format.

<sub>✏️ Tip: You can customize this high-level summary in your review settings.</sub>
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
@vercel vercel bot temporarily deployed to Preview – wallet-ui December 19, 2025 22:19 Inactive
@vercel vercel bot temporarily deployed to Preview – nebula December 19, 2025 22:19 Inactive
@vercel vercel bot temporarily deployed to Preview – thirdweb_playground December 19, 2025 22:19 Inactive
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: 0

🧹 Nitpick comments (2)
apps/dashboard/src/app/bridge/checkout-widget/CheckoutWidgetEmbed.client.tsx (1)

103-109: Consider restricting targetOrigin and adding a stricter type for content.

  1. Using "*" as targetOrigin allows any window to receive these messages. If the parent origin is known or configurable, restricting it would improve security.

  2. The object type is quite permissive. Consider defining a union type for the expected message shapes:

🔎 Suggested type improvement
+type CheckoutWidgetMessage =
+  | { source: "checkout-widget"; type: "success" }
+  | { source: "checkout-widget"; type: "error"; message: string };

-function sendMessageToParent(content: object) {
+function sendMessageToParent(content: CheckoutWidgetMessage) {
   try {
     window.parent.postMessage(content, "*");
apps/portal/src/app/bridge/checkout-widget/page.mdx (1)

1-6: Unused import: Details.

The Details component is imported but not used in this file.

🔎 Suggested fix
 import {
-  Details,
   createMetadata,
   DocImage,
 } from "@doc";
📜 Review details

Configuration used: Organization 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 afdf71f and 800503d.

⛔ Files ignored due to path filters (6)
  • apps/portal/src/app/bridge/checkout-widget/checkout-widget-dark.jpg is excluded by !**/*.jpg
  • apps/portal/src/app/bridge/checkout-widget/checkout-widget.jpg is excluded by !**/*.jpg
  • apps/portal/src/app/bridge/swap/swap-dark.jpg is excluded by !**/*.jpg
  • apps/portal/src/app/bridge/swap/swap-dark.png is excluded by !**/*.png
  • apps/portal/src/app/bridge/swap/swap-light.jpg is excluded by !**/*.jpg
  • apps/portal/src/app/bridge/swap/swap-light.png is excluded by !**/*.png
📒 Files selected for processing (8)
  • apps/dashboard/src/app/bridge/checkout-widget/CheckoutWidgetEmbed.client.tsx (1 hunks)
  • apps/portal/src/app/bridge/checkout-widget/iframe/iframe-code-preview.tsx (1 hunks)
  • apps/portal/src/app/bridge/checkout-widget/iframe/page.mdx (1 hunks)
  • apps/portal/src/app/bridge/checkout-widget/page.mdx (1 hunks)
  • apps/portal/src/app/bridge/checkout-widget/react/page.mdx (1 hunks)
  • apps/portal/src/app/bridge/sidebar.tsx (2 hunks)
  • apps/portal/src/app/bridge/swap-widget/page.mdx (1 hunks)
  • apps/portal/src/app/bridge/swap/page.mdx (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (3)
  • apps/portal/src/app/bridge/checkout-widget/iframe/iframe-code-preview.tsx
  • apps/portal/src/app/bridge/swap/page.mdx
  • apps/portal/src/app/bridge/checkout-widget/iframe/page.mdx
🧰 Additional context used
📓 Path-based instructions (9)
**/*.{ts,tsx}

📄 CodeRabbit inference engine (CLAUDE.md)

**/*.{ts,tsx}: Write idiomatic TypeScript with explicit function declarations and return types
Limit each TypeScript 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 in TypeScript
Avoid any and unknown in TypeScript unless unavoidable; narrow generics when possible
Choose composition over inheritance; leverage utility types (Partial, Pick, etc.) in TypeScript

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

Files:

  • apps/portal/src/app/bridge/sidebar.tsx
  • apps/dashboard/src/app/bridge/checkout-widget/CheckoutWidgetEmbed.client.tsx
**/*.{js,jsx,ts,tsx,json}

📄 CodeRabbit inference engine (AGENTS.md)

Biome governs formatting and linting; its rules live in biome.json. Run pnpm fix & pnpm lint before committing, ensure there are no linting errors

Files:

  • apps/portal/src/app/bridge/sidebar.tsx
  • apps/dashboard/src/app/bridge/checkout-widget/CheckoutWidgetEmbed.client.tsx
**/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (AGENTS.md)

Lazy-import optional features; avoid top-level side-effects

Files:

  • apps/portal/src/app/bridge/sidebar.tsx
  • apps/dashboard/src/app/bridge/checkout-widget/CheckoutWidgetEmbed.client.tsx
apps/{dashboard,playground-web}/src/**/*.{ts,tsx}

📄 CodeRabbit inference engine (CLAUDE.md)

apps/{dashboard,playground-web}/src/**/*.{ts,tsx}: Import UI component primitives from @/components/ui/* (Button, Input, Select, Tabs, Card, Sidebar, Badge, Separator) in dashboard and playground
Use Tailwind CSS only – no inline styles or CSS modules in dashboard and playground
Use cn() from @/lib/utils for conditional Tailwind class merging
Use design system tokens for styling (backgrounds: bg-card, borders: border-border, muted text: text-muted-foreground)
Expose className prop on root element for component overrides

Files:

  • apps/dashboard/src/app/bridge/checkout-widget/CheckoutWidgetEmbed.client.tsx
apps/dashboard/src/**/*.{ts,tsx}

📄 CodeRabbit inference engine (CLAUDE.md)

apps/dashboard/src/**/*.{ts,tsx}: Use NavLink for internal navigation with automatic active states in dashboard
Start server component files with import "server-only"; in Next.js
Read cookies/headers with next/headers in server components
Access server-only environment variables in server components
Perform heavy data fetching in server components
Implement redirect logic with redirect() from next/navigation in server components
Begin client component files with 'use client'; directive in Next.js
Handle interactive UI with React hooks (useState, useEffect, React Query, wallet hooks) in client components
Access browser APIs (localStorage, window, IntersectionObserver) in client components
Support fast transitions with prefetched data in client components
Always call getAuthToken() to retrieve JWT from cookies on server side
Use Authorization: Bearer header for API calls – never embed tokens in URLs
Return typed results (Project[], User[]) from server-side data fetches – avoid any
Wrap client-side API calls in React Query (@tanstack/react-query)
Use descriptive, stable queryKeys in React Query for cache hits
Configure staleTime/cacheTime in React Query based on freshness (default ≥ 60s)
Keep tokens secret via internal API routes or server actions
Never import posthog-js in server components – only use analytics client-side

Files:

  • apps/dashboard/src/app/bridge/checkout-widget/CheckoutWidgetEmbed.client.tsx
apps/dashboard/**/*.{ts,tsx}

📄 CodeRabbit inference engine (.cursor/rules/dashboard.mdc)

apps/dashboard/**/*.{ts,tsx}: Always import from the central UI library under @/components/ui/* for reusable core UI components like Button, Input, Select, Tabs, Card, Sidebar, Separator, Badge
Use NavLink from @/components/ui/NavLink for internal navigation to ensure active states are handled automatically
For notices and skeletons, rely on AnnouncementBanner, GenericLoadingPage, and EmptyStateCard components
Import icons from lucide-react or the project-specific …/icons exports; never embed raw SVG
Keep components pure; fetch data outside using server components or hooks and pass it down via props
Use Tailwind CSS as the styling system; avoid inline styles or CSS modules
Merge class names with cn from @/lib/utils to keep conditional logic readable
Stick to design tokens: use bg-card, border-border, text-muted-foreground and other Tailwind variables instead of hard-coded colors
Use spacing utilities (px-*, py-*, gap-*) instead of custom margins
Follow mobile-first responsive design with Tailwind helpers (max-sm, md, lg, xl)
Never hard-code colors; always use Tailwind variables
Combine class names via cn, and expose className prop if useful in components
Use React Query (@tanstack/react-query) for all client-side data fetching with typed hooks

Files:

  • apps/dashboard/src/app/bridge/checkout-widget/CheckoutWidgetEmbed.client.tsx
apps/dashboard/**/*.client.tsx

📄 CodeRabbit inference engine (.cursor/rules/dashboard.mdc)

apps/dashboard/**/*.client.tsx: Name component files after the component in PascalCase; append .client.tsx when the component is interactive
Client components must start with 'use client'; directive before imports

Files:

  • apps/dashboard/src/app/bridge/checkout-widget/CheckoutWidgetEmbed.client.tsx
apps/{dashboard,playground}/**/*.{tsx,ts}

📄 CodeRabbit inference engine (AGENTS.md)

apps/{dashboard,playground}/**/*.{tsx,ts}: Import UI primitives from @/components/ui/_ (Button, Input, Select, Tabs, Card, Sidebar, Badge, Separator) in Dashboard and Playground apps
Use NavLink for internal navigation so active states are handled automatically
Use Tailwind CSS for styling – no inline styles or CSS modules
Merge class names with cn() from @/lib/utils to keep conditional logic readable
Stick to design tokens for styling: backgrounds (bg-card), borders (border-border), muted text (text-muted-foreground), etc.
Server Components: Read cookies/headers with next/headers, access server-only environment variables or secrets, perform heavy data fetching, implement redirect logic with redirect() from next/navigation, and start files with import 'server-only'; to prevent client bundling
Client Components: Begin files with 'use client'; before imports, handle interactive UI relying on React hooks (useState, useEffect, React Query, wallet hooks), access browser APIs (localStorage, window, IntersectionObserver, etc.), and support fast transitions with client-side data prefetching
For client-side data fetching: Wrap calls in React Query (@tanstack/react-query), use descriptive and stable queryKeys for cache hits, configure staleTime / cacheTime based on freshness requirements (default ≥ 60 s), and keep tokens secret by calling internal API routes or server actions

Files:

  • apps/dashboard/src/app/bridge/checkout-widget/CheckoutWidgetEmbed.client.tsx
apps/{dashboard,playground}/**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

apps/{dashboard,playground}/**/*.{ts,tsx}: For server-side data fetching: Always call getAuthToken() to retrieve the JWT from cookies and inject the token as an Authorization: Bearer header – never embed it in the URL. Return typed results (Project[], User[], …) – avoid any
Never import posthog-js in server components; analytics reporting is client-side only

Files:

  • apps/dashboard/src/app/bridge/checkout-widget/CheckoutWidgetEmbed.client.tsx
🪛 Gitleaks (8.30.0)
apps/portal/src/app/bridge/swap-widget/page.mdx

[high] 84-84: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.

(generic-api-key)


[high] 115-115: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.

(generic-api-key)


[high] 130-130: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.

(generic-api-key)

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

1-18: LGTM! Imports and metadata are well-structured.

The imports are appropriate for a documentation page, and the metadata configuration follows the expected pattern. The image imports correctly reference the new .jpg files mentioned in the PR objectives.


20-69: LGTM! Clear documentation structure and helpful examples.

The introduction, feature list, and basic usage examples are well-organized and easy to follow. The progression from basic usage to provider setup is logical and will help users integrate the widget correctly.


140-157: LGTM! Helpful resource links provided.

The API reference and playground links give users clear next steps for deeper exploration and hands-on testing.


84-84: Static analysis false positives - safe to ignore.

The Gitleaks warnings for lines 84, 115, and 130 are false positives. These are Ethereum contract addresses (starting with 0x), not API keys. Contract addresses are public information and do not pose a security risk in documentation.

Also applies to: 115-115, 130-130


71-138: All technical details in the configuration examples are accurate and do not require changes.

Base is a blockchain network with chain ID 8453, and chain ID 137 uses the POL currency on Polygon Mainnet. The USDC token address 0x833589fcd6edb6e08f4c7c32d4f71b54bda02913 is the native USDC token issued by Circle on Base. POL is the native token of Polygon, confirming the documentation's reference to "Polygon native token (POL)" is current and correct.

apps/portal/src/app/bridge/checkout-widget/react/page.mdx (1)

1-98: LGTM!

The documentation page is well-structured with clear examples, proper dark/light mode image handling, and appropriate links to the API reference and playground. The code samples demonstrate the essential setup with ThirdwebProvider and CheckoutWidget components.

apps/dashboard/src/app/bridge/checkout-widget/CheckoutWidgetEmbed.client.tsx (1)

86-98: LGTM!

The structured message format with source and type fields provides a clean contract for parent window communication. The consistent "checkout-widget" source identifier enables reliable message filtering in multi-iframe scenarios.

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

21-62: LGTM!

The reorganized sidebar cleanly separates "Widgets" from "Guides", and the nested structure for Bridge Widget, Checkout Widget, and Swap Widget provides intuitive navigation. The URLs are consistent with the bridgeSlug pattern.


117-125: The TypeScript and React entries under "API References" both reference /references/typescript/v5. A separate React reference page does not exist in the documentation structure. If you intend to create dedicated React documentation, update the href accordingly. Otherwise, this shared reference is likely intentional.

Likely an incorrect or invalid review comment.

apps/portal/src/app/bridge/checkout-widget/page.mdx (1)

12-70: LGTM!

The landing page provides a clear overview with proper metadata, dark/light mode images, feature list, and navigation to iframe and React integration options. The playground link is a nice addition for hands-on exploration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Dashboard Involves changes to the Dashboard. Portal Involves changes to the Portal (docs) codebase.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants