fix(billing): rename platform add-ons to packages on billing page#60305
Conversation
Relabels the "Add-ons" section to "Packages" specifically for the platform_and_support product, since its scale/boost/enterprise options are positioned as packages rather than add-ons. Other products continue to show "Add-ons". Generated-By: PostHog Code Task-Id: 844f3b65-520b-4699-b22b-ef59586a71dc
|
🎭 Playwright didn't run on this PR — your changes touch code that could affect E2E behavior, but Playwright is opt-in via label now to keep CI cost down. Add the Most PRs don't need this. Real regressions still get caught on master and fix-forward. |
Prompt To Fix All With AIFix the following 1 code review issue. Work through them one at a time, proposing concise fixes.
---
### Issue 1 of 1
frontend/src/scenes/billing/BillingProduct.tsx:539-549
**Duplicated platform-type guard**
`product.type === 'platform_and_support'` is evaluated twice in the same render block — once for the heading and once for the banner text. Extracting a `const isPlatformProduct = product.type === 'platform_and_support'` (and a `const sectionLabel = isPlatformProduct ? 'Packages' : 'Add-ons'`) before the outer `{product.addons?.length > 0 && ...}` conditional would also let the banner reuse the label via template string rather than duplicating the full sentence.
Reviews (1): Last reviewed commit: "fix(billing): rename platform add-ons to..." | Re-trigger Greptile |
|
Size Change: -7.33 kB (-0.01%) Total Size: 80.6 MB 📦 View Changed
ℹ️ View Unchanged
|
|
✅ Visual changes approved by @raquelmsmith — baseline updated in 4 changed. |
Extract the platform-product guard into an `isPlatformProduct` const and derive a single `addonSectionLabel` so the heading and free-plan upsell banner share one source of truth. Also collapses the heading JSX onto a single line to satisfy oxfmt, which was failing CI on the previous commit. Generated-By: PostHog Code Task-Id: 844f3b65-520b-4699-b22b-ef59586a71dc
2 updated Run: e6c6b422-76e9-478f-bf0b-ee03ee11f830 Co-authored-by: raquelmsmith <18598166+raquelmsmith@users.noreply.github.com>
2 updated Run: 877f3b42-7e51-4463-b4ce-3848eb4873ea Co-authored-by: raquelmsmith <18598166+raquelmsmith@users.noreply.github.com>
4 updated Run: e440c5bd-c714-44c1-a183-b996458c41db Co-authored-by: raquelmsmith <18598166+raquelmsmith@users.noreply.github.com>
|
🎭 Playwright report · View test results →
These issues are not necessarily caused by your changes. |
Problem
On the in-app billing page, the platform product surfaces three options (scale, boost, enterprise) under an "Add-ons" heading. These are positioned to customers as packages rather than add-ons, so the label is misleading in this product only.
Changes
product.type === 'platform_and_support'), render the section heading as "Packages" instead of "Add-ons".PlatformAddonComparison(only mounted for the platform product), update the two user-visible add-on strings — the legacy-plan hero copy and the "Remove add-on" overflow action — to use "package" for consistency with the new heading.How did you test this code?
I'm an agent (PostHog Code). I made the change but did not run a local dev server or click through the billing page. Verification needed:
Publish to changelog?
no
Docs update
No docs change — pure label rename, no behavior change.
🤖 Agent context
Authored by an agent (PostHog Code, Claude). The change is scoped to text in
frontend/src/scenes/billing/BillingProduct.tsxandfrontend/src/scenes/billing/PlatformAddonComparison.tsx. I considered making the label customizable via a prop but went with an inlineproduct.type === 'platform_and_support'check since the rename is product-specific and there are no other callers asking for a configurable label today. ThePlatformAddonComparisonstrings were updated for consistency since that component is only mounted for the platform product — leaving "Remove add-on" while the heading said "Packages" would have read oddly.Created with PostHog Code