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.

Polish dashboard problem resource wording

rcourtman8fa84b7ad1d8
diff --git a/docs/release-control/v6/internal/subsystems/frontend-primitives.md b/docs/release-control/v6/internal/subsystems/frontend-primitives.md
index 570099b746..0e01a0afc3 100644
--- a/docs/release-control/v6/internal/subsystems/frontend-primitives.md
+++ b/docs/release-control/v6/internal/subsystems/frontend-primitives.md
@@ -178,6 +178,10 @@ work extends shared components instead of creating new local variants.
icon components may keep their standalone labels, but the nav must treat
those icons as decorative inside tab buttons so names come from the tab
label plus meaningful badge counts, not duplicated icon titles.
+ Dashboard overview primitives under `frontend-modern/src/features/` must keep
+ grouped resource labels operator-readable: count-led labels may aggregate
+ repeated resources, but uncountable or category-like resource types such as
+ storage must use resource wording instead of naive pluralization.
2. Route new top-level settings surfaces through the canonical settings shell
instead of introducing page-local framing.
Shared shells and primitives that need websocket or dark-mode context must
@@ -1772,6 +1776,10 @@ may collapse only when they share the same governed display label, resource
type, and problem signal; the header count and Pulse Brief counts must continue
to represent the underlying affected resources, and grouped links must route to
the broad owning surface rather than inventing a synthetic resource target.
+Pulse Brief problem-resource wording must not amplify generic status-shaped
+names such as `storage (offline)` into first-viewport prose; when the resource
+name is only a type plus status, the brief should summarize the type-level issue
+in operator language instead of repeating raw backend-shaped labels.
That same dashboard overview boundary must consume the governed Patrol finding
presentation helpers when it surfaces Patrol findings in compact form. In
`frontend-modern/src/features/dashboardOverview/ActionRequiredPanel.tsx`,
diff --git a/docs/release-control/v6/internal/subsystems/registry.json b/docs/release-control/v6/internal/subsystems/registry.json
index 690f999259..0273188ede 100644
--- a/docs/release-control/v6/internal/subsystems/registry.json
+++ b/docs/release-control/v6/internal/subsystems/registry.json
@@ -2963,12 +2963,15 @@
"frontend-modern/src/components/Toast/Toast.tsx",
"frontend-modern/src/features/dashboardOverview/ActionRequiredPanel.tsx",
"frontend-modern/src/features/dashboardOverview/DashboardCustomizer.tsx",
+ "frontend-modern/src/features/dashboardOverview/dashboardPulseBriefModel.ts",
"frontend-modern/src/features/dashboardOverview/estateSummaryModel.ts",
"frontend-modern/src/features/dashboardOverview/EstateSummaryPanel.tsx",
"frontend-modern/src/features/dashboardOverview/index.ts",
"frontend-modern/src/features/dashboardOverview/KPIStrip.tsx",
"frontend-modern/src/features/dashboardOverview/ProblemResourcesTable.tsx",
+ "frontend-modern/src/features/dashboardOverview/PulseBriefPanel.tsx",
"frontend-modern/src/features/dashboardOverview/TrendCharts.tsx",
+ "frontend-modern/src/features/dashboardOverview/useDashboardPulseBrief.ts",
"frontend-modern/src/hooks/createNonSuspendingQuery.ts",
"frontend-modern/src/index.css",
"frontend-modern/src/pages/Operations.tsx",
@@ -3368,17 +3371,21 @@
"match_files": [
"frontend-modern/src/features/dashboardOverview/ActionRequiredPanel.tsx",
"frontend-modern/src/features/dashboardOverview/DashboardCustomizer.tsx",
+ "frontend-modern/src/features/dashboardOverview/dashboardPulseBriefModel.ts",
"frontend-modern/src/features/dashboardOverview/estateSummaryModel.ts",
"frontend-modern/src/features/dashboardOverview/EstateSummaryPanel.tsx",
"frontend-modern/src/features/dashboardOverview/index.ts",
"frontend-modern/src/features/dashboardOverview/KPIStrip.tsx",
"frontend-modern/src/features/dashboardOverview/ProblemResourcesTable.tsx",
+ "frontend-modern/src/features/dashboardOverview/PulseBriefPanel.tsx",
"frontend-modern/src/features/dashboardOverview/TrendCharts.tsx",
+ "frontend-modern/src/features/dashboardOverview/useDashboardPulseBrief.ts",
"frontend-modern/src/utils/problemResourcePresentation.ts"
],
"allow_same_subsystem_tests": false,
"test_prefixes": [],
"exact_files": [
+ "frontend-modern/src/features/dashboardOverview/__tests__/dashboardPulseBriefModel.test.ts",
"frontend-modern/src/features/dashboardOverview/__tests__/KPIStrip.test.tsx",
"frontend-modern/src/features/dashboardOverview/__tests__/ProblemResourcesTable.test.tsx",
"frontend-modern/src/features/dashboardOverview/__tests__/TrendCharts.test.tsx",
diff --git a/frontend-modern/src/features/dashboardOverview/ProblemResourcesTable.tsx b/frontend-modern/src/features/dashboardOverview/ProblemResourcesTable.tsx
index ec68c45bba..b89c0c90fc 100644
--- a/frontend-modern/src/features/dashboardOverview/ProblemResourcesTable.tsx
+++ b/frontend-modern/src/features/dashboardOverview/ProblemResourcesTable.tsx
@@ -107,6 +107,7 @@ function groupedResourceLink(group: ProblemResourceGroup): string {
function pluralizeTypeLabel(count: number, label: string): string {
const normalized = (label || 'resource').trim().toLowerCase();
if (count === 1) return normalized;
+ if (normalized === 'storage') return 'storage resources';
if (normalized.endsWith('s')) return normalized;
if (normalized.endsWith('y')) return `${normalized.slice(0, -1)}ies`;
return `${normalized}s`;
diff --git a/frontend-modern/src/features/dashboardOverview/__tests__/ProblemResourcesTable.test.tsx b/frontend-modern/src/features/dashboardOverview/__tests__/ProblemResourcesTable.test.tsx
index 34756fbec3..f200140043 100644
--- a/frontend-modern/src/features/dashboardOverview/__tests__/ProblemResourcesTable.test.tsx
+++ b/frontend-modern/src/features/dashboardOverview/__tests__/ProblemResourcesTable.test.tsx
@@ -110,9 +110,9 @@ describe('ProblemResourcesTable', () => {
/>
));
- // Two storages with the same displayName group together; the primary
- // reads "2 storages" instead of collapsing to "storage".
- expect(screen.getByText('2 storages')).toBeInTheDocument();
+ // Storage groups use resource wording instead of the awkward "storages".
+ expect(screen.getByText('2 storage resources')).toBeInTheDocument();
+ expect(screen.queryByText('2 storages')).toBeNull();
});
it('renders governed labels for policy-aware problem resources', () => {
diff --git a/frontend-modern/src/features/dashboardOverview/__tests__/dashboardPulseBriefModel.test.ts b/frontend-modern/src/features/dashboardOverview/__tests__/dashboardPulseBriefModel.test.ts
index fd34b2104e..d066988469 100644
--- a/frontend-modern/src/features/dashboardOverview/__tests__/dashboardPulseBriefModel.test.ts
+++ b/frontend-modern/src/features/dashboardOverview/__tests__/dashboardPulseBriefModel.test.ts
@@ -122,7 +122,7 @@ describe('dashboard Pulse Brief model', () => {
]);
});
- it('does not duplicate a problem reason that is already in the resource name', () => {
+ it('normalizes generic status-shaped problem resource names', () => {
const brief = buildDashboardPulseBrief({
estate: estate({ headline: '1 system needs attention', attentionSystems: 1 }),
overview: overview({
@@ -146,7 +146,8 @@ describe('dashboard Pulse Brief model', () => {
patrolFindingCount: 0,
});
- expect(brief.body).toContain('Review storage (offline) first');
+ expect(brief.body).toContain('Review the storage issue first');
+ expect(brief.body).not.toContain('Review storage (offline) first');
expect(brief.body).not.toContain('storage (offline) (Offline)');
});
});
diff --git a/frontend-modern/src/features/dashboardOverview/dashboardPulseBriefModel.ts b/frontend-modern/src/features/dashboardOverview/dashboardPulseBriefModel.ts
index d903e6d99b..1184a886a8 100644
--- a/frontend-modern/src/features/dashboardOverview/dashboardPulseBriefModel.ts
+++ b/frontend-modern/src/features/dashboardOverview/dashboardPulseBriefModel.ts
@@ -1,6 +1,7 @@
import type { DashboardRecoverySummary } from '@/hooks/useDashboardRecovery';
import type { DashboardOverview, ProblemResource } from '@/hooks/useDashboardOverview';
import { getPreferredResourceDisplayName } from '@/utils/resourceIdentity';
+import { getResourceTypeLabel } from '@/utils/resourceTypePresentation';
import type { DashboardEstateSummary } from './estateSummaryModel';
export type DashboardPulseBriefTone = 'healthy' | 'attention' | 'critical';
@@ -42,12 +43,34 @@ function problemResourceLabel(problem: ProblemResource | undefined): string | nu
const name = getPreferredResourceDisplayName(problem.resource).trim();
if (!name) return null;
const normalizedName = name.toLowerCase();
+ const typeLabel = getResourceTypeLabel(problem.resource.type)?.trim();
+ const typeNoun =
+ typeLabel && typeLabel === typeLabel.toUpperCase() ? typeLabel : typeLabel?.toLowerCase();
+ const normalizedTypeLabel = typeLabel?.toLowerCase();
+ const normalizedRawType = problem.resource.type.trim().toLowerCase().replace(/[-_]+/g, ' ');
+ const genericStatusNames = new Set(
+ [normalizedTypeLabel, normalizedRawType]
+ .filter((value): value is string => Boolean(value))
+ .flatMap((value) => [
+ value,
+ ...problem.problems.map((reason) => `${value} (${reason.toLowerCase()})`),
+ ]),
+ );
+ const displayName =
+ typeNoun && genericStatusNames.has(normalizedName) ? `the ${typeNoun} issue` : name;
+ const normalizedDisplayName = displayName.toLowerCase();
const reasons = problem.problems
- .filter((reason) => !normalizedName.includes(reason.toLowerCase()))
+ .filter((reason) => {
+ const normalizedReason = reason.toLowerCase();
+ return (
+ !normalizedName.includes(normalizedReason) &&
+ !normalizedDisplayName.includes(normalizedReason)
+ );
+ })
.slice(0, 2)
.join(', ')
.trim();
- return reasons ? `${name} (${reasons})` : name;
+ return reasons ? `${displayName} (${reasons})` : displayName;
}
function buildAttentionParts(input: DashboardPulseBriefInput): string[] {
diff --git a/scripts/release_control/subsystem_lookup_test.py b/scripts/release_control/subsystem_lookup_test.py
index ef6c3119c2..09da9a8272 100644
--- a/scripts/release_control/subsystem_lookup_test.py
+++ b/scripts/release_control/subsystem_lookup_test.py
@@ -806,6 +806,7 @@ class SubsystemLookupTest(unittest.TestCase):
"frontend-modern/src/features/dashboardOverview/__tests__/KPIStrip.test.tsx",
"frontend-modern/src/features/dashboardOverview/__tests__/ProblemResourcesTable.test.tsx",
"frontend-modern/src/features/dashboardOverview/__tests__/TrendCharts.test.tsx",
+ "frontend-modern/src/features/dashboardOverview/__tests__/dashboardPulseBriefModel.test.ts",
"frontend-modern/src/pages/__tests__/DashboardPage.test.tsx",
"frontend-modern/src/utils/__tests__/frontendResourceTypeBoundaries.test.ts",
"frontend-modern/src/utils/__tests__/problemResourcePresentation.test.ts",