Skip to content

armgit / Pulse

Public Imported from GitHub
0

Real-time monitoring dashboard for Proxmox VE, PBS, Docker, Kubernetes, TrueNAS and vSphere. Self-hosted, with alerts for failed backups, full disks, unhealthy containers and offline nodes.

fix(frontend): make estate overview glanceable

rcourtman4de1ede60308
diff --git a/docs/release-control/v6/internal/subsystems/frontend-primitives.md b/docs/release-control/v6/internal/subsystems/frontend-primitives.md
index 0e8ac8a665..e9827cfbe0 100644
--- a/docs/release-control/v6/internal/subsystems/frontend-primitives.md
+++ b/docs/release-control/v6/internal/subsystems/frontend-primitives.md
@@ -2057,16 +2057,19 @@ default` instead of fusing provider and badge text such as
grouped-by-host containers view) sort within groups while grouping itself
stays orthogonal to sort state.
-18. Keep estate orientation inside the canonical controls operators already
- scan. Large-estate workload totals must flow from the unfiltered shared
- workload inventory into `WorkloadsFilter.tsx`, through the canonical
- `FilterBar` / `FilterButtonGroup` option-count contract, so type and status
- buttons expose their totals without another fetch or a competing metric
- panel. Provider topology belongs in the existing table header; Proxmox
+18. Keep estate orientation inside the canonical control surface operators
+ already scan. Large-estate workload totals must flow from the unfiltered
+ shared workload inventory into `WorkloadsFilter.tsx`, through the canonical
+ `WorkloadsInventorySummary` composed by `WorkloadsFilter` immediately
+ before the canonical `FilterBar`, so a single glanceable ribbon with
+ labelled primary totals plus workload-mix and health distributions exposes
+ the estate without another fetch, nested count badges, or a metric-card
+ grid. Provider
+ topology belongs in the existing table header; Proxmox
derives cluster and standalone-node context through
`platformEstateOverviewModel.ts` and supplies it to `ProxmoxNodesTable.tsx`
rather than creating a page-level summary. The existing
- `platformEstateOverviewVisible` preference now governs these inline totals
+ `platformEstateOverviewVisible` preference now governs this overview ribbon
from the shared View menu, preserving the global browser-persisted choice
across platform workload surfaces. Docker / Podman, Kubernetes, TrueNAS,
VMware vSphere, and Standalone Machines must continue using their shared
diff --git a/docs/release-control/v6/internal/subsystems/performance-and-scalability.md b/docs/release-control/v6/internal/subsystems/performance-and-scalability.md
index 879a96a607..b7c0edf78e 100644
--- a/docs/release-control/v6/internal/subsystems/performance-and-scalability.md
+++ b/docs/release-control/v6/internal/subsystems/performance-and-scalability.md
@@ -715,10 +715,10 @@ change may globally weaken the Task 03 lifecycle-state idempotency invariant.
reads the unfiltered guest set so narrowing the table by search or status
never removes the column.
18. Extend workload filter active-count, reset semantics, and mobile toolbar state through `frontend-modern/src/components/Workloads/workloadsFilterModel.ts` (defaults, `countActiveWorkloadsFilters`, `hasActiveWorkloadsFilters`) rather than rebuilding filter-local state inside `frontend-modern/src/components/Workloads/WorkloadsFilter.tsx`. Workloads filter presentation now composes the shared `FilterBar` (`frontend-modern/src/components/shared/FilterBar/FilterBar.tsx`) with a per-page `FilterDef[]` catalog rather than the legacy `PageControls` structured control deck. High-frequency Type and Status filters stay in that catalog but render as inline compact segmented controls (`inline: true`), while longer or dynamic scope filters continue through the "+ Filter" menu and chip popovers. The Add filter control inherits FilterBar's compact accessible-only label by default instead of paying for a page-local labelled-field shell. Durable presentation controls pass only their panel content through `FilterBar.viewOptions`; the shared FilterBar owns the single View trigger and popover. Contextual actions use `leadingControls`, while frequently changed analytical orientation such as the active trend range uses `trailingControls`.
- Large-estate option counts must reuse one memoized stats pass over the
- unfiltered workload snapshot from `useWorkloadsState`; type and status
- options read that bounded projection and must not rescan resources during
- render or issue a separate summary request.
+ The large-estate inventory summary must reuse one memoized stats pass over
+ the unfiltered workload snapshot from `useWorkloadsState`; its type totals
+ and status distribution read that bounded projection and must not rescan
+ resources during render or issue a separate summary request.
Workload filter option semantics stay workload-owned, but FilterBar chip
presentation is frontend-primitives-owned: status and runtime leading dots
must use `filterChipStatusDot` rather than workload-local span factories.
diff --git a/docs/release-control/v6/internal/subsystems/registry.json b/docs/release-control/v6/internal/subsystems/registry.json
index f986f0fe85..4c6898ee16 100644
--- a/docs/release-control/v6/internal/subsystems/registry.json
+++ b/docs/release-control/v6/internal/subsystems/registry.json
@@ -6386,6 +6386,7 @@
"frontend-modern/src/components/Workloads/workloadSelectors.ts",
"frontend-modern/src/components/Workloads/WorkloadsFilter.tsx",
"frontend-modern/src/components/Workloads/workloadsFilterModel.ts",
+ "frontend-modern/src/components/Workloads/WorkloadsInventorySummary.tsx",
"frontend-modern/src/components/Workloads/WorkloadsSurface.tsx",
"frontend-modern/src/components/Workloads/WorkloadsTable.tsx",
"frontend-modern/src/components/Workloads/WorkloadTableHeader.tsx",
@@ -6426,6 +6427,7 @@
"frontend-modern/src/components/Workloads/__tests__/workloadRouteStateModel.test.ts",
"frontend-modern/src/components/Workloads/__tests__/workloadSelectionModel.test.ts",
"frontend-modern/src/components/Workloads/__tests__/WorkloadsFilter.test.tsx",
+ "frontend-modern/src/components/Workloads/__tests__/WorkloadsInventorySummary.test.tsx",
"frontend-modern/src/components/Workloads/__tests__/WorkloadsSurface.performance.contract.test.tsx",
"frontend-modern/src/components/Workloads/__tests__/workloadUrlSyncModel.test.ts",
"frontend-modern/src/components/Workloads/MetricBar.test.tsx",
@@ -6549,6 +6551,7 @@
"frontend-modern/src/components/Workloads/workloadSelectors.ts",
"frontend-modern/src/components/Workloads/WorkloadsFilter.tsx",
"frontend-modern/src/components/Workloads/workloadsFilterModel.ts",
+ "frontend-modern/src/components/Workloads/WorkloadsInventorySummary.tsx",
"frontend-modern/src/components/Workloads/WorkloadsSurface.tsx",
"frontend-modern/src/components/Workloads/WorkloadsTable.tsx",
"frontend-modern/src/components/Workloads/WorkloadTableHeader.tsx",
@@ -6589,6 +6592,7 @@
"frontend-modern/src/components/Workloads/__tests__/workloadSelectionModel.test.ts",
"frontend-modern/src/components/Workloads/__tests__/workloadSelectors.test.ts",
"frontend-modern/src/components/Workloads/__tests__/WorkloadsFilter.test.tsx",
+ "frontend-modern/src/components/Workloads/__tests__/WorkloadsInventorySummary.test.tsx",
"frontend-modern/src/components/Workloads/__tests__/WorkloadsSurface.performance.contract.test.tsx",
"frontend-modern/src/components/Workloads/__tests__/workloadTopology.test.ts",
"frontend-modern/src/components/Workloads/__tests__/workloadUrlSyncModel.test.ts",
diff --git a/docs/release-control/v6/internal/subsystems/storage-recovery.md b/docs/release-control/v6/internal/subsystems/storage-recovery.md
index e0b5404f4c..c1a136c69f 100644
--- a/docs/release-control/v6/internal/subsystems/storage-recovery.md
+++ b/docs/release-control/v6/internal/subsystems/storage-recovery.md
@@ -403,12 +403,12 @@ Patrol coverage, schedule, finding, and approval state belongs on Patrol-owned
surfaces or explicit Patrol affordances; Proxmox overview must not treat it as
backup coverage, restore readiness, PBS verification/protection proof, or a
replacement for the Proxmox Backups tab and workload Backup column.
-The Proxmox inline estate totals are likewise an adjacent frontend-primitives
+The Proxmox integrated estate summary is likewise an adjacent frontend-primitives
and unified-resource projection, not backup or recovery evidence.
`ProxmoxPageSurface` must flow the already-loaded workload inventory into the
-shared workload filter counts and derive cluster/standalone topology through
+shared workload inventory summary and derive cluster/standalone topology through
`platformEstateOverviewModel.ts` for the existing Nodes header rather than
-creating a Proxmox-only metric or spotlight panel. Those counts must not imply
+creating a Proxmox-only metric or spotlight panel. That summary must not imply
protection, verification, or restore readiness beyond the evidence held by the
workflow-owned Storage, Backups, Ceph, and Mail surfaces.
Proxmox backup inventory loading and load-failure chrome is likewise a
diff --git a/docs/release-control/v6/internal/subsystems/unified-resources.md b/docs/release-control/v6/internal/subsystems/unified-resources.md
index 6f4aba8f88..1c8fb68f42 100644
--- a/docs/release-control/v6/internal/subsystems/unified-resources.md
+++ b/docs/release-control/v6/internal/subsystems/unified-resources.md
@@ -283,7 +283,8 @@ Platform estate orientation consumes the same canonical resource projection as
the platform's tables. Pages must not issue a second summary fetch or create a
parallel metric-card projection. Unified resources owns identity, type,
platform membership, and status; frontend primitives owns how the unfiltered
-workload inventory becomes option counts in the shared filter controls. The
+workload inventory becomes one canonical estate ribbon adjacent to the shared
+filter surface. The
storage/recovery-owned Proxmox surface additionally passes its already-loaded
resource set through `platformEstateOverviewModel.ts` for cluster and
standalone-node topology in the existing Nodes table header.
diff --git a/frontend-modern/browser-verification.json b/frontend-modern/browser-verification.json
index 6a210b7dbe..ac4e15e14c 100644
--- a/frontend-modern/browser-verification.json
+++ b/frontend-modern/browser-verification.json
@@ -1,43 +1,29 @@
{
"version": 1,
- "base_sha": "85ddd9f7f98389c05165527f62696c6f344074ee",
- "verified_at": "2026-08-19T16:51:42Z",
+ "base_sha": "12050efc56de5f53f978b361c0bd2ae9f53071c9",
+ "verified_at": "2026-08-19T17:14:39Z",
"result": "passed",
"changed_paths": [
"frontend-modern/src/components/Workloads/WorkloadsFilter.tsx",
- "frontend-modern/src/components/Workloads/useWorkloadsState.ts",
+ "frontend-modern/src/components/Workloads/WorkloadsInventorySummary.tsx",
"frontend-modern/src/components/Workloads/workloadsFilterModel.ts",
"frontend-modern/src/components/shared/FilterBar/FilterBar.tsx",
+ "frontend-modern/src/components/shared/FilterBar/filterCatalog.ts",
"frontend-modern/src/components/shared/FilterButtonGroup.tsx",
"frontend-modern/src/components/shared/filterButtonGroupModel.ts",
- "frontend-modern/src/features/docker/DockerPageSurface.tsx",
- "frontend-modern/src/features/kubernetes/KubernetesPageSurface.tsx",
- "frontend-modern/src/features/platformPage/PlatformEstateOverview.tsx",
- "frontend-modern/src/features/platformPage/platformEstateOverviewModel.ts",
- "frontend-modern/src/features/platformPage/sharedPlatformPage.tsx",
"frontend-modern/src/features/proxmox/ProxmoxNodesTable.tsx",
- "frontend-modern/src/features/proxmox/ProxmoxPageSurface.tsx",
- "frontend-modern/src/features/standalone/StandalonePageSurface.tsx",
- "frontend-modern/src/features/truenas/TrueNASPageSurface.tsx",
- "frontend-modern/src/features/vmware/VmwarePageSurface.tsx"
+ "frontend-modern/src/features/proxmox/ProxmoxPageSurface.tsx"
],
"content_sha256": {
- "frontend-modern/src/components/Workloads/WorkloadsFilter.tsx": "643e50ea4aa6ed89589bb77ce48fc6344ba4a5ed6b2939bba6b4d8e047b78bfd",
- "frontend-modern/src/components/Workloads/useWorkloadsState.ts": "10f5b232ce7db4cf52d8df0f2d33c29731afcf1544f770aab1183f372763495d",
- "frontend-modern/src/components/Workloads/workloadsFilterModel.ts": "c68b4193f9b926a468b018e06024fb3212e19b99e0824845076f8ed71bf9c0eb",
- "frontend-modern/src/components/shared/FilterBar/FilterBar.tsx": "ce8c55f14d1358b2ed92e1970587cb1e671a97ade499d51ec635c8f78d256eda",
- "frontend-modern/src/components/shared/FilterButtonGroup.tsx": "f573262dda64212a061626b3c7988f3ce2788f18979d523c1f737f6a7efd7a98",
- "frontend-modern/src/components/shared/filterButtonGroupModel.ts": "06576097404a56f66d6ae0ef23fc913dbff11ceb5833140d00df58ad9711fe41",
- "frontend-modern/src/features/docker/DockerPageSurface.tsx": "b1f8425708dad88bad3fe58764456250c32e5080dad3c6d04afbe2cba23e4762",
- "frontend-modern/src/features/kubernetes/KubernetesPageSurface.tsx": "bc66b5a08453771c1f81d6b34c02a0b2e117f1c20e8cc250502a8c9ba846f3c4",
- "frontend-modern/src/features/platformPage/PlatformEstateOverview.tsx": "deleted",
- "frontend-modern/src/features/platformPage/platformEstateOverviewModel.ts": "025fe43f28810fbafc7ce439b4e47e40d109559ecfc064b14e11de1bae4505db",
- "frontend-modern/src/features/platformPage/sharedPlatformPage.tsx": "cd959981f59753727847621228a339c099034fe7b7a61fa2bb32bb6704dd64b3",
- "frontend-modern/src/features/proxmox/ProxmoxNodesTable.tsx": "5897b06f6e728f06d00d731b3675a33688681977bb3d51c76b0a92e21cf4c4bd",
- "frontend-modern/src/features/proxmox/ProxmoxPageSurface.tsx": "199cac37585598cc8533efd8010bcfa85915f4f7cc29fa5b967198460f70b43d",
- "frontend-modern/src/features/standalone/StandalonePageSurface.tsx": "70f1f22cd61ed8822aa91cb3bb513fffd794316c6536e00d8bd0403fa9aecbdd",
- "frontend-modern/src/features/truenas/TrueNASPageSurface.tsx": "c330710f229e6fa04edb12e077a34ea7fafb4edac2adda6c878a77984cde841e",
- "frontend-modern/src/features/vmware/VmwarePageSurface.tsx": "efd0a33a0c9fa649993811f3dee89666a0ae3df32af5225c69fcc0978811ffb8"
+ "frontend-modern/src/components/Workloads/WorkloadsFilter.tsx": "1e9fa7d4b9679d5f5a1cd2f7c62d7a9d933158452c6731c31cd23b406ff9de78",
+ "frontend-modern/src/components/Workloads/WorkloadsInventorySummary.tsx": "a18190ea5320759f6f15c0392934984e9fbb65d261c2838fe919a06da9814dc9",
+ "frontend-modern/src/components/Workloads/workloadsFilterModel.ts": "8f1b943923c4e5e7f1285ef09d565639ea343b9040d9a99625ec9b44ed265200",
+ "frontend-modern/src/components/shared/FilterBar/FilterBar.tsx": "59e60b5ecd379350de9284a27a739023730d3e2c7ca519962d766d69276c565c",
+ "frontend-modern/src/components/shared/FilterBar/filterCatalog.ts": "6fa670b97179850b445dd8b48198f9e3fbcb564add7f405c70fa5af11ad795fe",
+ "frontend-modern/src/components/shared/FilterButtonGroup.tsx": "0d1b8ab603b2e43986c53354dafebd3a652200479b50ecd2d4d8ffd6281aea96",
+ "frontend-modern/src/components/shared/filterButtonGroupModel.ts": "33408c8af3eece8604647d6cb7133ef675b50adbc983c0451200f35e99bf7075",
+ "frontend-modern/src/features/proxmox/ProxmoxNodesTable.tsx": "59e64ba42750c4c2d71e2d1640cc403ded9ce711d376148a823bc0a248c50380",
+ "frontend-modern/src/features/proxmox/ProxmoxPageSurface.tsx": "0003dd53e4f6f4f8ffe4ab5a41f10259d7eef1efcf157e941ec15396de43a24b"
},
"routes": [
"/proxmox/overview",
@@ -52,16 +38,16 @@
{ "width": 390, "height": 844 }
],
"states": [
- "Large Proxmox workload totals shown inline in the existing Type and Status controls",
- "Proxmox Nodes header showing 32 nodes, five clusters, and two standalone nodes",
- "Expanded phone filter rail with all inline totals visible without horizontal page overflow",
- "Inline totals hidden through View, still hidden after a full reload, then restored",
+ "Large Proxmox estate shown as one glanceable ribbon with 718 workloads, 32 nodes, five clusters, and two standalone nodes",
+ "Explicit workload-mix and health charts with labelled counts above the clean filter controls",
+ "Desktop utility controls wrapping as one right-aligned action cluster",
+ "Phone layout at 390 px with a two-by-two estate total grid, two full-width charts, and no horizontal page overflow",
+ "Estate overview hidden through View and then restored",
"Docker, Kubernetes, TrueNAS, VMware vSphere, and Standalone overview routes without the retired estate panel"
],
"interactions": [
- "Expanded the phone Filters control and checked the complete type and status count rows",
- "Opened View, selected Hide for Inventory totals, and confirmed count badges disappeared",
- "Reloaded Proxmox and confirmed the hidden choice persisted, then restored Show",
+ "Checked the full estate ribbon and clean collapsed filter control at 390 x 844",
+ "Opened View, selected Hide for Inventory totals, confirmed the ribbon disappeared, then restored Show",
"Navigated all six platform overview routes and confirmed the shared panel was absent"
]
}
diff --git a/frontend-modern/scripts/shared-template-registry.json b/frontend-modern/scripts/shared-template-registry.json
index f53bebf60d..dd587b8168 100644
--- a/frontend-modern/scripts/shared-template-registry.json
+++ b/frontend-modern/scripts/shared-template-registry.json
@@ -3195,20 +3195,18 @@
]
},
{
- "id": "platform-estate-inline-counts",
+ "id": "platform-estate-inventory-summary",
"category": "platform-overview",
- "summary": "Large-estate totals annotate the existing canonical type/status controls and table headers instead of creating a competing overview panel; the shared View preference owns their visibility.",
+ "summary": "Large-estate totals use one glanceable canonical ribbon immediately before the existing filter surface, with labelled primary totals and workload/health distributions instead of nested badges or a metric-card grid; the shared View preference owns visibility.",
"canonical": {
- "path": "src/components/Workloads/WorkloadsFilter.tsx",
- "export": "WorkloadsFilter"
+ "path": "src/components/Workloads/WorkloadsInventorySummary.tsx",
+ "export": "WorkloadsInventorySummary"
},
- "requiredConsumers": [
- { "path": "src/features/proxmox/ProxmoxPageSurface.tsx" },
- { "path": "src/features/vmware/VmwarePageSurface.tsx" }
- ],
+ "requiredConsumers": [{ "path": "src/components/Workloads/WorkloadsFilter.tsx" }],
"proof": [
"src/components/shared/SharedPrimitives.guardrails.test.ts",
"src/components/Workloads/__tests__/WorkloadsFilter.test.tsx",
+ "src/components/Workloads/__tests__/WorkloadsInventorySummary.test.tsx",
"src/features/platformPage/__tests__/platformEstateOverviewModel.test.ts",
"src/features/platformPage/__tests__/platformOverviewLayout.guardrails.test.ts",
"scripts/shared-template-audit.mjs"
diff --git a/frontend-modern/src/components/Workloads/WorkloadsFilter.tsx b/frontend-modern/src/components/Workloads/WorkloadsFilter.tsx
index 1da3db5bac..1e5a0a192b 100644
--- a/frontend-modern/src/components/Workloads/WorkloadsFilter.tsx
+++ b/frontend-modern/src/components/Workloads/WorkloadsFilter.tsx
@@ -46,6 +46,7 @@ import {
hasActiveWorkloadsFilters,
} from './workloadsFilterModel';
import { WORKLOAD_STATUS_FILTER_OPTIONS, WORKLOAD_TYPE_OPTIONS } from './workloadFilterConfigModel';
+import { WorkloadsInventorySummary } from './WorkloadsInventorySummary';
export const WorkloadsFilter: Component<WorkloadsFilterProps> = (props) => {
const { isMobile } = useBreakpoint();
@@ -67,16 +68,6 @@ export const WorkloadsFilter: Component<WorkloadsFilterProps> = (props) => {
);
};
- const workloadTypeCount = (value: string): number | undefined => {
- if (!inventoryCountsVisible() || !props.inventoryStats) return undefined;
- const stats = props.inventoryStats();
- if (value === 'all') return stats.total;
- if (value === 'vm') return stats.vms;
- if (value === 'container') return stats.containers + stats.appContainers;
- if (value === 'pod') return stats.pods;
- return undefined;
- };
-
const workloadTypeOptions = (): FilterSelectOption[] =>
(isProxmoxScope()
? WORKLOAD_TYPE_OPTIONS.filter(
@@ -96,19 +87,8 @@ export const WorkloadsFilter: Component<WorkloadsFilterProps> = (props) => {
? BoxesIcon
: undefined,
tone: option.value === 'vm' ? 'info' : option.value === 'container' ? 'success' : undefined,
- count: workloadTypeCount(option.value),
}));
- const workloadStatusCount = (value: string): number | undefined => {
- if (!inventoryCountsVisible() || !props.inventoryStats) return undefined;
- const stats = props.inventoryStats();
- if (value === 'all') return stats.total;
- if (value === 'running') return stats.running;
- if (value === 'degraded') return stats.degraded;
- if (value === 'stopped') return stats.stopped;
- return undefined;
- };
-
const workloadStatusOptions = (): FilterSelectOption[] =>
(props.statusOptions ?? WORKLOAD_STATUS_FILTER_OPTIONS).map((option) => ({
value: option.value,
@@ -129,7 +109,6 @@ export const WorkloadsFilter: Component<WorkloadsFilterProps> = (props) => {
: option.value === 'stopped'
? 'danger'
: undefined,
- count: workloadStatusCount(option.value),
}));
const runtimeChipLabel = (value: string): string => {
@@ -280,153 +259,162 @@ export const WorkloadsFilter: Component<WorkloadsFilterProps> = (props) => {
};
return (
- <FilterBar
- role="group"
- ariaLabel={props.ariaLabel ?? 'Workloads filters'}
- isMobile={isMobile}
- search={{
- value: props.search,
- setValue: props.setSearch,
- placeholder: props.searchPlaceholder ?? 'Search workloads by name, ID, node, or image',
- historyKey: STORAGE_KEYS.WORKLOADS_SEARCH_HISTORY,
- emptyMessage: props.searchEmptyMessage ?? 'Recent workload searches appear here.',
- onBeforeAutoFocus: props.onBeforeAutoFocus,
- }}
- searchTrailing={props.searchTrailing}
- filters={buildFilters()}
- showAddFilterLabel={false}
- savedViewsKey={props.savedViewsKey}
- leadingControls={
- props.pinnedSelectionActive?.() && props.onClearPinnedSelection ? (
- <FilterActionButton
- aria-label="Clear pinned selection"
- title="Clear pinned selection"
- onClick={() => props.onClearPinnedSelection?.()}
- >
- <XIcon class="h-3 w-3" />
- Clear selection
- </FilterActionButton>
- ) : undefined
- }
- viewOptions={
- <>
- <div>
- <div class="mb-1.5 text-[10px] font-semibold uppercase tracking-wide text-muted">
- Layout
- </div>
- <GroupedTableModeSegmentedControl
- value={props.groupingMode()}
- onChange={props.setGroupingMode}
- />
- </div>
-
- <Show when={props.metricDisplayMode && props.setMetricDisplayMode}>
+ <>
+ <Show when={inventoryCountsVisible() && props.inventoryStats}>
+ <WorkloadsInventorySummary
+ stats={props.inventoryStats!()}
+ topology={props.inventoryTopology?.()}
+ containerLabel={isProxmoxScope() ? 'LXCs' : 'containers'}
+ />
+ </Show>
+ <FilterBar
+ role="group"
+ ariaLabel={props.ariaLabel ?? 'Workloads filters'}
+ isMobile={isMobile}
+ search={{
+ value: props.search,
+ setValue: props.setSearch,
+ placeholder: props.searchPlaceholder ?? 'Search workloads by name, ID, node, or image',
+ historyKey: STORAGE_KEYS.WORKLOADS_SEARCH_HISTORY,
+ emptyMessage: props.searchEmptyMessage ?? 'Recent workload searches appear here.',
+ onBeforeAutoFocus: props.onBeforeAutoFocus,
+ }}
+ searchTrailing={props.searchTrailing}
+ filters={buildFilters()}
+ showAddFilterLabel={false}
+ savedViewsKey={props.savedViewsKey}
+ leadingControls={
+ props.pinnedSelectionActive?.() && props.onClearPinnedSelection ? (
+ <FilterActionButton
+ aria-label="Clear pinned selection"
+ title="Clear pinned selection"
+ onClick={() => props.onClearPinnedSelection?.()}
+ >
+ <XIcon class="h-3 w-3" />
+ Clear selection
+ </FilterActionButton>
+ ) : undefined
+ }
+ viewOptions={
+ <>
<div>
<div class="mb-1.5 text-[10px] font-semibold uppercase tracking-wide text-muted">
- Metrics
+ Layout
</div>
- <MetricDisplayModeSegmentedControl
- value={props.metricDisplayMode!()}
- onChange={props.setMetricDisplayMode!}
+ <GroupedTableModeSegmentedControl
+ value={props.groupingMode()}
+ onChange={props.setGroupingMode}
/>
</div>
- </Show>
- <Show when={props.memoryDisplayBasis && props.setMemoryDisplayBasis}>
- <div>
- <div class="mb-1.5 text-[10px] font-semibold uppercase tracking-wide text-muted">
- Memory relative to
+ <Show when={props.metricDisplayMode && props.setMetricDisplayMode}>
+ <div>
+ <div class="mb-1.5 text-[10px] font-semibold uppercase tracking-wide text-muted">
+ Metrics
+ </div>
+ <MetricDisplayModeSegmentedControl
+ value={props.metricDisplayMode!()}
+ onChange={props.setMetricDisplayMode!}
+ />
</div>
- <FilterSegmentedControl
- aria-label="Memory percentage basis"
- value={props.memoryDisplayBasis!()}
- onChange={(value) =>
- props.setMemoryDisplayBasis!(value as WorkloadsMemoryDisplayBasis)
- }
- options={[
- {
- value: 'guest',
- label: 'Guest allocation',
- ariaLabel: 'Guest',
- title: 'Show memory as a percentage of each guest allocation',
- },
- {
- value: 'host',
- label: 'Host capacity',
- ariaLabel: 'Host',
- title: 'Show memory as a percentage of the Proxmox host total',
- },
- ]}
- />
- </div>
- </Show>
+ </Show>
- <Show when={props.inventoryStats}>
- <div>
- <div class="mb-1.5 text-[10px] font-semibold uppercase tracking-wide text-muted">
- Inventory totals
+ <Show when={props.memoryDisplayBasis && props.setMemoryDisplayBasis}>
+ <div>
+ <div class="mb-1.5 text-[10px] font-semibold uppercase tracking-wide text-muted">
+ Memory relative to
+ </div>
+ <FilterSegmentedControl
+ aria-label="Memory percentage basis"
+ value={props.memoryDisplayBasis!()}
+ onChange={(value) =>
+ props.setMemoryDisplayBasis!(value as WorkloadsMemoryDisplayBasis)
+ }
+ options={[
+ {
+ value: 'guest',
+ label: 'Guest allocation',
+ ariaLabel: 'Guest',
+ title: 'Show memory as a percentage of each guest allocation',
+ },
+ {
+ value: 'host',
+ label: 'Host capacity',
+ ariaLabel: 'Host',
+ title: 'Show memory as a percentage of the Proxmox host total',
+ },
+ ]}
+ />
</div>
- <FilterSegmentedControl
- aria-label="Inventory totals visibility"
- value={inventoryCountsVisible() ? 'shown' : 'hidden'}
- onChange={(value) => setInventoryCountsVisible(value === 'shown')}
- options={[
- { value: 'shown', label: 'Show' },
- { value: 'hidden', label: 'Hide' },
- ]}
- />
- </div>
- </Show>
+ </Show>
- <Show when={props.onChartsToggle}>
- <div>
- <div class="mb-1.5 text-[10px] font-semibold uppercase tracking-wide text-muted">
- Summary
+ <Show when={props.inventoryStats}>
+ <div>
+ <div class="mb-1.5 text-[10px] font-semibold uppercase tracking-wide text-muted">
+ Inventory totals
+ </div>
+ <FilterSegmentedControl
+ aria-label="Inventory totals visibility"
+ value={inventoryCountsVisible() ? 'shown' : 'hidden'}
+ onChange={(value) => setInventoryCountsVisible(value === 'shown')}
+ options={[
+ { value: 'shown', label: 'Show' },
+ { value: 'hidden', label: 'Hide' },
+ ]}
+ />
</div>
- <ChartVisibilityToggleButton
- class="!inline-flex"
- collapsed={props.chartsCollapsed?.() ?? false}
- onToggle={() => props.onChartsToggle?.()}
- />
- </div>
- </Show>
+ </Show>
- <Show when={props.columnVisibility}>
- {(visibility) => (
+ <Show when={props.onChartsToggle}>
<div>
<div class="mb-1.5 text-[10px] font-semibold uppercase tracking-wide text-muted">
- Table
+ Summary
</div>
- <ColumnPicker
- inline
- columns={visibility().availableColumns}
- isHidden={visibility().isColumnHidden}
- onToggle={visibility().onColumnToggle}
- onReset={visibility().onColumnReset}
- showReset={visibility().showReset}
+ <ChartVisibilityToggleButton
+ class="!inline-flex"
+ collapsed={props.chartsCollapsed?.() ?? false}
+ onToggle={() => props.onChartsToggle?.()}
/>
</div>
- )}
+ </Show>
+
+ <Show when={props.columnVisibility}>
+ {(visibility) => (
+ <div>
+ <div class="mb-1.5 text-[10px] font-semibold uppercase tracking-wide text-muted">
+ Table
+ </div>
+ <ColumnPicker
+ inline
+ columns={visibility().availableColumns}
+ isHidden={visibility().isColumnHidden}
+ onToggle={visibility().onColumnToggle}
+ onReset={visibility().onColumnReset}
+ showReset={visibility().showReset}
+ />
+ </div>
+ )}
+ </Show>
+ </>
+ }
+ trailingControls={
+ <Show
+ when={
+ props.metricDisplayMode?.() === 'sparklines' &&
+ props.metricHistoryRange &&
+ props.setMetricHistoryRange
+ }
+ >
+ <MetricHistoryRangeSegmentedControl
+ label="Trend range"
+ range={props.metricHistoryRange!()}
+ onRangeChange={props.setMetricHistoryRange!}
+ />
</Show>
- </>
- }
- trailingControls={
- <Show
- when={
- props.metricDisplayMode?.() === 'sparklines' &&
- props.metricHistoryRange &&
- props.setMetricHistoryRange
- }
- >
- <MetricHistoryRangeSegmentedControl
- label="Trend range"
- range={props.metricHistoryRange!()}
- onRangeChange={props.setMetricHistoryRange!}
- />
- </Show>
- }
- onClearAll={handleClearAll}
- showClearAll={showClearAll}
- />
+ }
+ onClearAll={handleClearAll}
+ showClearAll={showClearAll}
+ />
+ </>
);
};
diff --git a/frontend-modern/src/components/Workloads/WorkloadsInventorySummary.tsx b/frontend-modern/src/components/Workloads/WorkloadsInventorySummary.tsx
new file mode 100644
index 0000000000..feef031fdd
--- /dev/null
+++ b/frontend-modern/src/components/Workloads/WorkloadsInventorySummary.tsx
@@ -0,0 +1,131 @@
+import { For, Show, createMemo, type Component } from 'solid-js';
+import { Card } from '@/components/shared/Card';
+import type { WorkloadsInventoryStats, WorkloadsInventoryTopology } from './workloadsFilterModel';
+
+const formatCount = (value: number): string => value.toLocaleString();
+
+const segmentWidth = (value: number, total: number): string =>
+ `${total > 0 ? Math.max(0, (value / total) * 100) : 0}%`;
+
+type DistributionItem = { label: string; value: number; class: string };
+
+const Distribution: Component<{
+ label: string;
+ items: DistributionItem[];
+ total: number;
+}> = (props) => (
+ <div class="space-y-2">
+ <div class="flex items-center justify-between gap-3">
+ <h3 class="text-[10px] font-semibold uppercase tracking-wide text-muted">{props.label}</h3>
+ <div class="flex flex-wrap items-center justify-end gap-x-3 gap-y-1 text-[11px] text-muted">
+ <For each={props.items.filter((item) => item.value > 0)}>
+ {(item) => (
+ <span class="inline-flex items-center gap-1.5 whitespace-nowrap">
+ <span aria-hidden="true" class={`h-1.5 w-1.5 rounded-full ${item.class}`} />
+ <strong class="font-semibold tabular-nums text-base-content">
+ {formatCount(item.value)}
+ </strong>{' '}
+ {item.label}
+ </span>
+ )}
+ </For>
+ </div>
+ </div>
+ <div
+ class="flex h-2.5 overflow-hidden rounded-full bg-surface-alt ring-1 ring-inset ring-border-subtle"
+ role="img"
+ aria-label={`${props.label}: ${props.items
+ .map((item) => `${formatCount(item.value)} ${item.label}`)
+ .join(', ')}`}
+ >
+ <For each={props.items}>
+ {(item) => (
+ <Show when={item.value > 0}>
+ <span class={item.class} style={{ width: segmentWidth(item.value, props.total) }} />
+ </Show>
+ )}
+ </For>
+ </div>
+ </div>
+);
+
+export const WorkloadsInventorySummary: Component<{
+ stats: WorkloadsInventoryStats;
+ topology?: WorkloadsInventoryTopology;
+ containerLabel?: string;
+}> = (props) => {
+ const containerCount = () => props.stats.containers + props.stats.appContainers;
+ const primaryStats = createMemo(() => {
+ const topology = props.topology;
+ if (topology) {
+ return [
+ { label: 'Workloads', value: props.stats.total },
+ { label: 'Nodes', value: topology.nodes },
+ { label: 'Clusters', value: topology.clusters },
+ { label: 'Standalone', value: topology.standalone },
+ ];
+ }
+ return [
+ { label: 'Workloads', value: props.stats.total },
+ { label: 'Running', value: props.stats.running },
+ { label: 'Attention', value: props.stats.degraded },
+ ];
+ });
+ const typeItems = createMemo<DistributionItem[]>(() =>
+ [
+ { label: 'VMs', value: props.stats.vms, class: 'bg-sky-500' },
+ {
+ label: props.containerLabel ?? 'containers',
+ value: containerCount(),
+ class: 'bg-violet-500',
+ },
+ { label: 'pods', value: props.stats.pods, class: 'bg-cyan-400' },
+ ].filter((item) => item.value > 0),
+ );
+ const statusItems = createMemo<DistributionItem[]>(() => [
+ { label: 'running', value: props.stats.running, class: 'bg-emerald-500' },
+ { label: 'attention', value: props.stats.degraded, class: 'bg-amber-500' },
+ { label: 'stopped', value: props.stats.stopped, class: 'bg-red-500' },
+ ]);
+
+ return (
+ <Card
+ padding="md"
+ class="mb-2 sm:mb-4"
+ role="region"
+ aria-label="Estate overview"
+ data-testid="workloads-estate-overview"
+ >
+ <div class="mb-3 flex items-center justify-between gap-3">
+ <h2 class="text-xs font-semibold text-base-content">Estate overview</h2>
+ <span class="text-[10px] font-medium uppercase tracking-wide text-muted">
+ Current inventory
+ </span>
+ </div>
+ <div class="grid gap-4 lg:grid-cols-[minmax(18rem,0.8fr)_minmax(28rem,1.2fr)] lg:items-center lg:gap-6">
+ <div
+ class={`grid grid-cols-2 divide-x divide-border-subtle ${
+ props.topology ? 'sm:grid-cols-4' : 'sm:grid-cols-3'
+ }`}
+ >
+ <For each={primaryStats()}>
+ {(item, index) => (
+ <div class={index() === 0 ? 'pr-3' : 'px-3'}>
+ <div class="text-xl font-semibold leading-none tabular-nums text-base-content sm:text-2xl">
+ {formatCount(item.value)}
+ </div>
+ <div class="mt-1 text-[11px] font-medium text-muted">{item.label}</div>
+ </div>
+ )}
+ </For>
+ </div>
+ <div class="grid gap-4 sm:grid-cols-2 sm:gap-5">
+ <Distribution label="Workload mix" items={typeItems()} total={props.stats.total} />
+ <Distribution label="Health" items={statusItems()} total={props.stats.total} />
+ </div>
+ </div>
+ </Card>
+ );
+};
+
+export default WorkloadsInventorySummary;
diff --git a/frontend-modern/src/components/Workloads/__tests__/WorkloadsFilter.test.tsx b/frontend-modern/src/components/Workloads/__tests__/WorkloadsFilter.test.tsx
index a3d647ed97..2f68a01552 100644
--- a/frontend-modern/src/components/Workloads/__tests__/WorkloadsFilter.test.tsx
+++ b/frontend-modern/src/components/Workloads/__tests__/WorkloadsFilter.test.tsx
@@ -163,7 +163,7 @@ describe('WorkloadsFilter', () => {
expect(dialog.getByRole('button', { name: 'List' })).toBeInTheDocument();
});
- it('folds large-estate totals into the existing type and status controls', () => {
+ it('presents large-estate totals as one glanceable overview instead of nested filter badges', () => {
render(() => (
<WorkloadsFilter
{...makeProps({
@@ -182,18 +182,21 @@ describe('WorkloadsFilter', () => {
/>
));
+ const overview = screen.getByRole('region', { name: 'Estate overview' });
+ expect(overview).toHaveTextContent('578Workloads');
+ expect(overview).toHaveTextContent('253 VMs');
+ expect(overview).toHaveTextContent('325 LXCs');
expect(
- within(inlineFilterGroup('Type')).getByRole('button', { name: 'All, 578' }),
- ).toHaveTextContent('578');
- expect(
- within(inlineFilterGroup('Type')).getByRole('button', { name: 'VMs, 253' }),
- ).toHaveTextContent('253');
+ within(overview).getByRole('img', {
+ name: 'Health: 500 running, 12 attention, 66 stopped',
+ }),
+ ).toBeInTheDocument();
expect(
- within(inlineFilterGroup('Type')).getByRole('button', { name: 'LXCs, 325' }),
- ).toHaveTextContent('325');
+ within(inlineFilterGroup('Type')).getByRole('button', { name: 'VMs' }),
+ ).not.toHaveTextContent('253');
expect(
- within(inlineFilterGroup('Status')).getByRole('button', { name: 'Degraded, 12' }),
- ).toHaveTextContent('12');
+ within(inlineFilterGroup('Status')).getByRole('button', { name: 'Degraded' }),
+ ).not.toHaveTextContent('12');
});
it('keeps inventory totals optional through the existing View menu', () => {
@@ -218,9 +221,7 @@ describe('WorkloadsFilter', () => {
const visibility = dialog.getByRole('group', { name: 'Inventory totals visibility' });
fireEvent.click(within(visibility).getByRole('button', { name: 'Hide' }));
- expect(
- within(inlineFilterGroup('Type')).getByRole('button', { name: 'All' }),
- ).not.toHaveTextContent('578');
+ expect(screen.queryByRole('region', { name: 'Estate overview' })).not.toBeInTheDocument();
expect(window.localStorage.getItem('platformEstateOverviewVisible')).toBe('false');
});
diff --git a/frontend-modern/src/components/Workloads/__tests__/WorkloadsInventorySummary.test.tsx b/frontend-modern/src/components/Workloads/__tests__/WorkloadsInventorySummary.test.tsx
new file mode 100644
index 0000000000..317d7aec28
--- /dev/null
+++ b/frontend-modern/src/components/Workloads/__tests__/WorkloadsInventorySummary.test.tsx
@@ -0,0 +1,68 @@
+import { cleanup, render, screen, within } from '@solidjs/testing-library';
+import { afterEach, describe, expect, it } from 'vitest';
+import { WorkloadsInventorySummary } from '../WorkloadsInventorySummary';
+
+describe('WorkloadsInventorySummary', () => {
+ afterEach(cleanup);
+
+ it('shows labelled estate totals and two explicit distributions', () => {
+ render(() => (
+ <WorkloadsInventorySummary
+ containerLabel="LXCs"
+ topology={{ nodes: 32, clusters: 5, standalone: 2 }}
+ stats={{
+ total: 718,
+ running: 635,
+ degraded: 36,
+ stopped: 47,
+ vms: 283,
+ containers: 300,
+ appContainers: 15,
+ pods: 120,
+ }}
+ />
+ ));
+
+ const summary = screen.getByRole('region', { name: 'Estate overview' });
+ expect(summary).toHaveTextContent('718Workloads');
+ expect(summary).toHaveTextContent('32Nodes');
+ expect(summary).toHaveTextContent('5Clusters');
+ expect(summary).toHaveTextContent('2Standalone');
+ expect(summary).toHaveTextContent('283 VMs');
+ expect(summary).toHaveTextContent('315 LXCs');
+ expect(summary).toHaveTextContent('120 pods');
+ expect(
+ within(summary).getByRole('img', {
+ name: 'Workload mix: 283 VMs, 315 LXCs, 120 pods',
+ }),
+ ).toBeInTheDocument();
+ expect(
+ within(summary).getByRole('img', {
+ name: 'Health: 635 running, 36 attention, 47 stopped',
+ }),
+ ).toBeInTheDocument();
+ });
+
+ it('omits empty type categories without losing status context', () => {
+ render(() => (
+ <WorkloadsInventorySummary
+ stats={{
+ total: 10,
+ running: 10,
+ degraded: 0,
+ stopped: 0,
+ vms: 10,
+ containers: 0,
+ appContainers: 0,
+ pods: 0,
+ }}
+ />
+ ));
+
+ const summary = screen.getByRole('region', { name: 'Estate overview' });
+ expect(summary).toHaveTextContent('10 VMs');
+ expect(summary).not.toHaveTextContent('containers');
+ expect(summary).not.toHaveTextContent('pods');
+ expect(summary).toHaveTextContent('10Running');
+ });
+});
diff --git a/frontend-modern/src/components/Workloads/workloadsFilterModel.ts b/frontend-modern/src/components/Workloads/workloadsFilterModel.ts
index ca2e6a19e1..73b2ce0ff1 100644
--- a/frontend-modern/src/components/Workloads/workloadsFilterModel.ts
+++ b/frontend-modern/src/components/Workloads/workloadsFilterModel.ts
@@ -26,6 +26,12 @@ export interface WorkloadsInventoryStats {
pods: number;
}
+export interface WorkloadsInventoryTopology {
+ nodes: number;
+ clusters: number;
+ standalone: number;
+}
+
export interface WorkloadsFilterSelectOption {
value: string;
label: string;
@@ -57,6 +63,7 @@ export interface WorkloadsFilterProps {
searchEmptyMessage?: string;
statusOptions?: readonly WorkloadsStatusOption[];
inventoryStats?: () => WorkloadsInventoryStats;
+ inventoryTopology?: () => WorkloadsInventoryTopology;
columnVisibility?: {
availableColumns: ColumnDef[];
isColumnHidden: (id: string) => boolean;
diff --git a/frontend-modern/src/components/shared/FilterBar/FilterBar.test.tsx b/frontend-modern/src/components/shared/FilterBar/FilterBar.test.tsx
index 62c91f2f2b..4f5e5d7267 100644
--- a/frontend-modern/src/components/shared/FilterBar/FilterBar.test.tsx
+++ b/frontend-modern/src/components/shared/FilterBar/FilterBar.test.tsx
@@ -234,6 +234,25 @@ describe('FilterBar', () => {
expect(labels.indexOf('Clear filters')).toBeLessThan(labels.indexOf('View'));
});
+ it('keeps desktop utility controls in one right-aligned action cluster', () => {
+ const { container } = renderInRouter(() => (
+ <FilterBar
+ search={search}
+ filters={[inlineTypeFilter(), menuNodeFilter()]}
+ isMobile={() => false}
+ savedViewsKey="test-surface"
+ viewOptions={<span>Density</span>}
+ />
+ ));
+
+ const actionCluster = container.querySelector('[data-filter-action-cluster]');
+ expect(actionCluster).not.toBeNull();
+ expect(actionCluster).toHaveClass('ml-auto', 'justify-end');
+ expect(actionCluster).toContainElement(screen.getByRole('combobox', { name: 'Filter' }));
+ expect(actionCluster).toContainElement(screen.getByRole('button', { name: 'Saved views' }));
+ expect(actionCluster).toContainElement(screen.getByRole('button', { name: 'View' }));
+ });
+
it('owns View composition while keeping contextual and orientation controls visible', () => {
render(() => (
<FilterBar
diff --git a/frontend-modern/src/components/shared/FilterBar/FilterBar.tsx b/frontend-modern/src/components/shared/FilterBar/FilterBar.tsx
index 4c04236cbb..fcb5b8217d 100644
--- a/frontend-modern/src/components/shared/FilterBar/FilterBar.tsx
+++ b/frontend-modern/src/components/shared/FilterBar/FilterBar.tsx
@@ -43,7 +43,6 @@ const InlineFilterControl: Component<{ filter: FilterDef }> = (props) => (
icon: option.icon,
tone: option.tone,
title: option.title,
- count: option.count,
}))}
value={props.filter.value()}
onChange={props.filter.setValue}
@@ -152,46 +151,45 @@ export const FilterBar: Component<FilterBarProps> = (props) => {
</Show>
<Show when={showDesktopControlsRow()}>
- <div class="flex flex-wrap items-center gap-2">
- <For each={inlineFilters()}>
- {(filter, index) => (
- <>
- <InlineFilterControl filter={filter} />
- <Show when={index() < inlineFilters().length - 1}>
- <FilterBarRailDivider />
- </Show>
- </>
- )}
- </For>
- <Show
- when={
- inlineFilters().length > 0 &&
- (hasAddableMenuFilters() || hasSavedViews() || hasAuxiliaryControls())
- }
- >
- <FilterBarRailDivider />
- </Show>
- <Show when={hasAddableMenuFilters()}>
- <AddFilterMenu
- filters={menuFilters()}
- showLabel={props.showAddFilterLabel === true}
- />
- </Show>
- <Show when={props.savedViewsKey}>{(key) => <SavedViewsMenu storageKey={key()} />}</Show>
- <Show when={hasClearableState()}>
- <FilterBarRailDivider />
- <FilterBarClearAllButton onClick={clearAll} />
+ <div class="flex flex-wrap items-center gap-x-3 gap-y-2">
+ <Show when={inlineFilters().length > 0}>
+ <div class="flex min-w-0 flex-wrap items-center gap-2">
+ <For each={inlineFilters()}>
+ {(filter, index) => (
+ <>
+ <InlineFilterControl filter={filter} />
+ <Show when={index() < inlineFilters().length - 1}>
+ <FilterBarRailDivider />
+ </Show>
+ </>
+ )}
+ </For>
+ </div>
</Show>
<Show
when={
- (hasAddableMenuFilters() || hasSavedViews() || hasClearableState()) &&
+ hasAddableMenuFilters() ||
+ hasSavedViews() ||
+ hasClearableState() ||
hasAuxiliaryControls()
}
>
- <FilterBarRailDivider />
- </Show>
- <Show when={hasAuxiliaryControls()}>
- <div class="inline-flex flex-shrink-0 flex-wrap items-center gap-2">
+ <div
+ class="ml-auto inline-flex flex-shrink-0 flex-wrap items-center justify-end gap-2"
+ data-filter-action-cluster
+ >
+ <Show when={hasAddableMenuFilters()}>
+ <AddFilterMenu
+ filters={menuFilters()}
+ showLabel={props.showAddFilterLabel === true}
+ />
+ </Show>
+ <Show when={props.savedViewsKey}>
+ {(key) => <SavedViewsMenu storageKey={key()} />}
+ </Show>
+ <Show when={hasClearableState()}>
+ <FilterBarClearAllButton onClick={clearAll} />
+ </Show>
{props.leadingControls}
<Show when={props.viewOptions}>
<ViewOptionsMenu>{props.viewOptions}</ViewOptionsMenu>
diff --git a/frontend-modern/src/components/shared/FilterBar/filterCatalog.ts b/frontend-modern/src/components/shared/FilterBar/filterCatalog.ts
index c32ee80eea..f6cedd72b4 100644
--- a/frontend-modern/src/components/shared/FilterBar/filterCatalog.ts
+++ b/frontend-modern/src/components/shared/FilterBar/filterCatalog.ts
@@ -12,7 +12,6 @@ export interface FilterSelectOption {
visualLabel?: JSX.Element;
icon?: (props: { class?: string }) => JSX.Element;
tone?: FilterButtonGroupOptionTone;
- count?: number;
}
export type FilterGroupKey = 'scope' | 'status' | 'properties';
diff --git a/frontend-modern/src/components/shared/FilterButtonGroup.tsx b/frontend-modern/src/components/shared/FilterButtonGroup.tsx
index 1d033f71a0..22f072812a 100644
--- a/frontend-modern/src/components/shared/FilterButtonGroup.tsx
+++ b/frontend-modern/src/components/shared/FilterButtonGroup.tsx
@@ -52,14 +52,7 @@ export function FilterButtonGroup<T extends string | number>(props: FilterButton
return (
<button
type="button"
- aria-label={
- option.ariaLabel ??
- (option.visualLabel
- ? undefined
- : option.count === undefined
- ? option.label
- : `${option.label}, ${option.count.toLocaleString()}`)
- }
+ aria-label={option.ariaLabel ?? (option.visualLabel ? undefined : option.label)}
title={option.title}
onClick={() => filterButtonGroup.handleOptionClick(option)}
class={getFilterButtonGroupButtonClass(
@@ -90,14 +83,6 @@ export function FilterButtonGroup<T extends string | number>(props: FilterButton
{renderedLabel()}
</span>
</Show>
- <Show when={option.count !== undefined}>
- <span
- class="min-w-4 rounded bg-base/70 px-1 text-center text-[10px] font-semibold tabular-nums text-muted"
- aria-hidden="true"
- >
- {option.count!.toLocaleString()}
- </span>
- </Show>
</button>
);
}}
diff --git a/frontend-modern/src/components/shared/SharedPrimitives.guardrails.test.ts b/frontend-modern/src/components/shared/SharedPrimitives.guardrails.test.ts
index 57bce11dc4..3b0386ba9d 100644
--- a/frontend-modern/src/components/shared/SharedPrimitives.guardrails.test.ts
+++ b/frontend-modern/src/components/shared/SharedPrimitives.guardrails.test.ts
@@ -412,8 +412,8 @@ describe('shared primitive guardrails', () => {
}>;
};
const registeredRule = registry.rules?.find((rule) => rule.id === 'filter-button-group-shell');
- const estateCountsRule = registry.rules?.find(
- (rule) => rule.id === 'platform-estate-inline-counts',
+ const estateSummaryRule = registry.rules?.find(
+ (rule) => rule.id === 'platform-estate-inventory-summary',
);
const registeredGuard = registry.patternGuards?.find(
(guard) => guard.id === 'filter-button-group-local-segmented-control-styles',
@@ -424,13 +424,12 @@ describe('shared primitive guardrails', () => {
expect(registeredRule?.canonical?.path).toBe('src/components/shared/FilterButtonGroup.tsx');
expect(registeredRule?.canonical?.export).toBe('FilterButtonGroup');
- expect(estateCountsRule?.canonical).toEqual({
- path: 'src/components/Workloads/WorkloadsFilter.tsx',
- export: 'WorkloadsFilter',
+ expect(estateSummaryRule?.canonical).toEqual({
+ path: 'src/components/Workloads/WorkloadsInventorySummary.tsx',
+ export: 'WorkloadsInventorySummary',
});
- expect(estateCountsRule?.requiredConsumers?.map((consumer) => consumer.path)).toEqual([
- 'src/features/proxmox/ProxmoxPageSurface.tsx',
- 'src/features/vmware/VmwarePageSurface.tsx',
+ expect(estateSummaryRule?.requiredConsumers?.map((consumer) => consumer.path)).toEqual([
+ 'src/components/Workloads/WorkloadsFilter.tsx',
]);
expect(registeredRule?.requiredConsumers?.map((consumer) => consumer.path)).toEqual([
'src/components/Settings/GeneralSettingsPanel.tsx',
@@ -499,8 +498,8 @@ describe('shared primitive guardrails', () => {
expect(filterButtonGroupModelSource).toContain('getFilterButtonGroupButtonClass');
expect(filterButtonGroupModelSource).toContain('getFilterButtonGroupCompactLabel');
expect(filterButtonGroupModelSource).toContain("option.label.startsWith('All ')");
- expect(filterButtonGroupModelSource).toContain('count?: number');
expect(workloadsFilterSource).toContain('inventoryStats');
+ expect(workloadsFilterSource).toContain('WorkloadsInventorySummary');
expect(workloadsFilterSource).toContain('PLATFORM_ESTATE_COUNTS_STORAGE_KEY');
expect(generalSettingsPanelSource).toContain('FilterButtonGroup');
expect(generalSettingsPanelSource.match(/<FilterButtonGroup/g) ?? []).toHaveLength(4);
diff --git a/frontend-modern/src/components/shared/filterButtonGroupModel.ts b/frontend-modern/src/components/shared/filterButtonGroupModel.ts
index 7df64490b0..1c175a58fa 100644
--- a/frontend-modern/src/components/shared/filterButtonGroupModel.ts
+++ b/frontend-modern/src/components/shared/filterButtonGroupModel.ts
@@ -10,7 +10,6 @@ export interface FilterOption<T extends string | number> {
visualLabel?: JSX.Element;
icon?: (props: { class?: string }) => JSX.Element;
tone?: FilterButtonGroupOptionTone;
- count?: number;
disabled?: boolean;
}
diff --git a/frontend-modern/src/features/proxmox/ProxmoxNodesTable.tsx b/frontend-modern/src/features/proxmox/ProxmoxNodesTable.tsx
index 89fc6cd7d4..378b2fe510 100644
--- a/frontend-modern/src/features/proxmox/ProxmoxNodesTable.tsx
+++ b/frontend-modern/src/features/proxmox/ProxmoxNodesTable.tsx
@@ -254,7 +254,7 @@ export const ProxmoxNodesTable: Component<{
<span class="inline-flex items-center gap-1.5">
Nodes
<Show when={inventoryCountsVisible()}>
- <span class="rounded bg-base/70 px-1.5 text-[10px] tabular-nums text-muted">
+ <span class="font-semibold tabular-nums text-base-content">
{formatPlatformTableIntegerValue(props.nodes.length)}
</span>
</Show>
@@ -274,7 +274,7 @@ export const ProxmoxNodesTable: Component<{
{props.topology!.clusters === 1 ? 'cluster' : 'clusters'}
</Show>
<Show when={props.topology!.clusters > 0 && props.topology!.standalone > 0}>
- {' · '}
+ {' / '}
</Show>
<Show when={props.topology!.standalone > 0}>
{formatPlatformTableIntegerValue(props.topology!.standalone)} standalone
diff --git a/frontend-modern/src/features/proxmox/ProxmoxPageSurface.tsx b/frontend-modern/src/features/proxmox/ProxmoxPageSurface.tsx
index 060b861bf9..02c30006c6 100644
--- a/frontend-modern/src/features/proxmox/ProxmoxPageSurface.tsx
+++ b/frontend-modern/src/features/proxmox/ProxmoxPageSurface.tsx
@@ -335,6 +335,7 @@ function ProxmoxOverview(props: ProxmoxOverviewProps) {
searchEmptyMessage="Recent Proxmox workload searches appear here."
statusOptions={PROXMOX_WORKLOAD_STATUS_OPTIONS}
inventoryStats={workloadsState.inventoryStats}
+ inventoryTopology={estateTopology}
columnVisibility={workloadsState.workloadsFilterColumnVisibility()}
containerRuntimeFilter={workloadsState.containerRuntimeFilterConfig()}
hostFilter={workloadsState.hostFilterConfig()}
diff --git a/frontend-modern/src/features/proxmox/__tests__/ProxmoxPageSurface.contract.test.tsx b/frontend-modern/src/features/proxmox/__tests__/ProxmoxPageSurface.contract.test.tsx
index 5b7c8e836f..d730dfd500 100644
--- a/frontend-modern/src/features/proxmox/__tests__/ProxmoxPageSurface.contract.test.tsx
+++ b/frontend-modern/src/features/proxmox/__tests__/ProxmoxPageSurface.contract.test.tsx
@@ -10,6 +10,10 @@ const mockVersionInfo = vi.hoisted(() => vi.fn());
const mockStorageProps = vi.hoisted(() => vi.fn());
const mockTotalStats = vi.hoisted(() => vi.fn());
const mockNodesTableProps = vi.hoisted(() => vi.fn());
+const mockWorkloadsFilterProps = vi.hoisted(() => vi.fn());
+const mockSurfaceConnected = vi.hoisted(() => vi.fn(() => false));
+const mockSurfaceInitialDataReceived = vi.hoisted(() => vi.fn(() => false));
+const mockAllGuests = vi.hoisted(() => vi.fn((): unknown[] => []));
const makeResource = (resource: Partial<Resource> & Pick<Resource, 'id' | 'type'>): Resource =>
({
@@ -72,7 +76,10 @@ vi.mock('@/components/Storage/Storage', () => ({
}));
vi.mock('@/components/Workloads/WorkloadsFilter', () => ({
- WorkloadsFilter: () => <div data-testid="workloads-filter" />,
+ WorkloadsFilter: (props: { inventoryTopology?: () => unknown }) => {
+ mockWorkloadsFilterProps(props);
+ return <div data-testid="workloads-filter" />;
+ },
}));
vi.mock('@/components/Workloads/WorkloadsSurface', () => ({
@@ -81,9 +88,9 @@ vi.mock('@/components/Workloads/WorkloadsSurface', () => ({
vi.mock('@/components/Workloads/useWorkloadsState', () => ({
useWorkloadsState: () => ({
- surfaceConnected: () => false,
- surfaceInitialDataReceived: () => false,
- allGuests: () => [],
+ surfaceConnected: mockSurfaceConnected,
+ surfaceInitialDataReceived: mockSurfaceInitialDataReceived,
+ allGuests: mockAllGuests,
totalStats: mockTotalStats,
search: () => '',
setSearch: vi.fn(),
@@ -141,6 +148,9 @@ describe('ProxmoxPageSurface contract', () => {
beforeEach(() => {
mockPathname.mockReturnValue('/proxmox/overview');
mockVersionInfo.mockReturnValue(null);
+ mockSurfaceConnected.mockReturnValue(false);
+ mockSurfaceInitialDataReceived.mockReturnValue(false);
+ mockAllGuests.mockReturnValue([]);
mockTotalStats.mockReturnValue({
total: 3,
running: 1,
@@ -237,6 +247,9 @@ describe('ProxmoxPageSurface contract', () => {
});
it('folds estate topology into the existing nodes table header contract', () => {
+ mockSurfaceConnected.mockReturnValue(true);
+ mockSurfaceInitialDataReceived.mockReturnValue(true);
+ mockAllGuests.mockReturnValue([{}]);
setResources([
makeResource({
id: 'agent:pve-1',
@@ -269,6 +282,15 @@ describe('ProxmoxPageSurface contract', () => {
topology: { clusters: 1, nodes: 1, standalone: 0 },
}),
);
+
+ const filterProps = mockWorkloadsFilterProps.mock.calls.at(-1)?.[0] as {
+ inventoryTopology?: () => unknown;
+ };
+ expect(filterProps.inventoryTopology?.()).toEqual({
+ clusters: 1,
+ nodes: 1,
+ standalone: 0,
+ });
});
it('keeps Patrol coverage off the Proxmox overview', () => {