diff --git a/docs/release-control/v6/internal/subsystems/alerts.md b/docs/release-control/v6/internal/subsystems/alerts.md index db2ad528a..ce0ddf38f 100644 --- a/docs/release-control/v6/internal/subsystems/alerts.md +++ b/docs/release-control/v6/internal/subsystems/alerts.md @@ -84,6 +84,12 @@ operator-facing alert routing behavior for live runtime alerts. 62. `frontend-modern/src/components/Alerts/IncidentAssistantHandoffButton.tsx` 63. `frontend-modern/src/components/Alerts/incidentAssistantHandoffModel.ts` 64. `internal/alerts/storage_override_identity.go` +65. `internal/alerts/unified_eval.go` +66. `frontend-modern/src/components/Alerts/ThresholdsTable.tsx` +67. `frontend-modern/src/features/alerts/thresholds/hooks/useThresholdsData.ts` +68. `frontend-modern/src/features/alerts/thresholds/hooks/useThresholdsPlatformData.ts` +69. `frontend-modern/src/utils/alertTargetTypes.ts` +70. `frontend-modern/src/types/alerts.ts` ## Shared Boundaries @@ -127,6 +133,12 @@ operator-facing alert routing behavior for live runtime alerts. handoffs must not add suggested prompt chips or route-owned remediation instructions; the configured model owns investigation and next-step reasoning after it receives the context. +9. Add or change alert target resource types through + `internal/alerts/specs/types.go`, `internal/alerts/config/identity.go`, + `internal/alerts/unified_eval.go`, and + `frontend-modern/src/utils/alertTargetTypes.ts`. Supported target types + must share the unified evaluator, the canonical threshold/override identity + chain, and the standard notification delivery path. ## Forbidden Paths @@ -167,6 +179,22 @@ alert feature gating from the shared entitlements layer, not from a per-surface Canonical alert identity and evaluation are the live runtime model. Remaining legacy references should exist only in explicit migration or negative test boundaries. +All v6 platform alert targets must enter runtime threshold evaluation through +`UnifiedResourceInput` and `internal/alerts/unified_eval.go`: Proxmox guests/ +nodes/storage, Docker hosts/containers/services, Kubernetes clusters/nodes/ +namespaces/deployments/pods, TrueNAS systems/pools/datasets/disks, VMware +vSphere hosts/VMs/datastores/networks, PBS, PMG, and standalone host agents. +Adding a platform-local evaluator branch for these resource families is +forbidden. +Per-platform defaults, per-resource overrides, global disables, active-alert +reevaluation, history persistence, and notification delivery must use the same +alert configuration shape rather than a platform-specific sidecar. +The browser thresholds surface is also platform-shaped: Proxmox, Docker, +Kubernetes, TrueNAS, vSphere, PBS, PMG, and Systems. It must use the shared +FilterBar chip and "+ Filter" pattern for resource filtering, and alert tables +must use the canonical platform table column-kind alignment helpers from +`frontend-modern/src/features/platformPage/` rather than hard-coded table +alignment classes. Guest metric canonical state remains resource-backed and therefore node-scoped for Proxmox guests, so node moves must not strand active alert state on the previous resource ID. When a guest metric alert survives a node move, alerts @@ -625,19 +653,25 @@ shell composition for search/help/nav plus bulk-edit dialog flow, while the tab render owners live in `frontend-modern/src/components/Alerts/ThresholdsTableProxmoxTab.tsx`, `frontend-modern/src/components/Alerts/ThresholdsTablePMGTab.tsx`, -`frontend-modern/src/components/Alerts/ThresholdsTableAgentsTab.tsx`, and -`frontend-modern/src/components/Alerts/ThresholdsTableDockerTab.tsx`. New +`frontend-modern/src/components/Alerts/ThresholdsTableAgentsTab.tsx`, +`frontend-modern/src/components/Alerts/ThresholdsTableDockerTab.tsx`, +`frontend-modern/src/components/Alerts/ThresholdsTableKubernetesTab.tsx`, +`frontend-modern/src/components/Alerts/ThresholdsTableTrueNASTab.tsx`, +`frontend-modern/src/components/Alerts/ThresholdsTableVMwareTab.tsx`, and +`frontend-modern/src/components/Alerts/ThresholdsTablePBSTab.tsx`. New threshold row grouping, override-ID compatibility, resource normalization, thresholds-table controller logic, or per-tab runtime should land in those feature hooks and tab owners rather than being rebuilt inside the shell. -The shell-owned thresholds sub-routes are now the neutral user-facing paths -`/alerts/thresholds/infrastructure`, `/alerts/thresholds/systems`, -`/alerts/thresholds/mail-gateway`, and `/alerts/thresholds/containers`. -Legacy `/alerts/thresholds/proxmox` and `/alerts/thresholds/agents` links -must redirect to the neutral infrastructure and systems routes so API-backed -platforms like TrueNAS do not remain stranded behind provider-specific deep -links. -Within the infrastructure tab, render-heavy ownership now further routes through +The shell-owned thresholds sub-routes are platform-shaped user-facing paths: +`/alerts/thresholds/proxmox`, `/alerts/thresholds/docker`, +`/alerts/thresholds/kubernetes`, `/alerts/thresholds/truenas`, +`/alerts/thresholds/vmware`, `/alerts/thresholds/pbs`, +`/alerts/thresholds/pmg`, and `/alerts/thresholds/systems`. Legacy neutral +links like `/alerts/thresholds/infrastructure`, +`/alerts/thresholds/containers`, and `/alerts/thresholds/mail-gateway` must +redirect to the matching platform-shaped route. Legacy +`/alerts/thresholds/agents` links must continue to resolve to Systems. +Within the Proxmox tab, render-heavy ownership now further routes through `frontend-modern/src/components/Alerts/ThresholdsTableProxmoxNodesSection.tsx`, `frontend-modern/src/components/Alerts/ThresholdsTableProxmoxPBSSection.tsx`, `frontend-modern/src/components/Alerts/ThresholdsTableProxmoxGuestsSection.tsx`, @@ -668,15 +702,18 @@ links into infrastructure, workloads, storage, and recovery. Pulse does not promise a TrueNAS-only alert workflow or provider-specific alert management surface beyond the shared alerts product. At the current locked VMware floor, alert support must mean the same shared -alert surfaces can evaluate, show, and drill into vSphere alarm and health -signals on canonical `agent`, `vm`, and `storage` resources, with related -event/task context routed through the shared incident and resource links. -Pulse must not grow a VMware-only alert shell, alarm editor, or direct alarm- -control surface in phase 1. +alert surfaces can evaluate, show, and drill into vSphere alarm, health, and +threshold signals on canonical `agent`, `vm`, `storage`, and `network` +resources, with related event/task context routed through the shared incident +and resource links. This is the alerts support floor for admitted vSphere +resources; it does not by itself promote the broader VMware platform readiness +state beyond the separately governed platform-admission floor. Pulse must not +grow a VMware-only alert shell, alarm editor, or direct alarm-control surface +in phase 1. That same VMware alert rule now also includes the topology boundary. Alarm context that originates on a datacenter, cluster, folder, or resource pool may inform a shared incident, but it must still resolve onto canonical `agent`, -`vm`, or `storage` investigation paths rather than creating synthetic +`vm`, `storage`, or `network` investigation paths rather than creating synthetic top-level VMware incident resources. If that attachment cannot be done honestly for a given signal, the signal should remain supporting context instead of inflating the support claim. diff --git a/docs/release-control/v6/internal/subsystems/frontend-primitives.md b/docs/release-control/v6/internal/subsystems/frontend-primitives.md index e35c6b173..bf5d0f2eb 100644 --- a/docs/release-control/v6/internal/subsystems/frontend-primitives.md +++ b/docs/release-control/v6/internal/subsystems/frontend-primitives.md @@ -161,6 +161,13 @@ work extends shared components instead of creating new local variants. ## Shared Boundaries +Alert thresholds consume the shared FilterBar primitive and route state, while +the alerts subsystem owns the resource data and platform-specific threshold +tabs. The thresholds platform IA is platform-shaped: Proxmox, Docker, +Kubernetes, TrueNAS, vSphere, PBS, PMG, and Systems. Frontend primitives own +the chip, reset, "+ Filter", and route-backed shell pattern; alerts must not +replace that with page-local search/tab chrome or legacy neutral buckets. + The System Updates install guide is a shared settings primitive, not a deployment-lane-only panel. `UpdateInstallGuide` must render the canonical update-plan readiness verdict inline with the update action, and a blocked @@ -341,6 +348,10 @@ filter chip or an explicit page-owned advanced selector. Platform-owned filter selectors must also exclude facet options from other platform scopes, even when the underlying shared surface is mounted from the same Workloads or Storage component. +Alert configuration tables follow the same primitive boundary: the alerts +owner supplies platform-specific threshold groups and filter catalog values, +while the shared FilterBar owns the chip, reset, and "+ Filter" interaction +shape so thresholds do not reintroduce page-local search/tab chrome. Platform sub-routes that add native provider inventory must stay on the shared platform page and table primitives. The vSphere Networks surface routes through `/vmware/networks`, the shared platform tab model, the command palette @@ -2946,17 +2957,23 @@ is now explicitly a shell consumer rather than the data or controller owner, and the tab render owners live in `frontend-modern/src/components/Alerts/ThresholdsTableProxmoxTab.tsx`, `frontend-modern/src/components/Alerts/ThresholdsTablePMGTab.tsx`, -`frontend-modern/src/components/Alerts/ThresholdsTableAgentsTab.tsx`, and -`frontend-modern/src/components/Alerts/ThresholdsTableDockerTab.tsx`. +`frontend-modern/src/components/Alerts/ThresholdsTableAgentsTab.tsx`, +`frontend-modern/src/components/Alerts/ThresholdsTableDockerTab.tsx`, +`frontend-modern/src/components/Alerts/ThresholdsTableKubernetesTab.tsx`, +`frontend-modern/src/components/Alerts/ThresholdsTableTrueNASTab.tsx`, +`frontend-modern/src/components/Alerts/ThresholdsTableVMwareTab.tsx`, and +`frontend-modern/src/components/Alerts/ThresholdsTablePBSTab.tsx`. `frontend-modern/src/features/alerts/thresholds/hooks/useThresholdsTableState.ts` -owns the neutral thresholds sub-route contract: -`/alerts/thresholds/infrastructure`, `/alerts/thresholds/systems`, -`/alerts/thresholds/mail-gateway`, and `/alerts/thresholds/containers`. -Legacy `/alerts/thresholds/proxmox` and `/alerts/thresholds/agents` links -must redirect to the neutral infrastructure and systems routes so API-backed -platforms such as TrueNAS stay on canonical page language rather than -provider-specific aliases. -The infrastructure tab is itself now a shell that composes +owns the platform-shaped thresholds sub-route contract: +`/alerts/thresholds/proxmox`, `/alerts/thresholds/docker`, +`/alerts/thresholds/kubernetes`, `/alerts/thresholds/truenas`, +`/alerts/thresholds/vmware`, `/alerts/thresholds/pbs`, +`/alerts/thresholds/pmg`, and `/alerts/thresholds/systems`. Legacy neutral +links such as `/alerts/thresholds/infrastructure`, +`/alerts/thresholds/containers`, and `/alerts/thresholds/mail-gateway` must +redirect to the matching platform-shaped route; legacy +`/alerts/thresholds/agents` links must continue to resolve to Systems. +The Proxmox tab is itself now a shell that composes `frontend-modern/src/components/Alerts/ThresholdsTableProxmoxNodesSection.tsx`, `frontend-modern/src/components/Alerts/ThresholdsTableProxmoxPBSSection.tsx`, `frontend-modern/src/components/Alerts/ThresholdsTableProxmoxGuestsSection.tsx`, diff --git a/docs/release-control/v6/internal/subsystems/monitoring.md b/docs/release-control/v6/internal/subsystems/monitoring.md index 1ef8ddbc4..5311ab065 100644 --- a/docs/release-control/v6/internal/subsystems/monitoring.md +++ b/docs/release-control/v6/internal/subsystems/monitoring.md @@ -72,6 +72,7 @@ truth for live infrastructure data. 48. `internal/truenas/provider.go` 49. `internal/models/ceph_cluster_identity.go` 50. `internal/truenas/types.go` +51. `internal/monitoring/monitor_alert_sync.go` ## Shared Boundaries @@ -240,6 +241,12 @@ truth for live infrastructure data. fields locally. Monitoring must preserve those objects as native cluster inventory instead of flattening them into pods, deployments, or generic networking, storage, configuration, or controller rows. +19. Add or change unified-resource alert synchronization through + `internal/monitoring/monitor_alert_sync.go` and the alerts subsystem + contract together. Monitoring may pass the current unified-resource snapshot + into the alert manager, but threshold selection, override identity, active + alert state, and notification delivery remain alerts-owned. The monitoring + sync bridge must not introduce per-platform evaluator branches. ## Forbidden Paths diff --git a/docs/release-control/v6/internal/subsystems/registry.json b/docs/release-control/v6/internal/subsystems/registry.json index 7d92c4beb..ff0fa38e2 100644 --- a/docs/release-control/v6/internal/subsystems/registry.json +++ b/docs/release-control/v6/internal/subsystems/registry.json @@ -1228,6 +1228,7 @@ "owned_files": [ "frontend-modern/src/pages/Alerts.tsx", "frontend-modern/src/stores/alertsActivation.ts", + "frontend-modern/src/types/alerts.ts", "frontend-modern/src/utils/alertActivationPresentation.ts", "frontend-modern/src/utils/alertAdministrationPresentation.ts", "frontend-modern/src/utils/alertBulkEditPresentation.ts", @@ -1243,6 +1244,7 @@ "frontend-modern/src/utils/alertSchedulePresentation.ts", "frontend-modern/src/utils/alertSeverityPresentation.ts", "frontend-modern/src/utils/alertTabsPresentation.ts", + "frontend-modern/src/utils/alertTargetTypes.ts", "frontend-modern/src/utils/alertThresholdDefaults.ts", "frontend-modern/src/utils/alertThresholdsPresentation.ts", "frontend-modern/src/utils/alertThresholdsSectionPresentation.ts", @@ -1303,6 +1305,7 @@ ], "match_files": [ "frontend-modern/src/pages/Alerts.tsx", + "frontend-modern/src/types/alerts.ts", "frontend-modern/src/utils/alertOverviewPresentation.ts" ], "allow_same_subsystem_tests": false, @@ -1325,7 +1328,21 @@ "frontend-modern/src/features/alerts/thresholds/__tests__/helpers.test.ts", "frontend-modern/src/features/alerts/thresholds/hooks/__tests__/useThresholdsTableState.test.tsx", "frontend-modern/src/pages/__tests__/Alerts.helpers.test.ts", - "frontend-modern/src/utils/__tests__/alertOverviewPresentation.test.ts" + "frontend-modern/src/utils/__tests__/alertOverviewPresentation.test.ts", + "frontend-modern/src/utils/__tests__/alertTargetTypes.test.ts" + ] + }, + { + "id": "alert-target-type-resolution", + "label": "alert target type resolver proof", + "match_prefixes": [], + "match_files": [ + "frontend-modern/src/utils/alertTargetTypes.ts" + ], + "allow_same_subsystem_tests": false, + "test_prefixes": [], + "exact_files": [ + "frontend-modern/src/utils/__tests__/alertTargetTypes.test.ts" ] }, { diff --git a/frontend-modern/src/components/Alerts/AlertResourceTableDesktop.tsx b/frontend-modern/src/components/Alerts/AlertResourceTableDesktop.tsx index 33ec0dd63..e8b1edf9a 100644 --- a/frontend-modern/src/components/Alerts/AlertResourceTableDesktop.tsx +++ b/frontend-modern/src/components/Alerts/AlertResourceTableDesktop.tsx @@ -17,6 +17,10 @@ import { getGroupedTableRowCellClass, getGroupedTableRowClass, } from '@/components/shared/groupedTableRowPresentation'; +import { + getPlatformTableCellClassForKind, + getPlatformTableHeadClassForKind, +} from '@/features/platformPage/sharedPlatformPage'; import { AlertResourceTableRow } from './AlertResourceTableRow'; import { AlertResourceGroupHeader } from './AlertResourceGroupHeader'; import { @@ -31,6 +35,7 @@ import { getAlertResourceTableNoResultsState, } from '@/utils/alertResourceTablePresentation'; import { + getAlertResourceColumnKind, getAlertResourceColumnHeaderTooltip, getAlertResourceEnabledDefault, getAlertResourceMetricBounds, @@ -115,7 +120,9 @@ export function AlertResourceTableDesktop(props: AlertResourceTableDesktopProps) - + - Alerts - Resource + + Alerts + + + Resource + {(column) => ( {column} @@ -143,11 +154,14 @@ export function AlertResourceTableDesktop(props: AlertResourceTableDesktopProps) )} - + Offline Alerts - Actions + Actions @@ -162,12 +176,18 @@ export function AlertResourceTableDesktop(props: AlertResourceTableDesktopProps) class={`bg-surface-alt ${props.table.globalDisableFlag?.() ? 'opacity-40' : ''}`} > - + - +