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.

Remove frontend resource capability arrays

rcourtmancb201157994a
diff --git a/docs/release-control/v6/internal/subsystems/storage-recovery.md b/docs/release-control/v6/internal/subsystems/storage-recovery.md
index 0a4ba8e17d..8a4a16b2ef 100644
--- a/docs/release-control/v6/internal/subsystems/storage-recovery.md
+++ b/docs/release-control/v6/internal/subsystems/storage-recovery.md
@@ -164,11 +164,11 @@ turning the timeline filter into an arbitrary free-text escape hatch.
The router now wires the tenant resource state provider during initial setup
when a multi-tenant monitor is present, so tenant-scoped storage and recovery
pages do not hit a missing-provider 500 before the monitor is fully wired.
-The shared unified-resource consumer hook now also preserves `capabilities`,
-`relationships`, `recentChanges`, `facetCounts`, `policy`, and `aiSafeSummary`
-fields when storage and recovery surfaces read unified resources, so those
-pages see the same control-plane facets as the dedicated resource drawer
-instead of flattening them away locally.
+The shared unified-resource consumer hook now also preserves `recentChanges`,
+`facetCounts`, `policy`, and `aiSafeSummary` fields when storage and recovery
+surfaces read unified resources, so those pages see the same control-plane
+timeline facets as the dedicated resource drawer instead of flattening them
+away locally.
The same storage-facing runtime paths now also normalize org scope through
`frontend-modern/src/utils/orgScope.ts` before building cache keys or
multi-tenant fetch state, so Dashboard, StorageSummary, and other storage
@@ -734,6 +734,6 @@ publishes. The same hook and the resource-identity helpers it depends on now
share the canonical trimmed-string utility instead of each surface rebuilding
its own whitespace cleanup, so storage and recovery identity checks stay
aligned with the other resource-graph consumers. That same boundary now also
-owns the backend facet-bundle route for capability, relationship, and timeline
-history reads, so storage and recovery surfaces must continue to consume the
-shared bundle rather than issuing separate local resource-detail fetches.
+owns the backend facet-bundle route for timeline history and related change
+counts, so storage and recovery surfaces must continue to consume the shared
+bundle rather than issuing separate local resource-detail fetches.
diff --git a/docs/release-control/v6/internal/subsystems/unified-resources.md b/docs/release-control/v6/internal/subsystems/unified-resources.md
index 454425be6b..ebbb79424c 100644
--- a/docs/release-control/v6/internal/subsystems/unified-resources.md
+++ b/docs/release-control/v6/internal/subsystems/unified-resources.md
@@ -557,9 +557,9 @@ rebuilding resource-change labels locally.
That frontend consumer rule now applies on the canonical decode path too:
`frontend-modern/src/hooks/useUnifiedResources.ts` must preserve backend-owned
-policy metadata and AI-safe summaries as first-class `Resource` fields, and it
-must treat the backend refresh path as the source of truth instead of
-re-normalizing policy strings or AI-safe summaries locally.
+policy metadata, AI-safe summaries, recent changes, and facet counts as
+first-class `Resource` fields, and it must treat the backend refresh path as
+the source of truth instead of re-normalizing those values locally.
Shared infrastructure consumers such as the unified resource table and detail
drawer must present that owned metadata through shared helpers instead of
reconstructing privacy posture from display names, source types, or other
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 4afe1c40c0..ce14767aeb 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
@@ -259,26 +259,6 @@ describe('UnifiedResourceTable performance contract', () => {
backupJobCount: 1,
},
},
- capabilities: [
- {
- name: 'backup',
- type: 'native',
- description: 'Create a backup snapshot',
- minimumApprovalLevel: 'admin',
- },
- ],
- relationships: [
- {
- sourceId: 'pbs-service',
- targetId: 'storage-1',
- type: 'depends_on',
- confidence: 0.88,
- active: true,
- discoverer: 'proxmox_adapter',
- observedAt: new Date().toISOString(),
- lastSeenAt: new Date().toISOString(),
- },
- ],
recentChanges: [
{
id: 'pbs-change-1',
@@ -304,26 +284,6 @@ describe('UnifiedResourceTable performance contract', () => {
nodeCount: 1,
},
},
- capabilities: [
- {
- name: 'thresholds',
- type: 'common',
- description: 'Adjust mail gateway thresholds',
- minimumApprovalLevel: 'dry_run_only',
- },
- ],
- relationships: [
- {
- sourceId: 'pmg-service',
- targetId: 'mail-queue-1',
- type: 'depends_on',
- confidence: 0.9,
- active: true,
- discoverer: 'proxmox_adapter',
- observedAt: new Date().toISOString(),
- lastSeenAt: new Date().toISOString(),
- },
- ],
recentChanges: [
{
id: 'pmg-change-1',
diff --git a/frontend-modern/src/components/Infrastructure/__tests__/UnifiedResourceTable.policy-governance.test.tsx b/frontend-modern/src/components/Infrastructure/__tests__/UnifiedResourceTable.policy-governance.test.tsx
index 70ec0896c2..bee019278f 100644
--- a/frontend-modern/src/components/Infrastructure/__tests__/UnifiedResourceTable.policy-governance.test.tsx
+++ b/frontend-modern/src/components/Infrastructure/__tests__/UnifiedResourceTable.policy-governance.test.tsx
@@ -46,32 +46,6 @@ const resource: Resource = {
redact: ['hostname', 'alias'],
},
},
- capabilities: [
- {
- name: 'restart',
- type: 'native',
- description: 'Restart the host',
- minimumApprovalLevel: 'admin',
- },
- {
- name: 'drain',
- type: 'common',
- description: 'Drain services safely',
- minimumApprovalLevel: 'dry_run_only',
- },
- ],
- relationships: [
- {
- sourceId: 'resource-1',
- targetId: 'storage-1',
- type: 'depends_on',
- confidence: 0.94,
- active: true,
- discoverer: 'proxmox_adapter',
- observedAt: new Date().toISOString(),
- lastSeenAt: new Date().toISOString(),
- },
- ],
recentChanges: [
{
id: 'change-1',
diff --git a/frontend-modern/src/components/Infrastructure/__tests__/UnifiedResourceTable.workloads-link.test.tsx b/frontend-modern/src/components/Infrastructure/__tests__/UnifiedResourceTable.workloads-link.test.tsx
index 2dc65ac209..7b3fdf564c 100644
--- a/frontend-modern/src/components/Infrastructure/__tests__/UnifiedResourceTable.workloads-link.test.tsx
+++ b/frontend-modern/src/components/Infrastructure/__tests__/UnifiedResourceTable.workloads-link.test.tsx
@@ -168,26 +168,6 @@ describe('UnifiedResourceTable workloads links', () => {
backupJobCount: 1,
},
},
- capabilities: [
- {
- name: 'backup',
- type: 'native',
- description: 'Create a backup snapshot',
- minimumApprovalLevel: 'admin',
- },
- ],
- relationships: [
- {
- sourceId: 'pbs-1',
- targetId: 'storage-1',
- type: 'depends_on',
- confidence: 0.88,
- active: true,
- discoverer: 'proxmox_adapter',
- observedAt: new Date().toISOString(),
- lastSeenAt: new Date().toISOString(),
- },
- ],
recentChanges: [
{
id: 'pbs-change-1',
@@ -213,26 +193,6 @@ describe('UnifiedResourceTable workloads links', () => {
nodeCount: 1,
},
},
- capabilities: [
- {
- name: 'thresholds',
- type: 'common',
- description: 'Adjust mail gateway thresholds',
- minimumApprovalLevel: 'dry_run_only',
- },
- ],
- relationships: [
- {
- sourceId: 'pmg-1',
- targetId: 'mail-queue-1',
- type: 'depends_on',
- confidence: 0.9,
- active: true,
- discoverer: 'proxmox_adapter',
- observedAt: new Date().toISOString(),
- lastSeenAt: new Date().toISOString(),
- },
- ],
recentChanges: [
{
id: 'pmg-change-1',
diff --git a/frontend-modern/src/hooks/__tests__/useUnifiedResources.test.ts b/frontend-modern/src/hooks/__tests__/useUnifiedResources.test.ts
index bde8c37f47..652d51c8e4 100644
--- a/frontend-modern/src/hooks/__tests__/useUnifiedResources.test.ts
+++ b/frontend-modern/src/hooks/__tests__/useUnifiedResources.test.ts
@@ -775,27 +775,6 @@ describe('useUnifiedResources', () => {
await flushAsync();
await waitForResourceCount(() => result!.resources().length);
- expect(result!.resources()[0]?.capabilities).toEqual([
- {
- name: 'restart',
- type: 'common',
- description: 'Restart the resource safely.',
- minimumApprovalLevel: 'admin',
- platform: 'proxmox',
- },
- ]);
- expect(result!.resources()[0]?.relationships).toEqual([
- {
- sourceId: 'node:pve-1',
- targetId: 'node-facets',
- type: 'runs_on',
- confidence: 0.98,
- active: true,
- discoverer: 'proxmox_adapter',
- observedAt: '2026-03-18T12:00:00Z',
- lastSeenAt: '2026-03-18T12:05:00Z',
- },
- ]);
expect(result!.resources()[0]?.recentChanges).toEqual([
{
id: 'change-1',
diff --git a/frontend-modern/src/hooks/useUnifiedResources.ts b/frontend-modern/src/hooks/useUnifiedResources.ts
index 9c9b28a5dc..d16160865a 100644
--- a/frontend-modern/src/hooks/useUnifiedResources.ts
+++ b/frontend-modern/src/hooks/useUnifiedResources.ts
@@ -8,7 +8,6 @@ import { asTrimmedString } from '@/utils/stringUtils';
import { getGlobalWebSocketStore } from '@/stores/websocket-global';
import type {
Resource,
- ResourceCapability,
ResourceChange,
ResourceFacetCounts,
ResourceDiscoveryTarget,
@@ -16,7 +15,6 @@ import type {
ResourcePBSMeta,
ResourceStatus,
ResourceStorageMeta,
- ResourceRelationship,
ResourceType,
} from '@/types/resource';
import { normalizeDiskArray } from '@/utils/format';
@@ -303,8 +301,6 @@ type APIResource = {
lastUpdated?: string;
};
kubernetes?: APIKubernetesData;
- capabilities?: ResourceCapability[];
- relationships?: ResourceRelationship[];
recentChanges?: ResourceChange[];
facetCounts?: ResourceFacetCounts;
physicalDisk?: {
@@ -632,8 +628,6 @@ const toResource = (v2: APIResource): Resource => {
canonicalIdentity: v2.canonicalIdentity,
policy: v2.policy as Resource['policy'],
aiSafeSummary: v2.aiSafeSummary as Resource['aiSafeSummary'],
- capabilities: v2.capabilities,
- relationships: v2.relationships,
recentChanges: v2.recentChanges,
facetCounts: v2.facetCounts,
platformData: {
diff --git a/frontend-modern/src/types/resource.ts b/frontend-modern/src/types/resource.ts
index 414dd7e330..5e69266459 100644
--- a/frontend-modern/src/types/resource.ts
+++ b/frontend-modern/src/types/resource.ts
@@ -491,8 +491,6 @@ export interface Resource {
canonicalIdentity?: ResourceCanonicalIdentity;
policy?: ResourcePolicy;
aiSafeSummary?: string;
- capabilities?: ResourceCapability[];
- relationships?: ResourceRelationship[];
recentChanges?: ResourceChange[];
facetCounts?: ResourceFacetCounts;