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
Extract dashboard workload derived state owner
rcourtman5a704dbdafaf
diff --git a/docs/release-control/v6/internal/subsystems/performance-and-scalability.md b/docs/release-control/v6/internal/subsystems/performance-and-scalability.mdindex 20c46100d0..c0ab86b049 100644--- a/docs/release-control/v6/internal/subsystems/performance-and-scalability.md+++ b/docs/release-control/v6/internal/subsystems/performance-and-scalability.md@@ -32,64 +32,65 @@ regression protection.10. `frontend-modern/src/components/Dashboard/WorkloadPanel.tsx`11. `frontend-modern/src/components/Dashboard/WorkloadTableHeader.tsx`12. `frontend-modern/src/components/Dashboard/useDashboardState.ts`-13. `frontend-modern/src/components/Dashboard/useDashboardGuestMetadataState.ts`-14. `frontend-modern/src/components/Dashboard/useDashboardSelectionState.ts`-15. `frontend-modern/src/components/Dashboard/useDashboardWorkloadRouteState.ts`-16. `frontend-modern/src/components/Dashboard/useDashboardWorkloadUrlSync.ts`-17. `frontend-modern/src/components/Dashboard/DashboardFilter.tsx`-18. `frontend-modern/src/components/Dashboard/dashboardFilterModel.ts`-19. `frontend-modern/src/components/Dashboard/useDashboardFilterState.ts`-20. `frontend-modern/src/components/Dashboard/ThresholdSlider.tsx`-21. `frontend-modern/src/components/Dashboard/thresholdSliderModel.ts`-22. `frontend-modern/src/components/Dashboard/useThresholdSliderState.ts`-23. `frontend-modern/src/components/Dashboard/StackedDiskBar.tsx`-24. `frontend-modern/src/components/Dashboard/stackedDiskBarModel.ts`-25. `frontend-modern/src/components/Dashboard/useStackedDiskBarState.ts`-26. `frontend-modern/src/components/Dashboard/StackedMemoryBar.tsx`-27. `frontend-modern/src/components/Dashboard/stackedMemoryBarModel.ts`-28. `frontend-modern/src/components/Dashboard/useStackedMemoryBarState.ts`-29. `frontend-modern/src/components/Dashboard/MetricBar.tsx`-30. `frontend-modern/src/components/Dashboard/metricBarModel.ts`-31. `frontend-modern/src/components/Dashboard/useMetricBarState.ts`-32. `frontend-modern/src/components/Dashboard/EnhancedCPUBar.tsx`-33. `frontend-modern/src/components/Dashboard/enhancedCpuBarModel.ts`-34. `frontend-modern/src/components/Dashboard/useEnhancedCPUBarState.ts`-35. `frontend-modern/src/components/Dashboard/DiskList.tsx`-36. `frontend-modern/src/components/Dashboard/diskListModel.ts`-37. `frontend-modern/src/components/Dashboard/useDiskListState.ts`-38. `frontend-modern/src/components/Dashboard/GuestRow.tsx`-39. `frontend-modern/src/components/Dashboard/GuestRowCells.tsx`-40. `frontend-modern/src/components/Dashboard/guestRowModel.tsx`-41. `frontend-modern/src/components/Dashboard/useGuestRowState.ts`-42. `frontend-modern/src/components/Dashboard/GuestDrawer.tsx`-43. `frontend-modern/src/components/Dashboard/GuestDrawerOverview.tsx`-44. `frontend-modern/src/components/Dashboard/guestDrawerModel.ts`-45. `frontend-modern/src/components/Dashboard/useGuestDrawerState.ts`-46. `frontend-modern/src/components/Dashboard/useGroupedTableWindowing.ts`-47. `frontend-modern/src/components/Dashboard/workloadSelectors.ts`-48. `frontend-modern/src/components/Infrastructure/UnifiedResourceTable.tsx`-49. `frontend-modern/src/components/Infrastructure/useUnifiedResourceTableState.ts`-50. `frontend-modern/src/components/Infrastructure/infrastructureSelectors.ts`-51. `frontend-modern/src/components/Infrastructure/resourceDetailMappers.ts`-52. `frontend-modern/src/components/Dashboard/__tests__/Dashboard.performance.contract.test.tsx`-53. `frontend-modern/src/components/Dashboard/__tests__/DashboardFilter.test.tsx`-54. `frontend-modern/src/components/Dashboard/__tests__/useDashboardFilterState.test.ts`-55. `frontend-modern/src/components/Dashboard/__tests__/useDashboardSelectionState.test.ts`-56. `frontend-modern/src/components/Dashboard/MetricBar.test.tsx`-57. `frontend-modern/src/components/Dashboard/__tests__/useMetricBarState.test.tsx`-58. `frontend-modern/src/components/Dashboard/__tests__/EnhancedCPUBar.test.tsx`-59. `frontend-modern/src/components/Dashboard/__tests__/useEnhancedCPUBarState.test.tsx`-60. `frontend-modern/src/components/Dashboard/ThresholdSlider.test.tsx`-61. `frontend-modern/src/components/Dashboard/__tests__/useThresholdSliderState.test.ts`-62. `frontend-modern/src/components/Dashboard/__tests__/StackedDiskBar.test.tsx`-63. `frontend-modern/src/components/Dashboard/__tests__/useStackedDiskBarState.test.tsx`-64. `frontend-modern/src/components/Dashboard/StackedMemoryBar.test.tsx`-65. `frontend-modern/src/components/Dashboard/__tests__/useStackedMemoryBarState.test.tsx`-66. `frontend-modern/src/components/Dashboard/__tests__/DiskList.test.tsx`-67. `frontend-modern/src/components/Dashboard/__tests__/GuestRow.test.tsx`-68. `frontend-modern/src/components/Dashboard/GuestDrawer.test.tsx`-69. `frontend-modern/src/components/Dashboard/__tests__/useGroupedTableWindowing.test.ts`-70. `frontend-modern/src/components/Infrastructure/__tests__/UnifiedResourceTable.performance.contract.test.tsx`+13. `frontend-modern/src/components/Dashboard/useDashboardWorkloadDerivedState.ts`+14. `frontend-modern/src/components/Dashboard/useDashboardGuestMetadataState.ts`+15. `frontend-modern/src/components/Dashboard/useDashboardSelectionState.ts`+16. `frontend-modern/src/components/Dashboard/useDashboardWorkloadRouteState.ts`+17. `frontend-modern/src/components/Dashboard/useDashboardWorkloadUrlSync.ts`+18. `frontend-modern/src/components/Dashboard/DashboardFilter.tsx`+19. `frontend-modern/src/components/Dashboard/dashboardFilterModel.ts`+20. `frontend-modern/src/components/Dashboard/useDashboardFilterState.ts`+21. `frontend-modern/src/components/Dashboard/ThresholdSlider.tsx`+22. `frontend-modern/src/components/Dashboard/thresholdSliderModel.ts`+23. `frontend-modern/src/components/Dashboard/useThresholdSliderState.ts`+24. `frontend-modern/src/components/Dashboard/StackedDiskBar.tsx`+25. `frontend-modern/src/components/Dashboard/stackedDiskBarModel.ts`+26. `frontend-modern/src/components/Dashboard/useStackedDiskBarState.ts`+27. `frontend-modern/src/components/Dashboard/StackedMemoryBar.tsx`+28. `frontend-modern/src/components/Dashboard/stackedMemoryBarModel.ts`+29. `frontend-modern/src/components/Dashboard/useStackedMemoryBarState.ts`+30. `frontend-modern/src/components/Dashboard/MetricBar.tsx`+31. `frontend-modern/src/components/Dashboard/metricBarModel.ts`+32. `frontend-modern/src/components/Dashboard/useMetricBarState.ts`+33. `frontend-modern/src/components/Dashboard/EnhancedCPUBar.tsx`+34. `frontend-modern/src/components/Dashboard/enhancedCpuBarModel.ts`+35. `frontend-modern/src/components/Dashboard/useEnhancedCPUBarState.ts`+36. `frontend-modern/src/components/Dashboard/DiskList.tsx`+37. `frontend-modern/src/components/Dashboard/diskListModel.ts`+38. `frontend-modern/src/components/Dashboard/useDiskListState.ts`+39. `frontend-modern/src/components/Dashboard/GuestRow.tsx`+40. `frontend-modern/src/components/Dashboard/GuestRowCells.tsx`+41. `frontend-modern/src/components/Dashboard/guestRowModel.tsx`+42. `frontend-modern/src/components/Dashboard/useGuestRowState.ts`+43. `frontend-modern/src/components/Dashboard/GuestDrawer.tsx`+44. `frontend-modern/src/components/Dashboard/GuestDrawerOverview.tsx`+45. `frontend-modern/src/components/Dashboard/guestDrawerModel.ts`+46. `frontend-modern/src/components/Dashboard/useGuestDrawerState.ts`+47. `frontend-modern/src/components/Dashboard/useGroupedTableWindowing.ts`+48. `frontend-modern/src/components/Dashboard/workloadSelectors.ts`+49. `frontend-modern/src/components/Infrastructure/UnifiedResourceTable.tsx`+50. `frontend-modern/src/components/Infrastructure/useUnifiedResourceTableState.ts`+51. `frontend-modern/src/components/Infrastructure/infrastructureSelectors.ts`+52. `frontend-modern/src/components/Infrastructure/resourceDetailMappers.ts`+53. `frontend-modern/src/components/Dashboard/__tests__/Dashboard.performance.contract.test.tsx`+54. `frontend-modern/src/components/Dashboard/__tests__/DashboardFilter.test.tsx`+55. `frontend-modern/src/components/Dashboard/__tests__/useDashboardFilterState.test.ts`+56. `frontend-modern/src/components/Dashboard/__tests__/useDashboardSelectionState.test.ts`+57. `frontend-modern/src/components/Dashboard/MetricBar.test.tsx`+58. `frontend-modern/src/components/Dashboard/__tests__/useMetricBarState.test.tsx`+59. `frontend-modern/src/components/Dashboard/__tests__/EnhancedCPUBar.test.tsx`+60. `frontend-modern/src/components/Dashboard/__tests__/useEnhancedCPUBarState.test.tsx`+61. `frontend-modern/src/components/Dashboard/ThresholdSlider.test.tsx`+62. `frontend-modern/src/components/Dashboard/__tests__/useThresholdSliderState.test.ts`+63. `frontend-modern/src/components/Dashboard/__tests__/StackedDiskBar.test.tsx`+64. `frontend-modern/src/components/Dashboard/__tests__/useStackedDiskBarState.test.tsx`+65. `frontend-modern/src/components/Dashboard/StackedMemoryBar.test.tsx`+66. `frontend-modern/src/components/Dashboard/__tests__/useStackedMemoryBarState.test.tsx`+67. `frontend-modern/src/components/Dashboard/__tests__/DiskList.test.tsx`+68. `frontend-modern/src/components/Dashboard/__tests__/GuestRow.test.tsx`+69. `frontend-modern/src/components/Dashboard/GuestDrawer.test.tsx`+70. `frontend-modern/src/components/Dashboard/__tests__/useGroupedTableWindowing.test.ts`+71. `frontend-modern/src/components/Infrastructure/__tests__/UnifiedResourceTable.performance.contract.test.tsx`## Shared Boundaries@@ -115,15 +116,16 @@ regression protection.12. Extend dashboard guest metadata cache persistence, metadata refresh, org-scope switching, and optimistic custom-URL updates through `frontend-modern/src/components/Dashboard/useDashboardGuestMetadataState.ts` rather than rebuilding dashboard-local storage caches, event listeners, or guest metadata API wiring inside `frontend-modern/src/components/Dashboard/useDashboardState.ts`13. Extend dashboard deep-link selection, hovered-row continuity, and table scroll preservation through `frontend-modern/src/components/Dashboard/useDashboardSelectionState.ts` rather than rebuilding resource-query parsing, selected-row scroll pinning, or hovered-row invalidation inside `frontend-modern/src/components/Dashboard/useDashboardState.ts`14. Extend dashboard workload route ownership, deep-link normalization, query-param synchronization, and route-driven filter state through `frontend-modern/src/components/Dashboard/useDashboardWorkloadRouteState.ts` and `frontend-modern/src/components/Dashboard/useDashboardWorkloadUrlSync.ts` rather than rebuilding route sync, param handling, or managed workload URLs inside `frontend-modern/src/components/Dashboard/useDashboardState.ts`-15. Extend dashboard filter defaults, active-filter counting, reset semantics, and mobile toolbar state through `frontend-modern/src/components/Dashboard/dashboardFilterModel.ts` and `frontend-modern/src/components/Dashboard/useDashboardFilterState.ts`, rather than rebuilding filter-local state inside `frontend-modern/src/components/Dashboard/DashboardFilter.tsx`-16. Extend threshold-slider value-position math, title/label derivation, and drag scroll-lock runtime through `frontend-modern/src/components/Dashboard/thresholdSliderModel.ts` and `frontend-modern/src/components/Dashboard/useThresholdSliderState.ts` rather than rebuilding slider-local state and pointer lifecycle inside `frontend-modern/src/components/Dashboard/ThresholdSlider.tsx`-17. Extend stacked disk-bar capacity math, segment/tooltip derivation, and resize-observer runtime through `frontend-modern/src/components/Dashboard/stackedDiskBarModel.ts` and `frontend-modern/src/components/Dashboard/useStackedDiskBarState.ts` rather than rebuilding disk-bar-local state, mode branching, and tooltip shaping inside `frontend-modern/src/components/Dashboard/StackedDiskBar.tsx`-18. Extend stacked memory-bar capacity math, balloon/swap derivation, and resize-observer runtime through `frontend-modern/src/components/Dashboard/stackedMemoryBarModel.ts` and `frontend-modern/src/components/Dashboard/useStackedMemoryBarState.ts` rather than rebuilding memory-bar-local state, tooltip shaping, and label-fit logic inside `frontend-modern/src/components/Dashboard/StackedMemoryBar.tsx`-19. Extend metric-bar width, label-fit logic, and resize-observer runtime through `frontend-modern/src/components/Dashboard/metricBarModel.ts` and `frontend-modern/src/components/Dashboard/useMetricBarState.ts` rather than rebuilding metric-local state and threshold mapping inside `frontend-modern/src/components/Dashboard/MetricBar.tsx`-20. Extend enhanced CPU bar usage/anomaly presentation and tooltip runtime through `frontend-modern/src/components/Dashboard/enhancedCpuBarModel.ts` and `frontend-modern/src/components/Dashboard/useEnhancedCPUBarState.ts` rather than rebuilding tooltip-local state and CPU-threshold formatting inside `frontend-modern/src/components/Dashboard/EnhancedCPUBar.tsx`-21. Extend grouped dashboard row windowing, reveal-index clamping, overscan math, and per-group visible-slice derivation through `frontend-modern/src/components/Dashboard/useGroupedTableWindowing.ts` rather than rebuilding scroll handlers, mounted-row budgets, or group-slice math inside `frontend-modern/src/components/Dashboard/useDashboardState.ts`-22. Extend dashboard shell rendering through `frontend-modern/src/components/Dashboard/DashboardStateCards.tsx`, `frontend-modern/src/components/Dashboard/DashboardWorkloadTable.tsx`, and `frontend-modern/src/components/Dashboard/DashboardStatsStrip.tsx` rather than accreting loading cards, workload table markup, or stats-strip presentation back into `frontend-modern/src/components/Dashboard/Dashboard.tsx`-23. Extend dashboard workload table shell ownership through `frontend-modern/src/components/Dashboard/WorkloadTableHeader.tsx` and `frontend-modern/src/components/Dashboard/WorkloadPanel.tsx` rather than rebuilding sortable header markup, grouped node rows, row expansion, or guest-drawer rendering inside `frontend-modern/src/components/Dashboard/DashboardWorkloadTable.tsx`+15. Extend grouped dashboard workload derivation, summary fallbacks, node parent mapping, and grouped/windowed table presentation through `frontend-modern/src/components/Dashboard/useDashboardWorkloadDerivedState.ts` rather than rebuilding grouped selectors, summary snapshot math, or row-window reveal logic inside `frontend-modern/src/components/Dashboard/useDashboardState.ts`+16. Extend dashboard filter defaults, active-filter counting, reset semantics, and mobile toolbar state through `frontend-modern/src/components/Dashboard/dashboardFilterModel.ts` and `frontend-modern/src/components/Dashboard/useDashboardFilterState.ts`, rather than rebuilding filter-local state inside `frontend-modern/src/components/Dashboard/DashboardFilter.tsx`+17. Extend threshold-slider value-position math, title/label derivation, and drag scroll-lock runtime through `frontend-modern/src/components/Dashboard/thresholdSliderModel.ts` and `frontend-modern/src/components/Dashboard/useThresholdSliderState.ts` rather than rebuilding slider-local state and pointer lifecycle inside `frontend-modern/src/components/Dashboard/ThresholdSlider.tsx`+18. Extend stacked disk-bar capacity math, segment/tooltip derivation, and resize-observer runtime through `frontend-modern/src/components/Dashboard/stackedDiskBarModel.ts` and `frontend-modern/src/components/Dashboard/useStackedDiskBarState.ts` rather than rebuilding disk-bar-local state, mode branching, and tooltip shaping inside `frontend-modern/src/components/Dashboard/StackedDiskBar.tsx`+19. Extend stacked memory-bar capacity math, balloon/swap derivation, and resize-observer runtime through `frontend-modern/src/components/Dashboard/stackedMemoryBarModel.ts` and `frontend-modern/src/components/Dashboard/useStackedMemoryBarState.ts` rather than rebuilding memory-bar-local state, tooltip shaping, and label-fit logic inside `frontend-modern/src/components/Dashboard/StackedMemoryBar.tsx`+20. Extend metric-bar width, label-fit logic, and resize-observer runtime through `frontend-modern/src/components/Dashboard/metricBarModel.ts` and `frontend-modern/src/components/Dashboard/useMetricBarState.ts` rather than rebuilding metric-local state and threshold mapping inside `frontend-modern/src/components/Dashboard/MetricBar.tsx`+21. Extend enhanced CPU bar usage/anomaly presentation and tooltip runtime through `frontend-modern/src/components/Dashboard/enhancedCpuBarModel.ts` and `frontend-modern/src/components/Dashboard/useEnhancedCPUBarState.ts` rather than rebuilding tooltip-local state and CPU-threshold formatting inside `frontend-modern/src/components/Dashboard/EnhancedCPUBar.tsx`+22. Extend grouped dashboard row windowing, reveal-index clamping, overscan math, and per-group visible-slice derivation through `frontend-modern/src/components/Dashboard/useGroupedTableWindowing.ts` rather than rebuilding scroll handlers, mounted-row budgets, or group-slice math inside `frontend-modern/src/components/Dashboard/useDashboardWorkloadDerivedState.ts`+23. Extend dashboard shell rendering through `frontend-modern/src/components/Dashboard/DashboardStateCards.tsx`, `frontend-modern/src/components/Dashboard/DashboardWorkloadTable.tsx`, and `frontend-modern/src/components/Dashboard/DashboardStatsStrip.tsx` rather than accreting loading cards, workload table markup, or stats-strip presentation back into `frontend-modern/src/components/Dashboard/Dashboard.tsx`+24. Extend dashboard workload table shell ownership through `frontend-modern/src/components/Dashboard/WorkloadTableHeader.tsx` and `frontend-modern/src/components/Dashboard/WorkloadPanel.tsx` rather than rebuilding sortable header markup, grouped node rows, row expansion, or guest-drawer rendering inside `frontend-modern/src/components/Dashboard/DashboardWorkloadTable.tsx`## Forbidden Paths@@ -152,8 +154,12 @@ are now part of the protected performance surface rather than proof-onlycontext. Future hot-path filter/group/sort/windowing changes must route throughthe explicit dashboard performance proof policy in the subsystem registry.That runtime is now intentionally split by concern:-`frontend-modern/src/components/Dashboard/useDashboardState.ts` owns grouped-workload derivation, summary fallbacks, sorting, and windowing, while+`frontend-modern/src/components/Dashboard/useDashboardState.ts` owns+top-level dashboard orchestration, persistent filter state, and shell-level+sorting/filter controls, while+`frontend-modern/src/components/Dashboard/useDashboardWorkloadDerivedState.ts`+owns grouped workload derivation, summary fallbacks, parent-node mapping,+and grouped/windowed table math, while`frontend-modern/src/components/Dashboard/useDashboardGuestMetadataState.ts`owns guest metadata cache persistence, optimistic custom-URL updates,org-scope switching, and metadata refresh, and@@ -161,12 +167,12 @@ org-scope switching, and metadata refresh, andowns workload-route synchronization, deep-link normalization, and route-scopedfilter contracts. Future dashboard hot-path changes must extend through thoseowners instead of accreting back into `frontend-modern/src/components/Dashboard/Dashboard.tsx`.-That workload-state owner now also routes grouped row windowing through+That derived workload owner now also routes grouped row windowing through`frontend-modern/src/components/Dashboard/useGroupedTableWindowing.ts`, whichowns row-window thresholds, overscan behavior, reveal-index clamping, andper-group visible-slice derivation. Future dashboard table windowing changesmust extend through that hook instead of rebuilding scroll math or mounted-row-budgets inline inside `frontend-modern/src/components/Dashboard/useDashboardState.ts`.+budgets inline inside `frontend-modern/src/components/Dashboard/useDashboardWorkloadDerivedState.ts`.The dashboard guest-row path now follows the same pattern: the render shellstays in `frontend-modern/src/components/Dashboard/GuestRow.tsx`, tooltip-backedcell presentation lives in `frontend-modern/src/components/Dashboard/GuestRowCells.tsx`,diff --git a/docs/release-control/v6/internal/subsystems/registry.json b/docs/release-control/v6/internal/subsystems/registry.jsonindex b569ad76e4..ac5b1ebf41 100644--- a/docs/release-control/v6/internal/subsystems/registry.json+++ b/docs/release-control/v6/internal/subsystems/registry.json@@ -2581,6 +2581,7 @@"frontend-modern/src/components/Dashboard/useDashboardGuestMetadataState.ts","frontend-modern/src/components/Dashboard/useDashboardSelectionState.ts","frontend-modern/src/components/Dashboard/useDashboardState.ts",+ "frontend-modern/src/components/Dashboard/useDashboardWorkloadDerivedState.ts","frontend-modern/src/components/Dashboard/useDashboardWorkloadRouteState.ts","frontend-modern/src/components/Dashboard/useDashboardWorkloadUrlSync.ts","frontend-modern/src/components/Dashboard/useDiskListState.ts",@@ -2680,6 +2681,7 @@"frontend-modern/src/components/Dashboard/useDashboardGuestMetadataState.ts","frontend-modern/src/components/Dashboard/useDashboardSelectionState.ts","frontend-modern/src/components/Dashboard/useDashboardState.ts",+ "frontend-modern/src/components/Dashboard/useDashboardWorkloadDerivedState.ts","frontend-modern/src/components/Dashboard/useDashboardWorkloadRouteState.ts","frontend-modern/src/components/Dashboard/useDashboardWorkloadUrlSync.ts","frontend-modern/src/components/Dashboard/useDiskListState.ts",diff --git a/frontend-modern/src/components/Dashboard/__tests__/Dashboard.performance.contract.test.tsx b/frontend-modern/src/components/Dashboard/__tests__/Dashboard.performance.contract.test.tsxindex 9be363d3c3..2e0e412f9f 100644--- a/frontend-modern/src/components/Dashboard/__tests__/Dashboard.performance.contract.test.tsx+++ b/frontend-modern/src/components/Dashboard/__tests__/Dashboard.performance.contract.test.tsx@@ -13,6 +13,7 @@ import workloadTableHeaderSource from '../WorkloadTableHeader.tsx?raw';import dashboardFilterModelSource from '../dashboardFilterModel.ts?raw';import dashboardGuestMetadataStateSource from '../useDashboardGuestMetadataState.ts?raw';import dashboardSelectionStateSource from '../useDashboardSelectionState.ts?raw';+import dashboardWorkloadDerivedStateSource from '../useDashboardWorkloadDerivedState.ts?raw';import dashboardWorkloadRouteStateSource from '../useDashboardWorkloadRouteState.ts?raw';import dashboardWorkloadUrlSyncSource from '../useDashboardWorkloadUrlSync.ts?raw';import dashboardStateSource from '../useDashboardState.ts?raw';@@ -504,9 +505,10 @@ describe('Dashboard performance contract', () => {expect(dashboardSource).not.toContain('const [search, setSearch] = createSignal(');expect(dashboardStateSource).toContain('useDashboardGuestMetadataState');expect(dashboardStateSource).toContain('useDashboardSelectionState');+ expect(dashboardStateSource).toContain('useDashboardWorkloadDerivedState');expect(dashboardStateSource).toContain('useDashboardWorkloadRouteState');- expect(dashboardStateSource).toContain('useGroupedTableWindowing');expect(dashboardStateSource).toContain('createWorkloadSortComparator');+ expect(dashboardStateSource).toContain('filterWorkloads(params)');expect(dashboardStateSource).toContain("from './guestRowModel'");expect(dashboardStateSource).not.toContain("from './GuestRow'");expect(dashboardStateSource).not.toContain('GuestMetadataAPI.getAllMetadata()');@@ -514,6 +516,12 @@ describe('Dashboard performance contract', () => {expect(dashboardStateSource).not.toContain('parseWorkloadsLinkSearch');expect(dashboardStateSource).not.toContain('const [selectedGuestId, setSelectedGuestIdRaw]');expect(dashboardStateSource).not.toContain('const [hoveredWorkloadId, setHoveredWorkloadId]');+ expect(dashboardStateSource).not.toContain('groupWorkloads(');+ expect(dashboardStateSource).not.toContain('computeWorkloadStats(');+ expect(dashboardStateSource).not.toContain('computeWorkloadIOEmphasis(');+ expect(dashboardStateSource).not.toContain('buildNodeByInstance(');+ expect(dashboardStateSource).not.toContain('buildGuestParentNodeMap(');+ expect(dashboardStateSource).not.toContain('useGroupedTableWindowing');expect(dashboardGuestMetadataStateSource).toContain('GuestMetadataAPI.getAllMetadata()');expect(dashboardGuestMetadataStateSource).toContain("eventBus.on('org_switched'");expect(dashboardGuestMetadataStateSource).toContain("window.addEventListener('pulse:metadata-changed'");@@ -528,6 +536,12 @@ describe('Dashboard performance contract', () => {'const [handledTypeParam, setHandledTypeParam]',);expect(dashboardWorkloadUrlSyncSource).toContain('parseWorkloadsLinkSearch');+ expect(dashboardWorkloadDerivedStateSource).toContain('groupWorkloads(');+ expect(dashboardWorkloadDerivedStateSource).toContain('computeWorkloadStats(');+ expect(dashboardWorkloadDerivedStateSource).toContain('computeWorkloadIOEmphasis(');+ expect(dashboardWorkloadDerivedStateSource).toContain('buildNodeByInstance(');+ expect(dashboardWorkloadDerivedStateSource).toContain('buildGuestParentNodeMap(');+ expect(dashboardWorkloadDerivedStateSource).toContain('useGroupedTableWindowing');expect(dashboardSelectionStateSource).toContain('parseWorkloadsLinkSearch');expect(dashboardSelectionStateSource).toContain('const [selectedGuestId, setSelectedGuestIdRaw]');expect(dashboardSelectionStateSource).toContain('const [hoveredWorkloadId, setHoveredWorkloadId]');@@ -562,11 +576,14 @@ describe('Dashboard performance contract', () => {expect(dashboardFilterModelSource).toContain('export const countActiveDashboardFilters');expect(dashboardFilterModelSource).toContain('export const hasActiveDashboardFilters');expect(dashboardStateSource).toContain('useDashboardWorkloadRouteState');+ expect(dashboardStateSource).toContain('filterWorkloads(params)');expect(dashboardStateSource).not.toContain('const containerRuntimeFilterConfig = createMemo');+ expect(dashboardStateSource).not.toContain('useGroupedTableWindowing');expect(dashboardWorkloadRouteStateSource).toContain('useDashboardWorkloadUrlSync');expect(dashboardWorkloadRouteStateSource).toContain('containerRuntimeFilterConfig');expect(dashboardWorkloadRouteStateSource).toContain('hostFilterConfig');expect(dashboardWorkloadRouteStateSource).toContain('namespaceFilterConfig');+ expect(dashboardWorkloadDerivedStateSource).toContain('useGroupedTableWindowing');});it('keeps threshold slider runtime and derivations in canonical slider owners', () => {diff --git a/frontend-modern/src/components/Dashboard/useDashboardState.ts b/frontend-modern/src/components/Dashboard/useDashboardState.tsindex 381158be27..048d353c6a 100644--- a/frontend-modern/src/components/Dashboard/useDashboardState.ts+++ b/frontend-modern/src/components/Dashboard/useDashboardState.ts@@ -1,11 +1,10 @@-import { createEffect, createMemo, createSignal, onCleanup } from 'solid-js';+import { createEffect, createMemo, createSignal } from 'solid-js';import { useNavigate } from '@solidjs/router';import type { VM, Container, Node } from '@/types/api';import type { WorkloadGuest } from '@/types/workloads';import { GUEST_COLUMNS, VIEW_MODE_COLUMNS } from './guestRowModel';import { useWebSocket } from '@/App';import { useAlertsActivation } from '@/stores/alertsActivation';-import { getNodeDisplayName } from '@/utils/nodes';import { usePersistentSignal } from '@/hooks/usePersistentSignal';import { useColumnVisibility } from '@/hooks/useColumnVisibility';import { useBreakpoint } from '@/hooks/useBreakpoint';@@ -20,28 +19,17 @@ import {getDashboardInfrastructureEmptyState,getDashboardLoadingState,} from '@/utils/dashboardEmptyStatePresentation';-import {- getCanonicalWorkloadId,-} from '@/utils/workloads';import { isSummaryTimeRange } from '@/components/shared/summaryTimeRange';+import { getCanonicalWorkloadId } from '@/utils/workloads';import {- filterWorkloads,- getDiskUsagePercent,createWorkloadSortComparator,- getWorkloadGroupKey,- groupWorkloads,- computeWorkloadStats,- computeWorkloadIOEmphasis,- buildNodeByInstance,- buildGuestParentNodeMap,+ filterWorkloads,type FilterWorkloadsParams,- type WorkloadStats,} from './workloadSelectors';-import { useGroupedTableWindowing } from './useGroupedTableWindowing';import { useDashboardGuestMetadataState } from './useDashboardGuestMetadataState';import { useDashboardSelectionState } from './useDashboardSelectionState';+import { useDashboardWorkloadDerivedState } from './useDashboardWorkloadDerivedState';import { useDashboardWorkloadRouteState } from './useDashboardWorkloadRouteState';-import type { WorkloadSummarySnapshot } from '@/components/Workloads/WorkloadsSummary';export interface DashboardProps {vms: VM[];@@ -54,14 +42,6 @@ type StatusMode = 'all' | 'running' | 'degraded' | 'stopped';type GroupingMode = 'grouped' | 'flat';export type WorkloadSortKey = keyof WorkloadGuest | 'diskIo' | 'netIo';-const DASHBOARD_TABLE_ESTIMATED_ROW_HEIGHT = 32;--const workloadMetricPercent = (value: number | null | undefined): number => {- if (typeof value !== 'number' || !Number.isFinite(value)) return 0;- if (value <= 1) return Math.max(0, value * 100);- return Math.max(0, value);-};-export function useDashboardState(props: DashboardProps) {const navigate = useNavigate();const ws = useWebSocket();@@ -207,11 +187,6 @@ export function useDashboardState(props: DashboardProps) {lastConnected = isConnected;});- const nodeByInstance = createMemo(() => buildNodeByInstance(props.nodes));- const guestParentNodeMap = createMemo(() =>- buildGuestParentNodeMap(allGuests(), nodeByInstance()),- );-const handleSort = (key: WorkloadSortKey) => {if (sortKey() === key) {setSortDirection(sortDirection() === 'asc' ? 'desc' : 'asc');@@ -298,204 +273,31 @@ export function useDashboardState(props: DashboardProps) {setSelectedNode,});- const workloadsSummaryVisibleIds = createMemo<string[]>(() =>- filteredGuests().map((guest) => getCanonicalWorkloadId(guest)),- );-- const workloadsSummaryFallbackCounts = createMemo(() => {- const guests = filteredGuests();- const running = guests.filter(- (guest) => guest.status === 'running' || guest.status === 'online',- ).length;- return {- total: guests.length,- running,- stopped: Math.max(0, guests.length - running),- };- });-- const workloadsSummaryFallbackSnapshots = createMemo<WorkloadSummarySnapshot[]>(() =>- filteredGuests().map((guest) => {- const guestId = getCanonicalWorkloadId(guest);- const memoryUsage = workloadMetricPercent(guest.memory?.usage);- let diskUsage = workloadMetricPercent(guest.disk?.usage);- if (- (!diskUsage || diskUsage <= 0) &&- typeof guest.disk?.used === 'number' &&- typeof guest.disk?.total === 'number' &&- Number.isFinite(guest.disk.used) &&- Number.isFinite(guest.disk.total) &&- guest.disk.total > 0- ) {- const selectorDiskUsage = getDiskUsagePercent(guest);- const rawDiskUsage = (guest.disk.used / guest.disk.total) * 100;- diskUsage = rawDiskUsage > 100 ? rawDiskUsage : (selectorDiskUsage ?? rawDiskUsage);- }-- return {- id: guestId,- name: guest.name || guestId,- cpu: workloadMetricPercent(guest.cpu),- memory: memoryUsage,- disk: Math.max(0, diskUsage),- network: Math.max(0, guest.networkIn || 0) + Math.max(0, guest.networkOut || 0),- };- }),- );-- const getGroupLabel = (- groupKey: string,- guests: WorkloadGuest[],- ): { type: string; name: string } => {- const node = nodeByInstance()[groupKey];- if (node) return { type: '', name: getNodeDisplayName(node) };- const normalizedGroupKey = guests.length > 0 ? getWorkloadGroupKey(guests[0]) : groupKey;- const [prefix, ...rest] = normalizedGroupKey.split(':');- const context = rest.length > 0 ? rest.join(':') : normalizedGroupKey;- if (prefix === 'app-container') return { type: 'App Containers', name: context };- if (prefix === 'pod') return { type: 'Pods', name: context };- if (prefix === 'vm') return { type: 'VM', name: context };- if (prefix === 'system-container') return { type: 'Container', name: context };- const first = guests[0];- if (first) {- const cluster = (first.clusterName || '').trim();- const nodeName = (first.node || '').trim();- if (nodeName && cluster) return { type: cluster, name: nodeName };- if (nodeName) return { type: '', name: nodeName };- }- return { type: '', name: context };- };-- const groupedGuests = createMemo(() =>- groupWorkloads(filteredGuests(), groupingMode(), guestSortComparator()),- );-- const sortedGroupKeys = createMemo(() => {- const groups = groupedGuests();- const nodes = nodeByInstance();- return Object.keys(groups).sort((a, b) => {- const nodeA = nodes[a];- const nodeB = nodes[b];- const labelA = nodeA ? getNodeDisplayName(nodeA) : getGroupLabel(a, groups[a]).name;- const labelB = nodeB ? getNodeDisplayName(nodeB) : getGroupLabel(b, groups[b]).name;- return labelA.localeCompare(labelB) || a.localeCompare(b);- });- });-- const guestGlobalIndexById = createMemo(() => {- const indexById = new Map<string, number>();- const groups = groupedGuests();- let globalIndex = 0;-- for (const groupKey of sortedGroupKeys()) {- const guests = groups[groupKey] || [];- for (const guest of guests) {- indexById.set(getCanonicalWorkloadId(guest), globalIndex);- globalIndex += 1;- }- }-- return indexById;- });-- const revealGuestIndex = createMemo<number | null>(() => {- const selectedId = selectedGuestId();- if (!selectedId) return null;- return guestGlobalIndexById().get(selectedId) ?? null;- });-- const groupedWindowing = useGroupedTableWindowing({- totalRowCount: () => filteredGuests().length,- revealIndex: revealGuestIndex,- });-- const groupStartIndexByKey = createMemo(() => {- const starts = new Map<string, number>();- const groups = groupedGuests();- let globalIndex = 0;-- for (const groupKey of sortedGroupKeys()) {- starts.set(groupKey, globalIndex);- globalIndex += (groups[groupKey] || []).length;- }-- return starts;- });-- const windowedGroupedGuests = createMemo<Record<string, WorkloadGuest[]>>(() => {- const groups = groupedGuests();- if (!groupedWindowing.isWindowed()) {- return groups;- }-- const starts = groupStartIndexByKey();- const result: Record<string, WorkloadGuest[]> = {};- for (const groupKey of sortedGroupKeys()) {- const guests = groups[groupKey] || [];- const groupStart = starts.get(groupKey) ?? 0;- const visible = groupedWindowing.getVisibleSlice(groupKey, guests, groupStart);- if (visible.length > 0) {- result[groupKey] = visible;- }- }-- return result;- });-- const visibleGroupKeys = createMemo(() => {- const keys = sortedGroupKeys();- if (!groupedWindowing.isWindowed()) return keys;- const groups = windowedGroupedGuests();- return keys.filter((groupKey) => (groups[groupKey] || []).length > 0);- });-- const topSpacerHeight = createMemo(() =>- groupedWindowing.isWindowed()- ? groupedWindowing.startIndex() * DASHBOARD_TABLE_ESTIMATED_ROW_HEIGHT- : 0,- );-- const bottomSpacerHeight = createMemo(() =>- groupedWindowing.isWindowed()- ? Math.max(- 0,- (filteredGuests().length - groupedWindowing.endIndex()) *- DASHBOARD_TABLE_ESTIMATED_ROW_HEIGHT,- )- : 0,- );-- const syncGuestWindowToViewport = () => {- if (!groupedWindowing.isWindowed() || typeof window === 'undefined') return;- const body = tableBodyRef();- if (!body) return;- const rect = body.getBoundingClientRect();- const scrollTop = Math.max(0, -rect.top);- groupedWindowing.onScroll(scrollTop, window.innerHeight, DASHBOARD_TABLE_ESTIMATED_ROW_HEIGHT);- };-- createEffect(() => {- if (typeof window === 'undefined') return;- filteredGuests().length;- if (!groupedWindowing.isWindowed()) return;- if (!tableBodyRef()) return;-- const handleViewportChange = () => {- syncGuestWindowToViewport();- };-- handleViewportChange();- window.addEventListener('scroll', handleViewportChange, { passive: true });- window.addEventListener('resize', handleViewportChange);- onCleanup(() => {- window.removeEventListener('scroll', handleViewportChange);- window.removeEventListener('resize', handleViewportChange);- });+ const {+ bottomSpacerHeight,+ getGroupLabel,+ groupedGuests,+ groupedWindowing,+ guestParentNodeMap,+ nodeByInstance,+ topSpacerHeight,+ totalStats,+ visibleGroupKeys,+ windowedGroupedGuests,+ workloadIOEmphasis,+ workloadsSummaryFallbackCounts,+ workloadsSummaryFallbackSnapshots,+ workloadsSummaryVisibleIds,+ } = useDashboardWorkloadDerivedState({+ allGuests,+ filteredGuests,+ groupingMode,+ guestSortComparator,+ nodes: () => props.nodes,+ selectedGuestId,+ tableBodyRef,});- const totalStats = createMemo<WorkloadStats>(() => computeWorkloadStats(filteredGuests()));- const workloadIOEmphasis = createMemo(() => computeWorkloadIOEmphasis(filteredGuests()));-const handleBeforeAutoFocus = () => {if (aiChatStore.focusInput()) return true;if (!showFilters()) setShowFilters(true);diff --git a/frontend-modern/src/components/Dashboard/useDashboardWorkloadDerivedState.ts b/frontend-modern/src/components/Dashboard/useDashboardWorkloadDerivedState.tsnew file mode 100644index 0000000000..3988285fdc--- /dev/null+++ b/frontend-modern/src/components/Dashboard/useDashboardWorkloadDerivedState.ts@@ -0,0 +1,266 @@+import { createEffect, createMemo, onCleanup, type Accessor } from 'solid-js';++import type { Node } from '@/types/api';+import type { WorkloadGuest } from '@/types/workloads';+import type { WorkloadSummarySnapshot } from '@/components/Workloads/WorkloadsSummary';+import { getNodeDisplayName } from '@/utils/nodes';+import { getCanonicalWorkloadId } from '@/utils/workloads';++import {+ getDiskUsagePercent,+ getWorkloadGroupKey,+ groupWorkloads,+ computeWorkloadStats,+ computeWorkloadIOEmphasis,+ buildNodeByInstance,+ buildGuestParentNodeMap,+} from './workloadSelectors';+import { useGroupedTableWindowing } from './useGroupedTableWindowing';++type GroupingMode = 'grouped' | 'flat';++const DASHBOARD_TABLE_ESTIMATED_ROW_HEIGHT = 32;++const workloadMetricPercent = (value: number | null | undefined): number => {+ if (typeof value !== 'number' || !Number.isFinite(value)) return 0;+ if (value <= 1) return Math.max(0, value * 100);+ return Math.max(0, value);+};++interface DashboardWorkloadDerivedStateOptions {+ allGuests: Accessor<WorkloadGuest[]>;+ filteredGuests: Accessor<WorkloadGuest[]>;+ groupingMode: Accessor<GroupingMode>;+ guestSortComparator: Accessor<((a: WorkloadGuest, b: WorkloadGuest) => number) | null>;+ nodes: Accessor<Node[]>;+ selectedGuestId: Accessor<string | null>;+ tableBodyRef: Accessor<HTMLTableSectionElement | null>;+}++export function useDashboardWorkloadDerivedState(+ options: DashboardWorkloadDerivedStateOptions,+) {+ const workloadsSummaryVisibleIds = createMemo<string[]>(() =>+ options.filteredGuests().map((guest) => getCanonicalWorkloadId(guest)),+ );++ const workloadsSummaryFallbackCounts = createMemo(() => {+ const guests = options.filteredGuests();+ const running = guests.filter(+ (guest) => guest.status === 'running' || guest.status === 'online',+ ).length;+ return {+ total: guests.length,+ running,+ stopped: Math.max(0, guests.length - running),+ };+ });++ const workloadsSummaryFallbackSnapshots = createMemo<WorkloadSummarySnapshot[]>(() =>+ options.filteredGuests().map((guest) => {+ const guestId = getCanonicalWorkloadId(guest);+ const memoryUsage = workloadMetricPercent(guest.memory?.usage);+ let diskUsage = workloadMetricPercent(guest.disk?.usage);+ if (+ (!diskUsage || diskUsage <= 0) &&+ typeof guest.disk?.used === 'number' &&+ typeof guest.disk?.total === 'number' &&+ Number.isFinite(guest.disk.used) &&+ Number.isFinite(guest.disk.total) &&+ guest.disk.total > 0+ ) {+ const selectorDiskUsage = getDiskUsagePercent(guest);+ const rawDiskUsage = (guest.disk.used / guest.disk.total) * 100;+ diskUsage = rawDiskUsage > 100 ? rawDiskUsage : (selectorDiskUsage ?? rawDiskUsage);+ }++ return {+ id: guestId,+ name: guest.name || guestId,+ cpu: workloadMetricPercent(guest.cpu),+ memory: memoryUsage,+ disk: Math.max(0, diskUsage),+ network: Math.max(0, guest.networkIn || 0) + Math.max(0, guest.networkOut || 0),+ };+ }),+ );++ const nodeByInstance = createMemo(() => buildNodeByInstance(options.nodes()));+ const guestParentNodeMap = createMemo(() =>+ buildGuestParentNodeMap(options.allGuests(), nodeByInstance()),+ );++ const getGroupLabel = (+ groupKey: string,+ guests: WorkloadGuest[],+ ): { type: string; name: string } => {+ const node = nodeByInstance()[groupKey];+ if (node) return { type: '', name: getNodeDisplayName(node) };+ const normalizedGroupKey = guests.length > 0 ? getWorkloadGroupKey(guests[0]) : groupKey;+ const [prefix, ...rest] = normalizedGroupKey.split(':');+ const context = rest.length > 0 ? rest.join(':') : normalizedGroupKey;+ if (prefix === 'app-container') return { type: 'App Containers', name: context };+ if (prefix === 'pod') return { type: 'Pods', name: context };+ if (prefix === 'vm') return { type: 'VM', name: context };+ if (prefix === 'system-container') return { type: 'Container', name: context };+ const first = guests[0];+ if (first) {+ const cluster = (first.clusterName || '').trim();+ const nodeName = (first.node || '').trim();+ if (nodeName && cluster) return { type: cluster, name: nodeName };+ if (nodeName) return { type: '', name: nodeName };+ }+ return { type: '', name: context };+ };++ const groupedGuests = createMemo(() =>+ groupWorkloads(+ options.filteredGuests(),+ options.groupingMode(),+ options.guestSortComparator(),+ ),+ );++ const sortedGroupKeys = createMemo(() => {+ const groups = groupedGuests();+ const nodes = nodeByInstance();+ return Object.keys(groups).sort((a, b) => {+ const nodeA = nodes[a];+ const nodeB = nodes[b];+ const labelA = nodeA ? getNodeDisplayName(nodeA) : getGroupLabel(a, groups[a]).name;+ const labelB = nodeB ? getNodeDisplayName(nodeB) : getGroupLabel(b, groups[b]).name;+ return labelA.localeCompare(labelB) || a.localeCompare(b);+ });+ });++ const guestGlobalIndexById = createMemo(() => {+ const indexById = new Map<string, number>();+ const groups = groupedGuests();+ let globalIndex = 0;++ for (const groupKey of sortedGroupKeys()) {+ const guests = groups[groupKey] || [];+ for (const guest of guests) {+ indexById.set(getCanonicalWorkloadId(guest), globalIndex);+ globalIndex += 1;+ }+ }++ return indexById;+ });++ const revealGuestIndex = createMemo<number | null>(() => {+ const selectedId = options.selectedGuestId();+ if (!selectedId) return null;+ return guestGlobalIndexById().get(selectedId) ?? null;+ });++ const groupedWindowing = useGroupedTableWindowing({+ totalRowCount: () => options.filteredGuests().length,+ revealIndex: revealGuestIndex,+ });++ const groupStartIndexByKey = createMemo(() => {+ const starts = new Map<string, number>();+ const groups = groupedGuests();+ let globalIndex = 0;++ for (const groupKey of sortedGroupKeys()) {+ starts.set(groupKey, globalIndex);+ globalIndex += (groups[groupKey] || []).length;+ }++ return starts;+ });++ const windowedGroupedGuests = createMemo<Record<string, WorkloadGuest[]>>(() => {+ const groups = groupedGuests();+ if (!groupedWindowing.isWindowed()) {+ return groups;+ }++ const starts = groupStartIndexByKey();+ const result: Record<string, WorkloadGuest[]> = {};+ for (const groupKey of sortedGroupKeys()) {+ const guests = groups[groupKey] || [];+ const groupStart = starts.get(groupKey) ?? 0;+ const visible = groupedWindowing.getVisibleSlice(groupKey, guests, groupStart);+ if (visible.length > 0) {+ result[groupKey] = visible;+ }+ }++ return result;+ });++ const visibleGroupKeys = createMemo(() => {+ const keys = sortedGroupKeys();+ if (!groupedWindowing.isWindowed()) return keys;+ const groups = windowedGroupedGuests();+ return keys.filter((groupKey) => (groups[groupKey] || []).length > 0);+ });++ const topSpacerHeight = createMemo(() =>+ groupedWindowing.isWindowed()+ ? groupedWindowing.startIndex() * DASHBOARD_TABLE_ESTIMATED_ROW_HEIGHT+ : 0,+ );++ const bottomSpacerHeight = createMemo(() =>+ groupedWindowing.isWindowed()+ ? Math.max(+ 0,+ (options.filteredGuests().length - groupedWindowing.endIndex()) *+ DASHBOARD_TABLE_ESTIMATED_ROW_HEIGHT,+ )+ : 0,+ );++ const syncGuestWindowToViewport = () => {+ if (!groupedWindowing.isWindowed() || typeof window === 'undefined') return;+ const body = options.tableBodyRef();+ if (!body) return;+ const rect = body.getBoundingClientRect();+ const scrollTop = Math.max(0, -rect.top);+ groupedWindowing.onScroll(scrollTop, window.innerHeight, DASHBOARD_TABLE_ESTIMATED_ROW_HEIGHT);+ };++ createEffect(() => {+ if (typeof window === 'undefined') return;+ options.filteredGuests().length;+ if (!groupedWindowing.isWindowed()) return;+ if (!options.tableBodyRef()) return;++ const handleViewportChange = () => {+ syncGuestWindowToViewport();+ };++ handleViewportChange();+ window.addEventListener('scroll', handleViewportChange, { passive: true });+ window.addEventListener('resize', handleViewportChange);+ onCleanup(() => {+ window.removeEventListener('scroll', handleViewportChange);+ window.removeEventListener('resize', handleViewportChange);+ });+ });++ const totalStats = createMemo(() => computeWorkloadStats(options.filteredGuests()));+ const workloadIOEmphasis = createMemo(() => computeWorkloadIOEmphasis(options.filteredGuests()));++ return {+ bottomSpacerHeight,+ getGroupLabel,+ groupedGuests,+ groupedWindowing,+ guestParentNodeMap,+ nodeByInstance,+ topSpacerHeight,+ totalStats,+ visibleGroupKeys,+ windowedGroupedGuests,+ workloadIOEmphasis,+ workloadsSummaryFallbackCounts,+ workloadsSummaryFallbackSnapshots,+ workloadsSummaryVisibleIds,+ } as const;+}diff --git a/frontend-modern/src/utils/__tests__/frontendResourceTypeBoundaries.test.ts b/frontend-modern/src/utils/__tests__/frontendResourceTypeBoundaries.test.tsindex 8242471e63..b8a6c710fa 100644--- a/frontend-modern/src/utils/__tests__/frontendResourceTypeBoundaries.test.ts+++ b/frontend-modern/src/utils/__tests__/frontendResourceTypeBoundaries.test.ts@@ -89,6 +89,7 @@ import workloadTableHeaderSource from '@/components/Dashboard/WorkloadTableHeadeimport dashboardFilterModelSource from '@/components/Dashboard/dashboardFilterModel.ts?raw';import dashboardGuestMetadataStateSource from '@/components/Dashboard/useDashboardGuestMetadataState.ts?raw';import dashboardSelectionStateSource from '@/components/Dashboard/useDashboardSelectionState.ts?raw';+import dashboardWorkloadDerivedStateSource from '@/components/Dashboard/useDashboardWorkloadDerivedState.ts?raw';import dashboardWorkloadRouteStateSource from '@/components/Dashboard/useDashboardWorkloadRouteState.ts?raw';import dashboardWorkloadUrlSyncSource from '@/components/Dashboard/useDashboardWorkloadUrlSync.ts?raw';import dashboardStateSource from '@/components/Dashboard/useDashboardState.ts?raw';@@ -522,7 +523,9 @@ describe('frontend resource type boundaries', () => {expect(dashboardSource).not.toContain('const [search, setSearch] = createSignal(');expect(dashboardStateSource).toContain('useDashboardGuestMetadataState');expect(dashboardStateSource).toContain('useDashboardSelectionState');+ expect(dashboardStateSource).toContain('useDashboardWorkloadDerivedState');expect(dashboardStateSource).toContain('useDashboardWorkloadRouteState');+ expect(dashboardStateSource).toContain('filterWorkloads(params)');expect(dashboardWorkloadRouteStateSource).toContain('useDashboardWorkloadUrlSync');expect(dashboardWorkloadRouteStateSource).not.toContain('normalizeWorkloadViewModeParam');expect(dashboardSource).not.toContain('function normalizeViewModeParam');@@ -544,6 +547,11 @@ describe('frontend resource type boundaries', () => {expect(dashboardStateSource).not.toContain('parseWorkloadsLinkSearch');expect(dashboardStateSource).not.toContain('const [selectedGuestId, setSelectedGuestIdRaw]');expect(dashboardStateSource).not.toContain('const [hoveredWorkloadId, setHoveredWorkloadId]');+ expect(dashboardStateSource).not.toContain('groupWorkloads(');+ expect(dashboardStateSource).not.toContain('computeWorkloadStats(');+ expect(dashboardStateSource).not.toContain('computeWorkloadIOEmphasis(');+ expect(dashboardStateSource).not.toContain('buildNodeByInstance(');+ expect(dashboardStateSource).not.toContain('buildGuestParentNodeMap(');expect(dashboardWorkloadRouteStateSource).not.toContain('buildWorkloadsPath({');expect(dashboardWorkloadRouteStateSource).not.toContain('const [handledTypeParam, setHandledTypeParam]');expect(dashboardWorkloadUrlSyncSource).toContain('buildWorkloadsPath({');@@ -552,6 +560,11 @@ describe('frontend resource type boundaries', () => {'const [handledTypeParam, setHandledTypeParam]',);expect(dashboardWorkloadUrlSyncSource).toContain('parseWorkloadsLinkSearch');+ expect(dashboardWorkloadDerivedStateSource).toContain('groupWorkloads(');+ expect(dashboardWorkloadDerivedStateSource).toContain('computeWorkloadStats(');+ expect(dashboardWorkloadDerivedStateSource).toContain('computeWorkloadIOEmphasis(');+ expect(dashboardWorkloadDerivedStateSource).toContain('buildNodeByInstance(');+ expect(dashboardWorkloadDerivedStateSource).toContain('buildGuestParentNodeMap(');expect(dashboardWorkloadRouteStateSource).toContain('setSelectedNode');expect(dashboardSelectionStateSource).toContain('parseWorkloadsLinkSearch');expect(dashboardSelectionStateSource).toContain('const [selectedGuestId, setSelectedGuestIdRaw]');@@ -568,11 +581,12 @@ describe('frontend resource type boundaries', () => {expect(dashboardFilterModelSource).toContain('export const countActiveDashboardFilters');expect(dashboardFilterModelSource).toContain('export const hasActiveDashboardFilters');expect(dashboardStateSource).not.toContain('const containerRuntimeFilterConfig = createMemo');+ expect(dashboardStateSource).not.toContain('useGroupedTableWindowing');expect(dashboardWorkloadRouteStateSource).toContain('useDashboardWorkloadUrlSync');expect(dashboardWorkloadRouteStateSource).toContain('containerRuntimeFilterConfig');expect(dashboardWorkloadRouteStateSource).toContain('hostFilterConfig');expect(dashboardWorkloadRouteStateSource).toContain('namespaceFilterConfig');- expect(dashboardStateSource).toContain('useGroupedTableWindowing');+ expect(dashboardWorkloadDerivedStateSource).toContain('useGroupedTableWindowing');expect(dashboardStateSource).not.toContain('const DEFAULT_WINDOW_SIZE =');expect(dashboardStateSource).not.toContain('const DEFAULT_ENABLE_THRESHOLD =');expect(dashboardStateSource).not.toContain('const DEFAULT_OVERSCAN_ROWS =');diff --git a/scripts/release_control/subsystem_lookup_test.py b/scripts/release_control/subsystem_lookup_test.pyindex e7fdbbfe85..3d78b36502 100644--- a/scripts/release_control/subsystem_lookup_test.py+++ b/scripts/release_control/subsystem_lookup_test.py@@ -2095,6 +2095,33 @@ class SubsystemLookupTest(unittest.TestCase):"dashboard-workload-hot-path",)+ def test_lookup_paths_assigns_dashboard_workload_derived_state_runtime_to_performance_and_scalability(+ self,+ ) -> None:+ result = lookup_paths(+ ["frontend-modern/src/components/Dashboard/useDashboardWorkloadDerivedState.ts"]+ )+ self.assertEqual(result["unowned_runtime_files"], [])+ self.assertEqual(+ {item["subsystem"] for item in result["impacted_subsystems"]},+ {"performance-and-scalability"},+ )+ file_entry = result["files"][0]+ self.assertEqual(file_entry["classification"], "runtime")+ self.assertEqual(+ {match["subsystem"] for match in file_entry["matches"]},+ {"performance-and-scalability"},+ )+ match = file_entry["matches"][0]+ self.assertEqual(+ match["contract"],+ "docs/release-control/v6/internal/subsystems/performance-and-scalability.md",+ )+ self.assertEqual(+ match["verification_requirement"]["id"],+ "dashboard-workload-hot-path",+ )+def test_lookup_paths_assigns_dashboard_grouped_windowing_runtime_to_performance_and_scalability(self,) -> None: