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 hidden capability facet badges

rcourtman42e958e55089
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 3ebfc63aa1..4584e22ae6 100644
--- a/docs/release-control/v6/internal/subsystems/performance-and-scalability.md
+++ b/docs/release-control/v6/internal/subsystems/performance-and-scalability.md
@@ -97,10 +97,11 @@ consumes the shared `frontend-modern/src/utils/resourceChangePresentation.ts`
label helper for canonical change kinds, source types, and adapter provenance
so the chip wording stays consistent without adding extra hot-path branching.
The default table hot path now scopes those summary chips to timeline and
-change-provenance badges only. Generic capability and relationship counts are
-kept out of the main row budget until the underlying data is proven populated,
-which preserves the fleet-table scan path and avoids spending hot-path visual
-budget on model nouns that do not yet clear the product bar.
+change-provenance badges only. Generic capability and relationship badges are
+removed from the default row surface entirely until the underlying data is
+proven populated, which preserves the fleet-table scan path and avoids
+spending hot-path visual budget on model nouns that do not yet clear the
+product bar.
Row summaries now also prefer canonical `facetCounts` on each resource when
they are available, so the hot path can stay within the same budget while
still reading totals from the shared resource contract. The drawer history
diff --git a/docs/release-control/v6/internal/subsystems/unified-resources.md b/docs/release-control/v6/internal/subsystems/unified-resources.md
index ed4ed4fff6..2e6df9f707 100644
--- a/docs/release-control/v6/internal/subsystems/unified-resources.md
+++ b/docs/release-control/v6/internal/subsystems/unified-resources.md
@@ -212,12 +212,13 @@ The frontend now also consumes those facet reads through
`frontend-modern/src/api/resources.ts` and the dedicated resource detail
drawer, which keeps the presentation surface aligned with the governed API
contract instead of rebuilding the graph and timeline inline.
-The shared `ResourceFacetSummary` consumer can now explicitly suppress
-capability and relationship badges, and the canonical table/detail surfaces
-use that narrower mode by default. That keeps the proven monitoring UX
-centered on factual timeline investigation while the richer facet payloads
-remain available as backend and AI-facing foundations instead of being
-presented as first-class product facts before they are fully populated.
+The shared `ResourceFacetSummary` consumer now omits capability and
+relationship badges from the default table/detail surface entirely, while the
+backend contract still preserves those facet fields for governed consumers.
+That keeps the proven monitoring UX centered on factual timeline
+investigation while the richer facet payloads remain available as backend and
+AI-facing foundations instead of being presented as first-class product facts
+before they are fully populated.
That drawer now also uses a shared frontend relationship-presentation helper
for graph labels and provenance wording, so the UI stays aligned with the
canonical relationship semantics instead of keeping drawer-local token
diff --git a/frontend-modern/src/components/Infrastructure/ResourceDetailDrawer.tsx b/frontend-modern/src/components/Infrastructure/ResourceDetailDrawer.tsx
index bc1b7960ad..968c5495e2 100644
--- a/frontend-modern/src/components/Infrastructure/ResourceDetailDrawer.tsx
+++ b/frontend-modern/src/components/Infrastructure/ResourceDetailDrawer.tsx
@@ -878,8 +878,6 @@ const DrawerContent: Component<ResourceDetailDrawerProps> = (props) => {
<ResourceFacetSummary
recentChanges={resourceTimeline()}
counts={resourceFacetCounts()}
- showCapabilities={false}
- showRelationships={false}
/>
</div>
</Show>
@@ -1555,8 +1553,6 @@ const DrawerContent: Component<ResourceDetailDrawerProps> = (props) => {
<ResourceFacetSummary
recentChanges={historyTimeline()}
counts={historyFacetCounts()}
- showCapabilities={false}
- showRelationships={false}
/>
</div>
</Show>
diff --git a/frontend-modern/src/components/Infrastructure/ResourceFacetSummary.tsx b/frontend-modern/src/components/Infrastructure/ResourceFacetSummary.tsx
index 8c83c619ed..3d1281f6c6 100644
--- a/frontend-modern/src/components/Infrastructure/ResourceFacetSummary.tsx
+++ b/frontend-modern/src/components/Infrastructure/ResourceFacetSummary.tsx
@@ -1,10 +1,5 @@
import { For, Show, createMemo, type Component } from 'solid-js';
-import type {
- ResourceCapability,
- ResourceChange,
- ResourceFacetCounts,
- ResourceRelationship,
-} from '@/types/resource';
+import type { ResourceChange, ResourceFacetCounts } from '@/types/resource';
import {
RESOURCE_CHANGE_KIND_ORDER,
RESOURCE_CHANGE_SOURCE_ADAPTER_ORDER,
@@ -21,12 +16,8 @@ type FacetBadge = {
};
export interface ResourceFacetSummaryProps {
- capabilities?: readonly ResourceCapability[] | null;
- relationships?: readonly ResourceRelationship[] | null;
recentChanges?: readonly ResourceChange[] | null;
counts?: ResourceFacetCounts | null;
- showCapabilities?: boolean;
- showRelationships?: boolean;
showTimeline?: boolean;
class?: string;
testId?: string;
@@ -39,37 +30,13 @@ const countLabel = (count: number, singular: string, plural = `${singular}s`) =>
`${count} ${count === 1 ? singular : plural}`;
const buildFacetBadges = (
- capabilities?: readonly ResourceCapability[] | null,
- relationships?: readonly ResourceRelationship[] | null,
recentChanges?: readonly ResourceChange[] | null,
counts?: ResourceFacetCounts | null,
- visibility: { showCapabilities: boolean; showRelationships: boolean; showTimeline: boolean } = {
- showCapabilities: true,
- showRelationships: true,
- showTimeline: true,
- },
+ visibility: { showTimeline: boolean } = { showTimeline: true },
): FacetBadge[] => {
const badges: FacetBadge[] = [];
- const capabilityCount = counts?.capabilities ?? capabilities?.length ?? 0;
- const relationshipCount = counts?.relationships ?? relationships?.length ?? 0;
const changeCount = counts?.recentChanges ?? recentChanges?.length ?? 0;
- if (visibility.showCapabilities && capabilityCount > 0) {
- badges.push({
- label: `Capabilities ${capabilityCount}`,
- title: countLabel(capabilityCount, 'capability'),
- className: `${badgeBase} bg-cyan-100 text-cyan-700 dark:bg-cyan-900 dark:text-cyan-300`,
- });
- }
-
- if (visibility.showRelationships && relationshipCount > 0) {
- badges.push({
- label: `Relationships ${relationshipCount}`,
- title: countLabel(relationshipCount, 'relationship'),
- className: `${badgeBase} bg-indigo-100 text-indigo-700 dark:bg-indigo-900 dark:text-indigo-300`,
- });
- }
-
if (visibility.showTimeline && changeCount > 0) {
badges.push({
label: `Timeline ${changeCount}`,
@@ -133,9 +100,7 @@ const buildFacetBadges = (
export const ResourceFacetSummary: Component<ResourceFacetSummaryProps> = (props) => {
const badges = createMemo(() =>
- buildFacetBadges(props.capabilities, props.relationships, props.recentChanges, props.counts, {
- showCapabilities: props.showCapabilities ?? true,
- showRelationships: props.showRelationships ?? true,
+ buildFacetBadges(props.recentChanges, props.counts, {
showTimeline: props.showTimeline ?? true,
}),
);
diff --git a/frontend-modern/src/components/Infrastructure/UnifiedResourceTable.tsx b/frontend-modern/src/components/Infrastructure/UnifiedResourceTable.tsx
index 191c0a71ad..083124a04c 100644
--- a/frontend-modern/src/components/Infrastructure/UnifiedResourceTable.tsx
+++ b/frontend-modern/src/components/Infrastructure/UnifiedResourceTable.tsx
@@ -685,12 +685,8 @@ export const UnifiedResourceTable: Component<UnifiedResourceTableProps> = (props
</div>
</Show>
<ResourceFacetSummary
- capabilities={resource.capabilities}
- relationships={resource.relationships}
recentChanges={resource.recentChanges}
counts={resource.facetCounts}
- showCapabilities={false}
- showRelationships={false}
class="mt-0.5"
/>
</div>
@@ -1141,12 +1137,8 @@ export const UnifiedResourceTable: Component<UnifiedResourceTableProps> = (props
</span>
</Show>
<ResourceFacetSummary
- capabilities={resource.capabilities}
- relationships={resource.relationships}
recentChanges={resource.recentChanges}
counts={resource.facetCounts}
- showCapabilities={false}
- showRelationships={false}
class="mt-0.5"
/>
</div>
@@ -1452,12 +1444,8 @@ export const UnifiedResourceTable: Component<UnifiedResourceTableProps> = (props
</span>
</Show>
<ResourceFacetSummary
- capabilities={resource.capabilities}
- relationships={resource.relationships}
recentChanges={resource.recentChanges}
counts={resource.facetCounts}
- showCapabilities={false}
- showRelationships={false}
class="mt-0.5"
/>
</div>
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 645008da75..c8a524bd8f 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
@@ -129,26 +129,6 @@ 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
- capabilities={[
- {
- name: 'restart',
- type: 'native',
- description: 'Restart the resource safely.',
- minimumApprovalLevel: 'admin',
- },
- ]}
- relationships={[
- {
- sourceId: 'node:pve-1',
- targetId: 'vm:42',
- type: 'runs_on',
- confidence: 1,
- active: true,
- discoverer: 'proxmox_adapter',
- observedAt: '2026-03-18T12:00:00Z',
- lastSeenAt: '2026-03-18T12:05:00Z',
- },
- ]}
counts={{
capabilities: 1,
relationships: 1,
@@ -168,8 +148,6 @@ describe('UnifiedResourceTable performance contract', () => {
},
}}
recentChanges={[]}
- showCapabilities={false}
- showRelationships={false}
/>
));