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
Move monitored-system over-plan guidance into capacity section
rcourtmanc6885b3b7db1
diff --git a/docs/release-control/v6/internal/subsystems/cloud-paid.md b/docs/release-control/v6/internal/subsystems/cloud-paid.mdindex 3e31de9972..e1fdefff2c 100644--- a/docs/release-control/v6/internal/subsystems/cloud-paid.md+++ b/docs/release-control/v6/internal/subsystems/cloud-paid.md@@ -1143,16 +1143,21 @@ When a self-hosted billing arrival is explicitly about monitored-systemcapacity, `ProLicensePlanSection.tsx` may still open that disclosure bydefault, but the same top-level-root definition must remain the canonicalcounted-unit explanation rather than introducing a second plan-local wording.-The same boundary also owns the warning-banner shorthand: customer-facing-monitored-system warnings should describe the current admission posture in-plain language, not just raw `current / limit` math. When a plan is full, copy-must explain that existing monitoring continues while new monitored systems are-blocked; when an installation is already above the current plan, copy must-explain that Pulse is in an over-plan frozen state rather than implying a hard-runtime blackout. Community overflow/setup-slot messaging must still explain-the included monitored systems plus the temporary setup slot in customer terms-rather than compressing the contract into slash-style quota strings that imply-Pulse is counting every child device.+The same boundary also owns where monitored-system capacity truth lives. The+canonical persistent explanation belongs in the self-hosted Pro plan surface:+`ProLicensePanel.tsx`, `ProLicensePlanSection.tsx`, and+`useProLicensePanelState.ts` must render a dedicated capacity section with the+current monitored count, included plan limit, status posture, and any+over-plan or continuity explanation. Customer-facing copy there should+describe the current admission posture in plain language, not raw+`current / limit` math. When a plan is full, the section must explain that+existing monitoring continues while new monitored systems are blocked; when an+installation is already above the current plan, it must explain that Pulse is+in an over-plan frozen state rather than implying a hard runtime blackout.+Community overflow/setup-slot messaging must still explain the included+monitored systems plus the temporary setup slot in customer terms rather than+compressing the contract into slash-style quota strings that imply Pulse is+counting every child device.That same billing-facing boundary also owns why an installation can be aboveplan at all. When the monitored-system posture is `over_limit_frozen`, customercopy must explain whether the installation was already above the current plandiff --git a/docs/release-control/v6/internal/subsystems/frontend-primitives.md b/docs/release-control/v6/internal/subsystems/frontend-primitives.mdindex 6da14ecc9a..3b675da41f 100644--- a/docs/release-control/v6/internal/subsystems/frontend-primitives.md+++ b/docs/release-control/v6/internal/subsystems/frontend-primitives.md@@ -159,6 +159,12 @@ work extends shared components instead of creating new local variants.## Extension Points1. Add shared primitives in `frontend-modern/src/components/shared/`+ Shared monitored-system warning primitives under that path must stay compact+ app-shell pointers into the owned Pulse Pro billing surface. The shared+ banner may announce posture and route to the relevant billing tab, but+ durable plan-capacity explanation, over-plan reasoning, and upgrade/review+ actions belong in the `cloud-paid` plan surface rather than permanent+ banner-local prose.2. Route new top-level settings surfaces through the canonical settings shellinstead of introducing page-local framing.Shared shells and primitives that need websocket or dark-mode context must@@ -1721,9 +1727,11 @@ policy while sourcing customer-facing monitored-system copy from the canonical`frontend-modern/src/utils/monitoredSystemPresentation.ts` helper. Futurewarning-banner work should extend those owners instead of pushing entitlementstate or route selection back into the render shell. When the warning points at-Pulse Pro billing, the shared primitive must preserve distinct route-owned-arrivals for usage explanation vs upgrade intent instead of re-collapsing both-CTAs onto one generic billing href.+Pulse Pro billing, the shared primitive must stay a compact pointer rather+than re-expanding into a full policy explainer. The banner may signal the+current monitored-system posture and link into the owned billing surface, but+the longer over-plan or continuity explanation belongs in the plan-surface+capacity section owned by `cloud-paid`, not in permanent app-shell banner copy.That same shared warning boundary now also owns the monitored-system capacityposture vocabulary. Shared banners, plan summaries, and ledger headers mustdescribe the canonical admission-freeze model fromdiff --git a/frontend-modern/src/components/Settings/ProLicensePanel.tsx b/frontend-modern/src/components/Settings/ProLicensePanel.tsxindex 36de035913..fbfdceb274 100644--- a/frontend-modern/src/components/Settings/ProLicensePanel.tsx+++ b/frontend-modern/src/components/Settings/ProLicensePanel.tsx@@ -105,7 +105,7 @@ const ProLicensePanelContent: Component = () => {hasLicenseDetails={state.hasLicenseDetails()}hasPaidFeatures={state.hasPaidFeatures()}loading={state.loading()}- monitoredSystemCapacityNotice={state.monitoredSystemCapacityNotice()}+ monitoredSystemCapacitySection={state.monitoredSystemCapacitySection()}monitoredSystemContinuityNotice={state.monitoredSystemContinuityNotice()}onReload={() => void state.loadPanelData()}purchaseActivationAction={state.purchaseActivationAction()}diff --git a/frontend-modern/src/components/Settings/ProLicensePlanSection.tsx b/frontend-modern/src/components/Settings/ProLicensePlanSection.tsxindex be7939ec03..ce75ad718d 100644--- a/frontend-modern/src/components/Settings/ProLicensePlanSection.tsx+++ b/frontend-modern/src/components/Settings/ProLicensePlanSection.tsx@@ -21,6 +21,18 @@ interface Notice {tone: string;}+interface MonitoredSystemCapacitySection {+ stats: Array<{ label: string; value: string }>;+ statusMessage: string;+ detailMessage?: string;+ explanation?: {+ label: string;+ body: string;+ };+ reviewUsageDestination: UpgradeDestination;+ upgradeDestination: UpgradeDestination | null;+}+interface ProLicensePlanSectionProps {commercialMigrationNotice: Notice | null;commercialPlanModel: {@@ -36,7 +48,7 @@ interface ProLicensePlanSectionProps {hasLicenseDetails: boolean;hasPaidFeatures: boolean;loading: boolean;- monitoredSystemCapacityNotice: Notice | null;+ monitoredSystemCapacitySection: MonitoredSystemCapacitySection | null;monitoredSystemContinuityNotice: Notice | null;onReload: () => void;onStartTrial: () => void;@@ -164,11 +176,50 @@ export const ProLicensePlanSection: Component<ProLicensePlanSectionProps> = (pro</div>)}</Show>- <Show when={props.monitoredSystemCapacityNotice}>- {(notice) => (- <div class={`mb-4 rounded-md border p-3 text-sm ${notice().tone}`}>- <p class="font-medium">{notice().title}</p>- <p class="mt-1 text-xs opacity-90">{notice().body}</p>+ <Show when={props.monitoredSystemCapacitySection}>+ {(section) => (+ <div class="mb-4 rounded-md border border-border bg-surface-alt p-4">+ <div class="space-y-2">+ <p class="text-sm font-medium text-base-content">Monitoring capacity</p>+ <p class="text-xs text-base-content">{section().statusMessage}</p>+ <Show when={section().detailMessage}>+ {(detail) => <p class="text-xs text-muted">{detail()}</p>}+ </Show>+ </div>++ <div class="mt-4">+ <CommercialStatGrid items={section().stats} />+ </div>++ <Show when={section().explanation}>+ {(explanation) => (+ <details class="mt-4 rounded-md border border-border bg-surface px-3 py-2">+ <summary class="cursor-pointer text-xs font-medium text-base-content">+ {explanation().label}+ </summary>+ <p class="mt-2 text-xs text-muted">{explanation().body}</p>+ </details>+ )}+ </Show>++ <div class="mt-4 flex flex-wrap items-center gap-3">+ <UpgradeLink+ class="inline-flex items-center gap-1 text-xs font-medium text-primary hover:underline"+ destination={section().reviewUsageDestination}+ >+ Review monitored systems+ </UpgradeLink>+ <Show when={section().upgradeDestination}>+ {(destination) => (+ <UpgradeLink+ class="inline-flex items-center gap-1 text-xs font-medium text-primary hover:underline"+ destination={destination()}+ >+ Upgrade plan+ </UpgradeLink>+ )}+ </Show>+ </div></div>)}</Show>diff --git a/frontend-modern/src/components/Settings/__tests__/ProLicensePanel.test.tsx b/frontend-modern/src/components/Settings/__tests__/ProLicensePanel.test.tsxindex 68e6a18eb9..798fc29915 100644--- a/frontend-modern/src/components/Settings/__tests__/ProLicensePanel.test.tsx+++ b/frontend-modern/src/components/Settings/__tests__/ProLicensePanel.test.tsx@@ -259,8 +259,8 @@ describe('ProLicensePanel', () => {expect(screen.getByText('Plan Terms')).toBeInTheDocument();});- expect(screen.getByText('5 monitored systems')).toBeInTheDocument();- expect(screen.getByText('7 remaining')).toBeInTheDocument();+ expect(screen.getAllByText('5 monitored systems').length).toBeGreaterThan(0);+ expect(screen.getAllByText('7 remaining').length).toBeGreaterThan(0);expect(screen.getAllByText('Active').length).toBeGreaterThan(0);expect(screen.getByText('V5 Pro Monthly (Grandfathered)')).toBeInTheDocument();expect(screen.getByText('Included Monitored Systems')).toBeInTheDocument();@@ -408,8 +408,8 @@ describe('ProLicensePanel', () => {expect(screen.getByText(/verifying the grandfathered monitored-system floor/i),).toBeInTheDocument();- expect(screen.getByText('Verifying…')).toBeInTheDocument();- expect(screen.getByText('Unavailable')).toBeInTheDocument();+ expect(screen.getAllByText('Verifying…').length).toBeGreaterThan(0);+ expect(screen.getAllByText('Unavailable').length).toBeGreaterThan(0);expect(screen.getByText('Plan Monitored System Limit')).toBeInTheDocument();expect(screen.getByText('Effective Monitored System Limit')).toBeInTheDocument();expect(screen.getByText('Continuity Capture')).toBeInTheDocument();@@ -460,9 +460,9 @@ describe('ProLicensePanel', () => {expect(screen.getByText('Migration continuity verification pending')).toBeInTheDocument();});- expect(- screen.getByText(/already monitoring 23/i),- ).toBeInTheDocument();+ expect(screen.getAllByText(/already monitoring 23/i).length).toBeGreaterThan(0);+ expect(screen.getByText('Monitoring capacity')).toBeInTheDocument();+ expect(screen.getByText('Why is continuity still pending?')).toBeInTheDocument();expect(screen.queryByText('Monitoring continues above the current plan limit'),).not.toBeInTheDocument();@@ -516,8 +516,12 @@ describe('ProLicensePanel', () => {expect(screen.getByText(/keeps an effective monitored-system limit of 23/i),).toBeInTheDocument();- expect(screen.getByText('23 monitored systems')).toBeInTheDocument();- expect(screen.getByText('Monitored-system limit reached')).toBeInTheDocument();+ expect(screen.getAllByText('23 monitored systems').length).toBeGreaterThan(0);+ expect(screen.getByText('Monitoring capacity')).toBeInTheDocument();+ expect(+ screen.getByText('Existing monitoring continues. New monitored systems are blocked.'),+ ).toBeInTheDocument();+ expect(screen.getByRole('link', { name: 'Review monitored systems' })).toBeInTheDocument();expect(screen.getByText('Plan Monitored System Limit')).toBeInTheDocument();expect(screen.getByText('Effective Monitored System Limit')).toBeInTheDocument();expect(screen.getByText('Grandfathered Floor')).toBeInTheDocument();diff --git a/frontend-modern/src/components/Settings/useProLicensePanelState.ts b/frontend-modern/src/components/Settings/useProLicensePanelState.tsindex 8b970163c0..2f7f861d9b 100644--- a/frontend-modern/src/components/Settings/useProLicensePanelState.ts+++ b/frontend-modern/src/components/Settings/useProLicensePanelState.ts@@ -48,8 +48,8 @@ import {} from '@/utils/pricingHandoff';import { buildSelfHostedCommercialPlanModel } from '@/utils/commercialBillingModel';import {+ buildMonitoredSystemCapacitySectionModel,getMonitoredSystemLimitCapacityStatusSummary,- getMonitoredSystemLimitContextSummary,getMonitoredSystemLimitUsageSummary,resolveMonitoredSystemCapacityStatus,} from '@/utils/monitoredSystemPresentation';@@ -280,40 +280,29 @@ export function useProLicensePanelState() {monitoredSystemCapacity(),),);- const monitoredSystemCapacityNotice = createMemo(() => {- const posture = monitoredSystemCapacityPosture();- if (!posture?.current_available) {+ const monitoredSystemCapacitySection = createMemo(() => {+ const section = buildMonitoredSystemCapacitySectionModel(+ monitoredSystemLimitStatus(),+ monitoredSystemCapacity(),+ );+ if (!section) {return null;}- switch (posture.mode) {- case 'at_limit_blocking_new':- return {- title: 'Monitored-system limit reached',- body: `This installation is using all ${posture.limit} included monitored systems. Existing monitoring continues, but new monitored systems are blocked until capacity is freed or the plan is upgraded.`,- tone: 'border-amber-200 bg-amber-50 text-amber-900 dark:border-amber-900 dark:bg-amber-950/40 dark:text-amber-100',- };- case 'over_limit_frozen':- if (- posture.reason === 'legacy_migration_capture_pending' &&- monitoredSystemContinuityNotice()- ) {- return null;- }- return {- title: 'Monitoring continues above the current plan limit',- body:- posture.reason === 'preexisting_usage'- ? `This installation already exceeded the current plan limit before new monitored systems were blocked. It is currently monitoring ${posture.current} systems while the current plan includes ${posture.limit}. Existing monitoring continues, but new monitored systems are blocked until usage is reduced or the plan is upgraded.`- : `This installation is monitoring ${posture.current} systems while the current plan includes ${posture.limit}. Existing monitoring continues, but new monitored systems are blocked until usage is reduced or the plan is upgraded.`,- tone: 'border-amber-200 bg-amber-50 text-amber-900 dark:border-amber-900 dark:bg-amber-950/40 dark:text-amber-100',- };- default:- return null;- }+ const posture = monitoredSystemCapacityPosture();+ return {+ ...section,+ reviewUsageDestination: resolveUpgradeDestination(SELF_HOSTED_PRO_BILLING_USAGE_HREF),+ upgradeDestination:+ posture?.blocks_new_systems === true &&+ posture.reason !== 'legacy_migration_capture_pending'+ ? resolveUpgradeDestination(+ getSelfHostedBillingHref('plan', {+ intent: SELF_HOSTED_PRO_BILLING_MONITORED_SYSTEM_INTENT,+ }),+ )+ : null,+ };});- const monitoredSystemCapacityContext = createMemo(() =>- getMonitoredSystemLimitContextSummary(monitoredSystemLimitStatus(), monitoredSystemCapacity()),- );const continuityCapturedAt = createMemo(() => {const capturedAt = monitoredSystemContinuity()?.captured_at;return typeof capturedAt === 'number' && capturedAt > 0@@ -474,8 +463,7 @@ export function useProLicensePanelState() {commercialMigrationNotice,commercialPlanModel,monitoredSystemCapacity,- monitoredSystemCapacityContext,- monitoredSystemCapacityNotice,+ monitoredSystemCapacitySection,monitoredSystemContinuityNotice,entitlements,formattedFeatures,diff --git a/frontend-modern/src/components/shared/MonitoredSystemLimitWarningBanner.tsx b/frontend-modern/src/components/shared/MonitoredSystemLimitWarningBanner.tsxindex fc5e4c6047..41b1b98ca5 100644--- a/frontend-modern/src/components/shared/MonitoredSystemLimitWarningBanner.tsx+++ b/frontend-modern/src/components/shared/MonitoredSystemLimitWarningBanner.tsx@@ -1,7 +1,7 @@import { Component, Show } from 'solid-js';import {MONITORED_SYSTEM_LIMIT_INSTALL_COLLECTORS_LABEL,- MONITORED_SYSTEM_LIMIT_LEARN_MORE_LABEL,+ MONITORED_SYSTEM_LIMIT_VIEW_CAPACITY_LABEL,MONITORED_SYSTEM_LIMIT_UPGRADE_LABEL,} from './monitoredSystemLimitWarningBannerModel';import { UpgradeLink } from './UpgradeLink';@@ -19,17 +19,11 @@ export const MonitoredSystemLimitWarningBanner: Component = () => {><div class="flex flex-wrap items-center gap-x-3 gap-y-1"><span class={state.isUrgent() ? 'font-medium' : ''}>{state.monitoredSystemSummary()}</span>- <Show when={state.overflowSummary()}>- <span class="text-xs opacity-80">{state.overflowSummary()}</span>- </Show>- <Show when={state.migrationGap()}>- <span class={`text-xs ${state.migrationTextClass()}`}>{state.migrationMessage()}</span>- </Show><UpgradeLinkclass="text-xs font-medium underline underline-offset-2 hover:opacity-90"- destination={state.learnMoreDestination()}+ destination={state.viewCapacityDestination()}>- {MONITORED_SYSTEM_LIMIT_LEARN_MORE_LABEL}+ {MONITORED_SYSTEM_LIMIT_VIEW_CAPACITY_LABEL}</UpgradeLink><Show when={state.migrationGap()}><UpgradeLink@@ -40,10 +34,10 @@ export const MonitoredSystemLimitWarningBanner: Component = () => {{MONITORED_SYSTEM_LIMIT_INSTALL_COLLECTORS_LABEL}</UpgradeLink></Show>- <Show when={state.isUrgent()}>+ <Show when={state.isUrgent() && state.upgradeDestination()}><UpgradeLinkclass="text-xs font-semibold underline underline-offset-2 hover:opacity-90"- destination={state.upgradeDestination()}+ destination={state.upgradeDestination()!}onClick={state.handleUpgradeClick}>{MONITORED_SYSTEM_LIMIT_UPGRADE_LABEL}diff --git a/frontend-modern/src/components/shared/SharedPrimitives.guardrails.test.ts b/frontend-modern/src/components/shared/SharedPrimitives.guardrails.test.tsindex ce8e95c120..a8be052f62 100644--- a/frontend-modern/src/components/shared/SharedPrimitives.guardrails.test.ts+++ b/frontend-modern/src/components/shared/SharedPrimitives.guardrails.test.ts@@ -649,7 +649,7 @@ describe('shared primitive guardrails', () => {);expect(monitoredSystemLimitWarningBannerSource).toContain('UpgradeLink');expect(monitoredSystemLimitWarningBannerSource).toContain(- 'MONITORED_SYSTEM_LIMIT_LEARN_MORE_LABEL',+ 'MONITORED_SYSTEM_LIMIT_VIEW_CAPACITY_LABEL',);expect(monitoredSystemLimitWarningBannerSource).not.toContain('createEffect');expect(monitoredSystemLimitWarningBannerSource).not.toContain('createMemo');@@ -670,19 +670,17 @@ describe('shared primitive guardrails', () => {'presentationPolicyHidesCommercialSurfaces',);expect(monitoredSystemLimitWarningBannerStateSource).toContain('trackUpgradeMetricEvent');- expect(monitoredSystemLimitWarningBannerStateSource).toContain('legacyConnections');+ expect(monitoredSystemLimitWarningBannerStateSource).toContain('hasMigrationGap');expect(monitoredSystemLimitWarningBannerStateSource).toContain('scopeSelfHostedBillingDestination',);expect(monitoredSystemLimitWarningBannerStateSource).toContain('SELF_HOSTED_PRO_BILLING_MONITORED_SYSTEM_INTENT',);+ expect(monitoredSystemLimitWarningBannerStateSource).toContain('viewCapacityDestination');expect(monitoredSystemLimitWarningBannerStateSource).toContain('handleUpgradeClick');expect(monitoredSystemLimitWarningBannerStateSource).not.toContain("fetch('/api/health'");- expect(monitoredSystemLimitWarningBannerModelSource).toContain(- 'getMonitoredSystemMigrationMessage',- );expect(monitoredSystemLimitWarningBannerModelSource).toContain('getMonitoredSystemBannerToneClass',);@@ -707,7 +705,7 @@ describe('shared primitive guardrails', () => {expect(monitoredSystemLimitWarningBannerModelSource).not.toContain('current / limit');expect(monitoredSystemLimitWarningBannerModelSource).not.toContain('0 remaining');expect(monitoredSystemLimitWarningBannerModelSource).toContain(- 'SELF_HOSTED_PRO_BILLING_USAGE_COUNTING_RULES_HREF',+ 'SELF_HOSTED_PRO_BILLING_PLAN_HREF',);});diff --git a/frontend-modern/src/components/shared/__tests__/MonitoredSystemLimitWarningBanner.test.tsx b/frontend-modern/src/components/shared/__tests__/MonitoredSystemLimitWarningBanner.test.tsxindex c6a8c42238..a217b216d1 100644--- a/frontend-modern/src/components/shared/__tests__/MonitoredSystemLimitWarningBanner.test.tsx+++ b/frontend-modern/src/components/shared/__tests__/MonitoredSystemLimitWarningBanner.test.tsx@@ -107,7 +107,7 @@ describe('MonitoredSystemLimitWarningBanner', () => {'useMonitoredSystemLimitWarningBannerState',);expect(monitoredSystemLimitWarningBannerSource).toContain(- 'MONITORED_SYSTEM_LIMIT_LEARN_MORE_LABEL',+ 'MONITORED_SYSTEM_LIMIT_VIEW_CAPACITY_LABEL',);expect(monitoredSystemLimitWarningBannerSource).not.toContain('createEffect');expect(monitoredSystemLimitWarningBannerSource).not.toContain('createMemo');@@ -125,28 +125,20 @@ describe('MonitoredSystemLimitWarningBanner', () => {expect(monitoredSystemLimitWarningBannerStateSource).toContain('presentationPolicyHidesCommercialSurfaces',);- expect(monitoredSystemLimitWarningBannerStateSource).toContain(- 'commercialOverflowDaysRemaining',- );- expect(monitoredSystemLimitWarningBannerStateSource).not.toContain(- 'commercialPosture()?.overflow_days_remaining',- );expect(monitoredSystemLimitWarningBannerStateSource).toContain('trackUpgradeMetricEvent');- expect(monitoredSystemLimitWarningBannerStateSource).toContain('legacyConnections');+ expect(monitoredSystemLimitWarningBannerStateSource).toContain('hasMigrationGap');expect(monitoredSystemLimitWarningBannerStateSource).toContain('scopeSelfHostedBillingDestination',);expect(monitoredSystemLimitWarningBannerStateSource).toContain('SELF_HOSTED_PRO_BILLING_MONITORED_SYSTEM_INTENT',);+ expect(monitoredSystemLimitWarningBannerStateSource).toContain('viewCapacityDestination');expect(monitoredSystemLimitWarningBannerStateSource).toContain('handleUpgradeClick');expect(monitoredSystemLimitWarningBannerModelSource).toContain('@/utils/monitoredSystemPresentation',);- expect(monitoredSystemLimitWarningBannerModelSource).toContain(- 'getMonitoredSystemMigrationMessage',- );expect(monitoredSystemLimitWarningBannerModelSource).toContain('getMonitoredSystemBannerToneClass',);@@ -211,10 +203,10 @@ describe('MonitoredSystemLimitWarningBanner', () => {</Router>));- expect(screen.getByText('5 of 6 included monitored systems are in use.')).toBeInTheDocument();- expect(screen.getByText('Learn more')).toHaveAttribute(+ expect(screen.getByText('1 remaining. 5 monitored, 6 included.')).toBeInTheDocument();+ expect(screen.getByText('View capacity')).toHaveAttribute('href',- '/settings/system/billing/usage?details=counting-rules',+ '/settings/system/billing/plan',);expect(screen.getByText('Upgrade to add more')).toBeInTheDocument();expect(screen.getByText('Upgrade to add more')).toHaveAttribute(@@ -268,24 +260,11 @@ describe('MonitoredSystemLimitWarningBanner', () => {</Router>));- expect(screen.getByText('5 of 6 included monitored systems are in use.')).toBeInTheDocument();- expect(- screen.getByText(- /You also have 3 resources connected via API or legacy collectors \(2 Proxmox nodes, 1 Docker host\) that count once toward your monitored-system cap when the same top-level system is discovered canonically\./i,- ),- ).toBeInTheDocument();+ expect(screen.getByText('1 remaining. 5 monitored, 6 included.')).toBeInTheDocument();expect(screen.getByText('Install v6 collectors')).toHaveAttribute('href', '/settings');- expect(- screen.getByText(- 'Community includes 5 monitored systems. 1 temporary setup slot is active (14d remaining)',- {- exact: false,- },- ),- ).toBeInTheDocument();- expect(screen.getByText('Learn more')).toHaveAttribute(+ expect(screen.getByText('View capacity')).toHaveAttribute('href',- '/settings/system/billing/usage?details=counting-rules',+ '/settings/system/billing/plan',);expect(screen.getByText('Upgrade to add more')).toHaveAttribute('href',@@ -310,7 +289,7 @@ describe('MonitoredSystemLimitWarningBanner', () => {));expect(- screen.queryByText('5 of 6 included monitored systems are in use.'),+ screen.queryByText('1 remaining. 5 monitored, 6 included.'),).not.toBeInTheDocument();expect(mockTrackUpgradeMetricEvent).not.toHaveBeenCalled();});diff --git a/frontend-modern/src/components/shared/monitoredSystemLimitWarningBannerModel.ts b/frontend-modern/src/components/shared/monitoredSystemLimitWarningBannerModel.tsindex 7cb9c7fae7..a99122c0c4 100644--- a/frontend-modern/src/components/shared/monitoredSystemLimitWarningBannerModel.ts+++ b/frontend-modern/src/components/shared/monitoredSystemLimitWarningBannerModel.ts@@ -4,7 +4,7 @@ import {formatMonitoredSystemMigrationMessage,formatMonitoredSystemOverflowSummary,getMonitoredSystemLimitInstallCollectorsLabel,- getMonitoredSystemLimitLearnMoreLabel,+ getMonitoredSystemLimitViewCapacityLabel,getMonitoredSystemLimitUpgradeLabel,isMonitoredSystemLimitUrgent as isCanonicalMonitoredSystemLimitUrgent,isMonitoredSystemLimitUsageAvailable as isCanonicalMonitoredSystemLimitUsageAvailable,@@ -12,7 +12,7 @@ import {type MonitoredSystemLimitUsageStatus,type MonitoredSystemLegacyConnectionCounts,} from '@/utils/monitoredSystemPresentation';-import { SELF_HOSTED_PRO_BILLING_USAGE_COUNTING_RULES_HREF } from '@/utils/pricingHandoff';+import { SELF_HOSTED_PRO_BILLING_PLAN_HREF } from '@/utils/pricingHandoff';type LimitState = MonitoredSystemLimitUsageStatus & {current: number;@@ -21,10 +21,10 @@ type LimitState = MonitoredSystemLimitUsageStatus & {};export const MONITORED_SYSTEM_LIMIT_KEY = 'max_monitored_systems';-export const MONITORED_SYSTEM_LIMIT_LEARN_MORE_HREF =- SELF_HOSTED_PRO_BILLING_USAGE_COUNTING_RULES_HREF;+export const MONITORED_SYSTEM_LIMIT_VIEW_CAPACITY_HREF = SELF_HOSTED_PRO_BILLING_PLAN_HREF;export const MONITORED_SYSTEM_LIMIT_INSTALL_COLLECTORS_HREF = '/settings';-export const MONITORED_SYSTEM_LIMIT_LEARN_MORE_LABEL = getMonitoredSystemLimitLearnMoreLabel();+export const MONITORED_SYSTEM_LIMIT_VIEW_CAPACITY_LABEL =+ getMonitoredSystemLimitViewCapacityLabel();export const MONITORED_SYSTEM_LIMIT_INSTALL_COLLECTORS_LABEL =getMonitoredSystemLimitInstallCollectorsLabel();export const MONITORED_SYSTEM_LIMIT_UPGRADE_LABEL = getMonitoredSystemLimitUpgradeLabel();diff --git a/frontend-modern/src/components/shared/useMonitoredSystemLimitWarningBannerState.ts b/frontend-modern/src/components/shared/useMonitoredSystemLimitWarningBannerState.tsindex ca38f5a693..7fde360443 100644--- a/frontend-modern/src/components/shared/useMonitoredSystemLimitWarningBannerState.ts+++ b/frontend-modern/src/components/shared/useMonitoredSystemLimitWarningBannerState.ts@@ -6,10 +6,8 @@ import {loadRuntimeCapabilities,} from '@/stores/license';import {- commercialOverflowDaysRemaining,getUpgradeActionDestination,hasMigrationGap,- legacyConnections,} from '@/stores/licenseCommercial';import { resolveUpgradeDestination } from '@/utils/upgradeNavigation';import {@@ -23,14 +21,11 @@ import {} from '@/utils/upgradeMetrics';import {getMonitoredSystemBannerToneClass,- getMonitoredSystemMigrationMessage,- getMonitoredSystemMigrationTextClass,- getMonitoredSystemOverflowSummary,getMonitoredSystemSummary,isMonitoredSystemLimitUrgent,MONITORED_SYSTEM_LIMIT_INSTALL_COLLECTORS_HREF,MONITORED_SYSTEM_LIMIT_KEY,- MONITORED_SYSTEM_LIMIT_LEARN_MORE_HREF,+ MONITORED_SYSTEM_LIMIT_VIEW_CAPACITY_HREF,shouldShowMonitoredSystemLimitBanner,} from './monitoredSystemLimitWarningBannerModel';@@ -50,30 +45,31 @@ export function useMonitoredSystemLimitWarningBannerState() {shouldShowMonitoredSystemLimitBanner(monitoredSystemLimit(), monitoredSystemCapacity()),);const migrationGap = createMemo(() => hasMigrationGap());- const migrationCounts = createMemo(() => legacyConnections());const monitoredSystemSummary = createMemo(() =>getMonitoredSystemSummary(monitoredSystemLimit(), monitoredSystemCapacity()),);- const migrationMessage = createMemo(() => getMonitoredSystemMigrationMessage(migrationCounts()));- const overflowSummary = createMemo(() =>- getMonitoredSystemOverflowSummary(commercialOverflowDaysRemaining()),- );const toneClass = createMemo(() => getMonitoredSystemBannerToneClass(isUrgent()));- const migrationTextClass = createMemo(() => getMonitoredSystemMigrationTextClass(isUrgent()));- const learnMoreDestination = createMemo(() =>- resolveUpgradeDestination(MONITORED_SYSTEM_LIMIT_LEARN_MORE_HREF),+ const suppressUpgrade = createMemo(+ () =>+ monitoredSystemCapacity()?.reason?.trim().toLowerCase() ===+ 'legacy_migration_capture_pending',+ );+ const viewCapacityDestination = createMemo(() =>+ resolveUpgradeDestination(MONITORED_SYSTEM_LIMIT_VIEW_CAPACITY_HREF),);const installCollectorsDestination = createMemo(() =>resolveUpgradeDestination(MONITORED_SYSTEM_LIMIT_INSTALL_COLLECTORS_HREF),);const upgradeDestination = createMemo(() =>- scopeSelfHostedBillingDestination(- getUpgradeActionDestination(MONITORED_SYSTEM_LIMIT_KEY),- 'plan',- {- intent: SELF_HOSTED_PRO_BILLING_MONITORED_SYSTEM_INTENT,- },- ),+ suppressUpgrade()+ ? null+ : scopeSelfHostedBillingDestination(+ getUpgradeActionDestination(MONITORED_SYSTEM_LIMIT_KEY),+ 'plan',+ {+ intent: SELF_HOSTED_PRO_BILLING_MONITORED_SYSTEM_INTENT,+ },+ ),);let wasUrgent = false;@@ -109,12 +105,9 @@ export function useMonitoredSystemLimitWarningBannerState() {handleUpgradeClick,installCollectorsDestination,isUrgent,- learnMoreDestination,+ viewCapacityDestination,migrationGap,- migrationMessage,- migrationTextClass,monitoredSystemSummary,- overflowSummary,showBanner,toneClass,upgradeDestination,diff --git a/frontend-modern/src/utils/__tests__/frontendResourceTypeBoundaries.test.ts b/frontend-modern/src/utils/__tests__/frontendResourceTypeBoundaries.test.tsindex 81ec737e53..180bdf3ce7 100644--- a/frontend-modern/src/utils/__tests__/frontendResourceTypeBoundaries.test.ts+++ b/frontend-modern/src/utils/__tests__/frontendResourceTypeBoundaries.test.ts@@ -2992,7 +2992,7 @@ describe('frontend resource type boundaries', () => {'useMonitoredSystemLimitWarningBannerState',);expect(monitoredSystemLimitWarningBannerSource).toContain(- 'MONITORED_SYSTEM_LIMIT_LEARN_MORE_LABEL',+ 'MONITORED_SYSTEM_LIMIT_VIEW_CAPACITY_LABEL',);expect(monitoredSystemLimitWarningBannerSource).not.toContain('createEffect');expect(monitoredSystemLimitWarningBannerSource).not.toContain('createMemo');@@ -3003,11 +3003,9 @@ describe('frontend resource type boundaries', () => {expect(monitoredSystemLimitWarningBannerStateSource).toContain('createMemo');expect(monitoredSystemLimitWarningBannerStateSource).toContain('loadRuntimeCapabilities');expect(monitoredSystemLimitWarningBannerStateSource).toContain('trackUpgradeMetricEvent');- expect(monitoredSystemLimitWarningBannerStateSource).toContain('legacyConnections');+ expect(monitoredSystemLimitWarningBannerStateSource).toContain('hasMigrationGap');+ expect(monitoredSystemLimitWarningBannerStateSource).toContain('viewCapacityDestination');expect(monitoredSystemLimitWarningBannerStateSource).toContain('handleUpgradeClick');- expect(monitoredSystemLimitWarningBannerModelSource).toContain(- 'getMonitoredSystemMigrationMessage',- );expect(monitoredSystemLimitWarningBannerModelSource).toContain('getMonitoredSystemBannerToneClass',);diff --git a/frontend-modern/src/utils/__tests__/monitoredSystemPresentation.test.ts b/frontend-modern/src/utils/__tests__/monitoredSystemPresentation.test.tsindex fdea07c6ea..70f0f73b01 100644--- a/frontend-modern/src/utils/__tests__/monitoredSystemPresentation.test.ts+++ b/frontend-modern/src/utils/__tests__/monitoredSystemPresentation.test.ts@@ -6,6 +6,7 @@ import monitoredSystemLimitWarningBannerModelSource from '@/components/shared/moimport licensePresentationSource from '@/utils/licensePresentation.ts?raw';import monitoredSystemPresentationSource from '@/utils/monitoredSystemPresentation.ts?raw';import {+ buildMonitoredSystemCapacitySectionModel,buildMonitoredSystemAdmissionPreviewUnavailableState,formatMonitoredSystemAdmissionPreviewUnavailableMessage,formatMonitoredSystemGroupedSourcesLabel,@@ -35,7 +36,7 @@ import {getMonitoredSystemLedgerPolicyLoadingState,getMonitoredSystemLedgerUnavailableState,getMonitoredSystemLimitInstallCollectorsLabel,- getMonitoredSystemLimitLearnMoreLabel,+ getMonitoredSystemLimitViewCapacityLabel,getMonitoredSystemLimitUnavailableReason,getMonitoredSystemLimitUpgradeLabel,getMonitoredSystemLimitUsageSummary,@@ -122,7 +123,7 @@ describe('monitoredSystemPresentation', () => {unknown: 'Pulse cannot determine a canonical runtime status for this monitored system yet.',},limitBanner: {- learnMoreLabel: 'Learn more',+ viewCapacityLabel: 'View capacity',installCollectorsLabel: 'Install v6 collectors',upgradeLabel: 'Upgrade to add more',overflowSummaryPrefix:@@ -228,14 +229,14 @@ describe('monitoredSystemPresentation', () => {});it('returns canonical monitored-system limit warning copy', () => {- expect(getMonitoredSystemLimitLearnMoreLabel()).toBe('Learn more');+ expect(getMonitoredSystemLimitViewCapacityLabel()).toBe('View capacity');expect(getMonitoredSystemLimitInstallCollectorsLabel()).toBe('Install v6 collectors');expect(getMonitoredSystemLimitUpgradeLabel()).toBe('Upgrade to add more');expect(formatMonitoredSystemLimitSummary({ current: 5, limit: 6 })).toBe(- '5 of 6 included monitored systems are in use.',+ '1 remaining. 5 monitored, 6 included.',);expect(formatMonitoredSystemLimitSummary({ current: 16, limit: 5, state: 'enforced' })).toBe(- '16 monitored systems active. Current plan includes 5, and this installation is already over plan by 11 because it exceeded the limit before new monitored systems were blocked. Existing monitoring continues, but new monitored systems are blocked until usage is reduced or the plan is upgraded.',+ 'Over plan by 11. 16 monitored, 5 included.',);expect(formatMonitoredSystemLimitSummary(@@ -254,7 +255,7 @@ describe('monitoredSystemPresentation', () => {},),).toBe(- '16 monitored systems active. Current plan includes 5, and Pulse is still verifying the migrated v5 continuity floor for this installation. Existing monitoring continues while new monitored systems are temporarily blocked against the current plan limit until continuity capture finishes.',+ 'Continuity verification pending. 16 monitored, 5 included.',);expect(formatMonitoredSystemLegacyConnectionBreakdown({@@ -278,6 +279,29 @@ describe('monitoredSystemPresentation', () => {expect(formatMonitoredSystemOverflowSummary(undefined)).toBe('');});+ it('builds a monitored-system capacity section model for the plan surface', () => {+ expect(+ buildMonitoredSystemCapacitySectionModel({+ current: 16,+ limit: 5,+ current_available: true,+ state: 'enforced',+ }),+ ).toEqual({+ stats: [+ { label: 'Monitored', value: '16 monitored systems' },+ { label: 'Included', value: '5' },+ { label: 'Status', value: 'Over plan by 11' },+ ],+ statusMessage: 'Existing monitoring continues. New monitored systems are blocked.',+ detailMessage: 'Reduce usage or upgrade to add another monitored system.',+ explanation: {+ label: 'Why am I over plan?',+ body: 'This installation was already monitoring 16 monitored systems before Pulse started blocking net-new monitored systems at the current plan boundary. Pulse keeps those existing systems visible, but it blocks any additional monitored systems until usage is reduced or the plan is upgraded.',+ },+ });+ });+it('centralizes monitored-system limit availability and capacity presentation', () => {const unavailableLimit = {current: 0,diff --git a/frontend-modern/src/utils/monitoredSystemPresentation.ts b/frontend-modern/src/utils/monitoredSystemPresentation.tsindex 2af01731e1..0101503c29 100644--- a/frontend-modern/src/utils/monitoredSystemPresentation.ts+++ b/frontend-modern/src/utils/monitoredSystemPresentation.ts@@ -80,7 +80,7 @@ const MONITORED_SYSTEM_LEDGER_PRESENTATION = {unknown: 'Pulse cannot determine a canonical runtime status for this monitored system yet.',},limitBanner: {- learnMoreLabel: 'Learn more',+ viewCapacityLabel: 'View capacity',installCollectorsLabel: 'Install v6 collectors',upgradeLabel: 'Upgrade to add more',overflowSummaryPrefix:@@ -154,6 +154,16 @@ export type MonitoredSystemAdmissionPreviewUnavailableState = {message: string;};+export type MonitoredSystemCapacitySectionModel = {+ stats: Array<{ label: string; value: string }>;+ statusMessage: string;+ detailMessage?: string;+ explanation?: {+ label: string;+ body: string;+ };+};+export type MonitoredSystemAdmissionPreviewSaveState = {preview?: { would_exceed_limit?: boolean | null } | null;unavailableState?: MonitoredSystemAdmissionPreviewUnavailableState | null;@@ -449,6 +459,91 @@ export function getMonitoredSystemLimitContextSummary(}}+export function buildMonitoredSystemCapacitySectionModel(+ limit?: MonitoredSystemLimitUsageStatus | null,+ capacity?: MonitoredSystemCapacityStatus | null,+): MonitoredSystemCapacitySectionModel | null {+ const resolved = resolveMonitoredSystemCapacityStatus(capacity, limit);+ if (!resolved) {+ return null;+ }++ const includedValue =+ resolved.mode === 'unlimited'+ ? MONITORED_SYSTEM_LEDGER_PRESENTATION.unlimitedLimitLabel+ : resolved.limit > 0+ ? String(resolved.limit)+ : MONITORED_SYSTEM_LEDGER_PRESENTATION.remainingCapacityUnavailableLabel;++ const stats = [+ {+ label: 'Monitored',+ value: getMonitoredSystemLimitUsageSummary(limit, capacity),+ },+ {+ label: 'Included',+ value: includedValue,+ },+ {+ label: 'Status',+ value: getMonitoredSystemLimitCapacityStatusSummary(limit, capacity),+ },+ ];++ if (!resolved.current_available) {+ return {+ stats,+ statusMessage: 'Pulse is verifying monitored-system usage for this installation.',+ detailMessage: formatMonitoredSystemUsageUnavailableMessage(+ resolved.current_unavailable_reason,+ ),+ };+ }++ switch (resolved.mode) {+ case 'unlimited':+ return {+ stats,+ statusMessage: 'This plan does not cap monitored systems.',+ };+ case 'at_limit_blocking_new':+ return {+ stats,+ statusMessage: 'Existing monitoring continues. New monitored systems are blocked.',+ detailMessage: 'Reduce usage or upgrade to add another monitored system.',+ };+ case 'over_limit_frozen':+ if (resolved.reason === 'legacy_migration_capture_pending') {+ return {+ stats,+ statusMessage:+ 'Existing monitoring continues. New monitored systems are temporarily blocked.',+ detailMessage:+ 'Pulse is still verifying migrated v5 continuity for this installation.',+ explanation: {+ label: 'Why is continuity still pending?',+ body: `Pulse is still verifying the grandfathered monitored-system floor for this migrated v5 installation. The current plan includes ${resolved.limit}, while this installation is already monitoring ${resolved.current}. Existing monitoring continues while new monitored systems are temporarily blocked against the current plan limit until continuity capture finishes.`,+ },+ };+ }+ return {+ stats,+ statusMessage: 'Existing monitoring continues. New monitored systems are blocked.',+ detailMessage: 'Reduce usage or upgrade to add another monitored system.',+ explanation: {+ label: 'Why am I over plan?',+ body: `This installation was already monitoring ${resolved.current} monitored systems before Pulse started blocking net-new monitored systems at the current plan boundary. Pulse keeps those existing systems visible, but it blocks any additional monitored systems until usage is reduced or the plan is upgraded.`,+ },+ };+ default:+ return {+ stats,+ statusMessage: 'New monitored systems can still be added.',+ detailMessage: `${resolved.available_slots} remaining before new monitored systems are blocked.`,+ };+ }+}+export function isMonitoredSystemLimitUrgent(limit?: MonitoredSystemLimitUsageStatus | null,capacity?: MonitoredSystemCapacityStatus | null,@@ -475,8 +570,8 @@ export function getMonitoredSystemStatusFallbackSummary(return MONITORED_SYSTEM_LEDGER_PRESENTATION.statusSummaryByStatus[status];}-export function getMonitoredSystemLimitLearnMoreLabel(): string {- return MONITORED_SYSTEM_LEDGER_PRESENTATION.limitBanner.learnMoreLabel;+export function getMonitoredSystemLimitViewCapacityLabel(): string {+ return MONITORED_SYSTEM_LEDGER_PRESENTATION.limitBanner.viewCapacityLabel;}export function getMonitoredSystemLimitInstallCollectorsLabel(): string {@@ -583,17 +678,15 @@ export function formatMonitoredSystemLimitSummary(switch (resolved.mode) {case 'over_limit_frozen':if (resolved.reason === 'legacy_migration_capture_pending') {- return `${formatMonitoredSystemCount(resolved.current)} active. Current plan includes ${resolved.limit}, and Pulse is still verifying the migrated v5 continuity floor for this installation. Existing monitoring continues while new monitored systems are temporarily blocked against the current plan limit until continuity capture finishes.`;+ return `Continuity verification pending. ${resolved.current} monitored, ${resolved.limit} included.`;}- return `${formatMonitoredSystemCount(resolved.current)} active. Current plan includes ${- resolved.limit- }, and this installation is already over plan by ${resolved.overage} because it exceeded the limit before new monitored systems were blocked. Existing monitoring continues, but new monitored systems are blocked until usage is reduced or the plan is upgraded.`;+ return `Over plan by ${resolved.overage}. ${resolved.current} monitored, ${resolved.limit} included.`;case 'at_limit_blocking_new':- return `All ${resolved.limit} included monitored systems are in use. Existing monitoring continues, but new monitored systems are now blocked until capacity is freed or the plan is upgraded.`;+ return `At plan limit. ${resolved.current} monitored, ${resolved.limit} included.`;case 'unlimited':- return `${formatMonitoredSystemCount(resolved.current)} active.`;+ return `${resolved.current} monitored.`;default:- return `${resolved.current} of ${resolved.limit} included monitored systems are in use.`;+ return `${resolved.available_slots} remaining. ${resolved.current} monitored, ${resolved.limit} included.`;}}diff --git a/tests/integration/tests/54-monitored-system-billing-focus.spec.ts b/tests/integration/tests/54-monitored-system-billing-focus.spec.tsindex a05ea6d2f1..e270d27f49 100644--- a/tests/integration/tests/54-monitored-system-billing-focus.spec.ts+++ b/tests/integration/tests/54-monitored-system-billing-focus.spec.ts@@ -253,17 +253,12 @@ async function openPageWithUrgentMonitoredSystemBanner(page: Page) {waitUntil: "domcontentloaded",});await expect(- page.getByRole("status").filter({ hasText: "over plan by 11" }),- ).toBeVisible();- await expect(- page.getByRole("status").filter({- hasText: "exceeded the limit before new monitored systems were blocked",- }),+ page.getByRole("status").filter({ hasText: "Over plan by 11. 16 monitored, 5 included." }),).toBeVisible();}test.describe("Monitored-system billing focus", () => {- test("keeps Learn more and Upgrade arrivals distinct on the billing surface", async ({+test("keeps capacity and upgrade arrivals distinct on the billing surface", async ({page,}, testInfo) => {test.skip(@@ -276,31 +271,33 @@ test.describe("Monitored-system billing focus", () => {const banner = page.getByRole("status")- .filter({ hasText: "over plan by 11" });+ .filter({ hasText: "Over plan by 11. 16 monitored, 5 included." });- await banner.getByRole("link", { name: "Learn more" }).click();- await page.waitForURL(- "**/settings/system/billing/usage?details=counting-rules",- );- await expect(page.getByRole("tab", { name: "Usage" })).toHaveAttribute(+ await banner.getByRole("link", { name: "View capacity" }).click();+ await page.waitForURL("**/settings/system/billing/plan");+ await expect(page.getByRole("tab", { name: "Plan" })).toHaveAttribute("aria-selected","true",);await expect(- page.getByRole("button", { name: "Hide counting rules" }),+ page+ .getByText("Existing monitoring continues. New monitored systems are blocked."),).toBeVisible();+ await expect(page.getByText("Why am I over plan?")).toBeVisible();+ await expect(page.getByRole("link", { name: "Review monitored systems" })).toHaveAttribute(+ "href",+ "/settings/system/billing/usage",+ );++ await page.getByRole("link", { name: "Review monitored systems" }).click();+ await page.waitForURL("**/settings/system/billing/usage");+ await expect(page.getByRole("tab", { name: "Usage" })).toHaveAttribute(+ "aria-selected",+ "true",+ );+ await expect(page.getByRole("button", { name: "View counting rules" })).toBeVisible();await expect(page.getByText("Counts as 1 monitored system")).toBeVisible();await expect(page.getByText("1 grouped source")).toBeVisible();- await expect(- page- .getByText(- "Counts as one monitored system because Pulse merged multiple top-level views into one canonical cluster.",- )- .first(),- ).toBeVisible();- await expect(- page.getByText("edge-cluster (Cluster via Kubernetes)").first(),- ).toBeVisible();await openPageWithUrgentMonitoredSystemBanner(page);