Skip to content

[Dashboard] Add 7-day free trial for Growth plan #7322

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

Conversation

jnsdls
Copy link
Member

@jnsdls jnsdls commented Jun 11, 2025

Add 7-day free trial for Growth plan and include Starter plan in team onboarding

This PR adds a 7-day free trial indicator for teams that have just signed up but haven't subscribed yet when selecting the Growth plan. It also updates the team onboarding flow to properly handle the Starter plan.

Changes include:

  • Added logic to detect if a team qualifies for the 7-day trial (new signup with no payment on Growth plan)
  • Added a "7 day free trial" text display for qualifying teams
  • Updated the polling logic to consider both "free" and "starter" plans as non-paid plans
  • Modified the onboarding description text to remove reference to "free Starter plan"

Summary by CodeRabbit

  • New Features

    • Added a clear "7 day free trial" indicator for eligible Growth plan users.
  • Enhancements

    • Updated onboarding modal text to remove "free" from the Starter plan description.
    • Modified billing plan polling logic to exclude both "free" and "starter" plans before proceeding.

PR-Codex overview

This PR focuses on updating the logic for determining billing plans and enhancing the user experience regarding trial periods in the InviteTeamMembers and PricingCard components.

Detailed summary

  • In InviteTeamMembers.tsx, updated the condition for isNonFreePlan to exclude both "free" and "starter" plans.
  • Modified the text in InviteModalContent to clarify the Starter plan.
  • In pricing-card.tsx, added a condition for a 7-day trial for teams with a "growth" billing plan and "noPayment" status.
  • Changed the rendering logic for remaining trial days to include a message for the 7-day trial.

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


PR-Codex overview

This PR focuses on enhancing the pricing logic and user experience in the dashboard application. It includes changes to pricing data types, conditional checks for billing plans, and updates to the display of pricing and trial information.

Detailed summary

  • Changed price type from string | number to number.
  • Updated the condition for isNonFreePlan to exclude the "starter" plan.
  • Modified the onboarding description for clarity.
  • Introduced a has7DayTrial variable to manage trial display logic.
  • Updated pricing display to show "7 days free" when applicable.
  • Adjusted button labels to reflect the trial status.

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

Summary by CodeRabbit

  • New Features

    • Added a "7 Day Free Trial" badge and updated price display for eligible users on the Growth plan.
    • Call-to-action button now shows "Start 7 Day Free Trial" when applicable.
  • Bug Fixes

    • Improved onboarding flow by updating plan detection logic to better handle "Starter" and "Free" plans.
  • Style

    • Revised onboarding text to emphasize upgrading to the Growth plan and removed mention of the Starter plan.

@vercel vercel bot temporarily deployed to Preview – wallet-ui June 11, 2025 17:03 Inactive
Copy link

vercel bot commented Jun 11, 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 11, 2025 8:07pm
4 Skipped Deployments
Name Status Preview Comments Updated (UTC)
docs-v2 ⬜️ Skipped (Inspect) Jun 11, 2025 8:07pm
login ⬜️ Skipped (Inspect) Jun 11, 2025 8:07pm
thirdweb_playground ⬜️ Skipped (Inspect) Jun 11, 2025 8:07pm
wallet-ui ⬜️ Skipped (Inspect) Jun 11, 2025 8:07pm

@vercel vercel bot temporarily deployed to Preview – docs-v2 June 11, 2025 17:03 Inactive
@vercel vercel bot temporarily deployed to Preview – thirdweb_playground June 11, 2025 17:03 Inactive
@vercel vercel bot temporarily deployed to Preview – login June 11, 2025 17:03 Inactive
Copy link

changeset-bot bot commented Jun 11, 2025

⚠️ No Changeset found

Latest commit: 8489844

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 Jun 11, 2025

"""

Walkthrough

The changes introduce a new "7 day free trial" message in the pricing card for teams on the "growth" plan without payment and modify the onboarding invite modal to exclude both "free" and "starter" plans from polling for billing plan changes. The modal text was also updated to remove "free" before "Starter plan." Additionally, the price property type in the TEAM_PLANS record was changed to strictly number.

Changes

File(s) Change Summary
apps/dashboard/src/@/components/blocks/pricing-card.tsx Added has7DayTrial boolean to conditionally render a "7 day free trial" message for "growth" plan teams with no payment; removed isCustomPrice.
apps/dashboard/src/app/(app)/login/onboarding/team-onboarding/InviteTeamMembers.tsx Modified polling logic to exclude "free" and "starter" plans; updated modal descriptive text to remove "free" before "Starter plan."
apps/dashboard/src/utils/pricing.tsx Changed price property type in TEAM_PLANS from `string

Suggested reviewers

  • joaquim-verges
  • MananTank
    """

📜 Recent review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between ce02f0e and 8489844.

📒 Files selected for processing (3)
  • apps/dashboard/src/@/components/blocks/pricing-card.tsx (5 hunks)
  • apps/dashboard/src/app/(app)/login/onboarding/team-onboarding/InviteTeamMembers.tsx (2 hunks)
  • apps/dashboard/src/utils/pricing.tsx (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (3)
  • apps/dashboard/src/utils/pricing.tsx
  • apps/dashboard/src/app/(app)/login/onboarding/team-onboarding/InviteTeamMembers.tsx
  • apps/dashboard/src/@/components/blocks/pricing-card.tsx
⏰ 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)
✨ 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 11, 2025
Copy link
Member Author

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

This comment was marked as outdated.

Copy link

codecov bot commented Jun 11, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 55.57%. Comparing base (950bbae) to head (8489844).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #7322   +/-   ##
=======================================
  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.

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

🔭 Outside diff range comments (2)
apps/dashboard/src/@/components/blocks/pricing-card.tsx (1)

36-48: ⚠️ Potential issue

currentPlan is added as a required prop but is not consumed and breaks every existing caller

currentPlan was introduced on line 42 as a mandatory field, yet:

  1. It is never referenced inside this component.
  2. None of the existing <PricingCard …> invocations (see InviteTeamMembers.tsx and probably many others) provide this prop, which will cause a TypeScript compilation error.

Unless you intend to use this value imminently, the quickest fix is to make it optional or remove it:

-  currentPlan: Team["billingPlan"];
+  // Currently unused – make optional to avoid breaking callers
+  currentPlan?: Team["billingPlan"];

Follow-up: either wire currentPlan into the JSX (e.g., to highlight the active plan) or drop the prop entirely.

apps/dashboard/src/app/(app)/login/onboarding/team-onboarding/InviteTeamMembers.tsx (1)

279-299: 🛠️ Refactor suggestion

Starter plan tab is never rendered in mobile view

You added a “Starter” tab button, but the conditional render block below does not include it:

{planToShow === "growth" && growthPlan}
{planToShow === "scale" && scalePlan}
{planToShow === "pro" && proPlan}

Add the missing branch:

+{planToShow === "starter" && starterPlan}

Without this, tapping “Starter” on mobile shows a blank area.

Also applies to: 302-305

🧹 Nitpick comments (1)
apps/dashboard/src/@/components/blocks/pricing-card.tsx (1)

63-66: Trial-banner logic: risk of double messaging & hard-coding plan

The new has7DayTrial flag is tied to billingPlan === "growth".
• If product decides to extend the trial to the new starter tier (or any future tier) this code will silently ignore it.
• When activeTrialEndsAt is set for growth users, both the “7 day free trial” banner and the remaining-days banner may render simultaneously.

Consider deriving the trial state from backend data (e.g. activeTrialEndsAt) instead of hard-coding the plan, and guard against double rendering.

Also applies to: 125-129

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 950bbae and 3e3963e.

📒 Files selected for processing (2)
  • apps/dashboard/src/@/components/blocks/pricing-card.tsx (3 hunks)
  • apps/dashboard/src/app/(app)/login/onboarding/team-onboarding/InviteTeamMembers.tsx (5 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (1)
apps/dashboard/src/@/components/blocks/pricing-card.tsx (1)
apps/dashboard/src/@/api/team.ts (1)
  • Team (9-9)
⏰ Context from checks skipped due to timeout of 90000ms (8)
  • GitHub Check: Size
  • GitHub Check: Build Packages
  • GitHub Check: E2E Tests (pnpm, webpack)
  • GitHub Check: E2E Tests (pnpm, esbuild)
  • GitHub Check: E2E Tests (pnpm, vite)
  • GitHub Check: Unit Tests
  • GitHub Check: Lint Packages
  • GitHub Check: Analyze (javascript)

Copy link
Contributor

github-actions bot commented Jun 11, 2025

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
thirdweb (esm) 62.57 KB (0%) 1.3 s (0%) 309 ms (+33% 🔺) 1.6 s
thirdweb (cjs) 345.55 KB (0%) 7 s (0%) 1.8 s (-2.54% 🔽) 8.8 s
thirdweb (minimal + tree-shaking) 5.7 KB (0%) 114 ms (0%) 128 ms (+683.5% 🔺) 242 ms
thirdweb/chains (tree-shaking) 531 B (0%) 11 ms (0%) 25 ms (+315.47% 🔺) 35 ms
thirdweb/react (minimal + tree-shaking) 19.56 KB (0%) 392 ms (0%) 90 ms (+158.73% 🔺) 482 ms

@jnsdls jnsdls force-pushed the _Dashboard_Add_7-day_free_trial_for_Growth_plan_and_Starter_plan_option branch from 3e3963e to 82e0786 Compare June 11, 2025 17:33
@vercel vercel bot temporarily deployed to Preview – docs-v2 June 11, 2025 17:33 Inactive
@vercel vercel bot temporarily deployed to Preview – thirdweb_playground June 11, 2025 17:33 Inactive
@vercel vercel bot temporarily deployed to Preview – login June 11, 2025 17:33 Inactive
@vercel vercel bot temporarily deployed to Preview – wallet-ui June 11, 2025 17:33 Inactive
cursor[bot]

This comment was marked as outdated.

@jnsdls jnsdls force-pushed the _Dashboard_Add_7-day_free_trial_for_Growth_plan_and_Starter_plan_option branch from 82e0786 to e9eee8d Compare June 11, 2025 18:21
@vercel vercel bot temporarily deployed to Preview – docs-v2 June 11, 2025 18:21 Inactive
@vercel vercel bot temporarily deployed to Preview – thirdweb_playground June 11, 2025 18:21 Inactive
@vercel vercel bot temporarily deployed to Preview – wallet-ui June 11, 2025 18:21 Inactive
@vercel vercel bot temporarily deployed to Preview – login June 11, 2025 18:21 Inactive
@vercel vercel bot temporarily deployed to Preview – docs-v2 June 11, 2025 19:41 Inactive
@vercel vercel bot temporarily deployed to Preview – wallet-ui June 11, 2025 19:41 Inactive
@vercel vercel bot temporarily deployed to Preview – thirdweb_playground June 11, 2025 19:41 Inactive
cursor[bot]

This comment was marked as outdated.

@jnsdls jnsdls force-pushed the _Dashboard_Add_7-day_free_trial_for_Growth_plan_and_Starter_plan_option branch from 27b9c1a to ce02f0e Compare June 11, 2025 19:50
@vercel vercel bot temporarily deployed to Preview – thirdweb_playground June 11, 2025 19:50 Inactive
@vercel vercel bot temporarily deployed to Preview – docs-v2 June 11, 2025 19:50 Inactive
@vercel vercel bot temporarily deployed to Preview – login June 11, 2025 19:50 Inactive
@vercel vercel bot temporarily deployed to Preview – wallet-ui June 11, 2025 19:50 Inactive
Copy link

@cursor cursor 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

graphite-app bot commented Jun 11, 2025

Merge activity

# Add 7-day free trial for Growth plan and include Starter plan in team onboarding

This PR adds a 7-day free trial indicator for teams that have just signed up but haven't subscribed yet when selecting the Growth plan. It also updates the team onboarding flow to properly handle the Starter plan.

Changes include:
- Added logic to detect if a team qualifies for the 7-day trial (new signup with no payment on Growth plan)
- Added a "7 day free trial" text display for qualifying teams
- Updated the polling logic to consider both "free" and "starter" plans as non-paid plans
- Modified the onboarding description text to remove reference to "free Starter plan"

## Summary by CodeRabbit

- **New Features**
  - Added a clear "7 day free trial" indicator for eligible Growth plan users.

- **Enhancements**
  - Updated onboarding modal text to remove "free" from the Starter plan description.
  - Modified billing plan polling logic to exclude both "free" and "starter" plans before proceeding.

---

## PR-Codex overview
This PR focuses on updating the logic for determining billing plans and enhancing the user experience regarding trial periods in the `InviteTeamMembers` and `PricingCard` components.

### Detailed summary
- In `InviteTeamMembers.tsx`, updated the condition for `isNonFreePlan` to exclude both "free" and "starter" plans.
- Modified the text in `InviteModalContent` to clarify the Starter plan.
- In `pricing-card.tsx`, added a condition for a 7-day trial for teams with a "growth" billing plan and "noPayment" status.
- Changed the rendering logic for remaining trial days to include a message for the 7-day trial.

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

<!-- start pr-codex -->

---

## PR-Codex overview
This PR focuses on enhancing the pricing logic and UI in the dashboard. It modifies how pricing is handled, specifically for trial periods, and updates the display of pricing information to better reflect the available options and trials.

### Detailed summary
- Changed `price` type from `string | number` to `number`.
- Updated `isNonFreePlan` logic to exclude "starter" plans.
- Revised promotional text for the Growth plan.
- Added logic for a 7-day free trial for new teams on the Growth plan.
- Updated UI to display a "7 Day Free Trial" badge and adjusted pricing display accordingly.
- Modified call-to-action button text based on trial eligibility.

> ✨ 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**
  - Added a "7 Day Free Trial" badge and updated price display for eligible users on the Growth plan.
  - Call-to-action button now shows "Start 7 Day Free Trial" when applicable.

- **Bug Fixes**
  - Improved onboarding flow by updating plan detection logic to better handle "Starter" and "Free" plans.

- **Style**
  - Revised onboarding text to emphasize upgrading to the Growth plan and removed mention of the Starter plan.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
@graphite-app graphite-app bot force-pushed the _Dashboard_Add_7-day_free_trial_for_Growth_plan_and_Starter_plan_option branch from ce02f0e to 8489844 Compare June 11, 2025 19:59
@vercel vercel bot temporarily deployed to Preview – docs-v2 June 11, 2025 20:00 Inactive
@vercel vercel bot temporarily deployed to Preview – login June 11, 2025 20:00 Inactive
@vercel vercel bot temporarily deployed to Preview – thirdweb_playground June 11, 2025 20:00 Inactive
@vercel vercel bot temporarily deployed to Preview – wallet-ui June 11, 2025 20:00 Inactive
@graphite-app graphite-app bot merged commit 8489844 into main Jun 11, 2025
24 checks passed
@graphite-app graphite-app bot deleted the _Dashboard_Add_7-day_free_trial_for_Growth_plan_and_Starter_plan_option branch June 11, 2025 20:08
@vercel vercel bot temporarily deployed to Production – wallet-ui June 11, 2025 20:08 Inactive
@vercel vercel bot temporarily deployed to Production – thirdweb_playground June 11, 2025 20:08 Inactive
@vercel vercel bot temporarily deployed to Production – docs-v2 June 11, 2025 20:08 Inactive
@vercel vercel bot temporarily deployed to Production – login June 11, 2025 20:08 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.

2 participants