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
fix(frontend): add synced summary hover readouts
rcourtman8d209ed3d0fb
diff --git a/docs/release-control/v6/internal/status.json b/docs/release-control/v6/internal/status.jsonindex fd3787d9c7..e4ca8cb8d3 100644--- a/docs/release-control/v6/internal/status.json+++ b/docs/release-control/v6/internal/status.json@@ -3712,7 +3712,21 @@]}],- "work_claims": [],+ "work_claims": [+ {+ "id": "codex-lane-l8",+ "agent_id": "codex",+ "summary": "Add canonical synced summary readouts so sibling charts show compact hover values without spawning multi-tooltip overlays.",+ "target_id": "v6-ga-promotion",+ "claimed_at": "2026-04-01T22:34:28Z",+ "heartbeat_at": "2026-04-01T22:34:28Z",+ "expires_at": "2026-04-02T00:34:28Z",+ "work_item": {+ "kind": "lane",+ "id": "L8"+ }+ }+ ],"open_decisions": [],"source_of_truth_file": "docs/release-control/v6/internal/SOURCE_OF_TRUTH.md","resolved_decisions": [diff --git a/docs/release-control/v6/internal/subsystems/frontend-primitives.md b/docs/release-control/v6/internal/subsystems/frontend-primitives.mdindex d9c78d8d9e..8759f3b375 100644--- a/docs/release-control/v6/internal/subsystems/frontend-primitives.md+++ b/docs/release-control/v6/internal/subsystems/frontend-primitives.md@@ -146,7 +146,7 @@ work extends shared components instead of creating new local variants.5. Keep shared platform-connections shell state on the reusable settings boundary: `frontend-modern/src/components/Settings/useSettingsInfrastructurePanelProps.ts`, `frontend-modern/src/components/Settings/InfrastructurePlatformConnectionsSummaryCard.tsx`, and `frontend-modern/src/components/Settings/PlatformConnectionsWorkspace.tsx` must continue to derive provider counts, availability, and shared subtab copy from one infrastructure-settings source instead of creating provider-local summary fetches or VMware-only shell vocabulary.6. Keep shared storage feature presenters on canonical platform truth. When reusable storage presenters under `frontend-modern/src/features/storageBackups/` classify canonical resources for the shared storage route, API-backed virtualization datastores such as VMware must stay inventory-only datastores instead of inheriting PBS-specific backup-repository or protected-target copy from older fallback branches.7. Keep top-of-page summary interaction on shared primitives. Infrastructure, workloads, and storage summary cards must route sticky-shell behavior through `frontend-modern/src/components/shared/StickySummarySection.tsx` and route row-hover or focused-series rendering through shared chart primitives such as `frontend-modern/src/components/shared/InteractiveSparkline.tsx` and `frontend-modern/src/components/shared/DensityMap.tsx`, rather than page-local sticky wrappers or metric-card-specific hover logic.-8. Keep summary chart interaction identity on one shared helper. Summary surfaces that expose row-hover, group-hover, chart-hover, or route-focus-driven chart emphasis must derive page/group/entity scope through `frontend-modern/src/components/shared/summaryCardInteraction.ts` and pass that same resolved scope into card-state, sparkline, and density-map primitives, rather than letting cards read `hovered || focused` while charts listen to a different page-local ID source. Hovering one summary chart must promote that series into the shared active entity so sibling cards highlight the same object instead of keeping chart-local hover islands, and hovering a grouped header must scope every card to that group without forking a workloads-local summary filter path.+8. Keep summary chart interaction identity on one shared helper. Summary surfaces that expose row-hover, group-hover, chart-hover, or route-focus-driven chart emphasis must derive page/group/entity scope through `frontend-modern/src/components/shared/summaryCardInteraction.ts` and pass that same resolved scope into card-state, sparkline, and density-map primitives, rather than letting cards read `hovered || focused` while charts listen to a different page-local ID source. Hovering one summary chart must promote that series into the shared active entity so sibling cards highlight the same object instead of keeping chart-local hover islands, and hovering a grouped header must scope every card to that group without forking a workloads-local summary filter path. Sibling cards should surface that synchronized hover as one compact header readout through the shared summary-card contract, while the chart under the pointer keeps the only floating tooltip.9. Keep page summaries page-scoped when table rows enter contextual focus. Route-backed row selection may add a focused label and shared series emphasis, but infrastructure, workloads, and storage summary cards must continue to render the page-level series set instead of collapsing the summary down to the selected row or replacing the global trend view with row-local empty states.10. Keep contextual row focus on the shared summary primitive. Summary surfaces and same-route table drill-ins must reuse `frontend-modern/src/components/shared/contextualFocus.ts` for interactive-series filtering, focused-name lookup, active-series derivation, local scroll preservation, and deliberate inline-detail reveal instead of rebuilding page-local `Set` filters, focused-label scans, drawer-aware scroll math, or ad hoc scroll restoration in each surface.11. Keep summary-to-table coordination deliberate and reversible. Shared summary hover may highlight the matching table row when it is already visible, but transient chart hover must not auto-filter tables, auto-scroll the page, or reshuffle table ordering. When the active row is off-screen, page owners must route through `frontend-modern/src/components/shared/summaryTableFocus.ts` and surface a lightweight `Jump to row` affordance that reveals and scrolls only on explicit user action. Deliberate row focus may reveal inline detail automatically, but that reveal must be drawer-aware: preserve already-good positions, avoid hard centering, and scroll only enough to keep the row header plus the top of the inline detail visible.diff --git a/docs/release-control/v6/internal/subsystems/performance-and-scalability.md b/docs/release-control/v6/internal/subsystems/performance-and-scalability.mdindex 2ff2c0f2e3..8eace5aad3 100644--- a/docs/release-control/v6/internal/subsystems/performance-and-scalability.md+++ b/docs/release-control/v6/internal/subsystems/performance-and-scalability.md@@ -210,7 +210,10 @@ history. Hovering a sparkline or density map for one entity must promote thatentity into the shared active series so sibling cards highlight the same objectat once rather than maintaining chart-local hover state, and the synchronizedhover timestamp must remain visible across those sibling cards even when the-active entity has no samples for one metric in the current range.+active entity has no samples for one metric in the current range. Those+sibling cards should expose the synchronized value through one compact+header-level readout, not by spawning duplicate floating tooltips on every+chart.For shared line charts on that hot path, the shared sparkline primitive mayisolate the selected series inside the existing render budget, but thatisolation must still reuse the same summary series set and timeline data ratherdiff --git a/docs/release-control/v6/internal/subsystems/storage-recovery.md b/docs/release-control/v6/internal/subsystems/storage-recovery.mdindex d940c9653a..f97171628b 100644--- a/docs/release-control/v6/internal/subsystems/storage-recovery.md+++ b/docs/release-control/v6/internal/subsystems/storage-recovery.md@@ -296,7 +296,10 @@ That same shared summary contract now also owns chart-driven emphasis.Hovering one storage summary chart must promote the same canonical metricstarget ID through sibling cards, so pool charts cross-highlight the same poolwhile non-matching cards such as disk temperature demote to inactive context-instead of keeping chart-local hover state.+instead of keeping chart-local hover state. When a sibling storage card can map+that same entity into its own series set, it must also surface the synchronized+value as a compact card-header readout instead of opening a second floating+tooltip away from the pointer.That same storage summary contract now uses the shared contextual-focus owner.`frontend-modern/src/components/Storage/StorageSummary.tsx` must routeinteractive-series filtering, focused-label lookup, and active-seriesdiff --git a/docs/release-control/v6/internal/subsystems/unified-resources.md b/docs/release-control/v6/internal/subsystems/unified-resources.mdindex bcd24ea4e6..af36993a9d 100644--- a/docs/release-control/v6/internal/subsystems/unified-resources.md+++ b/docs/release-control/v6/internal/subsystems/unified-resources.md@@ -190,13 +190,16 @@ assembly branch.must still resolve through the same unified-resource id that powers thetable row, line charts, density maps, and drawer route state instead ofdropping the highlight or inventing a metric-local summary identity when+ disk or network data is missing in range. When a sibling infrastructure+ card can resolve that same resource id locally, it should surface the+ synchronized value through the shared summary-card readout instead of+ spawning a second chart tooltip.12. Keep infrastructure chart hover non-destructive to the unified-resourcetable. If the hovered resource row is already visible in`frontend-modern/src/components/Infrastructure/UnifiedResourceTable.tsx`,the row may highlight in place through the shared active-resource id; if itis off-screen, the page must offer an explicit `Jump to row` affordancerather than auto-scrolling or collapsing the table on hover.- disk or network data is missing in range.13. Keep infrastructure row emphasis on the shared frontend presentationcontract. Host, PBS, and PMG table sections may decide whether a resourceis contextually active, but they must expose that state throughdiff --git a/frontend-modern/src/components/Infrastructure/InfrastructureSummary.tsx b/frontend-modern/src/components/Infrastructure/InfrastructureSummary.tsxindex 0ceaa85a4b..780ef898a8 100644--- a/frontend-modern/src/components/Infrastructure/InfrastructureSummary.tsx+++ b/frontend-modern/src/components/Infrastructure/InfrastructureSummary.tsx@@ -6,6 +6,9 @@ import { DensityMap } from '@/components/shared/DensityMap';import { SummaryJumpToRowButton } from '@/components/shared/SummaryJumpToRowButton';import { SummaryPanel } from '@/components/shared/SummaryPanel';import { SummaryMetricCard } from '@/components/shared/SummaryMetricCard';+import { SummarySynchronizedReadout } from '@/components/shared/SummarySynchronizedReadout';+import { buildDensityMapSynchronizedReadout } from '@/components/shared/densityMapModel';+import { buildInteractiveSparklineSynchronizedReadout } from '@/components/shared/interactiveSparklineModel';import { formatThroughputRate } from '@/utils/throughputPresentation';import type { InfrastructureSummaryProps } from './infrastructureSummaryModel';import { useInfrastructureSummaryState } from './useInfrastructureSummaryState';@@ -20,6 +23,62 @@ export const InfrastructureSummary: Component<InfrastructureSummaryProps> = (proif (!name) return undefined;return <span class="text-xs text-muted ml-1.5 truncate">— {name}</span>;};+ const renderSyncedReadout = (+ readout: { empty?: boolean; timestamp: number; value: string } | null,+ ) =>+ readout ? (+ <SummarySynchronizedReadout+ empty={readout.empty}+ timestamp={readout.timestamp}+ value={readout.value}+ />+ ) : undefined;+ const cpuSyncedReadout = () =>+ buildInteractiveSparklineSynchronizedReadout({+ hoverSourceKey: 'cpu',+ hoverSync: state.chartHoverSync(),+ series: state.seriesFor('cpu'),+ timeRange: props.timeRange,+ });+ const memorySyncedReadout = () =>+ buildInteractiveSparklineSynchronizedReadout({+ hoverSourceKey: 'memory',+ hoverSync: state.chartHoverSync(),+ series: state.seriesFor('memory'),+ timeRange: props.timeRange,+ });+ const diskIOSyncedReadout = () =>+ buildDensityMapSynchronizedReadout({+ emptyValue: 'No sample',+ formatValue: formatThroughputRate,+ hoverSourceKey: 'diskio',+ hoverSync: state.chartHoverSync(),+ series: state.diskioSeries(),+ timeRange: props.timeRange,+ });+ const networkSyncedReadout = () =>+ buildDensityMapSynchronizedReadout({+ emptyValue: 'No sample',+ formatValue: formatThroughputRate,+ hoverSourceKey: 'network',+ hoverSync: state.chartHoverSync(),+ series: state.networkSeries(),+ timeRange: props.timeRange,+ });+ const diskIOHeaderValue = () => {+ const synced = renderSyncedReadout(diskIOSyncedReadout());+ if (synced) {+ return synced;+ }+ if (!state.focusedResourceName() && state.avgDiskCapacity() !== null) {+ return (+ <span class="text-[10px] text-muted shrink-0">+ Capacity: {state.avgDiskCapacity()}%+ </span>+ );+ }+ return undefined;+ };return (<Show when={props.resources.length > 0}>@@ -51,6 +110,7 @@ export const InfrastructureSummary: Component<InfrastructureSummaryProps> = (pro<SummaryMetricCardlabel="CPU"secondaryLabel={focusedLabel()}+ headerValue={renderSyncedReadout(cpuSyncedReadout())}loaded={state.isCurrentRangeLoaded()}hasData={state.hasData('cpu')}emptyMessage={state.emptyMessage()}@@ -74,6 +134,7 @@ export const InfrastructureSummary: Component<InfrastructureSummaryProps> = (pro<SummaryMetricCardlabel="Memory"secondaryLabel={focusedLabel()}+ headerValue={renderSyncedReadout(memorySyncedReadout())}loaded={state.isCurrentRangeLoaded()}hasData={state.hasData('memory')}emptyMessage={state.emptyMessage()}@@ -96,16 +157,8 @@ export const InfrastructureSummary: Component<InfrastructureSummaryProps> = (pro<SummaryMetricCardlabel="Disk I/O"- secondaryLabel={- <>- {focusedLabel()}- <Show when={!state.focusedResourceName() && state.avgDiskCapacity() !== null}>- <span class="text-[10px] text-muted ml-auto shrink-0">- Capacity: {state.avgDiskCapacity()}%- </span>- </Show>- </>- }+ secondaryLabel={focusedLabel()}+ headerValue={diskIOHeaderValue()}loaded={state.isCurrentRangeLoaded()}hasData={state.hasDiskIOData()}emptyMessage={state.emptyMessage()}@@ -182,6 +235,7 @@ export const InfrastructureSummary: Component<InfrastructureSummaryProps> = (pro<SummaryMetricCardlabel="Network"secondaryLabel={focusedLabel()}+ headerValue={renderSyncedReadout(networkSyncedReadout())}loaded={state.isCurrentRangeLoaded()}hasData={state.hasNetData()}emptyMessage={state.emptyHistoryLabel()}diff --git a/frontend-modern/src/components/Infrastructure/__tests__/infrastructureSummaryModel.test.ts b/frontend-modern/src/components/Infrastructure/__tests__/infrastructureSummaryModel.test.tsindex 633192b889..415df6ea96 100644--- a/frontend-modern/src/components/Infrastructure/__tests__/infrastructureSummaryModel.test.ts+++ b/frontend-modern/src/components/Infrastructure/__tests__/infrastructureSummaryModel.test.ts@@ -3,6 +3,8 @@ import useInfrastructureSummaryStateSource from '../useInfrastructureSummaryStatimport type { Resource } from '@/types/resource';import type { InfrastructureSummarySeries } from '@/components/Infrastructure/infrastructureSummaryModel';+import { buildDensityMapSynchronizedReadout } from '@/components/shared/densityMapModel';+import { buildInteractiveSparklineSynchronizedReadout } from '@/components/shared/interactiveSparklineModel';import { resolveSummaryActiveSeriesId } from '@/components/shared/summaryCardInteraction';import {buildInfrastructureDisplaySeries,@@ -226,6 +228,66 @@ describe('infrastructureSummaryModel', () => {).toBe('agent-2');});+ it('builds sibling synchronized readouts from canonical infrastructure series without duplicating the source tooltip', () => {+ const displayedSeries = buildInfrastructureDisplaySeries(+ [+ makeSeries('host-1', {+ name: 'Host 1',+ cpu: [{ timestamp: Date.now() - 45_000, value: 20 }],+ memory: [{ timestamp: Date.now() - 45_000, value: 35 }],+ network: [],+ diskio: [],+ }),+ makeSeries('host-2', {+ name: 'Host 2',+ cpu: [{ timestamp: Date.now() - 30_000, value: 40 }],+ memory: [{ timestamp: Date.now() - 30_000, value: 55 }],+ network: [{ timestamp: Date.now() - 30_000, value: 240 }],+ diskio: [{ timestamp: Date.now() - 30_000, value: 90 }],+ }),+ ],+ null,+ );+ const hoverSync = {+ sourceKey: 'cpu',+ seriesId: 'host-2',+ timestamp: Date.now() - 30_000,+ };++ expect(+ buildInteractiveSparklineSynchronizedReadout({+ hoverSourceKey: 'cpu',+ hoverSync,+ series: buildInfrastructureMetricSeries(displayedSeries, 'cpu'),+ timeRange: '1h',+ }),+ ).toBeNull();+ expect(+ buildInteractiveSparklineSynchronizedReadout({+ hoverSourceKey: 'memory',+ hoverSync,+ series: buildInfrastructureMetricSeries(displayedSeries, 'memory'),+ timeRange: '1h',+ }),+ ).toMatchObject({ value: '55.0%' });+ expect(+ buildDensityMapSynchronizedReadout({+ hoverSourceKey: 'diskio',+ hoverSync,+ series: buildInfrastructureMetricSeries(displayedSeries, 'diskio'),+ timeRange: '1h',+ }),+ ).toMatchObject({ value: '90.0' });+ expect(+ buildDensityMapSynchronizedReadout({+ hoverSourceKey: 'network',+ hoverSync,+ series: buildInfrastructureMetricSeries(displayedSeries, 'network'),+ timeRange: '1h',+ }),+ ).toMatchObject({ value: '240.0' });+ });+it('shows the network card when either data or network capability exists', () => {expect(shouldShowInfrastructureNetworkCard(false, [diff --git a/frontend-modern/src/components/Storage/StorageSummary.tsx b/frontend-modern/src/components/Storage/StorageSummary.tsxindex 55adbea9ea..11961fb746 100644--- a/frontend-modern/src/components/Storage/StorageSummary.tsx+++ b/frontend-modern/src/components/Storage/StorageSummary.tsx@@ -8,6 +8,8 @@ import {import { SummaryJumpToRowButton } from '@/components/shared/SummaryJumpToRowButton';import { SummaryPanel } from '@/components/shared/SummaryPanel';import { SummaryMetricCard } from '@/components/shared/SummaryMetricCard';+import { SummarySynchronizedReadout } from '@/components/shared/SummarySynchronizedReadout';+import { buildInteractiveSparklineSynchronizedReadout } from '@/components/shared/interactiveSparklineModel';import {ChartsAPI,type MetricPoint,@@ -282,6 +284,47 @@ const StorageSummary: Component<StorageSummaryProps> = (props) => {if (!name) return undefined;return <span class="text-xs text-muted ml-1.5 truncate">— {name}</span>;};+ const renderSyncedReadout = (+ readout: { empty?: boolean; timestamp: number; value: string } | null,+ ) =>+ readout ? (+ <SummarySynchronizedReadout+ empty={readout.empty}+ timestamp={readout.timestamp}+ value={readout.value}+ />+ ) : undefined;+ const poolUsageSyncedReadout = () =>+ buildInteractiveSparklineSynchronizedReadout({+ hoverSourceKey: 'pool-usage',+ hoverSync: chartHoverSync(),+ series: poolUsageSeries(),+ timeRange: props.timeRange as TimeRange,+ });+ const diskTempSyncedReadout = () =>+ buildInteractiveSparklineSynchronizedReadout({+ formatValue: formatTemp,+ hoverSourceKey: 'disk-temperature',+ hoverSync: chartHoverSync(),+ series: diskTempSeries(),+ timeRange: props.timeRange as TimeRange,+ });+ const poolUsedSyncedReadout = () =>+ buildInteractiveSparklineSynchronizedReadout({+ formatValue: (value) => formatBytes(value),+ hoverSourceKey: 'used-capacity',+ hoverSync: chartHoverSync(),+ series: poolUsedSeries(),+ timeRange: props.timeRange as TimeRange,+ });+ const poolAvailSyncedReadout = () =>+ buildInteractiveSparklineSynchronizedReadout({+ formatValue: (value) => formatBytes(value),+ hoverSourceKey: 'available-space',+ hoverSync: chartHoverSync(),+ series: poolAvailSeries(),+ timeRange: props.timeRange as TimeRange,+ });return (<Show when={showComponent()}>@@ -309,6 +352,7 @@ const StorageSummary: Component<StorageSummaryProps> = (props) => {<SummaryMetricCardlabel="Pool Usage"secondaryLabel={focusedLabel(poolUsageSeries())}+ headerValue={renderSyncedReadout(poolUsageSyncedReadout())}loaded={loaded()}hasData={hasPoolUsage()}emptyMessage={emptyLabel()}@@ -332,6 +376,7 @@ const StorageSummary: Component<StorageSummaryProps> = (props) => {<SummaryMetricCardlabel="Disk Temperature"secondaryLabel={focusedLabel(diskTempSeries())}+ headerValue={renderSyncedReadout(diskTempSyncedReadout())}loaded={loaded()}hasData={hasDiskTemp()}emptyMessage={emptyLabel()}@@ -357,6 +402,7 @@ const StorageSummary: Component<StorageSummaryProps> = (props) => {<SummaryMetricCardlabel="Used Capacity"secondaryLabel={focusedLabel(poolUsedSeries())}+ headerValue={renderSyncedReadout(poolUsedSyncedReadout())}loaded={loaded()}hasData={hasPoolUsed()}emptyMessage={emptyLabel()}@@ -382,6 +428,7 @@ const StorageSummary: Component<StorageSummaryProps> = (props) => {<SummaryMetricCardlabel="Available Space"secondaryLabel={focusedLabel(poolAvailSeries())}+ headerValue={renderSyncedReadout(poolAvailSyncedReadout())}loaded={loaded()}hasData={hasPoolAvail()}emptyMessage={emptyLabel()}diff --git a/frontend-modern/src/components/Storage/__tests__/Storage.test.tsx b/frontend-modern/src/components/Storage/__tests__/Storage.test.tsxindex aea06939d4..543711cb81 100644--- a/frontend-modern/src/components/Storage/__tests__/Storage.test.tsx+++ b/frontend-modern/src/components/Storage/__tests__/Storage.test.tsx@@ -1,6 +1,7 @@import { cleanup, fireEvent, render, screen, waitFor } from '@solidjs/testing-library';import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';import { ChartsAPI } from '@/api/charts';+import StorageSummary from '@/components/Storage/StorageSummary';import storageSummarySource from '@/components/Storage/StorageSummary.tsx?raw';import type { Alert } from '@/types/api';import type { Resource, ResourceType } from '@/types/resource';@@ -990,6 +991,73 @@ describe('Storage', () => {storageSummarySpy.mockRestore();});+ it('shows compact synchronized readouts on sibling storage cards without duplicating the source card tooltip', async () => {+ const storageSummarySpy = vi.spyOn(ChartsAPI, 'getStorageSummaryCharts').mockResolvedValue({+ pools: {+ 'pool:alpha': {+ name: 'Alpha-Store',+ usage: [+ { timestamp: Date.now() - 60_000, value: 45 },+ { timestamp: Date.now(), value: 47 },+ ],+ used: [+ { timestamp: Date.now() - 60_000, value: 450 },+ { timestamp: Date.now(), value: 470 },+ ],+ avail: [+ { timestamp: Date.now() - 60_000, value: 550 },+ { timestamp: Date.now(), value: 530 },+ ],+ },+ 'pool:beta': {+ name: 'Beta-Store',+ usage: [+ { timestamp: Date.now() - 60_000, value: 58 },+ { timestamp: Date.now(), value: 60 },+ ],+ used: [+ { timestamp: Date.now() - 60_000, value: 680 },+ { timestamp: Date.now(), value: 700 },+ ],+ avail: [+ { timestamp: Date.now() - 60_000, value: 320 },+ { timestamp: Date.now(), value: 300 },+ ],+ },+ },+ disks: {},+ stats: {+ oldestDataTimestamp: Date.now() - 60_000,+ },+ });++ render(() => (+ <StorageSummary+ poolCount={2}+ diskCount={0}+ timeRange="1h"+ chartHoverSync={{+ sourceKey: 'pool-usage',+ seriesId: 'pool:beta',+ timestamp: Date.now(),+ }}+ />+ ));++ await screen.findByTestId('storage-summary');++ await waitFor(() => {+ const readouts = document.querySelectorAll('[data-summary-sync-readout="true"]');+ expect(readouts).toHaveLength(2);+ for (const readout of readouts) {+ expect(readout.getAttribute('data-summary-sync-empty')).toBe('false');+ expect(readout.getAttribute('data-summary-sync-timestamp')).not.toBe('');+ }+ });++ storageSummarySpy.mockRestore();+ });+it('offers a deliberate jump affordance when the focused storage row is off-screen', async () => {const storageSummarySpy = vi.spyOn(ChartsAPI, 'getStorageSummaryCharts').mockResolvedValue({pools: {diff --git a/frontend-modern/src/components/Workloads/WorkloadsSummary.test.tsx b/frontend-modern/src/components/Workloads/WorkloadsSummary.test.tsxindex cd5951a361..4e7562d054 100644--- a/frontend-modern/src/components/Workloads/WorkloadsSummary.test.tsx+++ b/frontend-modern/src/components/Workloads/WorkloadsSummary.test.tsx@@ -414,6 +414,12 @@ describe('WorkloadsSummary performance behavior', () => {expect(sparkline.getAttribute('data-hover-sync-timestamp')).not.toBe('');expect(sparkline.getAttribute('data-interaction-state')).toBe('active');}+ const readouts = document.querySelectorAll('[data-summary-sync-readout="true"]');+ expect(readouts).toHaveLength(3);+ for (const readout of readouts) {+ expect(readout.getAttribute('data-summary-sync-empty')).toBe('false');+ expect(readout.getAttribute('data-summary-sync-timestamp')).not.toBe('');+ }});});diff --git a/frontend-modern/src/components/Workloads/WorkloadsSummary.tsx b/frontend-modern/src/components/Workloads/WorkloadsSummary.tsxindex a2d21a1914..a05c0c6bf5 100644--- a/frontend-modern/src/components/Workloads/WorkloadsSummary.tsx+++ b/frontend-modern/src/components/Workloads/WorkloadsSummary.tsx@@ -11,7 +11,10 @@ import { DensityMap } from '@/components/shared/DensityMap';import { SummaryJumpToRowButton } from '@/components/shared/SummaryJumpToRowButton';import { SummaryPanel } from '@/components/shared/SummaryPanel';import { SummaryMetricCard } from '@/components/shared/SummaryMetricCard';+import { SummarySynchronizedReadout } from '@/components/shared/SummarySynchronizedReadout';import type { SummarySeriesGroupScope } from '@/components/shared/summaryCardInteraction';+import { buildDensityMapSynchronizedReadout } from '@/components/shared/densityMapModel';+import { buildInteractiveSparklineSynchronizedReadout } from '@/components/shared/interactiveSparklineModel';import {ChartsAPI,type ChartData,@@ -748,6 +751,48 @@ export const WorkloadsSummary: Component<WorkloadsSummaryProps> = (props) => {if (!name) return undefined;return <span class="text-xs text-muted ml-1.5 truncate">— {name}</span>;};+ const renderSyncedReadout = (+ readout: { empty?: boolean; timestamp: number; value: string } | null,+ ) =>+ readout ? (+ <SummarySynchronizedReadout+ empty={readout.empty}+ timestamp={readout.timestamp}+ value={readout.value}+ />+ ) : undefined;+ const cpuSyncedReadout = () =>+ buildInteractiveSparklineSynchronizedReadout({+ hoverSourceKey: 'cpu',+ hoverSync: chartHoverSync(),+ series: cpuSeries(),+ timeRange: selectedRange(),+ });+ const memorySyncedReadout = () =>+ buildInteractiveSparklineSynchronizedReadout({+ hoverSourceKey: 'memory',+ hoverSync: chartHoverSync(),+ series: memorySeries(),+ timeRange: selectedRange(),+ });+ const diskIOSyncedReadout = () =>+ buildDensityMapSynchronizedReadout({+ emptyValue: 'No sample',+ formatValue: formatThroughputRate,+ hoverSourceKey: 'diskio',+ hoverSync: chartHoverSync(),+ series: diskioSeries(),+ timeRange: selectedRange(),+ });+ const networkSyncedReadout = () =>+ buildDensityMapSynchronizedReadout({+ emptyValue: 'No sample',+ formatValue: formatThroughputRate,+ hoverSourceKey: 'network',+ hoverSync: chartHoverSync(),+ series: networkSeries(),+ timeRange: selectedRange(),+ });return (<SummaryPanel@@ -775,6 +820,7 @@ export const WorkloadsSummary: Component<WorkloadsSummaryProps> = (props) => {<SummaryMetricCardlabel="CPU"secondaryLabel={focusedLabel()}+ headerValue={renderSyncedReadout(cpuSyncedReadout())}loaded={!isLoading()}hasData={hasCpuData()}emptyMessage={fallbackTrendMessage() ?? undefined}@@ -800,6 +846,7 @@ export const WorkloadsSummary: Component<WorkloadsSummaryProps> = (props) => {<SummaryMetricCardlabel="Memory"secondaryLabel={focusedLabel()}+ headerValue={renderSyncedReadout(memorySyncedReadout())}loaded={!isLoading()}hasData={hasMemoryData()}emptyMessage={fallbackTrendMessage() ?? undefined}@@ -825,6 +872,7 @@ export const WorkloadsSummary: Component<WorkloadsSummaryProps> = (props) => {<SummaryMetricCardlabel="Disk I/O"secondaryLabel={focusedLabel()}+ headerValue={renderSyncedReadout(diskIOSyncedReadout())}loaded={!isLoading()}hasData={hasDiskIOData()}emptyMessage={fallbackTrendMessage() ?? undefined}@@ -847,6 +895,7 @@ export const WorkloadsSummary: Component<WorkloadsSummaryProps> = (props) => {<SummaryMetricCardlabel="Network"secondaryLabel={focusedLabel()}+ headerValue={renderSyncedReadout(networkSyncedReadout())}loaded={!isLoading()}hasData={hasNetworkData()}emptyMessage={fallbackTrendMessage() ?? undefined}diff --git a/frontend-modern/src/components/shared/SharedPrimitives.guardrails.test.ts b/frontend-modern/src/components/shared/SharedPrimitives.guardrails.test.tsindex ad4864a8d3..6f65b7d792 100644--- a/frontend-modern/src/components/shared/SharedPrimitives.guardrails.test.ts+++ b/frontend-modern/src/components/shared/SharedPrimitives.guardrails.test.ts@@ -73,6 +73,7 @@ import selectionCardGroupSource from '@/components/shared/SelectionCardGroup.tsximport selectionCardGroupModelSource from '@/components/shared/selectionCardGroupModel.ts?raw';import summaryMetricCardSource from '@/components/shared/SummaryMetricCard.tsx?raw';import summaryPanelSource from '@/components/shared/SummaryPanel.tsx?raw';+import summarySynchronizedReadoutSource from '@/components/shared/SummarySynchronizedReadout.tsx?raw';import tagBadgesSource from '@/components/shared/TagBadges.tsx?raw';import commandPaletteStateSource from '@/components/shared/useCommandPaletteState.ts?raw';import activeUseTrialNudgeStateSource from '@/components/shared/useActiveUseTrialNudgeState.ts?raw';@@ -108,6 +109,7 @@ import webInterfaceUrlFieldStateSource from '@/components/shared/useWebInterfaceimport guestRowSource from '@/components/Dashboard/GuestRow.tsx?raw';import guestRowStateSource from '@/components/Dashboard/useGuestRowState.ts?raw';import dashboardSelectionStateSource from '@/components/Dashboard/useDashboardSelectionState.ts?raw';+import infrastructureSummarySource from '@/components/Infrastructure/InfrastructureSummary.tsx?raw';import infrastructureSummaryStateSource from '@/components/Infrastructure/useInfrastructureSummaryState.ts?raw';import unifiedResourceHostTableCardSource from '@/components/Infrastructure/UnifiedResourceHostTableCard.tsx?raw';import unifiedResourcePBSTableSectionSource from '@/components/Infrastructure/UnifiedResourcePBSTableSection.tsx?raw';@@ -325,6 +327,33 @@ describe('shared primitive guardrails', () => {expect(workloadsSummarySource).not.toContain('const interactiveWorkloadIds = createMemo');});+ it('keeps synchronized summary values on one shared card/readout contract', () => {+ expect(summaryMetricCardSource).toContain('headerValue?: JSX.Element');+ expect(summaryMetricCardSource).toContain('props.headerValue');+ expect(summaryMetricCardSource).not.toContain('data-summary-sync-readout');++ expect(summarySynchronizedReadoutSource).toContain(+ 'export const SummarySynchronizedReadout',+ );+ expect(summarySynchronizedReadoutSource).toContain('data-summary-sync-readout="true"');+ expect(summarySynchronizedReadoutSource).toContain(+ 'formatSummarySynchronizedReadoutTime',+ );+ expect(summarySynchronizedReadoutSource).not.toContain('Portal');++ expect(interactiveSparklineModelSource).toContain(+ 'buildInteractiveSparklineSynchronizedReadout',+ );+ expect(densityMapModelSource).toContain('buildDensityMapSynchronizedReadout');++ expect(infrastructureSummarySource).toContain('SummarySynchronizedReadout');+ expect(infrastructureSummarySource).toContain('headerValue={');+ expect(workloadsSummarySource).toContain('SummarySynchronizedReadout');+ expect(workloadsSummarySource).toContain('headerValue={');+ expect(storageSummarySource).toContain('SummarySynchronizedReadout');+ expect(storageSummarySource).toContain('headerValue={');+ });+it('keeps summary-linked table row emphasis on the shared active-row presentation contract', () => {expect(frontendIndexCssSource).toContain("tr[data-summary-row-active='true'] > td");expect(frontendIndexCssSource).toContain('--color-summary-row-bg');diff --git a/frontend-modern/src/components/shared/SummaryMetricCard.tsx b/frontend-modern/src/components/shared/SummaryMetricCard.tsxindex 0dc3856c70..9e17a66bc7 100644--- a/frontend-modern/src/components/shared/SummaryMetricCard.tsx+++ b/frontend-modern/src/components/shared/SummaryMetricCard.tsx@@ -8,6 +8,8 @@ export interface SummaryMetricCardProps {label: string;/** Optional secondary content to the right of the label. */secondaryLabel?: JSX.Element;+ /** Optional compact readout aligned to the header right edge. */+ headerValue?: JSX.Element;/** Whether data has loaded at least once. Drives skeleton vs empty state. */loaded: boolean;/** Whether there is renderable data. When false, shows the fallback. */@@ -46,11 +48,18 @@ export function SummaryMetricCard(props: SummaryMetricCardProps) {class={`h-full ${isCompact() ? '!p-1.5 sm:!p-2' : ''}`.trim()}><div class="flex flex-col h-full">- <div class={`flex min-w-0 items-center ${isCompact() ? 'mb-1' : 'mb-1.5'}`}>- <span class="text-xs font-medium text-muted uppercase tracking-wide shrink-0">- {props.label}- </span>- {props.secondaryLabel}+ <div+ class={`flex min-w-0 items-center gap-2 ${isCompact() ? 'mb-1' : 'mb-1.5'}`.trim()}+ >+ <div class="flex min-w-0 items-center">+ <span class="text-xs font-medium text-muted uppercase tracking-wide shrink-0">+ {props.label}+ </span>+ {props.secondaryLabel}+ </div>+ <Show when={props.headerValue}>+ <div class="ml-auto shrink-0">{props.headerValue}</div>+ </Show></div><Showwhen={props.hasData}diff --git a/frontend-modern/src/components/shared/SummarySynchronizedReadout.tsx b/frontend-modern/src/components/shared/SummarySynchronizedReadout.tsxnew file mode 100644index 0000000000..75b2edbb7e--- /dev/null+++ b/frontend-modern/src/components/shared/SummarySynchronizedReadout.tsx@@ -0,0 +1,34 @@+import type { Component } from 'solid-js';++export interface SummarySynchronizedReadoutProps {+ empty?: boolean;+ timestamp: number;+ value: string;+}++export const formatSummarySynchronizedReadoutTime = (timestamp: number): string =>+ new Date(timestamp).toLocaleString([], {+ month: 'short',+ day: '2-digit',+ hour: '2-digit',+ minute: '2-digit',+ hour12: false,+ });++export const SummarySynchronizedReadout: Component<+ SummarySynchronizedReadoutProps+> = (props) => (+ <span+ data-summary-sync-readout="true"+ data-summary-sync-empty={props.empty === true ? 'true' : 'false'}+ data-summary-sync-timestamp={props.timestamp}+ class={`whitespace-nowrap text-[10px] leading-none ${+ props.empty === true ? 'text-muted' : 'font-semibold text-base-content tabular-nums'+ }`.trim()}+ title={`Synced value at ${formatSummarySynchronizedReadoutTime(props.timestamp)}`}+ >+ {props.value}+ </span>+);++export default SummarySynchronizedReadout;diff --git a/frontend-modern/src/components/shared/__tests__/DensityMap.test.tsx b/frontend-modern/src/components/shared/__tests__/DensityMap.test.tsxindex 7fd5692728..8acd8376dd 100644--- a/frontend-modern/src/components/shared/__tests__/DensityMap.test.tsx+++ b/frontend-modern/src/components/shared/__tests__/DensityMap.test.tsx@@ -7,6 +7,7 @@ import { DensityMap } from '@/components/shared/DensityMap';import {buildDensityMapChartData,buildDensityMapFocusDetail,+ buildDensityMapSynchronizedReadout,getDensityMapExternalSeriesIndex,} from '@/components/shared/densityMapModel';@@ -149,6 +150,68 @@ describe('DensityMap', () => {expect(onHoverSyncChange).toHaveBeenLastCalledWith(null);});+ it('builds a compact synchronized readout for sibling density-map cards', () => {+ vi.useFakeTimers();+ vi.setSystemTime(new Date('2024-01-01T12:00:00Z'));+ const now = Date.now();++ expect(+ buildDensityMapSynchronizedReadout({+ formatValue: (value) => `${value.toFixed(1)} MB/s`,+ hoverSourceKey: 'network',+ hoverSync: {+ sourceKey: 'diskio',+ seriesId: 'alpha',+ timestamp: now - 10_000,+ },+ series: [+ {+ id: 'alpha',+ name: 'Alpha',+ color: '#10b981',+ data: [+ { timestamp: now - 30_000, value: 25 },+ { timestamp: now - 10_000, value: 55 },+ ],+ },+ ],+ timeRange: '1h',+ }),+ ).toEqual({+ timestamp: now - 10_000,+ value: '55.0 MB/s',+ });++ expect(+ buildDensityMapSynchronizedReadout({+ emptyValue: 'No sample',+ formatValue: (value) => `${value.toFixed(1)} MB/s`,+ hoverSourceKey: 'network',+ hoverSync: {+ sourceKey: 'diskio',+ seriesId: 'alpha',+ timestamp: now - 50 * 60_000,+ },+ series: [+ {+ id: 'alpha',+ name: 'Alpha',+ color: '#10b981',+ data: [+ { timestamp: now - 30_000, value: 25 },+ { timestamp: now - 10_000, value: 55 },+ ],+ },+ ],+ timeRange: '1h',+ }),+ ).toEqual({+ empty: true,+ timestamp: now - 50 * 60_000,+ value: 'No sample',+ });+ });+it('keeps an externally highlighted series visible when it falls outside the default density top set', () => {const now = Date.now();const series = Array.from({ length: 24 }, (_, index) => ({diff --git a/frontend-modern/src/components/shared/__tests__/InteractiveSparkline.test.tsx b/frontend-modern/src/components/shared/__tests__/InteractiveSparkline.test.tsxindex 7f655e4aad..656c5b0a0d 100644--- a/frontend-modern/src/components/shared/__tests__/InteractiveSparkline.test.tsx+++ b/frontend-modern/src/components/shared/__tests__/InteractiveSparkline.test.tsx@@ -4,6 +4,7 @@ import { InteractiveSparkline } from '@/components/shared/InteractiveSparkline';import interactiveSparklineSource from '@/components/shared/InteractiveSparkline.tsx?raw';import interactiveSparklineModelSource from '@/components/shared/interactiveSparklineModel.ts?raw';import interactiveSparklineStateSource from '@/components/shared/useInteractiveSparklineState.ts?raw';+import { buildInteractiveSparklineSynchronizedReadout } from '@/components/shared/interactiveSparklineModel';describe('InteractiveSparkline hover behavior', () => {afterEach(() => {@@ -184,6 +185,60 @@ describe('InteractiveSparkline hover behavior', () => {expect(onHoverSyncChange).toHaveBeenLastCalledWith(null);});+ it('builds a compact synchronized readout for sibling sparkline cards', () => {+ vi.useFakeTimers();+ vi.setSystemTime(new Date('2024-01-01T12:00:00Z'));+ const now = Date.now();++ const readout = buildInteractiveSparklineSynchronizedReadout({+ hoverSourceKey: 'memory',+ hoverSync: {+ sourceKey: 'cpu',+ seriesId: 'alpha',+ timestamp: now - 12_000,+ },+ series: [+ {+ id: 'alpha',+ name: 'Alpha',+ color: '#ff0000',+ data: [+ { timestamp: now - 30_000, value: 40 },+ { timestamp: now - 10_000, value: 50 },+ ],+ },+ ],+ timeRange: '1h',+ });++ expect(readout).toEqual({+ timestamp: now - 10_000,+ value: '50.0%',+ });+ expect(+ buildInteractiveSparklineSynchronizedReadout({+ hoverSourceKey: 'cpu',+ hoverSync: {+ sourceKey: 'cpu',+ seriesId: 'alpha',+ timestamp: now - 12_000,+ },+ series: [+ {+ id: 'alpha',+ name: 'Alpha',+ color: '#ff0000',+ data: [+ { timestamp: now - 30_000, value: 40 },+ { timestamp: now - 10_000, value: 50 },+ ],+ },+ ],+ timeRange: '1h',+ }),+ ).toBeNull();+ });+it('keeps a synchronized hover timestamp visible even when the synced series is absent locally', () => {vi.useFakeTimers();vi.setSystemTime(new Date('2024-01-01T12:00:00Z'));diff --git a/frontend-modern/src/components/shared/densityMapModel.ts b/frontend-modern/src/components/shared/densityMapModel.tsindex b10f7e73ae..ff76611a0a 100644--- a/frontend-modern/src/components/shared/densityMapModel.ts+++ b/frontend-modern/src/components/shared/densityMapModel.ts@@ -252,6 +252,71 @@ export function buildDensityMapSynchronizedHoveredState(options: {};}+export function buildDensityMapSynchronizedReadout(options: {+ emptyValue?: string;+ formatValue?: (value: number) => string;+ hoverSourceKey?: string;+ hoverSync?: SummaryChartHoverSync | null;+ series: InteractiveSparklineSeries[];+ timeRange?: TimeRange;+}): { empty?: boolean; timestamp: number; value: string } | null {+ const { hoverSync } = options;+ if (!hoverSync) {+ return null;+ }+ if (options.hoverSourceKey && hoverSync.sourceKey === options.hoverSourceKey) {+ return null;+ }++ const targetSeries = options.series.find((series) => series.id?.trim() === hoverSync.seriesId);+ if (!targetSeries) {+ return null;+ }++ const range = options.timeRange ?? '1h';+ const rangeMs = timeRangeToMs(range);+ const windowEnd = Date.now();+ const windowStart = windowEnd - rangeMs;+ const clampedTimestamp = clampDensityMapValue(hoverSync.timestamp, windowStart, windowEnd);+ const bucketDuration = rangeMs / DENSITY_MAP_COLUMNS;+ const bucketIndex = clampDensityMapValue(+ Math.floor(((clampedTimestamp - windowStart) / rangeMs) * DENSITY_MAP_COLUMNS),+ 0,+ DENSITY_MAP_COLUMNS - 1,+ );+ const bucketStart = windowStart + bucketIndex * bucketDuration;+ const bucketEnd = bucketStart + bucketDuration;++ let bucketMax: number | null = null;+ for (const point of targetSeries.data) {+ if (point.timestamp < windowStart || point.timestamp > windowEnd) {+ continue;+ }+ const inBucket =+ point.timestamp >= bucketStart &&+ (bucketIndex === DENSITY_MAP_COLUMNS - 1+ ? point.timestamp <= bucketEnd+ : point.timestamp < bucketEnd);+ if (!inBucket) {+ continue;+ }+ bucketMax = bucketMax === null ? point.value : Math.max(bucketMax, point.value);+ }++ if (bucketMax === null) {+ return {+ empty: true,+ timestamp: clampedTimestamp,+ value: options.emptyValue ?? 'No sample',+ };+ }++ return {+ timestamp: clampedTimestamp,+ value: formatDensityMapValue(bucketMax, options.formatValue),+ };+}+export function buildDensityMapFocusDetail(options: {activeHoveredState?: DensityMapHoveredState | null;data: DensityMapChartData;diff --git a/frontend-modern/src/components/shared/interactiveSparklineModel.ts b/frontend-modern/src/components/shared/interactiveSparklineModel.tsindex e481ed0b83..bc052ef9dd 100644--- a/frontend-modern/src/components/shared/interactiveSparklineModel.ts+++ b/frontend-modern/src/components/shared/interactiveSparklineModel.ts@@ -526,6 +526,58 @@ export const buildInteractiveSparklineSynchronizedHoverState = ({};};+export const buildInteractiveSparklineSynchronizedReadout = ({+ formatValue,+ hoverSourceKey,+ hoverSync,+ series,+ timeRange,+}: {+ formatValue?: (value: number) => string;+ hoverSourceKey?: string;+ hoverSync?: SummaryChartHoverSync | null;+ series: InteractiveSparklineSeries[];+ timeRange?: TimeRange;+}): { empty?: boolean; timestamp: number; value: string } | null => {+ if (!hoverSync) {+ return null;+ }+ if (hoverSourceKey && hoverSync.sourceKey === hoverSourceKey) {+ return null;+ }++ const targetSeries = series.find((entry) => entry.id?.trim() === hoverSync.seriesId);+ if (!targetSeries) {+ return null;+ }++ const range = timeRange ?? '1h';+ const rangeMs = timeRangeToMs(range);+ const windowEnd = Date.now();+ const windowStart = windowEnd - rangeMs;+ const inWindow = targetSeries.data.filter(+ (point) => point.timestamp >= windowStart && point.timestamp <= windowEnd,+ );+ if (inWindow.length === 0) {+ return null;+ }++ const clampedTimestamp = clampInteractiveSparklineValue(+ hoverSync.timestamp,+ windowStart,+ windowEnd,+ );+ const nearest = findNearestMetricPoint(inWindow, clampedTimestamp);+ if (!nearest) {+ return null;+ }++ return {+ timestamp: nearest.point.timestamp,+ value: formatValue ? formatValue(nearest.point.value) : `${nearest.point.value.toFixed(1)}%`,+ };+};+export const computeInteractiveSparklineHoverState = ({chartData,chartRect,diff --git a/tests/integration/tests/48-summary-hover-selection.spec.ts b/tests/integration/tests/48-summary-hover-selection.spec.tsindex a6a0a23615..ff2edbcb58 100644--- a/tests/integration/tests/48-summary-hover-selection.spec.ts+++ b/tests/integration/tests/48-summary-hover-selection.spec.ts@@ -238,6 +238,27 @@ async function expectActiveDensityMapsPreserveOverview(});}+async function expectSummarySyncedReadoutCount(+ summary: import("@playwright/test").Locator,+ expectedCount: number,+): Promise<void> {+ await expect+ .poll(async () => summary.locator('[data-summary-sync-readout="true"]').count())+ .toBe(expectedCount);+}++async function expectOnlyOneSummaryHoverTooltip(+ page: import("@playwright/test").Page,+): Promise<void> {+ await expect+ .poll(async () =>+ page+ .locator('[data-sparkline-tooltip="true"], [data-density-map-tooltip="true"]')+ .count(),+ )+ .toBe(1);+}+async function hoverDensityMapUntilTooltipAppears(page: import("@playwright/test").Page,densityMap: import("@playwright/test").Locator,@@ -634,6 +655,8 @@ test.describe.serial("Summary hover selection", () => {infrastructureChartId,2,);+ await expectSummarySyncedReadoutCount(infrastructureSummary, 3);+ await expectOnlyOneSummaryHoverTooltip(page);await page.goto("/workloads", { waitUntil: "domcontentloaded" });const workloadsSummary = page.getByTestId("workloads-summary");@@ -654,6 +677,8 @@ test.describe.serial("Summary hover selection", () => {workloadChartId,2,);+ await expectSummarySyncedReadoutCount(workloadsSummary, 3);+ await expectOnlyOneSummaryHoverTooltip(page);await page.goto("/storage", { waitUntil: "domcontentloaded" });const storageSummary = page.getByTestId("storage-summary");@@ -667,6 +692,8 @@ test.describe.serial("Summary hover selection", () => {await expectSummaryHighlightCount(storageSummary, storageChartId, 3);await expectSummaryHoverTimestampsAligned(storageSummary, 4);await expectActiveIsolatedLineCards(storageSummary, 3);+ await expectSummarySyncedReadoutCount(storageSummary, 2);+ await expectOnlyOneSummaryHoverTooltip(page);});test("keeps table coordination non-destructive and reversible", async ({