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 reading cues and container actions on one row line

rcourtman3f5a15bae758
diff --git a/docs/release-control/v6/internal/subsystems/frontend-primitives.md b/docs/release-control/v6/internal/subsystems/frontend-primitives.md
index fc527989b1..0af2458570 100644
--- a/docs/release-control/v6/internal/subsystems/frontend-primitives.md
+++ b/docs/release-control/v6/internal/subsystems/frontend-primitives.md
@@ -478,8 +478,9 @@ sources and guest kinds the backend marks `MayIncludeCache`) keeps its numbers,
colour and thresholds;
the shared presentation adds `mayIncludeCache` and a `cacheNote` saying a high
percentage alone does not show memory pressure and which fix can supply the
-guest's own figure. A VM row shows `May include cache` (`Cache?` in compact
-layouts) only while the guest's own memory meets its warning or critical
+guest's own figure. A VM row shows a cache cue, a question-mark icon beside
+the memory bar whose accessible name says `May include cache` (`Cache?` in
+compact layouts), only while the guest's own memory meets its warning or critical
threshold, the figure that colours the bar in host-share mode too, which is
when a cache-inclusive figure reads as pressure; below that the caveat is the
cell title, the chart's native hover title and assistive text, not a label on every
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 434bfb6cdc..9876cf3c11 100644
--- a/docs/release-control/v6/internal/subsystems/performance-and-scalability.md
+++ b/docs/release-control/v6/internal/subsystems/performance-and-scalability.md
@@ -99,6 +99,15 @@ row. It creates no read, timer, layout observer, collection or recovery action.
Unmarked current cache-aware readings add no component or control. Dense row
geometry, column widths, bars/sparklines and hover-history ownership remain.
The phone target extends within the cell without increasing the row rhythm.
+Each cue is a 12 px icon on the bar's line rather than a word under the bar,
+which put a second line of text in the row: a history icon for a retained
+reading, a question mark for a cache-inclusive or unknown-freshness one, and
+an alert for a disk read the user can fix (amber). The word (`Last known`,
+`Cache?`, `Denied`) stays in the button's accessible name and dialog, the
+reason in its title and assistive text, and its 24 px target overhangs the
+icon so the row height does not change for it. In compact (phone and narrow)
+cells the icon is 10 px and overhangs the cell's right padding, so the bar gives
+up about 8 px and still shows its percentage whole.
Same-identity observations update an open explanation; a genuinely current
observation removes the cue and returns focus to the row's existing disclosure.
diff --git a/docs/release-control/v6/internal/subsystems/unified-resources.md b/docs/release-control/v6/internal/subsystems/unified-resources.md
index 1bc2e6d199..4b40b70fe6 100644
--- a/docs/release-control/v6/internal/subsystems/unified-resources.md
+++ b/docs/release-control/v6/internal/subsystems/unified-resources.md
@@ -1230,7 +1230,9 @@ mode and optional-column set at the mode's narrowest table; the 100px states
a layout's narrow end when several optional columns show. Its room comes only
from the CPU bar, which never shows a sublabel, and the collapsed actions menu,
so every other column, including the memory bar's used/total sublabel, keeps
-its width. Hidden header/body columns
+its width. That menu's 28px button overhangs the row by 2px each way, so a
+container row is 33px at desktop like every other platform table rather than
+the 37px the button had set. Hidden header/body columns
are symmetric. Swarm rollout tokens render as words with raw state retained in
the title; task starts use the shared relative-time primitive with their exact
timestamp retained. Native table/model/guardrail tests and the production
diff --git a/frontend-modern/browser-verification/68d3237be62c046a.json b/frontend-modern/browser-verification/68d3237be62c046a.json
new file mode 100644
index 0000000000..cb61c17277
--- /dev/null
+++ b/frontend-modern/browser-verification/68d3237be62c046a.json
@@ -0,0 +1,45 @@
+{
+ "version": 1,
+ "base_sha": "b8529ad89f6e22e7d006c83dc03ef1f220daac7d",
+ "verified_at": "2026-10-25T17:34:54Z",
+ "result": "passed",
+ "changed_paths": [
+ "frontend-modern/src/components/Workloads/GuestRow.tsx",
+ "frontend-modern/src/components/Workloads/WorkloadReadingStatus.tsx",
+ "frontend-modern/src/features/docker/DockerContainerLifecycleControls.tsx"
+ ],
+ "content_sha256": {
+ "frontend-modern/src/components/Workloads/GuestRow.tsx": "6c96fb192c3ca54a85461ff3d8d6021c337b0943fe5358bc58e1026271853ef2",
+ "frontend-modern/src/components/Workloads/WorkloadReadingStatus.tsx": "b367c9d87a49e83830538163a205a14e01b32fa86ded94684f37bffa5f4fd80a",
+ "frontend-modern/src/features/docker/DockerContainerLifecycleControls.tsx": "e336a9572bd41ee51fa844f942409b710e9c65eb211701367efd8c75e16b1faf"
+ },
+ "routes": [
+ "/proxmox/overview",
+ "/docker/overview"
+ ],
+ "viewports": [
+ {
+ "width": 1280,
+ "height": 900
+ },
+ {
+ "width": 430,
+ "height": 900
+ },
+ {
+ "width": 375,
+ "height": 900
+ }
+ ],
+ "states": [
+ "Embedded production build of this tree in mock mode on pulse-dev, headless Chromium, dark theme, touch phone emulation below 768px.",
+ "Proxmox guest with a cache-inclusive memory reading above warning (searched \"postgres-primary\" so its node group renders on a phone): before, \"Cache?\" sat on a second line under the memory bar; after, a question-mark cue sits beside the bar on one line at 375, 430 and 1280px, the row is 32px, and the bar shows \"84%\" whole on phones (an earlier 12px icon cut it to \"8...\", so compact cells use a 10px icon overhanging the right padding). Accessible name keeps \"Cache?\" / \"May include cache\".",
+ "Docker containers table at 1280px: rows were 37px because the 28px actions menu button set the height; after, 74 of 75 rows are 33px (one 32.5px), matching the other desktop platform tables, with the button unchanged in size.",
+ "Row sweep of every platform tab at 375, 430 and 1280px (138 page loads, 220 tables): no platform table row taller than 33.5px and no stacked platform cells. Remaining desktop rows above 33.5px are on pages this change does not touch (Standalone machines, Alert history, Alert thresholds, Settings infrastructure)."
+ ],
+ "interactions": [
+ "Cue button keeps a 24x24 target (measured) and opens the existing reading dialog; row tap behaviour unchanged. Inspected screenshots of the cue row at all three widths and the desktop Docker containers table.",
+ "GuestRow, Workloads and Docker component tests (131 files) pass under Node 24, including new assertions that the cue shares the bar line, keeps its label in the accessible name and kind attribute, and that the Docker menu button overhangs the row."
+ ],
+ "proof_scope": "Workloads memory/disk reading cue placement and Docker container row height; reading semantics, dialog content and container actions are unchanged."
+}
diff --git a/frontend-modern/src/components/Workloads/GuestRow.tsx b/frontend-modern/src/components/Workloads/GuestRow.tsx
index 3e49340aec..3809077c67 100644
--- a/frontend-modern/src/components/Workloads/GuestRow.tsx
+++ b/frontend-modern/src/components/Workloads/GuestRow.tsx
@@ -656,95 +656,116 @@ export function GuestRow(props: GuestRowProps) {
data-workload-col="memory"
title={memoryReadStatus()?.message}
>
- <Show
- when={isSparklineMode()}
- fallback={
- <div class="h-4">
- <Show
- when={historyLensVisible()}
- fallback={
+ {/* The bar and any reading cue share one line, so a caveat never
+ adds a second line under the bar. */}
+ <div class={`flex items-center ${usesCompactTableLayout() ? 'gap-0.5' : 'gap-1'}`}>
+ <div class="min-w-0 flex-1">
+ <Show
+ when={isSparklineMode()}
+ fallback={
+ <div class="h-4">
<Show
- when={!memoryDisplayUnavailable()}
+ when={historyLensVisible()}
fallback={
- <div class="flex justify-center">
- <span class="text-xs text-slate-400" title={memoryUnavailableTooltip()}>
- -
- </span>
- </div>
+ <Show
+ when={!memoryDisplayUnavailable()}
+ fallback={
+ <div class="flex justify-center">
+ <span
+ class="text-xs text-slate-400"
+ title={memoryUnavailableTooltip()}
+ >
+ -
+ </span>
+ </div>
+ }
+ >
+ <div
+ title={
+ isHostMemoryBasis() ? undefined : (memoryTooltip() ?? undefined)
+ }
+ >
+ <StackedMemoryBar
+ used={props.guest.memory?.used || 0}
+ total={memoryDisplayTotal()}
+ unavailable={memoryDisplayUnavailable()}
+ reading={memoryReading()}
+ percentOnly={isHostMemoryBasis() ? undefined : memoryPercentOnly()}
+ cache={isHostMemoryBasis() ? 0 : (props.guest.memory?.cache ?? 0)}
+ cacheInclusiveLabel={
+ isHostMemoryBasis() ? undefined : 'Shown in Proxmox'
+ }
+ balloon={
+ isHostMemoryBasis() ? 0 : (props.guest.memory?.balloon ?? 0)
+ }
+ swapUsed={
+ isHostMemoryBasis() ? 0 : (props.guest.memory?.swapUsed ?? 0)
+ }
+ swapTotal={
+ isHostMemoryBasis() ? 0 : (props.guest.memory?.swapTotal ?? 0)
+ }
+ resourceId={metricsKey()}
+ anomaly={isHostMemoryBasis() ? null : memoryAnomaly()}
+ thresholds={memoryThresholds()}
+ severityPercent={
+ isHostMemoryBasis()
+ ? usagePercent(
+ props.guest.memory?.used,
+ props.guest.memory?.total,
+ props.guest.memory?.usage,
+ )
+ : undefined
+ }
+ comparisonTotalLabel={
+ isHostMemoryBasis() ? 'Host total' : undefined
+ }
+ tooltipTitle={
+ isHostMemoryBasis()
+ ? `${props.parentNodeName?.trim() || 'Host'} memory share`
+ : undefined
+ }
+ />
+ </div>
+ </Show>
}
>
- <div
- title={isHostMemoryBasis() ? undefined : (memoryTooltip() ?? undefined)}
- >
- <StackedMemoryBar
- used={props.guest.memory?.used || 0}
- total={memoryDisplayTotal()}
- unavailable={memoryDisplayUnavailable()}
- reading={memoryReading()}
- percentOnly={isHostMemoryBasis() ? undefined : memoryPercentOnly()}
- cache={isHostMemoryBasis() ? 0 : (props.guest.memory?.cache ?? 0)}
- cacheInclusiveLabel={
- isHostMemoryBasis() ? undefined : 'Shown in Proxmox'
- }
- balloon={isHostMemoryBasis() ? 0 : (props.guest.memory?.balloon ?? 0)}
- swapUsed={isHostMemoryBasis() ? 0 : (props.guest.memory?.swapUsed ?? 0)}
- swapTotal={
- isHostMemoryBasis() ? 0 : (props.guest.memory?.swapTotal ?? 0)
- }
- resourceId={metricsKey()}
- anomaly={isHostMemoryBasis() ? null : memoryAnomaly()}
- thresholds={memoryThresholds()}
- severityPercent={
- isHostMemoryBasis()
- ? usagePercent(
- props.guest.memory?.used,
- props.guest.memory?.total,
- props.guest.memory?.usage,
- )
- : undefined
- }
- comparisonTotalLabel={isHostMemoryBasis() ? 'Host total' : undefined}
- tooltipTitle={
- isHostMemoryBasis()
- ? `${props.parentNodeName?.trim() || 'Host'} memory share`
- : undefined
- }
- />
+ <div class="h-4 animate-in fade-in-0 duration-100 motion-reduce:animate-none">
+ {renderMemorySparkline()}
</div>
</Show>
- }
- >
- <div class="h-4 animate-in fade-in-0 duration-100 motion-reduce:animate-none">
- {renderMemorySparkline()}
</div>
- </Show>
- </div>
- }
- >
- {renderMemorySparkline()}
- </Show>
- <Show when={memoryReadStatus()}>
- {(status) => (
- <Show
- when={status().label}
- fallback={
- <span data-workload-memory-read-status class="sr-only">
- {status().message}
- </span>
}
>
- {(label) => (
- <WorkloadReadingStatus
- metric="Memory"
- guestId={guestId()}
- guestName={props.guest.name}
- label={label()}
- message={status().message}
- />
- )}
+ {renderMemorySparkline()}
</Show>
- )}
- </Show>
+ </div>
+ <Show when={memoryReadStatus()}>
+ {(status) => (
+ <Show
+ when={status().label}
+ fallback={
+ <span data-workload-memory-read-status class="sr-only">
+ {status().message}
+ </span>
+ }
+ >
+ {(label) => (
+ <WorkloadReadingStatus
+ metric="Memory"
+ compact={usesCompactTableLayout()}
+ guestId={guestId()}
+ guestName={props.guest.name}
+ label={label()}
+ message={status().message}
+ kind={
+ status().valueLabelContext === 'last known' ? 'retained' : 'uncertain'
+ }
+ />
+ )}
+ </Show>
+ )}
+ </Show>
+ </div>
</td>
</Show>
@@ -755,62 +776,76 @@ export function GuestRow(props: GuestRowProps) {
data-workload-col="disk"
title={diskReadStatus()?.message}
>
- <Show when={isSparklineMode()}>{renderDiskSparkline()}</Show>
- <Show when={!isSparklineMode()}>
- <Show
- when={hasDiskUsage()}
- fallback={
- <div class="flex justify-center">
- <span class="text-xs text-slate-400" title={getDiskStatusTooltip()}>
- -
- </span>
- </div>
- }
- >
- <div class="h-4">
+ {/* The bar and any reading cue share one line, so a caveat never
+ adds a second line under the bar. */}
+ <div class={`flex items-center ${usesCompactTableLayout() ? 'gap-0.5' : 'gap-1'}`}>
+ <div class="min-w-0 flex-1">
+ <Show when={isSparklineMode()}>{renderDiskSparkline()}</Show>
+ <Show when={!isSparklineMode()}>
<Show
- when={historyLensVisible()}
+ when={hasDiskUsage()}
fallback={
- <StackedDiskBar
- mode={usesCompactTableLayout() ? 'aggregate' : undefined}
- disks={props.guest.disks}
- aggregateDisk={props.guest.disk}
- anomaly={diskAnomaly()}
- thresholds={diskThresholds()}
- reading={diskUsageRead()}
- />
+ <div class="flex justify-center">
+ <span class="text-xs text-slate-400" title={getDiskStatusTooltip()}>
+ -
+ </span>
+ </div>
}
>
- <div class="h-4 animate-in fade-in-0 duration-100 motion-reduce:animate-none">
- {renderDiskSparkline()}
+ <div class="h-4">
+ <Show
+ when={historyLensVisible()}
+ fallback={
+ <StackedDiskBar
+ mode={usesCompactTableLayout() ? 'aggregate' : undefined}
+ disks={props.guest.disks}
+ aggregateDisk={props.guest.disk}
+ anomaly={diskAnomaly()}
+ thresholds={diskThresholds()}
+ reading={diskUsageRead()}
+ />
+ }
+ >
+ <div class="h-4 animate-in fade-in-0 duration-100 motion-reduce:animate-none">
+ {renderDiskSparkline()}
+ </div>
+ </Show>
</div>
</Show>
- </div>
- </Show>
- </Show>
- <Show when={diskReadStatus()}>
- {(status) => (
- <Show
- when={status().label}
- fallback={
- <span data-workload-disk-read-status class="sr-only">
- {status().message}
- </span>
- }
- >
- {(label) => (
- <WorkloadReadingStatus
- metric="Disk"
- guestId={guestId()}
- guestName={props.guest.name}
- label={label()}
- message={status().message}
- needsAction={status().needsAction}
- />
- )}
</Show>
- )}
- </Show>
+ </div>
+ <Show when={diskReadStatus()}>
+ {(status) => (
+ <Show
+ when={status().label}
+ fallback={
+ <span data-workload-disk-read-status class="sr-only">
+ {status().message}
+ </span>
+ }
+ >
+ {(label) => (
+ <WorkloadReadingStatus
+ metric="Disk"
+ compact={usesCompactTableLayout()}
+ guestId={guestId()}
+ guestName={props.guest.name}
+ label={label()}
+ message={status().message}
+ kind={
+ status().valueLabelContext === 'last known'
+ ? 'retained'
+ : status().needsAction
+ ? 'error'
+ : 'uncertain'
+ }
+ needsAction={status().needsAction}
+ />
+ )}
+ </Show>
+ )}
+ </Show>
+ </div>
</td>
</Show>
diff --git a/frontend-modern/src/components/Workloads/WorkloadReadingStatus.tsx b/frontend-modern/src/components/Workloads/WorkloadReadingStatus.tsx
index 15775ee12d..b821ff7d72 100644
--- a/frontend-modern/src/components/Workloads/WorkloadReadingStatus.tsx
+++ b/frontend-modern/src/components/Workloads/WorkloadReadingStatus.tsx
@@ -1,18 +1,40 @@
import { createEffect, createSignal, on, onCleanup, Show } from 'solid-js';
+import { Dynamic } from 'solid-js/web';
+import CircleAlertIcon from 'lucide-solid/icons/circle-alert';
+import CircleHelpIcon from 'lucide-solid/icons/circle-help';
+import HistoryIcon from 'lucide-solid/icons/history';
import { Dialog } from '@/components/shared/Dialog';
+// retained: a last-known value; uncertain: a figure that may include cache or
+// has unknown freshness; error: a read the user can fix.
+export type WorkloadReadingStatusKind = 'retained' | 'uncertain' | 'error';
+
+const READING_STATUS_ICONS = {
+ retained: HistoryIcon,
+ uncertain: CircleHelpIcon,
+ error: CircleAlertIcon,
+} as const;
+
interface WorkloadReadingStatusProps {
metric: 'Memory' | 'Disk';
guestId: string;
guestName: string;
label: string;
message: string;
+ kind: WorkloadReadingStatusKind;
+ // Compact (phone and narrow) metric cells are about 45px wide: the icon
+ // shrinks and overhangs the cell's right padding so the bar keeps room for
+ // its percentage.
+ compact?: boolean;
needsAction?: boolean;
}
// This is disclosure of already supplied evidence, not a refresh, diagnostic
-// or recovery action. Keep the existing compact cue and its screen-reader
-// explanation; the same explanation must also be readable without hovering.
+// or recovery action. The cue is an icon on the bar's line, not a word under
+// the bar: a second line made the row read as two. Its label stays in the
+// accessible name and the dialog, its explanation in the title and for screen
+// readers, and the 24px target overhangs the 12px icon instead of adding
+// height or taking the bar's width.
export function WorkloadReadingStatus(props: WorkloadReadingStatusProps) {
const [open, setOpen] = createSignal(false);
let trigger: HTMLButtonElement | undefined;
@@ -35,10 +57,10 @@ export function WorkloadReadingStatus(props: WorkloadReadingStatusProps) {
return (
<>
- <p
+ <span
data-workload-memory-read-status={props.metric === 'Memory' ? '' : undefined}
data-workload-disk-read-status={props.metric === 'Disk' ? '' : undefined}
- class={`mt-0.5 text-center text-[10px] leading-none ${
+ class={`inline-flex shrink-0 items-center leading-none ${
props.needsAction ? 'text-amber-700 dark:text-amber-300' : 'text-muted'
}`}
title={props.message}
@@ -46,8 +68,10 @@ export function WorkloadReadingStatus(props: WorkloadReadingStatusProps) {
<button
ref={trigger}
type="button"
- class="inline-flex min-h-6 min-w-6 -my-1.5 items-center justify-center rounded-sm px-1 underline decoration-dotted underline-offset-2 sm:my-0 sm:min-h-0 focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-1 focus-visible:ring-offset-surface"
+ class={`${props.compact ? '-my-1.5 -ml-[7px] -mr-[11px]' : '-m-1.5'} inline-flex h-6 w-6 items-center justify-center rounded-sm focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-1 focus-visible:ring-offset-surface`}
aria-label={`${props.metric} reading for ${props.guestName}: ${props.label}`}
+ data-workload-reading-label={props.label}
+ data-workload-reading-kind={props.kind}
aria-haspopup="dialog"
aria-expanded={open()}
onClick={(event) => {
@@ -55,10 +79,14 @@ export function WorkloadReadingStatus(props: WorkloadReadingStatusProps) {
setOpen(true);
}}
>
- <span aria-hidden="true">{props.label}</span>
+ <Dynamic
+ component={READING_STATUS_ICONS[props.kind]}
+ class={props.compact ? 'h-2.5 w-2.5' : 'h-3 w-3'}
+ aria-hidden="true"
+ />
</button>
<span class="sr-only">{props.message}</span>
- </p>
+ </span>
<Show when={open()}>
<Dialog
isOpen
diff --git a/frontend-modern/src/components/Workloads/__tests__/GuestRow.test.tsx b/frontend-modern/src/components/Workloads/__tests__/GuestRow.test.tsx
index 63452f21cf..d44eb8d552 100644
--- a/frontend-modern/src/components/Workloads/__tests__/GuestRow.test.tsx
+++ b/frontend-modern/src/components/Workloads/__tests__/GuestRow.test.tsx
@@ -774,7 +774,7 @@ describe('GuestRow', () => {
// A stopped VM has no filesystem reading to give: the dash says so,
// and the reason is the title and assistive text, not a caption.
expect(cell.querySelector('[data-workload-disk-read-status]')).toHaveClass('sr-only');
- expect(cell.querySelector('[aria-hidden="true"]')).toBeNull();
+ expect(cell.querySelector('[data-workload-reading-label]')).toBeNull();
expect(cell).toHaveTextContent(
'Guest filesystem stats unavailable while the VM is stopped.',
);
@@ -997,9 +997,11 @@ describe('GuestRow', () => {
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?.querySelector('[data-workload-reading-label]')).toHaveAttribute(
+ 'data-workload-reading-label',
+ 'Last known',
+ );
expect(notice).not.toHaveAttribute('tabindex');
if (mode === 'bars') {
expect(screen.getByTestId('disk-bar')).toHaveAttribute(
@@ -1055,21 +1057,28 @@ describe('GuestRow', () => {
for (const reason of ['vm-stopped', 'agent-disabled', 'agent-not-running']) {
const notice = render(reason);
expect(notice).toHaveClass('sr-only');
- expect(notice?.querySelector('[aria-hidden="true"]')).toBeNull();
+ expect(notice?.querySelector('[data-workload-reading-label]')).toBeNull();
}
const denied = render('permission-denied');
expect(denied?.className).toContain('text-amber-700');
- expect(denied?.querySelector('[aria-hidden="true"]')).toHaveTextContent(/^No permission$/);
+ expect(denied?.querySelector('[data-workload-reading-label]')).toHaveAttribute(
+ 'data-workload-reading-label',
+ 'No permission',
+ );
expect(denied?.querySelector('.sr-only')).toHaveTextContent('Permission denied.');
const agentError = render('agent-error');
expect(agentError?.className).toContain('text-amber-700');
- expect(agentError?.querySelector('[aria-hidden="true"]')).toHaveTextContent(
- /^Agent error$/,
+ expect(agentError?.querySelector('[data-workload-reading-label]')).toHaveAttribute(
+ 'data-workload-reading-label',
+ 'Agent error',
);
// A retained reading says so first; its reason stays amber.
const retained = render('prev-agent-error');
expect(retained?.className).toContain('text-amber-700');
- expect(retained?.querySelector('[aria-hidden="true"]')).toHaveTextContent(/^Last known$/);
+ expect(retained?.querySelector('[data-workload-reading-label]')).toHaveAttribute(
+ 'data-workload-reading-label',
+ 'Last known',
+ );
});
it(`withdraws the ${mode} notice only on a fresh same-VM observation`, () => {
@@ -1086,9 +1095,9 @@ describe('GuestRow', () => {
</table>
));
const row = container.querySelector('tr');
- expect(container.querySelector('[data-workload-disk-read-status]')).toHaveTextContent(
- 'Last known',
- );
+ expect(
+ container.querySelector('[data-workload-disk-read-status] [data-workload-reading-label]'),
+ ).toHaveAttribute('data-workload-reading-label', 'Last known');
setGuest(makeGuest({ diskStatusReason: 'prev-agent-busy', lock: '' }));
expect(container.querySelector('[data-workload-disk-read-status]')).toHaveTextContent(
'earlier guest request',
@@ -1119,17 +1128,17 @@ describe('GuestRow', () => {
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(
+ container.querySelector('[data-workload-disk-read-status] [data-workload-reading-label]'),
+ ).toHaveAttribute('data-workload-reading-label', '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',
- );
+ expect(
+ container.querySelector('[data-workload-disk-read-status] [data-workload-reading-label]'),
+ ).toHaveAttribute('data-workload-reading-label', 'Last known');
});
it('does not announce retained sparkline data as current', () => {
@@ -1158,7 +1167,16 @@ describe('GuestRow', () => {
</table>
));
let notice = container.querySelector('[data-workload-disk-read-status]');
- expect(notice?.querySelector('[aria-hidden="true"]')).toHaveTextContent('Prior');
+ expect(notice?.querySelector('[data-workload-reading-label]')).toHaveAttribute(
+ 'data-workload-reading-label',
+ 'Prior',
+ );
+ // A retained reading is a history icon beside the bar, not a word under it.
+ expect(notice?.querySelector('button')).toHaveAttribute(
+ 'data-workload-reading-kind',
+ 'retained',
+ );
+ expect(notice?.parentElement).toHaveClass('flex', 'items-center');
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.',
);
@@ -1169,7 +1187,7 @@ describe('GuestRow', () => {
}),
);
notice = container.querySelector('[data-workload-disk-read-status]');
- expect(notice?.querySelector('[aria-hidden="true"]')).toBeNull();
+ expect(notice?.querySelector('[data-workload-reading-label]')).toBeNull();
expect(notice).toHaveTextContent(
'Guest reads paused while Proxmox reports a VM operation lock',
);
@@ -1180,7 +1198,14 @@ describe('GuestRow', () => {
}),
);
notice = container.querySelector('[data-workload-disk-read-status]');
- expect(notice?.querySelector('[aria-hidden="true"]')).toHaveTextContent(/^Denied$/);
+ expect(notice?.querySelector('[data-workload-reading-label]')).toHaveAttribute(
+ 'data-workload-reading-label',
+ 'Denied',
+ );
+ expect(notice?.querySelector('button')).toHaveAttribute(
+ 'data-workload-reading-kind',
+ 'error',
+ );
expect(notice?.querySelector('.sr-only')).toHaveTextContent('Permission denied.');
});
@@ -1234,14 +1259,17 @@ describe('GuestRow', () => {
setGuest(agentGuest({ agentStale: true }));
expect(screen.getByTestId('disk-bar')).toHaveAttribute('data-reading-message', lastKnown);
let notice = container.querySelector('[data-workload-disk-read-status]');
- expect(notice?.querySelector('[aria-hidden="true"]')).toHaveTextContent('Last known');
+ expect(notice?.querySelector('[data-workload-reading-label]')).toHaveAttribute(
+ 'data-workload-reading-label',
+ 'Last known',
+ );
expect(notice).toHaveAttribute('title', lastKnown);
expect(notice?.className).toContain('text-muted');
setGuest(agentGuest({ agentStale: true, status: 'stopped', diskStatusReason: 'vm-stopped' }));
expect(screen.queryByTestId('disk-bar')).toBeNull();
notice = container.querySelector('[data-workload-disk-read-status]');
- expect(notice?.querySelector('[aria-hidden="true"]')).toBeNull();
+ expect(notice?.querySelector('[data-workload-reading-label]')).toBeNull();
expect(notice).toHaveTextContent(
'Guest filesystem stats unavailable while the VM is stopped.',
);
@@ -1342,7 +1370,10 @@ describe('GuestRow', () => {
visibleColumnIds: ['name', 'memory'],
});
const notice = container.querySelector(noticeSelector);
- expect(notice?.querySelector('[aria-hidden]')).toHaveTextContent('Last known');
+ expect(notice?.querySelector('[data-workload-reading-label]')).toHaveAttribute(
+ 'data-workload-reading-label',
+ 'Last known',
+ );
expect(notice?.querySelector('.sr-only')).toHaveTextContent(
'Last known. Source: QEMU guest agent. Observed: 2026-09-30 11:00:00 UTC. Not a current measurement.',
);
@@ -1460,7 +1491,10 @@ describe('GuestRow', () => {
visibleColumnIds: ['name', 'memory'],
});
const notice = container.querySelector(noticeSelector);
- expect(notice?.querySelector('[aria-hidden]')).toHaveTextContent('May include cache');
+ expect(notice?.querySelector('[data-workload-reading-label]')).toHaveAttribute(
+ 'data-workload-reading-label',
+ 'May include cache',
+ );
const message = notice?.querySelector('.sr-only');
expect(message).toHaveTextContent('Current. Source: Proxmox. Observed: 2026-09-30');
expect(message).toHaveTextContent(
@@ -1522,8 +1556,8 @@ describe('GuestRow', () => {
visibleColumnIds: ['name', 'memory'],
});
expect(
- container.querySelector(noticeSelector)?.querySelector('[aria-hidden]'),
- ).toHaveTextContent('May include cache');
+ container.querySelector(noticeSelector)?.querySelector('[data-workload-reading-label]'),
+ ).toHaveAttribute('data-workload-reading-label', 'May include cache');
});
it(`keeps a high container cache reading free of a ${mode} caption`, () => {
@@ -1561,10 +1595,11 @@ describe('GuestRow', () => {
</table>
));
const row = container.querySelector('tr');
- const caption = () => container.querySelector(`${noticeSelector} [aria-hidden]`);
+ const caption = () =>
+ container.querySelector(`${noticeSelector} [data-workload-reading-label]`);
expect(caption()).toBeNull();
setGuest(makeGuest({ type: 'qemu', memory: memoryAt(90) }));
- expect(caption()).toHaveTextContent('May include cache');
+ expect(caption()).toHaveAttribute('data-workload-reading-label', 'May include cache');
setGuest(makeGuest({ type: 'qemu', memory: memoryAt(30) }));
expect(caption()).toBeNull();
expect(container.querySelector(noticeSelector)).toHaveClass('sr-only');
@@ -1589,8 +1624,8 @@ describe('GuestRow', () => {
parentMemoryTotal: 64 * 1024 ** 3,
});
expect(
- container.querySelector(noticeSelector)?.querySelector('[aria-hidden]'),
- ).toHaveTextContent('May include cache');
+ container.querySelector(noticeSelector)?.querySelector('[data-workload-reading-label]'),
+ ).toHaveAttribute('data-workload-reading-label', 'May include cache');
});
it(`keeps a container's cache caveat out of the ${mode} row label`, () => {
@@ -1752,7 +1787,10 @@ describe('GuestRow', () => {
workloadTableLayoutMode: 'phone',
});
const notice = container.querySelector(noticeSelector);
- expect(notice?.querySelector('[aria-hidden]')).toHaveTextContent(label);
+ expect(notice?.querySelector('[data-workload-reading-label]')).toHaveAttribute(
+ 'data-workload-reading-label',
+ label,
+ );
expect(notice?.querySelector('.sr-only')).toHaveTextContent('QEMU guest agent');
expect(notice?.querySelector('.sr-only')).toHaveTextContent('2026-09-30 11:00:00 UTC');
expect(notice).not.toHaveTextContent('future-state');
@@ -1784,8 +1822,23 @@ describe('GuestRow', () => {
workloadTableLayoutMode: 'phone',
});
const notice = container.querySelector(noticeSelector);
- expect(notice?.querySelector('[aria-hidden]')).toHaveTextContent(/^Cache\?$/);
+ expect(notice?.querySelector('[data-workload-reading-label]')).toHaveAttribute(
+ 'data-workload-reading-label',
+ 'Cache?',
+ );
expect(notice?.querySelector('.sr-only')).toHaveTextContent('may include cached memory');
+ // The cue shares the bar's line: a word under the bar made a second line
+ // in a 32px phone row. Its 24px target overhangs the 10px phone icon and
+ // the cell's right padding, so the bar keeps room for its percentage.
+ const cue = notice?.querySelector('button');
+ expect(cue).toHaveAttribute('data-workload-reading-kind', 'uncertain');
+ expect(cue).toHaveAccessibleName(/Memory reading for .*: Cache\?/);
+ expect(cue).toHaveClass('-ml-[7px]', '-mr-[11px]', 'h-6', 'w-6');
+ expect(cue?.querySelector('svg')).toHaveClass('h-2.5', 'w-2.5');
+ expect(notice?.parentElement).toHaveClass('gap-0.5');
+ expect(notice?.tagName).toBe('SPAN');
+ expect(notice?.parentElement).toHaveClass('flex', 'items-center');
+ expect(notice?.parentElement).not.toHaveClass('flex-col');
});
it.each([
@@ -1803,7 +1856,10 @@ describe('GuestRow', () => {
visibleColumnIds: ['name', 'memory'],
});
const notice = container.querySelector(noticeSelector);
- expect(notice?.querySelector('[aria-hidden]')).toHaveTextContent(label);
+ expect(notice?.querySelector('[data-workload-reading-label]')).toHaveAttribute(
+ 'data-workload-reading-label',
+ label,
+ );
expect(notice).not.toHaveTextContent('May include cache');
// The caveat still reaches the user, beside the freshness warning.
expect(notice?.querySelector('.sr-only')).toHaveTextContent('may include cached memory');
diff --git a/frontend-modern/src/features/docker/DockerContainerLifecycleControls.tsx b/frontend-modern/src/features/docker/DockerContainerLifecycleControls.tsx
index 0625412003..edc4dcb880 100644
--- a/frontend-modern/src/features/docker/DockerContainerLifecycleControls.tsx
+++ b/frontend-modern/src/features/docker/DockerContainerLifecycleControls.tsx
@@ -206,11 +206,14 @@ export const DockerContainerLifecycleControls: Component<DockerContainerLifecycl
</For>
}
>
+ {/* The 28px menu button overhangs the row by 2px each way, so it no
+ longer sets a 37px row height beside the 33px rows of every other
+ table. */}
<button
ref={menuTriggerRef}
type="button"
id={menuButton.triggerId}
- class={`inline-flex h-7 w-7 shrink-0 items-center justify-center rounded-sm border ${enabledButtonClass}`}
+ class={`-my-0.5 inline-flex h-7 w-7 shrink-0 items-center justify-center rounded-sm border ${enabledButtonClass}`}
title={`Container actions for ${dockerContainerLifecycleName(props.resource)}`}
aria-label={`Container actions for ${dockerContainerLifecycleName(props.resource)}`}
aria-haspopup="menu"
diff --git a/frontend-modern/src/features/docker/__tests__/DockerNativeTables.test.tsx b/frontend-modern/src/features/docker/__tests__/DockerNativeTables.test.tsx
index df28c11b91..f259bbc636 100644
--- a/frontend-modern/src/features/docker/__tests__/DockerNativeTables.test.tsx
+++ b/frontend-modern/src/features/docker/__tests__/DockerNativeTables.test.tsx
@@ -1259,6 +1259,11 @@ describe('Docker native tables', () => {
/>
));
+ // The 28px menu button overhangs the row rather than setting a 37px row.
+ expect(screen.getByRole('button', { name: 'Container actions for edge-web' })).toHaveClass(
+ '-my-0.5',
+ 'h-7',
+ );
fireEvent.click(
screen.getByRole('button', {
name: 'Container actions for edge-web',