The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
copy and query invalidation
Kevin Grüneberg7d7d383a108b
diff --git a/studio/components/interfaces/BillingV2/Subscription/AddOns/ComputeInstanceSidePanel.tsx b/studio/components/interfaces/BillingV2/Subscription/AddOns/ComputeInstanceSidePanel.tsxindex 63a533e081d..1b84fef3a93 100644--- a/studio/components/interfaces/BillingV2/Subscription/AddOns/ComputeInstanceSidePanel.tsx+++ b/studio/components/interfaces/BillingV2/Subscription/AddOns/ComputeInstanceSidePanel.tsx@@ -191,7 +191,7 @@ const ComputeInstanceSidePanel = () => {</Button>}>- Upgrade your project's plan to change the compute size of your project+ Upgrade your plan to change the compute size of your project</Alert>)}<Radio.Groupdiff --git a/studio/components/interfaces/BillingV2/Subscription/AddOns/CustomDomainSidePanel.tsx b/studio/components/interfaces/BillingV2/Subscription/AddOns/CustomDomainSidePanel.tsxindex 714d61fa9b6..c1b1323a544 100644--- a/studio/components/interfaces/BillingV2/Subscription/AddOns/CustomDomainSidePanel.tsx+++ b/studio/components/interfaces/BillingV2/Subscription/AddOns/CustomDomainSidePanel.tsx@@ -198,7 +198,7 @@ const CustomDomainSidePanel = () => {</Button>}>- Upgrade your project's plan to add a custom domain to your project+ Upgrade your plan to add a custom domain to your project</Alert>)}</div>diff --git a/studio/components/interfaces/BillingV2/Subscription/AddOns/PITRSidePanel.tsx b/studio/components/interfaces/BillingV2/Subscription/AddOns/PITRSidePanel.tsxindex cf11037505e..aec437e700b 100644--- a/studio/components/interfaces/BillingV2/Subscription/AddOns/PITRSidePanel.tsx+++ b/studio/components/interfaces/BillingV2/Subscription/AddOns/PITRSidePanel.tsx@@ -186,7 +186,7 @@ const PITRSidePanel = () => {</Button>}>- Upgrade your project's plan to change the compute size of your project+ Upgrade your plan to change the compute size of your project</Alert>) : subscriptionCompute === undefined ? (<Alertdiff --git a/studio/components/interfaces/BillingV2/Subscription/CostControl/CostControl.tsx b/studio/components/interfaces/BillingV2/Subscription/CostControl/CostControl.tsxindex 87be0ada711..9d00bf180c6 100644--- a/studio/components/interfaces/BillingV2/Subscription/CostControl/CostControl.tsx+++ b/studio/components/interfaces/BillingV2/Subscription/CostControl/CostControl.tsx@@ -32,7 +32,7 @@ const CostControl = ({}: CostControlProps) => {<div className="sticky top-16"><div className="space-y-6"><div>- <p className="text-base">Cost control</p>+ <p className="text-base">Cost Control</p><p className="text-sm text-scale-1000">Control whether to usage beyond your plans included quota</p>@@ -70,8 +70,13 @@ const CostControl = ({}: CostControlProps) => {} plan`}>{currentPlan?.name || ''} plan requires you to have spend cap off at all times. Your- project will never become unresponsive. Only when your included usage is exceeded- will you be charged for any additional usage+ project will never become unresponsive. Only when your{' '}+ <Link href="#breakdown">+ <a className="text-sm text-green-900 transition hover:text-green-1000">+ included usage+ </a>+ </Link>{' '}+ is exceeded will you be charged for any additional usage.</Alert>) : (<p className="text-sm text-scale-1000">diff --git a/studio/components/interfaces/BillingV2/Subscription/CostControl/SpendCapSidePanel.tsx b/studio/components/interfaces/BillingV2/Subscription/CostControl/SpendCapSidePanel.tsxindex bf5069a4e5e..b7bf318d680 100644--- a/studio/components/interfaces/BillingV2/Subscription/CostControl/SpendCapSidePanel.tsx+++ b/studio/components/interfaces/BillingV2/Subscription/CostControl/SpendCapSidePanel.tsx@@ -170,7 +170,9 @@ const SpendCapSidePanel = () => {</Table.td><Table.td>{costs.pricingStrategy === 'UNIT' ? (- <p className="text-xs">${costs.pricingOptions.perUnitPrice} per {item.unitName}</p>+ <p className="text-xs">+ ${costs.pricingOptions.perUnitPrice} per {item.unitName}+ </p>) : costs.pricingStrategy === 'PACKAGE' ? (<p className="text-xs">${costs.pricingOptions.packagePrice} per{' '}@@ -199,7 +201,7 @@ const SpendCapSidePanel = () => {</Button>}>- Upgrade your project's plan to disable the spend cap+ Upgrade your plan to disable the spend cap</Alert>)}diff --git a/studio/components/interfaces/BillingV2/Subscription/Subscription.constants.ts b/studio/components/interfaces/BillingV2/Subscription/Subscription.constants.tsindex e1284abb6ad..6575d3b3ca6 100644--- a/studio/components/interfaces/BillingV2/Subscription/Subscription.constants.ts+++ b/studio/components/interfaces/BillingV2/Subscription/Subscription.constants.ts@@ -86,7 +86,7 @@ export const BILLING_BREAKDOWN_METRICS = [},{key: 'func_invocations',- name: 'Edge function invocations',+ name: 'Edge Function invocations',units: 'absolute',anchor: 'funcInvocations',metric: 'FUNCTION_INVOCATIONS',@@ -95,7 +95,7 @@ export const BILLING_BREAKDOWN_METRICS = [},{key: 'func_count',- name: 'Edge functions',+ name: 'Edge Functions',units: 'absolute',anchor: 'funcCount',metric: 'FUNCTION_COUNT',diff --git a/studio/components/interfaces/BillingV2/Subscription/Tier/SubscriptionTier.tsx b/studio/components/interfaces/BillingV2/Subscription/Tier/SubscriptionTier.tsxindex ba216a5da01..1d1b2102dc0 100644--- a/studio/components/interfaces/BillingV2/Subscription/Tier/SubscriptionTier.tsx+++ b/studio/components/interfaces/BillingV2/Subscription/Tier/SubscriptionTier.tsx@@ -110,7 +110,7 @@ const SubscriptionTier = ({}: SubscriptionTierProps) => {</div>,]}>- Please contact us if you'd like to change your project's plan+ Please contact us if you'd like to change your plan.</Alert>))}{!subscription?.usage_billing_enabled && (@@ -129,7 +129,7 @@ const SubscriptionTier = ({}: SubscriptionTierProps) => {</span>) : (<span>- You can change the Cost control settings if you plan on exceeding the included+ You can change the Cost Control settings if you plan on exceeding the includedusage quotas.</span>)}diff --git a/studio/data/subscriptions/project-addon-update-mutation.ts b/studio/data/subscriptions/project-addon-update-mutation.tsindex 3a7c4e284a3..e58f12c79c5 100644--- a/studio/data/subscriptions/project-addon-update-mutation.ts+++ b/studio/data/subscriptions/project-addon-update-mutation.ts@@ -47,9 +47,11 @@ export const useProjectAddonUpdateMutation = ({{async onSuccess(data, variables, context) {const { projectRef } = variables- // [Joshen] Only invalidate addons, not subscriptions, as AddOn section in- // subscription page is using AddOn react query- await queryClient.invalidateQueries(subscriptionKeys.addons(projectRef))+ await Promise.all([+ queryClient.invalidateQueries(subscriptionKeys.subscriptionV2(projectRef)),+ queryClient.invalidateQueries(subscriptionKeys.subscription(projectRef)),+ queryClient.invalidateQueries(subscriptionKeys.addons(projectRef)),+ ])await onSuccess?.(data, variables, context)},...options,diff --git a/studio/data/subscriptions/project-subscription-update-mutation.ts b/studio/data/subscriptions/project-subscription-update-mutation.tsindex f9761fc94ee..0f30dae670f 100644--- a/studio/data/subscriptions/project-subscription-update-mutation.ts+++ b/studio/data/subscriptions/project-subscription-update-mutation.ts@@ -3,7 +3,12 @@ import { put } from 'lib/common/fetch'import { API_URL } from 'lib/constants'import { subscriptionKeys } from './keys'-export type SubscriptionTier = 'tier_free' | 'tier_pro' | 'tier_payg' | 'tier_team' | 'tier_enterprise'+export type SubscriptionTier =+ | 'tier_free'+ | 'tier_pro'+ | 'tier_payg'+ | 'tier_team'+ | 'tier_enterprise'export type ProjectSubscriptionUpdateVariables = {projectRef: string@@ -51,7 +56,11 @@ export const useProjectSubscriptionUpdateMutation = ({{async onSuccess(data, variables, context) {const { projectRef } = variables- await queryClient.invalidateQueries(subscriptionKeys.subscriptionV2(projectRef))+ await Promise.all([+ queryClient.invalidateQueries(subscriptionKeys.subscriptionV2(projectRef)),+ queryClient.invalidateQueries(subscriptionKeys.subscription(projectRef)),+ queryClient.invalidateQueries(subscriptionKeys.addons(projectRef)),+ ])await onSuccess?.(data, variables, context)},...options,