Skip to content

feat(billing): Add plan management to settings - #15

Merged
nfebe merged 1 commit into
mainfrom
feat/billing-settings-tab
Oct 23, 2026
Merged

nfebe merged 1 commit into
mainfrom
feat/billing-settings-tab

Conversation

@nfebe

@nfebe nfebe commented Oct 23, 2026

Copy link
Copy Markdown
Contributor

Move plan management into Settings while preserving checkout and portal returns.

@sourceant

sourceant Bot commented Oct 23, 2026

Copy link
Copy Markdown

Code Review Summary

The standalone billing page is replaced by a Plan and billing tab rendered by a new settings component, with /billing redirecting into it while preserving query parameters so checkout and portal returns still land. The tab adds plan status chips, a percentage usage meter, plan-derived region options, dynamic trial copy, and dismissable checkout notices. Backend integration metadata now contributes a settings tab instead of a sidebar entry.

🚀 Key Improvements

  • Billing is reachable inside Settings without losing checkout/portal return state via redirect.
  • Region and trial copy derive from the plans API instead of hardcoded values.
  • Plan status, limits and usage are covered by new component and logic tests.

💡 Minor Suggestions

  • loadError is only rendered when status is null, so a failed refresh (the notice's Refresh status button) sets loadError but shows the user nothing while stale data stays on screen. Surface it through the existing error notice when data is already loaded.

@sourceant sourceant Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Review complete. See the overview comment for a summary.

status.value = current.data;
pricing.value = plans.data;
region.value = defaultRegion(plans.data, region.value);
} catch (e) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

loadError is only rendered when status is null, so a failed refresh (the notice's Refresh status button) sets loadError but shows the user nothing while stale data stays on screen. Surface it through the existing error notice when data is already loaded.

Suggested change
} catch (e) {
} catch (e) {
loadError.value = extractApiErrors(e);
if (status.value) actionError.value = loadError.value;
} finally {

@nfebe
nfebe merged commit 91f774a into main Oct 23, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant