Skip to content

Conversation

@0xFirekeeper
Copy link
Member

@0xFirekeeper 0xFirekeeper commented Dec 10, 2025

Introduces a date range selector to the dedicated relayer dashboard, allowing users to filter transaction data by date. Updates state management to use a Range object instead of separate from/to strings, and changes the default date range to the last 7 days. Also ensures chain filters and summary stats reflect the selected date range and only include relevant chains.


PR-Codex overview

This PR focuses on enhancing the DedicatedRelayer component by updating date range handling, modifying types to support nullable values, and improving the user interface with a date range selector.

Detailed summary

  • Changed transactionFeeUsd type from number to number | null.
  • Updated default date range from "last 30 days" to "last 7 days".
  • Introduced rangeType prop in DedicatedRelayerPage and DedicatedRelayerPageClient.
  • Added state management for date range in DedicatedRelayerPageClient.
  • Replaced from and to props with range in DedicatedRelayerActiveState.
  • Integrated DateRangeSelector component for user-friendly date selection.
  • Removed unused variables and props related to transaction execution.
  • Adjusted logic for fetching transaction summaries based on activity window.
  • Updated TransactionFeeCell to handle nullable usdValue.

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

Summary by CodeRabbit

  • New Features

    • Interactive date range selector (defaults to last 7 days) with configurable initial range type; child views receive and respect the selected range
    • Chain filter honors fleet-specific chain selections and shows Active Chains count
  • Bug Fixes / UI

    • Removed Executor column from Transactions table
    • Transaction fee shows a placeholder when USD value is unavailable
  • Behavior

    • Dashboard visibility now gates on recent activity using a longer (120-day) activity window

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

Introduces a date range selector to the dedicated relayer dashboard, allowing users to filter transaction data by date. Updates state management to use a Range object instead of separate from/to strings, and changes the default date range to the last 7 days. Also ensures chain filters and summary stats reflect the selected date range and only include relevant chains.
@0xFirekeeper 0xFirekeeper requested review from a team as code owners December 10, 2025 23:08
@changeset-bot
Copy link

changeset-bot bot commented Dec 10, 2025

⚠️ No Changeset found

Latest commit: 3355d9e

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 10, 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 Dec 10, 2025 11:54pm
4 Skipped Deployments
Project Deployment Preview Comments Updated (UTC)
docs-v2 Skipped Skipped Dec 10, 2025 11:54pm
nebula Skipped Skipped Dec 10, 2025 11:54pm
thirdweb_playground Skipped Skipped Dec 10, 2025 11:54pm
wallet-ui Skipped Skipped Dec 10, 2025 11:54pm

@github-actions github-actions bot added the Dashboard Involves changes to the Dashboard. label Dec 10, 2025
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 10, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

Replaced from/to props with a typed Range and setRange across the dedicated-relayer UI, added a DateRangeSelector, switched queries to use ISO range dates and a 120-day activity check, changed default range to last-7 days, made transactionFeeUsd nullable, removed executor/userOp fields, and added fleet chainIds filtering.

Changes

Cohort / File(s) Change Summary
Active state & UI (date range, chain filter, table adjustments)
apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/wallets/dedicated-relayer/components/active-state.tsx
Replaced from/to props with range: Range and setRange; added DateRangeSelector (right-aligned) bound to range/setRange; pass range.from/range.to as ISO strings to fleet transaction queries; compute activeChainsCount by filtering summary with fleet.chainIds; added chainIds: number[] prop to ChainFilter usage; removed Executor column and matching Skeleton/row cell; updated TransactionFeeCell to accept `usdValue: number
Client page (activity gating, date state, prop surface)
apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/wallets/dedicated-relayer/components/page-client.tsx
Introduced dateRange: Range state (initialized from props) and setDateRange; replaced/renamed summary query with hasActivityQuery using a 120-day window (from = 120 days ago, to = now) enabled when fleet is active with 5s refetch; derive totalTransactions/hasTransactions from hasActivityQuery.data; pass range/setRange to child; added rangeType to DedicatedRelayerPageClient props.
Page default range change & call site
apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/wallets/dedicated-relayer/page.tsx
Default range changed from last-30 to last-7 days; pass rangeType={range.type} into DedicatedRelayerPageClient.
Types: FleetTransaction changes
apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/wallets/dedicated-relayer/types.ts
FleetTransaction.transactionFeeUsd made `number

Sequence Diagram(s)

sequenceDiagram
  autonumber
  participant Page as Page (server/client entry)
  participant Client as DedicatedRelayerPageClient
  participant Active as DedicatedRelayerActiveState
  participant API as Fleet Transactions API / Query

  Page->>Client: initialize Range (type, from, to)
  Client->>Client: set dateRange state (from/ to / type)
  Client->>Active: pass range & setRange props
  Active->>Active: render DateRangeSelector bound to range/setRange
  Active->>API: fetch summary/transactions with range.from/to (ISO strings) & fleet.chainIds
  API-->>Active: return summary, transactions
  Active->>Active: compute activeChainsCount (filter by fleet.chainIds)
  Active->>Active: render table (omit Executor column), render TransactionFeeCell (handles null)
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

  • Verify Range initialization/prop drilling: page.tsxpage-client.tsxactive-state.tsx.
  • Confirm queries convert range.from/range.to to ISO strings and hasActivityQuery 120-day window/refetch behavior.
  • Check ChainFilter new chainIds prop usage and correctness of activeChainsCount calculation.
  • Validate UI adjustments: DateRangeSelector wiring, removal of Executor column and matching skeleton/row updates, and safe handling of nullable transactionFeeUsd.

Possibly related PRs

  • Improve relayer analytics #8533 — Implements the same date-range selector and range state changes, chain filtering, nullable transactionFeeUsd, and removal of executor/userOp fields.

Pre-merge checks and finishing touches

❌ Failed checks (1 warning, 1 inconclusive)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
Title check ❓ Inconclusive The title 'Improve relayer analytics' is vague and generic, using non-descriptive phrasing that doesn't convey the specific nature of the changes (date range selector, state management updates, default range change). Consider a more specific title such as 'Add date range selector to dedicated relayer dashboard' or 'Enhance relayer analytics with date range filtering' to better reflect the main changes.
✅ Passed checks (1 passed)
Check name Status Explanation
Description check ✅ Passed The description provides comprehensive details about the changes but does not follow the required template format with clearly labeled sections like 'Notes for the reviewer' and 'How to test'.

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between fc84446 and 3355d9e.

📒 Files selected for processing (1)
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/wallets/dedicated-relayer/components/page-client.tsx (5 hunks)

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.

@codecov
Copy link

codecov bot commented Dec 10, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 54.66%. Comparing base (1aa4912) to head (3355d9e).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #8533   +/-   ##
=======================================
  Coverage   54.66%   54.66%           
=======================================
  Files         921      921           
  Lines       61163    61163           
  Branches     4151     4151           
=======================================
  Hits        33435    33435           
  Misses      27627    27627           
  Partials      101      101           
Flag Coverage Δ
packages 54.66% <ø> (ø)
🚀 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: 0

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

35-39: Hardcoded type field may become inconsistent.

The type: "last-7" is hardcoded here, but the parent component in page.tsx determines the actual preset via getLastNDaysRange("last-7"). If the parent changes the default preset ID in the future, this hardcoded value will be stale and the DateRangeSelector UI may display an incorrect label initially.

Consider passing the type field from the server component as an additional prop:

In page.tsx:

 return (
   <DedicatedRelayerPageClient
     // ...
     from={range.from.toISOString()}
     to={range.to.toISOString()}
+    rangeType={range.type}
     initialFleet={initialFleet}
   />
 );

In page-client.tsx:

 type DedicatedRelayerPageClientProps = {
   // ...
   from: string;
   to: string;
+  rangeType: Range["type"];
   initialFleet: Fleet | null;
 };

 // ...

 const [dateRange, setDateRange] = useState<Range>({
   from: new Date(props.from),
   to: new Date(props.to),
-  type: "last-7",
+  type: props.rangeType,
 });
📜 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 1aa4912 and 00d5352.

📒 Files selected for processing (3)
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/wallets/dedicated-relayer/components/active-state.tsx (8 hunks)
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/wallets/dedicated-relayer/components/page-client.tsx (4 hunks)
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/wallets/dedicated-relayer/page.tsx (1 hunks)
🧰 Additional context used
📓 Path-based instructions (11)
**/*.{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/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/wallets/dedicated-relayer/page.tsx
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/wallets/dedicated-relayer/components/page-client.tsx
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/wallets/dedicated-relayer/components/active-state.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/(app)/team/[team_slug]/[project_slug]/(sidebar)/wallets/dedicated-relayer/page.tsx
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/wallets/dedicated-relayer/components/page-client.tsx
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/wallets/dedicated-relayer/components/active-state.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/(app)/team/[team_slug]/[project_slug]/(sidebar)/wallets/dedicated-relayer/page.tsx
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/wallets/dedicated-relayer/components/page-client.tsx
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/wallets/dedicated-relayer/components/active-state.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/(app)/team/[team_slug]/[project_slug]/(sidebar)/wallets/dedicated-relayer/page.tsx
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/wallets/dedicated-relayer/components/page-client.tsx
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/wallets/dedicated-relayer/components/active-state.tsx
apps/dashboard/**/page.{ts,tsx}

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

Use the container class with a max-w-7xl cap for consistent page width

Files:

  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/wallets/dedicated-relayer/page.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/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/wallets/dedicated-relayer/page.tsx
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/wallets/dedicated-relayer/components/page-client.tsx
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/wallets/dedicated-relayer/components/active-state.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/(app)/team/[team_slug]/[project_slug]/(sidebar)/wallets/dedicated-relayer/page.tsx
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/wallets/dedicated-relayer/components/page-client.tsx
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/wallets/dedicated-relayer/components/active-state.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/(app)/team/[team_slug]/[project_slug]/(sidebar)/wallets/dedicated-relayer/page.tsx
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/wallets/dedicated-relayer/components/page-client.tsx
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/wallets/dedicated-relayer/components/active-state.tsx
**/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (AGENTS.md)

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

Files:

  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/wallets/dedicated-relayer/page.tsx
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/wallets/dedicated-relayer/components/page-client.tsx
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/wallets/dedicated-relayer/components/active-state.tsx
apps/dashboard/**/components/**/*.{ts,tsx}

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

Add className prop to the root element of every component to allow external overrides

Files:

  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/wallets/dedicated-relayer/components/page-client.tsx
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/wallets/dedicated-relayer/components/active-state.tsx
apps/{dashboard,playground}/**/components/**/*.{tsx,ts}

📄 CodeRabbit inference engine (AGENTS.md)

apps/{dashboard,playground}/**/components/**/*.{tsx,ts}: Group feature-specific components under feature/components/_ and expose a barrel index.ts when necessary
Expose a className prop on the root element of every component for styling overrides

Files:

  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/wallets/dedicated-relayer/components/page-client.tsx
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/wallets/dedicated-relayer/components/active-state.tsx
🧬 Code graph analysis (3)
apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/wallets/dedicated-relayer/page.tsx (1)
apps/dashboard/src/@/components/analytics/date-range-selector.tsx (1)
  • getLastNDaysRange (83-101)
apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/wallets/dedicated-relayer/components/page-client.tsx (2)
apps/dashboard/src/@/components/analytics/date-range-selector.tsx (1)
  • Range (128-133)
apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/wallets/dedicated-relayer/lib/hooks.ts (1)
  • useFleetTransactionsSummary (44-54)
apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/wallets/dedicated-relayer/components/active-state.tsx (2)
apps/dashboard/src/@/components/analytics/date-range-selector.tsx (2)
  • Range (128-133)
  • DateRangeSelector (13-81)
apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/wallets/dedicated-relayer/lib/hooks.ts (1)
  • useFleetTransactions (23-30)
⏰ 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, esbuild)
  • GitHub Check: E2E Tests (pnpm, vite)
  • GitHub Check: Size
  • GitHub Check: Lint Packages
  • GitHub Check: Unit Tests
  • GitHub Check: Analyze (javascript)
🔇 Additional comments (13)
apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/wallets/dedicated-relayer/page.tsx (2)

45-46: LGTM: Default date range updated to 7 days.

The change from 30 to 7 days aligns with the PR objectives and provides a more focused default view for users.


80-81: LGTM: Proper serialization for server-to-client boundary.

Converting Date objects to ISO strings is the correct approach for passing dates from server components to client components in Next.js.

apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/wallets/dedicated-relayer/components/page-client.tsx (4)

3-6: LGTM: Required imports for date range functionality.

The subDays utility and Range type are correctly imported and used throughout the component.


56-65: LGTM: Well-reasoned separation of activity detection from user-selected range.

The 120-day fixed window for hasActivityQuery correctly prevents the dashboard from reverting to the pending state when users select a date range with no transactions. The explanatory comments make the intent clear.


67-68: LGTM: Correct use of activity query for transaction detection.

Using hasActivityQuery (120-day window) to determine hasTransactions ensures the dashboard state is based on recent historical activity rather than the user's selected date range.


124-125: LGTM: Proper propagation of range state to child component.

The dateRange state and setDateRange setter are correctly passed as range and setRange props, enabling the child component to control and reflect the selected date range.

apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/wallets/dedicated-relayer/components/active-state.tsx (7)

8-11: LGTM: DateRangeSelector imports added.

The DateRangeSelector component and Range type are correctly imported from the analytics components library.


42-43: LGTM: Props refactored to use unified Range type.

Replacing separate from and to props with a range object and setRange callback provides a cleaner, more maintainable API that aligns with the DateRangeSelector component's interface.


59-60: LGTM: Date range correctly applied to summary query.

The range.from and range.to Date objects are properly converted to ISO strings for the API query, enabling date-filtered transaction summaries.


66-67: LGTM: Date range correctly applied to transactions query.

Consistent use of range.from.toISOString() and range.to.toISOString() ensures the transactions list reflects the user's selected date range.


77-82: LGTM: Active chains calculation now respects fleet configuration.

Filtering transactionsByChain to only include chains present in fleet.chainIds ensures the "Active Chains" metric accurately reflects chains within the fleet's configuration. This prevents potential counting issues if the API returns transactions from chains outside the fleet scope.


85-87: LGTM: DateRangeSelector properly integrated.

The DateRangeSelector is correctly positioned and wired to the range and setRange state, enabling users to filter the dashboard data by date range.


374-394: ChainFilter updated to support fleet-specific filtering.

The addition of the chainIds prop enables filtering chains to only those configured for the fleet, which correctly constrains the chain selector to relevant options.

@github-actions
Copy link
Contributor

github-actions bot commented Dec 10, 2025

size-limit report 📦

Path Size
@thirdweb-dev/nexus (esm) 105.66 KB (0%)
@thirdweb-dev/nexus (cjs) 319.47 KB (0%)

Eliminated the 'Executor' column from the dedicated relayer transaction table and related components. Updated the FleetTransaction type to allow transactionFeeUsd to be null and adjusted the TransactionFeeCell to display a placeholder when the value is null.
@vercel vercel bot temporarily deployed to Preview – nebula December 10, 2025 23:35 Inactive
@vercel vercel bot temporarily deployed to Preview – thirdweb_playground December 10, 2025 23:35 Inactive
@vercel vercel bot temporarily deployed to Preview – docs-v2 December 10, 2025 23:35 Inactive
@vercel vercel bot temporarily deployed to Preview – wallet-ui December 10, 2025 23:35 Inactive
Added the rangeType prop to DedicatedRelayerPageClient and updated its initialization to use the provided range type. This ensures the date range type is correctly set based on the parent component's state.
@vercel vercel bot temporarily deployed to Preview – wallet-ui December 10, 2025 23:39 Inactive
@vercel vercel bot temporarily deployed to Preview – docs-v2 December 10, 2025 23:39 Inactive
@vercel vercel bot temporarily deployed to Preview – thirdweb_playground December 10, 2025 23:39 Inactive
@vercel vercel bot temporarily deployed to Preview – nebula December 10, 2025 23:39 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: 1

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

15-26: Consider adding className prop for consistency.

While this is a page-level component, the coding guidelines specify that components in apps/dashboard/**/components/**/*.{ts,tsx} should expose a className prop on the root element. This would follow the established convention and allow for future flexibility.

Apply this diff if you'd like to align with the convention:

 type DedicatedRelayerPageClientProps = {
   teamId: string;
   projectId: string;
   teamSlug: string;
   projectSlug: string;
   client: ThirdwebClient;
   fleetId: string;
   from: string;
   to: string;
   rangeType: Range["type"];
   initialFleet: Fleet | null;
+  className?: string;
 };

 // ... later in the component ...

 return (
-  <div className="flex flex-col gap-6">
+  <div className={cn("flex flex-col gap-6", props.className)}>

Based on coding guidelines.

Also applies to: 97-98

📜 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 139e541 and fc84446.

📒 Files selected for processing (2)
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/wallets/dedicated-relayer/components/page-client.tsx (5 hunks)
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/wallets/dedicated-relayer/page.tsx (2 hunks)
🧰 Additional context used
📓 Path-based instructions (11)
**/*.{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/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/wallets/dedicated-relayer/page.tsx
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/wallets/dedicated-relayer/components/page-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/(app)/team/[team_slug]/[project_slug]/(sidebar)/wallets/dedicated-relayer/page.tsx
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/wallets/dedicated-relayer/components/page-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/(app)/team/[team_slug]/[project_slug]/(sidebar)/wallets/dedicated-relayer/page.tsx
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/wallets/dedicated-relayer/components/page-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/(app)/team/[team_slug]/[project_slug]/(sidebar)/wallets/dedicated-relayer/page.tsx
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/wallets/dedicated-relayer/components/page-client.tsx
apps/dashboard/**/page.{ts,tsx}

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

Use the container class with a max-w-7xl cap for consistent page width

Files:

  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/wallets/dedicated-relayer/page.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/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/wallets/dedicated-relayer/page.tsx
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/wallets/dedicated-relayer/components/page-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/(app)/team/[team_slug]/[project_slug]/(sidebar)/wallets/dedicated-relayer/page.tsx
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/wallets/dedicated-relayer/components/page-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/(app)/team/[team_slug]/[project_slug]/(sidebar)/wallets/dedicated-relayer/page.tsx
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/wallets/dedicated-relayer/components/page-client.tsx
**/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (AGENTS.md)

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

Files:

  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/wallets/dedicated-relayer/page.tsx
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/wallets/dedicated-relayer/components/page-client.tsx
apps/dashboard/**/components/**/*.{ts,tsx}

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

Add className prop to the root element of every component to allow external overrides

Files:

  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/wallets/dedicated-relayer/components/page-client.tsx
apps/{dashboard,playground}/**/components/**/*.{tsx,ts}

📄 CodeRabbit inference engine (AGENTS.md)

apps/{dashboard,playground}/**/components/**/*.{tsx,ts}: Group feature-specific components under feature/components/_ and expose a barrel index.ts when necessary
Expose a className prop on the root element of every component for styling overrides

Files:

  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/wallets/dedicated-relayer/components/page-client.tsx
🧬 Code graph analysis (2)
apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/wallets/dedicated-relayer/page.tsx (1)
apps/dashboard/src/@/components/analytics/date-range-selector.tsx (1)
  • getLastNDaysRange (83-101)
apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/wallets/dedicated-relayer/components/page-client.tsx (2)
apps/dashboard/src/@/components/analytics/date-range-selector.tsx (1)
  • Range (128-133)
apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/wallets/dedicated-relayer/lib/hooks.ts (1)
  • useFleetTransactionsSummary (44-54)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: Size
  • GitHub Check: Lint Packages
  • GitHub Check: Analyze (javascript)
🔇 Additional comments (6)
apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/wallets/dedicated-relayer/page.tsx (2)

45-46: LGTM! Default date range updated as intended.

The default date range change from 30 to 7 days aligns with the PR objectives and the comment accurately reflects the implementation.


82-82: LGTM! RangeType prop correctly propagated.

The new rangeType prop is properly extracted from the range.type and passed to the client component, maintaining type consistency with the Range interface.

apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/wallets/dedicated-relayer/components/page-client.tsx (4)

3-3: LGTM! Imports correctly added.

The subDays import supports the 120-day activity check, and the Range type import maintains type consistency across the date range feature.

Also applies to: 6-6


24-24: LGTM! RangeType prop correctly typed.

The rangeType prop is properly typed as Range["type"], maintaining consistency with the centralized Range interface from the date-range-selector component.


36-40: LGTM! Date range state properly initialized.

The dateRange state is correctly initialized from props, converting ISO string dates to Date objects and including the range type. Since this is a page-level component that mounts once per navigation, the lack of prop synchronization is acceptable.


125-126: LGTM! Range props correctly passed to child component.

The range and setRange props properly replace the previous from/to string-based API, maintaining type consistency and enabling the date range selector functionality in the child component.

Replaces repeated date calculations for the activity window with a useMemo hook to optimize performance and ensure consistent date values for fleet transaction queries.
@vercel vercel bot temporarily deployed to Preview – nebula December 10, 2025 23:46 Inactive
@vercel vercel bot temporarily deployed to Preview – wallet-ui December 10, 2025 23:46 Inactive
@vercel vercel bot temporarily deployed to Preview – docs-v2 December 10, 2025 23:46 Inactive
@vercel vercel bot temporarily deployed to Preview – thirdweb_playground December 10, 2025 23:46 Inactive
@0xFirekeeper 0xFirekeeper merged commit f3d2739 into main Dec 10, 2025
18 of 20 checks passed
@0xFirekeeper 0xFirekeeper deleted the firekeeper/improve-analytics branch December 10, 2025 23:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Dashboard Involves changes to the Dashboard.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants