Skip to content

Comments

feat(QOV-1600): use backend billing_deployment_restriction for cluste…#2402

Merged
RemiBonnet merged 4 commits intostagingfrom
feat/QOV-1600-billing-deployment-restriction-frontend
Feb 19, 2026
Merged

feat(QOV-1600): use backend billing_deployment_restriction for cluste…#2402
RemiBonnet merged 4 commits intostagingfrom
feat/QOV-1600-billing-deployment-restriction-frontend

Conversation

@Guimove
Copy link
Contributor

@Guimove Guimove commented Feb 18, 2026

Replace client-side heuristic (trial days + credit card check) with the
backend-provided billing_deployment_restriction field from the organization API.

  • Hook: restriction driven by billing_deployment_restriction != null
  • FreeTrialBanner: shows for NO_CREDIT_CARD (trial message) and for
    other restrictions (generic deployment blocked message, red banner)
  • Cluster creation page: NO_CREDIT_CARD shows "add credit card" callout
    with modal, other restrictions show a generic blocked callout without
    credit card action

Summary

Issue:

Screenshots / Recordings

Testing

  • Changes tested locally in the relevant Console's pages and Storybooks
  • yarn test or yarn test -u (if you need to regenerate snapshots)
  • yarn format
  • yarn lint

PR Checklist

  • I followed naming, styling, and TypeScript rules (see .cursor/rules)
  • I performed a self-review (diff inspected, dead code removed)
  • I titled the PR using Conventional Commits with a scope when possible (e.g. feat(service): add new Terraform service) - required for semantic-release
  • I only kept necessary comments, written in English (watch for useless AI comments)
  • I involved a designer to validate UI changes if I am not a designer
  • I covered new business logic with tests (unit)
  • I confirmed CI is green (Codecov red can be accepted)
  • I reviewed and executed locally any AI-assisted code

@Guimove Guimove force-pushed the feat/QOV-1600-billing-deployment-restriction-frontend branch 3 times, most recently from 26fe6e1 to aa5725b Compare February 18, 2026 13:48
@codecov
Copy link

codecov bot commented Feb 18, 2026

Codecov Report

❌ Patch coverage is 6.89655% with 27 lines in your changes missing coverage. Please review.
✅ Project coverage is 47.25%. Comparing base (34f7731) to head (c2ddc65).
⚠️ Report is 1 commits behind head on staging.

Files with missing lines Patch % Lines
...re/src/lib/free-trial-banner/free-trial-banner.tsx 0.00% 9 Missing ⚠️
...on-restriction/use-cluster-creation-restriction.ts 0.00% 7 Missing ⚠️
...ling-summary/page-organization-billing-summary.tsx 12.50% 6 Missing and 1 partial ⚠️
.../lib/feature/page-new-feature/page-new-feature.tsx 25.00% 1 Missing and 2 partials ⚠️
...b/hooks/use-add-credit-card/use-add-credit-card.ts 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff            @@
##           staging    #2402    +/-   ##
=========================================
  Coverage    47.24%   47.25%            
=========================================
  Files         1287     1271    -16     
  Lines        24049    23542   -507     
  Branches      7109     6947   -162     
=========================================
- Hits         11363    11124   -239     
+ Misses       10517    10295   -222     
+ Partials      2169     2123    -46     
Flag Coverage Δ
unittests 47.25% <6.89%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Guimove Guimove force-pushed the feat/QOV-1600-billing-deployment-restriction-frontend branch from aa5725b to 926029b Compare February 18, 2026 13:53
…r creation blocking

Replace client-side heuristic (trial days + credit card check) with the
backend-provided billing_deployment_restriction field from the organization API.

- Hook: restriction driven by billing_deployment_restriction != null
- FreeTrialBanner: shows for NO_CREDIT_CARD (trial message) and for
  other restrictions (generic deployment blocked message, red banner)
- Cluster creation page: NO_CREDIT_CARD shows "add credit card" callout
  with modal, other restrictions show a generic blocked callout without
  credit card action
The dxAuth client-side bypass (PR #2396) was a temporary workaround before
the backend billing_deployment_restriction solution. Now that restrictions
are driven by the backend, the frontend no longer needs to exempt dxAuth users.
The SDK now includes the billing_deployment_restriction field on
OrganizationResponse, so the manual type cast is no longer needed.
@RemiBonnet RemiBonnet force-pushed the feat/QOV-1600-billing-deployment-restriction-frontend branch from 585da14 to b546542 Compare February 19, 2026 10:27
@RemiBonnet RemiBonnet self-requested a review February 19, 2026 15:22
@RemiBonnet RemiBonnet merged commit 827f1da into staging Feb 19, 2026
10 checks passed
@RemiBonnet RemiBonnet deleted the feat/QOV-1600-billing-deployment-restriction-frontend branch February 19, 2026 16:00
@RemiBonnet
Copy link
Member

🎉 This PR is included in version 1.289.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants