Real-time monitoring dashboard for Proxmox VE, PBS, Docker, Kubernetes, TrueNAS and vSphere. Self-hosted, with alerts for failed backups, full disks, unhealthy containers and offline nodes.
Go aialertsdashboarddockerdocker-monitoringgohomelabinfrastructure-monitoringkubernetesmonitoringmspproxmoxproxmox-backup-serverproxmox-mail-gatewayproxmox-veself-hostedtruenastypescriptvspherewebhooks
Restore self-hosted plan compare prompt
rcourtman89fdf2108c91
diff --git a/docs/release-control/v6/internal/subsystems/cloud-paid.md b/docs/release-control/v6/internal/subsystems/cloud-paid.mdindex 3c28b11058..444b227189 100644--- a/docs/release-control/v6/internal/subsystems/cloud-paid.md+++ b/docs/release-control/v6/internal/subsystems/cloud-paid.md@@ -194,7 +194,10 @@ Community limit enforcement.in-product CTA navigation. The current canonical arrivals are`/settings/system/billing/usage?details=counting-rules` for explanation and`/settings/system/billing/plan?intent=self_hosted_plan` for plan-selection- intent.+ intent. That plan-selection arrival must reopen an explicit+ `Compare self-hosted plans` prompt inside Pulse Pro billing so operators can+ review the self-hosted upgrade path without falling back to the legacy+ usage surface or a dead-end placeholder CTA.24. Keep public-demo dashboard bootstrap route-owned on the adjacentcommercial/runtime boundary. `frontend-modern/src/useAppRuntimeState.ts`may prewarm shared infrastructure summary caches for non-dashboard routes,@@ -746,6 +749,11 @@ completed checkout, and return the operator to the canonical billing planroute with an explicit owned purchase arrival state (`purchase=activated`,`purchase=expired`, `purchase=failed`, or `purchase=unavailable`) whethercheckout completed in a secondary tab or in the current-tab fallback path.+When billing preserves `intent=self_hosted_plan` across that return, the+runtime may keep the operator on the compare-plans prompt, but any visible+`Compare plans` action must still route through owned+`GET /auth/license-purchase-start?feature=self_hosted_plan` instead of+constructing a direct Pulse Account URL in the browser.That destination split is canonical commercial truth, but navigation semanticsare not owned here. `frontend-modern/src/utils/pricingHandoff.ts` and`frontend-modern/src/stores/license.ts` decide which href each commercialdiff --git a/docs/release-control/v6/internal/subsystems/frontend-primitives.md b/docs/release-control/v6/internal/subsystems/frontend-primitives.mdindex 82a7e1a199..bfd808bd80 100644--- a/docs/release-control/v6/internal/subsystems/frontend-primitives.md+++ b/docs/release-control/v6/internal/subsystems/frontend-primitives.md@@ -322,7 +322,11 @@ work extends shared components instead of creating new local variants.the shared banner model must consume the cloud-paid monitored-systempresentation helper and suppress usage summaries, upgrade pressure, andupgrade-impression telemetry rather than rendering stale `current/limit`- counts or paid-plan CTAs from banner-local availability checks.+ counts or paid-plan CTAs from banner-local availability checks. When the+ banner does need an upgrade destination, it must scope the operator into+ the cloud-paid plan-selection intent (`intent=self_hosted_plan`) rather+ than reintroducing browser symbols or CTA copy that frame the flow as+ monitored-system-cap expansion.16. Keep assistant availability bootstrap on the shared app-shell boundary.`frontend-modern/src/useAppRuntimeState.ts`,`frontend-modern/src/App.tsx`,diff --git a/frontend-modern/src/components/Settings/ProLicensePanel.tsx b/frontend-modern/src/components/Settings/ProLicensePanel.tsxindex d14920a639..34ac0a369b 100644--- a/frontend-modern/src/components/Settings/ProLicensePanel.tsx+++ b/frontend-modern/src/components/Settings/ProLicensePanel.tsx@@ -112,6 +112,7 @@ const ProLicensePanelContent: Component = () => {monitoredSystemCapacitySection={state.monitoredSystemCapacitySection()}monitoredSystemContinuityNotice={state.monitoredSystemContinuityNotice()}onReload={() => void state.loadPanelData()}+ planSelectionPrompt={state.planSelectionPrompt()}purchaseActivationAction={state.purchaseActivationAction()}purchaseActivationNotice={state.purchaseActivationNotice()}statusPresentation={state.statusPresentation()}diff --git a/frontend-modern/src/components/Settings/ProLicensePlanSection.tsx b/frontend-modern/src/components/Settings/ProLicensePlanSection.tsxindex 880ffd1b66..fad7aadcbd 100644--- a/frontend-modern/src/components/Settings/ProLicensePlanSection.tsx+++ b/frontend-modern/src/components/Settings/ProLicensePlanSection.tsx@@ -17,6 +17,11 @@ interface Notice {tone: string;}+interface ActionNotice extends Notice {+ actionLabel: string;+ actionDestination: UpgradeDestination;+}+interface MonitoredSystemCapacitySection {stats: Array<{ label: string; value: string }>;statusMessage: string;@@ -47,6 +52,7 @@ interface ProLicensePlanSectionProps {monitoredSystemCapacitySection: MonitoredSystemCapacitySection | null;monitoredSystemContinuityNotice: Notice | null;onReload: () => void;+ planSelectionPrompt: ActionNotice | null;purchaseActivationNotice: Notice | null;purchaseActivationAction: {label: string;@@ -90,6 +96,20 @@ export const ProLicensePlanSection: Component<ProLicensePlanSectionProps> = (pro</div>)}</Show>+ <Show when={props.planSelectionPrompt}>+ {(prompt) => (+ <div class={`mb-4 rounded-md border p-3 text-sm ${prompt().tone}`}>+ <p class="font-medium">{prompt().title}</p>+ <p class="mt-1 text-xs opacity-90">{prompt().body}</p>+ <UpgradeLink+ class="inline-flex items-center gap-1 mt-3 min-h-10 sm:min-h-9 rounded-md border border-current/20 px-3 py-2 text-xs font-medium hover:bg-black/5 dark:hover:bg-white/5"+ destination={prompt().actionDestination}+ >+ {prompt().actionLabel}+ </UpgradeLink>+ </div>+ )}+ </Show><Show when={props.trialActivationNotice}>{(notice) => (<div class={`mb-4 rounded-md border p-3 text-sm ${notice().tone}`}>diff --git a/frontend-modern/src/components/Settings/__tests__/ProLicensePanel.test.tsx b/frontend-modern/src/components/Settings/__tests__/ProLicensePanel.test.tsxindex d3e94e2581..42fb98d5a8 100644--- a/frontend-modern/src/components/Settings/__tests__/ProLicensePanel.test.tsx+++ b/frontend-modern/src/components/Settings/__tests__/ProLicensePanel.test.tsx@@ -13,7 +13,7 @@ import {getPublicPricingUrl,getSelfHostedPurchaseStartUrl,SELF_HOSTED_PRO_BILLING_PLAN_HREF,- SELF_HOSTED_PRO_BILLING_MONITORED_SYSTEM_INTENT,+ SELF_HOSTED_PRO_BILLING_PLAN_SELECTION_INTENT,SELF_HOSTED_PRO_BILLING_PURCHASE_ACTIVATED,SELF_HOSTED_PRO_BILLING_PURCHASE_CANCELLED,SELF_HOSTED_PRO_BILLING_PURCHASE_EXPIRED,@@ -668,7 +668,10 @@ describe('ProLicensePanel', () => {purchase: SELF_HOSTED_PRO_BILLING_PURCHASE_CANCELLED,title: 'Checkout cancelled',actionLabel: 'Compare plans',- actionHref: getSelfHostedPurchaseStartUrl(),+ actionHref: getSelfHostedPurchaseStartUrl(SELF_HOSTED_PRO_BILLING_PLAN_SELECTION_INTENT),+ redirectedHref: getSelfHostedBillingHref('plan', {+ intent: SELF_HOSTED_PRO_BILLING_PLAN_SELECTION_INTENT,+ }),},{purchase: SELF_HOSTED_PRO_BILLING_PURCHASE_EXPIRED,@@ -703,7 +706,10 @@ describe('ProLicensePanel', () => {redirectedHref = SELF_HOSTED_PRO_BILLING_PLAN_HREF,}) => {useLocationMock.mockReturnValue({- search: `?purchase=${purchase}`,+ search:+ purchase === SELF_HOSTED_PRO_BILLING_PURCHASE_CANCELLED+ ? `?purchase=${purchase}&intent=${SELF_HOSTED_PRO_BILLING_PLAN_SELECTION_INTENT}`+ : `?purchase=${purchase}`,pathname: '/settings/system/billing/plan',hash: '',});@@ -712,7 +718,8 @@ describe('ProLicensePanel', () => {expect(screen.getByText(title)).toBeInTheDocument();if (actionLabel && actionHref) {- expect(screen.getByRole('link', { name: actionLabel })).toHaveAttribute('href', actionHref);+ const actionLinks = screen.getAllByRole('link', { name: actionLabel });+ expect(actionLinks.some((link) => link.getAttribute('href') === actionHref)).toBe(true);} else {expect(screen.queryByRole('link', { name: 'Review usage' })).not.toBeInTheDocument();}@@ -725,7 +732,7 @@ describe('ProLicensePanel', () => {it('returns self-hosted plan purchases to the plan surface instead of the legacy usage tab', async () => {useLocationMock.mockReturnValue({- search: `?purchase=${SELF_HOSTED_PRO_BILLING_PURCHASE_ACTIVATED}&intent=${SELF_HOSTED_PRO_BILLING_MONITORED_SYSTEM_INTENT}`,+ search: `?purchase=${SELF_HOSTED_PRO_BILLING_PURCHASE_ACTIVATED}&intent=${SELF_HOSTED_PRO_BILLING_PLAN_SELECTION_INTENT}`,pathname: '/settings/system/billing/plan',hash: '',});@@ -749,7 +756,7 @@ describe('ProLicensePanel', () => {renderPanel();- const recoveryDisclosure = screen.getByText('Redeem existing key').closest('details');+ const recoveryDisclosure = screen.getAllByText('Redeem existing key')[0]?.closest('details');expect(recoveryDisclosure).toHaveAttribute('open');});@@ -772,11 +779,11 @@ describe('ProLicensePanel', () => {renderPanel();- expect(screen.getByRole('tab', { name: 'Usage' })).toHaveAttribute('aria-selected', 'true');- expect(- document.getElementById(SELF_HOSTED_PRO_BILLING_PLAN_SECTION_ID),- ).not.toBeInTheDocument();- expect(document.getElementById(SELF_HOSTED_PRO_BILLING_USAGE_SECTION_ID)).toBeInTheDocument();+ await waitFor(() => {+ expect(screen.getByRole('tab', { name: 'Usage' })).toHaveAttribute('aria-selected', 'true');+ expect(document.getElementById(SELF_HOSTED_PRO_BILLING_PLAN_SECTION_ID)).not.toBeInTheDocument();+ expect(document.getElementById(SELF_HOSTED_PRO_BILLING_USAGE_SECTION_ID)).toBeInTheDocument();+ });expect(screen.getByText('Monitored Systems')).toBeInTheDocument();expect(screen.getByRole('button', { name: 'Hide counting rules' })).toBeInTheDocument();});@@ -803,17 +810,25 @@ describe('ProLicensePanel', () => {});});- it('does not render a monitored-system upgrade arrival callout on the plan upgrade route', async () => {+ it('renders the self-hosted plan-selection prompt on the plan compare route', async () => {useLocationMock.mockReturnValue({- search: `?intent=${SELF_HOSTED_PRO_BILLING_MONITORED_SYSTEM_INTENT}`,+ search: `?intent=${SELF_HOSTED_PRO_BILLING_PLAN_SELECTION_INTENT}`,pathname: '/settings/system/billing/plan',hash: '',});renderPanel();- expect(screen.queryByText('Compare self-hosted plans')).not.toBeInTheDocument();- expect(screen.queryByRole('link', { name: 'Compare plans' })).not.toBeInTheDocument();+ expect(screen.getAllByText('Compare self-hosted plans').length).toBeGreaterThan(0);+ expect(screen.getByText(/Community keeps core monitoring free/i)).toBeInTheDocument();+ const compareLinks = screen.getAllByRole('link', { name: 'Compare plans' });+ expect(+ compareLinks.some(+ (link) =>+ link.getAttribute('href') ===+ getSelfHostedPurchaseStartUrl(SELF_HOSTED_PRO_BILLING_PLAN_SELECTION_INTENT),+ ),+ ).toBe(true);expect(screen.queryByRole('button', { name: 'Hide counting rules' })).not.toBeInTheDocument();expect(screen.queryByRole('button', { name: 'View counting rules' })).not.toBeInTheDocument();});@@ -968,7 +983,7 @@ describe('ProLicensePanel', () => {expect(proLicensePlanSectionSource).toContain('const trialEndedNotice = props.trialEnded ? getTrialEndedProLicenseNotice() : null;',);- expect(proLicensePlanSectionSource).not.toContain('monitoredSystemUpgradeArrivalTitle');+ expect(proLicensePlanSectionSource).toContain('planSelectionPrompt');expect(proLicensePlanSectionSource).not.toContain("resolveSelfHostedPurchaseStartDestination('self_hosted_plan')",);diff --git a/frontend-modern/src/components/Settings/selfHostedBillingPresentation.ts b/frontend-modern/src/components/Settings/selfHostedBillingPresentation.tsindex 7ded086652..c9556b4833 100644--- a/frontend-modern/src/components/Settings/selfHostedBillingPresentation.ts+++ b/frontend-modern/src/components/Settings/selfHostedBillingPresentation.ts@@ -16,9 +16,9 @@ export interface SelfHostedProBillingPresentation {hiddenStateBody: string;policyLoadingTitle: string;policyLoadingBody: string;- monitoredSystemUpgradeArrivalTitle: string;- monitoredSystemUpgradeArrivalBody: string;- monitoredSystemUpgradeArrivalActionLabel: string;+ planSelectionPromptTitle: string;+ planSelectionPromptBody: string;+ planSelectionPromptActionLabel: string;purchaseActivatedPlanActionLabel: string;purchaseCancelledActionLabel: string;purchaseExpiredActionLabel: string;@@ -55,10 +55,10 @@ export const SELF_HOSTED_PRO_BILLING_PRESENTATION: SelfHostedProBillingPresentatpolicyLoadingTitle: 'Loading settings access',policyLoadingBody:'Pulse waits for the session presentation policy before showing license, billing, or usage details.',- monitoredSystemUpgradeArrivalTitle: 'Compare self-hosted plans',- monitoredSystemUpgradeArrivalBody:+ planSelectionPromptTitle: 'Compare self-hosted plans',+ planSelectionPromptBody:'Community keeps core monitoring free. Compare Relay and Pro in Pulse Account, then return here with Pulse Pro activated automatically.',- monitoredSystemUpgradeArrivalActionLabel: 'Compare plans',+ planSelectionPromptActionLabel: 'Compare plans',purchaseActivatedPlanActionLabel: 'Review plan',purchaseCancelledActionLabel: 'Compare plans',purchaseExpiredActionLabel: 'Restart upgrade',diff --git a/frontend-modern/src/components/Settings/useProLicensePanelState.ts b/frontend-modern/src/components/Settings/useProLicensePanelState.tsindex 15e88f814a..6ffab8b74a 100644--- a/frontend-modern/src/components/Settings/useProLicensePanelState.ts+++ b/frontend-modern/src/components/Settings/useProLicensePanelState.ts@@ -32,7 +32,7 @@ import {resolveSelfHostedBillingSection,resolveSelfHostedPurchaseStartDestination,SELF_HOSTED_PRO_BILLING_COUNTING_RULES_DETAIL,- SELF_HOSTED_PRO_BILLING_MONITORED_SYSTEM_INTENT,+ SELF_HOSTED_PRO_BILLING_PLAN_SELECTION_INTENT,SELF_HOSTED_PRO_BILLING_RECOVERY_DETAIL,SELF_HOSTED_PRO_BILLING_PURCHASE_ACTIVATED,SELF_HOSTED_PRO_BILLING_PURCHASE_CANCELLED,@@ -41,10 +41,12 @@ import {SELF_HOSTED_PRO_BILLING_PURCHASE_UNAVAILABLE,SELF_HOSTED_PRO_BILLING_PLAN_DETAILS_QUERY_PARAM,SELF_HOSTED_PRO_BILLING_PLAN_HREF,+ SELF_HOSTED_PRO_BILLING_PLAN_INTENT_QUERY_PARAM,SELF_HOSTED_PRO_BILLING_PLAN_ROUTE,SELF_HOSTED_PRO_BILLING_PURCHASE_QUERY_PARAM,SELF_HOSTED_PRO_BILLING_USAGE_HREF,SELF_HOSTED_PRO_BILLING_USAGE_ROUTE,+ type SelfHostedBillingPlanIntent,type SelfHostedBillingSection,} from '@/utils/pricingHandoff';import { buildSelfHostedCommercialPlanModel } from '@/utils/commercialBillingModel';@@ -86,6 +88,8 @@ export function useProLicensePanelState() {const [startingTrial, setStartingTrial] = createSignal(false);const [trialActivationResult, setTrialActivationResult] = createSignal('');const [purchaseActivationResult, setPurchaseActivationResult] = createSignal('');+ const [purchaseActivationIntent, setPurchaseActivationIntent] =+ createSignal<SelfHostedBillingPlanIntent | null>(null);const entitlements = createMemo(() => licenseEntitlements());const subscriptionState = createMemo(() => entitlements()?.subscription_state);@@ -112,7 +116,11 @@ export function useProLicensePanelState() {}if (purchaseResult) {setPurchaseActivationResult(purchaseResult);+ setPurchaseActivationIntent(getSelfHostedBillingPlanIntent(location.search));params.delete(SELF_HOSTED_PRO_BILLING_PURCHASE_QUERY_PARAM);+ if (purchaseResult === SELF_HOSTED_PRO_BILLING_PURCHASE_ACTIVATED) {+ params.delete(SELF_HOSTED_PRO_BILLING_PLAN_INTENT_QUERY_PARAM);+ }if (purchaseResult === SELF_HOSTED_PRO_BILLING_PURCHASE_FAILED &&getSelfHostedBillingPlanDetail(location.search) !== SELF_HOSTED_PRO_BILLING_RECOVERY_DETAIL@@ -216,6 +224,29 @@ export function useProLicensePanelState() {activeSection() === 'plan' &&getSelfHostedBillingPlanDetail(location.search) === SELF_HOSTED_PRO_BILLING_RECOVERY_DETAIL,);+ const showPlanSelectionPrompt = createMemo(+ () =>+ activeSection() === 'plan' &&+ getSelfHostedBillingPlanIntent(location.search) ===+ SELF_HOSTED_PRO_BILLING_PLAN_SELECTION_INTENT,+ );+ const planSelectionPrompt = createMemo(() => {+ if (+ !showPlanSelectionPrompt() ||+ purchaseActivationResult().trim().length > 0+ ) {+ return null;+ }+ return {+ tone: 'border-sky-200 dark:border-sky-900 bg-sky-50 dark:bg-sky-950 text-sky-900 dark:text-sky-100',+ title: SELF_HOSTED_PRO_BILLING_PRESENTATION.planSelectionPromptTitle,+ body: SELF_HOSTED_PRO_BILLING_PRESENTATION.planSelectionPromptBody,+ actionLabel: SELF_HOSTED_PRO_BILLING_PRESENTATION.planSelectionPromptActionLabel,+ actionDestination: resolveSelfHostedPurchaseStartDestination(+ SELF_HOSTED_PRO_BILLING_PLAN_SELECTION_INTENT,+ ),+ };+ });const showTrialStart = createMemo(() => {const current = entitlements();@@ -363,12 +394,12 @@ export function useProLicensePanelState() {upgradeDestination:posture?.blocks_new_systems === true &&posture.reason !== 'legacy_migration_capture_pending'- ? resolveUpgradeDestination(- getSelfHostedBillingHref('plan', {- intent: SELF_HOSTED_PRO_BILLING_MONITORED_SYSTEM_INTENT,- }),- )- : null,+ ? resolveUpgradeDestination(+ getSelfHostedBillingHref('plan', {+ intent: SELF_HOSTED_PRO_BILLING_PLAN_SELECTION_INTENT,+ }),+ )+ : null,};});const continuityCapturedAt = createMemo(() => {@@ -395,10 +426,10 @@ export function useProLicensePanelState() {destination: UpgradeDestination;} | null>(() => {const purchase = purchaseActivationResult().trim().toLowerCase();- const intent = getSelfHostedBillingPlanIntent(location.search);+ const intent = purchaseActivationIntent();switch (purchase) {case SELF_HOSTED_PRO_BILLING_PURCHASE_ACTIVATED:- if (intent === SELF_HOSTED_PRO_BILLING_MONITORED_SYSTEM_INTENT) {+ if (intent === SELF_HOSTED_PRO_BILLING_PLAN_SELECTION_INTENT) {return {label: SELF_HOSTED_PRO_BILLING_PRESENTATION.purchaseActivatedPlanActionLabel,destination: resolveUpgradeDestination(SELF_HOSTED_PRO_BILLING_PLAN_HREF),@@ -557,6 +588,7 @@ export function useProLicensePanelState() {loadPanelData,loading,looksLikeLegacyLicenseKey,+ planSelectionPrompt,purchaseActivationNotice,purchaseActivationAction,setActiveSection,diff --git a/frontend-modern/src/components/shared/SharedPrimitives.guardrails.test.ts b/frontend-modern/src/components/shared/SharedPrimitives.guardrails.test.tsindex dec73b7d1f..9442086d1f 100644--- a/frontend-modern/src/components/shared/SharedPrimitives.guardrails.test.ts+++ b/frontend-modern/src/components/shared/SharedPrimitives.guardrails.test.ts@@ -644,6 +644,9 @@ describe('shared primitive guardrails', () => {expect(monitoredSystemLimitWarningBannerStateSource).toContain('SELF_HOSTED_PRO_BILLING_PLAN_SELECTION_INTENT',);+ expect(monitoredSystemLimitWarningBannerStateSource).not.toContain(+ 'SELF_HOSTED_PRO_BILLING_MONITORED_SYSTEM_INTENT',+ );expect(monitoredSystemLimitWarningBannerStateSource).toContain('viewCapacityDestination');expect(monitoredSystemLimitWarningBannerStateSource).toContain('handleUpgradeClick');expect(monitoredSystemLimitWarningBannerStateSource).not.toContain("fetch('/api/health'");diff --git a/frontend-modern/src/components/shared/__tests__/MonitoredSystemLimitWarningBanner.test.tsx b/frontend-modern/src/components/shared/__tests__/MonitoredSystemLimitWarningBanner.test.tsxindex 020fed7328..084bdc161a 100644--- a/frontend-modern/src/components/shared/__tests__/MonitoredSystemLimitWarningBanner.test.tsx+++ b/frontend-modern/src/components/shared/__tests__/MonitoredSystemLimitWarningBanner.test.tsx@@ -131,7 +131,7 @@ describe('MonitoredSystemLimitWarningBanner', () => {'scopeSelfHostedBillingDestination',);expect(monitoredSystemLimitWarningBannerStateSource).toContain(- 'SELF_HOSTED_PRO_BILLING_MONITORED_SYSTEM_INTENT',+ 'SELF_HOSTED_PRO_BILLING_PLAN_SELECTION_INTENT',);expect(monitoredSystemLimitWarningBannerStateSource).toContain('viewCapacityDestination');expect(monitoredSystemLimitWarningBannerStateSource).toContain('handleUpgradeClick');diff --git a/frontend-modern/src/components/shared/useMonitoredSystemLimitWarningBannerState.ts b/frontend-modern/src/components/shared/useMonitoredSystemLimitWarningBannerState.tsindex 7fde360443..c95be3140e 100644--- a/frontend-modern/src/components/shared/useMonitoredSystemLimitWarningBannerState.ts+++ b/frontend-modern/src/components/shared/useMonitoredSystemLimitWarningBannerState.ts@@ -12,7 +12,7 @@ import {import { resolveUpgradeDestination } from '@/utils/upgradeNavigation';import {scopeSelfHostedBillingDestination,- SELF_HOSTED_PRO_BILLING_MONITORED_SYSTEM_INTENT,+ SELF_HOSTED_PRO_BILLING_PLAN_SELECTION_INTENT,} from '@/utils/pricingHandoff';import {trackUpgradeClicked,@@ -67,7 +67,7 @@ export function useMonitoredSystemLimitWarningBannerState() {getUpgradeActionDestination(MONITORED_SYSTEM_LIMIT_KEY),'plan',{- intent: SELF_HOSTED_PRO_BILLING_MONITORED_SYSTEM_INTENT,+ intent: SELF_HOSTED_PRO_BILLING_PLAN_SELECTION_INTENT,},),);diff --git a/frontend-modern/src/utils/__tests__/licensePresentation.test.ts b/frontend-modern/src/utils/__tests__/licensePresentation.test.tsindex 0090c09452..edd36cfdae 100644--- a/frontend-modern/src/utils/__tests__/licensePresentation.test.ts+++ b/frontend-modern/src/utils/__tests__/licensePresentation.test.ts@@ -85,10 +85,10 @@ describe('licensePresentation', () => {policyLoadingTitle: 'Loading settings access',policyLoadingBody:'Pulse waits for the session presentation policy before showing license, billing, or usage details.',- monitoredSystemUpgradeArrivalTitle: 'Compare self-hosted plans',- monitoredSystemUpgradeArrivalBody:+ planSelectionPromptTitle: 'Compare self-hosted plans',+ planSelectionPromptBody:'Community keeps core monitoring free. Compare Relay and Pro in Pulse Account, then return here with Pulse Pro activated automatically.',- monitoredSystemUpgradeArrivalActionLabel: 'Compare plans',+ planSelectionPromptActionLabel: 'Compare plans',purchaseActivatedPlanActionLabel: 'Review plan',purchaseCancelledActionLabel: 'Compare plans',purchaseExpiredActionLabel: 'Restart upgrade',diff --git a/frontend-modern/src/utils/__tests__/pricingHandoff.test.ts b/frontend-modern/src/utils/__tests__/pricingHandoff.test.tsindex 1085a928f7..3ee2650e7d 100644--- a/frontend-modern/src/utils/__tests__/pricingHandoff.test.ts+++ b/frontend-modern/src/utils/__tests__/pricingHandoff.test.ts@@ -17,22 +17,22 @@ import {scopeSelfHostedBillingDestination,SELF_HOSTED_PRO_BILLING_COUNTING_RULES_DETAIL,SELF_HOSTED_PRO_BILLING_PLAN_HREF,- SELF_HOSTED_PRO_BILLING_PLAN_MONITORED_SYSTEM_UPGRADE_HREF,+ SELF_HOSTED_PRO_BILLING_PLAN_SELECTION_HREF,SELF_HOSTED_PRO_BILLING_PLAN_RECOVERY_HREF,+ SELF_HOSTED_PRO_BILLING_PLAN_SELECTION_INTENT,SELF_HOSTED_PRO_BILLING_PURCHASE_ACTIVATED,SELF_HOSTED_PRO_BILLING_PURCHASE_UNAVAILABLE,SELF_HOSTED_PRO_BILLING_RECOVERY_DETAIL,SELF_HOSTED_PRO_BILLING_ROUTE,SELF_HOSTED_PRO_BILLING_USAGE_COUNTING_RULES_HREF,SELF_HOSTED_PRO_BILLING_USAGE_HREF,- SELF_HOSTED_PRO_BILLING_MONITORED_SYSTEM_INTENT,SELF_HOSTED_PURCHASE_START_PATH,} from '@/utils/pricingHandoff';describe('pricingHandoff', () => {it('routes product-owned monitored-system pricing links to billing', () => {expect(getUpgradeFallbackDestination('max_monitored_systems')).toBe(- SELF_HOSTED_PRO_BILLING_PLAN_MONITORED_SYSTEM_UPGRADE_HREF,+ SELF_HOSTED_PRO_BILLING_PLAN_SELECTION_HREF,);});@@ -71,7 +71,7 @@ describe('pricingHandoff', () => {it('keeps internal route exceptions when handing off the legacy pricing route', () => {expect(getPricingRouteDestination('?feature=max_monitored_systems')).toBe(- SELF_HOSTED_PRO_BILLING_PLAN_MONITORED_SYSTEM_UPGRADE_HREF,+ SELF_HOSTED_PRO_BILLING_PLAN_SELECTION_HREF,);});@@ -83,18 +83,18 @@ describe('pricingHandoff', () => {).toBe(SELF_HOSTED_PRO_BILLING_USAGE_COUNTING_RULES_HREF);expect(getSelfHostedBillingHref('plan', {- intent: SELF_HOSTED_PRO_BILLING_MONITORED_SYSTEM_INTENT,+ intent: SELF_HOSTED_PRO_BILLING_PLAN_SELECTION_INTENT,purchase: SELF_HOSTED_PRO_BILLING_PURCHASE_ACTIVATED,}),).toBe(- `${SELF_HOSTED_PRO_BILLING_PLAN_MONITORED_SYSTEM_UPGRADE_HREF}&purchase=${SELF_HOSTED_PRO_BILLING_PURCHASE_ACTIVATED}`,+ `${SELF_HOSTED_PRO_BILLING_PLAN_SELECTION_HREF}&purchase=${SELF_HOSTED_PRO_BILLING_PURCHASE_ACTIVATED}`,);expect(getSelfHostedBillingHref('plan', {- intent: SELF_HOSTED_PRO_BILLING_MONITORED_SYSTEM_INTENT,+ intent: SELF_HOSTED_PRO_BILLING_PLAN_SELECTION_INTENT,detail: SELF_HOSTED_PRO_BILLING_RECOVERY_DETAIL,}),- ).toBe(`${SELF_HOSTED_PRO_BILLING_PLAN_MONITORED_SYSTEM_UPGRADE_HREF}&details=recovery`);+ ).toBe(`${SELF_HOSTED_PRO_BILLING_PLAN_SELECTION_HREF}&details=recovery`);});it('canonicalizes legacy self-hosted billing aliases to route-owned states', () => {@@ -116,10 +116,10 @@ describe('pricingHandoff', () => {getSelfHostedBillingUsageDetail('?details=' + SELF_HOSTED_PRO_BILLING_COUNTING_RULES_DETAIL),).toBe(SELF_HOSTED_PRO_BILLING_COUNTING_RULES_DETAIL);expect(- getSelfHostedBillingPlanIntent('?intent=' + SELF_HOSTED_PRO_BILLING_MONITORED_SYSTEM_INTENT),- ).toBe(SELF_HOSTED_PRO_BILLING_MONITORED_SYSTEM_INTENT);+ getSelfHostedBillingPlanIntent('?intent=' + SELF_HOSTED_PRO_BILLING_PLAN_SELECTION_INTENT),+ ).toBe(SELF_HOSTED_PRO_BILLING_PLAN_SELECTION_INTENT);expect(getSelfHostedBillingPlanIntent('?intent=max_monitored_systems')).toBe(- SELF_HOSTED_PRO_BILLING_MONITORED_SYSTEM_INTENT,+ SELF_HOSTED_PRO_BILLING_PLAN_SELECTION_INTENT,);expect(getSelfHostedBillingPlanDetail('?details=' + SELF_HOSTED_PRO_BILLING_RECOVERY_DETAIL)).toBe(SELF_HOSTED_PRO_BILLING_RECOVERY_DETAIL,@@ -151,10 +151,10 @@ describe('pricingHandoff', () => {scopeSelfHostedBillingDestination({ href: SELF_HOSTED_PRO_BILLING_PLAN_HREF, external: false },'plan',- { intent: SELF_HOSTED_PRO_BILLING_MONITORED_SYSTEM_INTENT },+ { intent: SELF_HOSTED_PRO_BILLING_PLAN_SELECTION_INTENT },),).toEqual({- href: SELF_HOSTED_PRO_BILLING_PLAN_MONITORED_SYSTEM_UPGRADE_HREF,+ href: SELF_HOSTED_PRO_BILLING_PLAN_SELECTION_HREF,external: false,});expect(diff --git a/frontend-modern/src/utils/pricingHandoff.ts b/frontend-modern/src/utils/pricingHandoff.tsindex 6e7d14bb03..11407900ce 100644--- a/frontend-modern/src/utils/pricingHandoff.ts+++ b/frontend-modern/src/utils/pricingHandoff.ts@@ -23,8 +23,8 @@ export const SELF_HOSTED_PRO_BILLING_PLAN_INTENT_QUERY_PARAM = 'intent';export const SELF_HOSTED_PRO_BILLING_PURCHASE_QUERY_PARAM = 'purchase';export const SELF_HOSTED_PRO_BILLING_COUNTING_RULES_DETAIL = 'counting-rules';export const SELF_HOSTED_PRO_BILLING_RECOVERY_DETAIL = 'recovery';-export const SELF_HOSTED_PRO_BILLING_MONITORED_SYSTEM_INTENT = 'self_hosted_plan';-const LEGACY_SELF_HOSTED_PRO_BILLING_MONITORED_SYSTEM_INTENT = 'max_monitored_systems';+export const SELF_HOSTED_PRO_BILLING_PLAN_SELECTION_INTENT = 'self_hosted_plan';+const LEGACY_SELF_HOSTED_PRO_BILLING_PLAN_SELECTION_INTENT = 'max_monitored_systems';export const SELF_HOSTED_PRO_BILLING_PURCHASE_ACTIVATED = 'activated';export const SELF_HOSTED_PRO_BILLING_PURCHASE_CANCELLED = 'cancelled';export const SELF_HOSTED_PRO_BILLING_PURCHASE_EXPIRED = 'expired';@@ -35,7 +35,7 @@ export type SelfHostedBillingSection = 'plan' | 'usage';export type SelfHostedBillingUsageDetail = typeof SELF_HOSTED_PRO_BILLING_COUNTING_RULES_DETAIL;export type SelfHostedBillingPlanDetail = typeof SELF_HOSTED_PRO_BILLING_RECOVERY_DETAIL;export type SelfHostedBillingDetail = SelfHostedBillingUsageDetail | SelfHostedBillingPlanDetail;-export type SelfHostedBillingPlanIntent = typeof SELF_HOSTED_PRO_BILLING_MONITORED_SYSTEM_INTENT;+export type SelfHostedBillingPlanIntent = typeof SELF_HOSTED_PRO_BILLING_PLAN_SELECTION_INTENT;export type SelfHostedBillingPurchaseArrival =| typeof SELF_HOSTED_PRO_BILLING_PURCHASE_ACTIVATED| typeof SELF_HOSTED_PRO_BILLING_PURCHASE_CANCELLED@@ -47,11 +47,11 @@ export const SELF_HOSTED_PRO_BILLING_PLAN_HREF = SELF_HOSTED_PRO_BILLING_PLAN_ROexport const SELF_HOSTED_PRO_BILLING_USAGE_HREF = SELF_HOSTED_PRO_BILLING_USAGE_ROUTE;export const SELF_HOSTED_PRO_BILLING_PLAN_RECOVERY_HREF = `${SELF_HOSTED_PRO_BILLING_PLAN_ROUTE}?${SELF_HOSTED_PRO_BILLING_PLAN_DETAILS_QUERY_PARAM}=${SELF_HOSTED_PRO_BILLING_RECOVERY_DETAIL}`;export const SELF_HOSTED_PRO_BILLING_USAGE_COUNTING_RULES_HREF = `${SELF_HOSTED_PRO_BILLING_USAGE_ROUTE}?${SELF_HOSTED_PRO_BILLING_USAGE_DETAILS_QUERY_PARAM}=${SELF_HOSTED_PRO_BILLING_COUNTING_RULES_DETAIL}`;-export const SELF_HOSTED_PRO_BILLING_PLAN_MONITORED_SYSTEM_UPGRADE_HREF = `${SELF_HOSTED_PRO_BILLING_PLAN_ROUTE}?${SELF_HOSTED_PRO_BILLING_PLAN_INTENT_QUERY_PARAM}=${SELF_HOSTED_PRO_BILLING_MONITORED_SYSTEM_INTENT}`;+export const SELF_HOSTED_PRO_BILLING_PLAN_SELECTION_HREF = `${SELF_HOSTED_PRO_BILLING_PLAN_ROUTE}?${SELF_HOSTED_PRO_BILLING_PLAN_INTENT_QUERY_PARAM}=${SELF_HOSTED_PRO_BILLING_PLAN_SELECTION_INTENT}`;const IN_PRODUCT_PRICING_DESTINATIONS: Record<string, string> = {- self_hosted_plan: SELF_HOSTED_PRO_BILLING_PLAN_MONITORED_SYSTEM_UPGRADE_HREF,- max_monitored_systems: SELF_HOSTED_PRO_BILLING_PLAN_MONITORED_SYSTEM_UPGRADE_HREF,+ self_hosted_plan: SELF_HOSTED_PRO_BILLING_PLAN_SELECTION_HREF,+ max_monitored_systems: SELF_HOSTED_PRO_BILLING_PLAN_SELECTION_HREF,cloud: '/cloud',// Pro-feature keys: route to billing plan page instead of the Pulse Account// purchase-start handoff, which fails for local instances without PublicURL.@@ -176,10 +176,10 @@ export function getSelfHostedBillingPlanDetail(search: string): SelfHostedBillinexport function getSelfHostedBillingPlanIntent(search: string): SelfHostedBillingPlanIntent | null {const intent = billingSearch(search).get(SELF_HOSTED_PRO_BILLING_PLAN_INTENT_QUERY_PARAM)?.trim();if (- intent === SELF_HOSTED_PRO_BILLING_MONITORED_SYSTEM_INTENT ||- intent === LEGACY_SELF_HOSTED_PRO_BILLING_MONITORED_SYSTEM_INTENT+ intent === SELF_HOSTED_PRO_BILLING_PLAN_SELECTION_INTENT ||+ intent === LEGACY_SELF_HOSTED_PRO_BILLING_PLAN_SELECTION_INTENT) {- return SELF_HOSTED_PRO_BILLING_MONITORED_SYSTEM_INTENT;+ return SELF_HOSTED_PRO_BILLING_PLAN_SELECTION_INTENT;}return null;}@@ -219,10 +219,10 @@ export function getSelfHostedBillingHref();}- if (section === 'plan' && options.intent === SELF_HOSTED_PRO_BILLING_MONITORED_SYSTEM_INTENT) {+ if (section === 'plan' && options.intent === SELF_HOSTED_PRO_BILLING_PLAN_SELECTION_INTENT) {params.set(SELF_HOSTED_PRO_BILLING_PLAN_INTENT_QUERY_PARAM,- SELF_HOSTED_PRO_BILLING_MONITORED_SYSTEM_INTENT,+ SELF_HOSTED_PRO_BILLING_PLAN_SELECTION_INTENT,);}