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.

Keep guest filesystem provenance visible in every display mode

pulse-triage[bot]10f181b5007b
diff --git a/docs/release-control/v6/internal/subsystems/frontend-primitives.md b/docs/release-control/v6/internal/subsystems/frontend-primitives.md
index 7760e00f05..b9e77e82f5 100644
--- a/docs/release-control/v6/internal/subsystems/frontend-primitives.md
+++ b/docs/release-control/v6/internal/subsystems/frontend-primitives.md
@@ -44,6 +44,27 @@ previous data and fresh resumption with production components and CSS on desktop
Chromium and touch WebKit. Synthetic observations do not establish the native
command-ID cause, guest thaw, fresh History collection or containing release.
+The shipped row also keeps a visible filesystem provenance cue in every disk
+presentation: resting bars, selected sparklines, the pointer/focus history lens
+and the pre-sample empty state. `prev-` is labelled **Last known** (**Prior** in
+compact rows); an unavailable read is **Unavailable** (**N/A** in compact rows).
+The full fixed-reason explanation is ordinary assistive text as well as the
+existing cell title and drawer content, not a live region repeated across a
+fleet. Retained sparkline values are announced as **last known**, never current;
+other metrics keep their existing current-value semantics. The inline sparkline
+plot yields width to the numeric value instead of reserving 40px and clipping
+that value in canonical phone columns. Clearing only a VM
+operation lock does not clear a reason still supplied for an in-flight read.
+Fresh linked Pulse-agent disk evidence with no reason remains unmarked, and
+non-VM rows do not inherit QGA guidance. The cue adds no action or tab stop;
+touch on it continues through the existing row disclosure to the full reason.
+
+Verification: mounted `GuestRow.test.tsx` and `MetricMiniSparkline.test.tsx`
+regressions and `browser-tests/guest-disk-provenance.cjs` exercise retained and
+pre-sample states, display/lens changes, current-value semantics and same-row
+resumption. Native thaw, workload liveness and released acceptance remain
+independent obligations, not facts inferred from these synthetic observations.
+
The legacy Workloads `DiskList` is exercised only by tests/fixtures, not a
shipped caller. Its empty-state title is not evidence of readable touch guidance;
the shipped guest Overview supplies the readable pre-sample explanation.
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 db65ab3598..bc2298fb1b 100644
--- a/docs/release-control/v6/internal/subsystems/performance-and-scalability.md
+++ b/docs/release-control/v6/internal/subsystems/performance-and-scalability.md
@@ -15,6 +15,24 @@
## Purpose
+### Guest filesystem provenance preserves dense row geometry
+
+Visible retained/unavailable filesystem cues must fit the existing dense row
+rhythm, including canonical phone/narrow column weights, without adding a new
+collector, history request, layout observer, focus target or event path. Keep
+compact copy on narrow rows and the full safe reason in assistive text and the
+existing drawer. Inline sparkline plots may shrink to preserve their numeric
+value within the already assigned column; do not add forced minimum widths,
+observers or a larger row to compensate. The cue stays outside the
+bars/sparkline/history-lens branch, so changing display mode cannot discard freshness information; removing it
+requires a changed source observation rather than merely ending a lock.
+
+Verification: `GuestRow.test.tsx`, `MetricMiniSparkline.test.tsx` and production
+row/column-sizing/CSS browser fixture `guest-disk-provenance.cjs` cover all fixed
+deferrals, fresh independent evidence, same-row changes, and equal dense row
+height versus an unmarked control on desktop Chromium and phone Chromium/WebKit.
+Synthetic chart rendering is not fleet CPU, native collection or thaw proof.
+
### Guest disk status updates retain row ownership
Disk deferral copy follows reactive same-VM props in the existing row and drawer,
diff --git a/frontend-modern/browser-tests/guest-disk-provenance.cjs b/frontend-modern/browser-tests/guest-disk-provenance.cjs
new file mode 100644
index 0000000000..5c58184185
--- /dev/null
+++ b/frontend-modern/browser-tests/guest-disk-provenance.cjs
@@ -0,0 +1,384 @@
+const assert = require('node:assert/strict');
+const fs = require('node:fs');
+const path = require('node:path');
+const crypto = require('node:crypto');
+const { chromium, webkit } = require('playwright');
+
+const root = '/workspace/frontend-modern';
+const output = '/workspace/tmp/guest-disk-provenance';
+const origin = 'http://127.0.0.1:5315';
+const runtime = [
+ 'frontend-modern/src/components/Workloads/GuestRow.tsx',
+ 'frontend-modern/src/components/Workloads/MetricMiniSparkline.tsx',
+];
+const sha256 = (file) => crypto.createHash('sha256').update(fs.readFileSync(file)).digest('hex');
+const settle = (page) =>
+ page.evaluate(async () => {
+ await document.fonts.ready;
+ await new Promise((resolve) => requestAnimationFrame(() => requestAnimationFrame(resolve)));
+ });
+
+(async () => {
+ fs.mkdirSync(output, { recursive: true });
+ const result = {
+ playwright: require('playwright/package.json').version,
+ runtime_hashes: Object.fromEntries(runtime.map((file) => [file, sha256('/workspace/' + file)])),
+ cases: [],
+ screenshots: [],
+ result: 'incomplete',
+ limits:
+ 'Production row/full drawer/column sizing/CSS with synthetic observations. No physical phone, complete application route, collector, native backup/thaw, installed recovery or release evidence.',
+ };
+ assert.equal(
+ result.playwright,
+ JSON.parse(fs.readFileSync('/workspace/tests/integration/package-lock.json')).packages[
+ 'node_modules/@playwright/test'
+ ].version,
+ );
+ process.chdir(root);
+ const { createServer } = await import(path.join(root, 'node_modules/vite/dist/node/index.js'));
+ const server = await createServer({
+ root,
+ configFile: path.join(root, 'vite.config.ts'),
+ cacheDir: output + '/cache',
+ server: { host: '127.0.0.1', port: 5315, strictPort: true },
+ });
+ let browser;
+ try {
+ await server.listen();
+ for (const [name, engine, width, dark] of [
+ ['chromium-desktop', chromium, 1365, false],
+ ['chromium-phone', chromium, 390, false],
+ ['webkit-phone', webkit, 360, true],
+ ]) {
+ browser = await engine.launch(
+ engine === chromium
+ ? { headless: true, channel: 'chromium', args: ['--no-sandbox'] }
+ : { headless: true },
+ );
+ const context = await browser.newContext({
+ viewport: { width, height: width <= 768 ? 844 : 900 },
+ isMobile: width <= 768,
+ hasTouch: width <= 768,
+ locale: 'en-GB',
+ timezoneId: 'UTC',
+ });
+ const page = await context.newPage();
+ page.setDefaultTimeout(15000);
+ page.setDefaultNavigationTimeout(60000);
+ const record = {
+ name,
+ browser: browser.version(),
+ width,
+ dark,
+ errors: [],
+ requests: [],
+ states: [],
+ checks: [],
+ };
+ result.cases.push(record);
+ page.on('pageerror', (error) => record.errors.push(error.message));
+ await page.route('**/*', (route) => {
+ const request = route.request();
+ const url = new URL(request.url());
+ if (url.origin !== origin) {
+ record.requests.push({
+ method: request.method(),
+ origin: url.origin,
+ path: url.pathname,
+ disposition: 'blocked',
+ });
+ return route.abort();
+ }
+ if (url.pathname.startsWith('/api/')) {
+ record.requests.push({
+ method: request.method(),
+ origin: url.origin,
+ path: url.pathname,
+ disposition: 'synthetic',
+ });
+ return route.fulfill({
+ status: 200,
+ contentType: 'application/json',
+ body: JSON.stringify({
+ success: true,
+ data: [],
+ alerts: [],
+ anomalies: [],
+ config: null,
+ }),
+ });
+ }
+ return route.continue();
+ });
+ await page.addInitScript((isDark) => {
+ document.addEventListener('DOMContentLoaded', () => {
+ if (isDark) document.documentElement.classList.add('dark');
+ });
+ window.__trustedClicks = [];
+ document.addEventListener(
+ 'click',
+ (event) =>
+ window.__trustedClicks.push({ trusted: event.isTrusted, tag: event.target.tagName }),
+ true,
+ );
+ }, dark);
+ await page.goto(`${origin}/browser-tests/guest-disk-provenance.html`);
+ await page.waitForFunction(() => window.__guestDiskProvenance);
+ await settle(page);
+ const row = page.locator('[data-guest-id="fixture-pve:pve-a:101"]');
+ const freshRow = page.locator('[data-guest-id="fixture-pve:pve-a:102"]');
+ const cell = row.locator('[data-workload-col="disk"]');
+ const notice = cell.locator('[data-workload-disk-read-status]');
+ const compact = width <= 768;
+ await page.evaluate(() => {
+ window.__originalGuestRow = document.querySelector(
+ '[data-guest-id="fixture-pve:pve-a:101"]',
+ );
+ });
+ const initialHeight = await freshRow.evaluate((el) => el.getBoundingClientRect().height);
+ const checkValueFit = async () => {
+ const value = cell.locator('[data-testid="metric-mini-sparkline"] > span');
+ if (!(await value.count())) return undefined;
+ const geometry = await value.evaluate((el) => {
+ const rect = el.getBoundingClientRect();
+ const cellRect = el.closest('td').getBoundingClientRect();
+ const range = document.createRange();
+ range.selectNodeContents(el);
+ const textRect = range.getBoundingClientRect();
+ return {
+ value: el.textContent,
+ width: rect.width,
+ textWidth: textRect.width,
+ fits:
+ el.scrollWidth <= el.clientWidth + 1 &&
+ textRect.left >= cellRect.left &&
+ textRect.right <= cellRect.right &&
+ textRect.left >= rect.left - 1 &&
+ textRect.right <= rect.right + 1,
+ };
+ });
+ assert.ok(geometry.fits, `Inline value clipped: ${JSON.stringify(geometry)}`);
+ return geometry;
+ };
+ const check = async (retained, message) => {
+ assert.equal(await notice.count(), 1);
+ assert.equal(
+ await notice.locator('[aria-hidden="true"]').innerText(),
+ retained ? (compact ? 'Prior' : 'Last known') : compact ? 'N/A' : 'Unavailable',
+ );
+ assert.equal(await notice.locator('.sr-only').textContent(), message);
+ const geometry = await notice.locator('[aria-hidden="true"]').evaluate((el) => {
+ const rect = el.getBoundingClientRect();
+ const cellRect = el.closest('td').getBoundingClientRect();
+ return {
+ labelWidth: rect.width,
+ cellWidth: cellRect.width,
+ fits:
+ rect.left >= cellRect.left &&
+ rect.right <= cellRect.right &&
+ rect.top >= cellRect.top &&
+ rect.bottom <= cellRect.bottom,
+ rowHeight: el.closest('tr').getBoundingClientRect().height,
+ colour: getComputedStyle(el).color,
+ };
+ });
+ assert.ok(geometry.fits, JSON.stringify(geometry));
+ assert.ok(
+ geometry.rowHeight <= initialHeight + 0.5,
+ `Dense row grew: ${JSON.stringify(geometry)}, initial ${initialHeight}`,
+ );
+ assert.ok(
+ await page.evaluate(() => document.documentElement.scrollWidth <= innerWidth + 1),
+ );
+ assert.equal(
+ await page.evaluate(
+ () =>
+ window.__originalGuestRow ===
+ document.querySelector('[data-guest-id="fixture-pve:pve-a:101"]'),
+ ),
+ true,
+ );
+ assert.equal(await freshRow.locator('[data-workload-disk-read-status]').count(), 0);
+ geometry.valueFit = await checkValueFit();
+ return geometry;
+ };
+ const screenshot = async (suffix) => {
+ await settle(page);
+ const file = `${name}-${suffix}.png`;
+ await page.screenshot({ path: path.join(output, file), fullPage: true });
+ result.screenshots.push({
+ file,
+ sha256: sha256(path.join(output, file)),
+ name,
+ state: suffix,
+ });
+ };
+ await check(
+ true,
+ 'Using last known disk stats. Guest reads paused while Proxmox reports a VM operation lock, such as a backup. Pulse will check again on a later poll.',
+ );
+ await screenshot('retained-bars');
+ const deferrals = await page.evaluate(() => window.__guestDiskProvenance.deferrals);
+ for (const mode of ['bars', 'sparklines']) {
+ await page.evaluate((mode) => window.__guestDiskProvenance.mode(mode), mode);
+ for (const retained of [true, false]) {
+ for (const [reason, message] of deferrals) {
+ await page.evaluate(
+ ({ retained, reason }) =>
+ window.__guestDiskProvenance.apply({
+ reason: retained ? `prev-${reason}` : reason,
+ data: retained,
+ usage: 50,
+ kind: 'qemu',
+ }),
+ { retained, reason },
+ );
+ await settle(page);
+ const fullMessage = retained ? `Using last known disk stats. ${message}` : message;
+ const geometry = await check(retained, fullMessage);
+ if (mode === 'sparklines' && retained)
+ assert.equal(
+ await cell
+ .getByRole('img', { name: 'backup-guest disk usage history, last known 50%' })
+ .count(),
+ 1,
+ );
+ record.states.push({ mode, retained, reason, geometry });
+ }
+ }
+ }
+ await screenshot('unavailable-sparkline');
+ await page.evaluate(() => {
+ window.__guestDiskProvenance.mode('bars');
+ window.__guestDiskProvenance.apply({
+ reason: 'prev-agent-busy',
+ data: true,
+ lock: '',
+ kind: 'qemu',
+ });
+ });
+ await settle(page);
+ await check(
+ true,
+ 'Using last known disk stats. Guest reads deferred while an earlier guest request is still in progress. Pulse will check again on a later poll.',
+ );
+ record.checks.push('Lock clearance alone does not withdraw retained-read provenance.');
+ const disclosure = row.locator('[data-row-action]');
+ if (width > 768) {
+ await row.hover();
+ assert.equal(
+ await cell
+ .getByRole('img', { name: 'backup-guest disk usage history, last known 50%' })
+ .count(),
+ 1,
+ );
+ await check(
+ true,
+ 'Using last known disk stats. Guest reads deferred while an earlier guest request is still in progress. Pulse will check again on a later poll.',
+ );
+ await page.locator('h1').hover();
+ await disclosure.focus();
+ assert.equal(
+ await cell
+ .getByRole('img', { name: 'backup-guest disk usage history, last known 50%' })
+ .count(),
+ 1,
+ );
+ await page.keyboard.press('Enter');
+ record.checks.push(
+ 'Mouse and keyboard history lenses retain the visible notice and truthful accessible numeric label.',
+ );
+ } else {
+ await notice.locator('[aria-hidden="true"]').tap();
+ assert.equal(await row.getAttribute('data-history-lens-active'), null);
+ record.checks.push(
+ 'Trusted touch on the noninteractive provenance cue opens the existing drawer once without a hover lens or new tab stop.',
+ );
+ }
+ const drawer = page.getByRole('region', { name: 'Guest details' });
+ assert.ok(await drawer.isVisible());
+ assert.equal(await page.evaluate(() => window.__guestDiskProvenance.actionCount()), 1);
+ assert.ok(
+ await drawer
+ .getByText(
+ 'Using last known disk stats. Guest reads deferred while an earlier guest request is still in progress. Pulse will check again on a later poll.',
+ { exact: true },
+ )
+ .isVisible(),
+ );
+ await screenshot('drawer-reason');
+ await drawer.getByRole('button', { name: 'Collapse backup-guest details' }).click();
+ await page.evaluate(() =>
+ window.__guestDiskProvenance.apply({ reason: '', data: true, usage: 75, lock: '' }),
+ );
+ await page.evaluate(() => window.__guestDiskProvenance.mode('sparklines'));
+ await settle(page);
+ assert.equal(await notice.count(), 0);
+ assert.equal(await cell.getAttribute('title'), null);
+ assert.equal(
+ await cell
+ .getByRole('img', { name: 'backup-guest disk usage history, current 75%' })
+ .count(),
+ 1,
+ );
+ assert.equal(
+ await page.evaluate(
+ () =>
+ window.__originalGuestRow ===
+ document.querySelector('[data-guest-id="fixture-pve:pve-a:101"]'),
+ ),
+ true,
+ );
+ const freshValueFit = await checkValueFit();
+ assert.equal(freshValueFit.value, '75%');
+ record.freshValueFit = freshValueFit;
+ await screenshot('fresh-resumption');
+ record.checks.push(
+ 'A new same-identity fresh observation withdraws the warning and updates the value and chart name without remount.',
+ );
+ await page.evaluate(() =>
+ window.__guestDiskProvenance.apply({ reason: 'prev-vm-locked', kind: 'lxc' }),
+ );
+ await settle(page);
+ assert.equal(await notice.count(), 0);
+ assert.equal(await cell.getAttribute('title'), null);
+ record.checks.push(
+ 'A CT does not inherit VM-only guest-agent guidance; fresh linked data stays unmarked.',
+ );
+ assert.equal(await row.locator('[data-workload-disk-read-status][tabindex]').count(), 0);
+ assert.ok(
+ record.requests.every((request) => request.method === 'GET' && request.origin === origin),
+ );
+ assert.deepEqual(record.errors, []);
+ record.trustedClicks = await page.evaluate(() => window.__trustedClicks);
+ assert.ok(record.trustedClicks.some((event) => event.trusted));
+ record.columnIds = await page.evaluate(() => window.__guestDiskProvenance.columnIds);
+ record.layout = await page.evaluate(() => window.__guestDiskProvenance.layout);
+ record.initialRowHeight = initialHeight;
+ await context.close();
+ await browser.close();
+ browser = undefined;
+ }
+ result.result = 'passed';
+ } catch (error) {
+ result.error = error.stack || String(error);
+ throw error;
+ } finally {
+ if (browser) await browser.close();
+ await server.close();
+ fs.writeFileSync(path.join(output, 'result.json'), JSON.stringify(result, null, 2) + '\n');
+ console.log(
+ JSON.stringify({
+ result: result.result,
+ cases: result.cases.length,
+ stateChecks: result.cases.reduce((count, item) => count + item.states.length, 0),
+ screenshots: result.screenshots.length,
+ output,
+ }),
+ );
+ }
+})().catch((error) => {
+ console.error(error);
+ process.exitCode = 1;
+});
diff --git a/frontend-modern/browser-tests/guest-disk-provenance.html b/frontend-modern/browser-tests/guest-disk-provenance.html
new file mode 100644
index 0000000000..f2b6bc0e40
--- /dev/null
+++ b/frontend-modern/browser-tests/guest-disk-provenance.html
@@ -0,0 +1,12 @@
+<!doctype html>
+<html lang="en">
+ <head>
+ <meta charset="UTF-8" />
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+ <title>Guest filesystem read provenance verification</title>
+ </head>
+ <body>
+ <div id="root"></div>
+ <script type="module" src="./guest-disk-provenance.tsx"></script>
+ </body>
+</html>
diff --git a/frontend-modern/browser-tests/guest-disk-provenance.tsx b/frontend-modern/browser-tests/guest-disk-provenance.tsx
new file mode 100644
index 0000000000..a4942c3b5f
--- /dev/null
+++ b/frontend-modern/browser-tests/guest-disk-provenance.tsx
@@ -0,0 +1,206 @@
+// Production row, full drawer, column sizing and CSS with synthetic observations.
+// This is presentation/input evidence, not collection, native thaw or delivery.
+import { createSignal, For, Show } from 'solid-js';
+import { render } from 'solid-js/web';
+import { Router, Route } from '@solidjs/router';
+import { GuestRow } from '../src/components/Workloads/GuestRow';
+import { GuestDrawer } from '../src/components/Workloads/GuestDrawer';
+import { buildSummaryDisclosureControlsId } from '../src/components/shared/summaryInteractionA11y';
+import {
+ GUEST_COLUMNS,
+ getGuestColumnWidthStyle,
+ getWorkloadTableLayoutModeForContainer,
+ getWorkloadVisibleColumnsForLayout,
+} from '../src/components/Workloads/guestRowModel';
+import { DarkModeContext } from '../src/contexts/appRuntime';
+import { syncAIRuntimeSettings } from '../src/stores/aiRuntimeState';
+import type { WorkloadGuest } from '../src/types/workloads';
+import type { WorkloadMetricHistoryReader } from '../src/components/Workloads/workloadMetricHistoryModel';
+import { guestDiskDeferrals } from '../src/components/Workloads/__fixtures__/guestDiskDeferrals';
+import '../src/index.css';
+
+syncAIRuntimeSettings({ discovery_enabled: false });
+
+function Fixture() {
+ const [observation, setObservation] = createSignal({
+ reason: 'prev-vm-locked',
+ data: true,
+ usage: 50,
+ lock: 'backup',
+ kind: 'qemu',
+ });
+ const [mode, setMode] = createSignal<'bars' | 'sparklines'>('bars');
+ const [expanded, setExpanded] = createSignal(false);
+ const [actionCount, setActionCount] = createSignal(0);
+ const layout = getWorkloadTableLayoutModeForContainer(window.innerWidth - 24);
+ const requested = new Set(['name', 'cpu', 'memory', 'disk', 'uptime', 'backup']);
+ const columns = getWorkloadVisibleColumnsForLayout(
+ GUEST_COLUMNS.filter((column) => requested.has(column.id)),
+ layout,
+ );
+ const columnIds = columns.map((column) => column.id);
+ const toggle = () => {
+ setActionCount((count) => count + 1);
+ setExpanded((value) => !value);
+ };
+ const disk = () =>
+ observation().data
+ ? {
+ total: 10 * 1024 ** 3,
+ used: (observation().usage / 100) * 10 * 1024 ** 3,
+ usage: observation().usage,
+ }
+ : { total: 0, used: 0, usage: -1 };
+ const guest = (): WorkloadGuest => ({
+ id: 'fixture-pve:pve-a:101',
+ vmid: 101,
+ name: 'backup-guest',
+ node: 'pve-a',
+ instance: 'fixture-pve',
+ status: 'running',
+ type: observation().kind,
+ cpu: 0.1,
+ cpus: 2,
+ memory: { total: 1024 ** 3, used: 256 * 1024 ** 2, free: 768 * 1024 ** 2, usage: 25 },
+ disk: disk(),
+ disks: observation().data ? [{ ...disk(), mountpoint: '/data', type: 'ext4' }] : [],
+ diskStatusReason: observation().reason,
+ lock: observation().lock,
+ networkIn: 0,
+ networkOut: 0,
+ diskRead: 0,
+ diskWrite: 0,
+ uptime: 3600,
+ template: false,
+ lastBackup: 0,
+ backupInProgress: Boolean(observation().lock),
+ tags: [],
+ lastSeen: '2026-10-04T01:00:00Z',
+ });
+ const control = (): WorkloadGuest => ({
+ ...guest(),
+ id: 'fixture-pve:pve-a:102',
+ vmid: 102,
+ name: 'fresh-control',
+ diskStatusReason: '',
+ lock: '',
+ backupInProgress: false,
+ });
+ const history: WorkloadMetricHistoryReader = {
+ getGuestMetricSeries: (_guest, metric) => [
+ {
+ id: metric,
+ label: metric,
+ color: '#10b981',
+ points: [
+ { timestamp: 1791075540000, value: 25 },
+ { timestamp: 1791075600000, value: 50 },
+ ],
+ },
+ ],
+ getNodeMetricSeries: () => [],
+ };
+ (window as any).__guestDiskProvenance = {
+ apply: (next: Partial<ReturnType<typeof observation>>) =>
+ setObservation((previous) => ({ ...previous, ...next })),
+ mode: setMode,
+ expanded,
+ actionCount,
+ layout,
+ columnIds,
+ deferrals: guestDiskDeferrals,
+ };
+ return (
+ <main class="min-h-screen space-y-3 bg-surface p-3 text-base-content pulse-wide-data-surface">
+ <h1 class="text-base font-semibold">Guest filesystem read provenance</h1>
+ <p class="text-xs text-muted">
+ Synthetic observations. No backup or guest-agent command is sent.
+ </p>
+ <div class="flex gap-2">
+ <button
+ class="rounded-sm border border-border p-2 text-xs"
+ onClick={() => setMode((value) => (value === 'bars' ? 'sparklines' : 'bars'))}
+ >
+ Switch display mode
+ </button>
+ <button
+ class="rounded-sm border border-border p-2 text-xs"
+ onClick={() =>
+ setObservation((previous) => ({
+ ...previous,
+ reason: '',
+ lock: '',
+ data: true,
+ usage: 75,
+ }))
+ }
+ >
+ Mark observation fresh
+ </button>
+ </div>
+ <div class="table-scroll-shell overflow-x-auto">
+ <table class="w-full platform-table workload-table table-fixed">
+ <colgroup>
+ <For each={columnIds}>
+ {(id) => (
+ <col
+ style={getGuestColumnWidthStyle(id, window.innerWidth <= 768, layout, columnIds)}
+ />
+ )}
+ </For>
+ </colgroup>
+ <thead>
+ <tr>
+ <For each={columns}>{(column) => <th scope="col">{column.label}</th>}</For>
+ </tr>
+ </thead>
+ <tbody>
+ <GuestRow
+ guest={guest()}
+ visibleColumnIds={columnIds}
+ workloadTableLayoutMode={layout}
+ metricDisplayMode={mode()}
+ metricHistory={history}
+ onClick={toggle}
+ isExpanded={expanded()}
+ />
+ <GuestRow
+ guest={control()}
+ visibleColumnIds={columnIds}
+ workloadTableLayoutMode={layout}
+ metricDisplayMode={mode()}
+ metricHistory={history}
+ />
+ </tbody>
+ </table>
+ </div>
+ <Show when={expanded()}>
+ <section
+ id={buildSummaryDisclosureControlsId(guest().id)}
+ aria-label="Guest details"
+ class="mx-auto max-w-4xl"
+ >
+ <GuestDrawer guest={guest()} onClose={() => setExpanded(false)} />
+ </section>
+ </Show>
+ </main>
+ );
+}
+
+render(
+ () => (
+ <Router>
+ <Route
+ path="*"
+ component={() => (
+ <DarkModeContext.Provider
+ value={() => document.documentElement.classList.contains('dark')}
+ >
+ <Fixture />
+ </DarkModeContext.Provider>
+ )}
+ />
+ </Router>
+ ),
+ document.getElementById('root')!,
+);
diff --git a/frontend-modern/browser-verification/4d1519ee86ddd6cc.json b/frontend-modern/browser-verification/4d1519ee86ddd6cc.json
new file mode 100644
index 0000000000..bf7a4dc47b
--- /dev/null
+++ b/frontend-modern/browser-verification/4d1519ee86ddd6cc.json
@@ -0,0 +1,43 @@
+{
+ "version": 1,
+ "base_sha": "5311a7c6febc5dfd7fcd81b10ca188d925e34527",
+ "verified_at": "2026-10-04T01:22:10Z",
+ "result": "passed",
+ "changed_paths": [
+ "frontend-modern/src/components/Workloads/GuestRow.tsx",
+ "frontend-modern/src/components/Workloads/MetricMiniSparkline.tsx"
+ ],
+ "content_sha256": {
+ "frontend-modern/src/components/Workloads/GuestRow.tsx": "b71d9e713e58b05a9072d8cb542fbd540a7aef6574458dc0776fc6b1c52a15e2",
+ "frontend-modern/src/components/Workloads/MetricMiniSparkline.tsx": "dcc9b81a793e43bac8a9e5059a29335bf5699d7d9d82e2643f5b4daaf4181eaa"
+ },
+ "routes": [
+ "/browser-tests/guest-disk-provenance.html"
+ ],
+ "viewports": [
+ {
+ "width": 1365,
+ "height": 900
+ },
+ {
+ "width": 390,
+ "height": 844
+ },
+ {
+ "width": 360,
+ "height": 844
+ }
+ ],
+ "states": [
+ "Production GuestRow, full GuestDrawer, responsive column selection/weights and CSS; synthetic observations. Playwright 1.56.1 matches integration lock, desktop and phone Chromium 141.0.7390.37 plus dark phone WebKit 26.0. All 12 final bitmaps opened.",
+ "96 fixed-deferral states across bars/sparklines, retained/no prior sample, before hover: visible Last known/Prior versus Unavailable/N/A and full safe assistive reason. Retained numbers are announced last known, never current. Independent fresh control and CT rows remain unmarked.",
+ "Cue geometry and every inline sparkline value fit the existing canonical compact/phone/narrow columns, with 32px row height equal to an unmarked control and no horizontal document overflow. Inline plot yields width to its value; phone fresh 75% remains visible.",
+ "This verifies production component presentation/input, not a full application route, physical phone, collector, backup task completion, guest thaw/liveness, installed forward/recovery or containing release. Initial matrix success did not catch numeric clipping; its adverse visual finding and exact original records are retained separately."
+ ],
+ "interactions": [
+ "Mouse and keyboard history lenses preserve visible freshness and last-known accessible numeric context while replacing the bar with a chart. No new event listener, action or tab stop is introduced.",
+ "Trusted phone touch on the noninteractive provenance label activates the existing row exactly once, opens the full readable safe reason and does not create a hover history lens; existing collapse remains usable.",
+ "Clearing a VM lock with a subsequent in-flight read reason does not withdraw the notice. A new same-identity fresh observation clears title/notice, updates 75% and current accessible context without replacing the row node.",
+ "Guest fixtures make only local synthetic GET requests and report no page errors. No real backup, QGA or release operation is sent."
+ ]
+}
diff --git a/frontend-modern/src/components/Workloads/GuestRow.tsx b/frontend-modern/src/components/Workloads/GuestRow.tsx
index 784665c66b..377095f897 100644
--- a/frontend-modern/src/components/Workloads/GuestRow.tsx
+++ b/frontend-modern/src/components/Workloads/GuestRow.tsx
@@ -20,7 +20,10 @@ import { TagBadges } from '@/components/shared/TagBadges';
import { WorkloadTypeBadge } from '@/components/shared/WorkloadTypeBadge';
import { getWorkloadCPUPercent, resolveWorkloadType } from '@/utils/workloads';
import { EnhancedCPUBar } from '@/components/Workloads/EnhancedCPUBar';
-import { MetricMiniSparkline } from '@/components/Workloads/MetricMiniSparkline';
+import {
+ MetricMiniSparkline,
+ type MetricMiniSparklineValueLabelContext,
+} from '@/components/Workloads/MetricMiniSparkline';
import { UpdateButton } from '@/components/shared/ContainerUpdateBadge';
import {
buildSummaryDisclosureControlsId,
@@ -192,10 +195,12 @@ export function GuestRow(props: GuestRowProps) {
valueLabelMode: 'inline' | 'tooltip' | 'hidden' = 'inline',
formatValue?: (value: number) => string,
seriesOptions?: Parameters<WorkloadMetricHistoryReader['getGuestMetricSeries']>[2],
+ valueLabelContext?: MetricMiniSparklineValueLabelContext,
) => (
<MetricMiniSparkline
series={props.metricHistory?.getGuestMetricSeries(props.guest, metric, seriesOptions) ?? []}
valueLabel={valueLabel}
+ valueLabelContext={valueLabelContext}
valueLabelMode={valueLabelMode}
title={title}
unit={unit}
@@ -212,6 +217,26 @@ export function GuestRow(props: GuestRowProps) {
const vm = props.guest as VM;
return getWorkloadGuestDiskStatusMessage(vm.diskStatusReason);
};
+ // A native title or bar tooltip is not a visible freshness cue on touch,
+ // and disappears from the chart's accessible value when the history lens opens.
+ const diskReadStatus = createMemo(() => {
+ const reason = props.guest.diskStatusReason;
+ if (!isVM(props.guest) || !reason) return undefined;
+ const retained = reason.startsWith('prev-');
+ return {
+ label: retained
+ ? usesCompactTableLayout()
+ ? 'Prior'
+ : 'Last known'
+ : usesCompactTableLayout()
+ ? 'N/A'
+ : 'Unavailable',
+ message: getDiskStatusTooltip(),
+ valueLabelContext: retained ? ('last known' as const) : ('current' as const),
+ };
+ });
+ const diskValueLabelContext = (): MetricMiniSparklineValueLabelContext =>
+ diskReadStatus()?.valueLabelContext ?? 'current';
const interactiveRowHandlers = createSummaryInteractiveRowPreviewHandlers({
onPreview: () => {
if (!rowHistoryPreviewEnabled()) return;
@@ -559,9 +584,7 @@ export function GuestRow(props: GuestRowProps) {
<td
class="px-1.5 sm:px-2 py-0.5 align-middle"
data-workload-col="disk"
- title={
- isVM(props.guest) && props.guest.diskStatusReason ? getDiskStatusTooltip() : undefined
- }
+ title={diskReadStatus()?.message}
>
<Show when={isSparklineMode()}>
{renderMetricSparkline(
@@ -571,6 +594,8 @@ export function GuestRow(props: GuestRowProps) {
'%',
'inline',
formatMetricPercent,
+ undefined,
+ diskValueLabelContext(),
)}
</Show>
<Show when={!isSparklineMode()}>
@@ -610,12 +635,25 @@ export function GuestRow(props: GuestRowProps) {
'%',
'inline',
formatMetricPercent,
+ undefined,
+ diskValueLabelContext(),
)}
</div>
</Show>
</div>
</Show>
</Show>
+ <Show when={diskReadStatus()}>
+ {(status) => (
+ <p
+ data-workload-disk-read-status
+ class="mt-0.5 text-center text-[10px] leading-none text-amber-700 dark:text-amber-300"
+ >
+ <span aria-hidden="true">{status().label}</span>
+ <span class="sr-only">{status().message}</span>
+ </p>
+ )}
+ </Show>
</td>
</Show>
diff --git a/frontend-modern/src/components/Workloads/MetricMiniSparkline.tsx b/frontend-modern/src/components/Workloads/MetricMiniSparkline.tsx
index 82a31611e0..eedc2de08f 100644
--- a/frontend-modern/src/components/Workloads/MetricMiniSparkline.tsx
+++ b/frontend-modern/src/components/Workloads/MetricMiniSparkline.tsx
@@ -13,11 +13,13 @@ import {
} from './workloadMetricHistoryModel';
type MetricMiniSparklineValueLabelMode = 'inline' | 'tooltip' | 'hidden';
+export type MetricMiniSparklineValueLabelContext = 'current' | 'last known';
interface MetricMiniSparklineProps {
series: WorkloadMetricSparklineSeries[];
valueLabel?: string;
valueLabelMode?: MetricMiniSparklineValueLabelMode;
+ valueLabelContext?: MetricMiniSparklineValueLabelContext;
title?: string;
unit?: string;
emptyLabel?: string;
@@ -80,11 +82,15 @@ export const MetricMiniSparkline: Component<MetricMiniSparklineProps> = (props)
});
const activeHoverState = createMemo(() => synchronizedState() ?? hoveredState());
const rootColumns = createMemo(() =>
- showInlineValue() ? 'grid-cols-[minmax(2.5rem,1fr)_auto]' : 'grid-cols-[minmax(2.5rem,1fr)]',
+ // Narrow workload columns cannot spare a 40px plot plus its value.
+ // Keep the number readable and let the trend line use the remaining width.
+ showInlineValue() ? 'grid-cols-[minmax(0,1fr)_auto]' : 'grid-cols-[minmax(0,1fr)]',
);
const ariaLabel = createMemo(() => {
const title = props.title || 'Metric history';
- const value = props.valueLabel ? `, current ${props.valueLabel}` : '';
+ const value = props.valueLabel
+ ? `, ${props.valueLabelContext ?? 'current'} ${props.valueLabel}`
+ : '';
return `${title}${value}`;
});
const formatHoverValue = (value: number) =>
diff --git a/frontend-modern/src/components/Workloads/__tests__/GuestRow.test.tsx b/frontend-modern/src/components/Workloads/__tests__/GuestRow.test.tsx
index 16dd981390..362d24e6e5 100644
--- a/frontend-modern/src/components/Workloads/__tests__/GuestRow.test.tsx
+++ b/frontend-modern/src/components/Workloads/__tests__/GuestRow.test.tsx
@@ -671,6 +671,186 @@ describe('GuestRow', () => {
});
});
+ describe('visible filesystem read provenance', () => {
+ const history = {
+ getGuestMetricSeries: () => [
+ {
+ id: 'disk',
+ label: 'Filesystem',
+ color: '#10b981',
+ points: [
+ { timestamp: 1, value: 25 },
+ { timestamp: 2, value: 50 },
+ ],
+ },
+ ],
+ getNodeMetricSeries: () => [],
+ };
+
+ for (const mode of ['bars', 'sparklines'] as const) {
+ it.each(guestDiskDeferrals)(
+ `labels retained ${mode} for %s without a hover`,
+ (reason, message) => {
+ const { container } = renderGuestRow({
+ guest: makeGuest({ diskStatusReason: `prev-${reason}` }),
+ visibleColumnIds: ['name', 'disk'],
+ metricDisplayMode: mode,
+ });
+ const notice = container.querySelector('[data-workload-disk-read-status]');
+ expect(notice).toHaveTextContent('Last known');
+ expect(notice).toHaveTextContent(`Using last known disk stats. ${message}`);
+ expect(notice?.querySelector('[aria-hidden="true"]')).toHaveTextContent('Last known');
+ expect(notice).not.toHaveAttribute('tabindex');
+ },
+ );
+
+ it.each(guestDiskDeferrals)(
+ `shows ${mode} read status without a prior sample for %s`,
+ (reason, message) => {
+ const { container } = renderGuestRow({
+ guest: makeGuest({
+ diskStatusReason: reason,
+ disk: makeDisk({ total: 0, used: 0, usage: -1 }),
+ disks: [],
+ }),
+ visibleColumnIds: ['name', 'disk'],
+ metricDisplayMode: mode,
+ });
+ const notice = container.querySelector('[data-workload-disk-read-status]');
+ expect(notice).toHaveTextContent('Unavailable');
+ expect(notice).toHaveTextContent(message);
+ expect(notice).not.toHaveTextContent('Last known');
+ },
+ );
+
+ it(`withdraws the ${mode} notice only on a fresh same-VM observation`, () => {
+ const [guest, setGuest] = createSignal(makeGuest({ diskStatusReason: 'prev-vm-locked' }));
+ const { container } = render(() => (
+ <table>
+ <tbody>
+ <GuestRow
+ guest={guest()}
+ visibleColumnIds={['name', 'disk']}
+ metricDisplayMode={mode}
+ />
+ </tbody>
+ </table>
+ ));
+ const row = container.querySelector('tr');
+ expect(container.querySelector('[data-workload-disk-read-status]')).toHaveTextContent(
+ 'Last known',
+ );
+ setGuest(makeGuest({ diskStatusReason: 'prev-agent-busy', lock: '' }));
+ expect(container.querySelector('[data-workload-disk-read-status]')).toHaveTextContent(
+ 'earlier guest request',
+ );
+ setGuest(
+ makeGuest({
+ diskStatusReason: undefined,
+ disk: makeDisk({ usage: 75, used: 8053063680 }),
+ }),
+ );
+ expect(container.querySelector('tr')).toBe(row);
+ expect(container.querySelector('[data-workload-disk-read-status]')).toBeNull();
+ expect(container.querySelector('[data-workload-col="disk"]')).not.toHaveAttribute('title');
+ if (mode === 'sparklines')
+ expect(
+ screen.getByRole('img', { name: 'test-vm disk usage history, current 75%' }),
+ ).toBeInTheDocument();
+ });
+ }
+
+ it('keeps provenance when a hover history lens replaces the disk bar', () => {
+ const { container } = renderGuestRow({
+ guest: makeGuest({ diskStatusReason: 'prev-vm-locked' }),
+ visibleColumnIds: ['name', 'disk'],
+ metricDisplayMode: 'bars',
+ metricHistory: history,
+ });
+ const row = container.querySelector('tr')!;
+ fireEvent.pointerEnter(row, { pointerType: 'mouse' });
+ expect(screen.queryByTestId('disk-bar')).not.toBeInTheDocument();
+ expect(container.querySelector('[data-workload-disk-read-status]')).toHaveTextContent(
+ 'Last known',
+ );
+ expect(
+ screen.getByRole('img', { name: 'test-vm disk usage history, last known 50%' }),
+ ).toBeInTheDocument();
+ fireEvent.pointerLeave(row, { pointerType: 'mouse' });
+ expect(screen.getByTestId('disk-bar')).toBeInTheDocument();
+ expect(container.querySelector('[data-workload-disk-read-status]')).toHaveTextContent(
+ 'Last known',
+ );
+ });
+
+ it('does not announce retained sparkline data as current', () => {
+ renderGuestRow({
+ guest: makeGuest({ diskStatusReason: 'prev-agent-timeout' }),
+ visibleColumnIds: ['name', 'disk'],
+ metricDisplayMode: 'sparklines',
+ });
+ expect(
+ screen.getByRole('img', { name: 'test-vm disk usage history, last known 50%' }),
+ ).toBeInTheDocument();
+ expect(screen.queryByRole('img', { name: /current/ })).not.toBeInTheDocument();
+ });
+
+ it('fits compact provenance copy without dropping the full accessible reason', () => {
+ const [guest, setGuest] = createSignal(makeGuest({ diskStatusReason: 'prev-agent-timeout' }));
+ const { container } = render(() => (
+ <table>
+ <tbody>
+ <GuestRow
+ guest={guest()}
+ visibleColumnIds={['name', 'disk']}
+ workloadTableLayoutMode="phone"
+ />
+ </tbody>
+ </table>
+ ));
+ let notice = container.querySelector('[data-workload-disk-read-status]');
+ expect(notice?.querySelector('[aria-hidden="true"]')).toHaveTextContent('Prior');
+ expect(notice?.querySelector('.sr-only')).toHaveTextContent(
+ 'Using last known disk stats. Guest request timed out. Completion is uncertain. Do not restart the guest agent during a backup.',
+ );
+ setGuest(
+ makeGuest({
+ diskStatusReason: 'vm-locked',
+ disk: makeDisk({ total: 0, used: 0, usage: -1 }),
+ }),
+ );
+ notice = container.querySelector('[data-workload-disk-read-status]');
+ expect(notice?.querySelector('[aria-hidden="true"]')).toHaveTextContent('N/A');
+ expect(notice?.querySelector('.sr-only')).toHaveTextContent(
+ 'Guest reads paused while Proxmox reports a VM operation lock',
+ );
+ });
+
+ it('leaves independent fresh data and non-VM rows unmarked', () => {
+ const [guest, setGuest] = createSignal(
+ makeGuest({ agentKind: 'pulse', diskStatusReason: undefined, lock: 'backup' }),
+ );
+ const { container } = render(() => (
+ <table>
+ <tbody>
+ <GuestRow guest={guest()} visibleColumnIds={['name', 'disk']} />
+ </tbody>
+ </table>
+ ));
+ expect(container.querySelector('[data-workload-disk-read-status]')).toBeNull();
+ setGuest(makeGuest({ type: 'lxc', diskStatusReason: 'prev-vm-locked' }));
+ expect(container.querySelector('[data-workload-disk-read-status]')).toBeNull();
+ setGuest(
+ makeGuest({
+ workloadType: 'app-container',
+ type: 'docker',
+ diskStatusReason: 'prev-vm-locked',
+ }),
+ );
+ expect(container.querySelector('[data-workload-disk-read-status]')).toBeNull();
+ });
+ });
+
describe('lock label', () => {
it.each(guestDiskDeferrals)(
'annotates retained row and disk tooltip for %s',
diff --git a/frontend-modern/src/components/Workloads/__tests__/MetricMiniSparkline.test.tsx b/frontend-modern/src/components/Workloads/__tests__/MetricMiniSparkline.test.tsx
index 542ec2a705..d145438de7 100644
--- a/frontend-modern/src/components/Workloads/__tests__/MetricMiniSparkline.test.tsx
+++ b/frontend-modern/src/components/Workloads/__tests__/MetricMiniSparkline.test.tsx
@@ -1,7 +1,11 @@
import { describe, expect, it } from 'vitest';
import { fireEvent, render, screen } from '@solidjs/testing-library';
-import { MetricMiniSparkline } from '../MetricMiniSparkline';
+import { createSignal } from 'solid-js';
+import {
+ MetricMiniSparkline,
+ type MetricMiniSparklineValueLabelContext,
+} from '../MetricMiniSparkline';
describe('MetricMiniSparkline', () => {
it('renders a compact history path and current value label', () => {
@@ -27,10 +31,41 @@ describe('MetricMiniSparkline', () => {
const sparkline = screen.getByTestId('metric-mini-sparkline');
expect(sparkline.dataset.renderedSeriesCount).toBe('1');
+ expect(sparkline).toHaveClass('grid-cols-[minmax(0,1fr)_auto]');
+ expect(screen.getByRole('img', { name: 'CPU history, current 45%' })).toBeInTheDocument();
expect(screen.getByText('45%')).toBeInTheDocument();
expect(sparkline.querySelector('path')?.getAttribute('d')).toContain('M');
});
+ it('announces last-known values without changing historical points and withdraws that context reactively', () => {
+ const [context, setContext] = createSignal<MetricMiniSparklineValueLabelContext>('last known');
+ const { container } = render(() => (
+ <MetricMiniSparkline
+ title="Disk history"
+ unit="%"
+ valueLabel="50%"
+ valueLabelContext={context()}
+ series={[
+ {
+ id: 'disk',
+ label: 'Filesystem',
+ color: '#10b981',
+ points: [
+ { timestamp: 1, value: 25 },
+ { timestamp: 2, value: 50 },
+ ],
+ },
+ ]}
+ />
+ ));
+ const chart = screen.getByRole('img', { name: 'Disk history, last known 50%' });
+ const path = chart.querySelector('path')?.getAttribute('d');
+ expect(screen.getByText('50%')).toBeInTheDocument();
+ setContext('current');
+ expect(screen.getByRole('img', { name: 'Disk history, current 50%' })).toBe(chart);
+ expect(container.querySelector('path')?.getAttribute('d')).toBe(path);
+ });
+
it('keeps the label visible when history has no renderable line', () => {
render(() => (
<MetricMiniSparkline