Skip to content

Conversation

@MananTank
Copy link
Member

@MananTank MananTank commented Aug 29, 2025


PR-Codex overview

This PR focuses on enhancing the sidebar links and layout for a contract page, particularly introducing conditional rendering based on the isModularCore property, which affects the visibility of certain features.

Detailed summary

  • Added hide property to the sidebar link for "Cross Chain (Beta)" based on data.metadata.isModularCore.
  • Updated the layout in contract-page-layout.tsx to include a flex class for better styling.
  • Introduced a redirect in shared-cross-chain-page.tsx if isModularCore is false.

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

Summary by CodeRabbit

  • New Features
    • Automatically redirect users to the contract landing page if Cross Chain (Beta) isn’t supported for the contract.
  • Bug Fixes
    • Hide the Cross Chain (Beta) sidebar link when Modular Core isn’t enabled, aligning visibility with other module-dependent links and preventing dead-end navigation.

@changeset-bot
Copy link

changeset-bot bot commented Aug 29, 2025

⚠️ No Changeset found

Latest commit: dac2c48

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 29, 2025

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Walkthrough

Adds conditional hiding of the “Cross Chain (Beta)” sidebar link based on Modular Core status and introduces an early redirect guard in the cross-chain page to route non-Modular Core contracts back to the contract landing page.

Changes

Cohort / File(s) Summary of Changes
Sidebar visibility control
apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/_utils/getContractPageSidebarLinks.ts
Adds hide: !data.metadata.isModularCore to the “Cross Chain (Beta)” link; sidebar filters out hidden links via filter((l) => !l.hide).
Cross-chain page access guard
apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/cross-chain/shared-cross-chain-page.tsx
Inserts early check on isModularCore; if false, calls redirectToContractLandingPage(chainIdOrSlug, contractAddress, projectMeta) before existing initialization. No signature changes.

Sequence Diagram(s)

sequenceDiagram
    autonumber
    actor User
    participant Page as CrossChainPage
    participant Checker as ModularCoreCheck
    participant Router as Redirector
    participant Landing as ContractLandingPage

    User->>Page: Navigate to Cross Chain (Beta)
    Page->>Checker: Determine isModularCore
    alt isModularCore == false
        Page->>Router: redirectToContractLandingPage(chainIdOrSlug, contractAddress, projectMeta)
        Router-->>User: HTTP Redirect
        User->>Landing: Load landing page
    else isModularCore == true
        Note right of Page: Proceed with existing init<br/>(clone factory, code fetch,<br/>cross-chain metadata)
    end
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch 08-30-dashboard_hide_cross-chain_tab_on_non-modular_contract_pages

🪧 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 or @coderabbit 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.

@MananTank MananTank marked this pull request as ready for review August 29, 2025 19:02
@MananTank MananTank requested review from a team as code owners August 29, 2025 19:02
@github-actions github-actions bot added the Dashboard Involves changes to the Dashboard. label Aug 29, 2025
@vercel
Copy link

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

@vercel vercel bot temporarily deployed to Preview – docs-v2 August 29, 2025 19:02 Inactive
@vercel vercel bot temporarily deployed to Preview – nebula August 29, 2025 19:02 Inactive
Copy link
Member Author

MananTank commented Aug 29, 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.

@vercel vercel bot temporarily deployed to Preview – wallet-ui August 29, 2025 19:02 Inactive
@vercel vercel bot temporarily deployed to Preview – thirdweb_playground August 29, 2025 19:02 Inactive
@codecov
Copy link

codecov bot commented Aug 29, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 56.53%. Comparing base (c331d18) to head (dac2c48).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #7950   +/-   ##
=======================================
  Coverage   56.53%   56.53%           
=======================================
  Files         904      904           
  Lines       58623    58623           
  Branches     4146     4146           
=======================================
  Hits        33144    33144           
  Misses      25373    25373           
  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.

@MananTank MananTank force-pushed the 08-30-dashboard_hide_cross-chain_tab_on_non-modular_contract_pages branch from d795415 to dac2c48 Compare August 29, 2025 19:05
@vercel vercel bot temporarily deployed to Preview – docs-v2 August 29, 2025 19:05 Inactive
@vercel vercel bot temporarily deployed to Preview – thirdweb_playground August 29, 2025 19:05 Inactive
@vercel vercel bot temporarily deployed to Preview – nebula August 29, 2025 19:05 Inactive
@vercel vercel bot temporarily deployed to Preview – wallet-ui August 29, 2025 19:05 Inactive
@MananTank MananTank marked this pull request as draft August 29, 2025 19:05
@github-actions
Copy link
Contributor

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
thirdweb (esm) 64.01 KB (0%) 1.3 s (0%) 240 ms (+67.92% 🔺) 1.6 s
thirdweb (cjs) 357.32 KB (0%) 7.2 s (0%) 929 ms (+1.42% 🔺) 8.1 s
thirdweb (minimal + tree-shaking) 5.73 KB (0%) 115 ms (0%) 76 ms (+914.66% 🔺) 191 ms
thirdweb/chains (tree-shaking) 526 B (0%) 11 ms (0%) 29 ms (+823.16% 🔺) 39 ms
thirdweb/react (minimal + tree-shaking) 19.15 KB (0%) 383 ms (0%) 78 ms (+343.84% 🔺) 460 ms

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