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
Size protection evidence and detail cards to their own panel
pulse-triage[bot]e72c4f5c0299
diff --git a/docs/release-control/v6/internal/subsystems/frontend-primitives.md b/docs/release-control/v6/internal/subsystems/frontend-primitives.mdindex 9287a89533..b5515d262c 100644--- a/docs/release-control/v6/internal/subsystems/frontend-primitives.md+++ b/docs/release-control/v6/internal/subsystems/frontend-primitives.md@@ -20,6 +20,20 @@## Purpose+### Detail sections follow their own available width++`DetailSectionTable` owns a named inline-size container. Its existing card+presentation activates only when that container has at least 64rem, not when+the viewport does. Narrow drawers and resizable panes retain the compact+single bordered table even on desktop, so a 7rem label track cannot consume a+whole card and collapse its value to zero width. The nested scroll shell must+not become the owner of the named layout query. Balanced integral card spans,+rich values, progress, stacked rows, wrapping opt-ins, test hooks and the public+component interface are unchanged. The registered `DetailSectionTable.test.tsx`+and shared guardrails cover this owner and existing row/card structures;+source-bound browser proof must establish nonzero readable values at narrow+panel and phone widths and the unchanged cards in a genuinely wide container.+### Platform sort headings are native keyboard controlsThe shared platform sort heading declares column scope and contains a native@@ -5713,7 +5727,7 @@ from a cache-inclusive source says "may include cache" beside its RAM amountin the facts strip; the full note (why, and what to do) is the Details row"About this reading" and appears once. `DetailSectionTable` keeps the single bordered table at narrow widthswhere density matters, then presents those same canonical rows as bounded-section cards on desktop. Desktop cards share the available row width, stretch+section cards when their own container reaches 64rem. Wide-container cards share the available row width, stretchto the same row height, and use stable three- or four-column tracks. Anincomplete final row must fill those same tracks with explicit integral spans;it must not independently flex-grow every remaining card into unrelated columndiff --git a/frontend-modern/src/components/shared/DetailSectionTable.tsx b/frontend-modern/src/components/shared/DetailSectionTable.tsxindex 30c68fceb8..9a745bf07b 100644--- a/frontend-modern/src/components/shared/DetailSectionTable.tsx+++ b/frontend-modern/src/components/shared/DetailSectionTable.tsx@@ -49,18 +49,18 @@ const detailSectionDesktopSpan = (sectionCount: number, sectionIndex: number): nconst detailSectionDesktopBasisClass = (sectionCount: number, sectionIndex: number): string => {const columnCount = detailSectionDesktopColumnCount(sectionCount);const span = detailSectionDesktopSpan(sectionCount, sectionIndex);- if (span >= columnCount) return 'lg:basis-full';+ if (span >= columnCount) return '@min-[64rem]/detail-sections:basis-full';if (columnCount === 4) {- if (span === 3) return 'lg:basis-[calc(75%-0.125rem)]';- if (span === 2) return 'lg:basis-[calc(50%-0.25rem)]';- return 'lg:basis-[calc(25%-0.375rem)]';+ if (span === 3) return '@min-[64rem]/detail-sections:basis-[calc(75%-0.125rem)]';+ if (span === 2) return '@min-[64rem]/detail-sections:basis-[calc(50%-0.25rem)]';+ return '@min-[64rem]/detail-sections:basis-[calc(25%-0.375rem)]';}if (columnCount === 3) {- if (span === 2) return 'lg:basis-[calc(66.667%-0.167rem)]';- return 'lg:basis-[calc(33.333%-0.333rem)]';+ if (span === 2) return '@min-[64rem]/detail-sections:basis-[calc(66.667%-0.167rem)]';+ return '@min-[64rem]/detail-sections:basis-[calc(33.333%-0.333rem)]';}- return 'lg:basis-[calc(50%-0.25rem)]';+ return '@min-[64rem]/detail-sections:basis-[calc(50%-0.25rem)]';};export const DetailSectionTable: Component<{@@ -70,85 +70,92 @@ export const DetailSectionTable: Component<{/** Wrap every value instead of truncating it (record drawers: no hover on phones). */wrapValues?: boolean;}> = (props) => (- <div- data-testid={props.dataTestId}- class={`${props.class ?? 'overflow-hidden rounded-sm border border-border bg-surface'} lg:overflow-visible lg:border-0 lg:bg-transparent`}- >- <Table- class="w-full table-fixed text-[11px] lg:flex lg:flex-wrap lg:items-stretch lg:gap-2"- wrapperClass="lg:overflow-visible"+ // A wide viewport can still contain a narrow drawer or split pane. Name the+ // local container so the nested scroll shell cannot become the query owner.+ <div class="@container/detail-sections min-w-0" data-detail-section-container>+ <div+ data-testid={props.dataTestId}+ class={`${props.class ?? 'overflow-hidden rounded-sm border border-border bg-surface'} @min-[64rem]/detail-sections:overflow-visible @min-[64rem]/detail-sections:border-0 @min-[64rem]/detail-sections:bg-transparent`}>- <For each={props.sections}>- {(section, sectionIndex) => (- <TableBody- data-testid={section.testId}- class={`divide-y divide-border lg:flex lg:min-w-0 lg:flex-none lg:flex-col lg:overflow-hidden lg:rounded-sm lg:border lg:border-border lg:bg-surface lg:p-3 lg:shadow-xs lg:divide-y-0 ${detailSectionDesktopBasisClass(props.sections.length, sectionIndex())}`}- >- <TableRow class="bg-surface-alt lg:mb-1 lg:block lg:bg-transparent lg:hover:bg-transparent">- <TableHead- colspan={2}- class="px-2 py-1 text-left text-[10px] font-semibold uppercase tracking-wide text-muted lg:block lg:px-0 lg:pb-1 lg:pt-0 lg:text-base-content"- >- {section.label}- </TableHead>- </TableRow>- <For each={section.rows}>- {(row) => (- <TableRow- class={`lg:grid lg:min-w-0 lg:items-start lg:gap-3 lg:py-0.5 lg:hover:bg-transparent ${row.layout === 'stacked' ? 'lg:grid-cols-[minmax(0,1fr)]' : 'lg:grid-cols-[7rem_minmax(0,1fr)]'}`}+ <Table+ class="w-full table-fixed text-[11px] @min-[64rem]/detail-sections:flex @min-[64rem]/detail-sections:flex-wrap @min-[64rem]/detail-sections:items-stretch @min-[64rem]/detail-sections:gap-2"+ wrapperClass="@min-[64rem]/detail-sections:overflow-visible"+ >+ <For each={props.sections}>+ {(section, sectionIndex) => (+ <TableBody+ data-testid={section.testId}+ class={`divide-y divide-border @min-[64rem]/detail-sections:flex @min-[64rem]/detail-sections:min-w-0 @min-[64rem]/detail-sections:flex-none @min-[64rem]/detail-sections:flex-col @min-[64rem]/detail-sections:overflow-hidden @min-[64rem]/detail-sections:rounded-sm @min-[64rem]/detail-sections:border @min-[64rem]/detail-sections:border-border @min-[64rem]/detail-sections:bg-surface @min-[64rem]/detail-sections:p-3 @min-[64rem]/detail-sections:shadow-xs @min-[64rem]/detail-sections:divide-y-0 ${detailSectionDesktopBasisClass(props.sections.length, sectionIndex())}`}+ >+ <TableRow class="bg-surface-alt @min-[64rem]/detail-sections:mb-1 @min-[64rem]/detail-sections:block @min-[64rem]/detail-sections:bg-transparent @min-[64rem]/detail-sections:hover:bg-transparent">+ <TableHead+ colspan={2}+ class="px-2 py-1 text-left text-[10px] font-semibold uppercase tracking-wide text-muted @min-[64rem]/detail-sections:block @min-[64rem]/detail-sections:px-0 @min-[64rem]/detail-sections:pb-1 @min-[64rem]/detail-sections:pt-0 @min-[64rem]/detail-sections:text-base-content">- {row.layout !== 'stacked' ? (- <TableCell class="w-[38%] px-2 py-1 text-muted lg:w-auto lg:px-0 lg:py-0">- {row.label}- </TableCell>- ) : null}- <TableCell- colspan={row.layout === 'stacked' ? 2 : undefined}- class={`px-2 py-1 text-right font-medium lg:min-w-0 lg:px-0 lg:py-0 lg:text-left ${detailValueToneClass(- row.tone,- )} ${row.valueClass ?? ''}`}- title={row.title ?? row.value}+ {section.label}+ </TableHead>+ </TableRow>+ <For each={section.rows}>+ {(row) => (+ <TableRow+ class={`@min-[64rem]/detail-sections:grid @min-[64rem]/detail-sections:min-w-0 @min-[64rem]/detail-sections:items-start @min-[64rem]/detail-sections:gap-3 @min-[64rem]/detail-sections:py-0.5 @min-[64rem]/detail-sections:hover:bg-transparent ${row.layout === 'stacked' ? '@min-[64rem]/detail-sections:grid-cols-[minmax(0,1fr)]' : '@min-[64rem]/detail-sections:grid-cols-[7rem_minmax(0,1fr)]'}`}>- {row.layout === 'stacked' ? (- <span class="mb-1 block whitespace-normal text-left font-normal leading-snug text-muted wrap-anywhere">+ {row.layout !== 'stacked' ? (+ <TableCell class="w-[38%] px-2 py-1 text-muted @min-[64rem]/detail-sections:w-auto @min-[64rem]/detail-sections:px-0 @min-[64rem]/detail-sections:py-0">{row.label}- </span>- ) : null}- {row.valueContent ?? (- <span- title={row.title ?? row.value}- class={- row.wrap || props.wrapValues- ? 'block whitespace-normal wrap-break-word text-left leading-snug'- : 'block truncate'- }- >- {row.value}- </span>- )}- {row.progress ? (- <ProgressBar- value={row.progress.value}- fillClass={row.progress.fillClass}- ariaLabel={row.progress.ariaLabel}- class="mt-1 h-1.5"- />+ </TableCell>) : null}+ <TableCell+ colspan={row.layout === 'stacked' ? 2 : undefined}+ class={`px-2 py-1 text-right font-medium @min-[64rem]/detail-sections:min-w-0 @min-[64rem]/detail-sections:px-0 @min-[64rem]/detail-sections:py-0 @min-[64rem]/detail-sections:text-left ${detailValueToneClass(+ row.tone,+ )} ${row.valueClass ?? ''}`}+ title={row.title ?? row.value}+ >+ {row.layout === 'stacked' ? (+ <span class="mb-1 block whitespace-normal text-left font-normal leading-snug text-muted wrap-anywhere">+ {row.label}+ </span>+ ) : null}+ {row.valueContent ?? (+ <span+ title={row.title ?? row.value}+ class={+ row.wrap || props.wrapValues+ ? 'block whitespace-normal wrap-break-word text-left leading-snug'+ : 'block truncate'+ }+ >+ {row.value}+ </span>+ )}+ {row.progress ? (+ <ProgressBar+ value={row.progress.value}+ fillClass={row.progress.fillClass}+ ariaLabel={row.progress.ariaLabel}+ class="mt-1 h-1.5"+ />+ ) : null}+ </TableCell>+ </TableRow>+ )}+ </For>+ {section.footerContent ? (+ <TableRow class="@min-[64rem]/detail-sections:mt-2 @min-[64rem]/detail-sections:block @min-[64rem]/detail-sections:min-w-0 @min-[64rem]/detail-sections:border-t @min-[64rem]/detail-sections:border-border @min-[64rem]/detail-sections:pt-2 @min-[64rem]/detail-sections:hover:bg-transparent">+ <TableCell+ colspan={2}+ class="px-2 py-2 @min-[64rem]/detail-sections:block @min-[64rem]/detail-sections:px-0 @min-[64rem]/detail-sections:py-0"+ >+ {section.footerContent}</TableCell></TableRow>- )}- </For>- {section.footerContent ? (- <TableRow class="lg:mt-2 lg:block lg:min-w-0 lg:border-t lg:border-border lg:pt-2 lg:hover:bg-transparent">- <TableCell colspan={2} class="px-2 py-2 lg:block lg:px-0 lg:py-0">- {section.footerContent}- </TableCell>- </TableRow>- ) : null}- </TableBody>- )}- </For>- </Table>+ ) : null}+ </TableBody>+ )}+ </For>+ </Table>+ </div></div>);diff --git a/frontend-modern/src/components/shared/SharedPrimitives.guardrails.test.ts b/frontend-modern/src/components/shared/SharedPrimitives.guardrails.test.tsindex cdbb7c447a..7e3ca09d3c 100644--- a/frontend-modern/src/components/shared/SharedPrimitives.guardrails.test.ts+++ b/frontend-modern/src/components/shared/SharedPrimitives.guardrails.test.ts@@ -7753,13 +7753,23 @@ describe('shared primitive guardrails', () => {expect(detailSectionTableSource).toContain('InlineDetailPanel');expect(detailSectionTableSource).toContain('ObjectDrawerHeader');expect(detailSectionTableSource).toContain('detailSectionDesktopSpan');- expect(detailSectionTableSource).toContain('lg:basis-[calc(25%-0.375rem)]');- expect(detailSectionTableSource).toContain('lg:basis-[calc(50%-0.25rem)]');- expect(detailSectionTableSource).toContain('lg:basis-[calc(33.333%-0.333rem)]');- expect(detailSectionTableSource).toContain('lg:basis-[calc(66.667%-0.167rem)]');- expect(detailSectionTableSource).toContain('lg:flex-none');- expect(detailSectionTableSource).not.toContain('lg:flex-1');- expect(detailSectionTableSource).toContain('lg:grid-cols-[7rem_minmax(0,1fr)]');+ expect(detailSectionTableSource).toContain(+ '@min-[64rem]/detail-sections:basis-[calc(25%-0.375rem)]',+ );+ expect(detailSectionTableSource).toContain(+ '@min-[64rem]/detail-sections:basis-[calc(50%-0.25rem)]',+ );+ expect(detailSectionTableSource).toContain(+ '@min-[64rem]/detail-sections:basis-[calc(33.333%-0.333rem)]',+ );+ expect(detailSectionTableSource).toContain(+ '@min-[64rem]/detail-sections:basis-[calc(66.667%-0.167rem)]',+ );+ expect(detailSectionTableSource).toContain('@min-[64rem]/detail-sections:flex-none');+ expect(detailSectionTableSource).not.toContain('@min-[64rem]/detail-sections:flex-1');+ expect(detailSectionTableSource).toContain(+ '@min-[64rem]/detail-sections:grid-cols-[7rem_minmax(0,1fr)]',+ );// Long identifiers opt into the shared full-width row; compact rows keep// their original track and the table-wide truncation policy is untouched.expect(detailSectionModelSource).toContain("layout?: 'stacked'");@@ -7767,11 +7777,13 @@ describe('shared primitive guardrails', () => {expect(detailSectionTableSource).toContain("colspan={row.layout === 'stacked' ? 2 : undefined}",);- expect(detailSectionTableSource).toContain('lg:grid-cols-[minmax(0,1fr)]');+ expect(detailSectionTableSource).toContain(+ '@min-[64rem]/detail-sections:grid-cols-[minmax(0,1fr)]',+ );expect(detailSectionTableSource).toContain('wrap-anywhere');- expect(detailSectionTableSource).toContain('lg:text-left');- expect(detailSectionTableSource).toContain('lg:divide-y-0');+ expect(detailSectionTableSource).toContain('@min-[64rem]/detail-sections:text-left');+ expect(detailSectionTableSource).toContain('@min-[64rem]/detail-sections:divide-y-0');expect(detailSectionModelSource).toContain('footerContent?: JSX.Element');expect(detailSectionTableSource).toContain('section.footerContent');expect(resourceDetailSummarySource).toContain("from '@/components/shared/DetailSectionTable'");diff --git a/frontend-modern/src/components/shared/__tests__/DetailSectionTable.test.tsx b/frontend-modern/src/components/shared/__tests__/DetailSectionTable.test.tsxindex edc29e6c7e..73af59cc02 100644--- a/frontend-modern/src/components/shared/__tests__/DetailSectionTable.test.tsx+++ b/frontend-modern/src/components/shared/__tests__/DetailSectionTable.test.tsx@@ -57,7 +57,7 @@ describe('DetailSectionTable', () => {expect(formatDetailCountValue(undefined, 'disk')).toBeNull();});- it('keeps compact table rows on narrow screens and bounded section cards on desktop', () => {+ it('keeps compact rows in narrow panels and bounded cards only in a wide local container', () => {const { container } = render(() => (<DetailSectionTablesections={[@@ -82,23 +82,34 @@ describe('DetailSectionTable', () => {expect(screen.getByText('tower').closest('td')).toHaveAttribute('title', 'tower.example.test');const table = container.querySelector('table');- expect(table).toHaveClass('table-fixed', 'lg:flex', 'lg:flex-wrap', 'lg:items-stretch');+ expect(table?.closest('[data-detail-section-container]')).toHaveClass(+ '@container/detail-sections',+ );+ expect(table).not.toHaveClass('lg:flex');+ expect(table).toHaveClass(+ 'table-fixed',+ '@min-[64rem]/detail-sections:flex',+ '@min-[64rem]/detail-sections:flex-wrap',+ '@min-[64rem]/detail-sections:items-stretch',+ );const sections = container.querySelectorAll('tbody');expect(sections).toHaveLength(2);expect(sections[0]).toHaveClass(- 'lg:flex',- 'lg:flex-none',- 'lg:basis-[calc(50%-0.25rem)]',- 'lg:rounded-sm',- 'lg:border',- 'lg:p-3',+ '@min-[64rem]/detail-sections:flex',+ '@min-[64rem]/detail-sections:flex-none',+ '@min-[64rem]/detail-sections:basis-[calc(50%-0.25rem)]',+ '@min-[64rem]/detail-sections:rounded-sm',+ '@min-[64rem]/detail-sections:border',+ '@min-[64rem]/detail-sections:p-3',);expect(screen.getByText('Severity').closest('tr')).toHaveClass(- 'lg:grid',- 'lg:grid-cols-[7rem_minmax(0,1fr)]',- 'lg:gap-3',+ '@min-[64rem]/detail-sections:grid',+ '@min-[64rem]/detail-sections:grid-cols-[7rem_minmax(0,1fr)]',+ '@min-[64rem]/detail-sections:gap-3',+ );+ expect(screen.getByText('Warning').closest('td')).toHaveClass(+ '@min-[64rem]/detail-sections:text-left',);- expect(screen.getByText('Warning').closest('td')).toHaveClass('lg:text-left');});it('preserves section test hooks and rich value content inside the shared layout', () => {@@ -149,7 +160,10 @@ describe('DetailSectionTable', () => {const footer = screen.getByTestId('analysis-footer');expect(footer).toBeInTheDocument();expect(footer.closest('td')).toHaveAttribute('colspan', '2');- expect(footer.closest('tr')).toHaveClass('lg:border-t', 'lg:pt-2');+ expect(footer.closest('tr')).toHaveClass(+ '@min-[64rem]/detail-sections:border-t',+ '@min-[64rem]/detail-sections:pt-2',+ );});it('renders optional row progress without replacing its compact text value', () => {@@ -205,10 +219,12 @@ describe('DetailSectionTable', () => {expect(label).toHaveClass('whitespace-normal', 'wrap-anywhere', 'text-left');expect(label.closest('td')).toHaveAttribute('colspan', '2');expect(label.closest('tr')?.querySelectorAll('td')).toHaveLength(1);- expect(label.closest('tr')).toHaveClass('lg:grid-cols-[minmax(0,1fr)]');+ expect(label.closest('tr')).toHaveClass(+ '@min-[64rem]/detail-sections:grid-cols-[minmax(0,1fr)]',+ );expect(screen.getByText('50% · 5 GB/10 GB').closest('td')).toBe(label.closest('td'));expect(screen.getByText('Status').closest('tr')).toHaveClass(- 'lg:grid-cols-[7rem_minmax(0,1fr)]',+ '@min-[64rem]/detail-sections:grid-cols-[7rem_minmax(0,1fr)]',);expect(screen.getByText('Status').closest('tr')?.querySelectorAll('td')).toHaveLength(2);});@@ -227,9 +243,11 @@ describe('DetailSectionTable', () => {expect(sections).toHaveLength(5);Array.from(sections).slice(0, 3)- .forEach((section) => expect(section).toHaveClass('lg:basis-[calc(33.333%-0.333rem)]'));- expect(sections[3]).toHaveClass('lg:basis-[calc(66.667%-0.167rem)]');- expect(sections[4]).toHaveClass('lg:basis-[calc(33.333%-0.333rem)]');+ .forEach((section) =>+ expect(section).toHaveClass('@min-[64rem]/detail-sections:basis-[calc(33.333%-0.333rem)]'),+ );+ expect(sections[3]).toHaveClass('@min-[64rem]/detail-sections:basis-[calc(66.667%-0.167rem)]');+ expect(sections[4]).toHaveClass('@min-[64rem]/detail-sections:basis-[calc(33.333%-0.333rem)]');});it('fills seven desktop sections on the same four-column tracks', () => {@@ -246,10 +264,12 @@ describe('DetailSectionTable', () => {expect(sections).toHaveLength(7);Array.from(sections).slice(0, 4)- .forEach((section) => expect(section).toHaveClass('lg:basis-[calc(25%-0.375rem)]'));- expect(sections[4]).toHaveClass('lg:basis-[calc(50%-0.25rem)]');- expect(sections[5]).toHaveClass('lg:basis-[calc(25%-0.375rem)]');- expect(sections[6]).toHaveClass('lg:basis-[calc(25%-0.375rem)]');+ .forEach((section) =>+ expect(section).toHaveClass('@min-[64rem]/detail-sections:basis-[calc(25%-0.375rem)]'),+ );+ expect(sections[4]).toHaveClass('@min-[64rem]/detail-sections:basis-[calc(50%-0.25rem)]');+ expect(sections[5]).toHaveClass('@min-[64rem]/detail-sections:basis-[calc(25%-0.375rem)]');+ expect(sections[6]).toHaveClass('@min-[64rem]/detail-sections:basis-[calc(25%-0.375rem)]');});it('lazily renders technical details with the same compact section rows', () => {diff --git a/frontend-modern/src/features/truenas/TrueNASProtectionTable.tsx b/frontend-modern/src/features/truenas/TrueNASProtectionTable.tsxindex ea39056bdc..5f6c9e0f9c 100644--- a/frontend-modern/src/features/truenas/TrueNASProtectionTable.tsx+++ b/frontend-modern/src/features/truenas/TrueNASProtectionTable.tsx@@ -515,7 +515,7 @@ export const TrueNASProtectionTable: Component<{kind="numeric-value"sort={sort}sortKey="completed"- class="md:w-[12%]"+ class="platform-table-mobile-w-30 md:w-[12%]"><PlatformResponsiveTableLabel compact="Finished" full="Completed" /></PlatformSortableTableHead>@@ -531,7 +531,7 @@ export const TrueNASProtectionTable: Component<{kind="badge"sort={sort}sortKey="outcome"- class="platform-table-mobile-w-25 md:w-[9%]"+ class="platform-table-mobile-w-30 md:w-[9%]">Outcome</PlatformSortableTableHead>diff --git a/frontend-modern/src/features/truenas/__tests__/TrueNASProtectionTable.completion.test.tsx b/frontend-modern/src/features/truenas/__tests__/TrueNASProtectionTable.completion.test.tsxindex ea8329cc2c..a0d51c7f10 100644--- a/frontend-modern/src/features/truenas/__tests__/TrueNASProtectionTable.completion.test.tsx+++ b/frontend-modern/src/features/truenas/__tests__/TrueNASProtectionTable.completion.test.tsx@@ -103,11 +103,11 @@ describe('TrueNAS protection completion evidence', () => {);expect(cells[index]).not.toHaveClass('platform-table-phone-hidden');}- expect(screen.getByRole('columnheader', { name: /Completed/ })).not.toHaveClass(- 'platform-table-mobile-w-15',+ expect(screen.getByRole('columnheader', { name: /Completed/ })).toHaveClass(+ 'platform-table-mobile-w-30',);expect(screen.getByRole('columnheader', { name: 'Outcome' })).toHaveClass(- 'platform-table-mobile-w-25',+ 'platform-table-mobile-w-30',);await fireEvent.click(within(row('phone')).getByRole('button', { name: /details.*tank\/departmental-archives/i }),