This repository was archived by the owner on Nov 7, 2025. It is now read-only.
Conversation
There was a problem hiding this comment.
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
formattedBytesutility 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; |
There was a problem hiding this comment.
Corrected spelling of 'enterpise' to 'enterprise'.
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
No description provided.