From 348b73140895e07fd174fa102cdb76d1aaec2f4e Mon Sep 17 00:00:00 2001 From: rcourtman Date: Wed, 20 May 2026 11:06:32 +0100 Subject: [PATCH] Establish canonical platform table column alignment MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Until now, the same column (CPU/Memory/Disk) was aligned differently depending on which table it appeared in: Proxmox top tables defaulted to left, Docker/TrueNAS/vSphere/Kubernetes top tables used right, the shared workloads bottom table used center, and integer-count columns (VMs/CTs/Containers/Datastores/Desired/etc.) were a mix of right and center. The user's read: "complete hobbledy codge." Codify the rule once and for all. The new frontend-modern/src/features/platformPage/columnAlignment.ts defines five canonical column kinds with a documented align mapping and the rationale for each: - 'name' left primary identifier - 'text' left readable strings - 'metric-bar' center bar fills cell, label rides at fill edge - 'numeric-value' right units/digits line up for column scanning - 'badge' center pill/icon-only cells sharedPlatformPage exposes getPlatformTableHeadClassForKind() and getPlatformTableCellClassForKind() wrappers; every platform top table plus the Docker services table now consume these instead of passing literal align strings. The Proxmox host column model carries a kind field instead of a raw align so the same source of truth drives both the model file and the JSX. KubernetesClustersTable.tsx is intentionally not migrated in this commit: another agent has it staged in their working tree. The same migration applies once that lands; left for a follow-up. The WorkloadTableHeader (shared bottom guest-list table) is also unmigrated here. It center-aligns everything today, and changing it to canonical means flipping Uptime / Net I/O / Disk I/O from center to right across every guest list on every platform page — bigger visual blast radius, so it gets its own scoped commit next. A canonical-platform-audit rule and a CLAUDE.md/AGENTS.md note will follow in a third commit, so any future agent that writes a non-canonical align fails the pre-push hook rather than discovers the drift visually weeks later. --- .../src/features/docker/DockerHostsTable.tsx | 44 +++++----- .../features/docker/DockerServicesTable.tsx | 32 ++++---- .../kubernetes/KubernetesDeploymentsTable.tsx | 32 ++++---- .../kubernetes/KubernetesNodesTable.tsx | 40 ++++----- .../features/platformPage/columnAlignment.ts | 81 +++++++++++++++++++ .../platformPage/sharedPlatformPage.tsx | 15 ++++ .../features/proxmox/ProxmoxNodesTable.tsx | 26 +++--- .../features/proxmox/proxmoxHostTableModel.ts | 23 +++--- .../features/truenas/TrueNASSystemsTable.tsx | 48 +++++------ .../src/features/vmware/VsphereHostsTable.tsx | 40 ++++----- 10 files changed, 239 insertions(+), 142 deletions(-) create mode 100644 frontend-modern/src/features/platformPage/columnAlignment.ts diff --git a/frontend-modern/src/features/docker/DockerHostsTable.tsx b/frontend-modern/src/features/docker/DockerHostsTable.tsx index 4f5e024c77..a0df8d9a80 100644 --- a/frontend-modern/src/features/docker/DockerHostsTable.tsx +++ b/frontend-modern/src/features/docker/DockerHostsTable.tsx @@ -27,8 +27,8 @@ import { PlatformTableEmptyState, createPlatformTableFilterState, filterPlatformResources, - getPlatformTableCellClass, - getPlatformTableHeadClass, + getPlatformTableCellClassForKind, + getPlatformTableHeadClassForKind, type PlatformResourceStatusFilter, } from '@/features/platformPage/sharedPlatformPage'; import type { Disk } from '@/types/api'; @@ -166,36 +166,36 @@ export const DockerHostsTable: Component<{ bars aren't squeezed by table-fixed's equal split. Mobile widths (w-[40%], w-[20%]) are unchanged. */} - + Host -