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.

Make guest filesystem guidance easier to reach on phones

pulse-triage[bot]f91752ed0350
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 9c263489f7..f40785de26 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 guidance remains reachable by touch and keyboard (13 October 2026)
+
+The existing Filesystems footer link in the guest drawer has a 44px minimum
+height below the shared `sm` breakpoint, while desktop keeps its compact text
+height. Its underlined label and focus outline use the semantic foreground in
+both themes. The target is the unchanged shipped missing-reading explanation;
+no new route, setup action, guest operation, polling or recovery claim is added.
+Read-reason updates keep the destination available until a current reading
+removes the explanation. Existing section reconciliation is unchanged.
+
+`GuestDrawer.test.tsx` covers the connected drawer's responsive/focus classes,
+destination, same-guest reason replacement and current-reading
+withdrawal. `browser-tests/guest-disk-docs-context.cjs` measures actual target
+bounds, foreground/focus contrast, keyboard/touch navigation and the consuming
+Docs renderer at desktop/phone widths in both themes. Browser acceptance and
+pixels must be recorded separately; these fixtures prove no native thaw or
+recovery.
+
### Workloads reading explanations work without hover
The existing Memory/Disk freshness and cache cues are native disclosure buttons.
diff --git a/frontend-modern/browser-tests/guest-disk-docs-context.cjs b/frontend-modern/browser-tests/guest-disk-docs-context.cjs
index a6537a1153..cc21166a00 100644
--- a/frontend-modern/browser-tests/guest-disk-docs-context.cjs
+++ b/frontend-modern/browser-tests/guest-disk-docs-context.cjs
@@ -12,6 +12,57 @@ const output = '/workspace/tmp/guest-disk-docs-context';
const origin = 'http://127.0.0.1:5331';
const hash = (bytes) => crypto.createHash('sha256').update(bytes).digest('hex');
+// Browser-computed colours and geometry, not class-string assertions. Solid
+// focus outlines have deterministic colours; UA `auto` outlines do not.
+const linkPresentation = (link) =>
+ link.evaluate((element) => {
+ const rgba = (colour) => {
+ const channels = colour.match(/[\d.]+/g).map(Number);
+ return [...channels.slice(0, 3), channels[3] ?? 1];
+ };
+ const luminance = (colour) => {
+ const rgb = colour.slice(0, 3).map((channel) => {
+ const value = channel / 255;
+ return value <= 0.04045 ? value / 12.92 : ((value + 0.055) / 1.055) ** 2.4;
+ });
+ return rgb[0] * 0.2126 + rgb[1] * 0.7152 + rgb[2] * 0.0722;
+ };
+ const ratio = (a, b) => {
+ const values = [luminance(a), luminance(b)].sort((x, y) => y - x);
+ return (values[0] + 0.05) / (values[1] + 0.05);
+ };
+ const backgrounds = [];
+ for (let node = element; node; node = node.parentElement) {
+ const background = rgba(getComputedStyle(node).backgroundColor);
+ backgrounds.push(background);
+ if (background[3] === 1) break;
+ }
+ const background = backgrounds
+ .reverse()
+ .reduce(
+ (base, layer) =>
+ layer.slice(0, 3).map((value, index) => value * layer[3] + base[index] * (1 - layer[3])),
+ [255, 255, 255],
+ );
+ const style = getComputedStyle(element),
+ bounds = element.getBoundingClientRect();
+ return {
+ colour: style.color,
+ background,
+ text_contrast: ratio(rgba(style.color), background),
+ width: bounds.width,
+ height: bounds.height,
+ focused: element === document.activeElement,
+ focus_visible: element.matches(':focus-visible'),
+ outline_style: style.outlineStyle,
+ outline_width: style.outlineWidth,
+ outline_offset: style.outlineOffset,
+ outline_colour: style.outlineColor,
+ outline_contrast: ratio(rgba(style.outlineColor), background),
+ underlined: style.textDecorationLine.includes('underline'),
+ };
+ });
+
(async () => {
fs.mkdirSync(output, { recursive: true });
const result = {
@@ -39,9 +90,11 @@ const hash = (bytes) => crypto.createHash('sha256').update(bytes).digest('hex');
assert.equal(hash(fs.readFileSync('/workspace/docs/VM_DISK_MONITORING.md')), docHash);
result.document_sha256 = docHash;
await server.listen();
- for (const [name, engine, width] of [
- ['chromium-desktop', chromium, 1365],
- ['webkit-phone', webkit, 390],
+ for (const [name, engine, width, theme] of [
+ ['chromium-desktop-light', chromium, 1365, 'light'],
+ ['chromium-desktop-dark', chromium, 1365, 'dark'],
+ ['webkit-phone-light', webkit, 390, 'light'],
+ ['webkit-phone-dark', webkit, 390, 'dark'],
]) {
browser = await engine.launch(
engine === chromium
@@ -53,13 +106,21 @@ const hash = (bytes) => crypto.createHash('sha256').update(bytes).digest('hex');
isMobile: width <= 768,
hasTouch: width <= 768,
locale: 'en-GB',
+ colorScheme: theme,
+ reducedMotion: 'reduce',
});
+ await context.addInitScript((theme) => {
+ document.addEventListener('DOMContentLoaded', () =>
+ document.documentElement.classList.toggle('dark', theme === 'dark'),
+ );
+ }, theme);
const page = await context.newPage();
page.setDefaultTimeout(12000);
const record = {
name,
browser: browser.version(),
width,
+ theme,
errors: [],
requests: [],
docs: [],
@@ -111,6 +172,41 @@ const hash = (bytes) => crypto.createHash('sha256').update(bytes).digest('hex');
const details = drawer.getByTestId('guest-technical-details');
assert.match(await details.innerText(), /does not prove it is absent or stopped/);
const guidance = details.getByRole('link', { name: 'Filesystem reading guidance' });
+ record.unavailable_link = await linkPresentation(guidance);
+ assert.ok(record.unavailable_link.text_contrast >= 4.5, 'unavailable-reading link contrast');
+ if (width <= 768)
+ assert.ok(record.unavailable_link.height >= 44, 'phone target smaller than 44px');
+ else assert.ok(record.unavailable_link.height < 44, 'desktop link lost compact density');
+ assert.equal(record.unavailable_link.underlined, true);
+ await page.evaluate(() =>
+ window.__readingHelp.update({ reason: 'vm-locked', retained: true, os: 'Windows 11' }),
+ );
+ assert.match(await details.innerText(), /Using last known disk stats/);
+ assert.match(await details.innerText(), /VM operation lock, such as a backup/);
+ // Trust a real keyboard focus indication, then activate the same native
+ // destination by keyboard or touch. No setup/diagnostic action is used.
+ await guidance.scrollIntoViewIfNeeded();
+ await page.keyboard.press('Tab');
+ await guidance.focus();
+ record.retained_link_focus = await linkPresentation(guidance);
+ assert.equal(record.retained_link_focus.focused, true);
+ assert.equal(record.retained_link_focus.focus_visible, true);
+ assert.equal(record.retained_link_focus.outline_style, 'solid');
+ assert.equal(record.retained_link_focus.outline_width, '2px');
+ assert.equal(record.retained_link_focus.outline_offset, '2px');
+ assert.ok(record.retained_link_focus.outline_contrast >= 3, 'focus outline contrast');
+ assert.ok(record.retained_link_focus.text_contrast >= 4.5, 'retained-reading link contrast');
+ const focusFile = name + '-guidance-focus.png';
+ await page.screenshot({ path: output + '/' + focusFile });
+ result.captures.push({
+ file: focusFile,
+ sha256: hash(fs.readFileSync(output + '/' + focusFile)),
+ });
+ if (width > 768) {
+ await guidance.hover();
+ record.hovered_link = await linkPresentation(guidance);
+ assert.ok(record.hovered_link.text_contrast >= 4.5, 'hovered-reading link contrast');
+ }
if (width <= 768) await guidance.tap();
else {
await guidance.focus();
diff --git a/frontend-modern/src/components/Workloads/GuestDrawer.test.tsx b/frontend-modern/src/components/Workloads/GuestDrawer.test.tsx
index d4a25f7406..82e625570e 100644
--- a/frontend-modern/src/components/Workloads/GuestDrawer.test.tsx
+++ b/frontend-modern/src/components/Workloads/GuestDrawer.test.tsx
@@ -279,6 +279,40 @@ describe('GuestDrawer', () => {
expect(chartsApiMocks.getMetricsHistory).toHaveBeenCalledTimes(2);
});
+ it('keeps the accessible filesystem guidance target across read-reason updates', () => {
+ const [guest, setGuest] = createSignal(
+ makeGuest({
+ diskStatusReason: 'agent-not-running',
+ disks: [{ mountpoint: '/', total: 10 * 1024 ** 3, used: 5 * 1024 ** 3, usage: 50 }],
+ }),
+ );
+ solidRender(() => <GuestDrawer guest={guest()} onClose={vi.fn()} />);
+ const guidance = screen.getByRole('link', { name: 'Filesystem reading guidance' });
+ expect(guidance).toHaveAttribute(
+ 'href',
+ '/docs/VM_DISK_MONITORING#a-missing-reading-is-not-an-installation-diagnosis',
+ );
+ expect(guidance).toHaveClass(
+ 'inline-flex',
+ 'min-h-11',
+ 'sm:min-h-0',
+ 'text-base-content',
+ 'focus-visible:outline-2',
+ 'focus-visible:outline-offset-2',
+ 'focus-visible:outline-base-content',
+ );
+ setGuest({ ...guest(), diskStatusReason: 'prev-vm-locked' });
+ expect(screen.getByRole('link', { name: 'Filesystem reading guidance' })).toHaveAttribute(
+ 'href',
+ guidance.getAttribute('href'),
+ );
+ expect(technicalDetails().getByText(/^Using last known disk stats\./)).toHaveTextContent(
+ 'VM operation lock, such as a backup',
+ );
+ setGuest({ ...guest(), diskStatusReason: '' });
+ expect(screen.queryByRole('link', { name: 'Filesystem reading guidance' })).toBeNull();
+ });
+
it('keeps the backup precaution visible across drawer tabs without starting a guest check', async () => {
const [guest, setGuest] = createSignal(
makeGuest({
diff --git a/frontend-modern/src/components/Workloads/GuestDrawerOverview.tsx b/frontend-modern/src/components/Workloads/GuestDrawerOverview.tsx
index e51b853a45..2b9d0a3b3e 100644
--- a/frontend-modern/src/components/Workloads/GuestDrawerOverview.tsx
+++ b/frontend-modern/src/components/Workloads/GuestDrawerOverview.tsx
@@ -260,7 +260,7 @@ export function GuestDrawerOverview(props: GuestDrawerOverviewProps) {
footerContent:
diskStatusMessage && isGuestDrawerVM(props.guest) ? (
<a
- class="text-xs font-semibold underline underline-offset-2"
+ class="inline-flex min-h-11 items-center rounded-sm text-xs font-semibold text-base-content underline underline-offset-2 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-base-content sm:min-h-0"
href={`${getShippedDocUrl('VM_DISK_MONITORING.md')}#a-missing-reading-is-not-an-installation-diagnosis`}
>
Filesystem reading guidance