mirror of
https://github.com/supabase/supabase.git
synced 2026-06-20 22:06:04 +08:00
## I have read the [CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md) file. YES ## What kind of change does this PR introduce? Feature — A/B experiment for a new pricing calculator on the `/pricing` page, gated behind a PostHog feature flag. ## What is the current behavior? The pricing page shows a single compute pricing section (`PricingComputeSection`) to all visitors with no experimentation support. ## What is the new behavior? - Introduces a **pricing calculator A/B experiment** (`pricingCalculatorExperiment`) using PostHog feature flags evaluated client-side. - **Control variant**: Renders the existing `PricingComputeSection` (no change). - **Test variant**: Renders a new `NewPricingComputeSection` with: - A plan selector toggle (Pro / Team) - An interactive compute calculator with slider-based instance sizing - Ability to add/remove multiple project instances - Live monthly cost estimate breakdown (plan + compute - credits) - Expandable compute pricing table with detailed specs - Adds `getFeatureFlag` and `onFeatureFlags` methods to the shared `PostHogClient` for client-side flag evaluation on www pages (where server-side evaluation lacks full person context). ## Additional context - The experiment is scoped to the `/pricing` page only. - New components (`NewPricingComputeSection`, `NewComputePricingCalculator`) are created alongside the existing ones — the control path is completely untouched. - Feature flag evaluation happens client-side because www pages don't have full person context on the server. - Telemetry type `PricingCalculatorExperimentExposedEvent` is added to `telemetry-constants.ts`. --------- Co-authored-by: Sean Oliver <882952+seanoliver@users.noreply.github.com> Co-authored-by: Mert YEREKAPAN <mertyerekapan@gmail.com> Co-authored-by: Mert YEREKAPAN <33198490+myerekapan@users.noreply.github.com>