Skip to content

Conversation

@jnsdls
Copy link
Member

@jnsdls jnsdls commented Oct 17, 2025

Remove Chain Infrastructure from Team Sidebar

This PR removes the Chain Infrastructure section from the team sidebar layout. The changes include:

  • Changed the export status of getChainSubscriptions function to make it private
  • Removed the chainSubscriptions prop from the TeamSidebarLayout component
  • Removed the infrastructure links section from the sidebar
  • Simplified the data fetching in the team layout by removing chain subscription related code

These changes streamline the sidebar navigation by focusing on core team functionality.

Summary by CodeRabbit

  • Refactor
    • Removed the infrastructure submenu from the team sidebar navigation.
    • Simplified team layout data loading by removing chain-related data operations.

@vercel
Copy link

vercel bot commented Oct 17, 2025

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

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

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

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

changeset-bot bot commented Oct 17, 2025

⚠️ No Changeset found

Latest commit: 265e20d

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

@github-actions github-actions bot added the Dashboard Involves changes to the Dashboard. label Oct 17, 2025
Copy link
Member Author

jnsdls commented Oct 17, 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.

@jnsdls jnsdls marked this pull request as ready for review October 17, 2025 16:21
@jnsdls jnsdls requested review from a team as code owners October 17, 2025 16:21
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 17, 2025

Walkthrough

Remove chain infrastructure subscription data from team sidebar layout. The getChainSubscriptions function is made internal, and chain subscription handling is removed from the layout composition and sidebar component.

Changes

Cohort / File(s) Summary
API function visibility
apps/dashboard/src/@/api/team/team-subscription.ts
Removed export keyword from getChainSubscriptions function, making it internal instead of publicly exported. Function logic remains unchanged.
Sidebar layout refactor
apps/dashboard/src/app/(app)/team/[team_slug]/(team)/TeamSidebarLayout.tsx
Removed chainSubscriptions prop from component signature. Removed infrastructure submenu section and related chain links. Removed unused WalletCardsIcon import from lucide-react.
Team layout simplification
apps/dashboard/src/app/(app)/team/[team_slug]/(team)/layout.tsx
Removed getChainSubscriptions import and chain data fetching logic. Simplified Promise.all to eliminate separate chain subscription retrieval. Removed chain data computation and passing to TeamSidebarLayout. Streamlined teamsAndProjects data loading structure.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Pre-merge checks and finishing touches

❌ Failed checks (2 warnings)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
Description Check ⚠️ Warning The pull request contains no descriptive content from the author. While the branch name "Remove_Chain_Infrastructure_section_from_team_sidebar" provides some context about the changes, the description template requires several essential sections to be completed: a properly formatted title, a Linear issue tag, notes for the reviewer, and testing instructions. The author has not populated any of these required sections, leaving the pull request description entirely empty and failing to meet the repository's documentation standards. The author must add a pull request description following the template format, including: a title following the "[SDK/Dashboard/Portal] Feature/Fix: Concise title" pattern, the Linear issue tag (TEAM-0000 format) if available, a "Notes for the reviewer" section highlighting any important considerations for this refactoring, and a "How to test" section describing the testing approach and validation steps for the chain infrastructure removal.
✅ Passed checks (1 passed)
Check name Status Explanation
Title Check ✅ Passed The pull request title "Remove Chain Infrastructure section from team sidebar" accurately captures the primary objective of the changeset. The title is concise, clear, and directly describes the main modification across all three affected files: making the getChainSubscriptions function private, removing the chainSubscriptions prop from TeamSidebarLayout, removing infrastructure links from the sidebar, and simplifying related data fetching logic. The title is specific enough that a teammate scanning commit history would immediately understand the purpose of these changes.
✨ 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 Remove_Chain_Infrastructure_section_from_team_sidebar

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

@codecov
Copy link

codecov bot commented Oct 17, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 54.89%. Comparing base (5ff6063) to head (265e20d).
⚠️ Report is 2 commits behind head on main.

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

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

Caution

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

⚠️ Outside diff range comments (1)
apps/dashboard/src/app/(app)/team/[team_slug]/(team)/layout.tsx (1)

1-1: Add "server-only" import for server component.

This is a Next.js server component (async layout function), but it's missing the required import "server-only"; statement at the top of the file.

Add this import at the beginning of the file:

+import "server-only";
 import { redirect } from "next/navigation";

As per coding guidelines

📜 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 5ff6063 and 265e20d.

📒 Files selected for processing (3)
  • apps/dashboard/src/@/api/team/team-subscription.ts (1 hunks)
  • apps/dashboard/src/app/(app)/team/[team_slug]/(team)/TeamSidebarLayout.tsx (0 hunks)
  • apps/dashboard/src/app/(app)/team/[team_slug]/(team)/layout.tsx (1 hunks)
💤 Files with no reviewable changes (1)
  • apps/dashboard/src/app/(app)/team/[team_slug]/(team)/TeamSidebarLayout.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)/team/[team_slug]/(team)/layout.tsx
  • apps/dashboard/src/@/api/team/team-subscription.ts
**/*.{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)/layout.tsx
  • apps/dashboard/src/@/api/team/team-subscription.ts
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)/layout.tsx
  • apps/dashboard/src/@/api/team/team-subscription.ts
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)/team/[team_slug]/(team)/layout.tsx
  • apps/dashboard/src/@/api/team/team-subscription.ts
apps/{dashboard,playground}/**/*.tsx

📄 CodeRabbit inference engine (AGENTS.md)

Expose a className prop on the root element of every component

Files:

  • apps/dashboard/src/app/(app)/team/[team_slug]/(team)/layout.tsx
🧠 Learnings (1)
📚 Learning: 2025-05-21T05:17:31.283Z
Learnt from: jnsdls
PR: thirdweb-dev/js#6929
File: apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/insight/webhooks/page.tsx:14-19
Timestamp: 2025-05-21T05:17:31.283Z
Learning: In Next.js server components, the `params` object can sometimes be a Promise that needs to be awaited, despite type annotations suggesting otherwise. In apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/insight/webhooks/page.tsx, it's necessary to await the params object before accessing its properties.

Applied to files:

  • apps/dashboard/src/app/(app)/team/[team_slug]/(team)/layout.tsx
🧬 Code graph analysis (1)
apps/dashboard/src/app/(app)/team/[team_slug]/(team)/layout.tsx (1)
apps/dashboard/src/@/api/team/ecosystems.ts (1)
  • fetchEcosystemList (55-76)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: Unit Tests
  • GitHub Check: Size
  • GitHub Check: Analyze (javascript)
🔇 Additional comments (3)
apps/dashboard/src/@/api/team/team-subscription.ts (1)

85-112: Logic change looks good.

The visibility change from exported to internal aligns with the PR objective of removing chain infrastructure data from the team sidebar UI. The function is still accessible internally via getChainSubscriptionForChain at line 118.

apps/dashboard/src/app/(app)/team/[team_slug]/(team)/layout.tsx (2)

22-41: Data fetching simplification looks correct.

The removal of chain subscription data fetching and the simplification of the Promise.all structure correctly implements the PR objective. The remaining data fetching logic properly:

  • Retrieves auth tokens and validates the account
  • Fetches team data and ecosystems
  • Loads projects for each team

The simplified flow maintains the same authentication and authorization checks while removing the chain infrastructure data.


66-72: TeamSidebarLayout integration updated correctly.

The component usage properly reflects the removal of the chainSubscriptions prop, passing only the ecosystems data and layout path. This aligns with the changes in the TeamSidebarLayout component mentioned in the AI summary.

@github-actions
Copy link
Contributor

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
thirdweb (esm) 64.51 KB (0%) 1.3 s (0%) 439 ms (+167.86% 🔺) 1.8 s
thirdweb (cjs) 365.68 KB (0%) 7.4 s (0%) 1.8 s (+15.21% 🔺) 9.1 s
thirdweb (minimal + tree-shaking) 5.73 KB (0%) 115 ms (0%) 222 ms (+2278.71% 🔺) 336 ms
thirdweb/chains (tree-shaking) 526 B (0%) 11 ms (0%) 136 ms (+2350.19% 🔺) 147 ms
thirdweb/react (minimal + tree-shaking) 19.13 KB (0%) 383 ms (0%) 184 ms (+2146.33% 🔺) 566 ms

@jnsdls jnsdls merged commit 9dd0b17 into main Oct 17, 2025
26 checks passed
@jnsdls jnsdls deleted the Remove_Chain_Infrastructure_section_from_team_sidebar branch October 17, 2025 20:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Dashboard Involves changes to the Dashboard.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants