Skip to content

Conversation

@CarinaWolli
Copy link
Member

What does this PR do?

If a user buys credits on the free plan and later joins a team, their personal credits currently appear “lost” because they’re no longer shown in /settings/billing.

This PR ensures personal credits remain visible in billing even after joining a team. In this state, the option to buy credits is removed since only teams should be able to purchase credits. If the user is part of a team and has no personal credits, the credits section is hidden entirely.

As a follow-up, I’ll verify the backend logic and ensure we correctly fall back to personal credits when team credits run out.

});
}
} else {
//if user is part of team, don't return any credits if teamId is not given
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This caused the issue, that even if the user had personal credits we still returned null

if (isLoading && teamId) return <BillingCreditsSkeleton />;
if (!creditsData) return null;

// For personal billing page: hide credits section if user is part of a team and has no personal credits
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fix is here, only hide when user is part of a team and has no personal credits

onChange={(e) => setValue("quantity", Number(e.target.value))}
min={50}
addOnSuffix={<>{t("credits")}</>}
{/* Users who are part of a team cannot buy personal credits */}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

make sure user can't buy more personal credits if they are part of a team

<div className="text-subtle px-5 py-4 text-sm font-medium leading-tight">
<ServerTrans
<div className="px-5 py-4 text-sm font-medium leading-tight text-subtle">
<LearnMoreLink
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use existing LearnMoreLink that's already used in other places

@CarinaWolli CarinaWolli marked this pull request as ready for review February 2, 2026 13:32
@graphite-app graphite-app bot requested a review from a team February 2, 2026 13:32
@graphite-app graphite-app bot added consumer core area: core, team members only labels Feb 2, 2026
Copy link
Contributor

@eunjae-lee eunjae-lee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good !

Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 2 files

@CarinaWolli CarinaWolli merged commit fc3815a into main Feb 3, 2026
88 of 89 checks passed
@CarinaWolli CarinaWolli deleted the fix/credits-on-upgrade branch February 3, 2026 09:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

consumer core area: core, team members only ready-for-e2e size/L

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants