Skip to content

Conversation

@simeng-li
Copy link
Contributor

Summary

This PR refactors the tenant-level subscription and billing history pages to support the newly introduced enterprise subscription model.

Motivation

With the introduction of enterprise subscriptions that allow multiple tenants to share a single subscription, certain subscription-level information, such as billing details and aggregated usage status, can no longer be accurately or appropriately presented at the individual tenant level. Instead, this information should be displayed on a centralized enterprise subscription page with proper subscription-level access control.

As a result, tenant-level pages must hide or adjust specific content when the tenant is associated with an enterprise subscription, particularly when the quota scope is shared.

Detailed updates

  1. Hide the Billing history tab and its content when the current tenant is associated with an enterprise subscription using a shared quota scope.

  2. Hide the Logto public pricing table for tenants in private regions.

  3. Hide the upcoming bill section and payment management actions when the current tenant is associated with an enterprise subscription using a shared quota scope.

  4. Hide usage-exceeded notifications when the current tenant is associated with an enterprise subscription using a shared quota scope.

  5. Hide all quota usage tips from the quota usage card when the current tenant is associated with an enterprise subscription using a shared quota scope.

Testing

Test locally
image

Checklist

  • .changeset
  • unit tests
  • integration tests
  • necessary TSDoc comments

@simeng-li simeng-li requested review from a team and Copilot December 23, 2025 04:09
@github-actions github-actions bot added the enhancement Make it better label Dec 23, 2025
@github-actions
Copy link

github-actions bot commented Dec 23, 2025

COMPARE TO master

Total Size Diff 📈 +1.84 KB

Diff by File
Name Diff
packages/console/src/components/PlanUsage/PlanUsageCard/index.tsx 📈 +282 Bytes
packages/console/src/hooks/use-console-routes/routes/tenant-settings.tsx 📈 +402 Bytes
packages/console/src/pages/TenantSettings/Subscription/CurrentPlan/index.tsx 📈 +275 Bytes
packages/console/src/pages/TenantSettings/Subscription/index.tsx 📈 +554 Bytes
packages/console/src/pages/TenantSettings/index.tsx 📈 +368 Bytes

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR refactors the tenant-level subscription and billing history pages to support enterprise subscriptions with shared quota scope. When a tenant is associated with an enterprise subscription using a shared quota scope, certain subscription-level information (billing details, usage notifications) is now hidden as this data should only be displayed on a centralized enterprise subscription page.

Key changes:

  • Hide billing history tab and route for tenants with shared enterprise subscriptions
  • Hide Logto pricing table for private region tenants
  • Conditionally display billing information and usage notifications based on quota scope

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
packages/console/src/pages/TenantSettings/index.tsx Adds conditional rendering to hide the billing history tab when quotaScope is 'shared'
packages/console/src/pages/TenantSettings/Subscription/index.tsx Adds logic to detect private region tenants and hide pricing table and plan switching actions accordingly
packages/console/src/pages/TenantSettings/Subscription/CurrentPlan/index.tsx Wraps billing info and usage notifications in a conditional check for 'dedicated' quota scope
packages/console/src/hooks/use-console-routes/routes/tenant-settings.tsx Updates route configuration to conditionally include billing history route based on quota scope
packages/console/src/components/PlanUsage/PlanUsageCard/index.tsx Hides usage tips for shared quota scope tenants in both numeric usage displays and enterprise plan quota notices

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@github-actions github-actions bot added size/m and removed size/m labels Dec 23, 2025
Base automatically changed from simeng-log-12492-console-read-available-tenant-skus-and-limits-from-the to master December 24, 2025 03:11
@github-actions github-actions bot added size/m and removed size/m labels Dec 24, 2025
update tenant subscription settings page
@simeng-li simeng-li force-pushed the simeng-log-12631-console-update-tenant-usage-page-for-enterprise-subscription branch from af53245 to fdf587b Compare December 24, 2025 03:13
@github-actions github-actions bot added size/m and removed size/m labels Dec 24, 2025
@simeng-li simeng-li merged commit b7966d5 into master Dec 24, 2025
34 checks passed
@simeng-li simeng-li deleted the simeng-log-12631-console-update-tenant-usage-page-for-enterprise-subscription branch December 24, 2025 03:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Make it better size/m

Development

Successfully merging this pull request may close these issues.

5 participants