Skip to content

armgit / Pulse

Public Imported from GitHub
0

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.

Retire monitored-system pricing handoff

rcourtman4f3535d8d43e
diff --git a/docs/release-control/v6/internal/subsystems/cloud-paid.md b/docs/release-control/v6/internal/subsystems/cloud-paid.md
index 9935f70bad..cfec511b16 100644
--- a/docs/release-control/v6/internal/subsystems/cloud-paid.md
+++ b/docs/release-control/v6/internal/subsystems/cloud-paid.md
@@ -300,26 +300,28 @@ Community limit enforcement.
metric deck ahead of the real workspace list.
23. Keep self-hosted monitored-system capacity review informational and
non-commercial. Recognized self-hosted v6 tiers must treat legacy
- monitored-system limit, continuity, or `max_monitored_systems` handoff data
- as support/audit metadata rather than as the customer-facing plan model:
+ monitored-system limit, continuity, or `max_monitored_systems` metadata
+ as support/audit context rather than as the customer-facing plan model:
Community, Relay, Pro, Pro+, lifetime, and eligible grandfathered recurring
plan labels render through the normal plan surface as unlimited core
monitoring plus tier-specific extras, with no standing Usage subtab, finite
policy banner, monitored-system limit row, or pause-new-admissions copy from
- stale volume metadata. Any genuinely bounded monitored-system support
- context outside those recognized plan labels must remain informational and
- land on the usage-focused billing state
- (`/settings/system/billing/usage?details=counting-rules`) so the operator
- can inspect counting rules and any support/audit policy context without
- being pushed toward a purchase. Monitored-system warnings must not surface
+ stale volume metadata. Retired `max_monitored_systems` pricing handoffs
+ must land on the neutral Plans & Activation surface, not the usage ledger.
+ Any genuinely bounded monitored-system support context outside those
+ recognized plan labels may still land on the explicit usage-focused billing
+ state (`/settings/system/billing/usage?details=counting-rules`) so the
+ operator can inspect counting rules and any support/audit policy context
+ without being pushed toward a purchase. Monitored-system warnings must not surface
`Upgrade to add more`, `Compare self-hosted plans`, or the
`intent=self_hosted_plan` plan-selection arrival. `frontend-modern/src/components/Settings/ProLicensePanel.tsx`,
`frontend-modern/src/components/Settings/useProLicensePanelState.ts`, and
`frontend-modern/src/utils/pricingHandoff.ts` therefore own a two-state
- billing focus model where monitored-system aliases only resolve to `usage`
- when a displayable bounded support context remains after recognized
- self-hosted plans have been normalized, and plan selection is reserved for
- explicit self-hosted Pro/commercial-extra arrivals. That same self-hosted
+ billing focus model where stale monitored-system pricing aliases resolve
+ to `plan`, explicit usage routes remain available only for displayable
+ bounded support context after recognized self-hosted plans have been
+ normalized, and plan selection is reserved for explicit self-hosted
+ Pro/commercial-extra arrivals. That same self-hosted
commercial boundary also owns legacy
migration continuity semantics: `legacy_migration_fallback` may preserve
`plan_limit` and `grandfathered_floor` for support/audit context, but
@@ -987,13 +989,13 @@ For self-hosted upgrades, that browser-facing feature metadata is now
canonically `self_hosted_plan`. Pulse Account may continue normalizing the
legacy `max_monitored_systems` alias only for already-created checkout records,
but in-product browser links and fallback helpers must route that alias to the
-monitored-system usage/counting-rules surface instead of plan selection. The
-portal proxy contract, checked-in embedded bundle, and rendered upgrade copy
-must treat self-hosted commerce as plan selection and paid extras rather than
-monitored-system-cap expansion. Shared helpers and route-owned browser symbols
-should name that commercial state as plan selection as well; the
-monitored-system alias belongs only to backward-compatible handoff
-normalization and non-commercial usage review.
+neutral Plans & Activation surface instead of the monitored-system
+usage/counting-rules surface. The portal proxy contract, checked-in embedded
+bundle, and rendered upgrade copy must treat self-hosted commerce as plan
+selection and paid extras rather than monitored-system-cap expansion. Shared
+helpers and route-owned browser symbols should name that commercial state as
+plan selection as well; the monitored-system alias belongs only to
+backward-compatible handoff normalization and non-commercial usage review.
If Pulse cannot create or resolve that portal handoff locally, the Pulse-owned
start route must still return the operator to the owned billing plan surface
with an explicit `purchase=unavailable` arrival instead of leaving the browser
diff --git a/frontend-modern/src/pages/__tests__/PricingHandoff.test.tsx b/frontend-modern/src/pages/__tests__/PricingHandoff.test.tsx
index aebbd92ec1..d05c343f20 100644
--- a/frontend-modern/src/pages/__tests__/PricingHandoff.test.tsx
+++ b/frontend-modern/src/pages/__tests__/PricingHandoff.test.tsx
@@ -67,20 +67,20 @@ describe('PricingHandoff', () => {
expect(pricingHandoffSource).not.toContain('<h1');
});
- it('keeps monitored-system pricing handoffs inside usage review', async () => {
+ it('keeps retired monitored-system pricing handoffs on the neutral Plans surface', async () => {
window.history.replaceState({}, '', '/pricing?feature=max_monitored_systems');
render(() => (
<Router>
<Route path="/pricing" component={PricingHandoff} />
<Route
- path="/settings/system/billing/usage"
- component={() => <div>Billing destination</div>}
+ path="/settings/system/billing/plan"
+ component={() => <div>Plans destination</div>}
/>
</Router>
));
- expect(await screen.findByText('Billing destination')).toBeInTheDocument();
+ expect(await screen.findByText('Plans destination')).toBeInTheDocument();
expect(handoffToExternalPricingMock).not.toHaveBeenCalled();
});
diff --git a/frontend-modern/src/stores/__tests__/license.test.ts b/frontend-modern/src/stores/__tests__/license.test.ts
index 89814fdafe..bd27ba04b0 100644
--- a/frontend-modern/src/stores/__tests__/license.test.ts
+++ b/frontend-modern/src/stores/__tests__/license.test.ts
@@ -426,21 +426,21 @@ describe('license stores', () => {
expect(getUpgradeActionUrlOrFallback('relay')).toBe(getUpgradeFallbackDestination('relay'));
});
- it('routes monitored-system limit fallbacks to usage instead of plan purchase', async () => {
+ it('routes monitored-system limit fallbacks to the neutral plan surface', async () => {
vi.mocked(LicenseAPI.getCommercialPosture).mockResolvedValue({
...mockCommercialPosture,
upgrade_reasons: [{ key: 'reason1', reason: 'Reason 1', action_url: '/upgrade/reason1' }],
});
await loadCommercialPosture(true);
expect(getUpgradeActionUrlOrFallback('max_monitored_systems')).toBe(
- '/settings/system/billing/usage?details=counting-rules',
+ '/settings/system/billing/plan',
);
});
- it('routes cloud fallbacks to the in-product cloud plans page', async () => {
+ it('routes cloud fallbacks to Pulse Account', async () => {
vi.mocked(LicenseAPI.getCommercialPosture).mockResolvedValue(mockFreeCommercialPosture);
await loadCommercialPosture(true);
- expect(getUpgradeActionUrlOrFallback('cloud')).toBe('/cloud');
+ expect(getUpgradeActionUrlOrFallback('cloud')).toBe(getUpgradeFallbackDestination('cloud'));
});
it('routes generic upgrade fallbacks to Pulse Account', async () => {
@@ -466,7 +466,7 @@ describe('license stores', () => {
expect(getUpgradeActionUrlOrFallback('trial_expired')).toBe('');
});
- it('keeps specific monitored-system upgrade actions on usage review', async () => {
+ it('keeps specific monitored-system upgrade actions from reviving paid capacity review', async () => {
vi.mocked(LicenseAPI.getCommercialPosture).mockResolvedValue({
...mockCommercialPosture,
upgrade_reasons: [
diff --git a/frontend-modern/src/utils/__tests__/pricingHandoff.test.ts b/frontend-modern/src/utils/__tests__/pricingHandoff.test.ts
index e2a7113fc8..44f75bf3b7 100644
--- a/frontend-modern/src/utils/__tests__/pricingHandoff.test.ts
+++ b/frontend-modern/src/utils/__tests__/pricingHandoff.test.ts
@@ -34,9 +34,9 @@ import {
} from '@/utils/pricingHandoff';
describe('pricingHandoff', () => {
- it('routes legacy monitored-system pricing links to usage, not plan purchase', () => {
+ it('retires legacy monitored-system pricing links onto the neutral plan surface', () => {
expect(getUpgradeFallbackDestination('max_monitored_systems')).toBe(
- SELF_HOSTED_PRO_BILLING_USAGE_COUNTING_RULES_HREF,
+ SELF_HOSTED_PRO_BILLING_PLAN_HREF,
);
});
@@ -119,9 +119,9 @@ describe('pricingHandoff', () => {
);
});
- it('keeps internal route exceptions when handing off the legacy pricing route', () => {
+ it('keeps retired monitored-system pricing handoffs on the neutral Plans surface', () => {
expect(getPricingRouteDestination('?feature=max_monitored_systems')).toBe(
- SELF_HOSTED_PRO_BILLING_USAGE_COUNTING_RULES_HREF,
+ SELF_HOSTED_PRO_BILLING_PLAN_HREF,
);
});
@@ -166,7 +166,10 @@ describe('pricingHandoff', () => {
SELF_HOSTED_PRO_BILLING_PLAN_HREF,
'?intent=max_monitored_systems',
),
- ).toBe(SELF_HOSTED_PRO_BILLING_USAGE_COUNTING_RULES_HREF);
+ ).toBe(SELF_HOSTED_PRO_BILLING_PLAN_HREF);
+ expect(
+ resolveCanonicalSelfHostedBillingHref(`${SELF_HOSTED_PRO_BILLING_ROUTE}/history`),
+ ).toBe(SELF_HOSTED_PRO_BILLING_PLAN_HREF);
});
it('derives billing focus and arrival intent from canonical routes', () => {
@@ -183,7 +186,7 @@ describe('pricingHandoff', () => {
SELF_HOSTED_PRO_BILLING_PLAN_HREF,
'?intent=max_monitored_systems',
),
- ).toBe('usage');
+ ).toBe('plan');
expect(getSelfHostedBillingPlanIntent('?intent=max_monitored_systems')).toBeNull();
expect(
getSelfHostedBillingPlanDetail('?details=' + SELF_HOSTED_PRO_BILLING_RECOVERY_DETAIL),
diff --git a/frontend-modern/src/utils/pricingHandoff.ts b/frontend-modern/src/utils/pricingHandoff.ts
index 85595f3851..4ea470bf48 100644
--- a/frontend-modern/src/utils/pricingHandoff.ts
+++ b/frontend-modern/src/utils/pricingHandoff.ts
@@ -25,7 +25,6 @@ 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_PLAN_SELECTION_INTENT = 'self_hosted_plan';
-const LEGACY_MONITORED_SYSTEM_BILLING_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';
@@ -52,7 +51,7 @@ export const SELF_HOSTED_PRO_BILLING_PLAN_SELECTION_HREF = `${SELF_HOSTED_PRO_BI
const IN_PRODUCT_PRICING_DESTINATIONS: Record<string, string> = {
self_hosted_plan: SELF_HOSTED_PRO_BILLING_PLAN_SELECTION_HREF,
- max_monitored_systems: SELF_HOSTED_PRO_BILLING_USAGE_COUNTING_RULES_HREF,
+ max_monitored_systems: SELF_HOSTED_PRO_BILLING_PLAN_HREF,
// Paid self-hosted feature keys: route to the owned billing plan page instead
// of the Pulse Account purchase-start handoff, which fails for local instances
// without PublicURL.
@@ -95,19 +94,13 @@ function billingSearch(search: string): URLSearchParams {
return new URLSearchParams(normalizeSearch(search));
}
-function hasLegacyMonitoredSystemBillingIntent(search: string): boolean {
- return (
- billingSearch(search).get(SELF_HOSTED_PRO_BILLING_PLAN_INTENT_QUERY_PARAM)?.trim() ===
- LEGACY_MONITORED_SYSTEM_BILLING_INTENT
- );
-}
-
function isSelfHostedBillingPath(pathname: string): boolean {
const normalized = normalizeSettingsLikePath(pathname);
return (
normalized === SELF_HOSTED_PRO_BILLING_ROUTE ||
normalized === SELF_HOSTED_PRO_BILLING_PLAN_ROUTE ||
- normalized === SELF_HOSTED_PRO_BILLING_USAGE_ROUTE
+ normalized === SELF_HOSTED_PRO_BILLING_USAGE_ROUTE ||
+ normalized.startsWith(`${SELF_HOSTED_PRO_BILLING_ROUTE}/`)
);
}
@@ -270,9 +263,6 @@ export function resolveSelfHostedBillingSection(
): SelfHostedBillingSection {
const normalizedPath = normalizeSettingsLikePath(pathname);
- if (hasLegacyMonitoredSystemBillingIntent(search)) {
- return 'usage';
- }
if (normalizedPath === SELF_HOSTED_PRO_BILLING_USAGE_ROUTE) {
return 'usage';
}
@@ -314,11 +304,9 @@ export function resolveCanonicalSelfHostedBillingHref(
const section = resolveSelfHostedBillingSection(normalizedPath, search, hash);
const normalizedHash = normalizeHash(hash);
- const legacyMonitoredSystemIntent = hasLegacyMonitoredSystemBillingIntent(search);
const usageDetail =
section === 'usage' &&
- (getSelfHostedBillingUsageDetail(search) === SELF_HOSTED_PRO_BILLING_COUNTING_RULES_DETAIL ||
- legacyMonitoredSystemIntent)
+ getSelfHostedBillingUsageDetail(search) === SELF_HOSTED_PRO_BILLING_COUNTING_RULES_DETAIL
? SELF_HOSTED_PRO_BILLING_COUNTING_RULES_DETAIL
: null;
const planIntent = section === 'plan' ? getSelfHostedBillingPlanIntent(search) : null;