fix(billing): clarify upgrade flow charge details#2039
Merged
Conversation
Adds the organization name and a note that the first charge is prorated for the remainder of the current billing cycle so users understand who is being charged, how, and why the first charge may not be the full $200. Generated-By: PostHog Code Task-Id: dfb1cbbe-be34-4ef0-aadc-e75880db6019
adboio
approved these changes
May 5, 2026
Contributor
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
apps/code/src/renderer/features/settings/components/sections/PlanUsageSettings.tsx:355-364
The suffix "will be charged $200/month using the payment method on file in PostHog." is identical in both branches, violating the OnceAndOnlyOnce simplicity rule. Factor out just the subject so the shared tail is expressed once.
```suggestion
<Dialog.Description color="gray" className="text-sm">
{seat?.organization_name ? (
<Text weight="medium">{seat.organization_name}</Text>
) : (
"Your organization"
)}{" "}
will be charged $200/month using the payment method on file in
PostHog.
</Dialog.Description>
```
Reviews (1): Last reviewed commit: "fix(billing): clarify upgrade flow charg..." | Re-trigger Greptile |
Comment on lines
355
to
364
| <Dialog.Description color="gray" className="text-sm"> | ||
| You are about to subscribe to the Pro plan. Your organization will | ||
| be charged $200/month starting immediately. | ||
| {seat?.organization_name ? ( | ||
| <> | ||
| <Text weight="medium">{seat.organization_name}</Text> will be | ||
| charged $200/month using the payment method on file in PostHog. | ||
| </> | ||
| ) : ( | ||
| "Your organization will be charged $200/month using the payment method on file in PostHog." | ||
| )} | ||
| </Dialog.Description> |
Contributor
There was a problem hiding this comment.
The suffix "will be charged $200/month using the payment method on file in PostHog." is identical in both branches, violating the OnceAndOnlyOnce simplicity rule. Factor out just the subject so the shared tail is expressed once.
Suggested change
| <Dialog.Description color="gray" className="text-sm"> | |
| You are about to subscribe to the Pro plan. Your organization will | |
| be charged $200/month starting immediately. | |
| {seat?.organization_name ? ( | |
| <> | |
| <Text weight="medium">{seat.organization_name}</Text> will be | |
| charged $200/month using the payment method on file in PostHog. | |
| </> | |
| ) : ( | |
| "Your organization will be charged $200/month using the payment method on file in PostHog." | |
| )} | |
| </Dialog.Description> | |
| <Dialog.Description color="gray" className="text-sm"> | |
| {seat?.organization_name ? ( | |
| <Text weight="medium">{seat.organization_name}</Text> | |
| ) : ( | |
| "Your organization" | |
| )}{" "} | |
| will be charged $200/month using the payment method on file in | |
| PostHog. | |
| </Dialog.Description> |
Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/code/src/renderer/features/settings/components/sections/PlanUsageSettings.tsx
Line: 355-364
Comment:
The suffix "will be charged $200/month using the payment method on file in PostHog." is identical in both branches, violating the OnceAndOnlyOnce simplicity rule. Factor out just the subject so the shared tail is expressed once.
```suggestion
<Dialog.Description color="gray" className="text-sm">
{seat?.organization_name ? (
<Text weight="medium">{seat.organization_name}</Text>
) : (
"Your organization"
)}{" "}
will be charged $200/month using the payment method on file in
PostHog.
</Dialog.Description>
```
How can I resolve this? If you propose a fix, please make it concise.Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
Factor the shared sentence tail out of the conditional so only the subject (org name vs. fallback) varies between branches. Generated-By: PostHog Code Task-Id: dfb1cbbe-be34-4ef0-aadc-e75880db6019
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The Pro upgrade dialog didn't make it clear who was being charged, how they were being charged, or why the first charge wouldn't match the listed $200/mo (it's prorated). Adam reported being charged $102.44 on the 5th of the month with no in-app indication of why — and Peter confirmed proration should be in the copy.
This updates the upgrade dialog to:
No logic changes — copy and one extra info block in
PlanUsageSettings.tsx.Test plan
upgradeToPro).seat.organization_nameis undefined.Created with PostHog Code