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.

Gate the wide workloads column set on a shell that can hold it

rcourtman2ba6c66e3766
diff --git a/frontend-modern/src/components/Workloads/__tests__/GuestRow.test.tsx b/frontend-modern/src/components/Workloads/__tests__/GuestRow.test.tsx
index 88cd6ae6c1..a6aca115f4 100644
--- a/frontend-modern/src/components/Workloads/__tests__/GuestRow.test.tsx
+++ b/frontend-modern/src/components/Workloads/__tests__/GuestRow.test.tsx
@@ -1046,8 +1046,11 @@ describe('GUEST_COLUMNS', () => {
expect(getWorkloadTableLayoutMode(768)).toBe('tablet');
expect(getWorkloadTableLayoutMode(899)).toBe('tablet');
expect(getWorkloadTableLayoutMode(900)).toBe('compact');
- expect(getWorkloadTableLayoutMode(1439)).toBe('compact');
- expect(getWorkloadTableLayoutMode(1440)).toBe('wide');
+ // Wide waits for a shell that can hold the full column set without
+ // horizontal scroll (see WORKLOAD_TABLE_WIDE_LAYOUT_WIDTH).
+ expect(getWorkloadTableLayoutMode(1440)).toBe('compact');
+ expect(getWorkloadTableLayoutMode(1535)).toBe('compact');
+ expect(getWorkloadTableLayoutMode(1536)).toBe('wide');
});
it('keeps CPU and memory fixed while allowing disk to be platform-scoped', () => {
diff --git a/frontend-modern/src/components/Workloads/guestRowModel.tsx b/frontend-modern/src/components/Workloads/guestRowModel.tsx
index 3591004fb8..2159cc084b 100644
--- a/frontend-modern/src/components/Workloads/guestRowModel.tsx
+++ b/frontend-modern/src/components/Workloads/guestRowModel.tsx
@@ -14,7 +14,13 @@ export type WorkloadTableLayoutMode = 'mobile' | 'tablet' | 'compact' | 'wide';
export const WORKLOAD_TABLE_MOBILE_LAYOUT_WIDTH = 768;
export const WORKLOAD_TABLE_TABLET_LAYOUT_WIDTH = 900;
-export const WORKLOAD_TABLE_WIDE_LAYOUT_WIDTH = 1440;
+// Layout stages key off the viewport, but the table renders inside a shell
+// that is ~120px narrower (nav rail + page padding). The wide column set sums
+// to ~1370px, so engaging it at a 1440px viewport left the default layout
+// horizontally scrolling by ~50px. Horizontal scroll is reserved for columns
+// a user explicitly pins (see forcedColumnIds); the breakpoint default must
+// fit, so wide waits until the shell can actually hold the full set.
+export const WORKLOAD_TABLE_WIDE_LAYOUT_WIDTH = 1536;
const WORKLOAD_TABLE_LAYOUT_ORDER: Record<WorkloadTableLayoutMode, number> = {
mobile: 0,