Skip to content

fix(pricing): accelerate pricing added back#7808

Merged
aidankmcalister merged 1 commit intomainfrom
fix/add-accelerate-pricing-back
Apr 20, 2026
Merged

fix(pricing): accelerate pricing added back#7808
aidankmcalister merged 1 commit intomainfrom
fix/add-accelerate-pricing-back

Conversation

@aidankmcalister
Copy link
Copy Markdown
Member

@aidankmcalister aidankmcalister commented Apr 20, 2026

Summary by CodeRabbit

Release Notes

  • New Features
    • Introduced Prisma Accelerate section in pricing plans with dedicated features and transparent pricing details.
    • Pricing page display now organizes features into distinct Prisma Postgres and Prisma Accelerate sections for improved clarity.
    • Updated pricing FAQ to include Prisma Accelerate options and dedicated pricing information.

@vercel
Copy link
Copy Markdown

vercel bot commented Apr 20, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
blog Ready Ready Preview, Comment Apr 20, 2026 2:39pm
docs Ready Ready Preview, Comment Apr 20, 2026 2:39pm
eclipse Ready Ready Preview, Comment Apr 20, 2026 2:39pm
site Ready Ready Preview, Comment Apr 20, 2026 2:39pm

Request Review

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 20, 2026

Walkthrough

The pricing page now displays Prisma Accelerate as a distinct product offering alongside Postgres. Changes extend the PricingPlan type with an optional acceleratePoints field, update the pricing amount formatting function, populate accelerate feature data across pricing tiers, and restructure the UI component to render features in two conditionally displayed sections.

Changes

Cohort / File(s) Summary
Pricing Plan Type Extension & Data
apps/site/src/app/pricing/pricing-data.ts
Added optional acceleratePoints field to PricingPlan type. Updated formatAmountForAllCurrencies to eliminate rounding for non-micro pricing. Populated acceleratePoints with feature items across pricing tiers. Revised FAQ answer to reference Prisma Accelerate pricing details.
Pricing Component Layout
apps/site/src/app/pricing/pricing-hero-plans.tsx
Introduced renderPlanPointList helper function. Refactored section layout to always render "Prisma Postgres" features and conditionally render "Prisma Accelerate" features with divider and descriptive text when acceleratePoints is present.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'fix(pricing): accelerate pricing added back' accurately describes the main change—restoring Prisma Accelerate pricing information to the pricing page component.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Comment @coderabbitai help to get the list of available commands and usage tips.

@argos-ci
Copy link
Copy Markdown

argos-ci bot commented Apr 20, 2026

The latest updates on your projects. Learn more about Argos notifications ↗︎

Build Status Details Updated (UTC)
default (Inspect) ✅ No changes detected - Apr 20, 2026, 2:45 PM

Copy link
Copy Markdown
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.

🧹 Nitpick comments (3)
apps/site/src/app/pricing/pricing-data.ts (2)

55-60: Consider making acceleratePoints required on PricingPlan.

Line 59 is optional, but all plan entries now provide Accelerate bullets (Lines 121-218). Making it required gives compile-time protection against future plan omissions.

Proposed type tightening
 export type PricingPlan = {
   title: string;
   subtitle: string;
   points: PlanPoint[];
-  acceleratePoints?: PlanPoint[];
+  acceleratePoints: PlanPoint[];
   price: CurrencyMap;
 };
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/site/src/app/pricing/pricing-data.ts` around lines 55 - 60, The type
PricingPlan currently marks acceleratePoints as optional but every plan object
provides it, so tighten the type by removing the optional modifier from
acceleratePoints on the PricingPlan type (i.e., make acceleratePoints required)
to get compile-time guarantees; update any code that assumed it might be
undefined (references to pricingData, map/filter logic, or destructuring that
checks for undefined) to treat acceleratePoints as always present or handle
accordingly, and run the TypeScript build to catch places that need minor
adjustments.

72-85: Currency formatting logic differs between surfaces; consolidate if values overlap.

formatAmountForAllCurrencies (pricing-data.ts, lines 72–85) does not round and uses config-based decimal thresholds, while formatCurrency (pricing-calculator.tsx, line 83) explicitly rounds values ≥1 and applies a hardcoded ≥1 threshold for decimal selection. Although these formatters primarily serve different contexts—static plan cards vs. dynamic calculations—the divergent logic could produce inconsistent output if the same USD amount is formatted by both. For robustness, extract a shared currency formatter or document why the dual strategies are necessary.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/site/src/app/pricing/pricing-data.ts` around lines 72 - 85,
formatAmountForAllCurrencies and formatCurrency use different
rounding/decimal-selection rules causing inconsistent displays; create a single
shared formatter (e.g., formatCurrencyValue) that takes (amountUsd: number,
target: Symbol, digits: number) and centralizes logic: convert via
convertFromUsd, consult currencyConfig[typedCode] for decimals and
microDecimals, apply consistent rule (e.g., round values >= 1 to config.decimals
and use microDecimals when digits > config.decimals or when <1 as needed), then
format with toLocaleString using effectiveFractionDigits; replace calls in
formatAmountForAllCurrencies and formatCurrency to delegate to this new function
(or if keeping two, clearly document why they must differ and ensure both call a
common helper for conversion/formatting decisions).
apps/site/src/app/pricing/pricing-hero-plans.tsx (1)

50-52: Clarify when static HTML strings become a refactoring priority.

Line 50 injects plan content via dangerouslySetInnerHTML, which is safe today because all bullet points are hardcoded static literals in pricing-data.ts. This includes both points and acceleratePoints arrays—there's no external data source (CMS, API, localization, etc.) feeding these strings.

However, the XSS risk is real if this architecture ever changes. If these strings move to a database, user-managed content, or external source in the future, the current approach becomes an injection sink. Consider one of:

  • Add a comment explaining why static literals make this safe (and when it should be revisited)
  • Plan a refactor to migrate to structured rich-text tokens if dynamic content is planned

For now, the implementation is secure. Flag this for review when the data source model changes.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/site/src/app/pricing/pricing-hero-plans.tsx` around lines 50 - 52, The
code is injecting HTML via dangerouslySetInnerHTML using renderPlanPoint(item,
currency), which is currently safe because all strings come from static literals
in pricing-data.ts (points and acceleratePoints); add an inline code comment
next to the dangerouslySetInnerHTML usage referencing renderPlanPoint and
pricing-data.ts that states this safety assumption (static literals only), warns
that this is an XSS sink if points or acceleratePoints move to
external/DB/CMS/localized sources, and instructs to refactor to structured
rich-text tokens or a safe renderer when content becomes dynamic; include the
function name renderPlanPoint and the arrays points/acceleratePoints in the
comment for easy future discovery.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@apps/site/src/app/pricing/pricing-data.ts`:
- Around line 55-60: The type PricingPlan currently marks acceleratePoints as
optional but every plan object provides it, so tighten the type by removing the
optional modifier from acceleratePoints on the PricingPlan type (i.e., make
acceleratePoints required) to get compile-time guarantees; update any code that
assumed it might be undefined (references to pricingData, map/filter logic, or
destructuring that checks for undefined) to treat acceleratePoints as always
present or handle accordingly, and run the TypeScript build to catch places that
need minor adjustments.
- Around line 72-85: formatAmountForAllCurrencies and formatCurrency use
different rounding/decimal-selection rules causing inconsistent displays; create
a single shared formatter (e.g., formatCurrencyValue) that takes (amountUsd:
number, target: Symbol, digits: number) and centralizes logic: convert via
convertFromUsd, consult currencyConfig[typedCode] for decimals and
microDecimals, apply consistent rule (e.g., round values >= 1 to config.decimals
and use microDecimals when digits > config.decimals or when <1 as needed), then
format with toLocaleString using effectiveFractionDigits; replace calls in
formatAmountForAllCurrencies and formatCurrency to delegate to this new function
(or if keeping two, clearly document why they must differ and ensure both call a
common helper for conversion/formatting decisions).

In `@apps/site/src/app/pricing/pricing-hero-plans.tsx`:
- Around line 50-52: The code is injecting HTML via dangerouslySetInnerHTML
using renderPlanPoint(item, currency), which is currently safe because all
strings come from static literals in pricing-data.ts (points and
acceleratePoints); add an inline code comment next to the
dangerouslySetInnerHTML usage referencing renderPlanPoint and pricing-data.ts
that states this safety assumption (static literals only), warns that this is an
XSS sink if points or acceleratePoints move to external/DB/CMS/localized
sources, and instructs to refactor to structured rich-text tokens or a safe
renderer when content becomes dynamic; include the function name renderPlanPoint
and the arrays points/acceleratePoints in the comment for easy future discovery.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: d9532109-ed78-4645-9d27-a9c6e1443984

📥 Commits

Reviewing files that changed from the base of the PR and between 51e046a and 262160e.

📒 Files selected for processing (2)
  • apps/site/src/app/pricing/pricing-data.ts
  • apps/site/src/app/pricing/pricing-hero-plans.tsx

@aidankmcalister aidankmcalister merged commit b411169 into main Apr 20, 2026
13 checks passed
@aidankmcalister aidankmcalister deleted the fix/add-accelerate-pricing-back branch April 20, 2026 14:59
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.

2 participants