-
Notifications
You must be signed in to change notification settings - Fork 559
[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
[Dashboard] Add 7-day free trial for Growth plan #7322
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
|
""" WalkthroughThe 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 Changes
Suggested reviewers
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (3)
🚧 Files skipped from review as they are similar to previous changes (3)
⏰ Context from checks skipped due to timeout of 90000ms (8)
✨ Finishing Touches
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed 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)
Other keywords and placeholders
CodeRabbit Configuration File (
|
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
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. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
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
🚀 New features to boost your workflow:
|
There was a problem hiding this 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:
- It is never referenced inside this component.
- None of the existing
<PricingCard …>
invocations (seeInviteTeamMembers.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 suggestionStarter 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 planThe new
has7DayTrial
flag is tied tobillingPlan === "growth"
.
• If product decides to extend the trial to the new starter tier (or any future tier) this code will silently ignore it.
• WhenactiveTrialEndsAt
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
📒 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)
apps/dashboard/src/app/(app)/login/onboarding/team-onboarding/InviteTeamMembers.tsx
Outdated
Show resolved
Hide resolved
size-limit report 📦
|
3e3963e
to
82e0786
Compare
82e0786
to
e9eee8d
Compare
27b9c1a
to
ce02f0e
Compare
There was a problem hiding this 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 👎
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 -->
ce02f0e
to
8489844
Compare
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:
Summary by CodeRabbit
New Features
Enhancements
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
andPricingCard
components.Detailed summary
InviteTeamMembers.tsx
, updated the condition forisNonFreePlan
to exclude both "free" and "starter" plans.InviteModalContent
to clarify the Starter plan.pricing-card.tsx
, added a condition for a 7-day trial for teams with a "growth" billing plan and "noPayment" status.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
price
type fromstring | number
tonumber
.isNonFreePlan
to exclude the "starter" plan.has7DayTrial
variable to manage trial display logic.Summary by CodeRabbit
New Features
Bug Fixes
Style