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.

Govern monitored system presentation helper

rcourtman4539389ca056
diff --git a/docs/release-control/v6/internal/subsystems/cloud-paid.md b/docs/release-control/v6/internal/subsystems/cloud-paid.md
index 3ec66a7453..8974ea44d4 100644
--- a/docs/release-control/v6/internal/subsystems/cloud-paid.md
+++ b/docs/release-control/v6/internal/subsystems/cloud-paid.md
@@ -69,7 +69,8 @@ agreement, and cloud-specific enforcement rules.
47. `frontend-modern/src/utils/apiClient.ts`
48. `frontend-modern/src/utils/cloudPlans.ts`
49. `frontend-modern/src/utils/commercialBillingModel.ts`
-50. `frontend-modern/src/utils/selfHostedPlans.ts`
+50. `frontend-modern/src/utils/monitoredSystemPresentation.ts`
+51. `frontend-modern/src/utils/selfHostedPlans.ts`
## Shared Boundaries
@@ -94,10 +95,11 @@ agreement, and cloud-specific enforcement rules.
12. Add or change shared commercial plan/usage presentation through `frontend-modern/src/components/Settings/CommercialBillingSections.tsx` and `frontend-modern/src/utils/commercialBillingModel.ts`
13. Add or change organization billing and usage presentation through `frontend-modern/src/components/Settings/OrganizationBillingPanel.tsx`, `frontend-modern/src/components/Settings/OrganizationBillingLoadingState.tsx`, and `frontend-modern/src/components/Settings/useOrganizationBillingPanelState.ts`
14. Add or change self-hosted Pro activation, trial, and entitlement actions through `frontend-modern/src/components/Settings/ProLicensePanel.tsx`, `frontend-modern/src/components/Settings/ProLicensePlanSection.tsx`, `frontend-modern/src/components/Settings/SelfHostedCommercialActivationSection.tsx`, and `frontend-modern/src/components/Settings/useProLicensePanelState.ts`
-15. Add or change paid relay settings and onboarding presentation through `frontend-modern/src/components/Settings/RelaySettingsPanel.tsx`, `frontend-modern/src/components/Settings/RelayPairingSection.tsx`, `frontend-modern/src/components/Settings/useRelaySettingsPanelState.ts`, `frontend-modern/src/components/Dashboard/RelayOnboardingCard.tsx`, and `frontend-modern/src/components/Dashboard/useRelayOnboardingCardState.ts`
-16. Add or change cloud plan presentation through `frontend-modern/src/pages/CloudPricing.tsx`
-17. Add contract tests where runtime and pricing need to stay aligned
-18. Add or change hosted browser org-context bootstrap through `frontend-modern/src/App.tsx`, `frontend-modern/src/AppLayout.tsx`, `frontend-modern/src/useAppRuntimeState.ts`, and `frontend-modern/src/utils/apiClient.ts`
+15. Add or change monitored-system ledger presentation through `frontend-modern/src/components/Settings/MonitoredSystemLedgerPanel.tsx`, `frontend-modern/src/components/Commercial/MonitoredSystemDefinitionDisclosure.tsx`, and `frontend-modern/src/utils/monitoredSystemPresentation.ts`
+16. Add or change paid relay settings and onboarding presentation through `frontend-modern/src/components/Settings/RelaySettingsPanel.tsx`, `frontend-modern/src/components/Settings/RelayPairingSection.tsx`, `frontend-modern/src/components/Settings/useRelaySettingsPanelState.ts`, `frontend-modern/src/components/Dashboard/RelayOnboardingCard.tsx`, and `frontend-modern/src/components/Dashboard/useRelayOnboardingCardState.ts`
+17. Add or change cloud plan presentation through `frontend-modern/src/pages/CloudPricing.tsx`
+18. Add contract tests where runtime and pricing need to stay aligned
+19. Add or change hosted browser org-context bootstrap through `frontend-modern/src/App.tsx`, `frontend-modern/src/AppLayout.tsx`, `frontend-modern/src/useAppRuntimeState.ts`, and `frontend-modern/src/utils/apiClient.ts`
## Forbidden Paths
@@ -235,6 +237,11 @@ timestamp there so a degraded reason and a fresher grouped signal remain
readable together. When mixed-version payloads omit that canonical freshest
signal entirely, the settings surface should degrade to a safe customer-facing
fallback instead of an unexplained placeholder glyph.
+That same billing support boundary now also owns the shared monitored-system
+presentation helper. `frontend-modern/src/utils/monitoredSystemPresentation.ts`
+is the canonical owner for ledger labels, safe fallback summaries, and
+source/type attribution wording, so the settings panel must consume that
+helper instead of redefining customer-facing monitored-system copy inline.
Frontend billing/admin surfaces must not synthesize `plan_version` from
subscription lifecycle state. When a hosted billing record lacks a plan label,
the UI must preserve that absence instead of fabricating values like `active`
diff --git a/docs/release-control/v6/internal/subsystems/registry.json b/docs/release-control/v6/internal/subsystems/registry.json
index 52f08ea868..59b2698f6c 100644
--- a/docs/release-control/v6/internal/subsystems/registry.json
+++ b/docs/release-control/v6/internal/subsystems/registry.json
@@ -1374,6 +1374,7 @@
"frontend-modern/src/utils/apiClient.ts",
"frontend-modern/src/utils/cloudPlans.ts",
"frontend-modern/src/utils/commercialBillingModel.ts",
+ "frontend-modern/src/utils/monitoredSystemPresentation.ts",
"frontend-modern/src/utils/selfHostedPlans.ts",
"internal/api/public_signup_handlers.go",
"internal/cloudcp/account/tenant_handlers.go",
@@ -1802,6 +1803,19 @@
"frontend-modern/src/components/Settings/__tests__/ProLicensePanel.test.tsx"
]
},
+ {
+ "id": "monitored-system-presentation-helper",
+ "label": "monitored system presentation helper proof",
+ "match_prefixes": [],
+ "match_files": [
+ "frontend-modern/src/utils/monitoredSystemPresentation.ts"
+ ],
+ "allow_same_subsystem_tests": false,
+ "test_prefixes": [],
+ "exact_files": [
+ "frontend-modern/src/utils/__tests__/monitoredSystemPresentation.test.ts"
+ ]
+ },
{
"id": "commercial-plan-models",
"label": "commercial plan model proof",
diff --git a/frontend-modern/src/components/Settings/__tests__/settingsArchitecture.test.ts b/frontend-modern/src/components/Settings/__tests__/settingsArchitecture.test.ts
index 41b19089b8..cd976b97b7 100644
--- a/frontend-modern/src/components/Settings/__tests__/settingsArchitecture.test.ts
+++ b/frontend-modern/src/components/Settings/__tests__/settingsArchitecture.test.ts
@@ -78,11 +78,13 @@ import recoverySettingsPanelSource from '../RecoverySettingsPanel.tsx?raw';
import systemSettingsStateSource from '../useSystemSettingsState.ts?raw';
import relaySettingsPanelSource from '../RelaySettingsPanel.tsx?raw';
import relayPairingSectionSource from '../RelayPairingSection.tsx?raw';
+import monitoredSystemLedgerPanelSource from '../MonitoredSystemLedgerPanel.tsx?raw';
import proLicensePanelSource from '../ProLicensePanel.tsx?raw';
import proLicensePlanSectionSource from '../ProLicensePlanSection.tsx?raw';
import commercialBillingSectionsSource from '../CommercialBillingSections.tsx?raw';
import selfHostedCommercialActivationSectionSource from '../SelfHostedCommercialActivationSection.tsx?raw';
import commercialBillingModelSource from '@/utils/commercialBillingModel.ts?raw';
+import monitoredSystemPresentationSource from '@/utils/monitoredSystemPresentation.ts?raw';
import relaySettingsPanelStateSource from '../useRelaySettingsPanelState.ts?raw';
import proLicensePanelStateSource from '../useProLicensePanelState.ts?raw';
import organizationOverviewPanelSource from '../OrganizationOverviewPanel.tsx?raw';
@@ -503,10 +505,19 @@ describe('Settings architecture guardrails', () => {
expect(proLicensePanelSource).toContain('CommercialSection');
expect(proLicensePanelSource).not.toContain('createSignal(');
expect(proLicensePanelSource).not.toContain('useLocation()');
+ expect(monitoredSystemLedgerPanelSource).toContain('@/utils/monitoredSystemPresentation');
+ expect(monitoredSystemLedgerPanelSource).toContain('getMonitoredSystemLedgerPresentation');
+ expect(monitoredSystemLedgerPanelSource).toContain('getMonitoredSystemCountingDetailsToggleLabel');
+ expect(monitoredSystemLedgerPanelSource).not.toContain('No monitored systems counted.');
+ expect(monitoredSystemLedgerPanelSource).not.toContain('Current status');
expect(proLicensePanelStateSource).toContain('buildSelfHostedCommercialPlanModel');
expect(proLicensePanelStateSource).toContain('loadLicenseStatus(true)');
expect(proLicensePlanSectionSource).toContain('CommercialStatGrid');
expect(proLicensePlanSectionSource).toContain('getLicenseStatusLoadingState');
+ expect(monitoredSystemPresentationSource).toContain('export function getMonitoredSystemLedgerPresentation');
+ expect(monitoredSystemPresentationSource).toContain(
+ 'export function getMonitoredSystemCountingDetailsToggleLabel',
+ );
expect(selfHostedCommercialActivationSectionSource).toContain('License / Activation Key');
expect(selfHostedCommercialActivationSectionSource).toContain('Start 14-day Pro Trial');
expect(organizationBillingPanelSource).toContain('./CommercialBillingSections');
diff --git a/frontend-modern/src/utils/__tests__/frontendResourceTypeBoundaries.test.ts b/frontend-modern/src/utils/__tests__/frontendResourceTypeBoundaries.test.ts
index 0575ea41f9..7b64a7ed6c 100644
--- a/frontend-modern/src/utils/__tests__/frontendResourceTypeBoundaries.test.ts
+++ b/frontend-modern/src/utils/__tests__/frontendResourceTypeBoundaries.test.ts
@@ -60,6 +60,7 @@ import trialBannerSource from '@/components/shared/TrialBanner.tsx?raw';
import trialBannerModelSource from '@/components/shared/trialBannerModel.ts?raw';
import monitoredSystemLimitWarningBannerSource from '@/components/shared/MonitoredSystemLimitWarningBanner.tsx?raw';
import monitoredSystemLimitWarningBannerModelSource from '@/components/shared/monitoredSystemLimitWarningBannerModel.ts?raw';
+import monitoredSystemLedgerPanelSource from '@/components/Settings/MonitoredSystemLedgerPanel.tsx?raw';
import infrastructureSummaryTableSource from '@/components/shared/InfrastructureSummaryTable.tsx?raw';
import infrastructureSummaryTableRowSource from '@/components/shared/InfrastructureSummaryTableRow.tsx?raw';
import interactiveSparklineSource from '@/components/shared/InteractiveSparkline.tsx?raw';
@@ -108,6 +109,7 @@ import sourcePlatformsSource from '@/utils/sourcePlatforms.ts?raw';
import storageSourcesSource from '@/utils/storageSources.ts?raw';
import rbacPermissionsSource from '@/utils/rbacPermissions.ts?raw';
import systemSettingsPresentationSource from '@/utils/systemSettingsPresentation.ts?raw';
+import monitoredSystemPresentationSource from '@/utils/monitoredSystemPresentation.ts?raw';
import updatesSettingsPanelSource from '@/components/Settings/UpdatesSettingsPanel.tsx?raw';
import copyCommandBlockSource from '@/components/Settings/CopyCommandBlock.tsx?raw';
import updateInstallGuideSource from '@/components/Settings/UpdateInstallGuide.tsx?raw';
@@ -2994,6 +2996,22 @@ describe('frontend resource type boundaries', () => {
expect(monitoredSystemLimitWarningBannerModelSource).toContain(
'MONITORED_SYSTEM_LIMIT_INSTALL_COLLECTORS_LABEL',
);
+ expect(monitoredSystemLedgerPanelSource).toContain('@/utils/monitoredSystemPresentation');
+ expect(monitoredSystemLedgerPanelSource).toContain('getMonitoredSystemLedgerPresentation');
+ expect(monitoredSystemLedgerPanelSource).toContain(
+ 'getMonitoredSystemCountingDetailsToggleLabel',
+ );
+ expect(monitoredSystemLedgerPanelSource).not.toContain('No monitored systems counted.');
+ expect(monitoredSystemLedgerPanelSource).not.toContain('Current status');
+ expect(monitoredSystemPresentationSource).toContain(
+ 'export function getMonitoredSystemLedgerPresentation',
+ );
+ expect(monitoredSystemPresentationSource).toContain(
+ 'export function getMonitoredSystemCountingDetailsToggleLabel',
+ );
+ expect(monitoredSystemPresentationSource).toContain(
+ 'export function formatMonitoredSystemLatestIncludedSignalSentence',
+ );
expect(whatsNewModalSource).toContain('useWhatsNewModalState');
expect(whatsNewModalSource).toContain('WHATS_NEW_FEATURE_CARDS');
expect(whatsNewModalSource).not.toContain('createLocalStorageBooleanSignal');