-
Notifications
You must be signed in to change notification settings - Fork 196
Fix custom plan names displaying as "Custom" on account organizations page #2545
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
ConsoleProject ID: Tip Cursor pagination performs better than offset pagination when loading further pages. |
|
Important Review skippedBot user detected. To trigger a single review, invoke the You can disable this status message by setting the Note Other AI code review bot(s) detectedCodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review. Note Free review on us!CodeRabbit is offering free reviews until Thu Nov 06 2025 to showcase some of the refinements we've made. Comment |
Modified tierToPlan function to lookup custom plans from plansInfo map instead of defaulting to Free. Updated account organizations page to pass plansInfo to tierToPlan calls. Co-authored-by: stnguyen90 <[email protected]>
Removed redundant conditional and simplified the default case to use a single variable for the map lookup. Co-authored-by: stnguyen90 <[email protected]>
…s from API - Changed default return value from tierFree to tierCustom for unknown tiers - Removed optional plansMap parameter and lookup logic from tierToPlan - Added getPlanName function to fetch custom plan names via billing.getPlan() API - Updated account organizations page to use async plan name fetching for custom plans Co-authored-by: stnguyen90 <[email protected]>
|
Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
| {#await getPlanName(payingOrg.billingPlan) then name} | ||
| <Badge | ||
| size="xs" | ||
| type="success" | ||
| variant="secondary" | ||
| content={name} /> | ||
| {/await} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ItzNotABug do we want some sort of skeleton loader here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah as I mentioned above for shifts, we could use a skeleton. Please run by design once 👍
| // For custom plans, fetch from API | ||
| try { | ||
| const plan = await sdk.forConsole.billing.getPlan(billingPlan); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we can do a quick cached data lookup first to avoid a network call, there should be a plansInfo available.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ItzNotABug tierToPlan essentially has the same data as plansInfo, right?
| </span> | ||
| </Tooltip> | ||
| {#if planName} | ||
| {#await planName then name} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
won't there be a slight content/layout shift until this loads and if the api call was made?
| {#await getPlanName(payingOrg.billingPlan) then name} | ||
| <Badge | ||
| size="xs" | ||
| type="success" | ||
| variant="secondary" | ||
| content={name} /> | ||
| {/await} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah as I mentioned above for shifts, we could use a skeleton. Please run by design once 👍

Organizations with custom billing plans were showing as "Free" (or generic "Custom") because
tierToPlan()defaulted totierFreefor any tier ID not in the static enum.Changes
tierToPlan()function - Changed default return value fromtierFreetotierCustomfor unknown tier IDsgetPlanName()async function that fetches actual custom plan names viabilling.getPlan()APIFor displaying actual custom plan names, the account organizations page now:
tierToPlan()to check if it's a known plan typebilling.getPlan()API{#await}to handle async plan name loadingThis approach ensures custom plans show their actual names (e.g., "Enterprise Custom") instead of the generic "Custom" or incorrect "Free" label.
Testing
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.