Skip to content

Conversation

@MananTank
Copy link
Member

@MananTank MananTank commented Aug 25, 2025


PR-Codex overview

This PR focuses on improving the layout and styling of the infrastructure deployment pages in the application. It enhances user experience by updating component structures, styles, and adding breadcrumb navigation for better accessibility.

Detailed summary

  • Updated InfraServiceCard component styles (spacing and font sizes).
  • Added breadcrumb navigation in the DeployInfrastructureOnChainPage.
  • Improved layout structure in DeployInfrastructurePage with updated headers and card designs.
  • Enhanced DeployInfrastructureForm styling and layout.
  • Updated button styles and interactions for better usability.
  • Added alerts for bundle discount hints in the DeployInfrastructureForm.

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

Summary by CodeRabbit

  • New Features

    • Breadcrumb navigation and redesigned headers on Infrastructure and Deploy pages
    • “Can’t find your chain?” popover with clear guidance
    • Slug-based deployment URLs; Continue button now routes by chain slug and shows disabled state when no chain selected
    • Enhanced deploy form: improved service cards with icons and selection indicator, bundle hint alert, and clearer order summary
  • Style

    • Refreshed typography, spacing, and card visuals; updated chain icon presentation
  • Refactor

    • Simplified page structure and removed redundant layout wrapper
    • Removed Chain ID badges and extraneous controls for a cleaner UI

@vercel
Copy link

vercel bot commented Aug 25, 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 Aug 25, 2025 5:30pm
4 Skipped Deployments
Project Deployment Preview Comments Updated (UTC)
docs-v2 Skipped Skipped Aug 25, 2025 5:30pm
nebula Skipped Skipped Aug 25, 2025 5:30pm
thirdweb_playground Skipped Skipped Aug 25, 2025 5:30pm
wallet-ui Skipped Skipped Aug 25, 2025 5:30pm

@vercel vercel bot temporarily deployed to Preview – docs-v2 August 25, 2025 16:47 Inactive
@vercel vercel bot temporarily deployed to Preview – thirdweb_playground August 25, 2025 16:47 Inactive
@vercel vercel bot temporarily deployed to Preview – nebula August 25, 2025 16:47 Inactive
@vercel vercel bot temporarily deployed to Preview – wallet-ui August 25, 2025 16:47 Inactive
@changeset-bot
Copy link

changeset-bot bot commented Aug 25, 2025

⚠️ No Changeset found

Latest commit: 157f4b9

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

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Aug 25, 2025

Walkthrough

The PR restructures infrastructure pages and deploy flows: updates header/layout styles, introduces breadcrumbs, revamps the deploy form UI, switches deploy routing to use chain slugs instead of numeric IDs, and removes the infrastructure layout that previously performed team prefetch/redirect.

Changes

Cohort / File(s) Summary of Changes
Infrastructure detail page UI refresh
apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/infrastructure/[chain_id]/page.tsx, .../infrastructure/[chain_id]/_components/service-card.tsx
Reworked header into a bordered section with enlarged title and chain icon; removed Chain ID badge; adjusted containers and spacing; preserved service status logic. Service card spacing and typography tweaked (smaller gaps, larger title); rendering logic unchanged.
Deploy detail page restructure
.../infrastructure/deploy/[chain_id]/page.tsx
Replaced card-based header with breadcrumb + header layout; removed Chain ID badge and extra buttons/links; introduced breadcrumb components; repositioned DeployInfrastructureForm under new header; retained server-side checks and helper usage.
Deploy form UI overhaul
.../infrastructure/deploy/_components/deploy-infrastructure-form.client.tsx
Added Alert with bundle hints; revised headings, spacing, and card styling; redesigned ServiceCard with icon area and selection check; kept pricing calculations and RPC omission warning; minor copy updates.
Deploy entry flow and routing via slug
.../infrastructure/deploy/page.tsx
Added chain data hook and slug mapping; Continue now routes to slug-based path with fallback; reorganized layout into bordered header and card body; enhanced chain selector styling; replaced help text with Popover interaction.
Layout removal
.../infrastructure/layout.tsx
Deleted layout file that fetched team by slug and redirected when missing; removed container wrapper previously applied by layout.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor User
  participant DeployIndex as Deploy Entry Page
  participant ChainsData as useAllChainsData
  participant Router

  User->>DeployIndex: Open /~/infrastructure/deploy
  DeployIndex->>ChainsData: idToChain map
  User->>DeployIndex: Select chainId
  DeployIndex->>DeployIndex: slug = idToChain.get(chainId)?.slug || chainId
  User->>Router: Click Continue
  Router->>Router: Navigate to /~/infrastructure/deploy/{slug}
Loading
sequenceDiagram
  autonumber
  actor User
  participant InfraPage as Infrastructure Pages
  note over InfraPage: Previous layout with prefetch/redirect removed
  User->>InfraPage: Request page under /~/infrastructure/...
  InfraPage->>InfraPage: Render with page-level logic only
  note over InfraPage: No layout-level team lookup/redirect
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

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.
✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch 08-25-dashboard_chain_infra_pages_ui_improvement

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@github-actions github-actions bot added the Dashboard Involves changes to the Dashboard. label Aug 25, 2025
@MananTank MananTank marked this pull request as ready for review August 25, 2025 16:48
@MananTank MananTank requested review from a team as code owners August 25, 2025 16:48
Copy link
Member Author

MananTank commented Aug 25, 2025


How to use the Graphite Merge Queue

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

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

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

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

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

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

@MananTank MananTank changed the title Dashboard: Chain Infra pages UI improvement Dashboard: Chain Infra pages UI improvements Aug 25, 2025
@MananTank MananTank marked this pull request as draft August 25, 2025 16:49
@codecov
Copy link

codecov bot commented Aug 25, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 56.53%. Comparing base (fbe1aa2) to head (157f4b9).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #7906   +/-   ##
=======================================
  Coverage   56.53%   56.53%           
=======================================
  Files         904      904           
  Lines       58592    58592           
  Branches     4143     4143           
=======================================
  Hits        33126    33126           
  Misses      25360    25360           
  Partials      106      106           
Flag Coverage Δ
packages 56.53% <ø> (ø)
🚀 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 Aug 25, 2025

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
thirdweb (esm) 64.06 KB (0%) 1.3 s (0%) 186 ms (+124.09% 🔺) 1.5 s
thirdweb (cjs) 357.05 KB (0%) 7.2 s (0%) 645 ms (+5.42% 🔺) 7.8 s
thirdweb (minimal + tree-shaking) 5.73 KB (0%) 115 ms (0%) 50 ms (+900.28% 🔺) 164 ms
thirdweb/chains (tree-shaking) 526 B (0%) 11 ms (0%) 32 ms (+2046.12% 🔺) 42 ms
thirdweb/react (minimal + tree-shaking) 19.15 KB (0%) 383 ms (0%) 60 ms (+437.31% 🔺) 443 ms

@MananTank MananTank marked this pull request as ready for review August 25, 2025 16:59
@MananTank MananTank force-pushed the 08-25-dashboard_chain_infra_pages_ui_improvement branch from 486c41c to b29d447 Compare August 25, 2025 16:59
@vercel vercel bot temporarily deployed to Preview – wallet-ui August 25, 2025 16:59 Inactive
@vercel vercel bot temporarily deployed to Preview – docs-v2 August 25, 2025 16:59 Inactive
@vercel vercel bot temporarily deployed to Preview – nebula August 25, 2025 16:59 Inactive
@vercel vercel bot temporarily deployed to Preview – thirdweb_playground August 25, 2025 16:59 Inactive
@graphite-app
Copy link
Contributor

graphite-app bot commented Aug 25, 2025

Merge activity

@graphite-app graphite-app bot changed the base branch from 08-25-dashboard_various_ui_tweaks_in_project_pages to graphite-base/7906 August 25, 2025 17:09
@graphite-app graphite-app bot changed the base branch from graphite-base/7906 to main August 25, 2025 17:20
<!--

## 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 improving the layout and user experience in the `Deploy Infrastructure` section of the application. It refines component styles, enhances breadcrumb navigation, and updates form elements for better accessibility and consistency.

### Detailed summary
- Adjusted spacing in the `InfraServiceCard` component.
- Enhanced typography and layout in various sections.
- Added breadcrumb navigation for better user context.
- Updated the `DeployInfrastructureForm` styles for consistency.
- Improved chain selection interface with better guidance.
- Refined the subscription summary layout.
- Enhanced accessibility features across components.

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

<!-- end pr-codex -->
@graphite-app graphite-app bot force-pushed the 08-25-dashboard_chain_infra_pages_ui_improvement branch from b29d447 to 157f4b9 Compare August 25, 2025 17:21
@vercel vercel bot temporarily deployed to Preview – wallet-ui August 25, 2025 17:21 Inactive
@vercel vercel bot temporarily deployed to Preview – docs-v2 August 25, 2025 17:21 Inactive
@vercel vercel bot temporarily deployed to Preview – nebula August 25, 2025 17:21 Inactive
@vercel vercel bot temporarily deployed to Preview – thirdweb_playground August 25, 2025 17:21 Inactive
@graphite-app graphite-app bot merged commit 157f4b9 into main Aug 25, 2025
24 of 25 checks passed
@graphite-app graphite-app bot deleted the 08-25-dashboard_chain_infra_pages_ui_improvement branch August 25, 2025 17:31
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🧹 Nitpick comments (10)
apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/infrastructure/[chain_id]/page.tsx (4)

101-107: Add parentheses to clarify nullish coalescing precedence

As written, === binds tighter than ??, which is intended here, but easy to misread. Parentheses improve clarity and avoid future refactors breaking behavior.

Apply this diff:

-          const serviceEnabled =
-            chainService?.enabled ?? chainService?.status === "enabled";
+          const serviceEnabled =
+            chainService?.enabled ?? (chainService?.status === "enabled");

95-102: Avoid per-iteration allocation of SKU → service key map

skuToServiceKey is recreated for every product iteration. Hoist to a top-level constant and reuse.

Within this segment, update to:

-          // Map sku to chain service key
-          const skuToServiceKey: Record<string, string> = {
-            "chain:infra:account_abstraction": "account-abstraction",
-            "chain:infra:insight": "insight",
-            "chain:infra:rpc": "rpc-edge",
-          };
-
-          const serviceKey = skuToServiceKey[product.sku];
+          const serviceKey = SKU_TO_SERVICE_KEY[product.sku];

And add this top-level constant (outside this changed hunk):

const SKU_TO_SERVICE_KEY = {
  "chain:infra:account_abstraction": "account-abstraction",
  "chain:infra:insight": "insight",
  "chain:infra:rpc": "rpc-edge",
} as const;

133-137: Trim stray space in heading string

Minor copy polish.

-                <h3 className="text-lg font-semibold">Subscription details </h3>
+                <h3 className="text-lg font-semibold">Subscription details</h3>

84-87: Extract and centralize cleanChainName helper
The cleanChainName function is duplicated in multiple locations. Centralizing it in a shared utility will prevent drift and make future updates easier.

Affected files:

  • apps/playground-web/src/components/blocks/NetworkSelectors.tsx
  • apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/infrastructure/[chain_id]/page.tsx
  • apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/infrastructure/deploy/[chain_id]/page.tsx
  • apps/dashboard/src/@/components/blocks/NetworkSelectors.tsx
  • apps/nebula/src/@/components/blocks/NetworkSelectors.tsx

Suggested refactor:

  1. Create a shared util file, e.g. src/utils/cleanChainName.ts:
    // src/utils/cleanChainName.ts
    export function cleanChainName(chainName: string): string {
      return chainName.replace("Mainnet", "");
    }
  2. In each of the above files, replace the local definition with an import:
    - function cleanChainName(chainName: string) {
    -   return chainName.replace("Mainnet", "");
    - }
    + import { cleanChainName } from "@/utils/cleanChainName";

This optional refactor centralizes the logic and reduces duplication.

apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/infrastructure/deploy/_components/deploy-infrastructure-form.client.tsx (3)

118-127: Copy tweak: “add-on” vs “service”

Small wording improvement so hints read naturally whether the first selection is RPC or an add-on.

-      return "Add one more add-on to unlock a 10% bundle discount";
+      return "Add one more service to unlock a 10% bundle discount";
@@
-      return "Add another add-on to increase your bundle discount to 15%";
+      return "Add another service to increase your bundle discount to 15%";
@@
-      return "Congrats! You unlocked the maximum 15% bundle discount";
+      return "Congrats! You unlocked the maximum 15% bundle discount";

309-313: Mark decorative icon as aria-hidden in Alert

Prevents double-announcement for screen readers.

-              <InfoIcon className="size-5" />
+              <InfoIcon aria-hidden className="size-5" />

514-525: Hide check indicator from assistive tech; it’s redundant with button state

The floating check is purely visual. Hide it from SRs and expose selection via aria-pressed on the button.

-      {!disabled && (
-        <span
-          className={cn(
-            "absolute top-4 right-4 size-6 rounded-full border-2 border-active-border flex items-center justify-center transition-colors",
-            selected && "border-foreground bg-foreground",
-          )}
-        >
-          {selected && (
-            <CheckIcon className="size-4 text-inverted-foreground" />
-          )}
-        </span>
-      )}
+      {!disabled && (
+        <span
+          aria-hidden
+          className={cn(
+            "absolute top-4 right-4 size-6 rounded-full border-2 border-active-border flex items-center justify-center transition-colors",
+            selected && "border-foreground bg-foreground",
+          )}
+        >
+          {selected && (
+            <CheckIcon aria-hidden className="size-4 text-inverted-foreground" />
+          )}
+        </span>
+      )}

Additionally (outside this hunk), on the button element add:

aria-pressed={!!selected}
apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/infrastructure/deploy/[chain_id]/page.tsx (3)

53-69: Use aria-current for the current breadcrumb segment

For the terminal crumb, add aria-current="page" so SRs correctly announce it as the current page.

-            <BreadcrumbItem>
-              <BreadcrumbLink>{cleanChainName(chain.name)}</BreadcrumbLink>
-            </BreadcrumbItem>
+            <BreadcrumbItem>
+              <BreadcrumbLink aria-current="page">
+                {cleanChainName(chain.name)}
+              </BreadcrumbLink>
+            </BreadcrumbItem>

49-49: Optional: mark this as a Server Component explicitly

To prevent accidental client imports later, consider adding the server-only marker.

Outside this hunk, at the very top of the file:

import "server-only";

85-87: Centralize cleanChainName helper

The cleanChainName function is currently defined in at least six places across the monorepo, making it easy for them to drift apart. Extract it into a single shared utility (for example, src/utils/chain.ts) and import it wherever needed.

Files to update:

  • apps/playground-web/src/components/blocks/NetworkSelectors.tsx
  • apps/dashboard/src/@/components/blocks/NetworkSelectors.tsx
  • apps/dashboard/src/@/components/contract-components/tables/NetworkSelectDropdown.tsx
  • apps/nebula/src/@/components/blocks/NetworkSelectors.tsx
  • apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/infrastructure/[chain_id]/page.tsx
  • apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/infrastructure/deploy/[chain_id]/page.tsx

Example extraction:

+ // src/utils/chain.ts
+ export function cleanChainName(chainName: string): string {
+   return chainName.replace("Mainnet", "");
+ }

Then in each file:

- function cleanChainName(chainName: string) { /* … */ }
+ import { cleanChainName } from 'src/utils/chain';

This avoids duplication and keeps the logic consistent if we ever need to update the replacement rules.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • 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 fbe1aa2 and 157f4b9.

📒 Files selected for processing (6)
  • apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/infrastructure/[chain_id]/_components/service-card.tsx (1 hunks)
  • apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/infrastructure/[chain_id]/page.tsx (1 hunks)
  • apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/infrastructure/deploy/[chain_id]/page.tsx (2 hunks)
  • apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/infrastructure/deploy/_components/deploy-infrastructure-form.client.tsx (7 hunks)
  • apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/infrastructure/deploy/page.tsx (2 hunks)
  • apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/infrastructure/layout.tsx (0 hunks)
💤 Files with no reviewable changes (1)
  • apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/infrastructure/layout.tsx
🧰 Additional context used
📓 Path-based instructions (3)
**/*.{ts,tsx}

📄 CodeRabbit inference engine (CLAUDE.md)

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

Files:

  • apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/infrastructure/deploy/_components/deploy-infrastructure-form.client.tsx
  • apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/infrastructure/deploy/page.tsx
  • apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/infrastructure/[chain_id]/_components/service-card.tsx
  • apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/infrastructure/[chain_id]/page.tsx
  • apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/infrastructure/deploy/[chain_id]/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/app/(app)/team/[team_slug]/(team)/~/infrastructure/deploy/_components/deploy-infrastructure-form.client.tsx
  • apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/infrastructure/deploy/page.tsx
  • apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/infrastructure/[chain_id]/_components/service-card.tsx
  • apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/infrastructure/[chain_id]/page.tsx
  • apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/infrastructure/deploy/[chain_id]/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/app/(app)/team/[team_slug]/(team)/~/infrastructure/deploy/_components/deploy-infrastructure-form.client.tsx
  • apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/infrastructure/deploy/page.tsx
  • apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/infrastructure/[chain_id]/_components/service-card.tsx
  • apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/infrastructure/[chain_id]/page.tsx
  • apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/infrastructure/deploy/[chain_id]/page.tsx
🧠 Learnings (14)
📚 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/**/*client.tsx : Interactive UI that relies on hooks (`useState`, `useEffect`, React Query, wallet hooks).

Applied to files:

  • apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/infrastructure/deploy/_components/deploy-infrastructure-form.client.tsx
  • apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/infrastructure/deploy/[chain_id]/page.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)/team/[team_slug]/(team)/~/infrastructure/deploy/_components/deploy-infrastructure-form.client.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/**/*client.tsx : Use React Query (`tanstack/react-query`) for all client data fetching.

Applied to files:

  • apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/infrastructure/deploy/_components/deploy-infrastructure-form.client.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/**/*client.tsx : Anything that consumes hooks from `tanstack/react-query` or thirdweb SDKs.

Applied to files:

  • apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/infrastructure/deploy/_components/deploy-infrastructure-form.client.tsx
📚 Learning: 2025-08-20T10:35:18.543Z
Learnt from: jnsdls
PR: thirdweb-dev/js#7888
File: apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/payments/page.tsx:77-81
Timestamp: 2025-08-20T10:35:18.543Z
Learning: The webhooks/payments route exists at apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/webhooks/payments/page.tsx and was added as part of the unified project layout changes.

Applied to files:

  • apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/infrastructure/deploy/page.tsx
  • apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/infrastructure/[chain_id]/page.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 `NavLink` (`@/components/ui/NavLink`) for internal navigation so active states are handled automatically.

Applied to files:

  • apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/infrastructure/deploy/page.tsx
  • apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/infrastructure/deploy/[chain_id]/page.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} : Icons come from `lucide-react` or the project-specific `…/icons` exports – never embed raw SVG.

Applied to files:

  • apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/infrastructure/deploy/[chain_id]/page.tsx
📚 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 apps/{dashboard,playground-web}/**/*.{ts,tsx} : Import UI primitives from `@/components/ui/*` (Button, Input, Select, Tabs, Card, Sidebar, Badge, Separator) in dashboard and playground apps

Applied to files:

  • apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/infrastructure/deploy/[chain_id]/page.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/(app)/team/[team_slug]/(team)/~/infrastructure/deploy/[chain_id]/page.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} : Reuse core UI primitives; avoid re-implementing buttons, cards, modals.

Applied to files:

  • apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/infrastructure/deploy/[chain_id]/page.tsx
📚 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 apps/{dashboard,playground-web}/**/*.{ts,tsx} : Use `NavLink` for internal navigation with automatic active states in dashboard and playground apps

Applied to files:

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

Applied to files:

  • apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/infrastructure/deploy/[chain_id]/page.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} : For notices & skeletons rely on `AnnouncementBanner`, `GenericLoadingPage`, `EmptyStateCard`.

Applied to files:

  • apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/infrastructure/deploy/[chain_id]/page.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} : Always import from the central UI library under `@/components/ui/*` – e.g. `import { Button } from "@/components/ui/button"`.

Applied to files:

  • apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/infrastructure/deploy/[chain_id]/page.tsx
🧬 Code graph analysis (4)
apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/infrastructure/deploy/_components/deploy-infrastructure-form.client.tsx (1)
apps/dashboard/src/@/components/ui/alert.tsx (2)
  • Alert (63-63)
  • AlertTitle (63-63)
apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/infrastructure/deploy/page.tsx (2)
apps/playground-web/src/hooks/chains.ts (1)
  • useAllChainsData (17-39)
apps/dashboard/src/@/components/blocks/NetworkSelectors.tsx (1)
  • SingleNetworkSelector (152-298)
apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/infrastructure/[chain_id]/page.tsx (2)
apps/dashboard/src/@/icons/ChainIcon.tsx (1)
  • ChainIconClient (16-41)
apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/infrastructure/[chain_id]/_components/service-card.tsx (1)
  • InfraServiceCard (15-45)
apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/infrastructure/deploy/[chain_id]/page.tsx (2)
apps/dashboard/src/@/icons/ChainIcon.tsx (1)
  • ChainIconClient (16-41)
apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/infrastructure/deploy/_components/deploy-infrastructure-form.client.tsx (1)
  • DeployInfrastructureForm (76-454)
⏰ 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). (2)
  • GitHub Check: Size
  • GitHub Check: Analyze (javascript)
🔇 Additional comments (6)
apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/infrastructure/[chain_id]/_components/service-card.tsx (1)

17-22: Spacing and heading scale update looks good

The reduced gaps and larger h3 improve hierarchy and readability of the card header without affecting semantics.

apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/infrastructure/[chain_id]/page.tsx (1)

69-89: Header refactor improves visual hierarchy and consistency

Bordered header + containerized layout aligns with the new dashboard patterns. No functional impact; nice cleanup.

apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/infrastructure/deploy/page.tsx (1)

31-39: Header structure and copy look good

Consistent with the new pattern introduced across infra pages; nice consolidation.

apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/infrastructure/deploy/_components/deploy-infrastructure-form.client.tsx (2)

151-189: Pricing math reads correctly and is easy to follow

Subtotal uses per-period price, annual discount applied against undiscounted monthly*months, bundle discount layered on top, and totals/savings reconcile. Nice.


498-513: Service icon block UI polish looks good

The elevated icon affordance aligns with the rest of the redesign and improves scannability.

apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/infrastructure/deploy/[chain_id]/page.tsx (1)

72-89: Header layout and chain avatar presentation are solid

Matches the infra index page’s new header; good consistency.

Comment on lines +77 to +83
<PopoverTrigger asChild>
<div className="text-muted-foreground hover:text-foreground cursor-pointer text-sm flex items-center gap-2">
<BadgeQuestionMarkIcon className="w-4 h-4" />
Can't find your chain?
</div>
</PopoverTrigger>
<PopoverContent align="start" className="!max-w-xl text-sm">
Copy link
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Make the popover trigger a real button for accessibility

The trigger is a clickable div with no keyboard support. Use the Button primitive to ensure focus/keyboard/ARIA semantics.

-              <PopoverTrigger asChild>
-                <div className="text-muted-foreground hover:text-foreground cursor-pointer text-sm flex items-center gap-2">
-                  <BadgeQuestionMarkIcon className="w-4 h-4" />
-                  Can't find your chain?
-                </div>
-              </PopoverTrigger>
+              <PopoverTrigger asChild>
+                <Button
+                  type="button"
+                  variant="link"
+                  size="sm"
+                  className="p-0 h-auto text-muted-foreground hover:text-foreground text-sm flex items-center gap-2"
+                >
+                  <BadgeQuestionMarkIcon className="w-4 h-4" aria-hidden />
+                  <span>Can&apos;t find your chain?</span>
+                </Button>
+              </PopoverTrigger>
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
<PopoverTrigger asChild>
<div className="text-muted-foreground hover:text-foreground cursor-pointer text-sm flex items-center gap-2">
<BadgeQuestionMarkIcon className="w-4 h-4" />
Can't find your chain?
</div>
</PopoverTrigger>
<PopoverContent align="start" className="!max-w-xl text-sm">
<PopoverTrigger asChild>
<Button
type="button"
variant="link"
size="sm"
className="p-0 h-auto text-muted-foreground hover:text-foreground text-sm flex items-center gap-2"
>
<BadgeQuestionMarkIcon className="w-4 h-4" aria-hidden />
<span>Can&apos;t find your chain?</span>
</Button>
</PopoverTrigger>
<PopoverContent align="start" className="!max-w-xl text-sm">
🤖 Prompt for AI Agents
In
apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/infrastructure/deploy/page.tsx
around lines 77-83 the PopoverTrigger is wrapped around a plain div which is not
keyboard-accessible; replace that div with the Button primitive (kept asChild on
PopoverTrigger) so it gains native keyboard/focus/ARIA semantics, apply the same
classes to the Button (or use an appropriate Button variant) and ensure the
Button has type="button" and an accessible label (visible text is fine) so the
popover trigger is operable via keyboard and screen readers.

Comment on lines +127 to +133
<Link
href={`/team/${team_slug}/~/infrastructure/deploy/${idToChain.get(chainId)?.slug || chainId}`}
>
Continue <ArrowRightIcon className="ml-2 w-4 h-4" />
</Link>
</Button>
)}
Copy link
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Use NavLink for internal navigation (repo convention)

Dashboard apps should use NavLink to inherit active states and consistent styling.

Apply this diff within the changed block:

-              <Button asChild className="w-fit rounded-full" size="sm">
-                <Link
-                  href={`/team/${team_slug}/~/infrastructure/deploy/${idToChain.get(chainId)?.slug || chainId}`}
-                >
-                  Continue <ArrowRightIcon className="ml-2 w-4 h-4" />
-                </Link>
-              </Button>
+              <Button asChild className="w-fit rounded-full" size="sm">
+                <NavLink
+                  href={`/team/${team_slug}/~/infrastructure/deploy/${idToChain.get(chainId)?.slug || chainId}`}
+                >
+                  Continue <ArrowRightIcon className="ml-2 w-4 h-4" />
+                </NavLink>
+              </Button>

Also update imports (outside this hunk):

- import Link from "next/link";
+ import { NavLink } from "@/components/ui/NavLink";
🤖 Prompt for AI Agents
In
apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/infrastructure/deploy/page.tsx
around lines 127 to 133, replace the internal Next.js Link usage with the
project's NavLink component so the link inherits active states and styling;
change the JSX to render <NavLink
href={`/team/${team_slug}/~/infrastructure/deploy/${idToChain.get(chainId)?.slug
|| chainId}`}>Continue <ArrowRightIcon .../></NavLink> inside the Button and
update the top-level imports to remove `import Link from "next/link";` and add
`import { NavLink } from "@/components/ui/NavLink";`.

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.

3 participants