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
Do not call stopped VM filesystem carriers current
pulse-triage[bot]171579a878fe
diff --git a/docs/release-control/v6/internal/subsystems/frontend-primitives.md b/docs/release-control/v6/internal/subsystems/frontend-primitives.mdindex 0da0a9c995..6451a53124 100644--- a/docs/release-control/v6/internal/subsystems/frontend-primitives.md+++ b/docs/release-control/v6/internal/subsystems/frontend-primitives.md@@ -9329,3 +9329,19 @@ level at 0 instead of restating factory values. Per-resource rows render amuted dash for metrics an override cannot store (Docker container restart andmemory-limit rules, every PMG threshold). No shared primitive, table componentor layout changes.++### Stopped VM filesystem presentation (12 October 2026)++`getWorkloadGuestDiskRead` treats an explicitly stopped VM as having no current+in-guest filesystem reading, even when a power-state update has no+`diskStatusReason` and the resource retains numeric disk fields. The same rule+applies to Proxmox and linked Pulse-agent producers. Workload bars, accessible+sparkline values, filesystem details, capacity sorting and the current History+legend all consume that shared decision. Stored History is not removed or+rewritten. On restart, an explicit `prev-` read deferral remains last known until+fresh source evidence clears it; a real measured zero is still current.++This does not impose VM semantics on stopped LXC platform storage, alter+collection, probe a guest, or establish thaw, covered-filesystem writes or native+restart recovery. Regressions cover the helper, both row modes, details,+History and the native-facet-to-workload mapping with an unaffected second site.diff --git a/frontend-modern/browser-tests/guest-disk-provenance.tsx b/frontend-modern/browser-tests/guest-disk-provenance.tsxindex a4942c3b5f..141fa34942 100644--- a/frontend-modern/browser-tests/guest-disk-provenance.tsx+++ b/frontend-modern/browser-tests/guest-disk-provenance.tsx@@ -28,6 +28,9 @@ function Fixture() {usage: 50,lock: 'backup',kind: 'qemu',+ status: 'running',+ disksFromAgent: false,+ agentStale: false,});const [mode, setMode] = createSignal<'bars' | 'sparklines'>('bars');const [expanded, setExpanded] = createSignal(false);@@ -57,7 +60,7 @@ function Fixture() {name: 'backup-guest',node: 'pve-a',instance: 'fixture-pve',- status: 'running',+ status: observation().status,type: observation().kind,cpu: 0.1,cpus: 2,@@ -65,6 +68,8 @@ function Fixture() {disk: disk(),disks: observation().data ? [{ ...disk(), mountpoint: '/data', type: 'ext4' }] : [],diskStatusReason: observation().reason,+ disksFromAgent: observation().disksFromAgent || undefined,+ agentStale: observation().agentStale || undefined,lock: observation().lock,networkIn: 0,networkOut: 0,@@ -85,6 +90,9 @@ function Fixture() {diskStatusReason: '',lock: '',backupInProgress: false,+ status: 'running',+ disksFromAgent: undefined,+ agentStale: undefined,});const history: WorkloadMetricHistoryReader = {getGuestMetricSeries: (_guest, metric) => [diff --git a/frontend-modern/browser-tests/guest-stopped-disk.cjs b/frontend-modern/browser-tests/guest-stopped-disk.cjsnew file mode 100644index 0000000000..37e70ae5f3--- /dev/null+++ b/frontend-modern/browser-tests/guest-stopped-disk.cjs@@ -0,0 +1,165 @@+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-stopped-disk/browser';+const origin = 'http://127.0.0.1:5338';+const hash = (file) => crypto.createHash('sha256').update(fs.readFileSync(file)).digest('hex');+const source = [+ 'frontend-modern/src/utils/workloadGuestPresentation.ts',+ 'frontend-modern/browser-tests/guest-disk-provenance.tsx',+ 'frontend-modern/browser-tests/guest-stopped-disk.cjs',+];+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 = {+ result: 'incomplete',+ playwright: require('playwright/package.json').version,+ source_sha256: Object.fromEntries(source.map((file) => [file, hash('/workspace/' + file)])),+ cases: [], screenshots: [], cleanup: { browser: false, server: false },+ limits: 'Production row, full drawer, History and CSS with synthetic local observations/API. No guest command, native QGA/thaw/writes, installed restart, physical-phone or release acceptance.',+ };+ 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: 5338, strictPort: true } });+ let browser;+ try {+ await server.listen();+ for (const [name, engine, width, dark] of [+ ['desktop-light', chromium, 1280, false], ['phone-dark', webkit, 390, 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(12000);+ page.setDefaultNavigationTimeout(60000);+ const record = { name, browser: browser.version(), width, dark, errors: [], requests: [], checks: [] };+ let historyMode = 'stored';+ 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({ path: url.pathname, method: request.method(), blocked: true }); return route.abort(); }+ if (!url.pathname.startsWith('/api/')) return route.continue();+ record.requests.push({ path: url.pathname, method: request.method() });+ if (url.pathname === '/api/metrics-store/history') {+ const end = Date.now(), start = end - 3600_000;+ const point = (timestamp, value) => ({ timestamp, value, min: value, max: value });+ return route.fulfill({ json: { resourceType: 'vm', resourceId: url.searchParams.get('resourceId'), range: url.searchParams.get('range'), start, end, metrics: historyMode === 'stored' ? { disk: [point(start, 25), point(end, 50)] } : {}, 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: [] }+ : { success: true, data: [], alerts: [], anomalies: [], config: null } });+ });+ await page.addInitScript((isDark) => {+ document.addEventListener('DOMContentLoaded', () => { if (isDark) document.documentElement.classList.add('dark'); });+ window.__trustedInput = [];+ document.addEventListener('click', (event) => window.__trustedInput.push(event.isTrusted), true);+ }, dark);+ 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); };+ const row = page.locator('[data-guest-id="fixture-pve:pve-a:101"]');+ const control = page.locator('[data-guest-id="fixture-pve:pve-a:102"]');+ const cell = row.locator('[data-workload-col="disk"]');+ const click = (target) => width < 768 ? target.tap() : target.click();+ await apply({ reason: '', lock: '', status: 'stopped', data: true, usage: 90 });+ for (const mode of ['bars', 'sparklines']) {+ await page.evaluate((value) => window.__guestDiskProvenance.mode(value), mode); await settle(page);+ assert.match(await cell.innerText(), /Unavailable|N\/A/);+ assert.equal(await cell.getAttribute('title'), 'Guest filesystem stats unavailable while the VM is stopped.');+ assert.equal(await cell.getByRole('progressbar').count(), 0);+ for (const label of await cell.getByRole('img').evaluateAll((items) => items.map((item) => item.getAttribute('aria-label')))) assert.doesNotMatch(label, /current 90%/);+ assert.equal(await control.locator('[data-workload-disk-read-status]').count(), 0);+ }+ record.checks.push('Both row modes withdraw stopped-VM current usage; the independent running control is unchanged.');+ const disclosure = row.locator('[data-row-action]');+ if (width < 768) await click(cell.locator('[data-workload-disk-read-status]'));+ 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');+ const filesystem = technical.getByText('/data', { exact: true }).locator('xpath=ancestor::tr');+ const capture = async (state, target) => {+ await target.scrollIntoViewIfNeeded(); await settle(page);+ const file = `${name}-${state}.png`; await target.screenshot({ path: output + '/' + file });+ result.screenshots.push({ file, sha256: hash(output + '/' + file), name, state });+ };+ assert.match(await filesystem.innerText(), /Usage unavailable/);+ assert.doesNotMatch(await filesystem.innerText(), /90%|9\.00 GB/);+ assert.equal(await filesystem.getByRole('progressbar').count(), 0);+ assert.equal(await technical.getByRole('link', { name: 'Filesystem reading guidance' }).getAttribute('href'), '/docs/VM_DISK_MONITORING#a-missing-reading-is-not-an-installation-diagnosis');+ await capture('stopped-filesystems', technical);+ // A linked agent's cached numbers cannot override the known VM power state.+ 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 }));+ 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')));+ 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);+ assert.match(await chart.locator('[data-history-deferred="disk"]').innerText(), /VM is stopped/);+ await capture('stopped-history', chart);+ await apply({ status: 'running', reason: 'prev-agent-busy', disksFromAgent: false });+ 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);+ 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 }));+ 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: '' });+ assert.equal(await chart.locator('[data-history-current="disk"]').count(), 0);+ assert.equal(await chart.locator('[data-history-last-known="disk"]').count(), 0);+ assert.match(await chart.locator('[data-history-deferred="disk"]').innerText(), /VM is stopped/);+ await apply({ status: 'running', reason: 'prev-agent-busy' });+ assert.match(await chart.locator('[data-history-last-known="disk"]').innerText(), /90.0%.*last known/s);+ await capture('restart-retained', chart);+ 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);+ 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');+ await capture('stopped-lxc-control', technical);+ record.checks.push('Stopped LXC platform storage keeps its independent reading.');+ const geometry = await technical.evaluate((el) => ({ width: el.clientWidth, scroll: el.scrollWidth, documentWidth: document.documentElement.clientWidth, documentScroll: document.documentElement.scrollWidth }));+ assert.ok(geometry.scroll <= geometry.width + 1, JSON.stringify(geometry));+ assert.ok(geometry.documentScroll <= geometry.documentWidth + 1, JSON.stringify(geometry));+ record.geometry = geometry;+ await click(drawer.getByRole('button', { name: 'Collapse backup-guest details' }));+ 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));+ 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;+ }+ result.result = 'passed';+ } catch (error) {+ result.error = String(error.stack || error); throw error;+ } finally {+ if (browser) await browser.close(); result.cleanup.browser = true;+ await server.close(); result.cleanup.server = true;+ fs.writeFileSync(output + '/result.json', JSON.stringify(result, null, 2) + '\n');+ }+})().catch((error) => { console.error(error); process.exitCode = 1; });diff --git a/frontend-modern/browser-verification/2e820b8053d7a0f7.json b/frontend-modern/browser-verification/2e820b8053d7a0f7.jsonnew file mode 100644index 0000000000..2a110e7dd1--- /dev/null+++ b/frontend-modern/browser-verification/2e820b8053d7a0f7.json@@ -0,0 +1,39 @@+{+ "version": 1,+ "base_sha": "cbfe7962502e6543d142655a471db917bf5efb37",+ "verified_at": "2026-10-12T00:02:05Z",+ "result": "passed",+ "changed_paths": [+ "frontend-modern/src/utils/workloadGuestPresentation.ts"+ ],+ "content_sha256": {+ "frontend-modern/src/utils/workloadGuestPresentation.ts": "71a2d2e62411c70c0eb609e68cd4963dac483be59a5be6afcf96c1ce2191436f"+ },+ "routes": [+ "/browser-tests/guest-disk-provenance.html"+ ],+ "viewports": [+ {+ "width": 1280,+ "height": 900+ },+ {+ "width": 390,+ "height": 844+ }+ ],+ "states": [+ "Stopped VM without diskStatusReason but with numeric platform/linked-agent carrier",+ "Running VM with explicit prev-agent-busy after restart",+ "Fresh zero on the same row/drawer",+ "Stopped LXC independent platform storage and unaffected running VM control",+ "Stored disk History kept separate from the live reading; separate synthetic empty-store response exercises fallback without fabricated points"+ ],+ "interactions": [+ "Bars and sparklines retain visible/accessibly explained unavailability; current stopped disk percentages withdrawn",+ "Keyboard Enter / touch row disclosure, Overview/History tabs, readonly History refresh and close",+ "Stop/restart/fresh transitions without remount; historical paths unchanged and deferred source stays labelled",+ "Inspected eight light desktop/dark WebKit phone captures; no page error, page-level overflow, off-origin or mutating request"+ ],+ "notes": "pulse-worker-browser frontend-modern/browser-tests/guest-stopped-disk.cjs. Playwright 1.56.1; browser and server cleanup observed. Production components/CSS with synthetic data, not native QGA/thaw/writes or installed/released recovery. Earlier attempt failed an incorrect harness expectation for stored History; preserved separately, corrected without runtime change."+}diff --git a/frontend-modern/src/components/Workloads/__tests__/GuestDrawerHistory.disk-provenance.test.tsx b/frontend-modern/src/components/Workloads/__tests__/GuestDrawerHistory.disk-provenance.test.tsxindex 7a3c330075..738585e63a 100644--- a/frontend-modern/src/components/Workloads/__tests__/GuestDrawerHistory.disk-provenance.test.tsx+++ b/frontend-modern/src/components/Workloads/__tests__/GuestDrawerHistory.disk-provenance.test.tsx@@ -79,6 +79,43 @@ const utilization = () => screen.getAllByTestId('guest-history-group-chart')[0];// Actual backend provenance remains authoritative. Removing a VM lock alone// cannot turn retained readings into current data or prove native thaw.describe('GuestDrawerHistory filesystem provenance', () => {+ it('withdraws the current stopped-VM carrier but keeps real stored History', async () => {+ const fetch = vi+ .spyOn(ChartsAPI, 'getMetricsHistory')+ .mockResolvedValue(response({ disk: [point(start, 25), point(end, 50)] }));+ const [value, setValue] = createSignal(guest('', 90));+ expect(getGuestDrawerCurrentMetrics(value()).disk).toBe(90);+ mount(value);+ const chart = utilization();+ await waitFor(() => expect(chart.querySelectorAll('path').length).toBeGreaterThan(0));+ const paths = () =>+ Array.from(chart.querySelectorAll('path'), (item) => item.getAttribute('d'));+ const storedPaths = paths();+ setValue({ ...value(), status: 'stopped', diskStatusReason: undefined });+ expect(chart.querySelector('[data-history-current="disk"]')).toBeNull();+ expect(chart.querySelector('[data-history-last-known="disk"]')).toBeNull();+ expect(chart.querySelector('[data-history-deferred="disk"]')).toHaveTextContent(+ 'Guest filesystem stats unavailable while the VM is stopped.',+ );+ expect(paths()).toEqual(storedPaths);+ expect(getGuestDrawerCurrentMetrics(value()).disk).toBeUndefined();+ setValue(guest('prev-agent-busy', 90));+ expect(getGuestDrawerDeferredMetrics(value()).disk.lastKnownValue).toBe(90);+ expect(chart.querySelector('[data-history-deferred="disk"]')).toHaveTextContent(+ 'earlier guest request',+ );+ expect(chart).toHaveTextContent('Disk50.0%');+ expect(chart.querySelector('[data-history-last-known="disk"]')).toBeNull();+ expect(paths()).toEqual(storedPaths);+ setValue(guest('', 30));+ expect(utilization()).toBe(chart);+ expect(getGuestDrawerCurrentMetrics(value()).disk).toBe(30);+ expect(chart).toHaveTextContent('Disk50.0%');+ expect(paths()).toEqual(storedPaths);+ expect(chart.querySelector('[data-history-deferred="disk"]')).toBeNull();+ expect(fetch).toHaveBeenCalledTimes(1);+ });+it.each(guestDiskDeferrals)('labels retained %s as last known without creating a stored observation',async (reason, message) => {diff --git a/frontend-modern/src/components/Workloads/__tests__/GuestDrawerOverview.filesystem-provenance.test.tsx b/frontend-modern/src/components/Workloads/__tests__/GuestDrawerOverview.filesystem-provenance.test.tsxindex 9c3156a8ea..335136abca 100644--- a/frontend-modern/src/components/Workloads/__tests__/GuestDrawerOverview.filesystem-provenance.test.tsx+++ b/frontend-modern/src/components/Workloads/__tests__/GuestDrawerOverview.filesystem-provenance.test.tsx@@ -71,6 +71,27 @@ const filesystemRow = () => screen.getByText(path).closest('tr')!;afterEach(cleanup);describe('filesystem details do not promote retained usage to current health', () => {+ it('withdraws stopped VM usage without waiting for a read-error reason', () => {+ const [value, setValue] = createSignal(guest());+ render(() => <GuestDrawerOverview {...props(value())} />);+ const details = screen.getByTestId('guest-technical-details');+ expect(within(filesystemRow()).getByRole('progressbar')).toHaveAttribute('aria-valuenow', '90');+ setValue({ ...value(), status: 'stopped', diskStatusReason: undefined });+ expect(within(filesystemRow()).queryByRole('progressbar')).not.toBeInTheDocument();+ expect(within(filesystemRow()).getByText('Usage unavailable · ?/10.0 GB · EXT4')).toBeVisible();+ expect(+ screen.getByText('Guest filesystem stats unavailable while the VM is stopped.'),+ ).toBeVisible();+ expect(screen.getByTestId('guest-technical-details')).toBe(details);+ // Restarting the guest cannot clear an explicit provider read deferral.+ setValue({ ...value(), status: 'running', diskStatusReason: 'prev-agent-busy' });+ expect(within(filesystemRow()).getByText(/^Last known 90%/)).toBeVisible();+ expect(within(filesystemRow()).queryByRole('progressbar')).not.toBeInTheDocument();+ setValue(guest({ disks: [{ ...disk, used: 3 * 1024 ** 3, usage: 30 }] }));+ expect(within(filesystemRow()).getByRole('progressbar')).toHaveAttribute('aria-valuenow', '30');+ expect(screen.getByTestId('guest-technical-details')).toBe(details);+ });+it.each(['permission-denied', 'prev-permission-denied'])('shows scoped-access guidance for %s and clears it only on a new reading',(reason) => {diff --git a/frontend-modern/src/components/Workloads/__tests__/GuestRow.test.tsx b/frontend-modern/src/components/Workloads/__tests__/GuestRow.test.tsxindex 680df9a2c9..3f68783ebd 100644--- a/frontend-modern/src/components/Workloads/__tests__/GuestRow.test.tsx+++ b/frontend-modern/src/components/Workloads/__tests__/GuestRow.test.tsx@@ -736,6 +736,43 @@ describe('GuestRow', () => {expect(row.querySelector('[data-metric-rate-pair]')).toBeNull();});+ it.each(['bars', 'sparklines'] as const)(+ 'withdraws stopped VM filesystem usage in %s even without a read reason',+ (mode) => {+ const [guest, setGuest] = createSignal(makeGuest());+ const { container } = render(() => (+ <table>+ <tbody>+ <GuestRow+ guest={guest()}+ visibleColumnIds={['name', 'disk']}+ metricDisplayMode={mode}+ />+ </tbody>+ </table>+ ));+ const row = container.querySelector('tr');+ setGuest(makeGuest({ status: 'stopped', diskStatusReason: undefined }));+ const cell = container.querySelector('[data-workload-col="disk"]')!;+ expect(screen.queryByTestId('disk-bar')).toBeNull();+ expect(cell).toHaveTextContent('Unavailable');+ expect(cell).toHaveAccessibleDescription();+ expect(cell.getAttribute('title')).toBe(+ 'Guest filesystem stats unavailable while the VM is stopped.',+ );+ const chart = cell.querySelector('[role="img"]');+ if (chart) expect(chart.getAttribute('aria-label')).not.toMatch(/current 50%/);+ setGuest(makeGuest({ disk: makeDisk({ usage: 0, used: 0 }) }));+ expect(container.querySelector('tr')).toBe(row);+ expect(container.querySelector('[data-workload-disk-read-status]')).toBeNull();+ if (mode === 'bars') expect(screen.getByTestId('disk-bar')).toBeInTheDocument();+ else+ expect(cell.querySelector('[role="img"]')?.getAttribute('aria-label')).toMatch(+ /current 0%/,+ );+ },+ );+it('shows dash when disk data is unavailable', () => {renderGuestRow({guest: makeGuest({ disk: { total: 0, used: 0, free: 0, usage: 0 } }),diff --git a/frontend-modern/src/hooks/__tests__/useWorkloads.test.ts b/frontend-modern/src/hooks/__tests__/useWorkloads.test.tsindex 1549c6c930..0a9d0c9f43 100644--- a/frontend-modern/src/hooks/__tests__/useWorkloads.test.ts+++ b/frontend-modern/src/hooks/__tests__/useWorkloads.test.ts@@ -3,6 +3,8 @@ import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';import useWorkloadsSource from '../useWorkloads.ts?raw';import { guestDiskDeferrals } from '@/components/Workloads/__fixtures__/guestDiskDeferrals';import type { VM } from '@/types/api';+import { getWorkloadGuestDiskRead } from '@/utils/workloadGuestPresentation';+import { getDiskUsagePercent } from '@/components/Workloads/workloadSelectors';type UseWorkloadsModule = typeof import('@/hooks/useWorkloads');@@ -328,6 +330,67 @@ describe('useWorkloads', () => {}});+ it('does not treat a stopped native VM facet as current disk telemetry when health stays online', async () => {+ const other = {+ ...sampleResource,+ id: 'other-site',+ instance: 'other',+ disk: { current: 40, total: 100, used: 40 },+ };+ const snapshot = (runtimeStatus: string, diskStatusReason?: string) =>+ [+ {+ ...sampleResource,+ status: 'online',+ disk: { current: 20, used: 20 * 1024, total: 100 * 1024 },+ proxmox: {+ vmid: 101,+ nodeName: 'pve1',+ instance: 'cluster-a',+ runtimeStatus,+ diskStatusReason,+ },+ },+ other,+ ] as any;+ const [resources, setResources] = createSignal(snapshot('running'));+ let dispose = () => {};+ let result: ReturnType<UseWorkloadsModule['useWorkloads']>;+ createRoot((d) => {+ dispose = d;+ result = useWorkloads(() => true, { resourceSnapshot: resources });+ });+ const target = () =>+ result!.workloads().find((row) => row.canonicalResourceId === sampleResource.id)!;+ try {+ await flushAsync();+ const otherRow = result!.workloads().find((row) => row.canonicalResourceId === 'other-site');+ expect(otherRow).toBeDefined();+ expect(getDiskUsagePercent(target())).toBe(20);+ setResources(snapshot('stopped'));+ await flushAsync();+ expect(target()).toMatchObject({+ status: 'stopped',+ resourceStatus: 'online',+ disk: { usage: 20 },+ });+ expect(getWorkloadGuestDiskRead(target(), true).state).toBe('unavailable');+ expect(getDiskUsagePercent(target())).toBeNull();+ setResources(snapshot('running', 'prev-agent-busy'));+ await flushAsync();+ expect(getDiskUsagePercent(target())).toBeNull();+ setResources(snapshot('running'));+ await flushAsync();+ expect(getDiskUsagePercent(target())).toBe(20);+ expect(result!.workloads().find((row) => row.canonicalResourceId === 'other-site')).toBe(+ otherRow,+ );+ expect(apiFetchJSONMock).not.toHaveBeenCalled();+ } finally {+ dispose();+ }+ });+it('reuses fresh cache on remount without an extra network fetch', async () => {let disposeFirst = () => {};createRoot((d) => {diff --git a/frontend-modern/src/utils/__tests__/workloadGuestPresentation.test.ts b/frontend-modern/src/utils/__tests__/workloadGuestPresentation.test.tsindex 50c82d9bbc..d72591afde 100644--- a/frontend-modern/src/utils/__tests__/workloadGuestPresentation.test.ts+++ b/frontend-modern/src/utils/__tests__/workloadGuestPresentation.test.ts@@ -10,6 +10,25 @@ import {} from '@/utils/workloadGuestPresentation';describe('workloadGuestPresentation', () => {+ it.each([undefined, '', 'prev-agent-busy'])(+ 'does not promote a stopped VM’s retained numbers without a current read (%s)',+ (diskStatusReason) => {+ for (const disksFromAgent of [undefined, true]) {+ expect(+ getWorkloadGuestDiskRead({ status: 'stopped', diskStatusReason, disksFromAgent }, true),+ ).toEqual({+ state: 'unavailable',+ message: getWorkloadGuestDiskStatusMessage('vm-stopped'),+ needsAction: false,+ });+ }+ },+ );++ it('keeps stopped LXC platform storage separate from in-guest VM readings', () => {+ expect(getWorkloadGuestDiskRead({ status: 'stopped' }, false).state).toBe('current');+ });+it.each(['permission-denied', 'prev-permission-denied'])('keeps %s separate from permission expansion and guest health',(reason) => {diff --git a/frontend-modern/src/utils/workloadGuestPresentation.ts b/frontend-modern/src/utils/workloadGuestPresentation.tsindex 00272282c5..02997cc7be 100644--- a/frontend-modern/src/utils/workloadGuestPresentation.ts+++ b/frontend-modern/src/utils/workloadGuestPresentation.ts@@ -179,8 +179,19 @@ export function getWorkloadGuestDiskRead(isVM: boolean,): WorkloadGuestDiskRead {const reason = isVM ? guest.diskStatusReason : undefined;+ // Power-state updates can arrive without a filesystem-read reason, while+ // the canonical resource still carries earlier numbers. A stopped VM has+ // no current in-guest reading, regardless of which producer supplied it.+ // LXC platform storage remains independent of guest runtime power state.+ if (isVM && (guest.status === 'stopped' || reason === 'vm-stopped')) {+ return {+ state: 'unavailable',+ message: getWorkloadGuestDiskStatusMessage('vm-stopped'),+ needsAction: false,+ };+ }if (guest.disksFromAgent) {- if (guest.status === 'stopped' || reason === 'vm-stopped') {+ if (guest.status === 'stopped') {return {state: 'unavailable',message: isVM