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.

Narrow frontend facet counts

rcourtmana4b95bef9277
diff --git a/docs/release-control/v6/internal/subsystems/unified-resources.md b/docs/release-control/v6/internal/subsystems/unified-resources.md
index caf4504a90..454425be6b 100644
--- a/docs/release-control/v6/internal/subsystems/unified-resources.md
+++ b/docs/release-control/v6/internal/subsystems/unified-resources.md
@@ -347,27 +347,21 @@ The infrastructure table, selector, and detail-mapper frontend consumers are
now governed as explicit shared boundaries with the performance lane rather
than implicit downstream usage. That means future fleet-scale table changes
must preserve both canonical unified-resource semantics and the table
-performance proof route. The shared resource table now also surfaces compact
-facet summary chips for capabilities, relationships, and timeline events, so
-facet presentation changes must continue to flow through the same governed
-resource-row surface rather than inventing a separate ad hoc summary path.
-Those row summaries now prefer canonical `facetCounts` on the resource object
-when available, so the backend list/read shapes remain the source of truth
-instead of forcing the frontend to infer totals only from loaded slices.
-Those chips now appear on both the primary fleet rows and the PBS/PMG service
-rows, so the unified consumer surface must remain consistent across the full
-table instead of diverging by resource class. The same facet summary now also
-appears in the resource drawer's runtime overview card through a shared
-`ResourceFacetSummary` component, so table and detail views stay aligned on a
-single canonical rendering path for the resource graph counts. The drawer now
-fetches those facets through one backend bundle endpoint, and that shared
-facet bundle preserves backend counts for capabilities, relationships, and the
+performance proof route. The shared resource table and resource drawer now
+surface compact timeline summary chips, so facet presentation changes must
+continue to flow through the same governed resource-row surface rather than
+inventing a separate ad hoc summary path. Those row summaries now prefer
+canonical `facetCounts` on the resource object when available, so the backend
+list/read shapes remain the source of truth instead of forcing the frontend to
+infer totals only from loaded slices. The drawer now fetches those facets
+through one backend bundle endpoint, and that shared facet bundle preserves
+backend counts for the hidden capability and relationship model alongside the
timeline slice so the overview card and history summary can report the total
facet history instead of collapsing to the currently loaded page when the
-timeline endpoint is paginated. Relationship and timeline references in that
-drawer now route through the canonical infrastructure resource filter, so the
-resource graph remains navigable from the history surface instead of being
-purely descriptive text.
+timeline endpoint is paginated. Timeline references in that drawer now route
+through the canonical infrastructure resource filter, so the resource history
+remains navigable from the history surface instead of being purely
+descriptive text.
`ResourceFacetSummary` now consumes the shared
`frontend-modern/src/utils/resourceChangePresentation.ts` label helper for
canonical change kinds, source types, and adapter provenance, so the chip
diff --git a/frontend-modern/src/api/__tests__/resources.test.ts b/frontend-modern/src/api/__tests__/resources.test.ts
index f46a67fdce..2368dfc756 100644
--- a/frontend-modern/src/api/__tests__/resources.test.ts
+++ b/frontend-modern/src/api/__tests__/resources.test.ts
@@ -16,8 +16,6 @@ describe('ResourceAPI', () => {
resourceId: 'vm:42',
recentChanges: [{ id: 'change-1' }],
counts: {
- capabilities: 1,
- relationships: 1,
recentChanges: 3,
recentChangeKinds: {
metric_anomaly: 2,
@@ -52,8 +50,6 @@ describe('ResourceAPI', () => {
resourceId: 'vm:42',
recentChanges: [{ id: 'change-1' }],
counts: {
- capabilities: 1,
- relationships: 1,
recentChanges: 3,
recentChangeKinds: {
metric_anomaly: 2,
@@ -70,8 +66,6 @@ describe('ResourceAPI', () => {
},
});
expect(result.counts).toStrictEqual({
- capabilities: 1,
- relationships: 1,
recentChanges: 3,
recentChangeKinds: {
metric_anomaly: 2,
diff --git a/frontend-modern/src/components/Infrastructure/__tests__/ResourceDetailDrawer.history.test.tsx b/frontend-modern/src/components/Infrastructure/__tests__/ResourceDetailDrawer.history.test.tsx
index 9f05815ecf..c84fe777d3 100644
--- a/frontend-modern/src/components/Infrastructure/__tests__/ResourceDetailDrawer.history.test.tsx
+++ b/frontend-modern/src/components/Infrastructure/__tests__/ResourceDetailDrawer.history.test.tsx
@@ -124,8 +124,6 @@ describe('ResourceDetailDrawer history tab', () => {
},
],
counts: {
- capabilities: 1,
- relationships: 1,
recentChanges: 3,
recentChangeKinds: {
restart: 2,
@@ -224,8 +222,6 @@ describe('ResourceDetailDrawer history tab', () => {
},
],
counts: {
- capabilities: 1,
- relationships: 1,
recentChanges: 3,
recentChangeKinds: {
restart: 2,
@@ -331,8 +327,6 @@ describe('ResourceDetailDrawer history tab', () => {
},
],
counts: {
- capabilities: 1,
- relationships: 1,
recentChanges: 2,
recentChangeKinds: {
restart: 1,
@@ -373,8 +367,6 @@ describe('ResourceDetailDrawer history tab', () => {
},
],
counts: {
- capabilities: 1,
- relationships: 1,
recentChanges: 1,
},
};
@@ -471,8 +463,6 @@ describe('ResourceDetailDrawer history tab', () => {
},
],
counts: {
- capabilities: 1,
- relationships: 1,
recentChanges: 2,
recentChangeKinds: {
restart: 1,
@@ -522,8 +512,6 @@ describe('ResourceDetailDrawer history tab', () => {
},
],
counts: {
- capabilities: 1,
- relationships: 1,
recentChanges: 1,
recentChangeKinds: {
metric_anomaly: 1,
diff --git a/frontend-modern/src/components/Infrastructure/__tests__/UnifiedResourceTable.performance.contract.test.tsx b/frontend-modern/src/components/Infrastructure/__tests__/UnifiedResourceTable.performance.contract.test.tsx
index c8a524bd8f..4afe1c40c0 100644
--- a/frontend-modern/src/components/Infrastructure/__tests__/UnifiedResourceTable.performance.contract.test.tsx
+++ b/frontend-modern/src/components/Infrastructure/__tests__/UnifiedResourceTable.performance.contract.test.tsx
@@ -128,13 +128,11 @@ describe('UnifiedResourceTable performance contract', () => {
it('renders the shared facet summary component in timeline-only mode for canonical resource counts', async () => {
const { getByText, queryByText } = render(() => (
- <ResourceFacetSummary
- counts={{
- capabilities: 1,
- relationships: 1,
- recentChanges: 3,
- recentChangeKinds: {
- restart: 2,
+ <ResourceFacetSummary
+ counts={{
+ recentChanges: 3,
+ recentChangeKinds: {
+ restart: 2,
config_update: 1,
metric_anomaly: 1,
},
@@ -205,8 +203,6 @@ describe('UnifiedResourceTable performance contract', () => {
},
],
facetCounts: {
- capabilities: 1,
- relationships: 1,
recentChanges: 3,
recentChangeKinds: {
restart: 2,
diff --git a/frontend-modern/src/hooks/__tests__/useUnifiedResources.test.ts b/frontend-modern/src/hooks/__tests__/useUnifiedResources.test.ts
index 92e25cd786..bde8c37f47 100644
--- a/frontend-modern/src/hooks/__tests__/useUnifiedResources.test.ts
+++ b/frontend-modern/src/hooks/__tests__/useUnifiedResources.test.ts
@@ -758,8 +758,6 @@ describe('useUnifiedResources', () => {
},
],
facetCounts: {
- capabilities: 1,
- relationships: 1,
recentChanges: 1,
},
},
@@ -812,8 +810,6 @@ describe('useUnifiedResources', () => {
},
]);
expect(result!.resources()[0]?.facetCounts).toEqual({
- capabilities: 1,
- relationships: 1,
recentChanges: 1,
});
diff --git a/frontend-modern/src/types/resource.ts b/frontend-modern/src/types/resource.ts
index 3d95047861..414dd7e330 100644
--- a/frontend-modern/src/types/resource.ts
+++ b/frontend-modern/src/types/resource.ts
@@ -194,8 +194,6 @@ export interface ResourceCapability {
}
export interface ResourceFacetCounts {
- capabilities: number;
- relationships: number;
recentChanges: number;
recentChangeKinds?: Partial<Record<ResourceChangeKind, number>>;
recentChangeSourceTypes?: Partial<Record<ResourceChangeSourceType, number>>;