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 phone guest rows on one line with the backup shield

rcourtmand73e65ad4626
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 289c7111b9..434bfb6cdc 100644
--- a/docs/release-control/v6/internal/subsystems/performance-and-scalability.md
+++ b/docs/release-control/v6/internal/subsystems/performance-and-scalability.md
@@ -208,9 +208,12 @@ guest recovery, ordinary QEMU-only polling or release availability.
### Narrow Workloads identity during guest locks
-In narrow and phone layouts, the guest name and status occupy the first line;
-the unchanged backup evidence control moves below the name with a 24 px touch
-target (see Accessible Workloads backup evidence). The guest lock occupies a separate, wrapping line below
+In narrow and phone layouts, the status, guest name and backup evidence control
+share one line, so a guest row stays a single line tall: the name truncates
+first, and the control's 24 px touch target overhangs its 14 px shield through
+negative margins instead of adding height or taking the name's width (see
+Accessible Workloads backup evidence). Stacking the control below the name grew
+every 375 px phone row from 32 px to 43.5 px. The guest lock occupies a separate, wrapping line below
that identity. It must not consume the name's
horizontal space or spill into the adjacent metrics. The full lock remains
visible; a long name keeps its full title and existing truncation. Wider layouts
@@ -4366,7 +4369,8 @@ not trigger the enclosing guest row. The Backup column badge keeps a touch
target of at least 44px. The name indicator keeps 24px (the WCAG 2.2 AA
minimum): on phones the whole guest row is the disclosure target and the expand
chevron is screen-reader only, so a 44px box covered the lower left of every
-row's tap area and grew phone rows from about 34px to 64px. Compact desktop
+row's tap area and grew phone rows from about 34px to 64px. On phones that
+target overhangs the shield rather than setting the row height. Compact desktop
shields and the existing status colours remain.
The Backup column badge does not truncate. Running (73px with its shield) and
diff --git a/frontend-modern/browser-verification/286c1d95592b20d9.json b/frontend-modern/browser-verification/286c1d95592b20d9.json
new file mode 100644
index 0000000000..f50ea518c1
--- /dev/null
+++ b/frontend-modern/browser-verification/286c1d95592b20d9.json
@@ -0,0 +1,46 @@
+{
+ "version": 1,
+ "base_sha": "7cdf408449adb5fc4ecea4c1558c48d26545c78e",
+ "verified_at": "2026-10-25T11:22:22Z",
+ "result": "passed",
+ "changed_paths": [
+ "frontend-modern/src/components/Workloads/GuestRow.tsx",
+ "frontend-modern/src/components/Workloads/GuestRowCells.tsx"
+ ],
+ "content_sha256": {
+ "frontend-modern/src/components/Workloads/GuestRow.tsx": "eabe10943a006b155231384143b2a10f88b77fdd7cf548c81442093a795abfa4",
+ "frontend-modern/src/components/Workloads/GuestRowCells.tsx": "663cb40ec030614504eb73a172c9641d0cdbdf1e75bfc24617bface94f5b89b2"
+ },
+ "routes": [
+ "/proxmox"
+ ],
+ "viewports": [
+ {
+ "width": 1280,
+ "height": 800
+ },
+ {
+ "width": 768,
+ "height": 1024
+ },
+ {
+ "width": 430,
+ "height": 932
+ },
+ {
+ "width": 375,
+ "height": 812
+ }
+ ],
+ "states": [
+ "Private mock stack (Vite from the sidecar, dark theme), Proxmox overview guest table, 36 guest rows in the first node group, Backup column hidden at phone and tablet widths so the backup shield renders in the name cell.",
+ "Before at 375px: every guest row 43.5px, with the shield on its own line under the name; 3 of 36 names truncated. After at 375px: every row 32px with the shield inline after the name; 9 of 36 names truncated (the 19+ character names), name cell 143px unchanged. At 430px: all rows 32px, 4 of 36 truncated.",
+ "Tablet 768px: rows 32px, shield inline with computed margin 0 (sm reset). Desktop 1280px: Backup column badge in its own cell, no name-cell shield, 138 of 140 rows 32px as before."
+ ],
+ "interactions": [
+ "Phone 375px tap on the inline shield opens the 'Backup status details for artifact-cache-310' dialog without expanding the guest row; Escape closes it and returns aria-expanded to false.",
+ "Phone 375px tap on the guest name expands the guest drawer (Collapse control present, no dialog), so the shield's 24px target does not steal the row tap.",
+ "Shield hit box measured at 24x24px at phone width while the row stays 32px; widening the 38% name column was rejected because CPU/MEM/DISK chips at 57px already clip."
+ ],
+ "proof_scope": "Workloads guest-row presentation on the Proxmox overview only; backup evidence semantics, thresholds and drawer content are unchanged."
+}
diff --git a/frontend-modern/src/components/Workloads/GuestRow.tsx b/frontend-modern/src/components/Workloads/GuestRow.tsx
index 1c174006a5..3e49340aec 100644
--- a/frontend-modern/src/components/Workloads/GuestRow.tsx
+++ b/frontend-modern/src/components/Workloads/GuestRow.tsx
@@ -478,15 +478,16 @@ export function GuestRow(props: GuestRowProps) {
title={guestStatus().label}
ariaLabel={guestStatus().label}
size="xs"
- class={usesCondensedIdentity() ? 'self-start mt-1.5' : undefined}
/>
+ {/* Condensed rows keep the backup shield on the name's line:
+ the name truncates first, so the row stays one line tall. */}
<div
- class={`min-w-0 group/name ${usesCondensedIdentity() ? 'flex flex-1 flex-col items-start gap-0.5' : 'flex items-center gap-1.5'}`}
+ class={`min-w-0 group/name flex items-center ${usesCondensedIdentity() ? 'flex-1 gap-1' : 'gap-1.5'}`}
>
<ResourceNameWithWebInterfaceLink
name={props.guest.name}
url={customUrl()}
- class={`min-w-0 ${usesCondensedIdentity() ? 'w-full [&>a]:hidden' : ''}`}
+ class={`min-w-0 ${usesCondensedIdentity() ? '[&>a]:hidden' : ''}`}
nameClass="truncate text-[11px] font-medium text-base-content select-none"
/>
{/* Show backup indicator in name cell only if backup column is hidden */}
diff --git a/frontend-modern/src/components/Workloads/GuestRowCells.tsx b/frontend-modern/src/components/Workloads/GuestRowCells.tsx
index 501f0c225b..22e0c5a3ea 100644
--- a/frontend-modern/src/components/Workloads/GuestRowCells.tsx
+++ b/frontend-modern/src/components/Workloads/GuestRowCells.tsx
@@ -487,7 +487,10 @@ function BackupStatusCell(props: {
// is the disclosure target (the expand chevron is screen-reader only). Keep
// its touch target at the 24px minimum: a 44px box covered most of the
// name cell's row-tap area and doubled every phone row's height. The
- // backup-column badge owns its own cell, so it keeps the 44px target.
+ // negative margins let that 24px target overhang the 14px shield, so it
+ // neither makes the row taller nor takes width from the truncating name
+ // beside it. The backup-column badge owns its
+ // own cell, so it keeps the 44px target.
return (
<>
<button
@@ -495,7 +498,7 @@ function BackupStatusCell(props: {
type="button"
class={
props.indicator
- ? `inline-flex min-h-6 min-w-6 shrink-0 items-center justify-center rounded-sm sm:min-h-0 sm:min-w-0 ${config().color} ${focusClass}`
+ ? `-mx-[5px] -my-1 inline-flex min-h-6 min-w-6 shrink-0 items-center justify-center rounded-sm sm:m-0 sm:min-h-0 sm:min-w-0 ${config().color} ${focusClass}`
: `${getBackupAgeBadgeClass(displayStatus())} min-h-11 min-w-11 sm:min-h-0 ${focusClass}`
}
onMouseEnter={tip.onMouseEnter}
diff --git a/frontend-modern/src/components/Workloads/__tests__/GuestRow.test.tsx b/frontend-modern/src/components/Workloads/__tests__/GuestRow.test.tsx
index b8eb576cb9..63452f21cf 100644
--- a/frontend-modern/src/components/Workloads/__tests__/GuestRow.test.tsx
+++ b/frontend-modern/src/components/Workloads/__tests__/GuestRow.test.tsx
@@ -1887,8 +1887,8 @@ describe('GuestRow', () => {
const name = screen.getByText('backup-guest');
expect(lock.parentElement).toHaveClass('flex-col', 'items-start', 'min-w-0');
expect(lock.parentElement).toContainElement(name);
- expect(name.parentElement).toHaveClass('w-full');
- expect(name.parentElement?.parentElement).toHaveClass('flex-col', 'items-start');
+ expect(name.parentElement?.parentElement).toHaveClass('flex', 'items-center');
+ expect(name.parentElement?.parentElement).not.toHaveClass('flex-col');
expect(name.parentElement?.parentElement?.parentElement).toHaveClass('w-full');
expect(lock).toHaveClass('whitespace-normal', 'break-words', 'max-w-full');
expect(lock).not.toHaveAttribute('tabindex');
@@ -2506,6 +2506,31 @@ describe('GuestRow', () => {
expect(onClick).not.toHaveBeenCalled();
});
+ // A stacked phone identity put the shield on a second line under the name
+ // and grew every phone row from 32px to 43.5px on a 375px mock stack. The
+ // shield shares the name's line, and its 24px target overhangs the 14px
+ // icon instead of adding height or taking the truncating name's width.
+ it.each(['narrow', 'phone'] as const)(
+ 'regression: keeps the %s backup indicator on the name line',
+ (workloadTableLayoutMode) => {
+ const guest = makeGuest({
+ type: 'qemu',
+ workloadType: 'vm',
+ lastBackup: Date.now() - 3_600_000,
+ });
+ renderGuestRow({ guest, workloadTableLayoutMode, visibleColumnIds: ['name', 'cpu'] });
+ const indicator = screen.getByRole('button', { name: /^Last backup:/ });
+ const nameLine = screen.getByText(guest.name).parentElement?.parentElement;
+
+ expect(indicator.parentElement).toBe(nameLine);
+ expect(nameLine).toHaveClass('flex', 'items-center');
+ expect(nameLine).not.toHaveClass('flex-col');
+ expect(indicator.className.split(/\s+/)).toEqual(
+ expect.arrayContaining(['-my-1', '-mx-[5px]', 'sm:m-0']),
+ );
+ },
+ );
+
// #2858: the amber shield names the operator's own limits (this mock's
// stale limit is 48 hours, not the 72-hour default) and links to them.
it('says which backup age limit a row crossed and links to where it is set', () => {