Skip to content

Conversation

@MananTank
Copy link
Member

@MananTank MananTank commented Oct 17, 2025


PR-Codex overview

This PR primarily focuses on refactoring components related to the FAQ section and updating the analytics reporting for bridge page links. It also includes modifications to the header components and their styling.

Detailed summary

  • Renamed FaqSection to FaqAccordion and updated its usage.
  • Introduced a new FaqSection function in page.tsx to wrap FaqAccordion.
  • Updated reportBridgePageLinkClick to include a new linkType.
  • Refactored PageHeader to BridgePageHeader and adjusted its layout.
  • Added a new HeadingSection component for improved structure.
  • Enhanced styling for buttons and links throughout.

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

Summary by CodeRabbit

  • New Features

    • Theme toggle added to dashboard headers (client-safe, icon button)
    • Documentation quick-access added as an icon button in headers and bridge area
  • UI/Layout Changes

    • Redesigned bridge page with a new hero/heading and data pill layout
    • FAQ refactored into an accordion-style component (FaqAccordion)
    • Header navigation updated to include Trending Tokens and documentation controls
    • Removed legacy pill-style external link component (PillLink)

@linear
Copy link

linear bot commented Oct 17, 2025

@changeset-bot
Copy link

changeset-bot bot commented Oct 17, 2025

⚠️ No Changeset found

Latest commit: 9bb65ad

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 Oct 17, 2025

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

Project Deployment Preview Comments Updated (UTC)
thirdweb-www Ready Ready Preview Comment Oct 17, 2025 10:01pm
4 Skipped Deployments
Project Deployment Preview Comments Updated (UTC)
docs-v2 Skipped Skipped Oct 17, 2025 10:01pm
nebula Skipped Skipped Oct 17, 2025 10:01pm
thirdweb_playground Skipped Skipped Oct 17, 2025 10:01pm
wallet-ui Skipped Skipped Oct 17, 2025 10:01pm

💡 Enable Vercel Agent with $100 free credit for automated AI reviews

@github-actions github-actions bot added the Dashboard Involves changes to the Dashboard. label Oct 17, 2025
@MananTank MananTank marked this pull request as ready for review October 17, 2025 16:16
@MananTank MananTank requested review from a team as code owners October 17, 2025 16:16
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 17, 2025

Walkthrough

Renamed an analytics event linkType option to "bridge-docs"; removed the PillLink component; renamed and restructured FAQ/header components, added client-only theme-toggle and docs controls in headers, and reorganized the bridge page layout and imports.

Changes

Cohort / File(s) Change Summary
Analytics Type
apps/dashboard/src/@/analytics/report.ts
Updated reportBridgePageLinkClick parameter type: replaced allowed linkType value "integrate-bridge" with "bridge-docs" (retains "trending-tokens").
FAQ Component
apps/dashboard/src/@/components/blocks/faq-section.tsx
Renamed exported component FaqSectionFaqAccordion; removed the section wrapper and static header from the component (now renders only mapped FAQ items).
FAQ Consumer
apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/(chainPage)/page.tsx
Updated import/usage to FaqAccordion; introduced a local FaqSection wrapper that renders the "Frequently asked questions" header and uses FaqAccordion.
Tokens header
apps/dashboard/src/app/(app)/(dashboard)/tokens/components/header.tsx
Added a client-only ToggleThemeButton with Skeleton SSR fallback; replaced Docs text link with an icon button; grouped docs, theme toggle, and PublicPageConnectButton and adjusted spacing/padding.
Bridge header
apps/dashboard/src/app/bridge/components/header.tsx
Renamed exported PageHeaderBridgePageHeader; added internal ToggleThemeButton; added documentation and trending-token controls that call reportBridgePageLinkClick; adjusted layout, imports, and padding.
Removed component
apps/dashboard/src/app/bridge/components/client/pill-link.tsx
Deleted exported PillLink component (removed file). Previously rendered external pill links with icons and called reportBridgePageLinkClick on click.
Bridge page
apps/dashboard/src/app/bridge/page.tsx
Reworked page to use BridgePageHeader, new HeadingSection, and BridgeFaqSection (uses FaqAccordion); removed previous PageHeader/title/CTA pills and PillLink usage; adjusted hero/embed and FAQ placement.

Sequence Diagram(s)

sequenceDiagram
  participant User
  participant Header as Bridge/Tokens Header
  participant Analytics as reportBridgePageLinkClick
  Note over Header,Analytics: Header adds docs & trending controls + theme toggle (client-only)
  User->>Header: Click "Documentation" or "Trending Tokens"
  Header->>Analytics: reportBridgePageLinkClick({ linkType: "bridge-docs" | "trending-tokens" })
  Header-->>User: Open external docs / navigate
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Pre-merge checks and finishing touches

❌ Failed checks (2 warnings, 1 inconclusive)
Check name Status Explanation Resolution
Out of Scope Changes Check ⚠️ Warning While many changes are directly related to the bridge page (PageHeader rename to BridgePageHeader, bridge page layout restructuring, analytics reporting updates), the PR also includes modifications that appear to be outside the stated scope of the bridge page issue. Specifically, changes to apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/(chainPage)/page.tsx (chain page) and apps/dashboard/src/app/(app)/(dashboard)/tokens/components/header.tsx (tokens page header) extend beyond the bridge page domain. Additionally, broad component refactoring of the FAQ system and analytics reporting affects multiple features outside the bridge context.
Docstring Coverage ⚠️ Warning Docstring coverage is 8.33% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
Linked Issues Check ❓ Inconclusive The linked issue PRO-48 provides minimal description ("Bridge Page > Remove title at top of bridge page"), which is insufficient to comprehensively validate all code requirements. From the raw summary, the PR includes changes that reasonably align with updating the bridge page UI—such as renaming PageHeader to BridgePageHeader, restructuring the bridge page layout, and removing the static header. However, without detailed requirements from the linked issue, it is difficult to confirm all objectives have been met or to identify whether any specific title removal requirement has been properly addressed.
✅ Passed checks (2 passed)
Check name Status Explanation
Title Check ✅ Passed The pull request title "[PRO-48] Dashboard: Bridge page UI updates" is clearly and concisely related to the primary change, which involves refactoring and updating the user interface of the bridge page. The title includes the issue tag and accurately captures the main focus of the changeset without being overly vague or including unnecessary noise. While the title does not detail every specific change (such as the analytics reporting update or component renames), this is appropriate and expected for a brief PR title.
Description Check ✅ Passed The pull request description includes a PR-Codex overview that provides a detailed summary of the changes, including renamed components, new wrappers, analytics updates, and styling enhancements. However, the description does not strictly follow the specified template structure—it lacks explicit sections for "Notes for the reviewer" and "How to test" as outlined in the template. Despite this deviation from the template format, the PR-Codex summary provides substantive information about what was changed and why, which serves the primary purpose of the description.
✨ 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 pro-48

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.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 17, 2025

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch pro-48

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

@codecov
Copy link

codecov bot commented Oct 17, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 54.89%. Comparing base (db291d2) to head (9bb65ad).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #8274   +/-   ##
=======================================
  Coverage   54.89%   54.89%           
=======================================
  Files         919      919           
  Lines       60622    60622           
  Branches     4126     4126           
=======================================
  Hits        33278    33278           
  Misses      27242    27242           
  Partials      102      102           
Flag Coverage Δ
packages 54.89% <ø> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions
Copy link
Contributor

github-actions bot commented Oct 17, 2025

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
thirdweb (esm) 64.51 KB (0%) 1.3 s (0%) 193 ms (+160% 🔺) 1.5 s
thirdweb (cjs) 365.68 KB (0%) 7.4 s (0%) 775 ms (+2.74% 🔺) 8.1 s
thirdweb (minimal + tree-shaking) 5.73 KB (0%) 115 ms (0%) 101 ms (+2649.19% 🔺) 216 ms
thirdweb/chains (tree-shaking) 526 B (0%) 11 ms (0%) 39 ms (+2313.05% 🔺) 50 ms
thirdweb/react (minimal + tree-shaking) 19.13 KB (0%) 383 ms (0%) 89 ms (+1036.22% 🔺) 471 ms

@graphite-app graphite-app bot changed the base branch from 10-17-dashboard_fix_autoconnect_in__bridge_page to graphite-base/8274 October 17, 2025 16:38
@graphite-app graphite-app bot force-pushed the graphite-base/8274 branch from a90569d to 12082fd Compare October 17, 2025 16:49
@vercel vercel bot temporarily deployed to Preview – nebula October 17, 2025 16:49 Inactive
@vercel vercel bot temporarily deployed to Preview – thirdweb_playground October 17, 2025 16:49 Inactive
@vercel vercel bot temporarily deployed to Preview – docs-v2 October 17, 2025 16:49 Inactive
@vercel vercel bot temporarily deployed to Preview – wallet-ui October 17, 2025 16:49 Inactive
@graphite-app graphite-app bot changed the base branch from graphite-base/8274 to main October 17, 2025 16:50
@vercel vercel bot temporarily deployed to Preview – wallet-ui October 17, 2025 16:50 Inactive
@vercel vercel bot temporarily deployed to Preview – nebula October 17, 2025 16:50 Inactive
@vercel vercel bot temporarily deployed to Preview – thirdweb_playground October 17, 2025 16:50 Inactive
@vercel vercel bot temporarily deployed to Preview – docs-v2 October 17, 2025 16:50 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: 3

Caution

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

⚠️ Outside diff range comments (2)
apps/dashboard/src/@/components/blocks/faq-section.tsx (1)

30-30: Fix typo in variable name.

The setter is named setIsOpenn with an extra 'n'. This should be setIsOpen for consistency and readability.

Apply this diff:

-  const [isOpen, setIsOpenn] = useState(false);
+  const [isOpen, setIsOpen] = useState(false);
   const contentId = useId();
   return (
     <DynamicHeight>
       <div className={cn("border-b border-dashed", props.className)}>
         <h3>
           <Button
             variant="ghost"
-            onClick={() => setIsOpenn(!isOpen)}
+            onClick={() => setIsOpen(!isOpen)}
apps/dashboard/src/app/bridge/page.tsx (1)

117-132: Avoid duplication: reuse the shared DotsBackgroundPattern.

This inline implementation duplicates DotsBackgroundPattern from @/components/ui/background-patterns.tsx (lines 3-18) with different styling (inset values, opacity, visibility constraints). Per coding guidelines, prefer composition and avoid duplication.

Apply this diff to use the shared component:

+import { DotsBackgroundPattern } from "@/components/ui/background-patterns";

Replace the inline implementation:

-function DotsBackgroundPattern(props: { className?: string }) {
-  return (
-    <div
-      className={cn(
-        "pointer-events-none absolute -inset-x-36 -inset-y-24 text-foreground/20 dark:text-muted-foreground/20 hidden lg:block",
-        props.className,
-      )}
-      style={{
-        backgroundImage: "radial-gradient(currentColor 1px, transparent 1px)",
-        backgroundSize: "24px 24px",
-        maskImage:
-          "radial-gradient(ellipse 100% 100% at 50% 50%, black 30%, transparent 50%)",
-      }}
-    />
-  );
-}

At line 59, pass the custom styling via className:

-          <DotsBackgroundPattern />
+          <DotsBackgroundPattern className="-inset-x-36 -inset-y-24 text-foreground/20 dark:text-muted-foreground/20 hidden lg:block" />

If this styling is a common pattern, consider adding it to the shared component as a variant prop.

🧹 Nitpick comments (1)
apps/dashboard/src/app/bridge/page.tsx (1)

109-115: Consider exposing className prop for flexibility.

Per coding guidelines for dashboard apps, components should expose a className prop on the root element. While DataPill has fixed styling now, adding className support improves reusability.

Apply this diff:

-function DataPill(props: { children: React.ReactNode }) {
+function DataPill(props: { children: React.ReactNode; className?: string }) {
   return (
     <p className={cn(
-      "bg-card flex items-center text-xs lg:text-sm gap-1.5 text-foreground border rounded-full px-8 lg:px-3 py-1.5 hover:text-foreground transition-colors duration-300"
+      "bg-card flex items-center text-xs lg:text-sm gap-1.5 text-foreground border rounded-full px-8 lg:px-3 py-1.5 hover:text-foreground transition-colors duration-300",
+      props.className,
     )}>
📜 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 12082fd and 3fd2285.

📒 Files selected for processing (7)
  • apps/dashboard/src/@/analytics/report.ts (1 hunks)
  • apps/dashboard/src/@/components/blocks/faq-section.tsx (1 hunks)
  • apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/(chainPage)/page.tsx (2 hunks)
  • apps/dashboard/src/app/(app)/(dashboard)/tokens/components/header.tsx (3 hunks)
  • apps/dashboard/src/app/bridge/components/client/pill-link.tsx (0 hunks)
  • apps/dashboard/src/app/bridge/components/header.tsx (2 hunks)
  • apps/dashboard/src/app/bridge/page.tsx (3 hunks)
💤 Files with no reviewable changes (1)
  • apps/dashboard/src/app/bridge/components/client/pill-link.tsx
🧰 Additional context used
📓 Path-based instructions (6)
**/*.{ts,tsx}

📄 CodeRabbit inference engine (CLAUDE.md)

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

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

Files:

  • apps/dashboard/src/@/components/blocks/faq-section.tsx
  • apps/dashboard/src/app/bridge/page.tsx
  • apps/dashboard/src/@/analytics/report.ts
  • apps/dashboard/src/app/bridge/components/header.tsx
  • apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/(chainPage)/page.tsx
  • apps/dashboard/src/app/(app)/(dashboard)/tokens/components/header.tsx
**/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (CLAUDE.md)

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

Files:

  • apps/dashboard/src/@/components/blocks/faq-section.tsx
  • apps/dashboard/src/app/bridge/page.tsx
  • apps/dashboard/src/@/analytics/report.ts
  • apps/dashboard/src/app/bridge/components/header.tsx
  • apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/(chainPage)/page.tsx
  • apps/dashboard/src/app/(app)/(dashboard)/tokens/components/header.tsx
apps/{dashboard,playground-web}/**/*.{ts,tsx}

📄 CodeRabbit inference engine (CLAUDE.md)

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

Files:

  • apps/dashboard/src/@/components/blocks/faq-section.tsx
  • apps/dashboard/src/app/bridge/page.tsx
  • apps/dashboard/src/@/analytics/report.ts
  • apps/dashboard/src/app/bridge/components/header.tsx
  • apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/(chainPage)/page.tsx
  • apps/dashboard/src/app/(app)/(dashboard)/tokens/components/header.tsx
apps/{dashboard,playground}/**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

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

Files:

  • apps/dashboard/src/@/components/blocks/faq-section.tsx
  • apps/dashboard/src/app/bridge/page.tsx
  • apps/dashboard/src/@/analytics/report.ts
  • apps/dashboard/src/app/bridge/components/header.tsx
  • apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/(chainPage)/page.tsx
  • apps/dashboard/src/app/(app)/(dashboard)/tokens/components/header.tsx
apps/{dashboard,playground}/**/*.tsx

📄 CodeRabbit inference engine (AGENTS.md)

Expose a className prop on the root element of every component

Files:

  • apps/dashboard/src/@/components/blocks/faq-section.tsx
  • apps/dashboard/src/app/bridge/page.tsx
  • apps/dashboard/src/app/bridge/components/header.tsx
  • apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/(chainPage)/page.tsx
  • apps/dashboard/src/app/(app)/(dashboard)/tokens/components/header.tsx
apps/{dashboard,playground}/src/@/analytics/report.ts

📄 CodeRabbit inference engine (AGENTS.md)

apps/{dashboard,playground}/src/@/analytics/report.ts: Check report.ts before adding a new analytics event to avoid duplicates
Analytics naming: event name as <subject> <verb>; helper function as report<Subject><Verb> (PascalCase)
Each analytics helper must include a JSDoc header (Why/Owner), accept a single typed properties object, and forward it unchanged to posthog.capture

Files:

  • apps/dashboard/src/@/analytics/report.ts
🧠 Learnings (4)
📚 Learning: 2025-08-29T15:37:38.513Z
Learnt from: CR
PR: thirdweb-dev/js#0
File: AGENTS.md:0-0
Timestamp: 2025-08-29T15:37:38.513Z
Learning: Applies to apps/{dashboard,playground}/src/@/analytics/report.ts : Analytics naming: event name as `<subject> <verb>`; helper function as `report<Subject><Verb>` (PascalCase)

Applied to files:

  • apps/dashboard/src/@/analytics/report.ts
📚 Learning: 2025-07-18T19:19:55.613Z
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T19:19:55.613Z
Learning: Applies to src/@/analytics/report.ts : Review `src/@/analytics/report.ts` before adding analytics events to check for duplicates

Applied to files:

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

Applied to files:

  • apps/dashboard/src/app/(app)/(dashboard)/tokens/components/header.tsx
📚 Learning: 2025-07-18T19:20:32.530Z
Learnt from: CR
PR: thirdweb-dev/js#0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-07-18T19:20:32.530Z
Learning: Applies to dashboard/**/*.{tsx,jsx} : Use the `container` class with a `max-w-7xl` cap for page width consistency.

Applied to files:

  • apps/dashboard/src/app/(app)/(dashboard)/tokens/components/header.tsx
🧬 Code graph analysis (4)
apps/dashboard/src/app/bridge/page.tsx (4)
apps/dashboard/src/app/bridge/components/header.tsx (1)
  • BridgePageHeader (14-74)
apps/dashboard/src/@/components/ui/background-patterns.tsx (1)
  • DotsBackgroundPattern (4-19)
apps/dashboard/src/app/bridge/components/client/UniversalBridgeEmbed.tsx (1)
  • UniversalBridgeEmbed (19-40)
apps/dashboard/src/@/components/blocks/faq-section.tsx (1)
  • FaqAccordion (8-23)
apps/dashboard/src/app/bridge/components/header.tsx (3)
apps/dashboard/src/@/analytics/report.ts (1)
  • reportBridgePageLinkClick (685-689)
apps/dashboard/src/app/(app)/components/ThirdwebMiniLogo.tsx (1)
  • ThirdwebMiniLogo (7-90)
apps/dashboard/src/@/components/blocks/color-mode-toggle.tsx (1)
  • ToggleThemeButton (10-36)
apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/(chainPage)/page.tsx (1)
apps/dashboard/src/@/components/blocks/faq-section.tsx (1)
  • FaqAccordion (8-23)
apps/dashboard/src/app/(app)/(dashboard)/tokens/components/header.tsx (2)
apps/dashboard/src/@/components/blocks/color-mode-toggle.tsx (1)
  • ToggleThemeButton (10-36)
apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/public-pages/_components/PublicPageConnectButton.tsx (1)
  • PublicPageConnectButton (13-43)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: E2E Tests (pnpm, webpack)
  • GitHub Check: Size
  • GitHub Check: Lint Packages
  • GitHub Check: Analyze (javascript)
🔇 Additional comments (2)
apps/dashboard/src/@/analytics/report.ts (1)

685-689: Verified: All call sites properly updated.

The type change from "integrate-bridge" to "bridge-docs" is complete and correct. All three call sites in apps/dashboard/src/app/bridge/components/header.tsx (lines 28, 42, and 55) have been updated to use valid parameter values ("bridge-docs" and "trending-tokens"). No orphaned code remains.

apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/(chainPage)/page.tsx (1)

76-87: LGTM: Clean separation of concerns.

The new FaqSection wrapper provides the heading and delegates item rendering to FaqAccordion, following a clear composition pattern consistent with the refactoring across the PR.

@vercel vercel bot temporarily deployed to Preview – nebula October 17, 2025 17:06 Inactive
@vercel vercel bot temporarily deployed to Preview – docs-v2 October 17, 2025 17:06 Inactive
@vercel vercel bot temporarily deployed to Preview – thirdweb_playground October 17, 2025 17:06 Inactive
@vercel vercel bot temporarily deployed to Preview – wallet-ui October 17, 2025 17:06 Inactive
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.

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

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/(app)/(dashboard)/tokens/components/header.tsx (1)

12-12: Add explicit return type.

Per coding guidelines, functions should have explicit return types.

As per coding guidelines.

Apply this diff:

-export function PageHeader(props: { containerClassName?: string }) {
+export function PageHeader(props: { containerClassName?: string }): JSX.Element {
♻️ Duplicate comments (2)
apps/dashboard/src/app/bridge/components/header.tsx (1)

70-96: Eliminate duplication: use the shared ToggleThemeButton.

This local implementation duplicates the shared ToggleThemeButton at @/components/blocks/color-mode-toggle.tsx. The styling differences (ghost variant, icon size, skeleton size) can be handled via the shared component's className prop.

Apply this diff to use the shared component:

-function ToggleThemeButton(props: { className?: string }) {
-  const { setTheme, theme } = useTheme();
-
-  return (
-    <ClientOnly
-      ssr={<Skeleton className="size-[36px] rounded-full border bg-accent" />}
-    >
-      <Button
-        aria-label="Toggle theme"
-        className={cn(
-          "h-auto w-auto rounded-full p-2 text-muted-foreground hover:text-foreground",
-          props.className,
-        )}
-        onClick={() => {
-          setTheme(theme === "dark" ? "light" : "dark");
-        }}
-        variant="ghost"
-      >
-        {theme === "light" ? (
-          <SunIcon className="size-5 " />
-        ) : (
-          <MoonIcon className="size-5 " />
-        )}
-      </Button>
-    </ClientOnly>
-  );
-}

Update the imports:

-import { BookOpenIcon, CoinsIcon, MoonIcon, SunIcon } from "lucide-react";
+import { BookOpenIcon, CoinsIcon } from "lucide-react";
 import Link from "next/link";
-import { useTheme } from "next-themes";
 import { reportBridgePageLinkClick } from "@/analytics/report";
 import { ClientOnly } from "@/components/blocks/client-only";
+import { ToggleThemeButton } from "@/components/blocks/color-mode-toggle";
 import { Button } from "@/components/ui/button";
 import { Skeleton } from "@/components/ui/skeleton";

If the styling needs to differ from the shared component, pass a className prop to override specific styles.

apps/dashboard/src/app/(app)/(dashboard)/tokens/components/header.tsx (1)

49-75: Eliminate duplication: reuse the shared ToggleThemeButton.

This internal ToggleThemeButton duplicates the shared component at @/components/blocks/color-mode-toggle.tsx with only minor styling differences (ghost vs outline variant, skeleton size 36px vs 34px, icon size).

Import and reuse the shared component:

-import { BookOpenIcon, MoonIcon, SunIcon } from "lucide-react";
+import { BookOpenIcon } from "lucide-react";
 import Link from "next/link";
-import { useTheme } from "next-themes";
-import { ClientOnly } from "@/components/blocks/client-only";
-import { Button } from "@/components/ui/button";
-import { Skeleton } from "@/components/ui/skeleton";
+import { ToggleThemeButton } from "@/components/blocks/color-mode-toggle";

Remove the local implementation:

-
-function ToggleThemeButton(props: { className?: string }) {
-  const { setTheme, theme } = useTheme();
-
-  return (
-    <ClientOnly
-      ssr={<Skeleton className="size-[36px] rounded-full border bg-accent" />}
-    >
-      <Button
-        aria-label="Toggle theme"
-        className={cn(
-          "h-auto w-auto rounded-full p-2 text-muted-foreground hover:text-foreground",
-          props.className,
-        )}
-        onClick={() => {
-          setTheme(theme === "dark" ? "light" : "dark");
-        }}
-        variant="ghost"
-      >
-        {theme === "light" ? (
-          <SunIcon className="size-5 " />
-        ) : (
-          <MoonIcon className="size-5 " />
-        )}
-      </Button>
-    </ClientOnly>
-  );
-}

If the ghost variant and larger sizing are preferred, update the shared component to accept variant/size props.

🧹 Nitpick comments (4)
apps/dashboard/src/app/bridge/components/header.tsx (2)

14-16: Add className prop to the root element.

Per coding guidelines, dashboard components should expose a className prop on the root element. Currently, only containerClassName is exposed and applied to an inner element.

Apply this diff:

-export function BridgePageHeader(props: { containerClassName?: string }) {
+export function BridgePageHeader(props: { 
+  className?: string;
+  containerClassName?: string;
+}) {
   return (
-    <div className="border-b border-border/70">
+    <div className={cn("border-b border-border/70", props.className)}>

As per coding guidelines


89-89: Remove trailing space in className.

Minor formatting: "size-5 " has a trailing space.

Apply this diff:

-          <SunIcon className="size-5 " />
+          <SunIcon className="size-5" />
apps/dashboard/src/@/components/blocks/faq-section.tsx (2)

30-30: Fix typo in state setter name.

The state setter is named setIsOpenn (extra 'n') instead of setIsOpen. While this doesn't affect functionality, it's a code quality issue.

Apply this diff to fix the typo:

-  const [isOpen, setIsOpenn] = useState(false);
+  const [isOpen, setIsOpen] = useState(false);
           variant="ghost"
-          onClick={() => setIsOpenn(!isOpen)}
+          onClick={() => setIsOpen(!isOpen)}
           aria-controls={contentId}

25-29: Add explicit return type per coding guidelines.

The function declaration is missing an explicit return type, which is required by the TypeScript coding guidelines.

As per coding guidelines.

Apply this diff:

 function FaqItem(props: {
   title: string;
   description: string;
   className?: string;
-}) {
+}): React.JSX.Element {
📜 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 3fd2285 and 7585dce.

📒 Files selected for processing (7)
  • apps/dashboard/src/@/analytics/report.ts (1 hunks)
  • apps/dashboard/src/@/components/blocks/faq-section.tsx (1 hunks)
  • apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/(chainPage)/page.tsx (2 hunks)
  • apps/dashboard/src/app/(app)/(dashboard)/tokens/components/header.tsx (3 hunks)
  • apps/dashboard/src/app/bridge/components/client/pill-link.tsx (0 hunks)
  • apps/dashboard/src/app/bridge/components/header.tsx (2 hunks)
  • apps/dashboard/src/app/bridge/page.tsx (3 hunks)
💤 Files with no reviewable changes (1)
  • apps/dashboard/src/app/bridge/components/client/pill-link.tsx
🚧 Files skipped from review as they are similar to previous changes (3)
  • apps/dashboard/src/@/analytics/report.ts
  • apps/dashboard/src/app/bridge/page.tsx
  • apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/(chainPage)/page.tsx
🧰 Additional context used
📓 Path-based instructions (5)
**/*.{ts,tsx}

📄 CodeRabbit inference engine (CLAUDE.md)

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

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

Files:

  • apps/dashboard/src/@/components/blocks/faq-section.tsx
  • apps/dashboard/src/app/bridge/components/header.tsx
  • apps/dashboard/src/app/(app)/(dashboard)/tokens/components/header.tsx
**/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (CLAUDE.md)

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

Files:

  • apps/dashboard/src/@/components/blocks/faq-section.tsx
  • apps/dashboard/src/app/bridge/components/header.tsx
  • apps/dashboard/src/app/(app)/(dashboard)/tokens/components/header.tsx
apps/{dashboard,playground-web}/**/*.{ts,tsx}

📄 CodeRabbit inference engine (CLAUDE.md)

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

Files:

  • apps/dashboard/src/@/components/blocks/faq-section.tsx
  • apps/dashboard/src/app/bridge/components/header.tsx
  • apps/dashboard/src/app/(app)/(dashboard)/tokens/components/header.tsx
apps/{dashboard,playground}/**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

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

Files:

  • apps/dashboard/src/@/components/blocks/faq-section.tsx
  • apps/dashboard/src/app/bridge/components/header.tsx
  • apps/dashboard/src/app/(app)/(dashboard)/tokens/components/header.tsx
apps/{dashboard,playground}/**/*.tsx

📄 CodeRabbit inference engine (AGENTS.md)

Expose a className prop on the root element of every component

Files:

  • apps/dashboard/src/@/components/blocks/faq-section.tsx
  • apps/dashboard/src/app/bridge/components/header.tsx
  • apps/dashboard/src/app/(app)/(dashboard)/tokens/components/header.tsx
🧠 Learnings (4)
📚 Learning: 2025-07-18T19:20:32.530Z
Learnt from: CR
PR: thirdweb-dev/js#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/dashboard/src/app/bridge/components/header.tsx
  • apps/dashboard/src/app/(app)/(dashboard)/tokens/components/header.tsx
📚 Learning: 2025-07-18T19:20:32.530Z
Learnt from: CR
PR: thirdweb-dev/js#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/dashboard/src/app/bridge/components/header.tsx
📚 Learning: 2025-07-31T16:17:42.753Z
Learnt from: MananTank
PR: thirdweb-dev/js#7768
File: apps/playground-web/src/app/navLinks.ts:1-1
Timestamp: 2025-07-31T16:17:42.753Z
Learning: Configuration files that import and reference React components (like icon components from lucide-react) need the "use client" directive, even if they primarily export static data, because the referenced components need to be executed in a client context when used by other client components.

Applied to files:

  • apps/dashboard/src/app/(app)/(dashboard)/tokens/components/header.tsx
📚 Learning: 2025-07-18T19:20:32.530Z
Learnt from: CR
PR: thirdweb-dev/js#0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-07-18T19:20:32.530Z
Learning: Applies to dashboard/**/*.{tsx,jsx} : Use the `container` class with a `max-w-7xl` cap for page width consistency.

Applied to files:

  • apps/dashboard/src/app/(app)/(dashboard)/tokens/components/header.tsx
🧬 Code graph analysis (2)
apps/dashboard/src/app/bridge/components/header.tsx (3)
apps/dashboard/src/app/(app)/components/ThirdwebMiniLogo.tsx (1)
  • ThirdwebMiniLogo (7-90)
apps/dashboard/src/@/analytics/report.ts (1)
  • reportBridgePageLinkClick (685-689)
apps/dashboard/src/@/components/blocks/color-mode-toggle.tsx (1)
  • ToggleThemeButton (10-36)
apps/dashboard/src/app/(app)/(dashboard)/tokens/components/header.tsx (2)
apps/dashboard/src/@/components/blocks/color-mode-toggle.tsx (1)
  • ToggleThemeButton (10-36)
apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/public-pages/_components/PublicPageConnectButton.tsx (1)
  • PublicPageConnectButton (13-43)
⏰ 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). (5)
  • GitHub Check: Size
  • GitHub Check: Unit Tests
  • GitHub Check: E2E Tests (pnpm, vite)
  • GitHub Check: Build Packages
  • GitHub Check: Analyze (javascript)
🔇 Additional comments (1)
apps/dashboard/src/app/(app)/(dashboard)/tokens/components/header.tsx (1)

1-11: LGTM: Client directive and imports are appropriate.

The "use client" directive and imports are correctly configured for this interactive header component.

@graphite-app
Copy link
Contributor

graphite-app bot commented Oct 17, 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 refactoring components related to FAQ sections, modifying link types for analytics, and enhancing the header components in the bridge application.

### Detailed summary
- Changed `linkType` in `reportBridgePageLinkClick` from `"integrate-bridge"` to `"bridge-docs"`.
- Renamed `FaqSection` to `FaqAccordion` and updated its implementation.
- Introduced a new `FaqSection` component wrapping `FaqAccordion`.
- Renamed `PageHeader` to `BridgePageHeader`.
- Updated `PillLink` references to use `FaqAccordion`.
- Enhanced styling and structure of header and FAQ sections.

> ✨ 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**
  * Theme toggle added to dashboard headers
  * Documentation quick-access added to headers and bridge area

* **UI/Layout Changes**
  * Redesigned bridge page with a new hero/heading and data pill layout
  * FAQ section refactored into an accordion-style component
  * Header navigation updated to include trending tokens and documentation controls
  * Removed legacy pill-style external link component
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
@vercel vercel bot temporarily deployed to Preview – thirdweb_playground October 17, 2025 21:54 Inactive
@vercel vercel bot temporarily deployed to Preview – docs-v2 October 17, 2025 21:54 Inactive
@vercel vercel bot temporarily deployed to Preview – nebula October 17, 2025 21:54 Inactive
@vercel vercel bot temporarily deployed to Preview – wallet-ui October 17, 2025 21:54 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

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/page.tsx (1)

25-31: Fix searchParams typing, normalize array values, and guard chainId parsing.

Next.js passes searchParams as a plain object, not a Promise. Also handle string | string[] correctly and avoid NaN from Number(array).

Apply:

-export default async function BridgePage({
-  searchParams,
-}: {
-  searchParams: Promise<Record<string, string | string[]>>;
-}) {
-  const { chainId, tokenAddress, amount } = await searchParams;
+export default async function BridgePage({
+  searchParams,
+}: {
+  searchParams: Record<string, string | string[] | undefined>;
+}) {
+  const firstOf = (v?: string | string[]) => (Array.isArray(v) ? v[0] : v);
+  const chainIdStr = firstOf(searchParams.chainId);
+  const tokenAddressStr = firstOf(searchParams.tokenAddress);
+  const amountStr = firstOf(searchParams.amount);
+  const chainIdNum =
+    chainIdStr && !Number.isNaN(Number(chainIdStr)) ? Number(chainIdStr) : undefined;
@@
-  if (chainId && tokenAddress) {
+  if (chainIdNum && tokenAddressStr) {
     try {
       const metadata = await getCurrencyMetadata({
         contract: getContract({
-          address: tokenAddress as Address,
+          address: tokenAddressStr as Address,
           // eslint-disable-next-line no-restricted-syntax
-          chain: defineChain(Number(chainId)),
+          chain: defineChain(chainIdNum),
           client: bridgeAppThirdwebClient,
         }),
       });
@@
-        <DotsBackgroundPattern />
-        <UniversalBridgeEmbed
-          amount={amount as string}
-          chainId={chainId ? Number(chainId) : undefined}
+        <DotsBackgroundPattern />
+        <UniversalBridgeEmbed
+          amount={amountStr}
+          chainId={chainIdNum}
           token={
-            symbol && decimals && tokenName
+            symbol && decimals && tokenName
               ? {
-                  address: tokenAddress as Address,
+                  address: tokenAddressStr as Address,
                   name: tokenName,
                   symbol,
                 }
               : undefined
           }
         />

Also applies to: 36-46, 58-73

♻️ Duplicate comments (1)
apps/dashboard/src/app/bridge/components/header.tsx (1)

70-96: De‑duplicate theme toggle by importing the shared component.

Use @/components/blocks/color-mode-toggle instead of a local ToggleThemeButton; same SSR behavior, less duplication.

-            <ToggleThemeButton />
+            <ToggleThemeButton />

Imports:

-import { BookOpenIcon, CoinsIcon, MoonIcon, SunIcon } from "lucide-react";
+import { BookOpenIcon, CoinsIcon } from "lucide-react";
@@
-import { useTheme } from "next-themes";
@@
-import { ClientOnly } from "@/components/blocks/client-only";
-import { Button } from "@/components/ui/button";
-import { Skeleton } from "@/components/ui/skeleton";
+import { ToggleThemeButton } from "@/components/blocks/color-mode-toggle";

And remove the local ToggleThemeButton definition at the bottom of the file.

🧹 Nitpick comments (3)
apps/dashboard/src/app/bridge/page.tsx (2)

1-1: Reuse the shared DotsBackgroundPattern instead of re-implementing.

Avoid duplication; import the shared UI primitive and pass classes via its className prop.

-import { cn } from "@workspace/ui/lib/utils";
+// cn no longer needed after removing local pattern component

@@
-          <DotsBackgroundPattern />
+          <DotsBackgroundPattern className="-inset-x-36 -inset-y-24 text-foreground/20 dark:text-muted-foreground/20 hidden lg:block" />
@@
-function DotsBackgroundPattern(props: { className?: string }) {
-  return (
-    <div
-      className={cn(
-        "pointer-events-none absolute -inset-x-36 -inset-y-24 text-foreground/20 dark:text-muted-foreground/20 hidden lg:block",
-        props.className,
-      )}
-      style={{
-        backgroundImage: "radial-gradient(currentColor 1px, transparent 1px)",
-        backgroundSize: "24px 24px",
-        maskImage:
-          "radial-gradient(ellipse 100% 100% at 50% 50%, black 30%, transparent 50%)",
-      }}
-    />
-  );
-}
+// Use the shared component
+// import at top:
+// import { DotsBackgroundPattern } from "@/components/ui/background-patterns";

Based on learnings.

Also applies to: 59-60, 117-132


87-107: Optionally expose className on local components for consistency.

Consider adding className?: string to HeadingSection, DataPill, and BridgeFaqSection root nodes to match our *.tsx guideline and ease composition.

Also applies to: 109-115, 162-170

apps/dashboard/src/app/bridge/components/header.tsx (1)

14-23: Expose a className prop on the root wrapper.

Align with our *.tsx guideline; keep containerClassName for the inner header.

-export function BridgePageHeader(props: { containerClassName?: string }) {
+export function BridgePageHeader(props: {
+  className?: string;
+  containerClassName?: string;
+}) {
   return (
-    <div className="border-b border-border/70">
+    <div className={cn("border-b border-border/70", props.className)}>
       <header
📜 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 7585dce and 9bb65ad.

📒 Files selected for processing (7)
  • apps/dashboard/src/@/analytics/report.ts (1 hunks)
  • apps/dashboard/src/@/components/blocks/faq-section.tsx (1 hunks)
  • apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/(chainPage)/page.tsx (2 hunks)
  • apps/dashboard/src/app/(app)/(dashboard)/tokens/components/header.tsx (3 hunks)
  • apps/dashboard/src/app/bridge/components/client/pill-link.tsx (0 hunks)
  • apps/dashboard/src/app/bridge/components/header.tsx (2 hunks)
  • apps/dashboard/src/app/bridge/page.tsx (3 hunks)
💤 Files with no reviewable changes (1)
  • apps/dashboard/src/app/bridge/components/client/pill-link.tsx
🚧 Files skipped from review as they are similar to previous changes (3)
  • apps/dashboard/src/@/components/blocks/faq-section.tsx
  • apps/dashboard/src/app/(app)/(dashboard)/tokens/components/header.tsx
  • apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/(chainPage)/page.tsx
🧰 Additional context used
📓 Path-based instructions (6)
**/*.{ts,tsx}

📄 CodeRabbit inference engine (CLAUDE.md)

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

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

Files:

  • apps/dashboard/src/@/analytics/report.ts
  • apps/dashboard/src/app/bridge/components/header.tsx
  • apps/dashboard/src/app/bridge/page.tsx
**/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (CLAUDE.md)

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

Files:

  • apps/dashboard/src/@/analytics/report.ts
  • apps/dashboard/src/app/bridge/components/header.tsx
  • apps/dashboard/src/app/bridge/page.tsx
apps/{dashboard,playground-web}/**/*.{ts,tsx}

📄 CodeRabbit inference engine (CLAUDE.md)

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

Files:

  • apps/dashboard/src/@/analytics/report.ts
  • apps/dashboard/src/app/bridge/components/header.tsx
  • apps/dashboard/src/app/bridge/page.tsx
apps/{dashboard,playground}/**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

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

Files:

  • apps/dashboard/src/@/analytics/report.ts
  • apps/dashboard/src/app/bridge/components/header.tsx
  • apps/dashboard/src/app/bridge/page.tsx
apps/{dashboard,playground}/src/@/analytics/report.ts

📄 CodeRabbit inference engine (AGENTS.md)

apps/{dashboard,playground}/src/@/analytics/report.ts: Check report.ts before adding a new analytics event to avoid duplicates
Analytics naming: event name as <subject> <verb>; helper function as report<Subject><Verb> (PascalCase)
Each analytics helper must include a JSDoc header (Why/Owner), accept a single typed properties object, and forward it unchanged to posthog.capture

Files:

  • apps/dashboard/src/@/analytics/report.ts
apps/{dashboard,playground}/**/*.tsx

📄 CodeRabbit inference engine (AGENTS.md)

Expose a className prop on the root element of every component

Files:

  • apps/dashboard/src/app/bridge/components/header.tsx
  • apps/dashboard/src/app/bridge/page.tsx
🧠 Learnings (4)
📚 Learning: 2025-08-29T15:37:38.513Z
Learnt from: CR
PR: thirdweb-dev/js#0
File: AGENTS.md:0-0
Timestamp: 2025-08-29T15:37:38.513Z
Learning: Applies to apps/{dashboard,playground}/src/@/analytics/report.ts : Analytics naming: event name as `<subject> <verb>`; helper function as `report<Subject><Verb>` (PascalCase)

Applied to files:

  • apps/dashboard/src/@/analytics/report.ts
📚 Learning: 2025-07-18T19:19:55.613Z
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T19:19:55.613Z
Learning: Applies to src/@/analytics/report.ts : Review `src/@/analytics/report.ts` before adding analytics events to check for duplicates

Applied to files:

  • apps/dashboard/src/@/analytics/report.ts
📚 Learning: 2025-07-18T19:20:32.530Z
Learnt from: CR
PR: thirdweb-dev/js#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/dashboard/src/app/bridge/components/header.tsx
📚 Learning: 2025-07-18T19:20:32.530Z
Learnt from: CR
PR: thirdweb-dev/js#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/dashboard/src/app/bridge/components/header.tsx
🧬 Code graph analysis (2)
apps/dashboard/src/app/bridge/components/header.tsx (2)
apps/dashboard/src/@/analytics/report.ts (1)
  • reportBridgePageLinkClick (685-689)
apps/dashboard/src/@/components/blocks/color-mode-toggle.tsx (1)
  • ToggleThemeButton (10-36)
apps/dashboard/src/app/bridge/page.tsx (4)
apps/dashboard/src/app/bridge/components/header.tsx (1)
  • BridgePageHeader (14-68)
apps/dashboard/src/@/components/ui/background-patterns.tsx (1)
  • DotsBackgroundPattern (4-19)
apps/dashboard/src/app/bridge/components/client/UniversalBridgeEmbed.tsx (1)
  • UniversalBridgeEmbed (19-40)
apps/dashboard/src/@/components/blocks/faq-section.tsx (1)
  • FaqAccordion (8-23)
⏰ 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, esbuild)
  • GitHub Check: Unit Tests
  • GitHub Check: E2E Tests (pnpm, vite)
  • GitHub Check: E2E Tests (pnpm, webpack)
  • GitHub Check: Lint Packages
  • GitHub Check: Size
  • GitHub Check: Analyze (javascript)
🔇 Additional comments (2)
apps/dashboard/src/@/analytics/report.ts (1)

685-689: All verification passed; no issues found.

  • No legacy "integrate-bridge" usages remain
  • Both callsites in header.tsx use new union values ("trending-tokens", "bridge-docs")
  • JSDoc includes Why/Owner headers per guidelines
  • Event name and function name follow analytics naming conventions
  • Payload forwarded unchanged to posthog
apps/dashboard/src/app/bridge/components/header.tsx (1)

34-46: Add rel="noopener noreferrer" to both Links with target="_blank".

The dashboard codebase consistently applies rel="noopener noreferrer" to all Links with target="_blank", including internal routes. Both the docs link (external, lines 51-57) and the trending tokens link (internal /tokens, lines 34-46) should follow this pattern for consistency and security.

            <Link
              onClick={() => {
                reportBridgePageLinkClick({ linkType: "trending-tokens" });
              }}
              target="_blank"
+             rel="noopener noreferrer"
              href="/tokens"
              className="text-sm text-muted-foreground hover:text-foreground p-2 hover:bg-accent rounded-full transition-all duration-100"
            >
              <span className="text-sm sr-only md:not-sr-only">
                Trending Tokens
              </span>
              <CoinsIcon className="size-5 md:hidden" />
            </Link>
            <Link
              onClick={() => {
                reportBridgePageLinkClick({ linkType: "bridge-docs" });
              }}
              href="https://portal.thirdweb.com/bridge"
              target="_blank"
+             rel="noopener noreferrer"
              aria-label="View Documentation"
              className="text-sm text-muted-foreground hover:text-foreground p-2 hover:bg-accent rounded-full transition-all duration-100"
            >
              <BookOpenIcon className="size-5" />
            </Link>
⛔ Skipped due to learnings
Learnt from: MananTank
PR: thirdweb-dev/js#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.
Learnt from: MananTank
PR: thirdweb-dev/js#7984
File: apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/payments/components/FeatureCard.client.tsx:93-99
Timestamp: 2025-09-05T19:45:22.949Z
Learning: In the thirdweb dashboard project, rel="noopener noreferrer" attributes are not required for external links with target="_blank" in Link components, as confirmed by MananTank.

@graphite-app graphite-app bot merged commit 9bb65ad into main Oct 17, 2025
24 checks passed
@graphite-app graphite-app bot deleted the pro-48 branch October 17, 2025 22:03
@vercel vercel bot temporarily deployed to Production – docs-v2 October 17, 2025 22:03 Inactive
@vercel vercel bot temporarily deployed to Production – wallet-ui October 17, 2025 22:03 Inactive
@vercel vercel bot temporarily deployed to Production – nebula October 17, 2025 22:03 Inactive
@vercel vercel bot temporarily deployed to Production – thirdweb_playground October 17, 2025 22:03 Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Dashboard Involves changes to the Dashboard.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants