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
Repair frontend contract drift blocking rc.1 push
rcourtmandb8db90e1ced
diff --git a/docs/release-control/v6/internal/subsystems/agent-lifecycle.md b/docs/release-control/v6/internal/subsystems/agent-lifecycle.mdindex 70ac9e8a86..e70f8bae67 100644--- a/docs/release-control/v6/internal/subsystems/agent-lifecycle.md+++ b/docs/release-control/v6/internal/subsystems/agent-lifecycle.md@@ -354,6 +354,12 @@ This subsystem now sits under the dedicated agent lifecycle and fleetoperations lane so install, registration, update continuity, profilemanagement, and fleet safety stop hiding inside architecture, migration, ormonitoring work.+Lifecycle-owned connected-infrastructure and reporting browsers now also keep+governed platform rows on canonical local operator identity while tolerating+optional optimistic hostnames. Shared row models may fall back to the row name+when staging a removal state, but they must not resurrect legacy+`policy.display` shims or require platform-managed surfaces to synthesize a+second hostname contract.That same adjacent `internal/api/` boundary now also keeps public demos fromleaking commercial state through lifecycle-adjacent surfaces. Agent install,reporting, and setup flows may share backend helpers with billing or license@@ -1979,3 +1985,9 @@ lifecycle-owned install or reporting flows. Browser-facing lifecycle surfacesmust also treat `/api/security/status.sessionCapabilities.demoMode` as thecanonical public-demo bootstrap signal instead of inferring demo posture fromheaders, `/api/health`, or hostname heuristics.+Lifecycle-owned connected-infrastructure and reporting surfaces must also keep+governed platform rows on canonical local operator identity while tolerating+optional optimistic hostnames. Shared row models may fall back to the row name+when staging a removal state, but they must not resurrect legacy+`policy.display` shims or require platform-managed surfaces to synthesize a+second hostname contract.diff --git a/docs/release-control/v6/internal/subsystems/ai-runtime.md b/docs/release-control/v6/internal/subsystems/ai-runtime.mdindex 59f8b6cba7..ec179be58c 100644--- a/docs/release-control/v6/internal/subsystems/ai-runtime.md+++ b/docs/release-control/v6/internal/subsystems/ai-runtime.md@@ -859,3 +859,8 @@ AI chat stream matching and mention dedupe now route through the sharedfrontend chat identifier helper, so tool-name prefix stripping and mention-keynormalization stay aligned across the chat runtime instead of being redefinedinline in the stream processor or container component.+That same browser-owned chat read model must keep target normalization helper-+driven. Assistant shells may still derive legacy VM identifiers or display+labels for read-only targeting, but they must do so through shared helpers and+store context precedence instead of passing component-local resource objects or+duplicating naming fallbacks inline.diff --git a/docs/release-control/v6/internal/subsystems/alerts.md b/docs/release-control/v6/internal/subsystems/alerts.mdindex 5f020ea119..5ac6a1090f 100644--- a/docs/release-control/v6/internal/subsystems/alerts.md+++ b/docs/release-control/v6/internal/subsystems/alerts.md@@ -548,3 +548,9 @@ upgrade destinations through the shared commercial-posture store, but alertruntime availability and chat enablement must stay governed by thenon-commercial app runtime and assistant state instead of reusing the samecommercial payload as feature truth.+Alert schedule and incident-timeline surfaces now also keep their browser state+typed through one feature-owned contract. Quiet-hour suppress options must be+cloned into mutable feature props before crossing section boundaries, quiet-day+callbacks must preserve the canonical weekday key union, and incident timeline+expansion/note-saving state must remain `Set<string>`-owned instead of drifting+to untyped browser-local collections.diff --git a/docs/release-control/v6/internal/subsystems/api-contracts.md b/docs/release-control/v6/internal/subsystems/api-contracts.mdindex d9929c7441..2dd0e7f186 100644--- a/docs/release-control/v6/internal/subsystems/api-contracts.md+++ b/docs/release-control/v6/internal/subsystems/api-contracts.md@@ -429,6 +429,12 @@ when the disabled candidate no longer counts toward monitored-system capacity.The API layer already uses contract tests in many places, but every major livecontract should continue moving toward canonical-only runtime shapes.+That same browser-transport contract now tolerates sparse admission-preview+payloads without changing the runtime truth. Patrol transport may omit+`finding_ids`, and infrastructure removal previews may stage optimistic rows+only after canonical IDs have been resolved or a safe row-name fallback has+been chosen. API-adjacent browser callers must not reinterpret missing IDs or+preview arrays as authoritative empty success.Monitored-system commercial admission is now also part of that owned livecontract. Add and update routes must project prospective candidates orpreviewed source records through the canonical monitored-system resolver@@ -2665,3 +2671,9 @@ the canonical monitored-system usage view is unsettled or rebuilding. VMwarewrite admission must check that canonical usage state before collectingexternal vCenter inventory, so direct API callers cannot receive providerconnection errors or persist connections while capacity accounting is unsafe.+That same browser-transport contract now tolerates sparse admission-preview+payloads without changing the runtime truth. Patrol transport may omit+`finding_ids`, and infrastructure removal previews may stage optimistic rows+only after canonical IDs have been resolved or a safe row-name fallback has+been chosen. API-adjacent browser callers must not reinterpret missing IDs or+preview arrays as authoritative empty success.diff --git a/docs/release-control/v6/internal/subsystems/cloud-paid.md b/docs/release-control/v6/internal/subsystems/cloud-paid.mdindex 919970a145..bb73198b5c 100644--- a/docs/release-control/v6/internal/subsystems/cloud-paid.md+++ b/docs/release-control/v6/internal/subsystems/cloud-paid.md@@ -165,6 +165,12 @@ still grows monitored-system usage.Cloud paid readiness is materially behind architecture work. The main concern iscontract coherence between pricing, entitlements, and runtime enforcement.+That public-demo commercial boundary also owns monitored-system preview+unavailability wording. Browser presentation may keep the unavailable reason+nullable until the formatting edge, but it must normalize the message through+the shared monitored-system presentation helper instead of branching on+demo/billing state inside settings panels or inventing a second mock-only+license explanation path.That same cloud-paid/browser boundary now also governs public demo posture.`DEMO_MODE` may run against a real internal entitlement, but public demosurfaces must not reveal self-hosted license metadata, hosted billing state,@@ -1365,3 +1371,9 @@ real licensing model. That includes settings billing tabs, public-demo bannerand monitored-system/trial nudges, dashboard relay paywalls, Patrol upgradeCTAs, and history-lock upsells. Demo readiness therefore means presentationisolation, not a license exemption.+That public-demo commercial boundary also owns monitored-system preview+unavailability wording. Browser presentation may keep the unavailable reason+nullable until the formatting edge, but it must normalize the message through+the shared monitored-system presentation helper instead of branching on+demo/billing state inside settings panels or inventing a second mock-only+license explanation path.diff --git a/docs/release-control/v6/internal/subsystems/frontend-primitives.md b/docs/release-control/v6/internal/subsystems/frontend-primitives.mdindex ea11f5606b..e726f226ef 100644--- a/docs/release-control/v6/internal/subsystems/frontend-primitives.md+++ b/docs/release-control/v6/internal/subsystems/frontend-primitives.md@@ -434,6 +434,12 @@ bounds, including provider-backed alert-history wording. `frontend-modern/src/febacked host and VM incidents with the shared `resource-incident` vocabularyand existing alert-history shells instead of introducing VMware-only labels,badges, or panel copy just because the underlying signal came from vSphere.+Shared table, disclosure, and form primitives must also stay explicitly typed+at the browser edge. Summary rows may memoize repeated pending-update reads,+shared buttons must preserve discriminated disclosure props, toggle and a11y+helpers must expose exact event signatures, shared rows must accept typed+`data-*` props, and reporting-panel helpers must remain ES2020-safe instead of+depending on feature-local casts or newer string helpers.That same shared settings-shell and banner boundary now also owns demo-modecommercial suppression. `frontend-modern/src/components/Settings/settingsNavCatalog.ts`,`frontend-modern/src/components/Settings/settingsNavVisibility.ts`,@@ -1960,3 +1966,9 @@ persistence belong there, while backend settings/model reads stay on`tests/integration/tests/11-first-session.spec.ts` must continue to assertthat plain settings routes render without assistant bootstrap traffic orconsole noise.+Shared table, disclosure, and form primitives must also stay explicitly typed+at the browser edge. Summary rows may memoize repeated pending-update reads,+shared buttons must preserve discriminated disclosure props, toggle and a11y+helpers must expose exact event signatures, shared rows must accept typed+`data-*` props, and reporting-panel helpers must remain ES2020-safe instead of+depending on feature-local casts or newer string helpers.diff --git a/docs/release-control/v6/internal/subsystems/patrol-intelligence.md b/docs/release-control/v6/internal/subsystems/patrol-intelligence.mdindex 391a5c1d36..9e6141cc08 100644--- a/docs/release-control/v6/internal/subsystems/patrol-intelligence.md+++ b/docs/release-control/v6/internal/subsystems/patrol-intelligence.md@@ -617,3 +617,8 @@ Patrol approval and trial shells should consume selector helpers such as`canStartCommercialTrial()` from`frontend-modern/src/stores/licenseCommercial.ts` instead of branching on rawcommercial-posture fields in leaf components.+Patrol findings presentation now also keeps runtime identity and action routing+on shared helpers. Findings shells may link or format from feature-owned+presentation helpers, but Patrol runtime severity, title cleanup, and primary+settings actions must stay keyed to the canonical Patrol service identity+instead of reimplementing those branches in links-only or leaf badge surfaces.diff --git a/docs/release-control/v6/internal/subsystems/performance-and-scalability.md b/docs/release-control/v6/internal/subsystems/performance-and-scalability.mdindex a3a05e22e6..75b10ef712 100644--- a/docs/release-control/v6/internal/subsystems/performance-and-scalability.md+++ b/docs/release-control/v6/internal/subsystems/performance-and-scalability.md@@ -730,3 +730,9 @@ contract for feature truth, but commercial demo routes stay hidden and thebrowser must not keep retrying `/api/license/commercial-posture`,`/api/license/entitlements`, `/auth/license-purchase-start`, or other hiddencommercial endpoints from performance-sensitive settings or dashboard shells.+Dashboard and infrastructure summary consumers now also keep null-tolerant read+models on the shared hot path. Guest rows, stacked bars, anomaly summaries, and+resource detail mappers may accept partial platform metadata or undefined+ratios, but they must normalize those values once in the shared model layer+instead of scattering non-null assertions or per-component count coercion+through the dashboard runtime.diff --git a/docs/release-control/v6/internal/subsystems/storage-recovery.md b/docs/release-control/v6/internal/subsystems/storage-recovery.mdindex d1ee26b8fe..424d0f7b2c 100644--- a/docs/release-control/v6/internal/subsystems/storage-recovery.md+++ b/docs/release-control/v6/internal/subsystems/storage-recovery.md@@ -350,6 +350,12 @@ querying, and the operator-facing storage health presentation layer.This subsystem now sits under the dedicated storage and recovery lane so theoperator-facing storage page, recovery timeline, and recovery-point persistenceengine stop hiding inside broader monitoring and E2E buckets.+Storage and recovery browser helpers now also keep one transport-tolerant+normalization edge. Recovery display models must accept legacy subject-label+fields and nullable mode/kind metadata before presenting canonical item labels,+while storage detail drawers and filter controls must route summary series IDs,+source tones, and disk metrics through the shared storage helpers instead of+reconstructing them from local table state.That same shared `internal/api/` dependency now also expects replacement-awaremonitored-system admission and fail-closed usage availability. Storage- orrecovery-adjacent setup, deploy, and API-backed update helpers may reuse the@@ -2113,3 +2119,9 @@ resulting provider setup state only after `internal/api/truenas_handlers.go`,`internal/api/vmware_handlers.go`, and the shared monitored-system admissionhelpers have returned a safe capacity verdict; VMware write admission must notcollect external vCenter inventory before that canonical usage state is safe.+Storage and recovery browser helpers now also keep one transport-tolerant+normalization edge. Recovery display models must accept legacy subject-label+fields and nullable mode/kind metadata before presenting canonical item labels,+while storage detail drawers and filter controls must route summary series IDs,+source tones, and disk metrics through the shared storage helpers instead of+reconstructing them from local table state.diff --git a/docs/release-control/v6/internal/subsystems/unified-resources.md b/docs/release-control/v6/internal/subsystems/unified-resources.mdindex 00c1aa92fc..6707a9d778 100644--- a/docs/release-control/v6/internal/subsystems/unified-resources.md+++ b/docs/release-control/v6/internal/subsystems/unified-resources.md@@ -271,6 +271,12 @@ canonical resource identity, discovery normalization, and platform-runtimecoverage stay governed as a first-class Pulse product surface, including theshared VMware signal-metadata and `resource-incident` timeline vocabulary thatcanonical resources expose to alerts, AI, and frontend consumers.+That same frontend-owned compatibility boundary must remain intentionally+narrow. Shared resource adapters may admit explicit aliases such as `host`,+`truenas`, and `ceph`, and VMware detail mappers may project typed metadata+through the canonical resource model, but unified-resource consumers must not+reintroduce removed workload aliases or feature-local resource-type shims just+to satisfy one table, drawer, or badge surface.That same runtime now also owns prospective monitored-system projection. Addand update consumers must ask the unified-resource layer whether candidate orpreview records change the deduped top-level monitored-system count, including@@ -1669,3 +1675,9 @@ source filter option set even when the currently loaded unified-resourcesnapshot does not contain that source yet, so cross-surface handoffs fromsettings, alerts, or findings do not collapse back to `All` during hydrationor empty-filter states.+That same frontend-owned compatibility boundary must remain intentionally+narrow. Shared resource adapters may admit explicit aliases such as `host`,+`truenas`, and `ceph`, and VMware detail mappers may project typed metadata+through the canonical resource model, but unified-resource consumers must not+reintroduce removed workload aliases or feature-local resource-type shims just+to satisfy one table, drawer, or badge surface.diff --git a/frontend-modern/src/api/__tests__/security.test.ts b/frontend-modern/src/api/__tests__/security.test.tsindex 3903e21eb9..ed7d3a19e0 100644--- a/frontend-modern/src/api/__tests__/security.test.ts+++ b/frontend-modern/src/api/__tests__/security.test.ts@@ -40,6 +40,7 @@ describe('SecurityAPI', () => {const mockStatus: SecurityStatus = {hasAuthentication: true,apiTokenConfigured: false,+ apiTokenHint: '',requiresAuth: true,credentialsEncrypted: true,exportProtected: true,diff --git a/frontend-modern/src/api/patrol.ts b/frontend-modern/src/api/patrol.tsindex 2ecc659dd4..c948edfafd 100644--- a/frontend-modern/src/api/patrol.ts+++ b/frontend-modern/src/api/patrol.ts@@ -428,7 +428,7 @@ export interface PatrolRunRecord {resolved_findings: number;auto_fix_count: number;findings_summary: string;- finding_ids: string[];+ finding_ids?: string[];error_count: number;status: PatrolRunStatus;triage_flags: number;@@ -450,8 +450,10 @@ function normalizePatrolRunRecord(run: PatrolRunRecord | null | undefined): Patrconst normalized = promoteLegacyAlertIdentifier(run as PatrolRunRecord & { alert_identifier?: string; truenas_checked?: number },);+ const findingIDs = Array.isArray(normalized.finding_ids) ? normalized.finding_ids : undefined;return {...normalized,+ ...(findingIDs !== undefined ? { finding_ids: findingIDs } : {}),truenas_checked:typeof normalized.truenas_checked === 'number' && Number.isFinite(normalized.truenas_checked)? normalized.truenas_checkeddiff --git a/frontend-modern/src/components/AI/Chat/index.tsx b/frontend-modern/src/components/AI/Chat/index.tsxindex 6dfc7a86c3..b50519b9b0 100644--- a/frontend-modern/src/components/AI/Chat/index.tsx+++ b/frontend-modern/src/components/AI/Chat/index.tsx@@ -424,10 +424,7 @@ export const AIChat: Component<AIChatProps> = (props) => {return resource.id;};- const parseLegacyVmid = (- resource: Resource,- platformData: Record<string, unknown> | undefined,- ): number | undefined => {+ const parseLegacyVmid = (platformData: Record<string, unknown> | undefined): number | undefined => {const vmidRaw = platformData?.vmid;if (typeof vmidRaw === 'number' && Number.isFinite(vmidRaw) && vmidRaw > 0) return vmidRaw;if (typeof vmidRaw === 'string') {@@ -455,7 +452,7 @@ export const AIChat: Component<AIChatProps> = (props) => {const platformData = readPlatformData(resource);const node = getVMMentionNode(resource);- const vmid = parseLegacyVmid(resource, platformData);+ const vmid = parseLegacyVmid(platformData);if (node && vmid !== undefined) {return `vm:${node}:${vmid}`;}@@ -470,7 +467,7 @@ export const AIChat: Component<AIChatProps> = (props) => {const platformData = readPlatformData(resource);const node = asString(platformData?.node) || resource.parentName || '';- const vmid = parseLegacyVmid(resource, platformData);+ const vmid = parseLegacyVmid(platformData);if (node && vmid !== undefined) {return `system-container:${node}:${vmid}`;}diff --git a/frontend-modern/src/components/AI/FindingsPanel.tsx b/frontend-modern/src/components/AI/FindingsPanel.tsxindex 047509840d..2ee972ed40 100644--- a/frontend-modern/src/components/AI/FindingsPanel.tsx+++ b/frontend-modern/src/components/AI/FindingsPanel.tsx@@ -42,7 +42,6 @@ import {getFindingSeveritySortOrder,getFindingResolutionReason,getFindingLoopStateBadgeClasses,- getFindingSeverityBadgeClasses,getFindingStatusBadgeClasses,getFindingStatusLabel,getFindingSourceBadgeClasses,diff --git a/frontend-modern/src/components/AI/__tests__/FindingsPanel.links.test.tsx b/frontend-modern/src/components/AI/__tests__/FindingsPanel.links.test.tsxindex fc93707c0d..cc3b94cd36 100644--- a/frontend-modern/src/components/AI/__tests__/FindingsPanel.links.test.tsx+++ b/frontend-modern/src/components/AI/__tests__/FindingsPanel.links.test.tsx@@ -1,4 +1,5 @@import { fireEvent, render, screen, waitFor } from '@solidjs/testing-library';+import type { JSX } from 'solid-js';import { beforeEach, describe, expect, it, vi } from 'vitest';import { FindingsPanel } from '../FindingsPanel';@@ -53,7 +54,7 @@ const mockState = vi.hoisted(() => {});vi.mock('@solidjs/router', () => ({- A: (props: { href: string; children: unknown; [key: string]: unknown }) => (+ A: (props: { href: string; children?: JSX.Element; [key: string]: unknown }) => (<a href={props.href} aria-label={props['aria-label'] as string} onClick={props.onClick as any}>{props.children}</a>@@ -62,7 +63,7 @@ vi.mock('@solidjs/router', () => ({}));vi.mock('@/components/shared/Card', () => ({- Card: (props: { children: unknown }) => <div>{props.children}</div>,+ Card: (props: { children?: JSX.Element }) => <div>{props.children}</div>,}));vi.mock('@/components/patrol', () => ({diff --git a/frontend-modern/src/components/AI/__tests__/FindingsPanel.test.ts b/frontend-modern/src/components/AI/__tests__/FindingsPanel.test.tsindex 4d9f677eb1..ef837a8970 100644--- a/frontend-modern/src/components/AI/__tests__/FindingsPanel.test.ts+++ b/frontend-modern/src/components/AI/__tests__/FindingsPanel.test.ts@@ -330,6 +330,19 @@ describe('aiFindingPresentation', () => {}),).toBeUndefined();});++ it('keeps Patrol runtime actions keyed to the shared runtime identity even without product-prefixed titles', () => {+ expect(+ getFindingPrimaryActionPresentation({+ resourceId: 'ai-service',+ resourceName: 'Pulse Patrol Service',+ title: 'Insufficient API credits',+ }),+ ).toEqual({+ label: 'Open AI Settings',+ href: '/settings/system-ai',+ });+ });});describe('findingTitlePresentation', () => {@@ -656,7 +669,7 @@ describe('aiFindingPresentation', () => {status: 'pending',toolId: 'investigation_fix',targetId: 'finding-1',- expiresAt: '2026-04-01T00:06:00Z',+ expiresAt: '2026-04-30T00:06:00Z',},] as never),).toBe(true);@@ -684,7 +697,7 @@ describe('aiFindingPresentation', () => {status: 'pending',toolId: 'investigation_fix',targetId: 'finding-1',- expiresAt: '2026-04-01T00:06:00Z',+ expiresAt: '2026-04-30T00:06:00Z',},] as never,),diff --git a/frontend-modern/src/components/Dashboard/GuestRow.tsx b/frontend-modern/src/components/Dashboard/GuestRow.tsxindex aa5cd15ce6..5d6fc88c8e 100644--- a/frontend-modern/src/components/Dashboard/GuestRow.tsx+++ b/frontend-modern/src/components/Dashboard/GuestRow.tsx@@ -128,7 +128,7 @@ export function GuestRow(props: GuestRowProps) {<SummaryRowActionButtonkind="disclosure"subjectLabel={props.guest.name}- expanded={props.isExpanded}+ expanded={props.isExpanded === true}controlsId={detailControlsId()}onAction={() => props.onClick?.()}onPreviewClear={() => props.onHoverChange?.(null)}diff --git a/frontend-modern/src/components/Dashboard/__tests__/DashboardStateCards.test.tsx b/frontend-modern/src/components/Dashboard/__tests__/DashboardStateCards.test.tsxindex fcba4565d2..0549624eef 100644--- a/frontend-modern/src/components/Dashboard/__tests__/DashboardStateCards.test.tsx+++ b/frontend-modern/src/components/Dashboard/__tests__/DashboardStateCards.test.tsx@@ -36,7 +36,11 @@ describe('DashboardStateCards', () => {nodeCount={0}reconnect={() => undefined}workloads={{+ workloads: [] as any,loading: () => false,+ refetch: async () => [],+ mutate: (value) => (Array.isArray(value) ? value : value([])),+ error: () => null,}}/>));diff --git a/frontend-modern/src/components/Dashboard/enhancedCpuBarModel.ts b/frontend-modern/src/components/Dashboard/enhancedCpuBarModel.tsindex bae517de7b..b3e62c999e 100644--- a/frontend-modern/src/components/Dashboard/enhancedCpuBarModel.ts+++ b/frontend-modern/src/components/Dashboard/enhancedCpuBarModel.ts@@ -26,7 +26,7 @@ export interface EnhancedCPUBarPresentation {export function buildEnhancedCPUBarPresentation(props: EnhancedCPUBarProps,): EnhancedCPUBarPresentation {- const anomalyRatio = formatAnomalyRatio(props.anomaly);+ const anomalyRatio = formatAnomalyRatio(props.anomaly) ?? '';return {anomalyClass: props.anomaly@@ -43,4 +43,3 @@ export function buildEnhancedCPUBarPresentation(tooltipUsageClass: props.usage > 90 ? 'text-red-400' : 'text-base-content',};}-diff --git a/frontend-modern/src/components/Dashboard/stackedDiskBarModel.ts b/frontend-modern/src/components/Dashboard/stackedDiskBarModel.tsindex 890bf1cdda..0ef4b86989 100644--- a/frontend-modern/src/components/Dashboard/stackedDiskBarModel.ts+++ b/frontend-modern/src/components/Dashboard/stackedDiskBarModel.ts@@ -171,7 +171,7 @@ export function buildStackedDiskBarPresentation(: (props.aggregateDisk?.used ?? 0);const overallPercent = totalCapacity > 0 ? (totalUsed / totalCapacity) * 100 : 0;const barPercent = Math.min(overallPercent, 100);- const anomalyRatio = formatAnomalyRatio(props.anomaly);+ const anomalyRatio = formatAnomalyRatio(props.anomaly) ?? '';const maxInfo = getMaxDiskInfo(disks);const maxLabelShort = maxInfo ? `max ${formatPercent(maxInfo.percent)}` : '';const maxLabelFull = maxInfodiff --git a/frontend-modern/src/components/Dashboard/stackedMemoryBarModel.ts b/frontend-modern/src/components/Dashboard/stackedMemoryBarModel.tsindex 5255c35362..027e299c8e 100644--- a/frontend-modern/src/components/Dashboard/stackedMemoryBarModel.ts+++ b/frontend-modern/src/components/Dashboard/stackedMemoryBarModel.ts@@ -189,7 +189,7 @@ export function buildStackedMemoryBarPresentation(? (ANOMALY_SEVERITY_CLASS[props.anomaly.severity] ?? 'text-yellow-400'): 'text-yellow-400',anomalyDescription: props.anomaly?.description,- anomalyRatio: formatAnomalyRatio(props.anomaly),+ anomalyRatio: formatAnomalyRatio(props.anomaly) ?? '',displayLabel,displaySublabel,segments: getSegments(props, utilizationPercent),@@ -203,4 +203,3 @@ export function buildStackedMemoryBarPresentation(tooltipTitle: 'Memory Composition',};}-diff --git a/frontend-modern/src/components/Dashboard/useDashboardWorkloadDerivedState.ts b/frontend-modern/src/components/Dashboard/useDashboardWorkloadDerivedState.tsindex 0324764e35..683ceec111 100644--- a/frontend-modern/src/components/Dashboard/useDashboardWorkloadDerivedState.ts+++ b/frontend-modern/src/components/Dashboard/useDashboardWorkloadDerivedState.ts@@ -9,7 +9,6 @@ import { getCanonicalWorkloadId } from '@/utils/workloads';import {getDiskUsagePercent,getWorkloadGroupLabel,- getWorkloadGroupKey,groupWorkloads,computeWorkloadStats,computeWorkloadIOEmphasis,diff --git a/frontend-modern/src/components/Dashboard/useGuestRowState.ts b/frontend-modern/src/components/Dashboard/useGuestRowState.tsindex 8b12b983fa..20326c1f94 100644--- a/frontend-modern/src/components/Dashboard/useGuestRowState.ts+++ b/frontend-modern/src/components/Dashboard/useGuestRowState.ts@@ -2,6 +2,7 @@ import { createMemo } from 'solid-js';import { useBreakpoint } from '@/hooks/useBreakpoint';import { useAnomalyForMetric } from '@/hooks/useAnomalies';+import type { Container } from '@/types/api';import { buildMetricKey } from '@/utils/metricsKeys';import { getGuestPowerIndicator, isGuestRunning } from '@/utils/status';import { getShortImageName, formatBytes } from '@/utils/format';@@ -95,13 +96,14 @@ export function useGuestRowState(props: GuestRowProps) {const isOCIContainer = createMemo(() => {if (workloadType() !== 'system-container') return false;- return props.guest.type === 'oci-container' || props.guest.isOci === true;+ const containerMeta = props.guest as Partial<Pick<Container, 'isOci'>>;+ return props.guest.type === 'oci-container' || containerMeta.isOci === true;});const ociImage = createMemo(() => {if (!isOCIContainer()) return null;- const template = props.guest.osTemplate;+ const template = (props.guest as Partial<Pick<Container, 'osTemplate'>>).osTemplate;if (!template) return null;let image = template;diff --git a/frontend-modern/src/components/Dashboard/useThresholdSliderState.ts b/frontend-modern/src/components/Dashboard/useThresholdSliderState.tsindex 9f380772d9..56340597a9 100644--- a/frontend-modern/src/components/Dashboard/useThresholdSliderState.ts+++ b/frontend-modern/src/components/Dashboard/useThresholdSliderState.ts@@ -13,11 +13,6 @@ type ThresholdSliderInputEvent = InputEvent & {target: HTMLInputElement;};-type ThresholdSliderWheelEvent<T extends HTMLElement> = WheelEvent & {- currentTarget: T;- target: Element;-};-export function useThresholdSliderState(props: ThresholdSliderProps) {const [isDragging, setIsDragging] = createSignal(false);let releaseDragLock: (() => void) | undefined;@@ -39,19 +34,13 @@ export function useThresholdSliderState(props: ThresholdSliderProps) {props.onChange(parseInt(event.currentTarget.value, 10));};- const handleInputWheel: JSX.EventHandlerUnion<- HTMLInputElement,- ThresholdSliderWheelEvent<HTMLInputElement>- > = (event) => {+ const handleInputWheel: JSX.EventHandler<HTMLInputElement, WheelEvent> = (event) => {if (!props.disabled) {event.preventDefault();}};- const handleContainerWheel: JSX.EventHandlerUnion<- HTMLDivElement,- ThresholdSliderWheelEvent<HTMLDivElement>- > = (event) => {+ const handleContainerWheel: JSX.EventHandler<HTMLDivElement, WheelEvent> = (event) => {if (!props.disabled && isDragging()) {event.preventDefault();}diff --git a/frontend-modern/src/components/Infrastructure/__tests__/infrastructureSummaryModel.test.ts b/frontend-modern/src/components/Infrastructure/__tests__/infrastructureSummaryModel.test.tsindex 309b8ae5f3..0d40d4e9ec 100644--- a/frontend-modern/src/components/Infrastructure/__tests__/infrastructureSummaryModel.test.ts+++ b/frontend-modern/src/components/Infrastructure/__tests__/infrastructureSummaryModel.test.ts@@ -326,7 +326,7 @@ describe('infrastructureSummaryModel', () => {shouldShowInfrastructureNetworkCard(false, [makeResource({type: 'vm',- platformType: 'proxmox-vm',+ platformType: 'proxmox-pve',network: { rxBytes: 10, txBytes: 0 },}),]),@@ -336,7 +336,7 @@ describe('infrastructureSummaryModel', () => {shouldShowInfrastructureNetworkCard(false, [makeResource({type: 'vm',- platformType: 'proxmox-vm',+ platformType: 'proxmox-pve',network: { rxBytes: 0, txBytes: 0 },platformData: { sources: ['proxmox'] },}),diff --git a/frontend-modern/src/components/Infrastructure/__tests__/resourceDetailDrawerIdentityModel.test.ts b/frontend-modern/src/components/Infrastructure/__tests__/resourceDetailDrawerIdentityModel.test.tsindex 3d5b6f8a75..4db57a26ed 100644--- a/frontend-modern/src/components/Infrastructure/__tests__/resourceDetailDrawerIdentityModel.test.ts+++ b/frontend-modern/src/components/Infrastructure/__tests__/resourceDetailDrawerIdentityModel.test.ts@@ -15,7 +15,7 @@ const baseResource = (overrides: Partial<Resource> = {}): Resource => ({name: 'vm-101',displayName: 'VM 101',platformId: 'vm-101',- platformType: 'proxmox-vm',+ platformType: 'proxmox-pve',sourceType: 'hybrid',status: 'online',lastSeen: Date.now(),diff --git a/frontend-modern/src/components/Infrastructure/__tests__/unifiedResourceTableStateModel.test.ts b/frontend-modern/src/components/Infrastructure/__tests__/unifiedResourceTableStateModel.test.tsindex 7ea10c6fec..47b5c55286 100644--- a/frontend-modern/src/components/Infrastructure/__tests__/unifiedResourceTableStateModel.test.ts+++ b/frontend-modern/src/components/Infrastructure/__tests__/unifiedResourceTableStateModel.test.ts@@ -71,7 +71,7 @@ describe('unifiedResourceTableStateModel', () => {it('computes visible items and spacer heights from the active window', () => {const items = buildHostTableItems(- [{ cluster: null, resources: [makeResource('a'), makeResource('b'), makeResource('c')] }],+ [{ cluster: '', resources: [makeResource('a'), makeResource('b'), makeResource('c')] }],'flat',);diff --git a/frontend-modern/src/components/Infrastructure/__tests__/useInfrastructureSummaryState.test.tsx b/frontend-modern/src/components/Infrastructure/__tests__/useInfrastructureSummaryState.test.tsxindex fb95fd7605..07c5df7b8a 100644--- a/frontend-modern/src/components/Infrastructure/__tests__/useInfrastructureSummaryState.test.tsx+++ b/frontend-modern/src/components/Infrastructure/__tests__/useInfrastructureSummaryState.test.tsx@@ -8,8 +8,13 @@ import {useInfrastructureSummaryState,} from '../useInfrastructureSummaryState';-const mockFetchInfrastructureSummaryAndCache = vi.fn();-const mockReadInfrastructureSummaryCache = vi.fn(() => null);+const {+ mockFetchInfrastructureSummaryAndCache,+ mockReadInfrastructureSummaryCache,+} = vi.hoisted(() => ({+ mockFetchInfrastructureSummaryAndCache: vi.fn(),+ mockReadInfrastructureSummaryCache: vi.fn(() => null),+}));vi.mock('@/hooks/useResources', () => ({useResources: () => ({@@ -19,10 +24,8 @@ vi.mock('@/hooks/useResources', () => ({}));vi.mock('@/utils/infrastructureSummaryCache', () => ({- fetchInfrastructureSummaryAndCache: (...args: unknown[]) =>- mockFetchInfrastructureSummaryAndCache(...args),- readInfrastructureSummaryCache: (...args: unknown[]) =>- mockReadInfrastructureSummaryCache(...args),+ fetchInfrastructureSummaryAndCache: mockFetchInfrastructureSummaryAndCache,+ readInfrastructureSummaryCache: mockReadInfrastructureSummaryCache,}));vi.mock('@/utils/apiClient', async () => {diff --git a/frontend-modern/src/components/Infrastructure/resourceDetailDrawerOperationalModel.ts b/frontend-modern/src/components/Infrastructure/resourceDetailDrawerOperationalModel.tsindex bc3ba5f90e..d61156581c 100644--- a/frontend-modern/src/components/Infrastructure/resourceDetailDrawerOperationalModel.ts+++ b/frontend-modern/src/components/Infrastructure/resourceDetailDrawerOperationalModel.ts@@ -119,7 +119,7 @@ export const buildSourceHealthSummary = (};export const buildSourceSummary = (- mergedSources: string[],+ _mergedSources: string[],sourceStatus: SourceStatusMap,): ResourceDetailDrawerSummary | null => {const health = buildSourceHealthSummary(sourceStatus);diff --git a/frontend-modern/src/components/Infrastructure/resourceDetailDrawerVmwareModel.ts b/frontend-modern/src/components/Infrastructure/resourceDetailDrawerVmwareModel.tsindex c9a48db777..bf85110f52 100644--- a/frontend-modern/src/components/Infrastructure/resourceDetailDrawerVmwareModel.ts+++ b/frontend-modern/src/components/Infrastructure/resourceDetailDrawerVmwareModel.ts@@ -54,6 +54,23 @@ const buildSignalValue = (count: number | undefined, label: string, summary?: stconst hasRows = (rows: ResourceDetailDrawerVMwareRow[]): boolean => rows.length > 0;+const filterNonEmptyRows = (+ rows: ResourceDetailDrawerVMwareRow[],+): ResourceDetailDrawerVMwareRow[] => rows.filter((row) => row.value);++const getStatusTone = (status?: string | null): ResourceDetailDrawerVMwareRowTone => {+ const normalized = asTrimmedString(status).toLowerCase();+ if (normalized === 'red') return 'warning';+ if (normalized) return 'accent';+ return 'default';+};++const getWarningTone = (hasWarning: boolean): ResourceDetailDrawerVMwareRowTone =>+ hasWarning ? 'warning' : 'default';++const getAccentTone = (hasAccent: boolean): ResourceDetailDrawerVMwareRowTone =>+ hasAccent ? 'accent' : 'default';+export const buildVMwareDetailsSummary = (resourceType: ResourceType,vmware?: ResourceVMwareMeta,@@ -88,7 +105,7 @@ export const buildVMwareDetailSections = (return [];}- const stateRows: ResourceDetailDrawerVMwareRow[] = [+ const stateRows = filterNonEmptyRows([{label: 'Connection',value: asTrimmedString(vmware.connectionName),@@ -104,12 +121,7 @@ export const buildVMwareDetailSections = ({label: 'Overall status',value: asTrimmedString(vmware.overallStatus),- tone:- asTrimmedString(vmware.overallStatus).toLowerCase() === 'red'- ? 'warning'- : asTrimmedString(vmware.overallStatus)- ? 'accent'- : 'default',+ tone: getStatusTone(vmware.overallStatus),},{label: 'Power',@@ -126,7 +138,7 @@ export const buildVMwareDetailSections = ({label: 'Accessible',value: formatBoolLabel(vmware.datastoreAccessible),- tone: vmware.datastoreAccessible === false ? 'warning' : 'default',+ tone: getWarningTone(vmware.datastoreAccessible === false),},{label: 'Shared access',@@ -135,11 +147,11 @@ export const buildVMwareDetailSections = ({label: 'Maintenance',value: asTrimmedString(vmware.maintenanceMode),- tone: asTrimmedString(vmware.maintenanceMode) ? 'warning' : 'default',+ tone: getWarningTone(Boolean(asTrimmedString(vmware.maintenanceMode))),},- ].filter((row) => row.value);+ ]);- const placementRows: ResourceDetailDrawerVMwareRow[] = [+ const placementRows = filterNonEmptyRows([{label: 'Datacenter',value: asTrimmedString(vmware.datacenterName),@@ -168,9 +180,9 @@ export const buildVMwareDetailSections = (label: 'Datastores',value: (vmware.datastoreNames ?? []).filter(Boolean).join(', '),},- ].filter((row) => row.value);+ ]);- const guestRows: ResourceDetailDrawerVMwareRow[] = [+ const guestRows = filterNonEmptyRows([{label: 'Host UUID',value: asTrimmedString(vmware.hostUuid),@@ -199,18 +211,18 @@ export const buildVMwareDetailSections = (label: 'Datastore URL',value: asTrimmedString(vmware.datastoreUrl),},- ].filter((row) => row.value);+ ]);- const signalRows: ResourceDetailDrawerVMwareRow[] = [+ const signalRows = filterNonEmptyRows([{label: 'Alarms',value: buildSignalValue(vmware.activeAlarmCount, 'alarm', vmware.activeAlarmSummary),- tone: (vmware.activeAlarmCount ?? 0) > 0 ? 'warning' : 'default',+ tone: getWarningTone((vmware.activeAlarmCount ?? 0) > 0),},{label: 'Tasks',value: buildSignalValue(vmware.recentTaskCount, 'task', vmware.recentTaskSummary),- tone: (vmware.recentTaskCount ?? 0) > 0 ? 'accent' : 'default',+ tone: getAccentTone((vmware.recentTaskCount ?? 0) > 0),},{label: 'Snapshots',@@ -219,7 +231,7 @@ export const buildVMwareDetailSections = (? formatCount(Math.max(0, vmware.snapshotCount ?? 0), 'snapshot'): '',},- ].filter((row) => row.value);+ ]);const sections: ResourceDetailDrawerVMwareSection[] = [{ id: 'state', label: 'State', rows: stateRows },diff --git a/frontend-modern/src/components/Infrastructure/resourceDetailMappers.ts b/frontend-modern/src/components/Infrastructure/resourceDetailMappers.tsindex 58d33e4962..a0f8bcd537 100644--- a/frontend-modern/src/components/Infrastructure/resourceDetailMappers.ts+++ b/frontend-modern/src/components/Infrastructure/resourceDetailMappers.ts@@ -7,7 +7,7 @@ import type {Memory,Node,} from '@/types/api';-import type { Resource, ResourceMetric } from '@/types/resource';+import type { Resource, ResourceMetric, ResourceVMwareMeta } from '@/types/resource';import { formatTemperature } from '@/utils/temperature';import { getActionableAgentIdFromResource } from '@/utils/agentResources';import {@@ -113,6 +113,7 @@ export type PlatformData = {agent?: AgentPlatformData;sourceStatus?: Record<string, { status?: string; lastSeen?: string | number; error?: string }>;docker?: Record<string, unknown>;+ vmware?: ResourceVMwareMeta;pbs?: PBSPlatformData;pmg?: PMGPlatformData;kubernetes?: KubernetesPlatformData;diff --git a/frontend-modern/src/components/Recovery/RecoveryHistoryTable.tsx b/frontend-modern/src/components/Recovery/RecoveryHistoryTable.tsxindex e310e065ad..0c79645098 100644--- a/frontend-modern/src/components/Recovery/RecoveryHistoryTable.tsx+++ b/frontend-modern/src/components/Recovery/RecoveryHistoryTable.tsx@@ -30,7 +30,6 @@ import {getRecoveryPointModeLabel,getRecoveryPointRepositoryLabel,getRecoveryPointTimestampMs,- normalizeRecoveryModeQueryValue,} from '@/utils/recoveryRecordPresentation';import { getRecoveryPointPlatform } from '@/utils/recoveryPlatformModel';import {@@ -172,9 +171,6 @@ export const RecoveryHistoryTable: Component<RecoveryHistoryTableProps> = (propsconst itemTypePresentation =getRecoveryItemTypePresentation(getRecoveryPointItemTypeKey(point));const platform = normalizeSourcePlatformQueryValue(getRecoveryPointPlatform(point));- const mode =- normalizeRecoveryModeQueryValue(String(point.mode || '').toLowerCase()) ||- 'local';const outcome =(String(point.outcome || 'unknown').toLowerCase() as RecoveryOutcome) ||'unknown';diff --git a/frontend-modern/src/components/Recovery/__tests__/Recovery.test.tsx b/frontend-modern/src/components/Recovery/__tests__/Recovery.test.tsxindex f3265d838c..64edcfc647 100644--- a/frontend-modern/src/components/Recovery/__tests__/Recovery.test.tsx+++ b/frontend-modern/src/components/Recovery/__tests__/Recovery.test.tsx@@ -6,6 +6,12 @@ import useRecoveryPointsFacetsSource from '@/hooks/useRecoveryPointsFacets.ts?raimport useRecoveryPointsSeriesSource from '@/hooks/useRecoveryPointsSeries.ts?raw';import useRecoveryPointsSource from '@/hooks/useRecoveryPoints.ts?raw';import useRecoveryRollupsSource from '@/hooks/useRecoveryRollups.ts?raw';+import type {+ ProtectionRollup,+ ProtectionRollupTransport,+ RecoveryPoint,+ RecoveryPointTransport,+} from '@/types/recovery';import { parseRecoveryDateKey } from '@/utils/recoveryDatePresentation';import { STORAGE_KEYS } from '@/utils/localStorage';import { ROUTE_STATE_REPLACE_OPTIONS } from '@/utils/routeStateNavigation';@@ -26,7 +32,7 @@ vi.mock('@solidjs/router', async () => {};});-const rollupsPayload = [+const rollupsPayload: Array<ProtectionRollup | ProtectionRollupTransport> = [{rollupId: 'res:vm-123',itemResourceId: 'vm-123',@@ -47,7 +53,7 @@ const rollupsPayload = [},];-const pointsByRollupId: Record<string, any[]> = {+const pointsByRollupId: Record<string, Array<RecoveryPoint | RecoveryPointTransport>> = {'res:vm-123': [{id: 'p1',@@ -874,7 +880,9 @@ describe('Recovery', () => {await waitFor(() => expect(screen.getByLabelText('Platform')).toBeInTheDocument());expect(screen.getByLabelText('Platform')).toHaveValue('truenas');- expect(screen.getByRole('option', { name: 'TrueNAS' }).selected).toBe(true);+ expect((screen.getByRole('option', { name: 'TrueNAS' }) as HTMLOptionElement).selected).toBe(+ true,+ );expect(screen.getByText('Host / Agent')).toBeInTheDocument();expect(screen.getByText('tower')).toBeInTheDocument();});diff --git a/frontend-modern/src/components/Settings/__tests__/APITokenManager.test.tsx b/frontend-modern/src/components/Settings/__tests__/APITokenManager.test.tsxindex 6eeb8550f2..84f958236f 100644--- a/frontend-modern/src/components/Settings/__tests__/APITokenManager.test.tsx+++ b/frontend-modern/src/components/Settings/__tests__/APITokenManager.test.tsx@@ -260,11 +260,9 @@ describe('APITokenManager', () => {platformType: 'proxmox-pbs',sourceType: 'api',policy: {- display: {- mode: 'governed',- summary: 'backup server resource; status online; sources pbs',- },- } as Record<string, unknown>,+ sensitivity: 'restricted',+ routing: { scope: 'local-only', redact: ['hostname'] },+ },platformData: {pbs: {hostname: 'pbs.local',diff --git a/frontend-modern/src/components/Settings/__tests__/AgentProfilesPanel.test.tsx b/frontend-modern/src/components/Settings/__tests__/AgentProfilesPanel.test.tsxindex 6df16417a7..6a9cbd945e 100644--- a/frontend-modern/src/components/Settings/__tests__/AgentProfilesPanel.test.tsx+++ b/frontend-modern/src/components/Settings/__tests__/AgentProfilesPanel.test.tsx@@ -602,11 +602,9 @@ describe('AgentProfilesPanel V6 agent ID handling', () => {identity: { hostname: 'pbs.local' },agent: { agentId: 'pbs-agent-1' },policy: {- display: {- mode: 'governed',- summary: 'backup server resource; status online; sources pbs',- },- } as Record<string, unknown>,+ sensitivity: 'restricted',+ routing: { scope: 'local-only', redact: ['hostname'] },+ },}),];mockWsStore.state.connectedInfrastructure = [diff --git a/frontend-modern/src/components/Settings/__tests__/InfrastructureOperationsController.test.tsx b/frontend-modern/src/components/Settings/__tests__/InfrastructureOperationsController.test.tsxindex 7e187bc61c..6dfc9917a3 100644--- a/frontend-modern/src/components/Settings/__tests__/InfrastructureOperationsController.test.tsx+++ b/frontend-modern/src/components/Settings/__tests__/InfrastructureOperationsController.test.tsx@@ -865,7 +865,9 @@ describe('InfrastructureOperationsController token generation', () => {await waitFor(() => expect(createObjectURLMock).toHaveBeenCalled(), { interval: 0 });- const downloadedBlob = createObjectURLMock.mock.calls.at(-1)?.[0] as MockBlob | undefined;+ const createObjectURLCalls = createObjectURLMock.mock.calls as unknown[][];+ const lastCreateObjectURLCall = createObjectURLCalls[createObjectURLCalls.length - 1];+ const downloadedBlob = lastCreateObjectURLCall?.[0] as MockBlob | undefined;expect(downloadedBlob).toBeDefined();const content = await downloadedBlob!.text();expect(content).toContain('Canonical install workspace:');diff --git a/frontend-modern/src/components/Settings/__tests__/InfrastructureOperationsModel.test.tsx b/frontend-modern/src/components/Settings/__tests__/InfrastructureOperationsModel.test.tsxindex 45c1847053..eba6714c06 100644--- a/frontend-modern/src/components/Settings/__tests__/InfrastructureOperationsModel.test.tsx+++ b/frontend-modern/src/components/Settings/__tests__/InfrastructureOperationsModel.test.tsx@@ -1,5 +1,6 @@import { describe, expect, it } from 'vitest';import type { ConnectedInfrastructureItem } from '@/types/api';+import type { UnifiedAgentRow } from '../infrastructureOperationsModel';import {INSTALL_PROFILE_OPTIONS,getPlatformConnectionsPathForCapability,@@ -54,42 +55,42 @@ describe('infrastructure operations model', () => {});it('keeps host-managed stop monitoring scoped to the full host surface set', () => {- const row = {+ const row: UnifiedAgentRow = {rowKey: 'agent-agent-1',id: 'agent-1',name: 'node-a',hostname: 'node-a.internal',capabilities: ['agent', 'docker', 'pbs'],- status: 'active' as const,- upgradePlatform: 'linux' as const,+ status: 'active',+ upgradePlatform: 'linux',scope: {label: 'Default',detail: 'Auto-detect',- category: 'default' as const,+ category: 'default',},installFlags: ['--enable-docker', '--disable-host', '--enable-proxmox', '--proxmox-type pbs'],searchText: 'node-a node-a.internal agent-1',surfaces: [{key: 'agent',- kind: 'agent' as const,+ kind: 'agent',label: 'Host telemetry',detail: 'Pulse is receiving host telemetry.',- action: 'stop-monitoring' as const,+ action: 'stop-monitoring',},{key: 'docker',- kind: 'docker' as const,+ kind: 'docker',label: 'Docker runtime data',detail: 'Pulse is receiving Docker telemetry.',- action: 'stop-monitoring' as const,+ action: 'stop-monitoring',},{key: 'pbs',- kind: 'pbs' as const,+ kind: 'pbs',label: 'PBS data',detail: 'Pulse is receiving PBS telemetry.',- action: 'stop-monitoring' as const,+ action: 'stop-monitoring',},],};diff --git a/frontend-modern/src/components/Settings/__tests__/TrueNASSettingsPanel.test.tsx b/frontend-modern/src/components/Settings/__tests__/TrueNASSettingsPanel.test.tsxindex fc49705e21..076fad15b7 100644--- a/frontend-modern/src/components/Settings/__tests__/TrueNASSettingsPanel.test.tsx+++ b/frontend-modern/src/components/Settings/__tests__/TrueNASSettingsPanel.test.tsx@@ -1,17 +1,19 @@import { cleanup, fireEvent, render, screen, within } from '@solidjs/testing-library';import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';+import type { MonitoredSystemLedgerPreviewResponse } from '@/api/monitoredSystemLedger';+import type { TrueNASConnection } from '@/api/truenas';import { TrueNASSettingsPanel } from '../TrueNASSettingsPanel';import type { TrueNASSettingsPanelState } from '../useTrueNASSettingsPanelState';const mockState = vi.hoisted(() => ({closeDeleteDialog: vi.fn(),closeDialog: vi.fn(),- connections: vi.fn(() => []),+ connections: vi.fn<() => TrueNASConnection[]>(() => []),deleteDialogOpen: vi.fn(() => false),deletePendingConnection: vi.fn(),deleting: vi.fn(() => false),dialogOpen: vi.fn(() => false),- editingConnection: vi.fn(() => null),+ editingConnection: vi.fn<() => TrueNASConnection | null>(() => null),featureDisabled: vi.fn(() => false),featureDisabledMessage: vi.fn(() => ''),form: vi.fn(() => ({@@ -36,10 +38,10 @@ const mockState = vi.hoisted(() => ({openCreateDialog: vi.fn(),openDeleteDialog: vi.fn(),openEditDialog: vi.fn(),- pendingDeleteConnection: vi.fn(() => null),- monitoredSystemPreview: vi.fn(() => null),- monitoredSystemPreviewError: vi.fn(() => null),- monitoredSystemPreviewErrorTitle: vi.fn(() => null),+ pendingDeleteConnection: vi.fn<() => TrueNASConnection | null>(() => null),+ monitoredSystemPreview: vi.fn<() => MonitoredSystemLedgerPreviewResponse | null>(() => null),+ monitoredSystemPreviewError: vi.fn<() => string | null>(() => null),+ monitoredSystemPreviewErrorTitle: vi.fn<() => string | null>(() => null),monitoredSystemAdmissionSaveBlocked: vi.fn(() => true),previewCurrentForm: vi.fn(),previewing: vi.fn(() => false),diff --git a/frontend-modern/src/components/Settings/__tests__/VMwareSettingsPanel.test.tsx b/frontend-modern/src/components/Settings/__tests__/VMwareSettingsPanel.test.tsxindex 764b06b3dd..969c292bb0 100644--- a/frontend-modern/src/components/Settings/__tests__/VMwareSettingsPanel.test.tsx+++ b/frontend-modern/src/components/Settings/__tests__/VMwareSettingsPanel.test.tsx@@ -1,13 +1,15 @@import { cleanup, fireEvent, render, screen, within } from '@solidjs/testing-library';import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';+import type { MonitoredSystemLedgerPreviewResponse } from '@/api/monitoredSystemLedger';import type { VMwareConnection } from '@/api/vmware';import { VMwareSettingsPanel } from '../VMwareSettingsPanel';import type { VMwareSettingsPanelState } from '../useVMwareSettingsPanelState';+import type { VMwareConnectionFailurePresentation } from '../vmwareConnectionFailurePresentation';const mockState = vi.hoisted(() => ({closeDeleteDialog: vi.fn(),closeDialog: vi.fn(),- connectionFailure: vi.fn(() => null),+ connectionFailure: vi.fn<() => VMwareConnectionFailurePresentation | null>(() => null),connections: vi.fn((): VMwareConnection[] => []),deleteDialogOpen: vi.fn(() => false),deletePendingConnection: vi.fn(),@@ -33,9 +35,9 @@ const mockState = vi.hoisted(() => ({openDeleteDialog: vi.fn(),openEditDialog: vi.fn(),pendingDeleteConnection: vi.fn((): VMwareConnection | null => null),- monitoredSystemPreview: vi.fn(() => null),- monitoredSystemPreviewError: vi.fn(() => null),- monitoredSystemPreviewErrorTitle: vi.fn(() => null),+ monitoredSystemPreview: vi.fn<() => MonitoredSystemLedgerPreviewResponse | null>(() => null),+ monitoredSystemPreviewError: vi.fn<() => string | null>(() => null),+ monitoredSystemPreviewErrorTitle: vi.fn<() => string | null>(() => null),monitoredSystemAdmissionSaveBlocked: vi.fn(() => true),previewCurrentForm: vi.fn(),previewing: vi.fn(() => false),diff --git a/frontend-modern/src/components/Settings/__tests__/reportingCatalogModel.test.ts b/frontend-modern/src/components/Settings/__tests__/reportingCatalogModel.test.tsindex 6c932ddf67..55dbf7a033 100644--- a/frontend-modern/src/components/Settings/__tests__/reportingCatalogModel.test.ts+++ b/frontend-modern/src/components/Settings/__tests__/reportingCatalogModel.test.ts@@ -85,7 +85,8 @@ describe('reporting catalog model', () => {expect(catalog.guidance.title).toBe('Advanced Insights');expect(catalog.performanceReport.defaultFormat).toBe('pdf');expect(catalog.performanceReport.ranges[0].windowHours).toBe(24);- expect(catalog.vmInventoryExport.exportEndpoint).toBe(+ expect(catalog.vmInventoryExport).not.toBeNull();+ expect(catalog.vmInventoryExport?.exportEndpoint).toBe('/api/admin/reports/inventory/vms/export',);});diff --git a/frontend-modern/src/components/Settings/__tests__/useSettingsInfrastructurePanelProps.test.ts b/frontend-modern/src/components/Settings/__tests__/useSettingsInfrastructurePanelProps.test.tsindex 17f0d1d58e..b8c16b80f7 100644--- a/frontend-modern/src/components/Settings/__tests__/useSettingsInfrastructurePanelProps.test.ts+++ b/frontend-modern/src/components/Settings/__tests__/useSettingsInfrastructurePanelProps.test.ts@@ -120,19 +120,15 @@ describe('useSettingsInfrastructurePanelProps', () => {createServiceResource('pbs', {displayName: 'PBS Main',policy: {- display: {- mode: 'governed',- summary: 'backup server resource; status online; sources pbs',- },+ sensitivity: 'restricted',+ routing: { scope: 'local-only', redact: ['hostname'] },},}),createServiceResource('pmg', {displayName: 'PMG Main',policy: {- display: {- mode: 'governed',- summary: 'mail gateway resource; status online; sources pmg',- },+ sensitivity: 'restricted',+ routing: { scope: 'local-only', redact: ['hostname'] },},}),]);diff --git a/frontend-modern/src/components/Settings/reportingPanelModel.ts b/frontend-modern/src/components/Settings/reportingPanelModel.tsindex fda20b01a1..01d8076273 100644--- a/frontend-modern/src/components/Settings/reportingPanelModel.ts+++ b/frontend-modern/src/components/Settings/reportingPanelModel.ts@@ -72,12 +72,12 @@ function sanitizeReportingFilenameSubject(switch (subject) {case 'resource_id': {let sanitized = value;- sanitized = sanitized.replaceAll('"', '');- sanitized = sanitized.replaceAll('\\', '');- sanitized = sanitized.replaceAll('/', '-');- sanitized = sanitized.replaceAll(':', '-');- sanitized = sanitized.replaceAll('\r', '');- sanitized = sanitized.replaceAll('\n', '');+ sanitized = sanitized.replace(/"/g, '');+ sanitized = sanitized.replace(/\\/g, '');+ sanitized = sanitized.replace(/\//g, '-');+ sanitized = sanitized.replace(/:/g, '-');+ sanitized = sanitized.replace(/\r/g, '');+ sanitized = sanitized.replace(/\n/g, '');if (sanitized.length > 64) {sanitized = sanitized.slice(0, 64);}diff --git a/frontend-modern/src/components/Settings/useAgentProfilesPanelState.ts b/frontend-modern/src/components/Settings/useAgentProfilesPanelState.tsindex b65554fd4b..cfb0c42ea1 100644--- a/frontend-modern/src/components/Settings/useAgentProfilesPanelState.ts+++ b/frontend-modern/src/components/Settings/useAgentProfilesPanelState.ts@@ -53,13 +53,11 @@ import {const resourcePriority = (resource: Resource): number => {switch (resource.type) {case 'agent':- return 0;+ return resource.platformType === 'truenas' ? 3 : 0;case 'pbs':return 1;case 'pmg':return 2;- case 'truenas':- return 3;case 'k8s-cluster':return 4;case 'docker-host':diff --git a/frontend-modern/src/components/Settings/useInfrastructureConfiguredNodesState.ts b/frontend-modern/src/components/Settings/useInfrastructureConfiguredNodesState.tsindex 6b562a4013..5f6f38cd58 100644--- a/frontend-modern/src/components/Settings/useInfrastructureConfiguredNodesState.ts+++ b/frontend-modern/src/components/Settings/useInfrastructureConfiguredNodesState.ts@@ -50,8 +50,7 @@ export const useInfrastructureConfiguredNodesState = ({byType('docker-host').length +byType('k8s-cluster').length +byType('pbs').length +- byType('pmg').length +- byType('truenas').length,+ byType('pmg').length,);const orgGuestUsage = createMemo(() => byType('vm').length + byType('system-container').length + byType('oci-container').length,diff --git a/frontend-modern/src/components/Settings/useInfrastructureReportingState.tsx b/frontend-modern/src/components/Settings/useInfrastructureReportingState.tsxindex 1bad916b82..3658fdc1d6 100644--- a/frontend-modern/src/components/Settings/useInfrastructureReportingState.tsx+++ b/frontend-modern/src/components/Settings/useInfrastructureReportingState.tsx@@ -256,26 +256,30 @@ export const useInfrastructureReportingState = () => {row: UnifiedAgentRow,) => {const removedAt = Date.now();- if (capabilities.includes('agent') && ids.agentId) {+ const displayName = row.displayName || row.name;+ const hostname = row.hostname || row.name;+ const agentId = ids.agentId;+ if (capabilities.includes('agent') && agentId) {setOptimisticRemovedHostAgents((prev) => [{- id: ids.agentId,- hostname: row.hostname,- displayName: row.displayName || row.name,+ id: agentId,+ hostname,+ displayName,removedAt,},- ...prev.filter((item) => item.id !== ids.agentId),+ ...prev.filter((item) => item.id !== agentId),]);}- if (capabilities.includes('docker') && ids.dockerId) {+ const dockerId = ids.dockerId;+ if (capabilities.includes('docker') && dockerId) {setOptimisticRemovedDockerHosts((prev) => [{- id: ids.dockerId,- hostname: row.hostname,- displayName: row.displayName || row.name,+ id: dockerId,+ hostname,+ displayName,removedAt,},- ...prev.filter((item) => item.id !== ids.dockerId),+ ...prev.filter((item) => item.id !== dockerId),]);}mutateResources((prev) =>diff --git a/frontend-modern/src/components/Storage/Storage.tsx b/frontend-modern/src/components/Storage/Storage.tsxindex 7cbf2df21a..5cbedc2a58 100644--- a/frontend-modern/src/components/Storage/Storage.tsx+++ b/frontend-modern/src/components/Storage/Storage.tsx@@ -1,4 +1,4 @@-import { Component, Show } from 'solid-js';+import { Component } from 'solid-js';import StorageCephSection from '@/components/Storage/StorageCephSection';import StorageContentCard from '@/components/Storage/StorageContentCard';import StoragePageBanners from '@/components/Storage/StoragePageBanners';diff --git a/frontend-modern/src/components/Storage/__tests__/StorageControls.test.tsx b/frontend-modern/src/components/Storage/__tests__/StorageControls.test.tsxindex f75e3cc423..1468193d6d 100644--- a/frontend-modern/src/components/Storage/__tests__/StorageControls.test.tsx+++ b/frontend-modern/src/components/Storage/__tests__/StorageControls.test.tsx@@ -2,6 +2,7 @@ import { fireEvent, render, screen, waitFor } from '@solidjs/testing-library';import { createSignal } from 'solid-js';import { describe, expect, it } from 'vitest';import { StorageControls } from '@/components/Storage/StorageControls';+import type { StorageSourceOption } from '@/utils/storageSources';describe('StorageControls', () => {it('renders the shared storage controls and node filter', () => {@@ -13,7 +14,7 @@ describe('StorageControls', () => {const [statusFilter, setStatusFilter] =createSignal<'all' | 'warning' | 'critical'>('all');const [sourceFilter, setSourceFilter] = createSignal('all');- const [sourceOptions] = createSignal([+ const [sourceOptions] = createSignal<StorageSourceOption[]>([{ key: 'all', label: 'All Sources', tone: 'slate' as const },{ key: 'proxmox-pve', label: 'PVE', tone: 'orange' as const },]);@@ -63,7 +64,7 @@ describe('StorageControls', () => {const [statusFilter, setStatusFilter] =createSignal<'all' | 'warning' | 'critical'>('all');const [sourceFilter, setSourceFilter] = createSignal('truenas');- const [sourceOptions, setSourceOptions] = createSignal([+ const [sourceOptions, setSourceOptions] = createSignal<StorageSourceOption[]>([{ key: 'all', label: 'All Sources', tone: 'slate' as const },]);const [selectedNodeId, setSelectedNodeId] = createSignal('all');diff --git a/frontend-modern/src/components/Storage/__tests__/StoragePoolDetail.test.tsx b/frontend-modern/src/components/Storage/__tests__/StoragePoolDetail.test.tsxindex 534ce5a915..964e73933a 100644--- a/frontend-modern/src/components/Storage/__tests__/StoragePoolDetail.test.tsx+++ b/frontend-modern/src/components/Storage/__tests__/StoragePoolDetail.test.tsx@@ -48,6 +48,7 @@ describe('StoragePoolDetail', () => {refs: { resourceId: 'storage-legacy-id', platformEntityId: 'truenas-1' },})}physicalDisks={[]}+ summarySeriesId="pool:tank"/></tbody></table>@@ -74,6 +75,7 @@ describe('StoragePoolDetail', () => {refs: { resourceId: 'pve1:local-zfs', platformEntityId: 'cluster-a' },})}physicalDisks={[] as Resource[]}+ summarySeriesId="pve1:local-zfs"/></tbody></table>diff --git a/frontend-modern/src/components/Storage/__tests__/useDiskListModel.test.ts b/frontend-modern/src/components/Storage/__tests__/useDiskListModel.test.tsindex b3d4c1fd1c..75e61b914c 100644--- a/frontend-modern/src/components/Storage/__tests__/useDiskListModel.test.ts+++ b/frontend-modern/src/components/Storage/__tests__/useDiskListModel.test.ts@@ -53,6 +53,7 @@ describe('useDiskListModel', () => {const [nodes] = createSignal<Resource[]>([buildNode('node-tower', 'tower')]);const [selectedNode] = createSignal<string | null>('node-tower');const [searchTerm] = createSignal('cache');+ const [selectedDiskId, setSelectedDiskId] = createSignal<string | null>(null);const { result } = renderHook(() =>useDiskListModel({@@ -60,6 +61,8 @@ describe('useDiskListModel', () => {nodes,selectedNode,searchTerm,+ selectedDiskId,+ setSelectedDiskId,}),);diff --git a/frontend-modern/src/components/Storage/__tests__/useStorageFilterToolbarModel.test.ts b/frontend-modern/src/components/Storage/__tests__/useStorageFilterToolbarModel.test.tsindex bab76584e2..ee1b5ca781 100644--- a/frontend-modern/src/components/Storage/__tests__/useStorageFilterToolbarModel.test.ts+++ b/frontend-modern/src/components/Storage/__tests__/useStorageFilterToolbarModel.test.ts@@ -2,6 +2,7 @@ import { renderHook } from '@solidjs/testing-library';import { createSignal } from 'solid-js';import { describe, expect, it } from 'vitest';import { useStorageFilterToolbarModel } from '@/components/Storage/useStorageFilterToolbarModel';+import type { StorageSourceOption } from '@/utils/storageSources';describe('useStorageFilterToolbarModel', () => {it('centralizes storage filter toolbar state and reset behavior', () => {@@ -53,7 +54,7 @@ describe('useStorageFilterToolbarModel', () => {const [search, setSearch] = createSignal('');const [sortKey, setSortKey] = createSignal('priority');const [sortDirection, setSortDirection] = createSignal<'asc' | 'desc'>('desc');- const [sourceOptions, setSourceOptions] = createSignal([+ const [sourceOptions, setSourceOptions] = createSignal<StorageSourceOption[]>([{ key: 'all', label: 'All Sources', tone: 'slate' as const },]);diff --git a/frontend-modern/src/components/Storage/diskResourceUtils.ts b/frontend-modern/src/components/Storage/diskResourceUtils.tsindex 5746550d27..28419c5458 100644--- a/frontend-modern/src/components/Storage/diskResourceUtils.ts+++ b/frontend-modern/src/components/Storage/diskResourceUtils.ts@@ -19,7 +19,6 @@ export interface PhysicalDiskNodeIdentity {}const normalize = (value: string | null | undefined): string => value?.trim().toLowerCase() || '';-const trim = (value: string | null | undefined): string => value?.trim() || '';export const getPhysicalDiskNodeIdentity = (resource: Resource): PhysicalDiskNodeIdentity => {const platformData = ((resource.platformData as DiskPlatformData | undefined) ||diff --git a/frontend-modern/src/components/shared/FilterToolbar.test.tsx b/frontend-modern/src/components/shared/FilterToolbar.test.tsxindex 1dec7b0821..0ab633762d 100644--- a/frontend-modern/src/components/shared/FilterToolbar.test.tsx+++ b/frontend-modern/src/components/shared/FilterToolbar.test.tsx@@ -90,6 +90,8 @@ describe('FilterHeader', () => {screen.getByRole('button', { name: 'Load options' }).click();await waitFor(() => expect(select.value).toBe('truenas'));- expect(screen.getByRole('option', { name: 'TrueNAS' }).selected).toBe(true);+ expect((screen.getByRole('option', { name: 'TrueNAS' }) as HTMLOptionElement).selected).toBe(+ true,+ );});});diff --git a/frontend-modern/src/components/shared/InfrastructureSummaryTableRow.tsx b/frontend-modern/src/components/shared/InfrastructureSummaryTableRow.tsxindex ed72c6dbf1..ca652df7a3 100644--- a/frontend-modern/src/components/shared/InfrastructureSummaryTableRow.tsx+++ b/frontend-modern/src/components/shared/InfrastructureSummaryTableRow.tsx@@ -51,6 +51,7 @@ export const InfrastructureSummaryTableRow: Component<InfrastructureSummaryTableconst isPBSItem = !isPVEItem;const node = () => (isPVEItem ? (props.item as Node) : null);const pbs = () => (isPBSItem ? (props.item as PBSInstance) : null);+ const pendingUpdates = createMemo(() => node()?.pendingUpdates);const online = createMemo(() => isInfrastructureSummaryItemOnline(props.item));const nodeId = () => (isPVEItem ? node()!.id : pbs()!.name);const resourceId = () => (isPVEItem ? node()!.id || node()!.name : pbs()!.id || pbs()!.name);@@ -207,19 +208,19 @@ export const InfrastructureSummaryTableRow: Component<InfrastructureSummaryTablewhen={isPVEItem &&online() &&- node()!.pendingUpdates !== undefined &&- node()!.pendingUpdates > 0+ pendingUpdates() !== undefined &&+ (pendingUpdates() ?? 0) > 0}><spanclass={`text-[9px] px-1 py-0 rounded font-medium whitespace-nowrap ${- (node()!.pendingUpdates ?? 0) >= 10+ (pendingUpdates() ?? 0) >= 10? 'bg-orange-100 text-orange-700 dark:bg-orange-900 dark:text-orange-400': 'bg-yellow-100 text-yellow-700 dark:bg-yellow-900 dark:text-yellow-400'}`}- title={`${node()!.pendingUpdates} pending apt update${node()!.pendingUpdates !== 1 ? 's' : ''}`}+ title={`${pendingUpdates()} pending apt update${pendingUpdates() !== 1 ? 's' : ''}`}>- {node()!.pendingUpdates} updates+ {pendingUpdates()} updates</span></Show><Show when={isPBSItem}>diff --git a/frontend-modern/src/components/shared/NodeGroupHeader.tsx b/frontend-modern/src/components/shared/NodeGroupHeader.tsxindex c9f38663a3..985fac0d79 100644--- a/frontend-modern/src/components/shared/NodeGroupHeader.tsx+++ b/frontend-modern/src/components/shared/NodeGroupHeader.tsx@@ -10,7 +10,8 @@ interface NodeGroupHeaderProps {leadingAction?: JSX.Element;renderAs?: 'tr' | 'div';trClass?: string;- trProps?: JSX.HTMLAttributes<HTMLTableRowElement>;+ trProps?: JSX.HTMLAttributes<HTMLTableRowElement> &+ Partial<Record<`data-${string}`, string | undefined>>;}export const NodeGroupHeader: Component<NodeGroupHeaderProps> = (props) => {diff --git a/frontend-modern/src/components/shared/SummaryRowActionButton.tsx b/frontend-modern/src/components/shared/SummaryRowActionButton.tsxindex 4208fad038..baf21e63d0 100644--- a/frontend-modern/src/components/shared/SummaryRowActionButton.tsx+++ b/frontend-modern/src/components/shared/SummaryRowActionButton.tsx@@ -38,10 +38,12 @@ const SCOPE_BUTTON_CLASS = [].join(' ');export const SummaryRowActionButton: Component<SummaryRowActionButtonProps> = (props) => {+ const disclosureProps = () => (props.kind === 'disclosure' ? props : null);+ const scopeProps = () => (props.kind === 'scope' ? props : null);const disclosureLabel = () =>- props.expanded ? `Collapse ${props.subjectLabel}` : `Expand ${props.subjectLabel}`;+ disclosureProps()?.expanded ? `Collapse ${props.subjectLabel}` : `Expand ${props.subjectLabel}`;const scopeLabel = () =>- props.pressed+ scopeProps()?.pressed? `Unpin summary scope for ${props.subjectLabel}`: `Pin summary scope for ${props.subjectLabel}`;@@ -51,9 +53,9 @@ export const SummaryRowActionButton: Component<SummaryRowActionButtonProps> = (pdata-row-action="true"class={`${props.kind === 'disclosure' ? DISCLOSURE_BUTTON_CLASS : SCOPE_BUTTON_CLASS} ${props.class ?? ''}`.trim()}aria-label={props.kind === 'disclosure' ? disclosureLabel() : scopeLabel()}- aria-expanded={props.kind === 'disclosure' ? props.expanded : undefined}- aria-controls={props.kind === 'disclosure' ? props.controlsId : undefined}- aria-pressed={props.kind === 'scope' ? props.pressed : undefined}+ aria-expanded={disclosureProps()?.expanded}+ aria-controls={disclosureProps()?.controlsId}+ aria-pressed={scopeProps()?.pressed}title={props.kind === 'disclosure' ? disclosureLabel() : scopeLabel()}onClick={(event) => {event.stopPropagation();@@ -68,7 +70,7 @@ export const SummaryRowActionButton: Component<SummaryRowActionButtonProps> = (pwhen={props.kind === 'scope'}fallback={<svg- class={`h-3.5 w-3.5 transition-transform duration-150 ${props.expanded ? 'rotate-90 text-base-content' : ''}`.trim()}+ class={`h-3.5 w-3.5 transition-transform duration-150 ${disclosureProps()?.expanded ? 'rotate-90 text-base-content' : ''}`.trim()}fill="none"viewBox="0 0 24 24"stroke="currentColor"@@ -84,9 +86,11 @@ export const SummaryRowActionButton: Component<SummaryRowActionButtonProps> = (p}><span- class={`whitespace-nowrap ${props.pressed ? 'border-sky-200 bg-sky-50 px-0 py-0 text-sky-700 dark:border-sky-900/60 dark:bg-sky-950/40 dark:text-sky-300' : ''}`.trim()}+ class={`whitespace-nowrap ${scopeProps()?.pressed ? 'border-sky-200 bg-sky-50 px-0 py-0 text-sky-700 dark:border-sky-900/60 dark:bg-sky-950/40 dark:text-sky-300' : ''}`.trim()}>- {props.pressed ? (props.activeLabel ?? 'Pinned') : (props.inactiveLabel ?? 'Scope')}+ {scopeProps()?.pressed+ ? (scopeProps()?.activeLabel ?? 'Pinned')+ : (scopeProps()?.inactiveLabel ?? 'Scope')}</span></Show></button>diff --git a/frontend-modern/src/components/shared/Toggle.tsx b/frontend-modern/src/components/shared/Toggle.tsxindex b3629cb786..6c3fe38a68 100644--- a/frontend-modern/src/components/shared/Toggle.tsx+++ b/frontend-modern/src/components/shared/Toggle.tsx@@ -8,6 +8,7 @@ import {resolveToggleSize,type ToggleSize,} from '@/components/shared/toggleModel';+export type { ToggleChangeEvent } from '@/components/shared/toggleModel';import {type ToggleRuntimeProps,useToggleState,diff --git a/frontend-modern/src/components/shared/__tests__/HistoryChart.test.tsx b/frontend-modern/src/components/shared/__tests__/HistoryChart.test.tsxindex 206b6f41cf..100ffb8ce8 100644--- a/frontend-modern/src/components/shared/__tests__/HistoryChart.test.tsx+++ b/frontend-modern/src/components/shared/__tests__/HistoryChart.test.tsx@@ -105,7 +105,7 @@ describe('HistoryChart', () => {it('renders the default history label', () => {render(() => (- <HistoryChart resourceType="node" resourceId="node-1" metric="cpu" />+ <HistoryChart resourceType="agent" resourceId="node-1" metric="cpu" />));expect(screen.getByText('History')).toBeInTheDocument();diff --git a/frontend-modern/src/components/shared/__tests__/InfrastructureSelector.test.tsx b/frontend-modern/src/components/shared/__tests__/InfrastructureSelector.test.tsxindex 0436af8888..cbc6468453 100644--- a/frontend-modern/src/components/shared/__tests__/InfrastructureSelector.test.tsx+++ b/frontend-modern/src/components/shared/__tests__/InfrastructureSelector.test.tsx@@ -121,12 +121,12 @@ describe('InfrastructureSelector', () => {displayName: 'PBS Main',status: 'online',platformId: 'pbs-main',+ platformType: 'proxmox-pbs',+ sourceType: 'api',lastSeen: Date.now(),policy: {- display: {- mode: 'governed',- summary: 'backup server resource; status online; sources pbs',- },+ sensitivity: 'restricted',+ routing: { scope: 'local-only', redact: ['hostname'] },},platformData: {agent: {@@ -144,7 +144,7 @@ describe('InfrastructureSelector', () => {raid: [],},},- ] as Resource[];+ ] as unknown as Resource[];expect(buildInfrastructureSelectorAgents(resources)).toEqual([expect.objectContaining({diff --git a/frontend-modern/src/components/shared/__tests__/InfrastructureSummaryTable.test.tsx b/frontend-modern/src/components/shared/__tests__/InfrastructureSummaryTable.test.tsxindex 36a93b42cc..58f0238724 100644--- a/frontend-modern/src/components/shared/__tests__/InfrastructureSummaryTable.test.tsx+++ b/frontend-modern/src/components/shared/__tests__/InfrastructureSummaryTable.test.tsx@@ -115,6 +115,11 @@ describe('InfrastructureSummaryTable', () => {expect(infrastructureSummaryTableRowSource).toContain('getAlertStyles');});+ it('keeps pending update badges inside the shared row primitive', () => {+ expect(infrastructureSummaryTableRowSource).toContain('pendingUpdates');+ expect(infrastructureSummaryTableRowSource).toContain('pending apt update');+ });+it('uses the shared normalized identity lookup helper', () => {expect(resourceIdentitySource).toContain('getNormalizedIdentityLookupVariants');expect(resourceIdentitySource).not.toContain(diff --git a/frontend-modern/src/components/shared/__tests__/summaryInteractionA11y.test.ts b/frontend-modern/src/components/shared/__tests__/summaryInteractionA11y.test.tsindex 6605e16147..2cd19095a4 100644--- a/frontend-modern/src/components/shared/__tests__/summaryInteractionA11y.test.ts+++ b/frontend-modern/src/components/shared/__tests__/summaryInteractionA11y.test.ts@@ -5,14 +5,45 @@ import {createSummaryInteractiveRowPreviewHandlers,} from '@/components/shared/summaryInteractionA11y';+const createPointerEvent = (pointerType: string) =>+ ({+ pointerType,+ currentTarget: document.body,+ target: document.body,+ }) as unknown as PointerEvent & { currentTarget: HTMLElement; target: Element };++const createFocusEvent = (+ currentTarget: HTMLElement,+ relatedTarget: EventTarget | null = null,+) =>+ ({+ currentTarget,+ target: currentTarget,+ relatedTarget,+ }) as unknown as FocusEvent & { currentTarget: HTMLElement; target: Element };++const createKeyboardEvent = (+ currentTarget: HTMLButtonElement,+ key: string,+ code: string,+ preventDefault: () => void,+) =>+ ({+ key,+ code,+ currentTarget,+ target: currentTarget,+ preventDefault,+ }) as unknown as KeyboardEvent & { currentTarget: HTMLButtonElement; target: Element };+describe('summaryInteractionA11y', () => {it('previews on fine pointers and ignores touch pointers', () => {const onPreview = vi.fn();const handlers = createSummaryInteractiveRowPreviewHandlers({ onPreview });- handlers.onPointerEnter?.({ pointerType: 'mouse' } as PointerEvent);- handlers.onPointerEnter?.({ pointerType: 'pen' } as PointerEvent);- handlers.onPointerEnter?.({ pointerType: 'touch' } as PointerEvent);+ handlers.onPointerEnter(createPointerEvent('mouse'));+ handlers.onPointerEnter(createPointerEvent('pen'));+ handlers.onPointerEnter(createPointerEvent('touch'));expect(onPreview).toHaveBeenCalledTimes(2);});@@ -25,15 +56,9 @@ describe('summaryInteractionA11y', () => {const child = document.createElement('button');row.appendChild(child);- handlers.onFocusIn?.({ currentTarget: row } as FocusEvent & { currentTarget: HTMLElement });- handlers.onFocusOut?.({- currentTarget: row,- relatedTarget: child,- } as FocusEvent & { currentTarget: HTMLElement; relatedTarget: EventTarget | null });- handlers.onFocusOut?.({- currentTarget: row,- relatedTarget: document.body,- } as FocusEvent & { currentTarget: HTMLElement; relatedTarget: EventTarget | null });+ handlers.onFocusIn(createFocusEvent(row));+ handlers.onFocusOut(createFocusEvent(row, child));+ handlers.onFocusOut(createFocusEvent(row, document.body));expect(onPreview).toHaveBeenCalledTimes(1);expect(onPreviewClear).toHaveBeenCalledTimes(1);@@ -45,26 +70,10 @@ describe('summaryInteractionA11y', () => {const button = document.createElement('button');const enterPreventDefault = vi.fn();- onKeyDown({- key: 'Enter',- code: 'Enter',- currentTarget: button,- preventDefault: enterPreventDefault,- } as KeyboardEvent & {- currentTarget: HTMLButtonElement;- preventDefault: () => void;- });+ onKeyDown(createKeyboardEvent(button, 'Enter', 'Enter', enterPreventDefault));const spacePreventDefault = vi.fn();- onKeyDown({- key: 'Space',- code: 'Space',- currentTarget: button,- preventDefault: spacePreventDefault,- } as KeyboardEvent & {- currentTarget: HTMLButtonElement;- preventDefault: () => void;- });+ onKeyDown(createKeyboardEvent(button, 'Space', 'Space', spacePreventDefault));expect(onAction).toHaveBeenCalledTimes(2);expect(enterPreventDefault).toHaveBeenCalledTimes(1);@@ -78,14 +87,7 @@ describe('summaryInteractionA11y', () => {button.blur = vi.fn();const preventDefault = vi.fn();- onKeyDown({- key: 'Escape',- currentTarget: button,- preventDefault,- } as KeyboardEvent & {- currentTarget: HTMLButtonElement;- preventDefault: () => void;- });+ onKeyDown(createKeyboardEvent(button, 'Escape', 'Escape', preventDefault));expect(onPreviewClear).toHaveBeenCalledTimes(1);expect(preventDefault).toHaveBeenCalledTimes(1);diff --git a/frontend-modern/src/components/shared/summaryInteractionA11y.ts b/frontend-modern/src/components/shared/summaryInteractionA11y.tsindex de86ff327c..0b6c628dec 100644--- a/frontend-modern/src/components/shared/summaryInteractionA11y.ts+++ b/frontend-modern/src/components/shared/summaryInteractionA11y.ts@@ -22,12 +22,16 @@ interface SummaryInteractiveRowPreviewOptions {onPreviewClear?: () => void;}+interface SummaryInteractiveRowPreviewHandlers {+ onFocusIn: JSX.EventHandler<HTMLElement, FocusEvent>;+ onFocusOut: JSX.EventHandler<HTMLElement, FocusEvent>;+ onPointerEnter: JSX.EventHandler<HTMLElement, PointerEvent>;+ onPointerLeave: JSX.EventHandler<HTMLElement, PointerEvent>;+}+export const createSummaryInteractiveRowPreviewHandlers = (options: SummaryInteractiveRowPreviewOptions,-): Pick<- JSX.HTMLAttributes<HTMLElement>,- 'onFocusIn' | 'onFocusOut' | 'onPointerEnter' | 'onPointerLeave'-> => ({+): SummaryInteractiveRowPreviewHandlers => ({onPointerEnter: (event) => {if (isFinePointerEvent(event)) {options.onPreview?.();@@ -57,7 +61,7 @@ interface SummaryInteractiveActionKeydownOptions {export const createSummaryInteractiveActionKeydownHandler = (options: SummaryInteractiveActionKeydownOptions,-): JSX.EventHandlerUnion<HTMLButtonElement, KeyboardEvent> => (event) => {+): JSX.EventHandler<HTMLButtonElement, KeyboardEvent> => (event) => {if (event.key === 'Enter' ||event.key === ' ' ||diff --git a/frontend-modern/src/features/alerts/__tests__/AlertResourceIncidentsPanel.test.tsx b/frontend-modern/src/features/alerts/__tests__/AlertResourceIncidentsPanel.test.tsxindex a97b5cfb6a..0824d723c9 100644--- a/frontend-modern/src/features/alerts/__tests__/AlertResourceIncidentsPanel.test.tsx+++ b/frontend-modern/src/features/alerts/__tests__/AlertResourceIncidentsPanel.test.tsx@@ -1,10 +1,11 @@import { render, screen } from '@solidjs/testing-library';+import type { JSX } from 'solid-js';import { describe, expect, it, vi } from 'vitest';import { AlertResourceIncidentsPanel } from '../AlertResourceIncidentsPanel';vi.mock('@solidjs/router', () => ({- A: (props: { href: string; children: unknown; [key: string]: unknown }) => (+ A: (props: { href: string; children?: JSX.Element; [key: string]: unknown }) => (<a href={props.href} aria-label={props['aria-label'] as string}>{props.children}</a>diff --git a/frontend-modern/src/features/alerts/__tests__/alertDestinationsModel.test.ts b/frontend-modern/src/features/alerts/__tests__/alertDestinationsModel.test.tsindex bf5f4639f3..9845db1345 100644--- a/frontend-modern/src/features/alerts/__tests__/alertDestinationsModel.test.ts+++ b/frontend-modern/src/features/alerts/__tests__/alertDestinationsModel.test.ts@@ -40,6 +40,10 @@ describe('alertDestinationsModel', () => {to: ['[email protected]'],tls: true,startTLS: true,+ replyTo: '',+ maxRetries: 3,+ retryDelay: 60,+ rateLimit: 0,}),).toEqual(expect.objectContaining({diff --git a/frontend-modern/src/features/alerts/__tests__/useAlertOverridesState.test.tsx b/frontend-modern/src/features/alerts/__tests__/useAlertOverridesState.test.tsxindex ead38afddb..438d5d22ab 100644--- a/frontend-modern/src/features/alerts/__tests__/useAlertOverridesState.test.tsx+++ b/frontend-modern/src/features/alerts/__tests__/useAlertOverridesState.test.tsx@@ -125,7 +125,7 @@ describe('useAlertOverridesState', () => {it('exposes canonical container runtimes for TrueNAS-backed app workloads', async () => {const [hasUnsavedChanges] = createSignal(false);- const [overviewOverrides, setOverviewOverrides] = createSignal([]);+ const [, setOverviewOverrides] = createSignal([]);const resources = [makeResource({id: 'truenas-main',diff --git a/frontend-modern/src/features/alerts/tabs/ScheduleTab.tsx b/frontend-modern/src/features/alerts/tabs/ScheduleTab.tsxindex a041da9293..e5cc0f1fc0 100644--- a/frontend-modern/src/features/alerts/tabs/ScheduleTab.tsx+++ b/frontend-modern/src/features/alerts/tabs/ScheduleTab.tsx@@ -29,7 +29,9 @@ export interface ScheduleTabProps {}export function ScheduleTab(props: ScheduleTabProps) {- const quietHourSuppressOptions = getAlertConfigQuietHourSuppressOptions();+ const quietHourSuppressOptions = getAlertConfigQuietHourSuppressOptions().map((option) => ({+ ...option,+ }));const scheduleState = useAlertScheduleState(props);return (@@ -74,7 +76,9 @@ export function ScheduleTab(props: ScheduleTabProps) {setQuietHoursStart={scheduleState.setQuietHoursStart}setQuietHoursEnd={scheduleState.setQuietHoursEnd}setQuietHoursTimezone={scheduleState.setQuietHoursTimezone}- toggleQuietDay={scheduleState.toggleQuietDay}+ toggleQuietDay={(day: keyof QuietHoursConfig['days']) =>+ scheduleState.toggleQuietDay(day as Parameters<typeof scheduleState.toggleQuietDay>[0])+ }setQuietSuppressCategory={scheduleState.setQuietSuppressCategory}/>diff --git a/frontend-modern/src/features/alerts/useAlertIncidentTimelineState.ts b/frontend-modern/src/features/alerts/useAlertIncidentTimelineState.tsindex e6888bceff..df8198a258 100644--- a/frontend-modern/src/features/alerts/useAlertIncidentTimelineState.ts+++ b/frontend-modern/src/features/alerts/useAlertIncidentTimelineState.ts@@ -29,9 +29,9 @@ export function useAlertIncidentTimelineState() {setIncidentTimelines({});setIncidentLoading({});setIncidentErrors({});- setExpandedIncidents(new Set());+ setExpandedIncidents(new Set<string>());setIncidentNoteDrafts({});- setIncidentNoteSaving(new Set());+ setIncidentNoteSaving(new Set<string>());setEventFilters(createIncidentEventFilterSet());};@@ -77,7 +77,7 @@ export function useAlertIncidentTimelineState() {}setIncidentNoteSaving((prev) => {- const next = new Set(prev);+ const next = new Set<string>(prev);next.add(key);return next;});@@ -93,7 +93,7 @@ export function useAlertIncidentTimelineState() {notificationStore.error(getAlertResourceIncidentNoteSaveFailure());} finally {setIncidentNoteSaving((prev) => {- const next = new Set(prev);+ const next = new Set<string>(prev);next.delete(key);return next;});diff --git a/frontend-modern/src/features/infrastructure/__tests__/infrastructurePageModel.test.ts b/frontend-modern/src/features/infrastructure/__tests__/infrastructurePageModel.test.tsindex 9f6053219e..8807642a97 100644--- a/frontend-modern/src/features/infrastructure/__tests__/infrastructurePageModel.test.ts+++ b/frontend-modern/src/features/infrastructure/__tests__/infrastructurePageModel.test.ts@@ -28,8 +28,8 @@ describe('infrastructurePageModel', () => {makeResource({id: 'resource-2',type: 'vm',- platformType: 'proxmox-vm',- status: 'warning',+ platformType: 'proxmox-pve',+ status: 'degraded',platformData: { sources: ['proxmox'] },}),];@@ -62,8 +62,8 @@ describe('infrastructurePageModel', () => {id: 'resource-2',displayName: 'VM Beta',type: 'vm',- platformType: 'proxmox-vm',- status: 'warning',+ platformType: 'proxmox-pve',+ status: 'degraded',platformData: { sources: ['proxmox'] },}),];diff --git a/frontend-modern/src/features/storageBackups/__tests__/diskPresentation.test.ts b/frontend-modern/src/features/storageBackups/__tests__/diskPresentation.test.tsindex 47c2d6dcb4..98a78b4a6e 100644--- a/frontend-modern/src/features/storageBackups/__tests__/diskPresentation.test.ts+++ b/frontend-modern/src/features/storageBackups/__tests__/diskPresentation.test.ts@@ -5,14 +5,13 @@ import {comparePhysicalDiskPresentation,extractPhysicalDiskPresentationData,filterAndSortPhysicalDisks,- getPhysicalDiskExpandIconClass,PHYSICAL_DISK_EMPTY_CARD_CLASS,- PHYSICAL_DISK_EXPAND_BUTTON_CLASS,PHYSICAL_DISK_HEADER_DISK_CLASS,PHYSICAL_DISK_HEADER_SOURCE_CLASS,PHYSICAL_DISK_NAME_TEXT_CLASS,PHYSICAL_DISK_SOURCE_BADGE_CLASS,PHYSICAL_DISK_TABLE_CLASS,+ PHYSICAL_DISK_TABLE_ROW_HOVER_CLASS,getPhysicalDiskEmptyStatePresentation,getPhysicalDiskHealthStatus,getPhysicalDiskHealthSummary,@@ -52,7 +51,7 @@ describe('diskPresentation', () => {it('returns critical presentation for failed disks', () => {expect(PHYSICAL_DISK_EMPTY_CARD_CLASS).toBe('text-center');expect(PHYSICAL_DISK_TABLE_CLASS).toBe('w-full text-xs');- expect(PHYSICAL_DISK_EXPAND_BUTTON_CLASS).toContain('hover:bg-surface-hover');+ expect(PHYSICAL_DISK_TABLE_ROW_HOVER_CLASS).toContain('hover:bg-surface-hover');expect(PHYSICAL_DISK_HEADER_DISK_CLASS).toContain('uppercase');expect(PHYSICAL_DISK_HEADER_SOURCE_CLASS).toContain('w-[72px]');expect(PHYSICAL_DISK_NAME_TEXT_CLASS).toContain('font-semibold');@@ -117,8 +116,6 @@ describe('diskPresentation', () => {className:'bg-orange-100 text-orange-700 dark:bg-orange-900 dark:text-orange-400 inline-flex min-w-[3.25rem] justify-center px-1.5 py-px text-[9px] font-medium',});- expect(getPhysicalDiskExpandIconClass(true)).toContain('rotate-90');- expect(getPhysicalDiskExpandIconClass(false)).not.toContain('rotate-90');});it('returns host, health summary, and empty-state presentation canonically', () => {diff --git a/frontend-modern/src/features/storageBackups/__tests__/storageModelCore.test.ts b/frontend-modern/src/features/storageBackups/__tests__/storageModelCore.test.tsindex 158a1f9bea..56bb89bc33 100644--- a/frontend-modern/src/features/storageBackups/__tests__/storageModelCore.test.ts+++ b/frontend-modern/src/features/storageBackups/__tests__/storageModelCore.test.ts@@ -67,7 +67,7 @@ describe('storageModelCore', () => {name: 'tank',source: {platform: 'truenas',- family: 'storage',+ family: 'onprem',origin: 'resource',adapterId: 'resource-storage',},diff --git a/frontend-modern/src/features/storageBackups/__tests__/storagePoolRowPresentation.test.ts b/frontend-modern/src/features/storageBackups/__tests__/storagePoolRowPresentation.test.tsindex e523a59d36..b360195df8 100644--- a/frontend-modern/src/features/storageBackups/__tests__/storagePoolRowPresentation.test.ts+++ b/frontend-modern/src/features/storageBackups/__tests__/storagePoolRowPresentation.test.ts@@ -2,11 +2,9 @@ import { describe, expect, it } from 'vitest';import type { StorageRecord } from '@/features/storageBackups/models';import {buildStoragePoolRowModel,- getStoragePoolExpandIconClass,getStoragePoolImpactTextClass,STORAGE_POOL_ROW_CLASS,- STORAGE_POOL_ROW_EXPAND_BUTTON_CLASS,- STORAGE_POOL_ROW_EXPAND_ICON_BASE_CLASS,+ STORAGE_POOL_ROW_EXPANDED_CLASS,STORAGE_POOL_ROW_NAME_TEXT_CLASS,STORAGE_POOL_ROW_PLACEHOLDER_CLASS,STORAGE_POOL_ROW_SOURCE_BADGE_CLASS,@@ -45,10 +43,9 @@ describe('storage pool row presentation', () => {expect(STORAGE_POOL_ROW_CLASS).toContain('cursor-pointer');expect(STORAGE_POOL_ROW_NAME_TEXT_CLASS).toContain('font-semibold');expect(STORAGE_POOL_ROW_SOURCE_BADGE_CLASS).toContain('text-[9px]');- expect(STORAGE_POOL_ROW_EXPAND_BUTTON_CLASS).toContain('hover:bg-surface-hover');+ expect(STORAGE_POOL_ROW_EXPANDED_CLASS).toBe('bg-surface-alt');expect(STORAGE_POOL_ROW_PLACEHOLDER_CLASS).toBe('text-muted');expect(STORAGE_POOL_ROW_USAGE_FALLBACK_CLASS).toBe('text-[11px] text-muted');- expect(STORAGE_POOL_ROW_EXPAND_ICON_BASE_CLASS).toContain('transition-transform');const model = buildStoragePoolRowModel(baseRecord());@@ -60,7 +57,6 @@ describe('storage pool row presentation', () => {expect(model.compactIssue).toBe('Capacity Pressure');expect(model.compactImpact).toBe('—');expect(model.freeBytes).toBe(200);- expect(getStoragePoolExpandIconClass(true)).toContain('rotate-90');expect(getStoragePoolImpactTextClass('—')).toContain('text-muted');});});diff --git a/frontend-modern/src/hooks/useWorkloads.ts b/frontend-modern/src/hooks/useWorkloads.tsindex dccaeeff3f..884084723f 100644--- a/frontend-modern/src/hooks/useWorkloads.ts+++ b/frontend-modern/src/hooks/useWorkloads.ts@@ -320,7 +320,7 @@ const mapResourceToWorkload = (resource: APIResource): WorkloadGuest | null => {const platformType = resolvePlatformTypeFromSources(resource.sources);const dockerManagedAppContainer = isDockerManagedAppContainer({workloadType,- type: resource.type,+ type: resource.type ?? '',platformType,containerRuntime: resource.docker?.runtime,});diff --git a/frontend-modern/src/pages/__tests__/AIIntelligence.test.tsx b/frontend-modern/src/pages/__tests__/AIIntelligence.test.tsxindex 05bbd8ac16..475366027b 100644--- a/frontend-modern/src/pages/__tests__/AIIntelligence.test.tsx+++ b/frontend-modern/src/pages/__tests__/AIIntelligence.test.tsx@@ -45,7 +45,7 @@ const { findingsPanelState, runHistoryState, intelligenceState } = vi.hoisted(()};predictions_count: number;recent_changes_count: number;- recent_changes: Array<{+ recent_changes?: Array<{id: string;observedAt: string;resourceId: string;diff --git a/frontend-modern/src/pages/__tests__/Alerts.helpers.test.ts b/frontend-modern/src/pages/__tests__/Alerts.helpers.test.tsindex 225137d0b5..ed942e0d61 100644--- a/frontend-modern/src/pages/__tests__/Alerts.helpers.test.ts+++ b/frontend-modern/src/pages/__tests__/Alerts.helpers.test.ts@@ -994,7 +994,6 @@ describe('Unified selector parity', () => {['docker-host', 'Container Runtime'],['k8s-cluster', 'K8s Cluster'],['k8s-node', 'K8s Node'],- ['truenas', 'Agent'],['vm', 'VM'],['system-container', 'Container'],['oci-container', 'Container'],@@ -1017,6 +1016,10 @@ describe('Unified selector parity', () => {}});+ it('maps the legacy truenas alias to Agent', () => {+ expect(unifiedTypeToAlertDisplayType('truenas' as any)).toBe('Agent');+ });+it('keeps guest override extraction shape aligned with legacy mapping', () => {const thresholds: RawOverrideConfig = {cpu: { trigger: 88, clear: 78 },diff --git a/frontend-modern/src/stores/__tests__/aiChat.test.ts b/frontend-modern/src/stores/__tests__/aiChat.test.tsindex 5cb2d25914..a07ed51ecb 100644--- a/frontend-modern/src/stores/__tests__/aiChat.test.ts+++ b/frontend-modern/src/stores/__tests__/aiChat.test.ts@@ -79,6 +79,17 @@ describe('aiChatStore', () => {expect(aiChatStore.context.targetId).toBe('agent-1');});+ it('prefers guestName, then name, then target id for target context labels', () => {+ aiChatStore.setTargetContext('vm', 'vm-101', { guestName: 'guest-first', name: 'ignored-name' });+ expect(aiChatStore.contextItems[0].name).toBe('guest-first');++ aiChatStore.openForTarget('agent', 'agent-1', { name: 'node-name' });+ expect(aiChatStore.contextItems[0].name).toBe('node-name');++ aiChatStore.openForTarget('storage', 'storage-1');+ expect(aiChatStore.contextItems[0].name).toBe('storage-1');+ });+it('opens with a pre-filled prompt', () => {aiChatStore.openWithPrompt('hello', { targetType: 'vm', targetId: 'vm-101' });expect(aiChatStore.isOpen).toBe(true);diff --git a/frontend-modern/src/stores/__tests__/license.test.ts b/frontend-modern/src/stores/__tests__/license.test.tsindex c4e3ac945f..aeab02e1d2 100644--- a/frontend-modern/src/stores/__tests__/license.test.ts+++ b/frontend-modern/src/stores/__tests__/license.test.ts@@ -93,14 +93,6 @@ describe('license stores', () => {upgrade_reasons: [],};- const mockFreeCommercialEntitlements: LicenseCommercialEntitlements = {- ...mockFreeCommercialPosture,- capabilities: [],- limits: [],- hosted_mode: false,- max_history_days: 7,- };-beforeEach(() => {vi.clearAllMocks();vi.mocked(presentationPolicyHidesCommercialSurfaces).mockReturnValue(false);@@ -297,10 +289,10 @@ describe('license stores', () => {});it('deduplicates in-flight commercial posture loads', async () => {- let resolveLoad: ((value: typeof mockCommercialPosture) => void) | null = null;+ let resolveLoad!: (value: typeof mockCommercialPosture) => void;vi.mocked(LicenseAPI.getCommercialPosture).mockImplementation(() =>- new Promise((resolve) => {+ new Promise<typeof mockCommercialPosture>((resolve) => {resolveLoad = resolve;}),);@@ -309,7 +301,7 @@ describe('license stores', () => {const secondLoad = loadCommercialPosture();expect(LicenseAPI.getCommercialPosture).toHaveBeenCalledTimes(1);- resolveLoad?.(mockCommercialPosture);+ resolveLoad(mockCommercialPosture);await Promise.all([firstLoad, secondLoad]);expect(commercialPosture()).toEqual(mockCommercialPosture);diff --git a/frontend-modern/src/stores/aiIntelligenceSummaryModel.ts b/frontend-modern/src/stores/aiIntelligenceSummaryModel.tsindex b0a95cdb85..bcc2629087 100644--- a/frontend-modern/src/stores/aiIntelligenceSummaryModel.ts+++ b/frontend-modern/src/stores/aiIntelligenceSummaryModel.ts@@ -8,7 +8,7 @@ import type {ResourceSensitivity,} from '@/types/resource';-function normalizeNonNegativeCount(value: number | undefined): number | null {+function normalizeNonNegativeCount(value: unknown): number | null {if (typeof value !== 'number' || !Number.isFinite(value) || value < 0) {return null;}@@ -32,7 +32,10 @@ function normalizeCountMap<T extends string>(}function sumCountMap<T extends string>(counts: Partial<Record<T, number>>): number {- return Object.values(counts).reduce((total, count) => total + (count ?? 0), 0);+ return (Object.values(counts) as Array<number | undefined>).reduce<number>(+ (total, count) => total + (count ?? 0),+ 0,+ );}function normalizePolicyPosture(@@ -45,9 +48,11 @@ function normalizePolicyPosture(const sensitivityCounts = normalizeCountMap<ResourceSensitivity>(posture.sensitivity_counts);const routingCounts = normalizeCountMap<ResourceRoutingScope>(posture.routing_counts);const redactionCounts = normalizeCountMap<ResourceRedactionHint>(posture.redaction_counts);- const totalResources =- normalizeNonNegativeCount(posture.total_resources) ??- Math.max(sumCountMap(sensitivityCounts), sumCountMap(routingCounts));+ const totalResources = Math.max(+ normalizeNonNegativeCount(posture.total_resources) ?? 0,+ sumCountMap(sensitivityCounts),+ sumCountMap(routingCounts),+ );return {total_resources: totalResources,diff --git a/frontend-modern/src/stores/licenseCommercial.ts b/frontend-modern/src/stores/licenseCommercial.tsindex 027fb76021..26b901d72c 100644--- a/frontend-modern/src/stores/licenseCommercial.ts+++ b/frontend-modern/src/stores/licenseCommercial.ts@@ -7,7 +7,6 @@ import {import { eventBus } from '@/stores/events';import { logger } from '@/utils/logger';import {- getInProductPricingDestination,getUpgradeFallbackDestination,isSelfHostedPurchaseStartDestination,} from '@/utils/pricingHandoff';diff --git a/frontend-modern/src/types/ai.ts b/frontend-modern/src/types/ai.tsindex 22b9b0e447..fa426e8ef5 100644--- a/frontend-modern/src/types/ai.ts+++ b/frontend-modern/src/types/ai.ts@@ -24,6 +24,7 @@ export interface AISettings {oauth_connected: boolean; // true if OAuth tokens are configured// Patrol settings for token efficiencypatrol_interval_minutes?: number; // Patrol interval in minutes (0 = disabled, minimum 10)+ patrol_enabled?: boolean; // Legacy/server-authored patrol runtime toggle still surfaced by the APIalert_triggered_analysis?: boolean; // true if AI should analyze when alerts firepatrol_event_triggers_enabled?: boolean; // legacy aggregate toggle, true if any scoped Patrol trigger source is enabledpatrol_alert_triggers_enabled?: boolean; // true if alert-driven scoped Patrol triggers are enabled@@ -74,6 +75,7 @@ export interface AISettingsUpdateRequest {auto_fix_model?: string; // Model for auto-fix remediation// Patrol settings for token efficiencypatrol_interval_minutes?: number; // Custom interval in minutes (0 = disabled, minimum 10)+ patrol_enabled?: boolean; // Legacy/server-authored patrol runtime toggle still accepted by the APIalert_triggered_analysis?: boolean; // true if AI should analyze when alerts firepatrol_event_triggers_enabled?: boolean; // legacy aggregate toggle, applies to both scoped Patrol trigger sourcespatrol_alert_triggers_enabled?: boolean; // true if alert-driven scoped Patrol triggers are enableddiff --git a/frontend-modern/src/types/recovery.ts b/frontend-modern/src/types/recovery.tsindex b6b69daced..7e0636dba9 100644--- a/frontend-modern/src/types/recovery.ts+++ b/frontend-modern/src/types/recovery.ts@@ -20,6 +20,8 @@ export interface RecoveryExternalRef {}export interface RecoveryPointDisplay {+ subjectLabel?: string;+ subjectType?: string;itemLabel?: string;itemType?: string;isWorkload?: boolean;@@ -32,10 +34,7 @@ export interface RecoveryPointDisplay {detailsSummary?: string;}-export interface RecoveryPointDisplayTransport extends RecoveryPointDisplay {- subjectLabel?: string;- subjectType?: string;-}+export interface RecoveryPointDisplayTransport extends RecoveryPointDisplay {}export interface RecoveryPoint {id: string;@@ -100,7 +99,8 @@ export interface ProtectionRollup {lastAttemptAt?: string | null;lastSuccessAt?: string | null;- lastOutcome: RecoveryOutcome;+ // Older payloads may omit this even though the canonical backend contract now supplies it.+ lastOutcome?: RecoveryOutcome;platforms?: RecoveryPlatform[];}diff --git a/frontend-modern/src/utils/__tests__/reportableResourceTypes.test.ts b/frontend-modern/src/utils/__tests__/reportableResourceTypes.test.tsindex 18c09e152b..5f8518ed3b 100644--- a/frontend-modern/src/utils/__tests__/reportableResourceTypes.test.ts+++ b/frontend-modern/src/utils/__tests__/reportableResourceTypes.test.ts@@ -13,7 +13,7 @@ describe('reportableResourceTypes', () => {it('exports the shared reportable resource set', () => {expect(REPORTABLE_RESOURCE_TYPES.has('agent')).toBe(true);expect(REPORTABLE_RESOURCE_TYPES.has('pbs')).toBe(true);- expect(REPORTABLE_RESOURCE_TYPES.has('truenas')).toBe(false);+ expect(REPORTABLE_RESOURCE_TYPES.has('truenas' as any)).toBe(false);});it('normalizes resource types for picker ordering', () => {diff --git a/frontend-modern/src/utils/__tests__/resourceStateAdapters.test.ts b/frontend-modern/src/utils/__tests__/resourceStateAdapters.test.tsindex 52917734eb..9eda55abef 100644--- a/frontend-modern/src/utils/__tests__/resourceStateAdapters.test.ts+++ b/frontend-modern/src/utils/__tests__/resourceStateAdapters.test.ts@@ -100,11 +100,9 @@ describe('resourceStateAdapters nodeFromResource', () => {displayName: 'Tower',platformId: 'tower-id',policy: {- display: {- mode: 'governed',- summary: 'host resource; status online; source agent',- },- } as Resource['policy'],+ sensitivity: 'restricted',+ routing: { scope: 'local-only', redact: ['hostname'] },+ },canonicalIdentity: {displayName: 'Tower',hostname: 'tower.local',@@ -151,11 +149,9 @@ describe('resourceStateAdapters nodeFromResource', () => {{displayName: 'PBS Main',policy: {- display: {- mode: 'governed',- summary: 'backup server resource; status online; sources pbs',- },- } as Resource['policy'],+ sensitivity: 'restricted',+ routing: { scope: 'local-only', redact: ['hostname'] },+ },},),);@@ -188,11 +184,9 @@ describe('resourceStateAdapters nodeFromResource', () => {{displayName: 'PMG Main',policy: {- display: {- mode: 'governed',- summary: 'mail gateway resource; status online; sources pmg',- },- } as Resource['policy'],+ sensitivity: 'restricted',+ routing: { scope: 'local-only', redact: ['hostname'] },+ },},),);diff --git a/frontend-modern/src/utils/__tests__/resourceTypeCompat.test.ts b/frontend-modern/src/utils/__tests__/resourceTypeCompat.test.tsindex 73f1785d58..bfaeb19547 100644--- a/frontend-modern/src/utils/__tests__/resourceTypeCompat.test.ts+++ b/frontend-modern/src/utils/__tests__/resourceTypeCompat.test.ts@@ -10,6 +10,7 @@ describe('resourceTypeCompat', () => {expect(canonicalizeFrontendResourceType('kubernetes')).toBe('pod');expect(canonicalizeFrontendResourceType('kubernetes_cluster')).toBe('k8s-cluster');expect(canonicalizeFrontendResourceType('kubernetes-node')).toBe('k8s-node');+ expect(canonicalizeFrontendResourceType('ceph')).toBe('ceph');expect(canonicalizeFrontendResourceType('truenas')).toBe('agent');});diff --git a/frontend-modern/src/utils/__tests__/workloads.test.ts b/frontend-modern/src/utils/__tests__/workloads.test.tsindex 507510a74b..6978de1825 100644--- a/frontend-modern/src/utils/__tests__/workloads.test.ts+++ b/frontend-modern/src/utils/__tests__/workloads.test.ts@@ -232,12 +232,22 @@ describe('isDockerManagedAppContainer', () => {describe('getDiscoveryResourceTypeForWorkload', () => {it('returns the canonical discovery resource type for VM workloads with canonical coordinates', () => {- const guest = { workloadType: 'vm' as const, type: 'vm', node: 'pve1', vmid: 101 };+ const guest = {+ id: 'vm:pve1:101',+ instance: 'cluster-a',+ workloadType: 'vm' as const,+ type: 'vm',+ node: 'pve1',+ vmid: 101,+ };expect(getDiscoveryResourceTypeForWorkload(guest)).toBe('vm');});it('returns the canonical discovery resource type for Docker-managed app-container workloads', () => {const guest = {+ instance: 'docker-host-1',+ vmid: 0,+ node: 'docker-host-1',workloadType: 'app-container' as const,type: 'app-container',platformType: 'docker',@@ -249,6 +259,9 @@ describe('getDiscoveryResourceTypeForWorkload', () => {it('returns the canonical discovery resource type for pod workloads with agent ownership', () => {const guest = {+ instance: 'cluster-a',+ vmid: 0,+ node: 'cluster-a',workloadType: 'pod' as const,type: 'k8s',kubernetesAgentId: 'k8s-agent-1',@@ -265,6 +278,7 @@ describe('getDiscoveryResourceTypeForWorkload', () => {id: 'app-container:truenas-main:nextcloud',node: 'truenas-main',instance: 'truenas-main',+ vmid: 0,};expect(getDiscoveryResourceTypeForWorkload(guest)).toBeNull();});diff --git a/frontend-modern/src/utils/monitoredSystemPresentation.ts b/frontend-modern/src/utils/monitoredSystemPresentation.tsindex 7c5cf95d33..3c7e329b13 100644--- a/frontend-modern/src/utils/monitoredSystemPresentation.ts+++ b/frontend-modern/src/utils/monitoredSystemPresentation.ts@@ -304,7 +304,7 @@ export function buildMonitoredSystemAdmissionPreviewUnavailableState(input: {return {reason,title: getMonitoredSystemAdmissionPreviewUnavailableTitle(),- message: formatMonitoredSystemAdmissionPreviewUnavailableMessage(reason),+ message: formatMonitoredSystemAdmissionPreviewUnavailableMessage(reason ?? undefined),};}diff --git a/frontend-modern/src/utils/patrolFormat.ts b/frontend-modern/src/utils/patrolFormat.tsindex 21b69e4dd4..655981ce7f 100644--- a/frontend-modern/src/utils/patrolFormat.ts+++ b/frontend-modern/src/utils/patrolFormat.ts@@ -4,8 +4,8 @@ import { formatIdentifierLabel } from '@/utils/textPresentation';interface ModelInfo {id: string;name: string;- description: string;- notable: boolean;+ description?: string;+ notable?: boolean;}interface PartialRunRecord {diff --git a/frontend-modern/src/utils/recoveryLocationPresentation.ts b/frontend-modern/src/utils/recoveryLocationPresentation.tsindex 54b773bf11..43f3470276 100644--- a/frontend-modern/src/utils/recoveryLocationPresentation.ts+++ b/frontend-modern/src/utils/recoveryLocationPresentation.ts@@ -42,9 +42,10 @@ export function getRecoveryPointLocationEntries().trim();const namespace = String(point.display?.namespaceLabel || point.namespace || '').trim();- return [+ const entries: Array<{ key: RecoveryLocationFacetKind; label: string; value: string }> = [{ key: 'cluster', label: getRecoveryLocationFacetLabel('cluster'), value: cluster },{ key: 'node', label: getRecoveryLocationFacetLabel('node'), value: node },{ key: 'namespace', label: getRecoveryLocationFacetLabel('namespace'), value: namespace },- ].filter((entry) => entry.value !== '');+ ];+ return entries.filter((entry) => entry.value !== '');}diff --git a/frontend-modern/src/utils/recoveryPlatformModel.ts b/frontend-modern/src/utils/recoveryPlatformModel.tsindex 2bfec8b762..11f4a0d642 100644--- a/frontend-modern/src/utils/recoveryPlatformModel.ts+++ b/frontend-modern/src/utils/recoveryPlatformModel.ts@@ -81,12 +81,19 @@ export const getRecoveryRollupPlatforms = (return values.map((value) => toTrimmedString(value)).filter(Boolean);};-const normalizeRecoveryMeta = (meta: RecoveryResponseMeta | null | undefined): RecoveryResponseMeta => ({- page: Number.isFinite(meta?.page) ? meta.page : 1,- limit: Number.isFinite(meta?.limit) ? meta.limit : 0,- total: Number.isFinite(meta?.total) ? meta.total : 0,- totalPages: Number.isFinite(meta?.totalPages) ? meta.totalPages : 1,-});+const normalizeRecoveryMeta = (meta: RecoveryResponseMeta | null | undefined): RecoveryResponseMeta => {+ const page = typeof meta?.page === 'number' && Number.isFinite(meta.page) ? meta.page : 1;+ const limit = typeof meta?.limit === 'number' && Number.isFinite(meta.limit) ? meta.limit : 0;+ const total = typeof meta?.total === 'number' && Number.isFinite(meta.total) ? meta.total : 0;+ const totalPages =+ typeof meta?.totalPages === 'number' && Number.isFinite(meta.totalPages) ? meta.totalPages : 1;+ return {+ page,+ limit,+ total,+ totalPages,+ };+};export const normalizeRecoveryPoint = (point: RecoveryPointTransport | RecoveryPoint,diff --git a/frontend-modern/src/utils/recoveryRecordPresentation.ts b/frontend-modern/src/utils/recoveryRecordPresentation.tsindex 1c33a4c041..99cd425eee 100644--- a/frontend-modern/src/utils/recoveryRecordPresentation.ts+++ b/frontend-modern/src/utils/recoveryRecordPresentation.ts@@ -147,7 +147,7 @@ export function getRecoveryPointKindLabel(value: string | null | undefined): strcase 'other':return 'Other';default:- return titleCaseDelimitedLabel(value, {+ return titleCaseDelimitedLabel(value ?? undefined, {fallback: 'n/a',preserveShortAllCaps: true,});@@ -160,7 +160,7 @@ export function getRecoveryPointModeLabel(value: string | null | undefined): strreturn getRecoveryArtifactModePresentation(normalized).label;}- return titleCaseDelimitedLabel(value, {+ return titleCaseDelimitedLabel(value ?? undefined, {fallback: 'n/a',preserveShortAllCaps: true,});diff --git a/frontend-modern/src/utils/resourceTypeCompat.ts b/frontend-modern/src/utils/resourceTypeCompat.tsindex 351de1f965..bba08551b3 100644--- a/frontend-modern/src/utils/resourceTypeCompat.ts+++ b/frontend-modern/src/utils/resourceTypeCompat.ts@@ -1,5 +1,6 @@export type CanonicalFrontendResourceType =| 'agent'+ | 'ceph'| 'vm'| 'system-container'| 'app-container'@@ -48,6 +49,7 @@ export const canonicalizeFrontendResourceType = (case 'kubernetes_node':return 'k8s-node';case 'agent':+ case 'ceph':case 'vm':case 'system-container':case 'app-container':