Skip to content

Conversation

@MananTank
Copy link
Member

@MananTank MananTank commented Oct 6, 2025


PR-Codex overview

This PR focuses on updating the title and description variables for better clarity and relevance based on the type of smart contract being interacted with. It enhances the Open Graph metadata for improved sharing and visibility.

Detailed summary

  • Changed const title to let title for reassignability.
  • Updated title and description for ERC20 contracts to include contractMetadata.name and contractMetadata.symbol.
  • Added Open Graph metadata with title and description.
  • Introduced fallback values for title and description in case of errors.

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

Summary by CodeRabbit

  • New Features
    • Richer Open Graph previews for contract pages, improving social sharing and discoverability.
    • Branded, more accurate titles and descriptions: ERC20 pages show token name and symbol and reference Buy/Swap/Bridge/Price; non-ERC20 pages show contract name.
    • Consistent metadata returned in both success and fallback cases, with robust fallbacks for titles, descriptions, and link previews.

@vercel vercel bot temporarily deployed to Preview – wallet-ui October 6, 2025 16:16 Inactive
@vercel vercel bot temporarily deployed to Preview – docs-v2 October 6, 2025 16:16 Inactive
@changeset-bot
Copy link

changeset-bot bot commented Oct 6, 2025

⚠️ No Changeset found

Latest commit: f3bacc1

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

@linear
Copy link

linear bot commented Oct 6, 2025

@vercel vercel bot temporarily deployed to Preview – nebula October 6, 2025 16:16 Inactive
@vercel vercel bot temporarily deployed to Preview – thirdweb_playground October 6, 2025 16:16 Inactive
@vercel
Copy link

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

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

MananTank commented Oct 6, 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.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 6, 2025

Walkthrough

Adjusts asset page metadata generation: makes title mutable; switches displayed names to contractMetadata.name (and .symbol for ERC20); updates title/description strings to new branding; adds openGraph on success and error paths and introduces fallbackTitle/fallbackDescription for failures.

Changes

Cohort / File(s) Summary of changes
Asset page metadata & OG enhancements
apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/shared-layout.tsx
Made title a let; for ERC20 used contractMetadata.name and contractMetadata.symbol in title/description with new "Buy, Swap, Bridge & Price" framing; for non-ERC20 replaced contractDisplayName with contractMetadata.name; added openGraph object mirroring title/description on success; introduced fallbackTitle/fallbackDescription and populated openGraph in catch path.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor User
  participant Route as Next.js Route
  participant Meta as generateContractLayoutMetadata
  participant Chain as Contract Metadata Source

  User->>Route: Request asset page
  Route->>Meta: generateContractLayoutMetadata(params)
  Meta->>Chain: Fetch contract metadata
  alt Fetch success
    Chain-->>Meta: contractMetadata
    Meta->>Meta: Determine ERC20 vs non-ERC20
    alt ERC20
      Meta->>Meta: Build title using contractMetadata.name & .symbol (Buy, Swap, Bridge & Price)
      Meta->>Meta: Build description mentioning name/symbol and network
    else Non-ERC20
      Meta->>Meta: Build title/description using contractMetadata.name
    end
    Meta->>Meta: Populate openGraph with title/description
    Meta-->>Route: Return metadata (title, description, openGraph)
  else Fetch error
    Chain--x Meta: Error
    Meta->>Meta: Build fallbackTitle/fallbackDescription
    Meta->>Meta: Populate openGraph with fallbacks
    Meta-->>Route: Return fallback metadata
  end
  Route-->>User: Render page with metadata
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Pre-merge checks and finishing touches

❌ Failed checks (2 warnings)
Check name Status Explanation Resolution
Description Check ⚠️ Warning The pull request description only contains the template commented out and the PR-Codex overview, but it lacks the required "## Notes for the reviewer" and "## How to test" sections from the repository’s description template, making it incomplete. Please populate the description template by adding a concise title under the template comment, detailed notes for the reviewer, and clear testing instructions under the "How to test" section.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (3 passed)
Check name Status Explanation
Title Check ✅ Passed The title concisely reflects the primary change by specifying Dashboard ERC20 token page title, metadata, and OG updates, matching the main scope without introducing unrelated details.
Linked Issues Check ✅ Passed The changes implement the SEO patterns defined in MNY-203 by updating the OG title to "{name} ({symbol}) on {network}
Out of Scope Changes Check ✅ Passed All modifications are confined to shared-layout.tsx’s metadata generation and directly address the SEO and OG requirements without introducing unrelated code or features.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch mny-203

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

Codecov Report

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

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

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

📜 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 777aed1 and 2f6cc74.

📒 Files selected for processing (1)
  • apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/shared-layout.tsx (1 hunks)
🧰 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/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/shared-layout.tsx
**/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (CLAUDE.md)

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

Files:

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

Applied to files:

  • apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/shared-layout.tsx
🧬 Code graph analysis (1)
apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/shared-layout.tsx (1)
apps/dashboard/src/@/utils/usedapp-external.ts (1)
  • shortenIfAddress (8-19)
⏰ 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: E2E Tests (pnpm, vite)
  • GitHub Check: Lint Packages
  • GitHub Check: Size
  • GitHub Check: Unit Tests
  • GitHub Check: Analyze (javascript)
🔇 Additional comments (3)
apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/shared-layout.tsx (3)

193-193: LGTM!

Changing title from const to let is necessary to allow reassignment in the ERC20 case on line 199.


208-211: LGTM!

The OpenGraph metadata addition correctly mirrors the title and description fields, which will improve social media sharing previews. This aligns with the PR objectives.


202-202: Verify default description symbol inclusion and fix spacing.

  • Default branch uses contractMetadata.name instead of contractDisplayName, dropping the symbol. Should non-ERC20 contracts still display (${contractMetadata.symbol})?
  • Remove extra space: change "smart contract on" to "smart contract on".

@github-actions
Copy link
Contributor

github-actions bot commented Oct 6, 2025

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
thirdweb (esm) 64.6 KB (0%) 1.3 s (0%) 152 ms (+202.84% 🔺) 1.5 s
thirdweb (cjs) 365.75 KB (0%) 7.4 s (0%) 542 ms (+10.44% 🔺) 7.9 s
thirdweb (minimal + tree-shaking) 5.73 KB (0%) 115 ms (0%) 81 ms (+2925.07% 🔺) 196 ms
thirdweb/chains (tree-shaking) 526 B (0%) 11 ms (0%) 40 ms (+1658.81% 🔺) 50 ms
thirdweb/react (minimal + tree-shaking) 19.13 KB (0%) 383 ms (0%) 54 ms (+1536.42% 🔺) 436 ms

@graphite-app
Copy link
Contributor

graphite-app bot commented Oct 6, 2025

Merge activity

…8194)

<!--

## 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 updates the logic for generating `title` and `description` variables in the `shared-layout.tsx` file, particularly for different types of smart contracts. It enhances the information displayed for ERC20 contracts and adds fallback values for when contract metadata is not available.

### Detailed summary
- Changed `const title` to `let title` to allow reassignment.
- Updated `title` and `description` for `ERC20` contracts using `contractMetadata`.
- Added fallback values for `title` and `description` when an error occurs, including `openGraph` properties.

> ✨ 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**
  * Richer link previews for contract pages via Open Graph metadata, improving social sharing and discoverability.
  * More accurate, branded titles and descriptions: ERC20 pages use token name and symbol; non-ERC20 pages use contract name, with references to Buy, Swap, Bridge & Price.
  * Robust fallbacks ensure meaningful titles, descriptions, and previews even if metadata loading fails.
  * Consistent metadata across success and fallback states for a more reliable sharing experience.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
@vercel vercel bot temporarily deployed to Preview – nebula October 6, 2025 19:41 Inactive
@vercel vercel bot temporarily deployed to Preview – docs-v2 October 6, 2025 19:41 Inactive
@vercel vercel bot temporarily deployed to Preview – wallet-ui October 6, 2025 19:41 Inactive
@vercel vercel bot temporarily deployed to Preview – thirdweb_playground October 6, 2025 19:41 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

♻️ Duplicate comments (2)
apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/shared-layout.tsx (2)

199-200: Add null-check for contractMetadata.symbol before use.

The template strings use contractMetadata.symbol without verifying it's not null or undefined. While contractMetadata.name is checked on line 178, there's no equivalent check for symbol. If the symbol is missing, the metadata would display "TokenName (undefined)" or "TokenName (null)".

Apply this diff to handle the symbol gracefully with a fallback:

     } else if (isERC20) {
-      title = `${contractMetadata.name} (${contractMetadata.symbol}) on ${cleanedChainName} | Buy, Swap, Bridge & Price`;
-      description = `Buy, swap & bridge ${contractMetadata.name} (${contractMetadata.symbol}) on ${cleanedChainName} with thirdweb Bridge. View contract address, holders, analytics, transactions and live price.`;
+      const symbolPart = contractMetadata.symbol ? ` (${contractMetadata.symbol})` : "";
+      title = `${contractMetadata.name}${symbolPart} on ${cleanedChainName} | Buy, Swap, Bridge & Price`;
+      description = `Buy, swap & bridge ${contractMetadata.name}${symbolPart} on ${cleanedChainName} with thirdweb Bridge. View contract address, holders, analytics, transactions and live price.`;
     } else {

214-223: Fix the double space typo in fallback description.

The fallback metadata structure is well-designed for graceful degradation, but there's a typo in fallbackDescription with a double space before "on": "smart contract on Chain ID".

Apply this diff to fix the typo:

-    const fallbackDescription = `View tokens, transactions, balances, source code, and analytics for the smart contract  on Chain ID ${params.chainIdOrSlug}`;
+    const fallbackDescription = `View tokens, transactions, balances, source code, and analytics for the smart contract on Chain ID ${params.chainIdOrSlug}`;
📜 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 2f6cc74 and f3bacc1.

📒 Files selected for processing (1)
  • apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/shared-layout.tsx (1 hunks)
🧰 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/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/shared-layout.tsx
**/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (CLAUDE.md)

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

Files:

  • apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/shared-layout.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)/(dashboard)/(chain)/[chain_id]/[contractAddress]/shared-layout.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/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/shared-layout.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/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/shared-layout.tsx
🧬 Code graph analysis (1)
apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/shared-layout.tsx (1)
apps/dashboard/src/@/utils/usedapp-external.ts (1)
  • shortenIfAddress (8-19)
⏰ 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: Size
  • GitHub Check: E2E Tests (pnpm, webpack)
  • GitHub Check: E2E Tests (pnpm, esbuild)
  • GitHub Check: Unit Tests
  • GitHub Check: E2E Tests (pnpm, vite)
  • GitHub Check: Lint Packages
  • GitHub Check: Analyze (javascript)
🔇 Additional comments (3)
apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/shared-layout.tsx (3)

193-193: LGTM!

Changing title from const to let appropriately enables reassignment in the ERC20 branch below, supporting conditional metadata based on contract type.


202-202: Verify the intentional use of contractMetadata.name instead of contractDisplayName.

For ERC721/ERC1155 contracts (line 197), the description uses contractDisplayName which includes the symbol if present. However, for generic contracts, this line now uses contractMetadata.name which excludes the symbol. This creates an inconsistency where generic contracts won't display the symbol in metadata even if one exists.

If this is intentional (e.g., symbols are only relevant for token contracts), then the change is fine. Otherwise, consider using contractDisplayName for consistency:

-      description = `View tokens, transactions, balances, source code, and analytics for the ${contractMetadata.name} smart contract on ${cleanedChainName}`;
+      description = `View tokens, transactions, balances, source code, and analytics for the ${contractDisplayName} smart contract on ${cleanedChainName}`;

208-211: LGTM!

The addition of the openGraph object properly mirrors the title and description fields, improving SEO and social sharing previews as intended by the PR objectives.

description = `Buy, swap & bridge ${contractMetadata.name} (${contractMetadata.symbol}) on ${cleanedChainName} with thirdweb Bridge. View contract address, holders, analytics, transactions and live price.`;
} else {
description = `View tokens, transactions, balances, source code, and analytics for the ${contractDisplayName} smart contract on ${cleanedChainName}`;
description = `View tokens, transactions, balances, source code, and analytics for the ${contractMetadata.name} smart contract on ${cleanedChainName}`;
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Fix the double space typo.

The description contains a double space before "on": "smart contract on". This affects the text quality of user-facing metadata.

Apply this diff to fix the typo:

-      description = `View tokens, transactions, balances, source code, and analytics for the ${contractMetadata.name} smart contract  on ${cleanedChainName}`;
+      description = `View tokens, transactions, balances, source code, and analytics for the ${contractMetadata.name} smart contract on ${cleanedChainName}`;
📝 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
description = `View tokens, transactions, balances, source code, and analytics for the ${contractMetadata.name} smart contract on ${cleanedChainName}`;
description = `View tokens, transactions, balances, source code, and analytics for the ${contractMetadata.name} smart contract on ${cleanedChainName}`;
🤖 Prompt for AI Agents
In
apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/shared-layout.tsx
around line 202, the description string contains a double space before "on"
("smart contract  on"). Remove the extra space so there is only a single space
between "contract" and "on", ensuring the interpolated description reads
"...smart contract on ${cleanedChainName}".

@graphite-app graphite-app bot merged commit f3bacc1 into main Oct 6, 2025
24 checks passed
@graphite-app graphite-app bot deleted the mny-203 branch October 6, 2025 19:50
@vercel vercel bot temporarily deployed to Production – wallet-ui October 6, 2025 19:50 Inactive
@vercel vercel bot temporarily deployed to Production – docs-v2 October 6, 2025 19:50 Inactive
@vercel vercel bot temporarily deployed to Production – nebula October 6, 2025 19:50 Inactive
@vercel vercel bot temporarily deployed to Production – thirdweb_playground October 6, 2025 19:50 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.

3 participants