Conversation
…ard and new site creation; enhance UI feedback for plan limits
…ce in billing API for enhanced billing information
…ettings component for improved user clarity
…eturn client_secret and adjust checkout flow in components
…d separate content into CheckoutReturnContent component
…integration for streamlined checkout flow
…age for cleaner settings interface
…ess name for improved billing clarity
… for improved UI consistency and accessibility
…or improved user control over billing
…hance user experience with upcoming billing details
… state and provide user feedback on calculation errors
…ibility; enhance OrganizationSettings to handle plan changes and display past due notices
…ove performance and user feedback during plan changes
…ubscription information and improve user interaction with invoice links
Greptile SummaryThis PR enhances the billing UX by adding subscription renewal information, multi-plan support (Solo/Team/Business), and fixes a React crash issue. The changes include displaying "Renews [date] for [amount]" on the dashboard and billing tab, implementing invoice preview with error fallback for plan changes, and adding various design and accessibility improvements. Key changes:
Confidence Score: 4/5
|
| Filename | Overview |
|---|---|
| app/page.tsx | Added renewal display with date and amount; improved site limit display to support multiple plans |
| components/settings/OrganizationSettings.tsx | Fixed React crash by moving hooks above early return; added multi-plan support, past-due banner, resume subscription, invoice preview with error handling |
| components/PricingSection.tsx | Enhanced accessibility with ARIA attributes and focus states; updated Enterprise contact to mailto link; improved design consistency |
| lib/api/billing.ts | Added types for invoice preview, tax IDs, and next invoice fields; added resumeSubscription and previewInvoice functions |
| lib/plans.ts | Added Team and Business plan support; added getSitesLimitForPlan helper function |
Sequence Diagram
sequenceDiagram
participant User
participant UI as OrganizationSettings
participant API as billing.ts
participant Backend as Billing API
User->>UI: Opens Change Plan modal
UI->>UI: Set changePlanId, tier, interval
UI->>API: previewInvoice({ plan_id, interval, limit })
API->>Backend: POST /api/billing/preview-invoice
Backend-->>API: { amount_due, currency, period_end }
API-->>UI: PreviewInvoiceResult
UI->>UI: Display prorated preview
User->>UI: Clicks "Update plan"
UI->>API: changePlan({ plan_id, interval, limit })
API->>Backend: POST /api/billing/change-plan
Backend-->>API: { ok: true }
API-->>UI: Success
UI->>UI: Reload subscription data
UI->>User: Show success toast
Note over User,Backend: Resume subscription flow
User->>UI: Clicks "Keep my subscription"
UI->>API: resumeSubscription()
API->>Backend: POST /api/billing/resume
Backend-->>API: { ok: true }
API-->>UI: Success
UI->>User: Show success toast
Last reviewed commit: b8cb7e1
… changes, and fixes related to billing and subscription management
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.
Work Item
PULSE-57
Summary
Changes
next_invoice_*fields and active subscription existhasActiveSubscriptionandpreviewInvoiceuseEffect above early return to fix React #310; focus states on billing linksaria-label/aria-valuetext/focus; billing togglerole/aria-checked/focus; Enterprise "Contact us" asmailto:business@ciphera.net?subject=Enterprise%20Plan%20InquirypreviewInvoiceandSubscriptionDetailstypes fornext_invoice_*fieldsTest Plan