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.
Go aialertsdashboarddockerdocker-monitoringgohomelabinfrastructure-monitoringkubernetesmonitoringmspproxmoxproxmox-backup-serverproxmox-mail-gatewayproxmox-veself-hostedtruenastypescriptvspherewebhooks
Keep open row drawers spanning the table when columns change
rcourtmana1891e5f0ca0
diff --git a/docs/release-control/v6/internal/subsystems/frontend-primitives.md b/docs/release-control/v6/internal/subsystems/frontend-primitives.mdindex 308d1470e2..e9bf03ae20 100644--- a/docs/release-control/v6/internal/subsystems/frontend-primitives.md+++ b/docs/release-control/v6/internal/subsystems/frontend-primitives.md@@ -5665,6 +5665,18 @@ When focused detail content is removed, `InlineDetailTableRow` restores focusto its current `aria-controls` disclosure with `preventScroll`; live refresh,collapse, and row replacement must not move the surrounding applicationviewport merely to reveal that control.+The detail cell spans the summary row's visible cells, and `InlineDetailTableRow`+re-measures that span while the row stays open: whenever summary cells are+added, removed, or hidden (a column picker toggle, or a data-driven column+such as the vCenter column that shows only with several vCenters), and+whenever the caller's requested colspan changes. An open drawer must never+keep a phantom column or stop short of a newly shown one. Changes inside a+cell's content do not re-measure, so live metric updates stay cheap. When+the span grows, the row changes the cell's own width for one forced layout+and restores it, because Chromium otherwise keeps a fixed-layout table's old+column widths for the widened cell. Callers keep passing their requested+colspan; they must not re-key or remount the detail row to force a new span,+which would discard drawer state.Inline detail section content is registry-backed separately from the row shell.`DetailSectionTable`, `InlineDetailPanel`, and `detailSectionModel.ts` owndetail row compaction, section-table rendering, value-tone classes, and thediff --git a/docs/release-control/v6/internal/subsystems/registry.json b/docs/release-control/v6/internal/subsystems/registry.jsonindex de73a0f7ab..ea8a0e3c26 100644--- a/docs/release-control/v6/internal/subsystems/registry.json+++ b/docs/release-control/v6/internal/subsystems/registry.json@@ -5972,6 +5972,7 @@"frontend-modern/src/components/shared/__tests__/Dialog.test.tsx","frontend-modern/src/components/shared/__tests__/HelpIcon.test.tsx","frontend-modern/src/components/shared/__tests__/HistoryChart.test.tsx",+ "frontend-modern/src/components/shared/__tests__/InlineDetailTableRow.test.tsx","frontend-modern/src/components/shared/__tests__/MobileNavBar.test.tsx","frontend-modern/src/components/shared/__tests__/PulseDataGrid.test.tsx","frontend-modern/src/components/shared/__tests__/SearchField.test.tsx",diff --git a/frontend-modern/browser-verification/f374371e7bfb2bfc.json b/frontend-modern/browser-verification/f374371e7bfb2bfc.jsonnew file mode 100644index 0000000000..1a02d979cd--- /dev/null+++ b/frontend-modern/browser-verification/f374371e7bfb2bfc.json@@ -0,0 +1,47 @@+{+ "version": 1,+ "base_sha": "d4315cef519bb5729a2b9117cae5d28724c17d84",+ "verified_at": "2026-10-06T12:59:58Z",+ "result": "passed",+ "changed_paths": [+ "frontend-modern/src/components/shared/InlineDetailTableRow.tsx"+ ],+ "content_sha256": {+ "frontend-modern/src/components/shared/InlineDetailTableRow.tsx": "27f6c907846d17ef0742386e766719d6e529b17223b1dcc3b586e0caa48cbb96"+ },+ "routes": [+ "/standalone",+ "/proxmox",+ "/vmware/activity"+ ],+ "viewports": [+ {+ "width": 1440,+ "height": 900+ },+ {+ "width": 1024,+ "height": 900+ },+ {+ "width": 768,+ "height": 900+ }+ ],+ "states": [+ "Private mock stack (backend + Vite on 7747/5267) built from main 92d946d057 plus this change, compared with the same stack on unchanged main",+ "Before, /standalone machines table at 1440: hiding Uptime from View > Columns with a machine drawer open left the drawer at colspan 9 against 8 visible headers, so the header and rows shrank to 939px and a blank 436px phantom column filled the table's right side",+ "Before, /standalone at 1440: showing System with the drawer open left the drawer at colspan 7 against 8 headers, stopping 79px short of the table edge under the actions column",+ "Before, /proxmox guest table at 1440, 1024 and 768: hiding Type, Uptime or Backup with a guest drawer open left colspan one above the visible header count (the fixed layout collapses the phantom column to about 1px there)",+ "After, both tables at 1440 and 768: drawer colSpan equals the visible header and summary cell count after every hide and show, and the drawer, last header cell and last summary cell all end at the table's right edge",+ "After, growing span case: the colspan update alone left Chromium laying the widened cell out at its old 7-column width (1241px of 1320px); with the one-off width nudge the cell measures the full table width while keeping the same row node",+ "/vmware/activity with the mock's single vCenter: the Activity drawer still spans 6 of 6 header columns at 1440 and 5 of 5 at 768 (the vCenter-count flip itself is covered by the unit test that removes and restores a summary cell)"+ ],+ "interactions": [+ "Opened a machine drawer on /standalone, then hid and showed Uptime, System, Agent and Last seen through View > Columns while the drawer stayed open, measuring drawer colSpan, header and summary visible cell counts and right edges after each toggle",+ "Opened a guest drawer on /proxmox, hid a column first, then showed and hid Type again through View > Columns with the drawer open, measuring the same values",+ "Confirmed with a node tag that the drawer row stayed mounted across toggles (no remount, so drawer tab state is kept)",+ "Opened a /vmware/activity row drawer at both widths and compared its span with the visible headers",+ "Captured clipped screenshots of the /standalone drawer before and after each toggle"+ ]+}diff --git a/frontend-modern/src/components/shared/InlineDetailTableRow.tsx b/frontend-modern/src/components/shared/InlineDetailTableRow.tsxindex 5aa7776f6f..1b7f479484 100644--- a/frontend-modern/src/components/shared/InlineDetailTableRow.tsx+++ b/frontend-modern/src/components/shared/InlineDetailTableRow.tsx@@ -1,4 +1,4 @@-import { createSignal, onCleanup, onMount, splitProps, type JSX } from 'solid-js';+import { createEffect, createSignal, on, onCleanup, onMount, splitProps, type JSX } from 'solid-js';import { TableCell, TableRow, type TableRowProps } from './Table';@@ -88,12 +88,57 @@ export function InlineDetailTableRow(props: InlineDetailTableRowProps) {: undefined;if (tableShell) observer?.observe(tableShell);+ // A column picker, or a column that depends on the data (one vCenter+ // versus several), can add, remove or hide summary cells while this row+ // stays open, without resizing the table shell. Watch the summary row's+ // own cells so the detail cell never keeps a stale span. Changes deeper+ // inside a cell are ignored: live metric updates must not re-measure.+ const summaryRow = detailRow?.previousElementSibling;+ let summaryCellsObserver: MutationObserver | undefined;+ if (summaryRow instanceof HTMLTableRowElement && typeof MutationObserver === 'function') {+ summaryCellsObserver = new MutationObserver((records) => {+ const summaryCellsChanged = records.some(+ (record) =>+ record.target === summaryRow ||+ (record.type === 'attributes' && record.target.parentNode === summaryRow),+ );+ if (summaryCellsChanged) syncColspanToVisibleSummaryCells();+ });+ summaryCellsObserver.observe(summaryRow, {+ childList: true,+ subtree: true,+ attributes: true,+ attributeFilter: ['class', 'style', 'hidden', 'colspan'],+ });+ }+onCleanup(() => {window.removeEventListener('resize', syncColspanToVisibleSummaryCells);observer?.disconnect();+ summaryCellsObserver?.disconnect();});});+ // Callers that change the span they ask for (and rows rendered without a+ // summary row, which fall back to that span) re-sync on the change.+ createEffect(on(requestedColspan, syncColspanToVisibleSummaryCells, { defer: true }));++ // Chromium keeps a fixed-layout table's column widths when a spanning+ // cell's colspan grows over a column added since the table last laid out,+ // so the detail cell would stop short of the new column. A change to the+ // cell's own width makes it recompute them; restore it after one layout.+ // The effect is not deferred so its first run records the mounted span.+ createEffect(+ on(effectiveColspan, (colspan, previousColspan) => {+ const detailCell = detailRow?.cells[0];+ if (!detailCell || previousColspan === undefined || colspan <= previousColspan) return;+ const width = detailCell.style.width;+ detailCell.style.width = '0px';+ void detailCell.offsetWidth;+ detailCell.style.width = width;+ }),+ );+return (<TableRow ref={detailRow} class={local.class} {...rest}><TableCelldiff --git a/frontend-modern/src/components/shared/__tests__/InlineDetailTableRow.test.tsx b/frontend-modern/src/components/shared/__tests__/InlineDetailTableRow.test.tsxindex f1ccb0d9ce..a6349fe15e 100644--- a/frontend-modern/src/components/shared/__tests__/InlineDetailTableRow.test.tsx+++ b/frontend-modern/src/components/shared/__tests__/InlineDetailTableRow.test.tsx@@ -86,6 +86,76 @@ describe('InlineDetailTableRow', () => {});});+ it('re-spans when a summary column is removed or restored while the row stays open', async () => {+ const [showSystem, setShowSystem] = createSignal(true);+ render(() => (+ <Table>+ <TableBody>+ <tr>+ <td>Machine</td>+ <Show when={showSystem()}>+ <td>System</td>+ </Show>+ <td>Seen</td>+ </tr>+ <InlineDetailTableRow colspan={3}>+ <div>Column picker detail</div>+ </InlineDetailTableRow>+ </TableBody>+ </Table>+ ));+ const detailCell = () => screen.getByText('Column picker detail').closest('td');++ await waitFor(() => expect(detailCell()).toHaveAttribute('colspan', '3'));+ setShowSystem(false);+ await waitFor(() => expect(detailCell()).toHaveAttribute('colspan', '2'));+ setShowSystem(true);+ await waitFor(() => expect(detailCell()).toHaveAttribute('colspan', '3'));+ // The relayout nudge for a growing span must not leave a width behind.+ expect(detailCell()?.style.width).toBe('');+ });++ it('re-spans when a summary cell is hidden in place while the row stays open', async () => {+ const [hideUptime, setHideUptime] = createSignal(false);+ render(() => (+ <Table>+ <TableBody>+ <tr>+ <td>Machine</td>+ <td style={{ display: hideUptime() ? 'none' : undefined }}>Uptime</td>+ <td>Seen</td>+ </tr>+ <InlineDetailTableRow colspan={3}>+ <div>Hidden cell detail</div>+ </InlineDetailTableRow>+ </TableBody>+ </Table>+ ));+ const detailCell = () => screen.getByText('Hidden cell detail').closest('td');++ await waitFor(() => expect(detailCell()).toHaveAttribute('colspan', '3'));+ setHideUptime(true);+ await waitFor(() => expect(detailCell()).toHaveAttribute('colspan', '2'));+ });++ it('follows a changed requested span when there is no summary row to measure', async () => {+ const [colspan, setColspan] = createSignal(5);+ render(() => (+ <Table>+ <TableBody>+ <InlineDetailTableRow colspan={colspan()}>+ <div>Requested span detail</div>+ </InlineDetailTableRow>+ </TableBody>+ </Table>+ ));+ const detailCell = () => screen.getByText('Requested span detail').closest('td');++ await waitFor(() => expect(detailCell()).toHaveAttribute('colspan', '5'));+ setColspan(6);+ await waitFor(() => expect(detailCell()).toHaveAttribute('colspan', '6'));+ });+it('restores focus to the controlling disclosure when focused detail content closes', async () => {const Fixture = () => {const [open, setOpen] = createSignal(true);