Repository navigation
fix(dashboard): show organization status strip and billing state - #5370
Merged
Merged
Conversation
Contributor
Vercel Deployment Info - dashboard
|
Contributor
|
Can you add a screenshot of the changes? |
Member
Author
PVUL
requested changes
Nov 19, 2026
Rui-V-Almeida
marked this pull request as draft
November 19, 2026 16:18
Rui-V-Almeida
marked this pull request as ready for review
November 19, 2026 17:29
robertkasza
self-requested a review
November 20, 2026 08:44
PVUL
approved these changes
Nov 20, 2026
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.


Checklist
🤖 Generated with Claude Code
Goal
Organizations that are over their usage limit, cancelled, disabled or locked used to show a large red banner inside the page content of organization and project pages only. The banner had no clear next step, cancelled organizations still looked like they were on an active plan, and the billing page showed a plan price, an
$N/Aestimate and raw backend errors for subscriptions with no upcoming invoice. This branch adds a thin status strip across the top of the whole dashboard with a link to the next step (billing, upgrade options or a support ticket), keeps sending members of disabled or locked organizations to the billing page, labels cancelled organizations as Cancelled in the plan badge, and makes the billing page (plan, estimate and billing details) reflect the organization status.Type: Bug fix
Changes
OrgStatusStriprenders inAppLayoutabove the header, so it spans the full app width on every page with a current organization. It readsuseCurrentOrg()and switches onorg.status.AllowanceExceededlinks admins to/orgs/<slug>/billing?openUpgradeModal=true(non admins get no link).Cancelledlinks toSUPPORT_TICKET_URLin a new tab.DisabledandLockedlink to the billing page, except when the router pathname already is/orgs/[orgSlug]/billing. The strip is a labelledsectionwith an innerrole="status"element.OrgStatuscomponent (banner plus redirect) is deleted. Its redirect lives on asOrgStatusRedirect, which renders nothing and is mounted insideOrganizationScopeandProjectScope. The effect now depends onpathname,statusandslug, skips the billing page, and runs again on every navigation, so a disabled or locked organization is sent back to billing whenever a member leaves it.OrganizationPlanBadgetakes an optionalstatusand shows a destructiveCancelledlabel instead of the plan name. Its callers (header label, combobox, mobile navigation sheet, transfer project form) pass the status.getOrganizations.gqlnow selectsstatus(with regenerated types), and the local dashboard organization defaults toOk.SubscriptionPlanreplaces the plan name and price with a destructive alert linking to support, hides the Upgrade button and keeps the upgrade dialog closed.BillingEstimatehides the billing cycle and spending notifications.EstimateshowsNo upcoming invoicewith an explanation instead of$N/A.BillingDetailsrenders nothing when a cancelled organization has no invoice or the invoice query fails.refetchwithnotifyOnNetworkStatusChange, and a refetch keeps the alert on screen instead of the full spinner. A null invoice showsNo upcoming invoice details are available.BillingDetailsnow owns its leading separator, so it adds none when it renders nothing. The support URL is shared through the newSUPPORT_TICKET_URLconstant.SubscriptionPlan,BillingEstimateandOrgStatusRedirectper status.BillingDetailstests cover the friendly error, retry and null invoice. The scope layout tests assert the strip sits above the header outside<main>, the support link, the billing redirect and the hidden billing link on the billing page.Key files
dashboard/src/features/orgs/components/OrgStatus/(+221/-96): status strip, redirect, its tests and exports.dashboard/src/components/layout/AppLayout/AppLayout.tsx(+6/-3): mounts the strip above the header.dashboard/src/features/orgs/guards/{OrganizationScope,ProjectScope}/(+91/-26): mount the redirect; layout and strip tests.dashboard/src/components/layout/Header/andTransferProjectForm.tsx(+62/-6): Cancelled badge and its callers.dashboard/src/features/orgs/components/billing/(+443/-95): plan, estimate and billing details per status, with tests.getOrganizations.gql, generatedgraphql.ts,local-dashboard/index.ts,utils/constants/common/common.ts(+14/-2):statusfield, local default and support URL.