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
Repair the remaining drawer and storage history browser proofs
rcourtman8342a35332f2
diff --git a/frontend-modern/browser-tests/disk-history-collection.cjs b/frontend-modern/browser-tests/disk-history-collection.cjsindex c8492ba1e4..55e44ccd8c 100644--- a/frontend-modern/browser-tests/disk-history-collection.cjs+++ b/frontend-modern/browser-tests/disk-history-collection.cjs@@ -134,17 +134,17 @@ const parent = false;);await page.goto('http://127.0.0.1:5251/browser-tests/disk-history-collection.html');if (phone) await page.evaluate(() => document.documentElement.classList.add('dark'));- await page.getByRole('tab', { name: 'History' }).click();+ // Disk details have no tabs: SMART evidence, then History, in one view.+ const historySection = page.getByTestId('disk-detail-history');+ await historySection.waitFor();await page.waitForTimeout(300);await check('Stored ATA history is accessible before any current fields', async () => {assert.equal(await page.locator('canvas[role="img"]').count(), 2);assert.match(await description(), /42°C/);});- await check('History selection matches its visible content', async () => {- assert.equal(- await page.getByRole('tab', { name: 'History' }).getAttribute('aria-selected'),- 'true',- );+ await check('History shows without a tab to select', async () => {+ assert.equal(await page.getByRole('tab').count(), 0);+ assert.equal(await historySection.isVisible(), true);});await screenshot('missing-current');await page.getByRole('button', { name: 'Restore current fields' }).click();@@ -203,9 +203,8 @@ const parent = false;);await screenshot('missing-again');if (!parent) {- await page.getByRole('tab', { name: 'Overview' }).click();await check(- 'Overview reports unavailable collection rather than the old temperature',+ 'Details report unavailable collection rather than the old temperature',async () => {assert.equal(await page@@ -213,10 +212,21 @@ const parent = false;.isVisible(),true,);- assert.equal(await page.getByText('42°C', { exact: true }).count(), 0);+ // Stored history may show the old 42°C; the current fields must not.+ assert.equal(+ await page.evaluate(+ () =>+ [...document.querySelectorAll('main *')].filter(+ (el) =>+ el.children.length === 0 &&+ el.textContent.trim() === '42°C' &&+ !el.closest('[data-testid="disk-detail-history"]'),+ ).length,+ ),+ 0,+ );},);- await page.getByRole('tab', { name: 'History' }).click();await page.getByRole('combobox').selectOption('1h');await page.getByText('No history samples in this time range.').waitFor();await check(@@ -258,7 +268,7 @@ const parent = false;await check('Unresolvable identity withdraws History and does not guess a target',async () => {- assert.equal(await page.getByRole('tab', { name: 'History' }).count(), 0);+ assert.equal(await historySection.count(), 0);assert.equal(await page.locator('canvas[role="img"]').count(), 0);assert.equal(requests.length, beforeClear);},diff --git a/frontend-modern/browser-tests/drawer-snapshot.cjs b/frontend-modern/browser-tests/drawer-snapshot.cjsindex a82737edf2..4362ec7bf4 100644--- a/frontend-modern/browser-tests/drawer-snapshot.cjs+++ b/frontend-modern/browser-tests/drawer-snapshot.cjs@@ -117,10 +117,10 @@ const parent = false;screenshot,});};- await detail.getByRole('tab', { name: 'History', exact: true }).click();+ // History charts sit on Overview; there is no History tab to open.await detail.getByRole('combobox', { name: 'History range' }).selectOption('7d');await detail.getByText('12.0%', { exact: true }).waitFor();- const history = await detail.getByTestId('resource-metrics-history-tab').elementHandle();+ const history = await detail.getByTestId('resource-metrics-history').elementHandle();await page.getByRole('button', { name: 'Update PBS A', exact: true }).click();await detail.getByRole('heading', { name: parent ? 'PBS A' : 'PBS A current', exact: true })@@ -133,14 +133,14 @@ const parent = false;assert.ok(await history.evaluate((element) => element.isConnected));await capture('pbs-replacement', detail);await page.getByRole('button', { name: 'Withdraw target', exact: true }).click();- if (parent) assert.equal(await detail.getByTestId('resource-metrics-history-tab').count(), 1);- else await detail.getByText('Metrics history is unavailable.', { exact: true }).waitFor();+ if (parent) assert.equal(await detail.getByTestId('resource-metrics-history').count(), 1);+ else await detail.getByTestId('resource-metrics-history').waitFor({ state: 'detached' });await capture('pbs-withdrawn', detail);await page.getByRole('button', { name: 'Restore target', exact: true }).click();- await detail.getByTestId('resource-metrics-history-tab').waitFor();+ await detail.getByTestId('resource-metrics-history').waitFor();assert.equal(await detail- .getByRole('tab', { name: 'History', exact: true })+ .getByRole('tab', { name: 'Overview', exact: true }).getAttribute('aria-selected'),'true',);@@ -150,11 +150,10 @@ const parent = false;.waitFor();assert.equal(await detail- .getByRole('tab', { name: parent ? 'History' : 'Overview', exact: true })+ .getByRole('tab', { name: 'Overview', exact: true }).getAttribute('aria-selected'),'true',);- if (!parent) await detail.getByRole('tab', { name: 'History', exact: true }).click();await detail.getByText(parent ? '12.0%' : '25.0%', { exact: true }).waitFor();await capture('pbs-selected-b', detail);const targets = [...new Set(requests.map((r) => r.resourceId))];diff --git a/frontend-modern/browser-tests/drawer-snapshot.tsx b/frontend-modern/browser-tests/drawer-snapshot.tsxindex a3ac4193c2..77943d8f29 100644--- a/frontend-modern/browser-tests/drawer-snapshot.tsx+++ b/frontend-modern/browser-tests/drawer-snapshot.tsx@@ -60,7 +60,9 @@ const controls = [] as const;render(() => (- <WebSocketContext.Provider value={{ state: { pmg: [] }, connected: () => true } as any}>+ <WebSocketContext.Provider+ value={{ state: { pmg: [] }, activeAlerts: {}, connected: () => true } as any}+ ><DarkModeContext.Provider value={() => document.documentElement.classList.contains('dark')}><main class="min-h-screen space-y-4 bg-surface p-4 text-base-content"><h1>Detail snapshot verification</h1>diff --git a/frontend-modern/browser-tests/guest-agent-coverage.cjs b/frontend-modern/browser-tests/guest-agent-coverage.cjsindex 6487b06b33..dac7aa8cee 100644--- a/frontend-modern/browser-tests/guest-agent-coverage.cjs+++ b/frontend-modern/browser-tests/guest-agent-coverage.cjs@@ -121,7 +121,13 @@ const initial = {const drawer = page.getByRole('region', { name: 'Guest details' });await drawer.waitFor({ state: 'visible' });const precaution = page.getByTestId('guest-read-precaution');- const overview = page.getByTestId('guest-technical-details');+ // A deferred read is lifted into Worth checking; other rows sit under the+ // closed Details disclosure. Read the whole Overview with Details open.+ const overview = page.getByTestId('guest-drawer-overview');+ const openDetails = async () => {+ const details = page.getByTestId('guest-technical-details');+ if (!(await details.evaluate((el) => el.open))) await details.locator('summary').click();+ };const stateCell = () =>overview.getByText('Guest-agent reads', { exact: true }).locator('..');const update = async (value) => {@@ -140,6 +146,7 @@ const initial = {assert(await page.evaluate(() => document.documentElement.scrollWidth <= innerWidth + 1));};await precaution.waitFor();+ await openDetails();assert((await precaution.innerText()).includes('does not prove thaw'));assert((await precaution.innerText()).includes('filesystems covered by the backup'));assert((await stateCell().innerText()).includes('Deferred'));@@ -167,7 +174,7 @@ const initial = {await page.waitForFunction((label) =>document- .querySelector('[data-testid="guest-technical-details"]')+ .querySelector('[data-testid="guest-drawer-overview"]').textContent.includes(label),label,);@@ -184,7 +191,7 @@ const initial = {await update({ ...initial, version: '', assignment: true });assert((await overview.innerText()).includes('Node agent assigned'));assert((await stateCell().innerText()).includes('Deferred'));- await page.getByRole('tab', { name: 'History', exact: true }).click();+ // History charts sit on Overview, under the same precaution.await precaution.waitFor();await page.getByText('No stored history in this range', { exact: true }).first().waitFor();await update({@@ -209,7 +216,7 @@ const initial = {true,);checks.push(- 'Same guest retains drawer/tab identity; precaution persists across History/Manage; assignment is not connectivity',+ 'Same guest retains drawer/tab identity; precaution persists across Overview/Manage; assignment is not connectivity',);await update({...initial,@@ -220,13 +227,11 @@ const initial = {diskUsed: 7.5 * 1024 ** 3,});await page.getByRole('tab', { name: 'Overview', exact: true }).click();+ await openDetails();assert.equal(await precaution.count(), 0);assert((await stateCell().innerText()).includes('Reported available'));- assert(- (await stateCell().getByText('Reported available').getAttribute('title')).includes(- 'does not independently confirm thaw',- ),- );+ // The caveat is visible text, not only a title, so touch users read it.+ assert((await stateCell().innerText()).includes('does not independently confirm thaw'));assert((await row.locator('[data-workload-col="disk"]').innerText()).includes('75%'));await checkLayout(stateCell());await capture('reported-available');@@ -248,7 +253,7 @@ const initial = {'Pulse monitoring and alerts are unavailable while stopped',),);- assert((await article.innerText()).includes('filesystems covered by the backup'));+ assert((await article.innerText()).includes('filesystem covered by the backup'));if (width === 320) await capture('safety-guide');assert.equal(requests.filter((r) => r.path.includes('diagnostics') || r.method !== 'GET').length,diff --git a/frontend-modern/browser-tests/guest-history-provenance.cjs b/frontend-modern/browser-tests/guest-history-provenance.cjsindex 66a428810b..8087f40257 100644--- a/frontend-modern/browser-tests/guest-history-provenance.cjs+++ b/frontend-modern/browser-tests/guest-history-provenance.cjs@@ -136,16 +136,24 @@ const settle = (page) =>}),dark,);+ // Charts poll every 30 seconds; the proof drives that poll with the clock.+ await page.clock.install();await page.goto(origin + '/browser-tests/guest-history-provenance.html');await page.waitForFunction(() => window.__guestHistoryProvenance, undefined, {timeout: 60000,});const activate = (locator) => (width < 768 ? locator.tap() : locator.click());- await activate(page.getByRole('tab', { name: 'History', exact: true }));+ // History charts sit on Overview, which the drawer opens on.const chart = page.locator('[data-history-group="utilization"]');const notice = chart.locator('[data-history-deferred="disk"]');const waitRead = async () => {- await page.waitForFunction(() => document.querySelector('button[aria-busy="false"]'));+ await page.waitForFunction(() => !document.querySelector('button[aria-busy="true"]'));+ await settle(page);+ };+ const pollRead = async () => {+ const read = page.waitForResponse((r) => r.url().includes('/api/metrics-store/history'));+ await page.clock.runFor(30_000);+ await read;await settle(page);};const observe = async (next) => {@@ -213,7 +221,7 @@ const settle = (page) =>true,);}- assert.equal(await chart.locator('path').count(), 0);+ assert.equal(await chart.locator('path[data-history-series]').count(), 0);assert.equal(await chart.locator('[data-history-observation]').count(), 0);assert.equal(await chart.locator('[data-history-current="cpu"]').count(), 1);record.states.push({ reason, retained, geometry: await checkGeometry() });@@ -236,13 +244,15 @@ const settle = (page) =>await screenshot('unavailable');await observe({ reason: 'prev-agent-timeout', usage: 50 });mode = 'stored';- await activate(page.getByRole('button', { name: 'Refresh history', exact: true }));+ await pollRead();await page.waitForFunction(- () => document.querySelectorAll('[data-history-group="utilization"] path').length === 2,+ () =>+ document.querySelectorAll('[data-history-group="utilization"] path[data-history-series]')+ .length === 2,);await settle(page);const paths = await chart- .locator('path')+ .locator('path[data-history-series]').evaluateAll((nodes) => nodes.map((el) => el.getAttribute('d')));assert.equal(await chart.locator('[data-history-last-known]').count(), 0);assert.match(@@ -250,8 +260,13 @@ const settle = (page) =>/Completion is uncertain\. Do not restart the guest agent during a backup/,);const slider = chart.getByRole('slider', { name: 'Inspect Utilization history' });- if (width < 768) await slider.tap({ position: { x: 3, y: 20 } });- else {+ if (width < 768) {+ // Headless Chromium reports a fine pointer even with touch, which keeps+ // the slider visually hidden until a touch reaches the chart; a phone+ // user touches the plot first, as here.+ await chart.getByTestId('guest-history-plot').tap();+ await slider.tap({ position: { x: 3, y: 20 } });+ } else {await slider.focus();await slider.press('Home');}@@ -259,7 +274,9 @@ const settle = (page) =>assert.match(await slider.getAttribute('aria-valuetext'), /Disk 20\.0%/);assert.equal(await chart.locator('[data-history-current]').count(), 0);assert.deepEqual(- await chart.locator('path').evaluateAll((nodes) => nodes.map((el) => el.getAttribute('d'))),+ await chart+ .locator('path[data-history-series]')+ .evaluateAll((nodes) => nodes.map((el) => el.getAttribute('d'))),paths,);await screenshot('stored-inspection');@@ -268,9 +285,11 @@ const settle = (page) =>'Keyboard/touch inspection uses actual stored 20% at its own date, not retained 50%; paths remain unchanged.',);mode = 'cpu-only';- await activate(page.getByRole('button', { name: 'Refresh history', exact: true }));+ await pollRead();await page.waitForFunction(- () => document.querySelectorAll('[data-history-group="utilization"] path').length === 1,+ () =>+ document.querySelectorAll('[data-history-group="utilization"] path[data-history-series]')+ .length === 1,);await settle(page);await slider.focus();@@ -278,12 +297,14 @@ const settle = (page) =>assert.match(await slider.getAttribute('aria-valuetext'), /Disk no observation/);assert.equal(await chart.locator('[data-history-last-known]').count(), 0);await slider.blur();- assert.equal(await chart.locator('[data-history-last-known="disk"]').count(), 1);+ // At rest the legend reads the latest stored time, where disk has no point.+ assert.equal(await chart.locator('[data-history-last-known="disk"]').count(), 0);+ assert.match(await chart.innerText(), /Disk\s*no reading/);record.checks.push('A dated CPU observation cannot borrow the retained filesystem value.');mode = '503';- await activate(page.getByRole('button', { name: 'Refresh history', exact: true }));+ await pollRead();await page.getByRole('button', { name: 'Retry history', exact: true }).waitFor();- assert.equal(await chart.locator('path').count(), 1);+ assert.equal(await chart.locator('path[data-history-series]').count(), 1);assert.equal(await notice.count(), 1);assert.equal((await page.locator('main').innerText()).includes('fixture-private-error-body'),@@ -308,7 +329,7 @@ const settle = (page) =>await chart.locator('[data-history-current="disk"]').innerText(),/75\.0%[\s\S]*current/,);- assert.equal(await chart.locator('path').count(), 0);+ assert.equal(await chart.locator('path[data-history-series]').count(), 0);await screenshot('fresh-resumption');record.checks.push('Successful read and fresh same-VM data restore current 75%, clear provenance, and create no history points.',diff --git a/frontend-modern/browser-tests/guest-memory-provenance.cjs b/frontend-modern/browser-tests/guest-memory-provenance.cjsindex 16f2b1b63b..183f65f9c1 100644--- a/frontend-modern/browser-tests/guest-memory-provenance.cjs+++ b/frontend-modern/browser-tests/guest-memory-provenance.cjs@@ -199,13 +199,27 @@ const resource = (read) => {}),dark,);+ // Charts poll every 30 seconds; the proof drives that poll with the clock.+ await page.clock.install();await page.goto(origin + '/browser-tests/guest-memory-provenance.html?transport=' + transport,);const drawer = page.getByRole('region', { name: 'Guest details' });+ // The memory reading row sits under the Overview's Details disclosure.+ const openDetails = async () => {+ const details = drawer.getByTestId('guest-technical-details');+ await details.waitFor({ state: 'attached' });+ if (!(await details.evaluate((el) => el.open))) await details.locator('summary').click();+ };+ await openDetails();await drawer.getByText('Memory reading', { exact: true }).waitFor();const overview = drawer.getByRole('tab', { name: 'Overview', exact: true });- const history = drawer.getByRole('tab', { name: 'History', exact: true });+ // History charts sit on Overview; there is no History tab.+ const pollRead = async () => {+ const read = page.waitForResponse((r) => r.url().includes('/api/metrics-store/history'));+ await page.clock.runFor(30_000);+ await read;+ };const activate = async (control) => {if (width < 768) await control.tap();else {@@ -274,7 +288,6 @@ const resource = (read) => {);await checkReadingLayout('retained-overview');await capture('retained-overview');- await activate(history);const chart = drawer.locator('[data-history-group="utilization"]');await chart.locator('[data-history-last-known="memory"]').waitFor();assert.equal(await chart.locator('[data-history-current="memory"]').count(), 0);@@ -286,7 +299,7 @@ const resource = (read) => {await chart.locator('[data-history-deferred="memory"]').innerText(),/14:00:00 UTC/,);- assert.equal(await chart.locator('path').count(), 0);+ assert.equal(await chart.locator('path[data-history-series]').count(), 0);const historyCalls = record.requests.filter((r) => r.path === '/api/metrics-store/history',).length;@@ -340,11 +353,11 @@ const resource = (read) => {historyCalls,);await activate(overview);+ await openDetails();assert.match(await drawer.innerText(), /Freshness unknown · Unknown source · time unknown/);await checkReadingLayout('unknown-overview');await capture('unknown-overview');await note('legacy-unknown');- await activate(history);await update({ state: 'last-known', source: 'private provider detail', usage: 0 });await chart.locator('[data-history-last-known="memory"]').waitFor();assert.match(@@ -358,9 +371,12 @@ const resource = (read) => {assert.doesNotMatch(await drawer.innerText(), /private provider detail/);await note('retained-zero-unknown-age');mode = 'stored';- await activate(drawer.getByRole('button', { name: 'Refresh history', exact: true }));+ await pollRead();await page.waitForFunction(- () => document.querySelectorAll('[data-history-group="utilization"] path').length === 2,+ () =>+ document.querySelectorAll(+ '[data-history-group="utilization"] path[data-history-series]',+ ).length === 2,);assert.equal(await chart.locator('[data-history-current="memory"]').count(), 0);assert.equal(await chart.locator('[data-history-last-known="memory"]').count(), 0);@@ -371,7 +387,7 @@ const resource = (read) => {assert.match(await slider.getAttribute('aria-valuetext'), /Memory 20\.0%/);await note('stored-keyboard-inspection');mode = 'denied';- await activate(drawer.getByRole('button', { name: 'Refresh history', exact: true }));+ await pollRead();await drawer.getByRole('button', { name: 'Retry history', exact: true }).waitFor();assert.equal(await drawer.locator('[data-history-deferred]').count(), 0);assert.equal(await drawer.locator('[data-history-group]').count(), 0);@@ -389,6 +405,8 @@ const resource = (read) => {});await drawer.getByText('peer-guest', { exact: true }).waitFor();assert.equal(await overview.getAttribute('aria-selected'), 'true');+ // A different guest is a new Overview, with Details closed again.+ await openDetails();assert.match(await drawer.innerText(), /Current · Pulse Agent · 2026-10-04 16:00:00 UTC/);assert.doesNotMatch(await drawer.innerText(), /14:00:00 UTC/);await note('peer-identity-replacement');diff --git a/frontend-modern/browser-tests/guest-stopped-disk.cjs b/frontend-modern/browser-tests/guest-stopped-disk.cjsindex bd45682cf2..7112a91cb1 100644--- a/frontend-modern/browser-tests/guest-stopped-disk.cjs+++ b/frontend-modern/browser-tests/guest-stopped-disk.cjs@@ -65,6 +65,8 @@ const settle = (page) => page.evaluate(async () => {window.__trustedInput = [];document.addEventListener('click', (event) => window.__trustedInput.push(event.isTrusted), true);}, dark);+ // Charts poll every 30 seconds; the proof drives that poll with the clock.+ await page.clock.install();await page.goto(origin + '/browser-tests/guest-disk-provenance.html');await page.waitForFunction(() => window.__guestDiskProvenance);const apply = async (value) => { await page.evaluate((next) => window.__guestDiskProvenance.apply(next), value); await settle(page); };@@ -87,7 +89,9 @@ const settle = (page) => page.evaluate(async () => {else { await disclosure.focus(); await page.keyboard.press('Enter'); }const drawer = page.getByRole('region', { name: 'Guest details' });await drawer.waitFor({ state: 'visible' });- const technical = drawer.getByTestId('guest-technical-details');+ // Filesystems have their own Overview section; an unavailable one may be+ // lifted into Worth checking, so read the whole Overview.+ const technical = drawer.getByTestId('guest-drawer-overview');const filesystem = technical.getByText('/data', { exact: true }).locator('xpath=ancestor::tr');const capture = async (state, target) => {await target.scrollIntoViewIfNeeded(); await settle(page);@@ -103,10 +107,10 @@ const settle = (page) => page.evaluate(async () => {await apply({ disksFromAgent: true });assert.match(await filesystem.innerText(), /Usage unavailable/);record.checks.push('Platform and linked-agent carriers obey the same stopped-VM rule in filesystem detail.');- await click(drawer.getByRole('tab', { name: 'History', exact: true }));+ // History charts sit on Overview beside the filesystem detail.const chart = drawer.locator('[data-history-group="utilization"]');- await page.waitForFunction(() => document.querySelector('[data-history-group="utilization"] path'));- const stored = await chart.locator('path').evaluateAll((items) => items.map((item) => item.getAttribute('d')));+ await page.waitForFunction(() => document.querySelector('[data-history-group="utilization"] path[data-history-series]'));+ const stored = await chart.locator('path[data-history-series]').evaluateAll((items) => items.map((item) => item.getAttribute('d')));assert.ok(stored.length > 0);assert.equal(await chart.locator('[data-history-current="disk"]').count(), 0);assert.equal(await chart.locator('[data-history-last-known="disk"]').count(), 0);@@ -116,12 +120,14 @@ const settle = (page) => page.evaluate(async () => {assert.match(await chart.locator('[data-history-deferred="disk"]').innerText(), /earlier guest request/);assert.equal(await chart.locator('[data-history-last-known="disk"]').count(), 0);assert.equal(await chart.locator('[data-history-current="disk"]').count(), 0);- assert.deepEqual(await chart.locator('path').evaluateAll((items) => items.map((item) => item.getAttribute('d'))), stored);+ assert.deepEqual(await chart.locator('path[data-history-series]').evaluateAll((items) => items.map((item) => item.getAttribute('d'))), stored);record.checks.push('Stored historical values/paths stay separate from retained live numbers throughout stop and restart.');// A separate synthetic empty-store response exercises the live fallback// legend, not data removal or a guest probe.historyMode = 'empty';- await click(drawer.getByRole('button', { name: 'Refresh history', exact: true }));+ const read = page.waitForResponse((r) => r.url().includes('/api/metrics-store/history'));+ await page.clock.runFor(30_000);+ await read;await chart.getByText('No stored history in this range', { exact: true }).waitFor();assert.match(await chart.locator('[data-history-last-known="disk"]').innerText(), /90.0%.*last known/s);await apply({ status: 'stopped', reason: '' });@@ -134,9 +140,8 @@ const settle = (page) => page.evaluate(async () => {await apply({ reason: '', usage: 0 });assert.match(await chart.locator('[data-history-current="disk"]').innerText(), /0.0%.*current/s);assert.equal(await chart.locator('[data-history-deferred="disk"]').count(), 0);- assert.equal(await chart.locator('path').count(), 0);+ assert.equal(await chart.locator('path[data-history-series]').count(), 0);record.checks.push('Empty-store History never fabricates points: restart deferral is last known and fresh measured zero returns as current.');- await click(drawer.getByRole('tab', { name: 'Overview', exact: true }));assert.equal(await filesystem.getByRole('progressbar').getAttribute('aria-valuenow'), '0');await apply({ kind: 'lxc', status: 'stopped', reason: '', usage: 30 });assert.equal(await filesystem.getByRole('progressbar').getAttribute('aria-valuenow'), '30');@@ -150,7 +155,8 @@ const settle = (page) => page.evaluate(async () => {assert.equal(await drawer.count(), 0);assert.ok((await page.evaluate(() => window.__trustedInput)).some(Boolean));assert.deepEqual(record.errors, []);- assert.ok(record.requests.every((item) => ['GET', 'HEAD'].includes(item.method) && !item.blocked), JSON.stringify(record.requests));+ // Opening details records one content-free usage milestone; nothing else may write.+ assert.ok(record.requests.every((item) => (['GET', 'HEAD'].includes(item.method) || (item.method === 'POST' && item.path === '/api/usage/workload-history')) && !item.blocked), JSON.stringify(record.requests));record.checks.push('Trusted keyboard/touch disclosure and close; no overflow, page error, off-origin or mutating request.');await context.close(); await browser.close(); browser = null;}diff --git a/frontend-modern/browser-tests/guest-storage-2263.cjs b/frontend-modern/browser-tests/guest-storage-2263.cjsindex 4958c9f9f2..422f2d8eda 100644--- a/frontend-modern/browser-tests/guest-storage-2263.cjs+++ b/frontend-modern/browser-tests/guest-storage-2263.cjs@@ -116,7 +116,7 @@ const { chromium } = require('playwright');await page.keyboard.press('Enter');await detailRequest;assert.equal(- await page.getByText('Reallocated Sectors').count(),+ await page.getByText('Reallocated Sectors').first().count(),0,'SMART detail must remain suspended while its module is loading',);@@ -137,7 +137,7 @@ const { chromium } = require('playwright');fullPage: true,});releaseDetail();- await page.getByText('Reallocated Sectors').waitFor();+ await page.getByText('Reallocated Sectors').first().waitFor();assert.equal(detailRequests.filter((request) => request.width === width).length,1,@@ -147,29 +147,19 @@ const { chromium } = require('playwright');path: path.join(artifacts, `guest-storage-2263-expanded-${width}.png`),fullPage: true,});- await page.getByRole('tab', { name: 'History' }).click();- assert.equal(- await page.getByRole('tab', { name: 'History' }).getAttribute('aria-selected'),- 'true',- );- await page.screenshot({- path: path.join(artifacts, `guest-storage-2263-history-${width}.png`),- fullPage: true,- });- await page.getByRole('tab', { name: 'Overview' }).click();- assert.equal(- await page.getByRole('tab', { name: 'Overview' }).getAttribute('aria-selected'),- 'true',- );+ // The expanded disk shows its SMART evidence and History in one view,+ // with no Overview/History tabs to switch between.+ assert.equal(await page.getByRole('tab').count(), 0);+ assert.equal(await page.getByTestId('disk-detail-history').isVisible(), true);await page.locator('[data-testid="guest-physical-disk"] summary').click();- await page.getByText('Reallocated Sectors').waitFor({ state: 'hidden' });+ await page.getByText('Reallocated Sectors').first().waitFor({ state: 'hidden' });assert.equal(- await page.getByText('Reallocated Sectors').isVisible(),+ await page.getByText('Reallocated Sectors').first().isVisible(),false,'pointer closes the expanded SMART detail',);await page.locator('[data-testid="guest-physical-disk"] summary').click();- await page.getByText('Reallocated Sectors').waitFor();+ await page.getByText('Reallocated Sectors').first().waitFor();assert.equal(detailRequests.filter((request) => request.width === width).length,1,diff --git a/frontend-modern/browser-tests/history-observation-gaps.cjs b/frontend-modern/browser-tests/history-observation-gaps.cjsindex 8fa4c98ba9..aeba5ea530 100644--- a/frontend-modern/browser-tests/history-observation-gaps.cjs+++ b/frontend-modern/browser-tests/history-observation-gaps.cjs@@ -151,9 +151,16 @@ const settle = (page) =>true,);}, dark);+ // Charts poll every 30 seconds; the proof drives that poll with the clock.+ await page.clock.install();await page.goto(origin + '/browser-tests/history-observation-gaps.html');const activate = async (locator) => (width < 768 ? locator.tap() : locator.click());- await activate(page.getByRole('tab', { name: 'History', exact: true }));+ // History charts sit on Overview, which the drawer opens on.+ const pollRead = async () => {+ const read = page.waitForResponse((r) => r.url().includes('/api/metrics-store/history'));+ await page.clock.runFor(30_000);+ await read;+ };const chart = page.locator('[data-history-group="utilization"]');const slider = chart.getByRole('slider', { name: 'Inspect Utilization history' });await slider.waitFor();@@ -163,14 +170,16 @@ const settle = (page) =>'[data-history-group="utilization"]',);});- const memoryPath = chart.locator('path[stroke="#f59e0b"]');+ const memoryPath = chart.locator('path[data-history-series][stroke="#f59e0b"]');assert.equal(await memoryPath.count(), 1);assert.equal((await memoryPath.getAttribute('d')).match(/L/g).length, 1);assert.equal(await chart.locator('[data-history-observation="memory"]').count(), 1);- assert.equal(await chart.locator('path[stroke="#10b981"]').count(), 0);+ assert.equal(await chart.locator('path[data-history-series][stroke="#10b981"]').count(), 0);assert.equal(await chart.locator('[data-history-observation="disk"]').count(), 2);assert.equal(- (await chart.locator('path[stroke="#8b5cf6"]').getAttribute('d')).match(/L/g).length,+ (+ await chart.locator('path[data-history-series][stroke="#8b5cf6"]').getAttribute('d')+ ).match(/L/g).length,4,);assert.match(@@ -188,7 +197,7 @@ const settle = (page) =>.join(' '),);assert.match(description, /Missing observations: Memory, Disk\./);- assert.match(description, /does not identify the cause or duration/);+ assert.match(description, /Lines break where a reading is missing\./);const noteGeometry = await chart.locator('[data-history-gaps]').evaluate((el) => ({width: el.clientWidth,scrollWidth: el.scrollWidth,@@ -221,8 +230,8 @@ const settle = (page) =>await slider.getAttribute('aria-valuetext'),/Memory no observation\. Disk no observation\./,);- assert.match(await chart.innerText(), /Memory\s*-/);- assert.equal(await chart.locator('circle[r="3"]').count(), 1);+ assert.match(await chart.innerText(), /Memory\s*no reading/);+ assert.equal(await chart.locator('[data-history-hover-marker]').count(), 1);record.checks.push('Trusted Home/Arrow keys inspect the missing stored time without borrowing nearby/live memory or disk.',);@@ -240,7 +249,7 @@ const settle = (page) =>await chart.locator('[data-testid="guest-history-hover-time"]').innerText(),/12:30/,);- assert.equal(await chart.locator('circle[r="3"]').count(), 1);+ assert.equal(await chart.locator('[data-history-hover-marker]').count(), 1);record.checks.push('Trusted pointer matches the exact stored time, not a synthetic line value.',);@@ -265,10 +274,10 @@ const settle = (page) =>);mode = '503';- await activate(page.getByRole('button', { name: 'Refresh history' }));+ await pollRead();await page.getByRole('button', { name: 'Retry history' }).waitFor();assert.equal(await chart.locator('[data-history-gaps]').count(), 1);- assert.equal(await chart.locator('path[stroke="#10b981"]').count(), 0);+ assert.equal(await chart.locator('path[data-history-series][stroke="#10b981"]').count(), 0);assert.doesNotMatch(await page.locator('body').innerText(), /private-fixture-detail/);record.checks.push('Transient read failure retains the gap and does not leak the raw error.');mode = 'complete';@@ -291,7 +300,7 @@ const settle = (page) =>);await screenshot('complete');mode = '403';- await activate(page.getByRole('button', { name: 'Refresh history' }));+ await pollRead();await page.waitForFunction(() => document.querySelectorAll('[data-testid="guest-history-group-chart"]').length === 0,);diff --git a/frontend-modern/browser-tests/history-touch.cjs b/frontend-modern/browser-tests/history-touch.cjsindex d00d447fb3..09d84fd7af 100644--- a/frontend-modern/browser-tests/history-touch.cjs+++ b/frontend-modern/browser-tests/history-touch.cjs@@ -47,7 +47,14 @@ const { chromium, webkit } = require('playwright');if (!url.pathname.startsWith('/api/')) return route.continue();if (url.pathname === '/api/metrics-store/history') {requests.push(Object.fromEntries(url.searchParams));- return route.fulfill({ json: { points: samples, source: 'store' } });+ // The client checks a reply names the series it asked for.+ const q = url.searchParams;+ const times = samples.map(sample => sample.timestamp);+ return route.fulfill({ json: {+ resourceType: q.get('resourceType'), resourceId: q.get('resourceId'), metric: q.get('metric'), range: q.get('range'),+ start: times.length ? Math.min(...times) : Date.now() - 86400000, end: times.length ? Math.max(...times) : Date.now(),+ points: samples, source: 'store',+ } });}return route.fulfill({ json: url.pathname === '/api/license/runtime-capabilities'? { capabilities: [], limits: [], max_history_days: 7, hosted_mode: false, runtime: { build: 'community' }, blocked_capabilities: [] }@@ -57,7 +64,6 @@ const { chromium, webkit } = require('playwright');if (dark) await page.evaluate(() => document.documentElement.classList.add('dark'));const disk = page.getByRole('region', { name: 'Disk fixture' });const pool = page.getByRole('region', { name: 'Pool fixture' });- await disk.getByRole('tab', { name: 'History', exact: true }).click();const busy = disk.getByRole('img', { name: 'Busy chart', exact: true });const description = chart => chart.evaluate(el => document.getElementById(el.getAttribute('aria-describedby')).textContent);await page.waitForFunction(() => [...document.querySelectorAll('canvas')].some(el => el.getAttribute('aria-label') === 'Busy chart' && document.getElementById(el.getAttribute('aria-describedby')).textContent.includes('3 data points')));@@ -148,7 +154,6 @@ const { chromium, webkit } = require('playwright');await session.detach();}- await pool.getByRole('tab', { name: 'History', exact: true }).click();const usage = pool.getByRole('img', { name: 'Usage chart', exact: true });await usage.waitFor();await page.waitForFunction(() => [...document.querySelectorAll('canvas')].some(el => el.getAttribute('aria-label') === 'Usage chart' && document.getElementById(el.getAttribute('aria-describedby')).textContent.includes('3 data points')));diff --git a/frontend-modern/browser-tests/linked-guest-history.cjs b/frontend-modern/browser-tests/linked-guest-history.cjsindex d96fdda78c..bddcd53970 100644--- a/frontend-modern/browser-tests/linked-guest-history.cjs+++ b/frontend-modern/browser-tests/linked-guest-history.cjs@@ -156,6 +156,8 @@ const hash = (file) => crypto.createHash('sha256').update(fs.readFileSync(file))...(guest ? { guest: '1' } : {}),...(lxc ? { lxc: '1' } : {}),}).toString();+ // Charts poll every 30 seconds; the proof drives that poll with the clock.+ await page.clock.install();await page.goto(origin + '/browser-tests/linked-guest-history.html' + suffix);const activate = async (locator) => {if (width < 768) await locator.tap();@@ -164,7 +166,7 @@ const hash = (file) => crypto.createHash('sha256').update(fs.readFileSync(file))await locator.press('Enter');}};- await activate(page.getByRole('tab', { name: 'History', exact: true }));+ // History charts sit on Overview, which the drawer opens on.const chart = page.locator('[data-history-group="utilization"]');const current = () => chart.locator('[data-history-current="disk"]');const prior = () => chart.locator('[data-history-last-known="disk"]');@@ -265,23 +267,33 @@ const hash = (file) => crypto.createHash('sha256').update(fs.readFileSync(file))async () => {await set('Live agent');stored = true;- await activate(page.getByRole('button', { name: 'Refresh history', exact: true }));- await chart.locator('path').waitFor();- const before = await chart.locator('path').getAttribute('d');+ const read = page.waitForResponse((r) =>+ r.url().includes('/api/metrics-store/history'),+ );+ await page.clock.runFor(30_000);+ await read;+ await chart.locator('path[data-history-series]').waitFor();+ const before = await chart.locator('path[data-history-series]').getAttribute('d');assert.ok(before);await set('Silent agent');await text(deferred(), /Pulse Agent/);- assert.equal(await chart.locator('path').getAttribute('d'), before);+ assert.equal(+ await chart.locator('path[data-history-series]').getAttribute('d'),+ before,+ );await missing(prior());await set('Stopped guest');await text(deferred(), /unavailable/);- assert.equal(await chart.locator('path').getAttribute('d'), before);+ assert.equal(+ await chart.locator('path[data-history-series]').getAttribute('d'),+ before,+ );await missing(current());assert.match(await chart.innerText(), /30.0%/);},);await check(- 'Same mounted chart, usable independent metrics and no fabricated samples',+ 'Same mounted chart; series without stored points read no reading, no fabricated samples',async () => {assert.equal(await page.evaluate(@@ -290,9 +302,12 @@ const hash = (file) => crypto.createHash('sha256').update(fs.readFileSync(file))),true,);- await text(chart.locator('[data-history-current="cpu"]'), /10.0%\s*current/);- await text(chart.locator('[data-history-current="memory"]'), /0.0%\s*current/);- assert.equal(await chart.locator('path').count(), 1);+ // With stored history shown, the legend reads the latest stored+ // time: series without a stored point say so, never a live value.+ assert.equal(await chart.locator('[data-history-current]').count(), 0);+ assert.match(await chart.innerText(), /CPU\s*no reading/);+ assert.match(await chart.innerText(), /Memory\s*no reading/);+ assert.equal(await chart.locator('path[data-history-series]').count(), 1);assert.deepEqual(record.errors, []);assert.ok(record.requests.every((r) => !r.blocked));},diff --git a/frontend-modern/browser-tests/pool-ownership.cjs b/frontend-modern/browser-tests/pool-ownership.cjsindex 7e9a879912..21204600fb 100644--- a/frontend-modern/browser-tests/pool-ownership.cjs+++ b/frontend-modern/browser-tests/pool-ownership.cjs@@ -47,8 +47,15 @@ const parent = false;if (!url.pathname.startsWith('/api/')) return route.continue();if (url.pathname === '/api/metrics-store/history') {requests.push(Object.fromEntries(url.searchParams));+ // The client checks a reply names the series it asked for.return route.fulfill({json: {+ resourceType: url.searchParams.get('resourceType'),+ resourceId: url.searchParams.get('resourceId'),+ metric: url.searchParams.get('metric'),+ range: url.searchParams.get('range'),+ start: 1790935200000,+ end: 1790935200000,points: [{ timestamp: 1790935200000, value: 25, min: 25, max: 25 }],source: 'store',},@@ -119,7 +126,6 @@ const parent = false;}if (!parent) {await page.getByRole('button', { name: 'ZFS host A', exact: true }).click();- await detail.getByRole('tab', { name: 'History', exact: true }).click();await detail.getByRole('img', { name: 'Usage chart', exact: true }).waitFor();await page.waitForFunction(() =>[...document.querySelectorAll('canvas')].some((el) =>@@ -152,7 +158,6 @@ const parent = false;request.resourceType === 'storage',),);- await detail.getByRole('tab', { name: 'Overview', exact: true }).click();await detail.getByText('Physical Disks (1)', { exact: true }).waitFor();assert.equal(await detail.getByText('Host A disk', { exact: true }).count(), 0);assert.equal(await detail.getByText('Host B disk', { exact: true }).count(), 1);diff --git a/frontend-modern/browser-tests/resource-history-provenance.cjs b/frontend-modern/browser-tests/resource-history-provenance.cjsindex 11afe10c2a..b99b7a3439 100644--- a/frontend-modern/browser-tests/resource-history-provenance.cjs+++ b/frontend-modern/browser-tests/resource-history-provenance.cjs@@ -175,11 +175,18 @@ const hash = (file) => crypto.createHash('sha256').update(fs.readFileSync(file))true,);}, dark);+ // Charts poll every 30 seconds; the proof drives that poll with the clock.+ await page.clock.install();await page.goto(origin + '/browser-tests/resource-history-provenance.html' + (guest ? '?guest' : ''),);const activate = (locator) => (width < 768 ? locator.tap() : locator.click());- await activate(page.getByRole('tab', { name: 'History', exact: true }));+ // History charts sit on Overview, which the drawer opens on.+ const pollRead = async () => {+ const read = page.waitForResponse((r) => r.url().includes('/api/metrics-store/history'));+ await page.clock.runFor(30_000);+ await read;+ };const chart = page.locator('[data-history-group="utilization"]');await chart.locator('[data-history-last-known="memory"]').waitFor();await page.evaluate(@@ -298,7 +305,7 @@ const hash = (file) => crypto.createHash('sha256').update(fs.readFileSync(file))'Fresh measured zero and independent disk recovery render in place without extra reads or inferred thaw.',);mode = 'stored';- await activate(page.getByRole('button', { name: 'Refresh history', exact: true }));+ await pollRead();const slider = chart.getByRole('slider', { name: 'Inspect Utilization history' });await slider.waitFor();assert.equal(@@ -312,11 +319,11 @@ const hash = (file) => crypto.createHash('sha256').update(fs.readFileSync(file))assert.match(await slider.getAttribute('aria-valuetext'), /Memory 5.0%.*Disk 40.0%/);await page.keyboard.press('End');assert.match(await slider.getAttribute('aria-valuetext'), /Memory 0.0%.*Disk 45.0%/);- assert.equal(await chart.locator('path').count(), 2);+ assert.equal(await chart.locator('path[data-history-series]').count(), 2);await screenshot('stored');await slider.blur();await activate(page.getByRole('button', { name: 'retained', exact: true }));- assert.equal(await chart.locator('path').count(), 2);+ assert.equal(await chart.locator('path[data-history-series]').count(), 2);assert.match(await chart.locator('[data-history-deferred="memory"]').innerText(),/Last known/,@@ -325,9 +332,9 @@ const hash = (file) => crypto.createHash('sha256').update(fs.readFileSync(file))'Actual stored history and trusted Home/End inspection remain separate from live/retained provenance.',);mode = 'transient';- await activate(page.getByRole('button', { name: 'Refresh history', exact: true }));+ await pollRead();await page.getByRole('button', { name: 'Retry history', exact: true }).waitFor();- assert.equal(await chart.locator('path').count(), 2);+ assert.equal(await chart.locator('path[data-history-series]').count(), 2);assert.match(await page.getByRole('status', { name: 'History refresh status' }).innerText(),/previously loaded history/,diff --git a/frontend-modern/browser-tests/resource-history-provenance.tsx b/frontend-modern/browser-tests/resource-history-provenance.tsxindex 59744c4cab..15ff316c16 100644--- a/frontend-modern/browser-tests/resource-history-provenance.tsx+++ b/frontend-modern/browser-tests/resource-history-provenance.tsx@@ -1,12 +1,10 @@// Synthetic snapshots only; both drawers, History, transport and CSS are production.import { createMemo, createSignal } from 'solid-js';-import { render } from 'solid-js/web';-import { Router, Route } from '@solidjs/router';import { ResourceDetailDrawer } from '../src/components/Infrastructure/ResourceDetailDrawer';import { GuestDrawer } from '../src/components/Workloads/GuestDrawer';-import { DarkModeContext } from '../src/contexts/appRuntime';import type { Resource } from '../src/types/resource';import type { WorkloadGuest } from '../src/types/workloads';+import { renderInAppRuntime } from './fixtureRuntime';import '../src/index.css';function Fixture() {const [state, setState] = createSignal('retained');@@ -116,20 +114,4 @@ function Fixture() {</main>);}-render(- () => (- <Router>- <Route- path="*"- component={() => (- <DarkModeContext.Provider- value={() => document.documentElement.classList.contains('dark')}- >- <Fixture />- </DarkModeContext.Provider>- )}- />- </Router>- ),- document.getElementById('root')!,-);+renderInAppRuntime(Fixture);diff --git a/frontend-modern/browser-tests/resource-stopped-filesystem.cjs b/frontend-modern/browser-tests/resource-stopped-filesystem.cjsindex 281f415b12..826564e1f1 100644--- a/frontend-modern/browser-tests/resource-stopped-filesystem.cjs+++ b/frontend-modern/browser-tests/resource-stopped-filesystem.cjs@@ -147,6 +147,8 @@ async function verify(original = false) {true,);}, dark);+ // Charts poll every 30 seconds; the proof drives that poll with the clock.+ await page.clock.install();await page.goto(origin + '/browser-tests/resource-stopped-filesystem.html', {waitUntil: 'domcontentloaded',timeout: 60000,@@ -154,12 +156,7 @@ async function verify(original = false) {await page.waitForFunction(() => window.__resourceStoppedFilesystem, null, {timeout: 45000,});- const tab = page.getByRole('tab', { name: 'History', exact: true });- if (width < 768) await tab.tap();- else {- await tab.focus();- await page.keyboard.press('Enter');- }+ // History charts sit on Overview, which the drawer opens on.const chart = page.locator('[data-history-group="utilization"]');await chart.waitFor();await settle(page);@@ -312,12 +309,12 @@ async function verify(original = false) {await apply({ type: 'vm', power: 'stopped', status: 'online', reason: '', usage: 90 });await unavailable();mode = 'stored';- const refresh = page.getByRole('button', { name: 'Refresh history', exact: true });- if (width < 768) await refresh.tap();- else await refresh.click();+ const read = page.waitForResponse((r) => r.url().includes('/api/metrics-store/history'));+ await page.clock.runFor(30_000);+ await read;const slider = chart.getByRole('slider', { name: 'Inspect Utilization history' });await slider.waitFor();- assert.equal(await chart.locator('path').count(), 1);+ assert.equal(await chart.locator('path[data-history-series]').count(), 1);await unavailable();await slider.focus();await page.keyboard.press('Home');diff --git a/frontend-modern/browser-tests/table-row-touch.cjs b/frontend-modern/browser-tests/table-row-touch.cjsindex 025a5cd043..7ccce01f16 100644--- a/frontend-modern/browser-tests/table-row-touch.cjs+++ b/frontend-modern/browser-tests/table-row-touch.cjs@@ -99,13 +99,13 @@ const { chromium, firefox, webkit } = require('playwright');source: 'store',metrics: {cpu: [- { timestamp: end - 600000, value: 20 },- { timestamp: end - 300000, value: 30 },+ { timestamp: end - 600000, value: 20, min: 20, max: 20 },+ { timestamp: end - 300000, value: 30, min: 30, max: 30 },],- memory: [{ timestamp: end - 300000, value: 40 }],+ memory: [{ timestamp: end - 300000, value: 40, min: 40, max: 40 }],netin: [- { timestamp: end - 600000, value: 1024 },- { timestamp: end - 300000, value: 2048 },+ { timestamp: end - 600000, value: 1024, min: 1024, max: 1024 },+ { timestamp: end - 300000, value: 2048, min: 2048, max: 2048 },],},},@@ -135,8 +135,16 @@ const { chromium, firefox, webkit } = require('playwright');observations.push({ suffix, firstActivationOpened: true });await noOverflow();if (suffix === 'one') await snapshot('pbs-first-activation');- await activate(detail.getByRole('tab', { name: 'History', exact: true }));- await detail.getByTestId('guest-history-plot').first().locator('path').first().waitFor();+ // History charts sit on Overview; switching tabs inside the drawer is the+ // nested input that must not retoggle the row.+ await activate(detail.getByRole('tab', { name: 'Manage', exact: true }));+ await activate(detail.getByRole('tab', { name: 'Overview', exact: true }));+ await detail+ .getByTestId('guest-history-plot')+ .first()+ .locator('path[data-history-series], [data-history-observation]')+ .first()+ .waitFor({ state: 'attached' });assert.equal(await disclosure.getAttribute('aria-expanded'),'true',diff --git a/frontend-modern/browser-tests/workload-read-evidence.cjs b/frontend-modern/browser-tests/workload-read-evidence.cjsindex 181118b37c..4d9c8edac3 100644--- a/frontend-modern/browser-tests/workload-read-evidence.cjs+++ b/frontend-modern/browser-tests/workload-read-evidence.cjs@@ -171,11 +171,10 @@ const resource = (read) => {const badge = row.locator('[data-workload-disk-read-status]');const drawer = page.getByRole('region', { name: 'Guest details' });const activate = (locator) => (width < 768 ? locator.tap() : locator.click());- const history = drawer.getByRole('tab', { name: 'History', exact: true });- await activate(history);+ // History charts sit on Overview, which the drawer opens on.const chart = drawer.locator('[data-history-group="utilization"]');await chart.waitFor();- await page.waitForFunction(() => document.querySelector('button[aria-busy="false"]'));+ await page.waitForFunction(() => !document.querySelector('button[aria-busy="true"]'));await page.evaluate(() => {window.__rowIdentity = document.querySelector('[data-workload-col="disk"]');window.__chartIdentity = document.querySelector('[data-history-group="utilization"]');@@ -314,11 +313,9 @@ const resource = (read) => {await observe({ usage: 0, status: 'available' });await check('fresh-measured-zero', undefined, false, 0, '', 'available', undefined);await screenshot('zero');- // Existing Overview updates as well; real History tab can be revisited with keyboard/touch.- await activate(drawer.getByRole('tab', { name: 'Overview', exact: true }));+ // Overview's own readings update in the same view as its charts.assert.equal((await drawer.innerText()).includes('Using last known'), false);assert.match(await drawer.innerText(), /0%/);- await activate(drawer.getByRole('tab', { name: 'History', exact: true }));assert.equal(await chart.locator('[data-history-current="disk"]').count(), 1);assert.equal(await chart.locator('[data-history-deferred="disk"]').count(), 0);const resourceRequests = record.requests.filter((r) => r.path === '/api/resources');diff --git a/scripts/check-backup-app-refresh.mjs b/scripts/check-backup-app-refresh.mjsindex 7f0deb8387..6ef84e69c8 100644--- a/scripts/check-backup-app-refresh.mjs+++ b/scripts/check-backup-app-refresh.mjs@@ -266,10 +266,12 @@ try {});await pbsToggle.focus();await pbsToggle.press("Enter");- const history = page.getByRole("tab", { name: "History", exact: true });+ // History charts sit on the Overview tab; keep that tab focused and selected+ // while socket updates replace the row's data.+ const history = page.getByRole("tab", { name: "Overview", exact: true });await history.click();await history.focus();- await expect(page.getByTestId("resource-metrics-history-tab")).toBeVisible();+ await expect(page.getByTestId("resource-metrics-history")).toBeVisible();await page.waitForTimeout(500);const historyBaseline = await capture();const historySamples = [];@@ -283,7 +285,7 @@ try {await expect(history).toHaveAttribute("aria-selected", "true");await expect(history).toBeFocused();await expect(- page.getByTestId("resource-metrics-history-tab"),+ page.getByTestId("resource-metrics-history"),).toBeVisible();const sample = await capture();expect(sample.url).toBe(historyBaseline.url);