Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.
TypeScript acmeagentsai-agentscertificate-managementdevsecopsenvironment-variableskubernetesopen-sourcepampkipostgresprivate-caprivileged-access-managementsecret-managementsecret-managersecretssecrets-managementsecuritysecurity-toolsvault
feat: addressed feedback from maidul and greppy and cody
=cee4dc3ff613
diff --git a/frontend/src/components/license/UpgradePlanModal/UpgradePlanModal.tsx b/frontend/src/components/license/UpgradePlanModal/UpgradePlanModal.tsxindex 40efa29681..464bb34b5b 100644--- a/frontend/src/components/license/UpgradePlanModal/UpgradePlanModal.tsx+++ b/frontend/src/components/license/UpgradePlanModal/UpgradePlanModal.tsx@@ -1,3 +1,4 @@+import { Link } from "@tanstack/react-router";import { SparklesIcon } from "lucide-react";import {@@ -10,79 +11,22 @@ import {DialogTitle,Separator} from "@app/components/v3";-import { INFISICAL_SCHEDULE_DEMO_LINK } from "@app/const/links";-import { useOrganization, useSubscription } from "@app/context";+import { useOrganization } from "@app/context";import { useScopeVariant } from "@app/hooks";-import { useGetOrgTrialUrl } from "@app/hooks/api";type Props = {isOpen?: boolean;onOpenChange?: (isOpen: boolean) => void;text: string;+ // akhilmhdh: We will come back to this late. Otherwise would need to change in a lot of places.+ // eslint-disable-next-lineisEnterpriseFeature?: boolean;};-export const UpgradePlanModal = ({- text,- isOpen,- onOpenChange,- isEnterpriseFeature = false-}: Props): JSX.Element => {- const { subscription } = useSubscription();+export const UpgradePlanModal = ({ text, isOpen, onOpenChange }: Props): JSX.Element => {const { currentOrg } = useOrganization();- const { mutateAsync, isPending } = useGetOrgTrialUrl();const scopeVariant = useScopeVariant();- const getLink = () => {- // self-hosting- if (!subscription || subscription.slug === null) {- return INFISICAL_SCHEDULE_DEMO_LINK;- }-- // Infisical cloud- if (isEnterpriseFeature) {- return "https://infisical.com/talk-to-us";- }-- const billingUri = `/organizations/${currentOrg?.rootOrgId ?? currentOrg?.id}/billing`;- return billingUri;- };-- const link = getLink();-- const handleUpgradeBtnClick = async () => {- try {- if (!subscription || !currentOrg) return;-- if (!subscription.has_used_trial && !isEnterpriseFeature) {- // direct user to start pro trial-- const url = await mutateAsync({- orgId: currentOrg.id,- success_url: window.location.href- });-- window.location.href = url;- } else {- // direct user to upgrade their plan- window.location.href = link;- }- } catch (err) {- console.error(err);- }- };- const getUpgradePlanLabel = () => {- if (subscription) {- if (isEnterpriseFeature) {- return "Talk to Us";- }- if (!subscription.has_used_trial) {- return "Start Pro Free Trial";- }- }- return "Upgrade Plan";- };-return (<Dialog open={isOpen} onOpenChange={onOpenChange}>{/* z-[70] keeps this above legacy v2 modals (z-[60]) that open it, e.g. RoleModal */}@@ -103,14 +47,9 @@ export const UpgradePlanModal = ({<Button variant="ghost" onClick={() => onOpenChange?.(false)}>Cancel</Button>- <Button- variant={scopeVariant}- isPending={isPending}- isDisabled={isPending}- onClick={handleUpgradeBtnClick}- >- {getUpgradePlanLabel()}- </Button>+ <Link to="/organizations/$orgId/billing" params={{ orgId: currentOrg.id }}>+ <Button variant={scopeVariant}>Upgrade Plan</Button>+ </Link></DialogFooter></DialogContent></Dialog>diff --git a/frontend/src/pages/organization/BillingV2Page/components/ActivateView.tsx b/frontend/src/pages/organization/BillingV2Page/components/ActivateView.tsxindex 43c57cdec2..7bc2cbba58 100644--- a/frontend/src/pages/organization/BillingV2Page/components/ActivateView.tsx+++ b/frontend/src/pages/organization/BillingV2Page/components/ActivateView.tsx@@ -290,11 +290,9 @@ export const ActivateView = ({className="flex items-center justify-between gap-4 rounded-lg border border-border bg-card p-4"><div className="min-w-0">- <div className="text-sm font-medium text-foreground">- {dim.label} · committed for the year- </div>+ <div className="text-sm font-medium text-foreground">{dim.label}</div><div className="mt-0.5 text-xs text-muted">- {fmtMoney(dim.annual / 12, 2)} / {dim.noun} / mo · billed annually+ {fmtMoney(dim.annual / 12, 2)} / {dim.noun} / month · billed annually</div></div><Stepper@@ -337,7 +335,7 @@ export const ActivateView = ({valueClassName="text-base"/><CostSummaryRow- label={cadence === "annual" ? "Annual commitment" : "Monthly total"}+ label={cadence === "annual" ? "New yearly total" : "New monthly total"}note={recurringNote}value={`${fmtMoney(recurring)} / ${period}`}isCalculating={isCalculating}diff --git a/frontend/src/pages/organization/BillingV2Page/components/CommitmentTerms.tsx b/frontend/src/pages/organization/BillingV2Page/components/CommitmentTerms.tsxindex 7f68a7b4e3..07021813d6 100644--- a/frontend/src/pages/organization/BillingV2Page/components/CommitmentTerms.tsx+++ b/frontend/src/pages/organization/BillingV2Page/components/CommitmentTerms.tsx@@ -9,15 +9,17 @@ type Props = {// commitment is paid upfront, non-cancellable, and cannot be reduced until renewal, so Confirm stays// locked until the customer checks this.export const CommitmentTerms = ({ acknowledged, onAcknowledgedChange }: Props) => (- <div className="flex items-start gap-2.5">- <Checkbox- id="commitment-ack"- isChecked={acknowledged}- onCheckedChange={(value) => onAcknowledgedChange(value === true)}- />- <span className="text-xs text-muted">- I agree to a 12-month term, billed today and non-refundable. The plan can be increased at any- time; reductions take effect at renewal.- </span>+ <div>+ <div className="flex items-start gap-2.5">+ <Checkbox+ id="commitment-ack"+ isChecked={acknowledged}+ onCheckedChange={(value) => onAcknowledgedChange(value === true)}+ />+ <span className="text-xs text-muted">+ Click here to confirm your purchase and agree to be invoiced as shown above, prorated+ through your current billing cycle, per your Infisical agreement.+ </span>+ </div></div>);diff --git a/frontend/src/pages/organization/BillingV2Page/components/Overview.tsx b/frontend/src/pages/organization/BillingV2Page/components/Overview.tsxindex 46268f5d6e..fbf6b285c9 100644--- a/frontend/src/pages/organization/BillingV2Page/components/Overview.tsx+++ b/frontend/src/pages/organization/BillingV2Page/components/Overview.tsx@@ -81,10 +81,10 @@ export const Overview = ({!selfServe && !isManaged ? (<Alert variant="info"><TriangleAlert />- <AlertTitle>Billing is managed by our team</AlertTitle>+ <AlertTitle>Managed Billing</AlertTitle><AlertDescription>- Your organization is on a custom agreement, so self-serve changes are disabled. Contact- sales to adjust products, commitments, or your subscription.+ Contact your Infisical account manager to adjust products, commitments, or your+ subscription.</AlertDescription></Alert>) : null;diff --git a/frontend/src/pages/organization/BillingV2Page/components/ProductSheet.tsx b/frontend/src/pages/organization/BillingV2Page/components/ProductSheet.tsxindex c98a6cfc8a..e7c284c781 100644--- a/frontend/src/pages/organization/BillingV2Page/components/ProductSheet.tsx+++ b/frontend/src/pages/organization/BillingV2Page/components/ProductSheet.tsx@@ -1,13 +1,5 @@import { useState } from "react";-import {- ArrowRight,- CalendarX2Icon,- Check,- EditIcon,- Info,- PlusIcon,- Sparkles-} from "lucide-react";+import { ArrowRight, CalendarX2Icon, Check, EditIcon, Info, Sparkles } from "lucide-react";import { createNotification } from "@app/components/notifications";import {@@ -272,7 +264,6 @@ const PlanCard = ({isDisabled={!selfServe}onClick={() => onActivate(plan.tier)}>- <Sparkles />Start a free trial</Button>) : (@@ -283,7 +274,6 @@ const PlanCard = ({isDisabled={!selfServe}onClick={() => onActivate(plan.tier)}>- <PlusIcon />Activate</Button>);@@ -528,8 +518,15 @@ export const ProductSheet = ({});// Card-first: awaiting_card means no card is on file and the trial is NOT granted yet. Send the// customer to the card-setup checkout; completing it grants the trial via webhook.- if (result.outcome === "awaiting_card" && result.cardSetupUrl) {- window.location.href = result.cardSetupUrl;+ if (result.outcome === "awaiting_card") {+ if (result.cardSetupUrl) {+ window.location.href = result.cardSetupUrl;+ } else {+ createNotification({+ type: "error",+ text: "Failed to complete trial setup. Missing payment details. Please try again!"+ });+ }return;}// trial_started: a card is on file and the trial is active now.@@ -627,10 +624,10 @@ export const ProductSheet = ({{!selfServe && (<Alert variant="info"><Info />- <AlertTitle>Billing is managed by our team</AlertTitle>+ <AlertTitle>Managed Billing</AlertTitle><AlertDescription>- Your plan is on a custom agreement, so self-serve changes are disabled.- Contact sales to adjust products, commitments, or your subscription.+ Contact your Infisical account manager to adjust products, commitments, or+ your subscription.</AlertDescription></Alert>)}diff --git a/frontend/src/pages/organization/BillingV2Page/components/cards/ProductsCard.tsx b/frontend/src/pages/organization/BillingV2Page/components/cards/ProductsCard.tsxindex b78e7545d1..83c8dde992 100644--- a/frontend/src/pages/organization/BillingV2Page/components/cards/ProductsCard.tsx+++ b/frontend/src/pages/organization/BillingV2Page/components/cards/ProductsCard.tsx@@ -1,5 +1,5 @@import { CSSProperties, ReactNode } from "react";-import { ArrowBigUpDashIcon, DollarSign, Package, RefreshCw, Sparkles } from "lucide-react";+import { DollarSign, Package, RefreshCw } from "lucide-react";import { createNotification } from "@app/components/notifications";import {@@ -227,7 +227,6 @@ const AvailableProductTile = ({style={{ "--product-color": prod.color } as CSSProperties}onClick={() => onManage(prod.id)}>- {offersTrial ? <Sparkles /> : <ArrowBigUpDashIcon />}{offersTrial ? "Start a free trial" : "Activate"}</Button>);diff --git a/frontend/src/pages/secret-manager/OverviewPage/OverviewPage.tsx b/frontend/src/pages/secret-manager/OverviewPage/OverviewPage.tsxindex 3918919bf9..19cd2ae306 100644--- a/frontend/src/pages/secret-manager/OverviewPage/OverviewPage.tsx+++ b/frontend/src/pages/secret-manager/OverviewPage/OverviewPage.tsx@@ -2692,7 +2692,7 @@ const OverviewPageContent = () => {}handlePopUpOpen("upgradePlan", {isEnterpriseFeature: true,- text: "Adding dynamic secrets can be unlocked if you upgrade to Infisical Enterprise plan."+ text: "Upgrade to the Infisical Secret Management advanced plan to unlock dynamic secrets."});}}onAddSecretRotation={() => {