Skip to content
This repository was archived by the owner on Nov 7, 2025. It is now read-only.

feat: introduce cloud billing#611

Merged
svedova merged 1 commit intomainfrom
introduce-usage-metrics
Oct 24, 2025
Merged

feat: introduce cloud billing#611
svedova merged 1 commit intomainfrom
introduce-usage-metrics

Conversation

@svedova
Copy link
Copy Markdown
Contributor

@svedova svedova commented Oct 24, 2025

No description provided.

@svedova svedova requested a review from Copilot October 24, 2025 10:52
Copy link
Copy Markdown

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 introduces cloud billing functionality by restructuring the account and subscription management components. The changes focus on displaying user metrics and usage information directly in the user profile, removing the separate subscription checkout/details pages, and streamlining the account management interface.

Key changes:

  • Added a new formattedBytes utility function for formatting byte values with SI/binary unit support
  • Refactored UserProfile component to display subscription usage metrics (build minutes, bandwidth, function invocations, storage)
  • Removed standalone subscription details and checkout components, integrating billing into the main account page
  • Updated authentication context to include user metrics from the API

Reviewed Changes

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

Show a summary per file
File Description
src/utils/helpers/string.ts Added formattedBytes utility function for byte formatting
src/utils/helpers/deployments.tsx Removed unused deployNow function
src/pages/user/account/actions.ts Fixed typo in License interface and simplified condition logic
src/pages/user/account/_components/UserProfile.tsx Enhanced to display subscription metrics with usage progress indicators
src/pages/user/account/_components/UserProfile.spec.tsx Added test coverage for cloud and self-hosted edition displays
src/pages/user/account/_components/SubscriptionDetailsCheckout.tsx Removed entire checkout component
src/pages/user/account/_components/SubscriptionDetailsCheckout.spec.tsx Removed tests for deleted checkout component
src/pages/user/account/_components/SubscriptionDetails.tsx Removed entire subscription details component
src/pages/user/account/_components/SubscriptionDetails.spec.tsx Removed tests for deleted subscription details component
src/pages/user/account/_components/ConnectedAccounts.tsx Minor style cleanup and removed unused variable
src/pages/user/account/Account.tsx Simplified to remove subscription details section and payment warnings
src/pages/user/account/Account.spec.tsx Updated tests to reflect removed subscription details
src/pages/auth/actions.ts Updated to fetch and return user metrics from API
src/pages/auth/Auth.context.tsx Added metrics to context and removed payment redirect logic
src/pages/apps/[id]/environments/[env-id]/volumes/Volumes.spec.tsx Wrapped assertions in async waitFor block

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.


interface License {
premium: boolean;
enterpise: boolean;
Copy link

Copilot AI Oct 24, 2025

Choose a reason for hiding this comment

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

Corrected spelling of 'enterpise' to 'enterprise'.

Copilot uses AI. Check for mistakes.
Comment thread src/pages/user/account/_components/UserProfile.tsx
@svedova svedova merged commit d6dc841 into main Oct 24, 2025
1 check passed
@svedova svedova deleted the introduce-usage-metrics branch October 24, 2025 10:53
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants