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.

Unify remaining grouped table bands

rcourtmanabe7515fd37d
diff --git a/docs/release-control/v6/internal/subsystems/alerts.md b/docs/release-control/v6/internal/subsystems/alerts.md
index 5b233b896d..2b64d1882f 100644
--- a/docs/release-control/v6/internal/subsystems/alerts.md
+++ b/docs/release-control/v6/internal/subsystems/alerts.md
@@ -217,6 +217,13 @@ Future alert configuration or history presentation work should
extend those helpers instead of rebuilding alert-specific semantics in pages,
dashboard surfaces, feature hooks, or thresholds shells.
+Alert history and threshold resource tables also inherit the shared product
+table subgroup-row contract. `AlertHistoryTableGroupRow` and grouped rows in
+`AlertResourceTableDesktop` must route their date/resource group bands through
+`frontend-modern/src/components/shared/groupedTableRowPresentation.ts` instead
+of local `bg-surface-alt` fills, so alert subgroup hierarchy stays visually
+consistent with Infrastructure, Workloads, Storage, and Recovery tables.
+
The alert webhook service chooser also now derives its service set from the
backend webhook template registry, rather than keeping a second frontend-only
list of services, labels, descriptions, and mention-copy metadata.
diff --git a/docs/release-control/v6/internal/subsystems/frontend-primitives.md b/docs/release-control/v6/internal/subsystems/frontend-primitives.md
index 91945ec7d4..508f4800e7 100644
--- a/docs/release-control/v6/internal/subsystems/frontend-primitives.md
+++ b/docs/release-control/v6/internal/subsystems/frontend-primitives.md
@@ -176,6 +176,13 @@ work extends shared components instead of creating new local variants.
product-table frame, section header band, and light/dark border treatment
belong to frontend primitives so Infrastructure, Workloads, Storage, and
Recovery do not drift visually.
+ Product-table subgroup/header rows must likewise consume the shared
+ `frontend-modern/src/components/shared/groupedTableRowPresentation.ts`
+ helper and `.grouped-table-row` CSS token contract instead of local
+ `bg-surface-alt` or page-specific hover fills. This applies to grouped
+ rows across Infrastructure, Workloads, Storage, Recovery, alert history,
+ and alert threshold tables; feature owners may own group content and
+ behavior, but not duplicate the subgroup band styling.
Shared monitored-system warning primitives under that path must stay compact
app-shell pointers into the owned Pulse Pro billing surface. The shared
banner may announce posture and route to the relevant billing tab, but
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 a11bce2fc6..48042872d0 100644
--- a/docs/release-control/v6/internal/subsystems/performance-and-scalability.md
+++ b/docs/release-control/v6/internal/subsystems/performance-and-scalability.md
@@ -202,6 +202,11 @@ regression protection.
23. Extend grouped dashboard row windowing, reveal-index clamping, overscan math, and per-group visible-slice derivation through `frontend-modern/src/components/Dashboard/useGroupedTableWindowing.ts`, and extend viewport event wiring through `frontend-modern/src/components/Dashboard/useDashboardWorkloadViewportSync.ts` rather than rebuilding scroll handlers, mounted-row budgets, viewport listeners, or group-slice math inside `frontend-modern/src/components/Dashboard/useDashboardWorkloadDerivedState.ts`
24. Extend dashboard shell rendering through `frontend-modern/src/components/Dashboard/DashboardStateCards.tsx`, `frontend-modern/src/components/Dashboard/DashboardWorkloadTable.tsx`, and `frontend-modern/src/components/Dashboard/DashboardStatsStrip.tsx` rather than accreting loading cards, workload table markup, or stats-strip presentation back into `frontend-modern/src/components/Dashboard/Dashboard.tsx`
25. Extend dashboard workload table shell ownership through `frontend-modern/src/components/Dashboard/WorkloadTableHeader.tsx` and `frontend-modern/src/components/Dashboard/WorkloadPanel.tsx` rather than rebuilding sortable header markup, grouped node rows, row expansion, or guest-drawer rendering inside `frontend-modern/src/components/Dashboard/DashboardWorkloadTable.tsx`
+ Compact icon headers inside `WorkloadTableHeader.tsx` may stay visually
+ dense for responsive workload tables, but the icon must be decorative and
+ the column label must remain present through an `sr-only` label so the
+ header row exposes names such as Uptime, Image, Context, and Node instead
+ of collapsing to only the visible text columns.
26. Keep long-range workload chart capping time-proportional across `frontend-modern/src/components/Workloads/WorkloadsSummary.tsx`, `frontend-modern/src/api/charts.ts`, and `internal/api/router.go`: when the workload hot path caps mixed-cadence history for top cards, it must bucket by time window rather than raw point index so 7-day and 30-day workload cards stay visually even without relaxing the protected payload budget.
27. Keep summary hover/focus and sticky-card behavior on shared hot paths: infrastructure, workloads, and storage summary shells must reuse one page/group/entity scope model plus `frontend-modern/src/components/shared/StickySummarySection.tsx` inside the app scroll shell instead of per-page scroll listeners or per-card hover derivations, so row scrubbing highlights all cards, workload group headers, infrastructure cluster headers, and storage pool-group headers scope the summary coherently, pinned group focus remains route-backed and reversible, and the hot path does not multiply render or scroll work. That hot path stays row-first rather than adding fallback chrome: the on-screen row or group header is the scoped state, and any explicit reset belongs to one compact shared table-header action plus the shared `Escape` path, not to page-level scope strips, search-row widgets, or filter-bar badges. Background whitespace clearing may exist as a convenience, but the hot path must not depend on brittle dead-space hit testing as the only reversible control. The same hot path must therefore keep one page-level reset owner for filters plus pinned summary selections, and it must keep chart-backed summary-card geometry explicit and stable so hover rerenders, synchronized readouts, or idle header metadata cannot feed layout loops that grow or shrink the top cards over time. Recovery’s summary rail is not part of this interactive hot path; it may share summary-card framing, but it must remain non-interactive until a separately governed model says otherwise.
The input path for that hot summary contract must stay shared too:
diff --git a/frontend-modern/src/components/Alerts/AlertResourceTableDesktop.tsx b/frontend-modern/src/components/Alerts/AlertResourceTableDesktop.tsx
index 81458ff950..7dae2aba8d 100644
--- a/frontend-modern/src/components/Alerts/AlertResourceTableDesktop.tsx
+++ b/frontend-modern/src/components/Alerts/AlertResourceTableDesktop.tsx
@@ -13,6 +13,7 @@ import {
} from '@/components/shared/Table';
import { SectionHeader } from '@/components/shared/SectionHeader';
import { HelpIcon } from '@/components/shared/HelpIcon';
+import { getGroupedTableRowClass } from '@/components/shared/groupedTableRowPresentation';
import { AlertResourceTableRow } from './AlertResourceTableRow';
import { AlertResourceGroupHeader } from './AlertResourceGroupHeader';
import {
@@ -441,7 +442,7 @@ export function AlertResourceTableDesktop(props: AlertResourceTableDesktopProps)
>
{([nodeName, resources]) => (
<>
- <TableRow class="bg-surface-alt">
+ <TableRow class={getGroupedTableRowClass()}>
<TableCell
colspan={totalColumnCount()}
class="p-1 px-2 text-xs font-medium text-muted"
diff --git a/frontend-modern/src/components/Dashboard/WorkloadTableHeader.tsx b/frontend-modern/src/components/Dashboard/WorkloadTableHeader.tsx
index cc8d01129c..a9d7d91624 100644
--- a/frontend-modern/src/components/Dashboard/WorkloadTableHeader.tsx
+++ b/frontend-modern/src/components/Dashboard/WorkloadTableHeader.tsx
@@ -46,7 +46,16 @@ export function WorkloadTableHeader(props: WorkloadTableHeaderProps) {
<div
class={`flex min-h-[14px] items-center gap-0.5 ${isFirst() ? 'justify-start' : 'justify-center'}`}
>
- {col.icon ? <span class="flex items-center">{col.icon}</span> : col.label}
+ {col.icon ? (
+ <>
+ <span class="flex items-center" aria-hidden="true">
+ {col.icon}
+ </span>
+ <span class="sr-only">{col.label}</span>
+ </>
+ ) : (
+ col.label
+ )}
{isSorted() && (props.sortDirection() === 'asc' ? ' ▲' : ' ▼')}
</div>
</TableHead>
diff --git a/frontend-modern/src/components/Dashboard/__tests__/Dashboard.performance.contract.test.tsx b/frontend-modern/src/components/Dashboard/__tests__/Dashboard.performance.contract.test.tsx
index 1b28403428..385fff15e6 100644
--- a/frontend-modern/src/components/Dashboard/__tests__/Dashboard.performance.contract.test.tsx
+++ b/frontend-modern/src/components/Dashboard/__tests__/Dashboard.performance.contract.test.tsx
@@ -975,6 +975,8 @@ describe('Dashboard performance contract', () => {
expect(workloadTableHeaderSource).toContain('style={getGuestColumnStyle(');
expect(workloadTableHeaderSource).toContain('props.workloadTableLayoutMode()');
expect(workloadTableHeaderSource).toContain('props.workloadTableVisibleColumnIds()');
+ expect(workloadTableHeaderSource).toContain('aria-hidden="true"');
+ expect(workloadTableHeaderSource).toContain('<span class="sr-only">{col.label}</span>');
expect(workloadTableHeaderSource).not.toContain('style={{');
expect(workloadTableHeaderSource).not.toContain('NodeGroupHeader');
expect(workloadPanelSource).toContain('NodeGroupHeader');
diff --git a/frontend-modern/src/components/shared/SharedPrimitives.guardrails.test.ts b/frontend-modern/src/components/shared/SharedPrimitives.guardrails.test.ts
index e4485b1573..4702752278 100644
--- a/frontend-modern/src/components/shared/SharedPrimitives.guardrails.test.ts
+++ b/frontend-modern/src/components/shared/SharedPrimitives.guardrails.test.ts
@@ -135,6 +135,8 @@ import recoveryComponentSource from '@/components/Recovery/Recovery.tsx?raw';
import recoveryHistorySectionSource from '@/components/Recovery/RecoveryHistorySection.tsx?raw';
import recoveryProtectedInventorySectionSource from '@/components/Recovery/RecoveryProtectedInventorySection.tsx?raw';
import recoveryTablePresentationSource from '@/utils/recoveryTablePresentation.ts?raw';
+import alertHistoryTableGroupRowSource from '@/features/alerts/AlertHistoryTableGroupRow.tsx?raw';
+import alertResourceTableDesktopSource from '@/components/Alerts/AlertResourceTableDesktop.tsx?raw';
import resourceDetailDrawerOverviewSource from '@/components/Infrastructure/ResourceDetailDrawerOverviewTab.tsx?raw';
import aiSettingsDialogsSource from '@/components/Settings/AISettingsDialogs.tsx?raw';
import generalSettingsPanelSource from '@/components/Settings/GeneralSettingsPanel.tsx?raw';
@@ -464,6 +466,9 @@ describe('shared primitive guardrails', () => {
expect(workloadPanelSource).toContain('getInteractiveGroupedTableRowClass');
expect(unifiedResourceHostTableCardSource).toContain('getInteractiveGroupedTableRowClass');
expect(recoveryTablePresentationSource).toContain('GROUPED_TABLE_ROW_BASE_CLASS');
+ expect(alertHistoryTableGroupRowSource).toContain('getGroupedTableRowClass');
+ expect(alertHistoryTableGroupRowSource).not.toContain('class="bg-surface-alt"');
+ expect(alertResourceTableDesktopSource).toContain('getGroupedTableRowClass');
expect(unifiedResourceHostTableCardSource).toContain('data-summary-group-member-active');
});
diff --git a/frontend-modern/src/features/alerts/AlertHistoryTableGroupRow.tsx b/frontend-modern/src/features/alerts/AlertHistoryTableGroupRow.tsx
index cdfb790fb8..b3ceb35e63 100644
--- a/frontend-modern/src/features/alerts/AlertHistoryTableGroupRow.tsx
+++ b/frontend-modern/src/features/alerts/AlertHistoryTableGroupRow.tsx
@@ -1,4 +1,5 @@
import { TableCell, TableRow } from '@/components/shared/Table';
+import { getGroupedTableRowClass } from '@/components/shared/groupedTableRowPresentation';
import type { AlertHistoryState } from './useAlertHistoryState';
@@ -27,7 +28,7 @@ function getGroupSummaryLabel(group: AlertHistoryGroup) {
export function AlertHistoryTableGroupRow(props: AlertHistoryTableGroupRowProps) {
return (
- <TableRow class="bg-surface-alt">
+ <TableRow class={getGroupedTableRowClass()}>
<TableCell colspan={10} class="py-1.5 pr-3 pl-4 text-[12px] font-semibold sm:text-sm">
<div class="flex flex-col gap-1 sm:flex-row sm:items-center sm:justify-between sm:gap-3">
<span class="truncate" title={props.group.fullLabel}>
diff --git a/frontend-modern/src/pages/__tests__/Alerts.helpers.test.ts b/frontend-modern/src/pages/__tests__/Alerts.helpers.test.ts
index 431d24c3b4..03c73203b8 100644
--- a/frontend-modern/src/pages/__tests__/Alerts.helpers.test.ts
+++ b/frontend-modern/src/pages/__tests__/Alerts.helpers.test.ts
@@ -35,6 +35,7 @@ import alertScheduleTabSource from '@/features/alerts/tabs/ScheduleTab.tsx?raw';
import alertThresholdsTabSource from '@/features/alerts/tabs/ThresholdsTab.tsx?raw';
import thresholdsTabModelSource from '@/features/alerts/thresholds/thresholdsTabModel.ts?raw';
import recentAlertsPanelSource from '@/components/Alerts/RecentAlertsPanel.tsx?raw';
+import alertResourceTableDesktopSource from '@/components/Alerts/AlertResourceTableDesktop.tsx?raw';
import thresholdsTableSource from '@/components/Alerts/ThresholdsTable.tsx?raw';
import thresholdsTableAgentDisksSectionSource from '@/components/Alerts/ThresholdsTableAgentDisksSection.tsx?raw';
import thresholdsTableAgentsTabSource from '@/components/Alerts/ThresholdsTableAgentsTab.tsx?raw';
@@ -466,6 +467,8 @@ describe('tab path helpers', () => {
expect(alertHistoryTableSectionSource).not.toContain('InvestigateAlertButton');
expect(alertHistoryTableGroupRowSource).toContain('export function AlertHistoryTableGroupRow');
expect(alertHistoryTableGroupRowSource).toContain('getGroupSummaryLabel');
+ expect(alertHistoryTableGroupRowSource).toContain('getGroupedTableRowClass');
+ expect(alertResourceTableDesktopSource).toContain('getGroupedTableRowClass');
expect(alertHistoryTableAlertRowSource).toContain('export function AlertHistoryTableAlertRow');
expect(alertHistoryTableAlertRowSource).toContain('IncidentTimelinePanel');
expect(alertHistoryTableAlertRowSource).toContain('InvestigateAlertButton');