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.

Poll only the history each metric table renders

rcourtman8e93360d1022
diff --git a/docs/release-control/v6/internal/subsystems/frontend-primitives.md b/docs/release-control/v6/internal/subsystems/frontend-primitives.md
index 6c07a49441..1f45a407f9 100644
--- a/docs/release-control/v6/internal/subsystems/frontend-primitives.md
+++ b/docs/release-control/v6/internal/subsystems/frontend-primitives.md
@@ -688,11 +688,13 @@ same relative point in the selected history range. Leaving the row clears the
cursor and restores the bars and I/O readouts together. The lens mounts with a short
reduced-motion-safe fade and must not leave both bar and chart semantics in the
accessibility tree simultaneously.
-Bar mode resolves history only for that active guest through its canonical
-metrics target and the selected compact range; it must not start an
-estate-wide chart request merely because the range changes. The active request
-key is stable across equivalent live guest snapshots, and leaving the row or
-selecting another range aborts superseded browser work. Persistent Trends may
+Bar mode resolves history per guest through each guest's canonical metrics
+target and the selected compact range, warming only a bounded window of
+mounted and adjacent rows with the active guest first; it must not start an
+estate-wide chart request merely because the range changes. The request key is
+stable across equivalent live guest snapshots, and selecting another range
+aborts superseded browser work. Leaving a row does not cancel its read, which
+settles into the bounded row cache. Persistent Trends may
retain the shared estate reader, but range changes must clear prior-range data
unless an exact-key cache entry exists.
@@ -7983,6 +7985,15 @@ Rendered table proof belongs in
drawer grouping and fallback proof belongs in
`frontend-modern/src/components/Infrastructure/__tests__/resourceDetailDrawerMetricsHistoryModel.branchcov0712.test.ts`.
+### The Proxmox nodes table reads node history only
+
+`frontend-modern/src/features/proxmox/ProxmoxNodesTable.tsx` draws its Trends
+sparklines through `useWorkloadTableMetricHistory` with `series: 'nodes'`, so
+it polls the infrastructure summary and no guest history. The embedded
+workloads table below it owns guest history and passes `series: 'guests'`.
+`ProxmoxNodesTable.test.tsx` pins the option; the per-page polling budget
+belongs to performance-and-scalability.
+
### Proxmox Storage reuses the shared product-family source scope
`frontend-modern/src/features/proxmox/ProxmoxPageSurface.tsx` mounts the
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 5231c21704..d970748a0f 100644
--- a/docs/release-control/v6/internal/subsystems/performance-and-scalability.md
+++ b/docs/release-control/v6/internal/subsystems/performance-and-scalability.md
@@ -1920,9 +1920,17 @@ internal persistent signal so the toggle and the hosts-table render
stay in lockstep. The history range remains inline in both display modes because
the default bars mode uses it for the intent-driven guest-row history lens.
Embedded sibling tables that opt into sparklines
-re-instantiate `useWorkloadTableMetricHistory`; the cache key matches
-the workloads-table reader so both readers dedupe their fetches and
-the canonical Workloads hot-path budget is preserved. Standalone
+re-instantiate `useWorkloadTableMetricHistory` and name the rows they draw
+through its required `series` option. The Proxmox nodes table passes
+`'nodes'` and polls only the infrastructure summary; the WorkloadsSurface
+reader passes `'guests'` and polls only the workloads history. Two readers
+on one page do not share reads: each forwards its own abort signal, which
+bypasses the summary caches' in-flight dedupe, and retained query values
+seed matching mounts and source changes without deduplicating requests. A
+reader therefore must not poll a summary its rows do not render. In Trends
+the vSphere overview polls only the workloads history, and the Proxmox
+overview polls the workloads history and the infrastructure summary once
+each. Standalone
WorkloadsSurface callers (no override props) keep the original
persistent-signal-backed behavior.
Every toolbar that controls a `WorkloadsSurface` consumes
@@ -1996,14 +2004,20 @@ The Workloads table metric display mode is part of the protected Workloads
hot path. Default bar mode keeps compact current-value bars at rest and swaps
only the active fine-pointer or keyboard-focused guest row to the original
sparklines; persistent Trends mode keeps sparklines visible for every rendered
-row. Bar mode does not hydrate estate history at rest: the selected range is
-local state until a row is active, then one centralized query reads only that
-guest's canonical metrics target from `/api/metrics-store/history`, capped at
-36 points. Equivalent live guest snapshots must not restart that request, and
-leaving the row disables it; per-row query owners, fan-out, and polling remain
-forbidden. Persistent Trends retains the shared, cache-keyed
-`fetchWorkloadsSummaryAndCache` / `fetchInfrastructureSummaryAndCache` reader
-for all rendered rows. Range-sensitive readers clear prior-range data when no
+row. Bar mode does not hydrate estate history at rest. With the history lens
+on, one centralized queue warms a bounded window instead: up to the first six
+guests of the mounted table window at rest, then the active guest first plus
+its next four and previous one, with at most four reads in flight and 18 cached rows. Each read
+targets one guest's canonical metrics target on `/api/metrics-store/history`,
+is capped at 36 points, and is never polled. Equivalent live guest snapshots
+must not restart a read. A range change or leaving the lens mode cancels
+pending and in-flight reads, while leaving a row lets its read settle into the
+bounded cache. Per-row query owners, estate-wide fan-out, and polling remain
+forbidden. Persistent Trends retains one cache-keyed
+`fetchWorkloadsSummaryAndCache` reader for all rendered guest rows. Grouped
+host rows render no metric cells, so the WorkloadsSurface reader never polls
+`fetchInfrastructureSummaryAndCache`; node series belong to the page's hosts
+table reader. Range-sensitive readers clear prior-range data when no
exact cache entry exists and forward cancellation so superseded range work
does not continue occupying browser connections. Sparkline ranges must stay
bounded to the governed compact table windows. Expanded history belongs in the existing guest drawer chart
diff --git a/docs/release-control/v6/internal/subsystems/unified-resources.md b/docs/release-control/v6/internal/subsystems/unified-resources.md
index d505a37b64..d60d234213 100644
--- a/docs/release-control/v6/internal/subsystems/unified-resources.md
+++ b/docs/release-control/v6/internal/subsystems/unified-resources.md
@@ -1535,7 +1535,10 @@ When every node shares one cluster and none is standalone, the model drops
the `cluster` column (it would repeat one value on every row) and
`ProxmoxNodesTable` names that cluster in the table header instead, visible
during search and independent of the inventory-count preference, so the
-cluster identity is never lost. Workload status buckets read the canonical
+cluster identity is never lost. Its Trends sparklines read node history
+through `useWorkloadTableMetricHistory` with `series: 'nodes'`; guest history
+stays with the embedded workloads table below it, so the nodes table adds no
+guest-history poll to the page. Workload status buckets read the canonical
health too: a running workload whose unified health names an open
`warning_alert` or `critical_alert` reason counts under Attention, while
`backup_stale` and other non-alert reasons do not.
diff --git a/frontend-modern/browser-verification/4e061179721ef90a.json b/frontend-modern/browser-verification/4e061179721ef90a.json
new file mode 100644
index 0000000000..2c87631f4c
--- /dev/null
+++ b/frontend-modern/browser-verification/4e061179721ef90a.json
@@ -0,0 +1,39 @@
+{
+ "version": 1,
+ "base_sha": "1fe9f86d55271345492945a25ab9398892ec6bf0",
+ "verified_at": "2026-10-06T22:35:29Z",
+ "result": "passed",
+ "changed_paths": [
+ "frontend-modern/src/components/Workloads/useWorkloadTableMetricHistory.ts",
+ "frontend-modern/src/components/Workloads/useWorkloadsState.ts",
+ "frontend-modern/src/features/proxmox/ProxmoxNodesTable.tsx"
+ ],
+ "content_sha256": {
+ "frontend-modern/src/components/Workloads/useWorkloadTableMetricHistory.ts": "1879e91c0eb901261d6497cc0245e2a72b8d0acc72414cd69d3369d187e59fc5",
+ "frontend-modern/src/components/Workloads/useWorkloadsState.ts": "0f710d2544c964ae36e04f5bdb1bb2e3f2db37deb9b1ad804df6909e22256fc9",
+ "frontend-modern/src/features/proxmox/ProxmoxNodesTable.tsx": "32a8c017790a55dc230585e189bbff5cd3e81ee932a80c4379fc1be3ea61172d"
+ },
+ "routes": ["/proxmox/overview", "/vmware"],
+ "viewports": [
+ {
+ "width": 1440,
+ "height": 900
+ },
+ {
+ "width": 390,
+ "height": 844
+ }
+ ],
+ "states": [
+ "Vite dev server serving this tree (based on PR 2622 head 1fe9f86d55) against a private DEMO_MODE mock backend (50 PVE nodes, 929 guests, 7 ESXi hosts, telemetry off), headless Chromium via Playwright; desktop 1440x900 and phone 390x844.",
+ "Trends mode, 95 s per page counted per 30 s poll tick, before (base files swapped back under the same server) vs after: /vmware went from 1 /api/charts/infrastructure + 1 /api/charts/workloads read per tick to 0 + 1; /proxmox/overview from 2 + 2 to 1 + 1. Same on both viewports (95 s totals: vmware 4+4 to 0+4, proxmox 8+8 to 4+4).",
+ "Proxmox nodes table in Trends: every rendered node row draws its CPU, memory and disk sparklines (36 of 36 on desktop, 18 of 18 on phone), same as before; guest table sparklines unchanged (Proxmox 420 desktop / 108 phone, vSphere 54).",
+ "Bars mode on /proxmox/overview: node table shows no sparklines and the page makes no /api/charts reads.",
+ "Screenshots of both tables in Trends inspected at both viewports. The only failed request is the read-only demo refusing POST /api/usage/workload-history (403), the Trends activity ping, which this change does not touch."
+ ],
+ "interactions": [
+ "Desktop: opened the View popover and switched Bars to Trends; phone: opened Filters, then View, and switched Bars to Trends. The Trends button reports aria-pressed=true and the switch triggers exactly one workloads read and one infrastructure read.",
+ "Navigated between /vmware and /proxmox/overview with Trends persisted and watched three poll cycles on each page.",
+ "Scrolled the nodes table into view before each capture."
+ ]
+}
diff --git a/frontend-modern/src/components/Workloads/__tests__/HistoryResponse.contract.test.tsx b/frontend-modern/src/components/Workloads/__tests__/HistoryResponse.contract.test.tsx
index f2a43447a8..85cb5ee0f2 100644
--- a/frontend-modern/src/components/Workloads/__tests__/HistoryResponse.contract.test.tsx
+++ b/frontend-modern/src/components/Workloads/__tests__/HistoryResponse.contract.test.tsx
@@ -205,6 +205,7 @@ describe('production History consumers reject unbound response evidence', () =>
onDemand: () => true,
range: () => '24h',
selectedNode: () => null,
+ series: 'guests',
});
return (
<output>
diff --git a/frontend-modern/src/components/Workloads/__tests__/WorkloadsSurface.performance.contract.test.tsx b/frontend-modern/src/components/Workloads/__tests__/WorkloadsSurface.performance.contract.test.tsx
index 7a272f8b5c..70b013dddc 100644
--- a/frontend-modern/src/components/Workloads/__tests__/WorkloadsSurface.performance.contract.test.tsx
+++ b/frontend-modern/src/components/Workloads/__tests__/WorkloadsSurface.performance.contract.test.tsx
@@ -452,6 +452,9 @@ describe('Workloads platform-page embed contract', () => {
expect(nodesTableSource).toContain('useWorkloadTableMetricHistory');
expect(nodesTableSource).toContain('MetricMiniSparkline');
expect(nodesTableSource).toContain('isSparklineMode');
+ // The hosts table draws node rows only: it polls the infrastructure
+ // summary and leaves guest history to the embedded workloads reader.
+ expect(nodesTableSource).toContain("series: 'nodes',");
});
it('lets platform pages move grouped host drawers to a dedicated host table owner', async () => {
@@ -1432,12 +1435,21 @@ describe('Workloads performance contract', () => {
expect(workloadsFilterModelSource).toContain('mobileTrailing?: JSX.Element;');
expect(workloadsStateSource).toContain('useWorkloadRouteState');
expect(workloadsStateSource).toContain('range: workloadMetricHistoryRange');
+ // Grouped node rows render no metric cells, so Trends on the Workloads
+ // surface must not poll the infrastructure summary.
+ expect(workloadsStateSource).toContain("series: 'guests',");
expect(workloadTableMetricHistoryStateSource).toContain(
'fetchWorkloadsSummaryAndCache(parsed.range',
);
expect(workloadTableMetricHistoryStateSource).toContain(
'fetchInfrastructureSummaryAndCache(parsed.range',
);
+ expect(workloadTableMetricHistoryStateSource).toContain(
+ "if (options.series !== 'guests' || !options.enabled()) return null;",
+ );
+ expect(workloadTableMetricHistoryStateSource).toContain(
+ "options.series === 'nodes' && options.enabled() ? buildHistoryScope(options.range()) : null",
+ );
expect(
workloadTableMetricHistoryStateSource.match(/retainPreviousValueOnSourceChange: false/g),
).toHaveLength(2);
diff --git a/frontend-modern/src/components/Workloads/__tests__/useWorkloadTableMetricHistory.test.tsx b/frontend-modern/src/components/Workloads/__tests__/useWorkloadTableMetricHistory.test.tsx
index 9acd3d5d4c..a176ba845b 100644
--- a/frontend-modern/src/components/Workloads/__tests__/useWorkloadTableMetricHistory.test.tsx
+++ b/frontend-modern/src/components/Workloads/__tests__/useWorkloadTableMetricHistory.test.tsx
@@ -4,10 +4,15 @@ import { createSignal, type Accessor } from 'solid-js';
import { ChartsAPI, type AllMetricsHistoryResponse } from '@/api/charts';
import { resetCreateNonSuspendingQueryCacheForTest } from '@/hooks/createNonSuspendingQuery';
+import type { Node } from '@/types/api';
import type { WorkloadGuest } from '@/types/workloads';
+import { __resetInfrastructureSummaryFetchesForTests } from '@/utils/infrastructureSummaryCache';
import { useWorkloadTableMetricHistory } from '../useWorkloadTableMetricHistory';
-import type { WorkloadTableMetricHistoryRange } from '../workloadMetricHistoryModel';
+import {
+ WORKLOAD_TABLE_HISTORY_POLL_MS,
+ type WorkloadTableMetricHistoryRange,
+} from '../workloadMetricHistoryModel';
const guest = {
id: 'cluster-a:pve1:101',
@@ -47,6 +52,7 @@ function HistoryProbe(props: {
prefetchGuests: props.prefetchGuests,
range: props.range,
selectedNode: () => null,
+ series: 'guests',
});
const activeHistoryValue = () => {
@@ -57,13 +63,75 @@ function HistoryProbe(props: {
return <div data-testid="active-history-value">{activeHistoryValue()}</div>;
}
+const node = { id: 'cluster-a-pve1', name: 'pve1', instance: 'cluster-a' } as Node;
+const point = (value: number) => [{ timestamp: 2, value, min: value, max: value }];
+
+function SeriesProbe(props: { series: 'guests' | 'nodes' }) {
+ const reader = useWorkloadTableMetricHistory({
+ enabled: () => true,
+ range: () => '1h',
+ series: props.series,
+ });
+ const latest = (series: ReturnType<typeof reader.getGuestMetricSeries>) =>
+ series[0]?.points.at(-1)?.value ?? 'none';
+
+ return (
+ <div data-testid="series-values">
+ {`guest=${latest(reader.getGuestMetricSeries(guest, 'cpu'))} node=${latest(
+ reader.getNodeMetricSeries(node, 'cpu'),
+ )}`}
+ </div>
+ );
+}
+
afterEach(() => {
cleanup();
resetCreateNonSuspendingQueryCacheForTest();
+ __resetInfrastructureSummaryFetchesForTests();
vi.restoreAllMocks();
+ vi.useRealTimers();
});
describe('useWorkloadTableMetricHistory', () => {
+ it.each([
+ ['guests', 'guest=11 node=none', 'workloads'],
+ ['nodes', 'guest=none node=22', 'infrastructure'],
+ ] as const)(
+ 'polls only the summary its %s rows read',
+ async (series, expectedValues, polledRoute) => {
+ vi.useFakeTimers();
+ const workloadSpy = vi.spyOn(ChartsAPI, 'getWorkloadCharts').mockResolvedValue({
+ data: { [guest.id]: { cpu: point(11) } },
+ dockerData: {},
+ guestTypes: {},
+ timestamp: 2,
+ stats: { oldestDataTimestamp: 1 },
+ });
+ const infrastructureSpy = vi
+ .spyOn(ChartsAPI, 'getInfrastructureSummaryCharts')
+ .mockResolvedValue({
+ nodeData: { [node.id]: { cpu: point(22) } },
+ timestamp: 2,
+ stats: { oldestDataTimestamp: 1 },
+ });
+ const [polledSpy, idleSpy] =
+ polledRoute === 'workloads'
+ ? [workloadSpy, infrastructureSpy]
+ : [infrastructureSpy, workloadSpy];
+
+ render(() => <SeriesProbe series={series} />);
+ await vi.advanceTimersByTimeAsync(0);
+
+ expect(screen.getByTestId('series-values')).toHaveTextContent(expectedValues);
+ expect(polledSpy).toHaveBeenCalledTimes(1);
+ expect(idleSpy).not.toHaveBeenCalled();
+
+ await vi.advanceTimersByTimeAsync(WORKLOAD_TABLE_HISTORY_POLL_MS * 2);
+ expect(polledSpy).toHaveBeenCalledTimes(3);
+ expect(idleSpy).not.toHaveBeenCalled();
+ },
+ );
+
it('bounds slow-estate warming and prioritizes a distant active guest', async () => {
const guests = Array.from({ length: 500 }, (_, index) => ({
...guest,
diff --git a/frontend-modern/src/components/Workloads/useWorkloadTableMetricHistory.ts b/frontend-modern/src/components/Workloads/useWorkloadTableMetricHistory.ts
index 9a0969b59f..768fdc4b55 100644
--- a/frontend-modern/src/components/Workloads/useWorkloadTableMetricHistory.ts
+++ b/frontend-modern/src/components/Workloads/useWorkloadTableMetricHistory.ts
@@ -37,7 +37,13 @@ interface WorkloadTableMetricHistoryOptions {
onDemand?: Accessor<boolean>;
prefetchGuests?: Accessor<readonly WorkloadGuest[]>;
range: Accessor<WorkloadTableMetricHistoryRange>;
- selectedNode: Accessor<string | null | undefined>;
+ selectedNode?: Accessor<string | null | undefined>;
+ // The rows this caller draws while `enabled`. Each estate-wide history is a
+ // polled summary read, so a reader polls only the one its rows consume:
+ // guest rows read the workloads summary, node rows the infrastructure
+ // summary. Readers do not share in-flight requests, so a second reader on
+ // the same page pays for its own reads.
+ series: 'guests' | 'nodes';
}
interface ActiveGuestHistoryQueryKey {
@@ -111,13 +117,13 @@ const buildActiveGuestHistoryCacheKey = (key: ActiveGuestHistoryQueryKey): strin
export function useWorkloadTableMetricHistory(
options: WorkloadTableMetricHistoryOptions,
): WorkloadMetricHistoryReader {
- const selectedNodeScope = createMemo(() => normalizeNodeScope(options.selectedNode()));
+ const selectedNodeScope = createMemo(() => normalizeNodeScope(options.selectedNode?.()));
const workloadHistoryScope = createMemo(() => {
- if (!options.enabled()) return null;
+ if (options.series !== 'guests' || !options.enabled()) return null;
return buildHistoryScope(options.range(), selectedNodeScope());
});
const infrastructureHistoryScope = createMemo(() =>
- options.enabled() ? buildHistoryScope(options.range()) : null,
+ options.series === 'nodes' && options.enabled() ? buildHistoryScope(options.range()) : null,
);
const workloadHistory = createNonSuspendingQuery<WorkloadChartsResponse, string>({
diff --git a/frontend-modern/src/components/Workloads/useWorkloadsState.ts b/frontend-modern/src/components/Workloads/useWorkloadsState.ts
index 195099789b..8b5b954709 100644
--- a/frontend-modern/src/components/Workloads/useWorkloadsState.ts
+++ b/frontend-modern/src/components/Workloads/useWorkloadsState.ts
@@ -575,6 +575,9 @@ export function useWorkloadsState(props: WorkloadsSurfaceProps) {
prefetchGuests: metricHistoryPrefetchGuests,
range: workloadMetricHistoryRange,
selectedNode,
+ // Grouped node rows carry no metric cells, so this reader never polls
+ // the infrastructure summary.
+ series: 'guests',
});
const [workloadHistoryHintSeen, setWorkloadHistoryHintSeen] = usePersistentSignal<boolean>(
STORAGE_KEYS.WORKLOADS_HISTORY_HINT_SEEN,
diff --git a/frontend-modern/src/features/proxmox/ProxmoxNodesTable.tsx b/frontend-modern/src/features/proxmox/ProxmoxNodesTable.tsx
index 191809f431..469b881f1e 100644
--- a/frontend-modern/src/features/proxmox/ProxmoxNodesTable.tsx
+++ b/frontend-modern/src/features/proxmox/ProxmoxNodesTable.tsx
@@ -258,12 +258,13 @@ export const ProxmoxNodesTable: Component<{
nodePreview.toggle();
};
- // Use the same canonical history reader the workloads table uses; cache
- // keys collide so the two readers dedupe their fetches.
+ // Use the same canonical history reader the workloads table uses. This
+ // table draws node rows only, so it polls the infrastructure summary and
+ // leaves the guest history to the workloads table below.
const metricHistory = useWorkloadTableMetricHistory({
enabled: isSparklineMode,
range: () => props.metricHistoryRange?.() ?? '1h',
- selectedNode: () => '',
+ series: 'nodes',
});
return (
diff --git a/frontend-modern/src/features/proxmox/__tests__/ProxmoxNodesTable.test.tsx b/frontend-modern/src/features/proxmox/__tests__/ProxmoxNodesTable.test.tsx
index fc4e8b9ae9..89b48696e1 100644
--- a/frontend-modern/src/features/proxmox/__tests__/ProxmoxNodesTable.test.tsx
+++ b/frontend-modern/src/features/proxmox/__tests__/ProxmoxNodesTable.test.tsx
@@ -1,4 +1,5 @@
import { cleanup, fireEvent, render, screen } from '@solidjs/testing-library';
+import { createSignal } from 'solid-js';
import { createStore } from 'solid-js/store';
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';
@@ -9,6 +10,7 @@ const nodeDrawerMock = vi.hoisted(() => vi.fn());
const activeAlertsMock = vi.hoisted(() => ({ value: {} as Record<string, unknown> }));
const getMetricThresholdsMock = vi.hoisted(() => vi.fn());
const temperatureGaugeMock = vi.hoisted(() => vi.fn());
+const metricHistoryMock = vi.hoisted(() => vi.fn());
vi.mock('@/hooks/useBreakpoint', () => ({
useBreakpoint: () => ({
@@ -63,9 +65,12 @@ vi.mock('@/components/shared/TemperatureGauge', () => ({
}));
vi.mock('@/components/Workloads/useWorkloadTableMetricHistory', () => ({
- useWorkloadTableMetricHistory: () => ({
- getNodeMetricSeries: () => [],
- }),
+ useWorkloadTableMetricHistory: (options: unknown) => {
+ metricHistoryMock(options);
+ return {
+ getNodeMetricSeries: () => [],
+ };
+ },
}));
vi.mock('@/components/Workloads/NodeDrawer', () => ({
@@ -578,6 +583,34 @@ describe('ProxmoxNodesTable', () => {
expect(screen.queryByTestId('temperature-gauge')).not.toBeInTheDocument();
});
+ it('reads node history only, and only while Trends is on', () => {
+ const [mode, setMode] = createSignal<'bars' | 'sparklines'>('bars');
+ render(() => (
+ <ProxmoxNodesTable
+ nodes={[makeNodeResource()]}
+ guests={[]}
+ metricDisplayMode={mode}
+ emptyIcon={<span />}
+ emptyTitle="No Proxmox VE nodes"
+ emptyDescription="No nodes"
+ />
+ ));
+
+ expect(metricHistoryMock).toHaveBeenCalledTimes(1);
+ const options = metricHistoryMock.mock.calls[0][0] as {
+ enabled: () => boolean;
+ selectedNode?: unknown;
+ series: string;
+ };
+ // Guest history belongs to the workloads table below; a second guest
+ // reader here would poll the workloads route for rows it never draws.
+ expect(options.series).toBe('nodes');
+ expect(options.selectedNode).toBeUndefined();
+ expect(options.enabled()).toBe(false);
+ setMode('sparklines');
+ expect(options.enabled()).toBe(true);
+ });
+
it('updates every availability signal when a live row becomes offline', () => {
const [state, setState] = createStore({
nodes: [makeNodeResource({ uptime: 187_200, temperature: 76 })],