Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

MananTank
Copy link
Member

@MananTank MananTank commented Sep 19, 2025


PR-Codex overview

This PR primarily focuses on the removal of several files within the dashboard section of the application and the addition of a new tokens page with metadata.

Detailed summary

  • Deleted the following files:
    • utils.ts
    • layout.tsx
    • route.ts
    • page.tsx (in routes)
    • opengraph-image.png
    • Various components in routes/components/client and routes/components/server
  • Added a new tokens/page.tsx file with:
    • Metadata for the page including title and description
    • Imports for Link, PageHeader, and TokenPage components

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

Summary by CodeRabbit

  • New Features

    • Redirects: Visiting /routes now automatically navigates to /tokens (temporary redirect).
    • Tokens page now includes enriched metadata for improved previews and sharing.
  • Refactor

    • Removed the legacy Routes dashboard and associated UI controls, streamlining navigation to the Tokens experience.

Copy link

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

@vercel vercel bot temporarily deployed to Preview – nebula September 19, 2025 21:29 Inactive
@vercel vercel bot temporarily deployed to Preview – thirdweb_playground September 19, 2025 21:29 Inactive
@vercel vercel bot temporarily deployed to Preview – docs-v2 September 19, 2025 21:29 Inactive
@vercel vercel bot temporarily deployed to Preview – wallet-ui September 19, 2025 21:29 Inactive
Copy link

changeset-bot bot commented Sep 19, 2025

⚠️ No Changeset found

Latest commit: dd69316

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

Copy link
Contributor

coderabbitai bot commented Sep 19, 2025

Walkthrough

A non-permanent redirect from /routes to /tokens was added. The bridge routes feature under apps/dashboard/src/app/(app)/(dashboard)/(bridge)/… was removed, including page, layout, client/server components, utilities, and types. Tokens page gained an exported metadata object.

Changes

Cohort / File(s) Summary of changes
Redirects
apps/dashboard/redirects.js
Added redirect rule: /routes/tokens with permanent: false.
Bridge routes feature removal
apps/dashboard/src/app/(app)/(dashboard)/(bridge)/layout.tsx, .../(bridge)/routes/page.tsx, .../(bridge)/routes/components/client/* (pagination.tsx, search.tsx, type.tsx, view.tsx), .../(bridge)/routes/components/server/* (routelist-card.tsx, routelist-row.tsx, routes-table.tsx), .../(bridge)/types/route.ts, .../(bridge)/utils.ts
Deleted page, layout, client and server components, types, and utilities related to bridge routes. Removed multiple exported/public entities.
Tokens page metadata
apps/dashboard/src/app/(app)/(dashboard)/tokens/page.tsx
Added exported metadata (title, description, openGraph). No changes to rendering logic.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  participant U as User
  participant N as Next.js Router
  participant T as Tokens Page

  U->>N: Request GET /routes
  Note over N: Redirect rule matches<br/>(non-permanent)
  N-->>U: 307 Redirect to /tokens

  U->>N: Request GET /tokens
  N->>T: Render page with metadata
  T-->>U: Tokens HTML
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 Although the PR includes a useful PR-Codex overview that lists deleted bridge files and the added tokens page, the repository template fields were left as placeholders: "Notes for the reviewer" and "How to test" are empty and no issue/Linear tag is provided, so reviewers lack explicit testing steps, rationale, and migration/compatibility guidance for the removed exports. Because the template expects those sections to guide reviewers and testers, the description is incomplete against the repo's template. Please populate the template by adding an issue tag or title line, a "Notes for the reviewer" explaining why /routes is being removed and any consumer impact or required migrations, and a "How to test" section with concrete manual steps and relevant test/CI commands; also confirm that TypeScript compiles and CI passes and add a changelog or migration note if this is a breaking change.
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (1 passed)
Check name Status Explanation
Title Check ✅ Passed The PR title "Dashboard: Remove /routes" is concise and accurately captures the primary change in the diff — removal of the dashboard's /routes (bridge) files — without noisy details, making the main intent clear to reviewers scanning history. It focuses on the key change and is short and specific.
✨ Finishing touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch 09-20-dashboard_remove__routes

📜 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 93f913c and c502d26.

⛔ Files ignored due to path filters (1)
  • apps/dashboard/src/app/(app)/(dashboard)/(bridge)/opengraph-image.png is excluded by !**/*.png
📒 Files selected for processing (13)
  • apps/dashboard/redirects.js (1 hunks)
  • apps/dashboard/src/app/(app)/(dashboard)/(bridge)/layout.tsx (0 hunks)
  • apps/dashboard/src/app/(app)/(dashboard)/(bridge)/routes/components/client/pagination.tsx (0 hunks)
  • apps/dashboard/src/app/(app)/(dashboard)/(bridge)/routes/components/client/search.tsx (0 hunks)
  • apps/dashboard/src/app/(app)/(dashboard)/(bridge)/routes/components/client/type.tsx (0 hunks)
  • apps/dashboard/src/app/(app)/(dashboard)/(bridge)/routes/components/client/view.tsx (0 hunks)
  • apps/dashboard/src/app/(app)/(dashboard)/(bridge)/routes/components/server/routelist-card.tsx (0 hunks)
  • apps/dashboard/src/app/(app)/(dashboard)/(bridge)/routes/components/server/routelist-row.tsx (0 hunks)
  • apps/dashboard/src/app/(app)/(dashboard)/(bridge)/routes/components/server/routes-table.tsx (0 hunks)
  • apps/dashboard/src/app/(app)/(dashboard)/(bridge)/routes/page.tsx (0 hunks)
  • apps/dashboard/src/app/(app)/(dashboard)/(bridge)/types/route.ts (0 hunks)
  • apps/dashboard/src/app/(app)/(dashboard)/(bridge)/utils.ts (0 hunks)
  • apps/dashboard/src/app/(app)/(dashboard)/tokens/page.tsx (1 hunks)
💤 Files with no reviewable changes (11)
  • apps/dashboard/src/app/(app)/(dashboard)/(bridge)/routes/components/client/pagination.tsx
  • apps/dashboard/src/app/(app)/(dashboard)/(bridge)/types/route.ts
  • apps/dashboard/src/app/(app)/(dashboard)/(bridge)/routes/components/client/type.tsx
  • apps/dashboard/src/app/(app)/(dashboard)/(bridge)/routes/page.tsx
  • apps/dashboard/src/app/(app)/(dashboard)/(bridge)/routes/components/client/search.tsx
  • apps/dashboard/src/app/(app)/(dashboard)/(bridge)/routes/components/client/view.tsx
  • apps/dashboard/src/app/(app)/(dashboard)/(bridge)/routes/components/server/routelist-row.tsx
  • apps/dashboard/src/app/(app)/(dashboard)/(bridge)/routes/components/server/routes-table.tsx
  • apps/dashboard/src/app/(app)/(dashboard)/(bridge)/routes/components/server/routelist-card.tsx
  • apps/dashboard/src/app/(app)/(dashboard)/(bridge)/utils.ts
  • apps/dashboard/src/app/(app)/(dashboard)/(bridge)/layout.tsx
🧰 Additional context used
📓 Path-based instructions (5)
**/*.{ts,tsx}

📄 CodeRabbit inference engine (CLAUDE.md)

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

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

Files:

  • apps/dashboard/src/app/(app)/(dashboard)/tokens/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)/(dashboard)/tokens/page.tsx
  • apps/dashboard/redirects.js
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)/tokens/page.tsx
apps/{dashboard,playground}/**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

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

Files:

  • apps/dashboard/src/app/(app)/(dashboard)/tokens/page.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)/tokens/page.tsx
🧠 Learnings (5)
📓 Common learnings
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 : Prefer API routes or server actions to keep tokens secret; the browser only sees relative paths.
Learnt from: MananTank
PR: thirdweb-dev/js#7812
File: apps/dashboard/src/app/(app)/(dashboard)/published-contract/components/token-banner.tsx:48-60
Timestamp: 2025-08-07T20:43:21.864Z
Learning: In the TokenBanner component at apps/dashboard/src/app/(app)/(dashboard)/published-contract/components/token-banner.tsx, the Link components use target="_blank" with internal application routes (starting with "/") to open pages in new tabs within the same application. These internal links do not require rel="noopener noreferrer" security attributes, which are only needed for external URLs.
Learnt from: 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} : Keep tokens secret via internal API routes or server actions
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/**/*.{ts,tsx} : Redirect logic using `redirect()` from `next/navigation`.
📚 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} : Keep tokens secret via internal API routes or server actions

Applied to files:

  • apps/dashboard/src/app/(app)/(dashboard)/tokens/page.tsx
📚 Learning: 2025-05-26T16:28:50.772Z
Learnt from: MananTank
PR: thirdweb-dev/js#7152
File: apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/tokens/shared-page.tsx:41-48
Timestamp: 2025-05-26T16:28:50.772Z
Learning: The `projectMeta` prop is not required for the server-rendered `ContractTokensPage` component in the tokens shared page, unlike some other shared pages where it's needed for consistency.

Applied to files:

  • apps/dashboard/src/app/(app)/(dashboard)/tokens/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/**/*.{ts,tsx} : Redirect logic using `redirect()` from `next/navigation`.

Applied to files:

  • apps/dashboard/redirects.js
📚 Learning: 2025-05-30T18:14:57.074Z
Learnt from: MananTank
PR: thirdweb-dev/js#7228
File: apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/connect/in-app-wallets/settings/page.tsx:23-25
Timestamp: 2025-05-30T18:14:57.074Z
Learning: In the dashboard codebase, the `loginRedirect` function performs an actual page redirect that automatically stops execution, similar to Next.js `redirect()`. No return statement is needed after calling `loginRedirect` as it handles flow control internally.

Applied to files:

  • apps/dashboard/redirects.js
🔇 Additional comments (2)
apps/dashboard/src/app/(app)/(dashboard)/tokens/page.tsx (1)

7-17: LGTM: Metadata added correctly and typed.

Title/description and OpenGraph fields are set and consistent with the H1 copy.

apps/dashboard/redirects.js (1)

477-481: Keep redirect temporary — repo still references /routes

Search found active references in portal docs/UI and bridge API code/tests; convert to a permanent redirect only after updating these links and verifying external traffic.

Locations:

  • apps/dashboard/redirects.js:478 (current redirect)
  • apps/portal/src/app/bridge/routes/page.mdx
  • apps/portal/src/app/bridge/sell/page.mdx
  • apps/portal/src/app/bridge/sidebar.tsx
  • apps/portal/src/app/bridge/swap/page.mdx
  • apps/portal/src/app/bridge/tokens/page.mdx
  • apps/portal/src/app/payments/send/page.mdx
  • apps/portal/src/app/payments/sidebar.tsx
  • apps/portal/src/app/payments/webhooks/page.mdx
  • packages/thirdweb/src/bridge/Routes.ts
  • packages/thirdweb/src/bridge/Routes.test.ts

Warning

Review ran into problems

🔥 Problems

Errors were encountered while retrieving linked issues.

Errors (1)
  • TEAM-0000: Entity not found: Issue - Could not find referenced Issue.

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

@MananTank MananTank marked this pull request as ready for review September 19, 2025 21:29
@MananTank MananTank requested review from a team as code owners September 19, 2025 21:29
@github-actions github-actions bot added the Dashboard Involves changes to the Dashboard. label Sep 19, 2025
Copy link
Member Author

MananTank commented Sep 19, 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.

Copy link

codecov bot commented Sep 19, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 56.34%. Comparing base (93f913c) to head (dd69316).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #8084   +/-   ##
=======================================
  Coverage   56.34%   56.34%           
=======================================
  Files         906      906           
  Lines       59182    59182           
  Branches     4176     4176           
=======================================
  Hits        33349    33349           
  Misses      25727    25727           
  Partials      106      106           
Flag Coverage Δ
packages 56.34% <ø> (ø)
🚀 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

github-actions bot commented Sep 19, 2025

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
thirdweb (esm) 64.05 KB (0%) 1.3 s (0%) 236 ms (+145.41% 🔺) 1.6 s
thirdweb (cjs) 361.64 KB (0%) 7.3 s (0%) 812 ms (+13.74% 🔺) 8.1 s
thirdweb (minimal + tree-shaking) 5.73 KB (0%) 115 ms (0%) 78 ms (+1457.52% 🔺) 193 ms
thirdweb/chains (tree-shaking) 526 B (0%) 11 ms (0%) 41 ms (+1590.42% 🔺) 51 ms
thirdweb/react (minimal + tree-shaking) 19.14 KB (0%) 383 ms (0%) 52 ms (+1230.42% 🔺) 435 ms

Copy link
Contributor

graphite-app bot commented Sep 19, 2025

Merge activity

<!--

## title your PR with this format: "[SDK/Dashboard/Portal] Feature/Fix: Concise title for the changes"

If you did not copy the branch name from Linear, paste the issue tag here (format is TEAM-0000):

## Notes for the reviewer

Anything important to call out? Be sure to also clarify these in your comments.

## How to test

Unit tests, playground, etc.

-->

<!-- start pr-codex -->

---

## PR-Codex overview
This PR focuses on the removal of several files related to the `bridge` feature in the dashboard and the addition of a new `tokens` page with metadata for improved SEO.

### Detailed summary
- Deleted files related to the `bridge` feature:
  - `utils.ts`
  - `layout.tsx`
  - `route.ts`
  - `page.tsx`
  - `opengraph-image.png`
  - Various components under `routes/components/client` and `routes/components/server`
- Added a new `tokens` page in `page.tsx` with:
  - Metadata for SEO, including title and description
  - Import of `PageHeader` and `TokenPage` components

> ✨ 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
  - Redirects: Visiting /routes now automatically navigates to /tokens (temporary redirect).
  - Tokens page now includes enriched metadata for improved previews and sharing.

- Refactor
  - Removed the legacy Routes dashboard and associated UI controls, streamlining navigation to the Tokens experience.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
@graphite-app graphite-app bot force-pushed the 09-20-dashboard_remove__routes branch from c502d26 to dd69316 Compare September 19, 2025 23:35
@vercel vercel bot temporarily deployed to Preview – nebula September 19, 2025 23:35 Inactive
@vercel vercel bot temporarily deployed to Preview – thirdweb_playground September 19, 2025 23:35 Inactive
@vercel vercel bot temporarily deployed to Preview – docs-v2 September 19, 2025 23:35 Inactive
@vercel vercel bot temporarily deployed to Preview – wallet-ui September 19, 2025 23:35 Inactive
@graphite-app graphite-app bot merged commit dd69316 into main Sep 19, 2025
24 checks passed
@graphite-app graphite-app bot deleted the 09-20-dashboard_remove__routes branch September 19, 2025 23:44
@vercel vercel bot temporarily deployed to Production – wallet-ui September 19, 2025 23:44 Inactive
@vercel vercel bot temporarily deployed to Production – thirdweb_playground September 19, 2025 23:44 Inactive
@vercel vercel bot temporarily deployed to Production – docs-v2 September 19, 2025 23:44 Inactive
@vercel vercel bot temporarily deployed to Production – nebula September 19, 2025 23:44 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