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.

Show storage pool and disk history in the detail itself

rcourtmanf0108e4930d4
diff --git a/docs/release-control/v6/internal/subsystems/frontend-primitives.md b/docs/release-control/v6/internal/subsystems/frontend-primitives.md
index d0c1bab67b..b08240ab53 100644
--- a/docs/release-control/v6/internal/subsystems/frontend-primitives.md
+++ b/docs/release-control/v6/internal/subsystems/frontend-primitives.md
@@ -724,7 +724,8 @@ Disk detail composes shared HistoryChart owners from stable disk-family catalog
entries, independently of the latest optional temperature/SMART fields. Matching
snapshots must not recreate chart DOM, reset inspection or restart reads. Stored
series retain their own sample provenance; current collection unavailability is
-still reported in Overview, and empty history is not a manufactured zero. The
+still reported beside the SMART facts in the detail's single view (there is no
+History tab), and empty history is not a manufactured zero. The
shared target/range owner continues to cancel old selections and reject late
responses. `DiskDetail.history-collection.test.tsx` and the production
`browser-tests/disk-history-collection.cjs` fixture verify these boundaries with
diff --git a/docs/release-control/v6/internal/subsystems/storage-recovery.md b/docs/release-control/v6/internal/subsystems/storage-recovery.md
index 68e3cd98d6..1b3537c78b 100644
--- a/docs/release-control/v6/internal/subsystems/storage-recovery.md
+++ b/docs/release-control/v6/internal/subsystems/storage-recovery.md
@@ -2870,14 +2870,17 @@ canonical pre-handler authorization proof covering both transfer routes.
15. Keep storage chart identity on the shared storage path. Pool rows, disk
rows, the pool Growth column, and storage detail charts must all address
history through the canonical unified-resource metrics-target IDs.
- Expanded pool and physical-disk details must also follow the canonical
- object-detail information architecture: current configuration, topology,
- health, and SMART facts land on `Overview`; stored capacity and I/O charts
- land behind the shared `Subtabs` `History` tab; and the active range uses
- the shared filter-select presentation in that tab row. Storage must not
- place historical charts directly into the default detail view or restore
- the retired storage-local range-selector classes and inline SVG select
- decoration.
+ Expanded pool and physical-disk details follow the canonical
+ object-detail information architecture, which since 2026-10-13
+ (maintainer decision, carried from the resource drawers) keeps stored
+ history in the default view rather than behind a `History` tab: a pool
+ detail leads with its Capacity Trend card, whose header holds the range
+ picker, then configuration, topology and devices; a disk detail shows its
+ health verdict and SMART facts, then its History charts with the range
+ picker beside their heading, then live I/O. With only one view left, these
+ details render no `Subtabs` strip. The range picker keeps the shared
+ filter-select presentation; storage must not restore the retired
+ storage-local range-selector classes and inline SVG select decoration.
Storage-page pool growth readouts belong to that same contract: the table
may derive per-pool used-capacity deltas from the shared
`/api/storage-charts` summary payload, but it must not fan out row-local
@@ -3416,8 +3419,8 @@ outside the fixed remount budget.
`useStoragePoolsTableWindowing.ts` reconciles flattened group and pool items by
their stable logical key. A refreshed unified-resource snapshot updates the
-existing row proxy instead of remounting `StoragePoolDetail`, so the selected
-Overview/History tab and history range survive normal polling. Provider-derived
+existing row proxy instead of remounting `StoragePoolDetail`, so the open
+detail and its history range survive normal polling. Provider-derived
mock storage and Ceph rows resolve capacity history through their canonical
metrics target and receive deterministic `usage` fallback from current unified
capacity when no legacy history row exists. The row-identity regression and
diff --git a/frontend-modern/browser-verification/6c4c3f22cce447e6.json b/frontend-modern/browser-verification/6c4c3f22cce447e6.json
new file mode 100644
index 0000000000..08f2f3f314
--- /dev/null
+++ b/frontend-modern/browser-verification/6c4c3f22cce447e6.json
@@ -0,0 +1,38 @@
+{
+ "version": 1,
+ "base_sha": "5168ae6460521b8cf98149835037802b0c5e457f",
+ "verified_at": "2026-10-13T22:46:00Z",
+ "result": "passed",
+ "changed_paths": [
+ "frontend-modern/src/components/Storage/DiskDetail.tsx",
+ "frontend-modern/src/components/Storage/StoragePoolDetail.tsx"
+ ],
+ "content_sha256": {
+ "frontend-modern/src/components/Storage/DiskDetail.tsx": "c2d26c2153ed586b2685766dc4c7b1843dfbb46799eab8c7d5e6f266d8155367",
+ "frontend-modern/src/components/Storage/StoragePoolDetail.tsx": "0cb80626d85ff783b07495779a7f3791778dcbdbec4692aedfdff62369e2a753"
+ },
+ "routes": [
+ "/proxmox/storage",
+ "/proxmox/storage?tab=disks"
+ ],
+ "viewports": [
+ {
+ "width": 1440,
+ "height": 900
+ },
+ {
+ "width": 390,
+ "height": 844
+ }
+ ],
+ "states": [
+ "final built bytes of this tree (origin/main 170f726c93 plus PR 2918 and this change) embedded in a darwin binary, mock mode with 7 days of seeded metrics, headless Chromium on pulse-dev through a reverse tunnel, full-resolution element screenshots read by eye",
+ "pool detail (a zfspool service pool, East Production D): no tab strip; the Capacity Trend card leads with its range picker in the card header and the 7-day usage chart, followed by the Configuration and ZFS Pool cards",
+ "physical disk detail (WD Red Pro 8TB, Replace Now): no tab strip; the health verdict and Temperature SMART card, then a History heading with its range picker beside it over the Temperature and Reallocated Sectors charts, then Live I/O (30m) with Read, Write and Busy",
+ "390px phone: both details stack their cards in one column with no horizontal overflow"
+ ],
+ "interactions": [
+ "expanded a service pool row on /proxmox/storage and the first physical disk row on the Physical Disks tab at 1440 and 390px",
+ "counted tab strips inside each detail (0) and confirmed the capacity trend and disk history sections render on open"
+ ]
+}
diff --git a/frontend-modern/src/components/Storage/DiskDetail.tsx b/frontend-modern/src/components/Storage/DiskDetail.tsx
index 984a5b80ab..93dee13ebb 100644
--- a/frontend-modern/src/components/Storage/DiskDetail.tsx
+++ b/frontend-modern/src/components/Storage/DiskDetail.tsx
@@ -1,9 +1,8 @@
-import { Component, For, Show, createEffect, createMemo, createSignal } from 'solid-js';
+import { Component, For, Show, createEffect, createMemo } from 'solid-js';
import type { Resource } from '@/types/resource';
import { FormSelect } from '@/components/shared/FormSelect';
import { filterSelectClass } from '@/components/shared/FilterToolbar';
import { HistoryChart, HistoryChartHoverGroup } from '@/components/shared/HistoryChart';
-import { Subtabs, type SubtabOption } from '@/components/shared/Subtabs';
import type { HistoryTimeRange } from '@/api/charts';
import { maxHistoryDays } from '@/stores/license';
import {
@@ -25,6 +24,7 @@ import {
STORAGE_DETAIL_BADGE_CLASS,
STORAGE_DETAIL_CARD_CLASS,
STORAGE_DETAIL_EMPTY_CLASS,
+ STORAGE_DETAIL_HEADER_ROW_CLASS,
STORAGE_DISK_DETAIL_ATTRIBUTE_GRID_CLASS,
STORAGE_DISK_DETAIL_HEADER_CLASS,
STORAGE_DISK_DETAIL_HISTORY_GRID_CLASS,
@@ -50,10 +50,7 @@ interface DiskDetailProps {
alertResourceIds?: string[];
}
-type DiskDetailTab = 'overview' | 'history';
-
export const DiskDetail: Component<DiskDetailProps> = (props) => {
- const [activeTab, setActiveTab] = createSignal<DiskDetailTab>('overview');
const {
chartRange,
setChartRange,
@@ -72,9 +69,6 @@ export const DiskDetail: Component<DiskDetailProps> = (props) => {
const rangeOptions = createMemo(() =>
getUnlockedHistoryRangeOptions(DISK_DETAIL_HISTORY_RANGE_OPTIONS, maxHistoryDays()),
);
- const hasHistory = createMemo(
- () => Boolean(historyResourceId()) || Boolean(metricResourceId() && liveIOAvailable()),
- );
const hasOverviewDetails = createMemo(
() => collectionMessages().length > 0 || attributeCards().length > 0,
);
@@ -90,12 +84,6 @@ export const DiskDetail: Component<DiskDetailProps> = (props) => {
}
});
- createEffect(() => {
- if (activeTab() === 'history' && !hasHistory()) {
- setActiveTab('overview');
- }
- });
-
return (
<div class={STORAGE_DISK_DETAIL_ROOT_CLASS}>
<div class={STORAGE_DISK_DETAIL_HEADER_CLASS}>
@@ -128,34 +116,9 @@ export const DiskDetail: Component<DiskDetailProps> = (props) => {
</div>
</div>
- <Subtabs
- class="mb-1"
- ariaLabel="Physical disk detail sections"
- value={activeTab()}
- onChange={(value) => setActiveTab(value as DiskDetailTab)}
- tabs={[
- { value: 'overview', label: 'Overview' },
- ...(hasHistory() ? [{ value: 'history', label: 'History' } satisfies SubtabOption] : []),
- ]}
- trailing={
- <Show when={activeTab() === 'history'}>
- <FormSelect
- label="Disk history range"
- labelClass="sr-only"
- fieldBaseClass="contents"
- value={chartRange()}
- onChange={(event) => setChartRange(event.currentTarget.value as HistoryTimeRange)}
- selectBaseClass={`${filterSelectClass} h-7 min-h-11 py-0 text-[11px] sm:min-h-0`}
- >
- <For each={rangeOptions()}>
- {(option) => <option value={option.value}>{option.label}</option>}
- </For>
- </FormSelect>
- </Show>
- }
- />
-
- <div class={activeTab() === 'overview' ? 'space-y-3' : 'hidden'}>
+ {/* One view: the SMART evidence behind the health verdict, then its
+ trend and live I/O. There is no separate History tab. */}
+ <div class="space-y-3">
<Show when={collectionMessages().length > 0}>
<div class={STORAGE_DETAIL_EMPTY_CLASS} role="status">
<For each={collectionMessages()}>{(message) => <p>{message}</p>}</For>
@@ -181,81 +144,92 @@ export const DiskDetail: Component<DiskDetailProps> = (props) => {
Detailed SMART attributes are not available for this disk.
</div>
</Show>
- </div>
- <div class={`[overflow-anchor:none] ${activeTab() === 'history' ? 'space-y-3' : 'hidden'}`}>
- <Show when={activeTab() === 'history'}>
- <Show when={metricResourceId() && liveIOAvailable()}>
- <div class={STORAGE_DISK_DETAIL_SECTION_CLASS}>
- <h4
- class={`${STORAGE_DETAIL_SECTION_TITLE_CLASS} ${STORAGE_DISK_DETAIL_SECTION_HEADING_CLASS}`}
+ <Show
+ when={historyResourceId()}
+ fallback={
+ <div class={STORAGE_DETAIL_EMPTY_CLASS}>{getDiskDetailHistoryFallbackMessage()}</div>
+ }
+ >
+ <div class={STORAGE_DISK_DETAIL_SECTION_CLASS} data-testid="disk-detail-history">
+ <div class={STORAGE_DETAIL_HEADER_ROW_CLASS}>
+ <h4 class={STORAGE_DETAIL_SECTION_TITLE_CLASS}>History</h4>
+ <FormSelect
+ label="Disk history range"
+ labelClass="sr-only"
+ fieldBaseClass="contents"
+ value={chartRange()}
+ onChange={(event) => setChartRange(event.currentTarget.value as HistoryTimeRange)}
+ selectBaseClass={`${filterSelectClass} h-7 min-h-11 py-0 text-[11px] sm:min-h-0`}
>
- Live I/O (30m)
- <span class={STORAGE_DETAIL_BADGE_CLASS}>{getDiskDetailLiveBadgeLabel()}</span>
- </h4>
- <HistoryChartHoverGroup>
- <div class={STORAGE_DISK_DETAIL_LIVE_GRID_CLASS}>
- <For each={DISK_DETAIL_LIVE_CHARTS}>
- {(chart) => (
- <div class={STORAGE_DETAIL_CARD_CLASS}>
- <HistoryChart
- resourceType="disk"
- resourceId={metricResourceId()!}
- metric={
- chart.series === 'read'
- ? 'diskread'
- : chart.series === 'write'
- ? 'diskwrite'
- : 'disk'
- }
- label={chart.label}
- unit={chart.unit}
- range="30m"
- hideSelector
- hideLock
- height={120}
- compact={true}
- />
- </div>
- )}
- </For>
- </div>
- </HistoryChartHoverGroup>
+ <For each={rangeOptions()}>
+ {(option) => <option value={option.value}>{option.label}</option>}
+ </For>
+ </FormSelect>
</div>
- </Show>
+ <HistoryChartHoverGroup>
+ <div class={STORAGE_DISK_DETAIL_HISTORY_GRID_CLASS}>
+ <For each={historyCharts()}>
+ {(chart) => (
+ <div class={STORAGE_DETAIL_CARD_CLASS}>
+ <HistoryChart
+ resourceType="disk"
+ resourceId={historyResourceId()!}
+ metric={chart.metric}
+ label={chart.label}
+ unit={chart.unit}
+ height={120}
+ color={chart.color}
+ range={chartRange()}
+ hideSelector={true}
+ compact={true}
+ hideLock={true}
+ />
+ </div>
+ )}
+ </For>
+ </div>
+ </HistoryChartHoverGroup>
+ </div>
+ </Show>
- <Show
- when={historyResourceId()}
- fallback={
- <div class={STORAGE_DETAIL_EMPTY_CLASS}>{getDiskDetailHistoryFallbackMessage()}</div>
- }
- >
- <div class={STORAGE_DISK_DETAIL_SECTION_CLASS}>
- <HistoryChartHoverGroup>
- <div class={STORAGE_DISK_DETAIL_HISTORY_GRID_CLASS}>
- <For each={historyCharts()}>
- {(chart) => (
- <div class={STORAGE_DETAIL_CARD_CLASS}>
- <HistoryChart
- resourceType="disk"
- resourceId={historyResourceId()!}
- metric={chart.metric}
- label={chart.label}
- unit={chart.unit}
- height={120}
- color={chart.color}
- range={chartRange()}
- hideSelector={true}
- compact={true}
- hideLock={true}
- />
- </div>
- )}
- </For>
- </div>
- </HistoryChartHoverGroup>
- </div>
- </Show>
+ <Show when={metricResourceId() && liveIOAvailable()}>
+ <div class={STORAGE_DISK_DETAIL_SECTION_CLASS}>
+ <h4
+ class={`${STORAGE_DETAIL_SECTION_TITLE_CLASS} ${STORAGE_DISK_DETAIL_SECTION_HEADING_CLASS}`}
+ >
+ Live I/O (30m)
+ <span class={STORAGE_DETAIL_BADGE_CLASS}>{getDiskDetailLiveBadgeLabel()}</span>
+ </h4>
+ <HistoryChartHoverGroup>
+ <div class={STORAGE_DISK_DETAIL_LIVE_GRID_CLASS}>
+ <For each={DISK_DETAIL_LIVE_CHARTS}>
+ {(chart) => (
+ <div class={STORAGE_DETAIL_CARD_CLASS}>
+ <HistoryChart
+ resourceType="disk"
+ resourceId={metricResourceId()!}
+ metric={
+ chart.series === 'read'
+ ? 'diskread'
+ : chart.series === 'write'
+ ? 'diskwrite'
+ : 'disk'
+ }
+ label={chart.label}
+ unit={chart.unit}
+ range="30m"
+ hideSelector
+ hideLock
+ height={120}
+ compact={true}
+ />
+ </div>
+ )}
+ </For>
+ </div>
+ </HistoryChartHoverGroup>
+ </div>
</Show>
</div>
</div>
diff --git a/frontend-modern/src/components/Storage/StoragePoolDetail.tsx b/frontend-modern/src/components/Storage/StoragePoolDetail.tsx
index 5de78815cb..091db7582b 100644
--- a/frontend-modern/src/components/Storage/StoragePoolDetail.tsx
+++ b/frontend-modern/src/components/Storage/StoragePoolDetail.tsx
@@ -1,9 +1,8 @@
-import { Component, For, Show, createEffect, createMemo, createSignal } from 'solid-js';
+import { Component, For, Show, createEffect, createMemo } from 'solid-js';
import { FormSelect } from '@/components/shared/FormSelect';
import { filterSelectClass } from '@/components/shared/FilterToolbar';
import { HistoryChart } from '@/components/shared/HistoryChart';
import { StatusDot } from '@/components/shared/StatusDot';
-import { Subtabs } from '@/components/shared/Subtabs';
import type { HistoryTimeRange } from '@/api/charts';
import { maxHistoryDays } from '@/stores/license';
import {
@@ -53,10 +52,7 @@ interface StoragePoolDetailProps {
controlsId?: string;
}
-type StoragePoolDetailTab = 'overview' | 'history';
-
export const StoragePoolDetail: Component<StoragePoolDetailProps> = (props) => {
- const [activeTab, setActiveTab] = createSignal<StoragePoolDetailTab>('overview');
const { getDiskTemperatureThresholds } = useAlertsActivation();
const {
chartRange,
@@ -90,36 +86,40 @@ export const StoragePoolDetail: Component<StoragePoolDetailProps> = (props) => {
<tr class={STORAGE_DETAIL_ROW_CLASS} data-inline-detail-for={props.summarySeriesId}>
<td id={props.controlsId} colSpan={99} class={STORAGE_DETAIL_CELL_CLASS}>
<div class="space-y-3">
- <Subtabs
- class="mb-1"
- ariaLabel="Storage pool detail sections"
- value={activeTab()}
- onChange={(value) => setActiveTab(value as StoragePoolDetailTab)}
- tabs={[
- { value: 'overview', label: 'Overview' },
- { value: 'history', label: 'History' },
- ]}
- trailing={
- <Show when={activeTab() === 'history'}>
- <FormSelect
- label="Capacity history range"
- labelClass="sr-only"
- fieldBaseClass="contents"
- value={chartRange()}
- onChange={(event) => setChartRange(event.currentTarget.value as HistoryTimeRange)}
- selectBaseClass={`${filterSelectClass} h-7 min-h-11 py-0 text-[11px] sm:min-h-0`}
- >
- <For each={rangeOptions()}>
- {(option) => <option value={option.value}>{option.label}</option>}
- </For>
- </FormSelect>
- </Show>
- }
- />
+ {/* The capacity trend leads: "is this pool filling up?" is answered
+ before topology and devices. There is no separate History tab
+ repeating it. */}
+ <div class={STORAGE_DETAIL_CARD_CLASS} data-testid="storage-pool-capacity-trend">
+ <div class={STORAGE_DETAIL_HEADER_ROW_CLASS}>
+ <h4 class={STORAGE_DETAIL_SECTION_TITLE_CLASS}>Capacity Trend</h4>
+ <FormSelect
+ label="Capacity history range"
+ labelClass="sr-only"
+ fieldBaseClass="contents"
+ value={chartRange()}
+ onChange={(event) => setChartRange(event.currentTarget.value as HistoryTimeRange)}
+ selectBaseClass={`${filterSelectClass} h-7 min-h-11 py-0 text-[11px] sm:min-h-0`}
+ >
+ <For each={rangeOptions()}>
+ {(option) => <option value={option.value}>{option.label}</option>}
+ </For>
+ </FormSelect>
+ </div>
+ <HistoryChart
+ resourceType={chartTarget().resourceType}
+ resourceId={chartTarget().resourceId || props.record.id}
+ metric="usage"
+ label="Usage"
+ unit="%"
+ height={140}
+ range={chartRange()}
+ hideSelector
+ compact
+ hideLock
+ />
+ </div>
- <div
- class={`[overflow-anchor:none] ${activeTab() === 'overview' ? STORAGE_DETAIL_ROOT_GRID_CLASS : 'hidden'}`}
- >
+ <div class={STORAGE_DETAIL_ROOT_GRID_CLASS}>
<Show when={topologyRows().length > 0}>
<div class={STORAGE_DETAIL_CARD_CLASS}>
<h4 class={STORAGE_DETAIL_SECTION_TITLE_SPACED_CLASS}>Topology</h4>
@@ -309,28 +309,6 @@ export const StoragePoolDetail: Component<StoragePoolDetailProps> = (props) => {
</div>
</Show>
</div>
-
- <div class={`[overflow-anchor:none] ${activeTab() === 'history' ? '' : 'hidden'}`}>
- <Show when={activeTab() === 'history'}>
- <div class={STORAGE_DETAIL_CARD_CLASS}>
- <div class={STORAGE_DETAIL_HEADER_ROW_CLASS}>
- <h4 class={STORAGE_DETAIL_SECTION_TITLE_CLASS}>Capacity Trend</h4>
- </div>
- <HistoryChart
- resourceType={chartTarget().resourceType}
- resourceId={chartTarget().resourceId || props.record.id}
- metric="usage"
- label="Usage"
- unit="%"
- height={140}
- range={chartRange()}
- hideSelector
- compact
- hideLock
- />
- </div>
- </Show>
- </div>
</div>
</td>
</tr>
diff --git a/frontend-modern/src/components/Storage/__tests__/DiskDetail.history-collection.test.tsx b/frontend-modern/src/components/Storage/__tests__/DiskDetail.history-collection.test.tsx
index bfbd263fd4..63e7b64981 100644
--- a/frontend-modern/src/components/Storage/__tests__/DiskDetail.history-collection.test.tsx
+++ b/frontend-modern/src/components/Storage/__tests__/DiskDetail.history-collection.test.tsx
@@ -82,7 +82,8 @@ const response = (
});
const description = (canvas: HTMLElement) =>
document.getElementById(canvas.getAttribute('aria-describedby')!)!;
-const openHistory = () => fireEvent.click(screen.getByRole('tab', { name: 'History' }));
+// History charts sit in the disk detail's single view; nothing to open.
+const openHistory = () => undefined;
beforeEach(() => {
request.mockReset().mockImplementation(async (params) => response(params));
@@ -172,9 +173,13 @@ describe('Disk History independently of current collection', () => {
expect(description(thermal)).toHaveTextContent('42°C');
expect(screen.getByRole('img', { name: 'Reallocated Sectors chart' })).toBeInTheDocument();
expect(request).toHaveBeenCalledTimes(reads);
- fireEvent.click(screen.getByRole('tab', { name: 'Overview' }));
+ // The SMART cards share the view with the charts: the current reading is
+ // withdrawn there while the stored observation stays on the chart.
expect(screen.getByText(/Temperature is temporarily unavailable/)).toBeVisible();
- expect(screen.queryByText('42°C')).not.toBeInTheDocument();
+ // 42°C survives only as the chart's stored reading, never as a current card.
+ for (const reading of screen.getAllByText('42°C')) {
+ expect(reading.closest('[data-testid="disk-detail-history"]')).not.toBeNull();
+ }
});
it('ignores an old target completion and uses only the explicit new disk target', async () => {
@@ -254,7 +259,7 @@ describe('Disk History independently of current collection', () => {
nodes={[]}
/>
));
- expect(screen.queryByRole('tab', { name: 'History' })).not.toBeInTheDocument();
+ expect(screen.getByText(/Historical disk charts are unavailable/)).toBeInTheDocument();
expect(request).not.toHaveBeenCalled();
});
});
diff --git a/frontend-modern/src/components/Storage/__tests__/DiskDetail.test.tsx b/frontend-modern/src/components/Storage/__tests__/DiskDetail.test.tsx
index 6d921d6624..26fc8d7c87 100644
--- a/frontend-modern/src/components/Storage/__tests__/DiskDetail.test.tsx
+++ b/frontend-modern/src/components/Storage/__tests__/DiskDetail.test.tsx
@@ -1,4 +1,4 @@
-import { fireEvent, render, screen, within } from '@solidjs/testing-library';
+import { render, screen, within } from '@solidjs/testing-library';
import { createSignal, type JSX } from 'solid-js';
import { describe, expect, it, vi } from 'vitest';
import { DiskDetail } from '@/components/Storage/DiskDetail';
@@ -54,10 +54,8 @@ describe('DiskDetail', () => {
it('keeps disk detail range choices inside the current history entitlement', () => {
render(() => <DiskDetail disk={buildDisk()} nodes={[]} />);
- expect(screen.getByRole('tab', { name: 'Overview' })).toHaveAttribute('aria-selected', 'true');
- expect(screen.queryByRole('combobox', { name: 'Disk history range' })).not.toBeInTheDocument();
-
- fireEvent.click(screen.getByRole('tab', { name: 'History' }));
+ // One view: no tab strip, the range picker sits beside the history charts.
+ expect(screen.queryByRole('tab')).not.toBeInTheDocument();
const rangeSelector = screen.getByRole('combobox', {
name: 'Disk history range',
@@ -72,7 +70,6 @@ describe('DiskDetail', () => {
]);
expect(Array.from(rangeSelector.options).map((option) => option.value)).not.toContain('14d');
expect(Array.from(rangeSelector.options).map((option) => option.value)).not.toContain('90d');
- expect(screen.getByRole('tab', { name: 'History' })).toHaveAttribute('aria-selected', 'true');
expect(screen.getAllByTestId('history-chart-hover-group')).toHaveLength(2);
});
@@ -184,7 +181,6 @@ describe('DiskDetail', () => {
delete disk.physicalDisk!.smart;
disk.physicalDisk!.collection = { io: { state: 'unsupported' } };
render(() => <DiskDetail disk={disk} nodes={[]} />);
- fireEvent.click(screen.getByRole('tab', { name: 'History' }));
expect(screen.getAllByTestId('history-chart').map((chart) => chart.textContent)).toEqual([
'disk:agent-tower:sda:smart_temp:24h',
'disk:agent-tower:sda:smart_reallocated_sectors:24h',
diff --git a/frontend-modern/src/components/Storage/__tests__/Storage.test.tsx b/frontend-modern/src/components/Storage/__tests__/Storage.test.tsx
index 9ab48f90c8..9e8cb8d55b 100644
--- a/frontend-modern/src/components/Storage/__tests__/Storage.test.tsx
+++ b/frontend-modern/src/components/Storage/__tests__/Storage.test.tsx
@@ -1110,7 +1110,6 @@ describe('Storage', () => {
render(() => <Storage />);
fireEvent.click(screen.getByRole('button', { name: 'Expand tank' }));
- fireEvent.click(await screen.findByRole('tab', { name: 'History' }));
await waitFor(() => {
expect(metricsHistorySpy).toHaveBeenCalledWith(
diff --git a/frontend-modern/src/components/Storage/__tests__/StoragePoolDetail.ownership.test.tsx b/frontend-modern/src/components/Storage/__tests__/StoragePoolDetail.ownership.test.tsx
index b3a08bed5f..cd1da391da 100644
--- a/frontend-modern/src/components/Storage/__tests__/StoragePoolDetail.ownership.test.tsx
+++ b/frontend-modern/src/components/Storage/__tests__/StoragePoolDetail.ownership.test.tsx
@@ -1,5 +1,5 @@
import { createSignal } from 'solid-js';
-import { fireEvent, render, screen } from '@solidjs/testing-library';
+import { render, screen } from '@solidjs/testing-library';
import { describe, expect, it, vi } from 'vitest';
import { StoragePoolDetail } from '../StoragePoolDetail';
import { buildStorageRecords } from '@/features/storageBackups/storageAdapters';
@@ -69,8 +69,6 @@ describe('Storage pool ownership through live snapshots', () => {
expect(screen.getByText('Peer disk')).toBeVisible();
expect(screen.getByText('99 errors')).toBeVisible();
expect(screen.getByText('82°C')).toBeVisible();
- fireEvent.click(screen.getByRole('tab', { name: 'History' }));
- fireEvent.click(screen.getByRole('tab', { name: 'Overview' }));
expect(screen.getByText('Peer disk')).toBeVisible();
setResource(pool(undefined));
diff --git a/frontend-modern/src/components/Storage/__tests__/StoragePoolDetail.test.tsx b/frontend-modern/src/components/Storage/__tests__/StoragePoolDetail.test.tsx
index 41f50ab844..f787f16b9c 100644
--- a/frontend-modern/src/components/Storage/__tests__/StoragePoolDetail.test.tsx
+++ b/frontend-modern/src/components/Storage/__tests__/StoragePoolDetail.test.tsx
@@ -100,9 +100,6 @@ describe('StoragePoolDetail', () => {
</table>
));
- expect(screen.queryByTestId('history-chart')).not.toBeInTheDocument();
- fireEvent.click(screen.getByRole('tab', { name: 'History' }));
-
expect(screen.getByTestId('history-chart')).toHaveTextContent('storage:pool:tank:usage');
expect(historyChartSpy).toHaveBeenCalledWith(
expect.objectContaining({
@@ -131,8 +128,6 @@ describe('StoragePoolDetail', () => {
</table>
));
- fireEvent.click(screen.getByRole('tab', { name: 'History' }));
-
const rangeSelector = screen.getByRole('combobox', {
name: 'Capacity history range',
}) as HTMLSelectElement;
@@ -167,8 +162,6 @@ describe('StoragePoolDetail', () => {
</table>
));
- fireEvent.click(screen.getByRole('tab', { name: 'History' }));
-
expect(screen.getByTestId('history-chart')).toHaveTextContent('storage:pve1:local-zfs:usage');
expect(historyChartSpy).toHaveBeenCalledWith(
expect.objectContaining({
@@ -281,7 +274,7 @@ describe('StoragePoolDetail', () => {
expect(screen.getByText('16 errors')).toBeInTheDocument();
});
- it('uses the canonical overview and history detail navigation', () => {
+ it('shows the capacity trend and the pool details in one view, trend first', () => {
render(() => (
<table>
<tbody>
@@ -290,16 +283,14 @@ describe('StoragePoolDetail', () => {
</table>
));
- expect(screen.getByRole('tab', { name: 'Overview' })).toHaveAttribute('aria-selected', 'true');
- expect(screen.getByRole('tab', { name: 'History' })).toHaveAttribute('aria-selected', 'false');
- expect(screen.getByText('Configuration')).toBeVisible();
- expect(screen.queryByText('Capacity Trend')).not.toBeInTheDocument();
-
- fireEvent.click(screen.getByRole('tab', { name: 'History' }));
-
- expect(screen.getByRole('tab', { name: 'History' })).toHaveAttribute('aria-selected', 'true');
- expect(screen.getByText('Capacity Trend')).toBeVisible();
- expect(screen.getByText('Configuration').closest('.hidden')).not.toBeNull();
+ expect(screen.queryByRole('tab')).not.toBeInTheDocument();
+ const trend = screen.getByTestId('storage-pool-capacity-trend');
+ const configuration = screen.getByText('Configuration');
+ expect(trend).toBeVisible();
+ expect(configuration).toBeVisible();
+ expect(
+ trend.compareDocumentPosition(configuration) & Node.DOCUMENT_POSITION_FOLLOWING,
+ ).toBeTruthy();
});
it('renders linked host-agent ZFS datasets inside the expanded pool detail', () => {
diff --git a/frontend-modern/src/components/Workloads/__tests__/GuestPhysicalDisks.test.tsx b/frontend-modern/src/components/Workloads/__tests__/GuestPhysicalDisks.test.tsx
index 67dfde10e2..b29495882f 100644
--- a/frontend-modern/src/components/Workloads/__tests__/GuestPhysicalDisks.test.tsx
+++ b/frontend-modern/src/components/Workloads/__tests__/GuestPhysicalDisks.test.tsx
@@ -81,7 +81,9 @@ describe('GuestPhysicalDisks', () => {
const row = within(card).getByTestId('guest-physical-disk') as HTMLDetailsElement;
row.open = true;
fireEvent(row, new Event('toggle'));
- expect(await within(card).findByText('Reallocated Sectors')).toBeInTheDocument();
+ // The SMART card and the disk's Reallocated Sectors history chart both
+ // name the attribute once the detail is open.
+ expect((await within(card).findAllByText('Reallocated Sectors')).length).toBeGreaterThan(0);
expect(within(card).getByText('Pending Sectors')).toBeInTheDocument();
expect(within(card).getByText('CRC Errors')).toBeInTheDocument();
expect(within(card).getAllByTestId('guest-physical-disk')).toHaveLength(1);
diff --git a/frontend-modern/src/components/shared/SharedPrimitives.guardrails.test.ts b/frontend-modern/src/components/shared/SharedPrimitives.guardrails.test.ts
index 6605d8a41a..99c5827744 100644
--- a/frontend-modern/src/components/shared/SharedPrimitives.guardrails.test.ts
+++ b/frontend-modern/src/components/shared/SharedPrimitives.guardrails.test.ts
@@ -1303,11 +1303,12 @@ describe('shared primitive guardrails', () => {
expect(subtabsSource).toContain('sm:hidden');
});
- it('keeps object detail history behind the canonical Overview and History subtabs', () => {
+ it('charts object detail history in the detail itself, not behind a History tab', () => {
+ // Storage disk and pool details had only Overview and History, so with the
+ // charts in the one view they need no tab strip at all.
for (const source of [diskDetailSource, storagePoolDetailSource]) {
- expect(source).toContain('@/components/shared/Subtabs');
- expect(source).toContain("value: 'overview', label: 'Overview'");
- expect(source).toContain("value: 'history', label: 'History'");
+ expect(source).not.toContain('@/components/shared/Subtabs');
+ expect(source).not.toContain("value: 'history', label: 'History'");
}
// Guest, node, Docker host and resource-detail drawers chart their history
// on Overview itself, with the range picker beside the charts. A History
@@ -1324,7 +1325,7 @@ describe('shared primitive guardrails', () => {
for (const storageDetailSource of [diskDetailSource, storagePoolDetailSource]) {
expect(storageDetailSource).toContain('filterSelectClass');
- expect(storageDetailSource).toContain("activeTab() === 'history'");
+ expect(storageDetailSource).not.toContain('activeTab()');
expect(storageDetailSource).not.toContain('STORAGE_DETAIL_SELECT_CLASS');
expect(storageDetailSource).not.toContain('STORAGE_DETAIL_HEADER_SELECT_CLASS');
}