Skip to content

Switch to 3 business plans#362

Merged
elie222 merged 1 commit intomainfrom
premium-plans
Feb 25, 2025
Merged

Switch to 3 business plans#362
elie222 merged 1 commit intomainfrom
premium-plans

Conversation

@elie222
Copy link
Owner

@elie222 elie222 commented Feb 25, 2025

Summary by CodeRabbit

  • New Features

    • The pricing page now features a streamlined layout with updated discount messaging (“Save up to 33%!”).
    • Revised pricing tiers now offer refreshed options for standard users, teams, and enterprises—with enhanced benefits such as extra email allowances and self-hosted deployment.
  • Chores

    • Adjusted pricing values and additional email costs to support the updated pricing structure.

@vercel
Copy link

vercel bot commented Feb 25, 2025

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

Name Status Preview Updated (UTC)
inbox-zero ✅ Ready (Inspect) Visit Preview Feb 25, 2025 4:01pm

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 25, 2025

Walkthrough

The changes simplify the pricing page by removing conditional logic based on pricing variants. The Pricing.tsx component now renders using a fixed three-column layout and displays an updated discount message. In parallel, the pricing configurations have been updated with new tier definitions and price adjustments. Additionally, the pricing variant hook and type in the feature flags module have been disabled, streamlining both UI rendering and configuration logic.

Changes

File(s) Change Summary
apps/web/app/(app)/premium/Pricing.tsx
apps/web/hooks/useFeatureFlags.ts
Removed usePricingVariant hook and associated conditional logic; layout is now statically set to ThreeColLayout/ThreeColItem; discount badge text updated from "Save up to 50%!" to "Save up to 33%!"; commented out the PricingVariant type and hook in the feature flags module.
apps/web/app/(app)/premium/config.ts Updated pricing configurations with revised values (e.g., PremiumTier.COPILOT_MONTHLY changed from 499 to 500; pricingAdditionalEmail values adjusted); removed basicTier and businessSingleTier; renamed businessTierName to a hardcoded "Standard" in businessTier; introduced new tiers (businessTeamTier and businessEnterpriseTier) with updated pricing, descriptions, and features; updated export of allTiers to include only the new tiers.

Sequence Diagram(s)

sequenceDiagram
    participant U as User
    participant P as Pricing Component
    participant C as Config Module
    U->>P: Request pricing page
    P->>C: Load pricing tier configurations
    Note over P: Conditional logic removed<br>using static ThreeColLayout
    P->>U: Render pricing tiers with discount "Save up to 33%!"
Loading

Possibly related PRs

Poem

I’m a rabbit, hopping by,
Skipping over code with a joyful sigh,
The layout’s steady, the tiers now gleam,
No more variant hooks to haunt our dream,
With prices set and discounts fair, 🐰
I leap in code with flair in the air!
Hop on, let’s code without a care!

Warning

There were issues while running some tools. Please review the errors and either fix the tool’s configuration or disable the tool if it’s a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

apps/web/app/(app)/premium/Pricing.tsx

Oops! Something went wrong! :(

ESLint: 8.57.1

Error: Failed to load parser '@typescript-eslint/parser' declared in 'apps/web/.eslintrc.json': Cannot find module '@typescript-eslint/parser'
Require stack:

  • /apps/web/.eslintrc.json
    at Module._resolveFilename (node:internal/modules/cjs/loader:1248:15)
    at Function.resolve (node:internal/modules/helpers:145:19)
    at Object.resolve (/node_modules/.pnpm/@eslint+eslintrc@2.1.4/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:2346:46)
    at ConfigArrayFactory._loadParser (/node_modules/.pnpm/@eslint+eslintrc@2.1.4/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:3325:39)
    at ConfigArrayFactory._normalizeObjectConfigDataBody (/node_modules/.pnpm/@eslint+eslintrc@2.1.4/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:3099:43)
    at _normalizeObjectConfigDataBody.next ()
    at ConfigArrayFactory._normalizeObjectConfigData (/node_modules/.pnpm/@eslint+eslintrc@2.1.4/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:3040:20)
    at _normalizeObjectConfigData.next ()
    at ConfigArrayFactory.loadInDirectory (/node_modules/.pnpm/@eslint+eslintrc@2.1.4/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:2886:28)
    at CascadingConfigArrayFactory._loadConfigInAncestors (/node_modules/.pnpm/@eslint+eslintrc@2.1.4/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:3871:46)
apps/web/hooks/useFeatureFlags.ts

Oops! Something went wrong! :(

ESLint: 8.57.1

Error: Failed to load parser '@typescript-eslint/parser' declared in 'apps/web/.eslintrc.json': Cannot find module '@typescript-eslint/parser'
Require stack:

  • /apps/web/.eslintrc.json
    at Module._resolveFilename (node:internal/modules/cjs/loader:1248:15)
    at Function.resolve (node:internal/modules/helpers:145:19)
    at Object.resolve (/node_modules/.pnpm/@eslint+eslintrc@2.1.4/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:2346:46)
    at ConfigArrayFactory._loadParser (/node_modules/.pnpm/@eslint+eslintrc@2.1.4/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:3325:39)
    at ConfigArrayFactory._normalizeObjectConfigDataBody (/node_modules/.pnpm/@eslint+eslintrc@2.1.4/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:3099:43)
    at _normalizeObjectConfigDataBody.next ()
    at ConfigArrayFactory._normalizeObjectConfigData (/node_modules/.pnpm/@eslint+eslintrc@2.1.4/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:3040:20)
    at _normalizeObjectConfigData.next ()
    at ConfigArrayFactory.loadInDirectory (/node_modules/.pnpm/@eslint+eslintrc@2.1.4/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:2886:28)
    at CascadingConfigArrayFactory._loadConfigInAncestors (/node_modules/.pnpm/@eslint+eslintrc@2.1.4/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:3871:46)
apps/web/app/(app)/premium/config.ts

Oops! Something went wrong! :(

ESLint: 8.57.1

Error: Failed to load parser '@typescript-eslint/parser' declared in 'apps/web/.eslintrc.json': Cannot find module '@typescript-eslint/parser'
Require stack:

  • /apps/web/.eslintrc.json
    at Module._resolveFilename (node:internal/modules/cjs/loader:1248:15)
    at Function.resolve (node:internal/modules/helpers:145:19)
    at Object.resolve (/node_modules/.pnpm/@eslint+eslintrc@2.1.4/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:2346:46)
    at ConfigArrayFactory._loadParser (/node_modules/.pnpm/@eslint+eslintrc@2.1.4/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:3325:39)
    at ConfigArrayFactory._normalizeObjectConfigDataBody (/node_modules/.pnpm/@eslint+eslintrc@2.1.4/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:3099:43)
    at _normalizeObjectConfigDataBody.next ()
    at ConfigArrayFactory._normalizeObjectConfigData (/node_modules/.pnpm/@eslint+eslintrc@2.1.4/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:3040:20)
    at _normalizeObjectConfigData.next ()
    at ConfigArrayFactory.loadInDirectory (/node_modules/.pnpm/@eslint+eslintrc@2.1.4/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:2886:28)
    at CascadingConfigArrayFactory._loadConfigInAncestors (/node_modules/.pnpm/@eslint+eslintrc@2.1.4/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:3871:46)

📜 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 5913c6f and 97182bf.

📒 Files selected for processing (3)
  • apps/web/app/(app)/premium/Pricing.tsx (4 hunks)
  • apps/web/app/(app)/premium/config.ts (4 hunks)
  • apps/web/hooks/useFeatureFlags.ts (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • apps/web/hooks/useFeatureFlags.ts
🔇 Additional comments (14)
apps/web/app/(app)/premium/Pricing.tsx (5)

71-74: Code simplification: Fixed layout approach.

The code has been simplified by moving from a dynamic layout approach with getLayoutComponents to a fixed three-column layout. This removes conditional logic based on pricing variants, aligning with the PR objective to switch to 3 business plans.


152-152: Updated discount percentage from 50% to 33%.

The displayed maximum discount has been adjusted to align with the actual maximum discount available in the updated pricing tiers.


190-191: Added flex class to the pricing tier item.

The addition of the flex class ensures proper vertical layout of the pricing card content, allowing elements to fill the available space appropriately.


193-193: Added flex-1 to ensure content expands properly.

This change ensures the content area takes up available space, pushing the CTA button to the bottom of the card for consistent alignment across all pricing tiers.


296-318: Removed conditional layout logic.

Commenting out the getLayoutComponents function aligns with the simplified approach of using a fixed three-column layout for the pricing tiers.

apps/web/app/(app)/premium/config.ts (9)

35-35: Minor price adjustment for COPILOT tier.

The price for the COPILOT_MONTHLY tier has been adjusted from 499 to 500, likely for consistency or better psychological pricing.


44-46: Standardized additional email pricing.

All business tier additional email prices have been standardized to $10, simplifying the pricing structure and making it more consistent across tiers.


109-136: Removed basic tier from pricing options.

The basic "Unsubscriber" tier has been removed as part of the switch to 3 business plans, streamlining the product offering.


140-142: Renamed business tier to "Standard".

The business tier has been renamed from a variable reference to a hardcoded "Standard" name, providing clearer naming in the new 3-tier structure.


167-169: Reordered features in Standard tier.

The bulk unsubscribe and analytics features have been moved up in the feature list, likely to highlight more commonly used features earlier.


211-244: Added new Team tier for small teams.

A new "Team" tier has been introduced for small teams with 5 email accounts included, priced at $64 monthly or $56 annually, offering a 12.5% discount for annual billing.


246-283: Replaced Copilot tier with Enterprise tier.

The previous "Co-Pilot" tier with human assistance has been replaced with an "Enterprise" tier offering self-hosted deployment and 25 included email accounts, focusing on organizational needs rather than individual assistance.


316-320: Updated tier structure to 3 business plans.

The allTiers array now contains only the three business tiers (Standard, Team, and Enterprise), completing the switch to the 3-business-plan structure outlined in the PR objectives.


248-251:

Details

❓ Verification inconclusive

Verify tier association for Enterprise plan.

The Enterprise tier is associated with PremiumTier.BUSINESS_MONTHLY and PremiumTier.BUSINESS_ANNUALLY rather than a dedicated Enterprise tier enum. This means it shares the same tier values as the Standard plan, which could cause confusion in user tier identification.


🏁 Script executed:

#!/bin/bash
# Check if there are any functions that depend on distinguishing between Standard and Enterprise tiers
rg -A 3 "getUserTier|premium\.tier" --type typescript

Length of output: 90


Manual Verification Needed: Issue with Tier Association Reference

It appears that the initial search command failed due to the unrecognized file type "typescript." Please re-run the search using a glob pattern that targets TypeScript files. This will help us verify whether any functions (e.g., those named getUserTier or any that reference premium.tier) differentiate the Enterprise plan from Standard.

Once you re-run this command and verify the output, please double-check if the Enterprise plan indeed lacks a dedicated enum and is incorrectly sharing the BUSINESS tiers. This will help decide if we need to update the tier association.


🏁 Script executed:

[run_scripts]
#!/bin/bash
# Search for references to getUserTier or premium.tier in TypeScript files
rg -A 3 "getUserTier|premium\.tier" -g "*.ts"

Length of output: 787


Tier Configuration: Verify Dedicated Enterprise Tier

The premium configuration in
apps/web/app/(app)/premium/config.ts
currently maps both monthly and annual plans to PremiumTier.BUSINESS_MONTHLY and PremiumTier.BUSINESS_ANNUALLY. Our recent searches indicate that functions like getUserTier and tier comparisons in apps/web/utils/actions/premium.ts do not clearly differentiate an Enterprise tier from the existing BUSINESS tiers.

Please review whether a dedicated Enterprise enum value was intended but omitted. If an Enterprise plan should be distinct from the Business/Standard plan, update the configuration and any related logic accordingly. Otherwise, consider adding inline comments to clarify that the mapping is intentional.

✨ Finishing Touches
  • 📝 Generate Docstrings (Beta)

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 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.
    • Generate unit testing code for this file.
    • 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 generate unit testing code for this file.
    • @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 generate unit testing code.
    • @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.

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. (Beta)
  • @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.

@elie222 elie222 merged commit 50487fa into main Feb 25, 2025
4 checks passed
@coderabbitai coderabbitai bot mentioned this pull request May 8, 2025
@coderabbitai coderabbitai bot mentioned this pull request Jun 5, 2025
@coderabbitai coderabbitai bot mentioned this pull request Sep 10, 2025
@coderabbitai coderabbitai bot mentioned this pull request Nov 11, 2025
@elie222 elie222 deleted the premium-plans branch December 18, 2025 23:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments