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
Refocus governed resource labels
rcourtmancfaa75716afa
diff --git a/docs/release-control/v6/internal/subsystems/performance-and-scalability.md b/docs/release-control/v6/internal/subsystems/performance-and-scalability.mdindex 4584e22ae6..671088f0b3 100644--- a/docs/release-control/v6/internal/subsystems/performance-and-scalability.md+++ b/docs/release-control/v6/internal/subsystems/performance-and-scalability.md@@ -117,6 +117,12 @@ Governance metadata such as sensitivity and routing scope may be visible inthe table, but it must remain on the same bounded row-windowing and mounted-rowbudget proved by `UnifiedResourceTable.performance.contract.test.tsx` ratherthan creating a separate unbounded rendering path for policy-rich fleets.+The shared table and detail drawer now also render governed resource labels+through `getResourcePolicyDisplayLabel` and suppress the raw alternate name+when policy requires governed handling. That keeps the policy-aware label path+inside the same hot-row rendering budget instead of adding a second display+branch for redacted fleets, and the proof for that behavior lives in+`UnifiedResourceTable.performance.contract.test.tsx`.The aggregate `/api/charts/workloads-summary` endpoint now also has its ownexplicit API p95 budget constant, aligned with the per-workload charts budget,and `internal/api/slo_bench_test.go` must fail if that aggregate budget or itsdiff --git a/docs/release-control/v6/internal/subsystems/unified-resources.md b/docs/release-control/v6/internal/subsystems/unified-resources.mdindex be64dabffd..b90fd81996 100644--- a/docs/release-control/v6/internal/subsystems/unified-resources.md+++ b/docs/release-control/v6/internal/subsystems/unified-resources.md@@ -272,6 +272,11 @@ The frontend unified-resource hook now trusts backend canonical `policy` and`aiSafeSummary` values directly, so the canonical summary value staysaligned with the same policy-aware contract that governs sensitivity androuting metadata without re-normalizing locally.+The resource detail drawer and unified resource table now also render that+governed display label through the same policy-aware helper, and they suppress+the raw alternate name when policy requires governed handling, so the visible+label stays aligned with the backend redaction boundary instead of+reconstructing a local name fallback.That same contract also owns the canonical resource display-name fallback, soname-or-ID presentation stays consistent between the unified AI adapter, theAI resource context, and the connected-infrastructure / monitored-systemdiff --git a/frontend-modern/src/components/Infrastructure/ResourceDetailDrawer.tsx b/frontend-modern/src/components/Infrastructure/ResourceDetailDrawer.tsxindex 69134bcf18..f9c4e18991 100644--- a/frontend-modern/src/components/Infrastructure/ResourceDetailDrawer.tsx+++ b/frontend-modern/src/components/Infrastructure/ResourceDetailDrawer.tsx@@ -14,7 +14,6 @@ import type {ResourceChangeSourceAdapter,ResourceChangeSourceType,} from '@/types/resource';-import { getDisplayName } from '@/types/resource';import { formatUptime, formatRelativeTime, formatAbsoluteTime } from '@/utils/format';import { StatusDot } from '@/components/shared/StatusDot';import { TagBadges } from '@/components/Dashboard/TagBadges';@@ -55,6 +54,7 @@ import { getServiceHealthPresentation } from '@/utils/serviceHealthPresentation'import { ResourceAPI } from '@/api/resources';import {getResourcePolicyBadges,+ getResourcePolicyDisplayLabel,getResourcePolicyRedactionLabels,getResourceRoutingScopeLabel,getResourceSensitivityLabel,@@ -139,7 +139,7 @@ const DrawerContent: Component<ResourceDetailDrawerProps> = (props) => {const [copied, setCopied] = createSignal(false);const [showReportModal, setShowReportModal] = createSignal(false);- const displayName = createMemo(() => getDisplayName(props.resource));+ const displayName = createMemo(() => getResourcePolicyDisplayLabel(props.resource));const statusIndicator = createMemo(() =>getAgentStatusIndicator({ status: props.resource.status }),);@@ -1706,7 +1706,7 @@ const DrawerContent: Component<ResourceDetailDrawerProps> = (props) => {><PMGInstanceDrawerresourceId={props.resource.id}- resourceName={props.resource.name || props.resource.displayName || props.resource.id}+ resourceName={displayName() || props.resource.id}/></Show></Show>diff --git a/frontend-modern/src/components/Infrastructure/UnifiedResourceTable.tsx b/frontend-modern/src/components/Infrastructure/UnifiedResourceTable.tsxindex 083124a04c..0f6388b7ea 100644--- a/frontend-modern/src/components/Infrastructure/UnifiedResourceTable.tsx+++ b/frontend-modern/src/components/Infrastructure/UnifiedResourceTable.tsx@@ -1,6 +1,6 @@import { Component, For, Show, createEffect, createMemo, createSignal, onCleanup } from 'solid-js';import type { Resource } from '@/types/resource';-import { getDisplayName, getCpuPercent, getMemoryPercent, getDiskPercent } from '@/types/resource';+import { getCpuPercent, getMemoryPercent, getDiskPercent } from '@/types/resource';import { formatBytes, formatUptime, formatSpeed, normalizeDiskArray } from '@/utils/format';import { formatTemperature } from '@/utils/temperature';import { Card } from '@/components/shared/Card';@@ -25,7 +25,11 @@ import {import { useBreakpoint } from '@/hooks/useBreakpoint';import { getAgentStatusIndicator } from '@/utils/status';import { getServiceHealthSummaryPresentation } from '@/utils/serviceHealthPresentation';-import { getResourcePolicyBadges } from '@/utils/resourcePolicyPresentation';+import {+ getResourcePolicyBadges,+ getResourcePolicyDisplayLabel,+ shouldShowResourceAlternateName,+} from '@/utils/resourcePolicyPresentation';import type { Disk } from '@/types/api';import {splitPrimaryAndServiceResources,@@ -120,13 +124,6 @@ const isResourceOnline = (resource: Resource) => {return status !== 'offline' && status !== 'stopped';};-const hasAlternateName = (resource: Resource) => {- if (!resource.displayName || !resource.name) return false;- const display = resource.displayName.trim().toLowerCase();- const name = resource.name.trim().toLowerCase();- return display !== name;-};-const getPBSTableRow = (resource: Resource): PBSTableRow | null => {if (resource.type !== 'pbs') return null;const platformData = resource.platformData as@@ -540,7 +537,7 @@ export const UnifiedResourceTable: Component<UnifiedResourceTableProps> = (propsconst isHighlighted = createMemo(() => props.highlightedResourceId === resource.id,);- const displayName = createMemo(() => getDisplayName(resource));+ const displayName = createMemo(() => getResourcePolicyDisplayLabel(resource));const statusIndicator = createMemo(() =>getAgentStatusIndicator({ status: resource.status }),);@@ -667,7 +664,7 @@ export const UnifiedResourceTable: Component<UnifiedResourceTableProps> = (props>{displayName()}</span>- <Show when={hasAlternateName(resource)}>+ <Show when={shouldShowResourceAlternateName(resource)}><span class="hidden min-w-0 max-w-[28%] shrink truncate text-[9px] text-muted lg:inline">({resource.name})</span>@@ -1039,7 +1036,7 @@ export const UnifiedResourceTable: Component<UnifiedResourceTableProps> = (propsconst isHighlighted = createMemo(() => props.highlightedResourceId === resource.id,);- const displayName = createMemo(() => getDisplayName(resource));+ const displayName = createMemo(() => getResourcePolicyDisplayLabel(resource));const serviceLink = createMemo(() => buildServiceDetailLinks(resource)[0] ?? null,);@@ -1131,7 +1128,7 @@ export const UnifiedResourceTable: Component<UnifiedResourceTableProps> = (props>{displayName()}</span>- <Show when={hasAlternateName(resource)}>+ <Show when={shouldShowResourceAlternateName(resource)}><span class="hidden min-w-0 max-w-[35%] shrink truncate text-[9px] text-muted lg:inline">({resource.name})</span>@@ -1341,7 +1338,7 @@ export const UnifiedResourceTable: Component<UnifiedResourceTableProps> = (propsconst isHighlighted = createMemo(() => props.highlightedResourceId === resource.id,);- const displayName = createMemo(() => getDisplayName(resource));+ const displayName = createMemo(() => getResourcePolicyDisplayLabel(resource));const serviceLink = createMemo(() => buildServiceDetailLinks(resource)[0] ?? null,);@@ -1438,7 +1435,7 @@ export const UnifiedResourceTable: Component<UnifiedResourceTableProps> = (props>{displayName()}</span>- <Show when={hasAlternateName(resource)}>+ <Show when={shouldShowResourceAlternateName(resource)}><span class="hidden min-w-0 max-w-[35%] shrink truncate text-[9px] text-muted lg:inline">({resource.name})</span>diff --git a/frontend-modern/src/components/Infrastructure/__tests__/ResourceDetailDrawer.identity-runtime.test.tsx b/frontend-modern/src/components/Infrastructure/__tests__/ResourceDetailDrawer.identity-runtime.test.tsxindex 25f2874e75..1c1754cc6b 100644--- a/frontend-modern/src/components/Infrastructure/__tests__/ResourceDetailDrawer.identity-runtime.test.tsx+++ b/frontend-modern/src/components/Infrastructure/__tests__/ResourceDetailDrawer.identity-runtime.test.tsx@@ -277,6 +277,10 @@ describe('ResourceDetailDrawer runtime and identity cards', () => {it('surfaces policy governance details and AI-safe summary', () => {const resource = baseResource({+ id: 'sensitive-resource-1',+ name: 'sensitive-host',+ displayName: 'Sensitive Host',+ platformId: 'platform-1',policy: {sensitivity: 'restricted',routing: {@@ -287,18 +291,22 @@ describe('ResourceDetailDrawer runtime and identity cards', () => {aiSafeSummary: 'restricted host summary safe for remote AI consumption',});- const { getAllByText, getByText } = render(() => <ResourceDetailDrawer resource={resource} />);+ const { getAllByText, getByText, queryByText } = render(() => (+ <ResourceDetailDrawer resource={resource} />+ ));expect(getAllByText('Restricted').length).toBeGreaterThan(0);expect(getAllByText('Local Only').length).toBeGreaterThan(0);+ expect(+ getAllByText('restricted host summary safe for remote AI consumption').length,+ ).toBeGreaterThan(0);expect(getByText('Data Governance')).toBeInTheDocument();expect(getByText('Redactions')).toBeInTheDocument();expect(getByText('Hostname')).toBeInTheDocument();expect(getByText('IP Address')).toBeInTheDocument();expect(getByText('AI-Safe Summary')).toBeInTheDocument();- expect(- getByText('restricted host summary safe for remote AI consumption'),- ).toBeInTheDocument();+ expect(queryByText('Sensitive Host')).toBeNull();+ expect(queryByText('sensitive-host')).toBeNull();});it('surfaces canonical AI intelligence for the resource overview', async () => {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.tsxindex 0e87a593c8..c81a93e354 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@@ -334,19 +334,34 @@ describe('UnifiedResourceTable performance contract', () => {describe('Row windowing contracts', () => {it('Profile M: preserves row windowing with policy badge rendering enabled', async () => {- const resources = makeResources(PROFILES.M, (i) => ({- policy: {- sensitivity: i % 2 === 0 ? 'restricted' : 'internal',- routing: {- scope: i % 3 === 0 ? 'local-only' : 'local-first',- redact: ['hostname', 'alias'],- },- },- }));- const { container, getAllByText } = render(() => (+ const resources = makeResources(PROFILES.M, (i) =>+ i === 0+ ? {+ displayName: 'Sensitive Host',+ name: 'sensitive-host',+ aiSafeSummary: 'restricted host summary safe for remote AI consumption',+ policy: {+ sensitivity: 'restricted',+ routing: {+ scope: 'local-only',+ redact: ['hostname', 'alias'],+ },+ },+ }+ : {+ policy: {+ sensitivity: i % 2 === 0 ? 'restricted' : 'internal',+ routing: {+ scope: i % 3 === 0 ? 'local-only' : 'local-first',+ redact: ['hostname', 'alias'],+ },+ },+ },+ );+ const { container, getAllByText, getByTitle, queryByText } = render(() => (<UnifiedResourceTableresources={resources}- expandedResourceId={null}+ expandedResourceId={resources[0]?.id ?? null}onExpandedResourceChange={vi.fn()}groupingMode="flat"/>@@ -363,6 +378,9 @@ describe('UnifiedResourceTable performance contract', () => {await waitFor(() => {expect(getAllByText('Restricted').length).toBeGreaterThan(0);});+ expect(getByTitle('restricted host summary safe for remote AI consumption')).toBeInTheDocument();+ expect(queryByText('Sensitive Host')).toBeNull();+ expect(queryByText('sensitive-host')).toBeNull();});it('Profile M: caps mounted rows when windowing is active', async () => {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.tsxindex 440ff1174b..09424da869 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@@ -29,8 +29,8 @@ vi.mock('@/components/Infrastructure/ResourceDetailDrawer', () => ({const resource: Resource = {id: 'resource-1',type: 'agent',- name: 'host-1',- displayName: 'Host 1',+ name: 'sensitive-host',+ displayName: 'Sensitive Host',platformId: 'platform-1',platformType: 'agent',sourceType: 'agent',@@ -44,6 +44,7 @@ const resource: Resource = {redact: ['hostname', 'alias'],},},+ aiSafeSummary: 'restricted host summary safe for remote AI consumption',recentChanges: [{id: 'change-1',@@ -58,7 +59,7 @@ const resource: Resource = {describe('UnifiedResourceTable governance presentation', () => {it('surfaces canonical policy badges in the resource row', () => {- const { getByText } = render(() => (+ const { getByText, queryByText } = render(() => (<UnifiedResourceTableresources={[resource]}expandedResourceId={null}@@ -69,6 +70,9 @@ describe('UnifiedResourceTable governance presentation', () => {expect(getByText('Restricted')).toBeInTheDocument();expect(getByText('Local Only')).toBeInTheDocument();+ expect(getByText('restricted host summary safe for remote AI consumption')).toBeInTheDocument();+ expect(queryByText('(sensitive-host)')).toBeNull();+ expect(queryByText('Sensitive Host')).toBeNull();});it('surfaces resource facet counts in the resource row', () => {diff --git a/frontend-modern/src/utils/__tests__/resourcePolicyPresentation.test.ts b/frontend-modern/src/utils/__tests__/resourcePolicyPresentation.test.tsindex 4d4a16b697..439807e09f 100644--- a/frontend-modern/src/utils/__tests__/resourcePolicyPresentation.test.ts+++ b/frontend-modern/src/utils/__tests__/resourcePolicyPresentation.test.ts@@ -4,6 +4,7 @@ import {RESOURCE_POLICY_REDACTION_ORDER,RESOURCE_POLICY_ROUTING_ORDER,RESOURCE_POLICY_SENSITIVITY_ORDER,+ getResourcePolicyDisplayLabel,getResourcePolicyRedactionSummaries,getResourcePolicyRoutingSummaries,getResourcePolicySensitivitySummaries,@@ -11,6 +12,7 @@ import {getResourceRedactionHintLabel,getResourceRoutingScopeLabel,getResourceSensitivityLabel,+ shouldShowResourceAlternateName,} from '@/utils/resourcePolicyPresentation';describe('resourcePolicyPresentation utils', () => {@@ -32,6 +34,60 @@ describe('resourcePolicyPresentation utils', () => {).toEqual(['Hostname', 'IP Address']);});+ it('uses the governed aiSafeSummary for redacted resources', () => {+ expect(+ getResourcePolicyDisplayLabel({+ name: 'sensitive-host',+ displayName: 'Sensitive Host',+ policy: {+ sensitivity: 'restricted',+ routing: {+ scope: 'local-only',+ redact: ['hostname', 'ip-address'],+ },+ },+ aiSafeSummary: 'restricted host summary safe for remote AI consumption',+ }),+ ).toBe('restricted host summary safe for remote AI consumption');++ expect(+ getResourcePolicyDisplayLabel({+ name: 'storage-1',+ displayName: 'Storage 1',+ policy: {+ sensitivity: 'sensitive',+ routing: {+ scope: 'local-first',+ redact: ['path'],+ },+ },+ }),+ ).toBe('redacted by policy');+ });++ it('hides raw alternate names when policy requires governed handling', () => {+ expect(+ shouldShowResourceAlternateName({+ name: 'sensitive-host',+ displayName: 'Sensitive Host',+ policy: {+ sensitivity: 'restricted',+ routing: {+ scope: 'local-only',+ redact: ['hostname'],+ },+ },+ }),+ ).toBe(false);++ expect(+ shouldShowResourceAlternateName({+ name: 'host-1',+ displayName: 'Host 1',+ }),+ ).toBe(true);+ });+it('formats canonical policy count summaries', () => {expect(getResourcePolicySensitivitySummaries({diff --git a/frontend-modern/src/utils/resourcePolicyPresentation.ts b/frontend-modern/src/utils/resourcePolicyPresentation.tsindex d9ea2b2e28..1d4c9874f3 100644--- a/frontend-modern/src/utils/resourcePolicyPresentation.ts+++ b/frontend-modern/src/utils/resourcePolicyPresentation.ts@@ -1,4 +1,5 @@import type {+ Resource,ResourcePolicy,ResourceRedactionHint,ResourceRoutingScope,@@ -17,6 +18,11 @@ export type ResourcePolicyCountSummary = {count: number;};+export type ResourcePolicyDisplayResource = Pick<+ Resource,+ 'name' | 'displayName' | 'policy' | 'aiSafeSummary'+>;+export const RESOURCE_POLICY_SENSITIVITY_ORDER: ResourceSensitivity[] = ['public','internal',@@ -164,3 +170,38 @@ export const getResourcePolicyRedactionSummaries = (getResourceRedactionHintLabel,false,);++export const getResourcePolicyDisplayLabel = (+ resource?: ResourcePolicyDisplayResource | null,+): string => {+ if (!resource) return '';++ const summary = resource.aiSafeSummary?.trim() ?? '';+ const policy = resource.policy;+ if (!policy) {+ return resource.displayName?.trim() || resource.name?.trim() || '';+ }+ const requiresGovernedDisplay =+ (policy.routing.scope === 'local-only' || (policy.routing.redact?.length ?? 0) > 0);++ if (requiresGovernedDisplay) {+ return summary || 'redacted by policy';+ }++ return resource.displayName?.trim() || resource.name?.trim() || '';+};++export const shouldShowResourceAlternateName = (+ resource?: ResourcePolicyDisplayResource | null,+): boolean => {+ if (!resource?.displayName || !resource.name) return false;++ if (+ resource.policy &&+ (resource.policy.routing.scope === 'local-only' || (resource.policy.routing.redact?.length ?? 0) > 0)+ ) {+ return false;+ }++ return resource.displayName.trim().toLowerCase() !== resource.name.trim().toLowerCase();+};