Skip to content

[Dashboard] Add self-service dedicated engine deployment option #7325

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

jnsdls
Copy link
Member

@jnsdls jnsdls commented Jun 12, 2025

Dedicated Engine UI Improvements

This PR enhances the Dedicated Engine UI with several improvements:

  • Added a "Deploy Dedicated Engine" button with a detailed dialog/drawer explaining the benefits
  • Updated the empty state UI to provide clearer options for users
  • Simplified component props by passing the entire team object instead of individual properties
  • Fixed button text from "View dedicated engines" to "View Dedicated Engine" for consistency
  • Improved mobile responsiveness with a drawer component for small screens
  • Added feature highlights for Dedicated Engine including:
    • Isolated environment
    • EOA or Smart Wallets
    • No usage limits or charges
  • Integrated checkout button for direct subscription ($299/month)

These changes make it easier for users to understand and deploy dedicated engines.


PR-Codex overview

This PR focuses on refactoring the team_slug and project_slug props to teamSlug and projectSlug across several components, enhancing consistency in naming conventions. Additionally, it introduces a new component, DedicatedEngineSubscriptionButton, for managing dedicated engine subscriptions.

Detailed summary

  • Renamed props from team_slug to teamSlug and project_slug to projectSlug in multiple components.
  • Updated the Button text from "View dedicated engines" to "View Dedicated Engine".
  • Introduced DedicatedEngineSubscriptionButton for dedicated engine subscriptions.
  • Removed unused story exports in EngineFooterCard.stories.tsx.
  • Adjusted the layout in EngineInstancesTableUI for better structure and added subscription button.

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

Summary by CodeRabbit

  • New Features

    • Added a button to deploy a dedicated engine instance, accessible from the engine instances table with responsive UI for both desktop and mobile devices.
    • Simplified the empty state experience in the engine instances table by always displaying options for both managed and self-hosted engines, removing plan-based restrictions.
  • Refactor

    • Unified team-related properties into a single object across engine-related components for improved consistency and maintainability.
    • Updated button label text for improved clarity.

Copy link

changeset-bot bot commented Jun 12, 2025

⚠️ No Changeset found

Latest commit: 313122e

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

vercel bot commented Jun 12, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
thirdweb-www ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 12, 2025 1:39am
4 Skipped Deployments
Name Status Preview Comments Updated (UTC)
docs-v2 ⬜️ Skipped (Inspect) Jun 12, 2025 1:39am
login ⬜️ Skipped (Inspect) Jun 12, 2025 1:39am
thirdweb_playground ⬜️ Skipped (Inspect) Jun 12, 2025 1:39am
wallet-ui ⬜️ Skipped (Inspect) Jun 12, 2025 1:39am

Copy link
Contributor

coderabbitai bot commented Jun 12, 2025

Walkthrough

The changes refactor several dashboard components to standardize how team and project data are passed as props. Instead of separate string props for team and project slugs or plan, a team object and projectSlug string are now used. Additionally, a new DedicatedEngineSubscriptionButton component is introduced for deploying dedicated engines, and some UI text and empty state logic are updated.

Changes

File(s) Change Summary
.../engine/cloud/layout.tsx Changed button label text from "View dedicated engines" to "View Dedicated Engine".
.../engine/dedicated/(general)/_components.tsx Updated EngineFooterCard props: removed teamPlan and renamed team_slug and project_slug props to camelCase teamSlug and projectSlug. Updated internal prop passing accordingly. Removed unused Team type import.
.../engine/dedicated/(general)/overview/engine-instances-table.tsx Refactored to accept a team object and projectSlug instead of separate slug/plan props. Added DedicatedEngineSubscriptionButton with responsive modal/drawer UI for deploying dedicated engines. Simplified empty state UI: always shows "Managed" and "Self-hosted" tabs, replaced contact link with subscription button. Updated imports and adjusted layout and function signatures.
.../engine/dedicated/(general)/overview/engine-list.tsx Refactored EngineInstancesList to receive a team object and projectSlug string instead of separate slug strings and removed teamPlan prop. Updated engineLinkPrefix construction and child component props accordingly.
.../engine/dedicated/(general)/page.tsx Updated props passed to EngineInstancesList: replaced team_slug with team object, renamed project_slug to projectSlug, and removed teamPlan prop. No other logic changes.
.../engine/dedicated/(general)/EngineFooterCard.stories.tsx Updated storybook stories for EngineFooterCard: renamed argument keys from snake_case to camelCase and removed teamPlan args, simplifying all stories to empty objects.
.../engine/dedicated/(general)/overview/engine-instances-table.stories.tsx Updated storybook stories for EngineInstancesTableUI: replaced teamPlan string argument with a team object created by teamStub for multiple plan variants.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant DashboardPage
    participant EngineInstancesList
    participant EngineInstancesTable
    participant DedicatedEngineSubscriptionButton
    participant ModalOrDrawer

    User->>DashboardPage: Visits project engine overview
    DashboardPage->>EngineInstancesList: Passes team object, projectSlug, instances
    EngineInstancesList->>EngineInstancesTable: Passes team object, projectSlug, instances
    EngineInstancesTable->>User: Renders table and DedicatedEngineSubscriptionButton

    User->>DedicatedEngineSubscriptionButton: Clicks "Deploy Dedicated Engine"
    DedicatedEngineSubscriptionButton->>ModalOrDrawer: Opens responsive UI for deployment
    ModalOrDrawer->>User: Shows subscription/deployment flow
Loading
✨ Finishing Touches
  • 📝 Generate Docstrings

🪧 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.
    • Explain this complex logic.
    • 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. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • 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 src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

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

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

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

Documentation and Community

  • 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 Jun 12, 2025
Copy link
Member Author

jnsdls commented Jun 12, 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 June 12, 2025 00:53
@jnsdls jnsdls requested review from a team as code owners June 12, 2025 00:53
cursor-com[bot]

This comment was marked as outdated.

Copy link

codecov bot commented Jun 12, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 55.57%. Comparing base (38f1821) to head (313122e).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #7325   +/-   ##
=======================================
  Coverage   55.57%   55.57%           
=======================================
  Files         909      909           
  Lines       58675    58675           
  Branches     4157     4157           
=======================================
  Hits        32608    32608           
  Misses      25960    25960           
  Partials      107      107           
Flag Coverage Δ
packages 55.57% <ø> (ø)
🚀 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.

Base automatically changed from _Dashboard_Add_plan_selection_step_to_team_onboarding_flow to main June 12, 2025 00:56
@jnsdls jnsdls force-pushed the _Dashboard_Add_self-service_dedicated_engine_deployment_option branch from dcec9b9 to 5cb55f6 Compare June 12, 2025 00:56
@vercel vercel bot temporarily deployed to Preview – wallet-ui June 12, 2025 00:56 Inactive
@vercel vercel bot temporarily deployed to Preview – login June 12, 2025 00:56 Inactive
@vercel vercel bot temporarily deployed to Preview – docs-v2 June 12, 2025 00:56 Inactive
@vercel vercel bot temporarily deployed to Preview – thirdweb_playground June 12, 2025 00:56 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: 0

🧹 Nitpick comments (3)
apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(general)/overview/engine-instances-table.tsx (3)

43-44: Remove empty import

import {} from "@/components/ui/popover"; brings no side-effects and will trigger unused-import lint rules.

-import {} from "@/components/ui/popover";
+// remove – not used

130-218: Avoid duplication between Drawer and Dialog flows

DedicatedEngineSubscriptionButton repeats the same markup twice. Extract the shared header/body into a small component and render it inside either Dialog or Drawer to keep maintenance low.


150-167: Hard-coded SKU warrants a constant

Using the literal "product:engine_standard" in multiple places is fragile. Define a constant (e.g. ENGINE_STANDARD_SKU) in a shared billing constants file and reuse it.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 38f1821 and 5cb55f6.

📒 Files selected for processing (5)
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/cloud/layout.tsx (1 hunks)
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(general)/_components.tsx (1 hunks)
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(general)/overview/engine-instances-table.tsx (10 hunks)
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(general)/overview/engine-list.tsx (1 hunks)
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(general)/page.tsx (1 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (2)
apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(general)/_components.tsx (1)
apps/dashboard/src/@/api/team.ts (1)
  • Team (9-9)
apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(general)/overview/engine-list.tsx (3)
apps/dashboard/src/@/api/team.ts (1)
  • Team (9-9)
apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(general)/overview/engine-instances-table.tsx (1)
  • EngineInstancesTable (100-128)
apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(general)/_components.tsx (1)
  • EngineFooterCard (77-89)
⏰ Context from checks skipped due to timeout of 90000ms (8)
  • GitHub Check: E2E Tests (pnpm, esbuild)
  • GitHub Check: E2E Tests (pnpm, webpack)
  • GitHub Check: E2E Tests (pnpm, vite)
  • GitHub Check: Size
  • GitHub Check: Unit Tests
  • GitHub Check: Build Packages
  • GitHub Check: Lint Packages
  • GitHub Check: Analyze (javascript)
🔇 Additional comments (5)
apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/cloud/layout.tsx (1)

63-63: Label update looks good

The wording change is clear and consistent with the other views. No further action needed.

apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(general)/page.tsx (1)

50-52: Ensure downstream typings are updated

EngineInstancesList now expects team: Team and projectSlug: string. Verify all call-sites compile after this change (CI should catch).

apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(general)/_components.tsx (1)

78-86: Prop refactor looks correct

Passing the full team object simplifies the interface and future-proofs the footer. Mapping to EngineInfoSection is clear.

apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(general)/overview/engine-list.tsx (1)

7-24: Path construction updated correctly

Using props.team.slug guarantees consistency with other links; no logic change.

apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(general)/overview/engine-instances-table.tsx (1)

230-236: Nice UX touch

Adding the deploy button next to the title improves discoverability.

cursor-com[bot]

This comment was marked as outdated.

Copy link
Contributor

github-actions bot commented Jun 12, 2025

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
thirdweb (esm) 62.57 KB (0%) 1.3 s (0%) 196 ms (+66.05% 🔺) 1.5 s
thirdweb (cjs) 345.55 KB (0%) 7 s (0%) 908 ms (-0.64% 🔽) 7.9 s
thirdweb (minimal + tree-shaking) 5.7 KB (0%) 114 ms (0%) 27 ms (+219.84% 🔺) 141 ms
thirdweb/chains (tree-shaking) 531 B (0%) 11 ms (0%) 14 ms (+550% 🔺) 24 ms
thirdweb/react (minimal + tree-shaking) 19.56 KB (0%) 392 ms (0%) 31 ms (+37.74% 🔺) 422 ms

@jnsdls jnsdls force-pushed the _Dashboard_Add_self-service_dedicated_engine_deployment_option branch from 5cb55f6 to 313122e Compare June 12, 2025 01:31
@vercel vercel bot temporarily deployed to Preview – thirdweb_playground June 12, 2025 01:32 Inactive
@vercel vercel bot temporarily deployed to Preview – wallet-ui June 12, 2025 01:32 Inactive
@vercel vercel bot temporarily deployed to Preview – docs-v2 June 12, 2025 01:32 Inactive
@vercel vercel bot temporarily deployed to Preview – login June 12, 2025 01:32 Inactive
Copy link

@cursor-com cursor-com bot left a comment

Choose a reason for hiding this comment

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

✅ BugBot reviewed your changes and found no bugs!


Was this report helpful? Give feedback by reacting with 👍 or 👎

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: 0

🔭 Outside diff range comments (2)
apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(general)/overview/engine-instances-table.stories.tsx (2)

92-107: ⚠️ Potential issue

team prop is now required – stories will crash

EngineInstancesTableUI expects a non-optional team object, but MultipleInstances (and the wrapper Story args that feed it) omit this prop.
Running Storybook will throw a type error & render failure.

export const MultipleInstances: Story = {
  args: {
    instances: [
      // active
      cloudHostedEngineInstance,
      cloudHostedPlanActiveEngineInstance,
      selfHostedActiveEngineInstance,
      // others
      pendingEngineInstance,
      deployingEngineInstance,
      paymentFailedEngineInstance,
      deploymentFailedEngineInstance,
    ],
    engineLinkPrefix: "/team/test/engine",
+    team: teamStub("0", "pro"),
  },
};

135-140: ⚠️ Potential issue

Same missing team prop in OneInstance story

Add a stubbed team object here as well to satisfy the updated component signature.

export const OneInstance: Story = {
  args: {
    instances: [cloudHostedEngineInstance],
    engineLinkPrefix: "/team/test/engine",
+    team: teamStub("4", "pro"),
  },
};
🧹 Nitpick comments (1)
apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(general)/overview/engine-instances-table.tsx (1)

43-43: Remove the empty popover import

import {} from "@/components/ui/popover"; pulls nothing into the module and will trip most ESLint rules (no-empty-import, unused-modules).
Delete it to keep the import list clean.

-import {} from "@/components/ui/popover";
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 5cb55f6 and 313122e.

📒 Files selected for processing (7)
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/cloud/layout.tsx (1 hunks)
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(general)/EngineFooterCard.stories.tsx (2 hunks)
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(general)/_components.tsx (1 hunks)
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(general)/overview/engine-instances-table.stories.tsx (3 hunks)
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(general)/overview/engine-instances-table.tsx (10 hunks)
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(general)/overview/engine-list.tsx (1 hunks)
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(general)/page.tsx (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (4)
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/cloud/layout.tsx
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(general)/page.tsx
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(general)/_components.tsx
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(general)/overview/engine-list.tsx
🧰 Additional context used
🧬 Code Graph Analysis (1)
apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(general)/overview/engine-instances-table.stories.tsx (1)
apps/dashboard/src/stories/stubs.ts (1)
  • teamStub (32-116)
⏰ Context from checks skipped due to timeout of 90000ms (8)
  • GitHub Check: E2E Tests (pnpm, esbuild)
  • GitHub Check: E2E Tests (pnpm, webpack)
  • GitHub Check: E2E Tests (pnpm, vite)
  • GitHub Check: Size
  • GitHub Check: Unit Tests
  • GitHub Check: Lint Packages
  • GitHub Check: Build Packages
  • GitHub Check: Analyze (javascript)
🔇 Additional comments (1)
apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(general)/EngineFooterCard.stories.tsx (1)

23-28: Good update to camelCase props

Props were renamed to teamSlug / projectSlug; the story args reflect this change accurately.
No action needed.

This was referenced Jun 12, 2025
@jnsdls jnsdls merged commit a1c875c into main Jun 12, 2025
25 checks passed
@jnsdls jnsdls deleted the _Dashboard_Add_self-service_dedicated_engine_deployment_option branch June 12, 2025 02:32
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.

1 participant