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
Hide section tabs and lift table preview caps in kiosk
rcourtman068893f83f5c
diff --git a/docs/release-control/v6/internal/subsystems/frontend-primitives.md b/docs/release-control/v6/internal/subsystems/frontend-primitives.mdindex 94e0682010..17e20fa48b 100644--- a/docs/release-control/v6/internal/subsystems/frontend-primitives.md+++ b/docs/release-control/v6/internal/subsystems/frontend-primitives.md@@ -3699,13 +3699,15 @@ default` instead of fusing provider and badge text such astable-header chrome outside the canonical Workloads frame.Large provider inventories use the shared `createPlatformTablePreview` and`PlatformTablePreviewFooter` boundary to keep the controlled workload table- in the initial reading flow: Proxmox shows eight node rows by default on- larger layouts and four on phone-sized layouts. The accessible, reversible- show-all control belongs below the bounded rows, where a shared fade,- remaining-row hint, and directional chevron communicate that the list+ in the initial reading flow: Proxmox shows twelve node rows by default on+ larger layouts and six on narrow, phone and mobile layouts. The accessible,+ reversible show-all control belongs below the bounded rows, where a shared+ fade, remaining-row hint, and directional chevron communicate that the listcontinues; it must not compete with topology context in the Nodes header.Expansion is deliberate session state and must not persist a page-burying- expanded default.+ expanded default. Kiosk mode is the one exception: `createPlatformTablePreview`+ reads the shared kiosk signal, shows every row and renders no show-all+ control, because a wall display has nobody to press it.Docker / Podman, Kubernetes, TrueNAS, VMware vSphere, and Standalone Machines must continue using their shared`PlatformTableToolbar` counters and table headers; none may add a parallelestate card grid or provider-only spotlight surface.@@ -5900,7 +5902,8 @@ Platform section tabs are registry-backed too. `PlatformSectionTabs` owns theworkflow tab shell, hidden-single-tab behavior, active-link styling, linktargeting, active-page aria state, and minimal active-tab visibility scrollingafter route or viewport-size changes; platform page surfaces own only tab specs,-the active tab choice, and aria-label copy.+the active tab choice, and aria-label copy. The shared tabs also stay unmounted+in kiosk mode, so a page surface must not add its own kiosk check around them.The visibility behavior is a shared horizontal-rail boundary:`horizontalRailVisibilityModel.ts` owns the bounded minimal-scroll calculation,and `useActiveHorizontalRailItemVisibility.ts` owns route-state, resize, and@@ -6229,6 +6232,36 @@ Proxmox `Guests on <node>` heading with Show all nodes), chart-drivenselections on Proxmox Backups and Alert History, and search fields insideopened drawers are outside it.+The rest of the kiosk chrome belongs to the shared platform primitives in+`frontend-modern/src/features/platformPage/sharedPlatformPage.tsx`, for the+same reason. `PlatformSectionTabs` stays unmounted while kiosk is on, on every+platform page and on the Proxmox Backups view rail: the URL picks the section+and view the way it picks the platform, the maintainer's replies on #917 and+#1102 promise a display without section navigation, Storage already hides its+own subtabs there, and on a 400px rack LCD the rail cost 53px of height (106px+on Backups, which carries two rails). `createPlatformTablePreview` shows every+row in kiosk and renders no Show all control, so the Proxmox nodes table lists+all of a 50-node estate instead of the first twelve. A wall display has nobody+to press the button, and the primary navigation with its Alerts count is hidden+there, so the table rows are where a node going down shows: on the mock estate+the capped kiosk never showed the node that was offline. The expansion state is+left alone, so leaving kiosk restores the rail and the preview as it was before+kiosk (an expansion still resets once the rows no longer exceed the cap). A+persisted expansion was rejected: the preview contract forbids a+page-burying expanded default, and a display would still need one press per+browser profile. Both rules sit in the shared primitives, so a page that adds a+rail or a capped table must not add its own kiosk check.+The controls the FilterBar rule leaves outside stay interactive on purpose. The+`Guests on <node>` heading with its Show all nodes reset, and the chart+selections on Proxmox Backups and Alert History, stay because a deliberate+click on a row or chart, or a URL someone chose, can narrow the page and these+are the display's way back from that narrowing, so hiding them would strand a+touch display. Drawer search fields exist only inside a drawer someone opened+with a click, and the Kubernetes Namespaces and Deployments and Docker Swarm+drawers register type-to-search only while open, so `useTypeToSearch` stays+kiosk-agnostic: with no such drawer open, a stray key on an overview reaches no+field.+FilterBar does not carry a saved-views affordance. The former`savedViewsKey` / `useSavedViews` / `SavedViewsMenu` trio persisted namedquery strings to localStorage under `pulse:filterbar:saved-views:<key>`; itdiff --git a/frontend-modern/browser-verification/72ed96aef3194212.json b/frontend-modern/browser-verification/72ed96aef3194212.jsonnew file mode 100644index 0000000000..10080f2458--- /dev/null+++ b/frontend-modern/browser-verification/72ed96aef3194212.json@@ -0,0 +1,61 @@+{+ "version": 1,+ "base_sha": "21b496152c42737d435d2af72aaacbbe469c58ec",+ "verified_at": "2026-10-10T08:50:24Z",+ "result": "passed",+ "changed_paths": [+ "frontend-modern/src/features/platformPage/sharedPlatformPage.tsx"+ ],+ "content_sha256": {+ "frontend-modern/src/features/platformPage/sharedPlatformPage.tsx": "159551fe3b0c0e66accd24e4a364f3c2c999c713da0f2a2e8eec91c876cb3255"+ },+ "routes": [+ "/proxmox/overview?kiosk=1",+ "/proxmox/overview?kiosk=0",+ "/proxmox/storage?kiosk=1",+ "/proxmox/storage?kiosk=0",+ "/proxmox/backups?kiosk=1",+ "/proxmox/backups?kiosk=0",+ "/docker?kiosk=1",+ "/docker?kiosk=0",+ "/kubernetes?kiosk=1",+ "/kubernetes?kiosk=0",+ "/vmware?kiosk=1",+ "/vmware?kiosk=0",+ "/truenas/overview?kiosk=1",+ "/truenas/overview?kiosk=0",+ "/standalone/machines?kiosk=1",+ "/standalone/machines?kiosk=0"+ ],+ "viewports": [+ {+ "width": 1440,+ "height": 900+ },+ {+ "width": 1280,+ "height": 400+ },+ {+ "width": 390,+ "height": 844+ }+ ],+ "states": [+ "Vite dev server serving this exact tree (sharedPlatformPage.tsx byte-identical to the staged file, sha256 matches content_sha256, rebased on origin/main 21b496152c with PR 2779's FilterBar) over a private DEMO_MODE mock backend (50 Proxmox nodes, 929 guests, 7 ESXi hosts, Docker, Kubernetes, TrueNAS, Machines), driven by headless Chromium. 1280x400 is the rack LCD from issue 917. Every check below ran on this final revision; an earlier revision whose preview reset was tied to kiosk gave the same kiosk results, and review of it led to the expansion-preserving reset verified below The staged sharedPlatformPage.tsx differs from the bytes exercised below only by one added sentence in a helper comment, so its compiled behaviour is unchanged.",+ "Baseline on main's sharedPlatformPage.tsx with the same FilterBar: kiosk still rendered a section rail on every route (two on Proxmox Backups: Proxmox sections and Backup views), costing the 400px display 53px (first table top 142px against 89px after, Backups 169px against 63px), and the Proxmox overview listed 12 of 50 nodes behind a Show all 50 nodes button. A scroll sweep of the kiosk page saw 12 nodes and no offline node",+ "Final source, kiosk on at 1440x900, 1280x400 and 390x844 across Proxmox overview, Storage, Backups, Docker, Kubernetes and vSphere (TrueNAS and Machines at 1440x900 and 390x844): zero section or view rails, zero filter bars, no Show all button; every table still renders. 44 route and mode checks, none failing",+ "Proxmox overview in kiosk: all 50 nodes render (36 rows in the DOM at 390 wide, where rows are windowed, 21 of them in the first fold); a scroll sweep at 1440 sees 50 nodes including Disaster Recovery D marked Offline at position 23, which the capped baseline never showed",+ "Kiosk off control: every route renders its rail again (Proxmox Backups both), the Proxmox overview shows 12 node rows (6 at 390) with Show all 50 nodes, and the phone rail shows its scroll-right arrow",+ "Backups at 1280x400 in kiosk starts its first table at 63px and shows the backup servers, the Backup health bar and the first workload rows without the By date / Coverage rail"+ ],+ "interactions": [+ "Clicked the header Enter kiosk mode button at 1440 and 390: rail and Show all button disappeared without a reload and the node table grew from 12 (6) to 50 rows (36 windowed); pressed Escape: the rail, Show all 50 nodes and the 12 (6) row cap returned, and at 390 the rail scroll-right arrow came back on the new element",+ "Outside kiosk clicked Show all 50 nodes then Show fewer nodes at 1440 and 390: 12 to 50 to 12 rows (6 to 36 to 6 windowed)",+ "Expanded the node table, opened the drawer of a node past the cap (14th row), entered kiosk and left it with Escape at 1440 and 390: the expansion (Show fewer nodes) and the open drawer both survived the round trip, and Show fewer nodes then collapsed to 12 (6) rows and closed the drawer",+ "Clicked the Storage link in the restored Proxmox rail at 1440 and 390: navigated to /proxmox/storage",+ "Typed analytics with kiosk on at /proxmox/overview: no input appeared and the 50 node rows were unchanged; with no drawer open on /kubernetes typing zz reached no input",+ "Clicked the VMS cell of Research C in kiosk: heading read Guests on Research C 18 with a Show all nodes button, which returned the heading to Guests 929",+ "Opened the Kubernetes cluster drawer in kiosk: Namespaces and Deployments tabs each showed their search field and typing pr after clicking blank page took the keys into it. No Swarm tab appeared on any Docker row opened in the mock estate, so the Swarm drawer was not exercised"+ ]+}diff --git a/frontend-modern/src/components/shared/SharedPrimitives.guardrails.test.ts b/frontend-modern/src/components/shared/SharedPrimitives.guardrails.test.tsindex 87c5a94539..b9169cd9b3 100644--- a/frontend-modern/src/components/shared/SharedPrimitives.guardrails.test.ts+++ b/frontend-modern/src/components/shared/SharedPrimitives.guardrails.test.ts@@ -5443,6 +5443,10 @@ describe('shared primitive guardrails', () => {expect(sharedPlatformPageSource).toContain('export function PlatformTablePreviewFooter');expect(sharedPlatformPageSource).toContain('data-platform-table-preview-footer');expect(sharedPlatformPageSource).toContain('aria-expanded={props.expanded}');+ // Kiosk is a wall display with nobody to press Show all: the shared preview+ // shows every row there, so no table may re-cap itself or add its own check.+ expect(sharedPlatformPageSource).toContain('!kioskMode() && hasHiddenRows()');+ expect(proxmoxNodesTableSource).not.toContain('useKioskMode');for (const [path, source] of [['src/features/docker/DockerHostsTable.tsx', dockerHostsTableSource],@@ -7510,6 +7514,9 @@ describe('shared primitive guardrails', () => {);expect(sharedPlatformPageSource).toContain('export function PlatformSectionTabs');+ // Kiosk hides the rail here once, so page surfaces must not gate it themselves.+ expect(sharedPlatformPageSource).toContain('<PlatformSectionTabRail {...props} />');+ expect(sharedPlatformPageSource).toContain('<Show when={!kioskMode()}>');expect(sharedPlatformPageSource).toContain('useActiveHorizontalRailItemVisibility({');expect(sharedPlatformPageSource).toContain('props.tabs.length > 1');expect(sharedPlatformPageSource).toContain('href={tab.path}');diff --git a/frontend-modern/src/features/platformPage/__tests__/sharedPlatformPage.kiosk.test.tsx b/frontend-modern/src/features/platformPage/__tests__/sharedPlatformPage.kiosk.test.tsxnew file mode 100644index 0000000000..608e7cbf37--- /dev/null+++ b/frontend-modern/src/features/platformPage/__tests__/sharedPlatformPage.kiosk.test.tsx@@ -0,0 +1,184 @@+import { cleanup, render, screen } from '@solidjs/testing-library';+import { Route, Router } from '@solidjs/router';+import { createRoot, createSignal } from 'solid-js';+import { afterEach, describe, expect, it, vi } from 'vitest';+import { setKioskMode } from '@/utils/url';+import { PlatformSectionTabs, createPlatformTablePreview } from '../sharedPlatformPage';++afterEach(() => {+ setKioskMode(false);+ window.sessionStorage.removeItem('pulse_kiosk_mode');+ cleanup();+ window.history.replaceState({}, '', '/');+});++const SECTION_TABS = [+ { id: 'overview', label: 'Overview', path: '/proxmox/overview' },+ { id: 'storage', label: 'Storage', path: '/proxmox/storage' },+ { id: 'backups', label: 'Backups', path: '/proxmox/backups' },+] as const;++const renderSections = (active: () => (typeof SECTION_TABS)[number]['id'] = () => 'overview') =>+ render(() => (+ <Router>+ <Route+ path="/"+ component={() => (+ <PlatformSectionTabs tabs={SECTION_TABS} active={active()} ariaLabel="Proxmox sections" />+ )}+ />+ </Router>+ ));++const sectionRail = () => screen.queryByRole('navigation', { name: 'Proxmox sections' });++describe('PlatformSectionTabs in kiosk mode', () => {+ it('stays unmounted while kiosk mode is on and returns when it ends', () => {+ setKioskMode(true);+ renderSections();++ expect(sectionRail()).toBeNull();+ expect(screen.queryByRole('link', { name: 'Storage' })).toBeNull();++ setKioskMode(false);++ expect(sectionRail()).toBeInTheDocument();+ expect(screen.getByRole('link', { name: 'Storage' })).toHaveAttribute(+ 'href',+ '/proxmox/storage',+ );+ expect(screen.getByRole('link', { name: 'Overview' })).toHaveAttribute('aria-current', 'page');+ });++ it('removes a rendered rail when kiosk mode starts and mounts a fresh one when it ends', () => {+ renderSections();+ const before = sectionRail();+ expect(before).toBeInTheDocument();++ setKioskMode(true);+ expect(sectionRail()).toBeNull();+ expect(before?.isConnected).toBe(false);++ setKioskMode(false);+ const after = sectionRail();+ expect(after).toBeInTheDocument();+ expect(after).not.toBe(before);+ });++ it('keeps following the active section through the kiosk wrapper', () => {+ const [active, setActive] = createSignal<(typeof SECTION_TABS)[number]['id']>('overview');+ renderSections(active);+ expect(screen.getByRole('link', { name: 'Overview' })).toHaveAttribute('aria-current', 'page');++ setActive('storage');+ expect(screen.getByRole('link', { name: 'Storage' })).toHaveAttribute('aria-current', 'page');+ expect(screen.getByRole('link', { name: 'Overview' })).not.toHaveAttribute('aria-current');++ setKioskMode(true);+ setActive('backups');+ setKioskMode(false);+ expect(screen.getByRole('link', { name: 'Backups' })).toHaveAttribute('aria-current', 'page');+ expect(screen.getByRole('link', { name: 'Storage' })).not.toHaveAttribute('aria-current');+ });++ it('keeps the phone scroll controls working on the rail mounted after kiosk mode ends', async () => {+ renderSections();+ setKioskMode(true);+ setKioskMode(false);++ const navigation = screen.getByRole('navigation', { name: 'Proxmox sections' });+ const scrollBy = vi.fn();+ Object.defineProperties(navigation, {+ clientWidth: { configurable: true, value: 220 },+ scrollWidth: { configurable: true, value: 520 },+ scrollLeft: { configurable: true, writable: true, value: 0 },+ scrollBy: { configurable: true, value: scrollBy },+ });++ window.dispatchEvent(new Event('resize'));+ const scrollRight = await screen.findByRole('button', {+ name: 'Proxmox sections: scroll right',+ });+ scrollRight.click();+ expect(scrollBy).toHaveBeenCalledWith({ left: 160, behavior: 'smooth' });+ });+});++describe('createPlatformTablePreview in kiosk mode', () => {+ const allRows = Array.from({ length: 50 }, (_, index) => `pve${index + 1}`);++ // Effects settle once the owner returns, so each test keeps the root alive and+ // disposes it itself instead of asserting inside the root callback.+ const mountPreview = (rows: () => readonly string[] = () => allRows) =>+ createRoot((dispose) => ({+ preview: createPlatformTablePreview({ rows, limit: () => 12 }),+ dispose,+ }));++ it('shows every row with no toggle while kiosk mode is on', () => {+ setKioskMode(true);+ const { preview, dispose } = mountPreview();++ expect(preview.visibleRows()).toHaveLength(50);+ expect(preview.visibleRows().at(-1)).toBe('pve50');+ expect(preview.canExpand()).toBe(false);+ preview.toggle();+ expect(preview.expanded()).toBe(false);+ expect(preview.visibleRows()).toHaveLength(50);+ dispose();+ });++ it('returns to the capped preview when kiosk mode ends without an expansion', () => {+ const { preview, dispose } = mountPreview();+ expect(preview.visibleRows()).toHaveLength(12);+ expect(preview.canExpand()).toBe(true);++ setKioskMode(true);+ expect(preview.visibleRows()).toHaveLength(50);+ expect(preview.canExpand()).toBe(false);++ setKioskMode(false);+ expect(preview.visibleRows()).toHaveLength(12);+ expect(preview.canExpand()).toBe(true);+ dispose();+ });++ it('keeps a deliberate expansion across a kiosk round trip', () => {+ const { preview, dispose } = mountPreview();+ preview.toggle();+ expect(preview.expanded()).toBe(true);++ setKioskMode(true);+ expect(preview.expanded()).toBe(true);+ expect(preview.canExpand()).toBe(false);+ expect(preview.visibleRows()).toHaveLength(50);++ setKioskMode(false);+ expect(preview.expanded()).toBe(true);+ expect(preview.canExpand()).toBe(true);+ expect(preview.visibleRows()).toHaveLength(50);++ preview.toggle();+ expect(preview.expanded()).toBe(false);+ expect(preview.visibleRows()).toHaveLength(12);+ dispose();+ });++ it('still drops an expansion once the rows no longer exceed the cap, in or out of kiosk', () => {+ const [rows, setRows] = createSignal<readonly string[]>(allRows);+ const { preview, dispose } = mountPreview(rows);+ preview.toggle();+ expect(preview.expanded()).toBe(true);++ setKioskMode(true);+ setRows(allRows.slice(0, 5));+ expect(preview.expanded()).toBe(false);+ expect(preview.visibleRows()).toHaveLength(5);++ setKioskMode(false);+ setRows(allRows);+ expect(preview.visibleRows()).toHaveLength(12);+ expect(preview.canExpand()).toBe(true);+ dispose();+ });+});diff --git a/frontend-modern/src/features/platformPage/sharedPlatformPage.tsx b/frontend-modern/src/features/platformPage/sharedPlatformPage.tsxindex 3b1ab5cfcd..a3c2ff772a 100644--- a/frontend-modern/src/features/platformPage/sharedPlatformPage.tsx+++ b/frontend-modern/src/features/platformPage/sharedPlatformPage.tsx@@ -35,6 +35,7 @@ import { TableCard } from '@/components/shared/TableCard';import { TableCardHeader } from '@/components/shared/TableCardHeader';import { useActiveHorizontalRailItemVisibility } from '@/components/shared/useActiveHorizontalRailItemVisibility';import { useBreakpoint } from '@/hooks/useBreakpoint';+import { useKioskMode } from '@/hooks/useKioskMode';import { usePersistentSignal } from '@/hooks/usePersistentSignal';import type { Resource } from '@/types/resource';import { formatBytes, formatRelativeTime, formatUptime } from '@/utils/format';@@ -89,11 +90,27 @@ export type PlatformTabSpec<TabId extends string> = {path: string;};-export function PlatformSectionTabs<TabId extends string>(props: {+type PlatformSectionTabsProps<TabId extends string> = {tabs: readonly PlatformTabSpec<TabId>[];active: TabId;ariaLabel: string;-}) {+};++// Kiosk mode is the read-only wall display: the URL picks the section the way+// it picks the platform, so the section rail is navigation chrome there like+// the primary navigation AppLayout already hides. The shared rail owns the+// rule so a page that adds or moves a rail cannot drop it, and the rail+// mounts fresh when kiosk ends so its scroll listeners bind to the new element.+export function PlatformSectionTabs<TabId extends string>(props: PlatformSectionTabsProps<TabId>) {+ const kioskMode = useKioskMode();+ return (+ <Show when={!kioskMode()}>+ <PlatformSectionTabRail {...props} />+ </Show>+ );+}++function PlatformSectionTabRail<TabId extends string>(props: PlatformSectionTabsProps<TabId>) {let tabListRef: HTMLElement | undefined;const [hasOverflow, setHasOverflow] = createSignal(false);const [canScrollLeft, setCanScrollLeft] = createSignal(false);@@ -352,15 +369,24 @@ export function createPlatformTablePreview<Row>(options: {rows: Accessor<readonly Row[]>;limit: Accessor<number>;}) {+ const kioskMode = useKioskMode();const [expanded, setExpanded] = createSignal(false);const limit = createMemo(() => Math.max(1, Math.trunc(options.limit())));- const canExpand = createMemo(() => options.rows().length > limit());+ const hasHiddenRows = createMemo(() => options.rows().length > limit());+ // A kiosk wall display has nobody to press Show all, so a capped preview+ // there would hide every row past the cap for as long as the display runs.+ // Kiosk shows every row and offers no toggle. The expansion state is left+ // alone, so leaving kiosk returns the preview to the state it had before,+ // unless the rows fell under the cap meanwhile, which resets it as usual.+ const canExpand = createMemo(() => !kioskMode() && hasHiddenRows());const visibleRows = createMemo<readonly Row[]>(() =>- expanded() && canExpand() ? options.rows() : options.rows().slice(0, limit()),+ kioskMode() || (expanded() && hasHiddenRows())+ ? options.rows()+ : options.rows().slice(0, limit()),);createEffect(() => {- if (!canExpand()) setExpanded(false);+ if (!hasHiddenRows()) setExpanded(false);});return {