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
Verify the final combined shared controls
pulse-triage[bot]2ccfd4ce56f0
diff --git a/frontend-modern/browser-tests/combined-controls.cjs b/frontend-modern/browser-tests/combined-controls.cjsnew file mode 100644index 0000000000..5daabd5a4f--- /dev/null+++ b/frontend-modern/browser-tests/combined-controls.cjs@@ -0,0 +1,268 @@+// Fresh final-content proof for merged select, background, link and button repairs.+// Starts only a guest-local preview; all status responses are synthetic and read-only.+const assert = require('node:assert/strict');+const fs = require('node:fs');+const path = require('node:path');+const { createHash } = require('node:crypto');+const { chromium, webkit } = require('playwright');++const verifiedParent = '737b6c27e17cdd8234030c357e0866b6dfb6c730';+const expectedContent = {+ 'frontend-modern/src/index.css': '5cbd2ebb37fb3b50926200da17e391fb3bc8a8e2a987b151c2c80f48b38526df',+ 'frontend-modern/src/components/Settings/BackupTransferDialogs.tsx': '23c58ab753541d158d20fa1dd4e2bbeafb5a5374d456898931f52b31494b57e6',+ 'frontend-modern/src/features/alerts/AlertDeadManDestinationSection.tsx': '9dce4c868a2c2e3898e582ab58e072c7ff48968e95f9aeabee17ada9129f1659',+};+const digest = (file) => createHash('sha256').update(fs.readFileSync(file)).digest('hex');+const delay = (ms) => new Promise((resolve) => setTimeout(resolve, ms));++async function settle(page) {+ await page.evaluate(async () => {+ await document.fonts.ready;+ await Promise.all(document.getAnimations().map((animation) => animation.finished.catch(() => {})));+ await new Promise((resolve) => requestAnimationFrame(() => requestAnimationFrame(resolve)));+ });+}++async function paint(locator) {+ return locator.evaluate((element) => {+ const style = getComputedStyle(element);+ const rect = element.getBoundingClientRect();+ return {+ background: style.backgroundColor, color: style.color,+ backgroundImage: style.backgroundImage, appearance: style.appearance,+ height: rect.height, width: rect.width, paddingRight: style.paddingRight,+ };+ });+}++(async () => {+ assert.equal(require('playwright/package.json').version, '1.56.1');+ for (const [file, hash] of Object.entries(expectedContent)) assert.equal(digest(file), hash, file);+ const root = path.resolve('frontend-modern');+ const artifacts = path.join(root, 'node_modules', 'combined-controls-proof');+ fs.mkdirSync(artifacts, { recursive: true });+ const binding = Object.fromEntries([+ 'frontend-modern/package.json', 'frontend-modern/package-lock.json',+ 'tests/integration/package-lock.json',+ 'frontend-modern/browser-tests/combined-controls.tsx',+ 'frontend-modern/browser-tests/combined-controls.html',+ 'frontend-modern/browser-tests/combined-controls.cjs',+ ].map((file) => [file, digest(file)]));+ const integration = JSON.parse(fs.readFileSync('tests/integration/package-lock.json', 'utf8'));+ assert.equal(integration.packages['node_modules/@playwright/test'].version, '1.56.1');+ process.chdir(root);+ const { createServer } = await import(path.join(root, 'node_modules/vite/dist/node/index.js'));+ const server = await createServer({+ root, configFile: path.join(root, 'vite.config.ts'),+ cacheDir: path.join(root, 'node_modules', '.vite-combined-controls'),+ server: { host: '127.0.0.1', port: 5266, strictPort: true },+ optimizeDeps: { noDiscovery: true, include: [] },+ });+ const screenshots = [];+ const results = [];+ let browser;+ let failure;+ const cleanup = { browserClosed: false, serverClosed: false };+ const capture = async (page, name, locator) => {+ await locator.scrollIntoViewIfNeeded();+ await settle(page);+ const file = `${name}.png`;+ await locator.screenshot({ path: path.join(artifacts, file) });+ screenshots.push({ file, sha256: digest(path.join(artifacts, file)) });+ };+ try {+ await server.listen();+ for (const [engine, width] of [['chromium', 1440], ['webkit', 390]]) {+ browser = await { chromium, webkit }[engine].launch(engine === 'chromium'+ ? { headless: true, channel: 'chromium', args: ['--no-sandbox'] }+ : { headless: true });+ for (const tone of ['light', 'dark']) {+ const context = await browser.newContext({+ viewport: { width, height: 1100 },+ colorScheme: tone,+ ...(engine === 'webkit' ? { isMobile: true, hasTouch: true } : {}),+ });+ const page = await context.newPage();+ const errors = [];+ const unexpectedRequests = [];+ const statusReads = [];+ let state = 'healthy';+ let slowStatus = false;+ page.on('pageerror', (error) => errors.push(error.message));+ page.on('console', (message) => { if (message.type() === 'error') errors.push(message.text()); });+ await context.route('**/*', async (route) => {+ const request = route.request();+ const url = new URL(request.url());+ if (url.origin !== 'http://127.0.0.1:5266' || request.method() !== 'GET') {+ unexpectedRequests.push({ origin: url.origin, method: request.method() });+ await route.abort();+ } else if (url.pathname === '/api/alerts/deadman/status') {+ statusReads.push(state);+ if (slowStatus) await delay(500);+ await route.fulfill({ contentType: 'application/json', body: JSON.stringify({+ configured: state !== 'disabled', state, heartbeatIntervalSeconds: 60,+ recommendedGraceSeconds: 180, consecutiveFailures: state === 'delivery_failed' ? 2 : 0,+ lastSuccessAt: new Date().toISOString(),+ lastMonitoringProgress: new Date().toISOString(),+ ...(state === 'delivery_failed' ? { lastError: 'Offline fixture: watchdog rejected the ping.' } : {}),+ }) });+ } else if (url.pathname.startsWith('/api/')) {+ unexpectedRequests.push({ pathname: url.pathname, method: request.method() });+ await route.abort();+ } else await route.continue();+ });+ await page.goto('http://127.0.0.1:5266/browser-tests/combined-controls.html', {+ waitUntil: 'networkidle', timeout: 60_000,+ });+ await page.evaluate((dark) => document.documentElement.classList.toggle('dark', dark), tone === 'dark');+ await page.getByText('Heartbeat healthy', { exact: true }).waitFor();+ const prefix = `${engine}-${width}-${tone}`;+ const select = page.getByRole('combobox', { name: 'CPU averaging', exact: true });+ const compact = page.getByRole('combobox', { name: 'Platform override', exact: true });+ const initial = { select: await paint(select), compact: await paint(compact) };+ for (const control of Object.values(initial)) {+ assert.ok(control.backgroundImage.includes('linear-gradient'), `${prefix}: caret`);+ assert.equal(control.appearance, 'none');+ assert.ok(parseFloat(control.paddingRight) >= 32);+ assert.ok(control.height >= (width < 640 ? 44 : 32));+ }+ assert.equal(await select.inputValue(), '5m');+ assert.equal(await compact.inputValue(), 'inherit');+ await select.focus();+ assert.ok(await select.evaluate((element) => document.activeElement === element));+ await select.selectOption('15m');+ await compact.selectOption('5m');+ const filters = page.getByRole('group', { name: 'Resource status', exact: true });+ const active = filters.getByRole('button', { name: 'Active resources', exact: true });+ await active.focus();+ await page.keyboard.press('Enter');+ assert.equal(await active.getAttribute('aria-pressed'), 'true');+ assert.equal(await page.getByLabel('Selected controls').innerText(), '15m / 5m / active');+ // Compare the settled selection, not an intermediate transition frame.+ await settle(page);+ const well = await paint(filters);+ const selected = await paint(active);+ const command = await paint(page.locator('[data-testid="controls-card"] code'));+ const card = await paint(page.locator('[data-testid="controls-card"]'));+ const muted = await paint(page.locator('[data-testid="muted-card"]'));+ const pageBackground = await page.evaluate(() => getComputedStyle(document.body).backgroundColor);+ assert.equal(well.background, pageBackground);+ assert.equal(command.background, pageBackground);+ assert.equal(selected.background, card.background);+ assert.notEqual(well.background, card.background);+ // The existing dark theme deliberately shares surface/alternate tokens.+ // Require the painted alternate surface, not a new theme distinction.+ assert.equal(muted.background, tone === 'dark' ? card.background : pageBackground);+ await capture(page, `${prefix}-controls`, page.locator('[data-testid="controls-card"]'));++ const watchdog = page.locator('[data-settings-panel]').filter({ has: page.getByRole('heading', { name: 'External watchdog', exact: true }) });+ const show = watchdog.getByRole('button', { name: 'Show', exact: true });+ const refresh = watchdog.getByRole('button', { name: 'Refresh', exact: true });+ const buttonDimensions = { show: await paint(show), refresh: await paint(refresh) };+ if (width < 640) for (const button of Object.values(buttonDimensions)) assert.ok(button.height >= 44);+ const urlInput = watchdog.getByLabel('Healthchecks-compatible success ping URL');+ assert.equal(await urlInput.getAttribute('type'), 'password');+ await show.focus();+ await page.keyboard.press('Enter');+ const hide = watchdog.getByRole('button', { name: 'Hide', exact: true });+ assert.equal(await hide.getAttribute('aria-pressed'), 'true');+ assert.equal(await urlInput.getAttribute('type'), 'text');+ assert.equal(await urlInput.inputValue(), 'https://watchdog.invalid/offline-fixture');+ await hide.click();+ assert.equal(await urlInput.getAttribute('type'), 'password');+ assert.equal(await page.getByLabel('Unsaved watchdog change').innerText(), 'false');+ state = 'delivery_failed';+ slowStatus = true;+ await refresh.focus();+ await page.keyboard.press('Enter');+ await watchdog.getByRole('button', { name: 'Refreshing…', exact: true }).waitFor();+ assert.equal(await watchdog.getByRole('button', { name: 'Refreshing…', exact: true }).isDisabled(), true);+ await page.getByText('Delivery failing', { exact: true }).waitFor();+ slowStatus = false;+ assert.equal(await refresh.isDisabled(), false);+ const statusWell = watchdog.locator('.bg-page');+ assert.equal((await paint(statusWell)).background, pageBackground);+ await capture(page, `${prefix}-watchdog`, watchdog);+ state = 'disabled';+ await refresh.click();+ await page.getByText('Not configured', { exact: true }).waitFor();+ assert.equal((await paint(watchdog.getByText('Not configured', { exact: true }))).background, card.background);++ const dialogs = [];+ for (const [opener, title] of [['Create backup', 'Export configuration'], ['Restore backup', 'Import configuration']]) {+ await page.getByRole('button', { name: opener, exact: true }).click();+ const dialog = page.getByRole('dialog', { name: title, exact: true });+ await dialog.waitFor();+ const link = dialog.getByRole('link', { name: 'migration guide', exact: true });+ assert.equal(await link.getAttribute('href'), '/docs/MIGRATION');+ assert.equal(await link.getAttribute('target'), '_blank');+ const rel = (await link.getAttribute('rel')).split(/\s+/);+ assert.ok(rel.includes('noopener') && rel.includes('noreferrer'));+ const linkPaint = await link.evaluate((element) => {+ const style = getComputedStyle(element);+ return {+ color: style.color, parentColor: getComputedStyle(element.parentElement).color,+ decoration: style.textDecorationLine, display: style.display,+ text: element.parentElement.textContent.replace(/\s+/g, ' '),+ };+ });+ assert.equal(linkPaint.color, linkPaint.parentColor);+ assert.equal(linkPaint.display, 'inline');+ assert.ok(linkPaint.decoration.includes('underline'));+ assert.ok(linkPaint.text.includes(title.startsWith('Export') ? 'Configuration only:' : 'Back up the destination first.'));+ await link.focus();+ assert.ok(await link.evaluate((element) => document.activeElement === element));+ if (title.startsWith('Export')) assert.equal((await paint(dialog.locator('.bg-page'))).background, pageBackground);+ assert.equal(await dialog.getByRole('button', { name: title.startsWith('Export') ? 'Export' : 'Import', exact: true }).isDisabled(), true);+ await capture(page, `${prefix}-${title.startsWith('Export') ? 'export' : 'import'}`, dialog);+ dialogs.push({ title, ...linkPaint, destination: '/docs/MIGRATION', safeNewTab: true, keyboardFocus: true });+ await page.keyboard.press('Escape');+ await dialog.waitFor({ state: 'hidden' });+ }+ await page.getByRole('button', { name: 'Use stored watchdog URL', exact: true }).click();+ assert.equal(await urlInput.inputValue(), '');+ assert.equal(await urlInput.getAttribute('placeholder'), 'Configured — enter a new URL to replace');+ assert.equal(await watchdog.getByRole('button', { name: 'Show', exact: true }).count(), 0);+ await watchdog.getByRole('button', { name: 'Remove', exact: true }).click();+ assert.equal(await page.getByLabel('Unsaved watchdog change').innerText(), 'true');+ assert.equal(await page.getByLabel('Unexpected mutations').innerText(), '0');+ assert.ok(await page.evaluate(() => document.documentElement.scrollWidth <= innerWidth + 1));+ let forcedColors;+ if (engine === 'chromium') {+ await page.emulateMedia({ forcedColors: 'active' });+ forcedColors = await paint(select);+ assert.equal(forcedColors.appearance, 'auto');+ assert.equal(forcedColors.backgroundImage, 'none');+ await page.emulateMedia({ forcedColors: 'none' });+ }+ assert.deepEqual(errors, []);+ assert.deepEqual(unexpectedRequests, []);+ assert.deepEqual(statusReads, ['healthy', 'delivery_failed', 'disabled']);+ results.push({ engine, browserVersion: browser.version(), width, height: 1100, tone,+ initial, backgrounds: { pageBackground, well, selected, command, card, muted },+ buttonDimensions, statusReads, dialogs, forcedColors, keyboardSelection: true,+ showHideNoSave: true, refreshLoadingDisabled: true, redactedValueRemainsHidden: true,+ noBodyOverflow: true, errors, unexpectedRequests, unexpectedMutations: 0 });+ await context.close();+ }+ await browser.close();+ browser = undefined;+ }+ } catch (error) { failure = error; }+ finally {+ if (browser) await browser.close();+ cleanup.browserClosed = true;+ await server.close();+ cleanup.serverClosed = true;+ const report = {+ result: failure ? 'failed' : 'passed', verifiedParent, content_sha256: expectedContent, binding,+ playwrightVersion: require('playwright/package.json').version,+ verifiedAt: new Date().toISOString(), results, screenshots, cleanup,+ scope: 'Production components/CSS in an offline fixture; no actual watchdog, backup, migration, installation or physical-phone acceptance. Guide-link destination/attributes/focus, not destination contents.',+ ...(failure ? { failure: failure.message } : {}),+ };+ fs.writeFileSync(path.join(artifacts, 'result.json'), JSON.stringify(report, null, 2) + '\n');+ console.log(JSON.stringify(report));+ }+ if (failure) throw failure;+})().catch((error) => { console.error(error); process.exitCode = 1; });diff --git a/frontend-modern/browser-tests/combined-controls.html b/frontend-modern/browser-tests/combined-controls.htmlnew file mode 100644index 0000000000..d127c72edf--- /dev/null+++ b/frontend-modern/browser-tests/combined-controls.html@@ -0,0 +1,12 @@+<!doctype html>+<html lang="en">+ <head>+ <meta charset="UTF-8" />+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />+ <title>Combined shared controls verification</title>+ </head>+ <body>+ <div id="root"></div>+ <script type="module" src="./combined-controls.tsx"></script>+ </body>+</html>diff --git a/frontend-modern/browser-tests/combined-controls.tsx b/frontend-modern/browser-tests/combined-controls.tsxnew file mode 100644index 0000000000..446aeabf9c--- /dev/null+++ b/frontend-modern/browser-tests/combined-controls.tsx@@ -0,0 +1,109 @@+// Production components and stylesheet, with synthetic local state only.+// The browser runner supplies watchdog status. No export, import, ping or save runs.+import { createSignal } from 'solid-js';+import { render } from 'solid-js/web';+import { BackupTransferDialogs } from '../src/components/Settings/BackupTransferDialogs';+import { CopyCommandBlock } from '../src/components/Settings/CopyCommandBlock';+import { Button } from '../src/components/shared/Button';+import { Card } from '../src/components/shared/Card';+import { FilterButtonGroup } from '../src/components/shared/FilterButtonGroup';+import { FormSelect } from '../src/components/shared/FormSelect';+import { AlertDeadManDestinationSection } from '../src/features/alerts/AlertDeadManDestinationSection';+import '../src/index.css';++function Fixture() {+ const [selected, setSelected] = createSignal('all');+ const [averaging, setAveraging] = createSignal('5m');+ const [compact, setCompact] = createSignal('inherit');+ const [showExport, setShowExport] = createSignal(false);+ const [showImport, setShowImport] = createSignal(false);+ const [custom, setCustom] = createSignal(false);+ const [exportPassphrase, setExportPassphrase] = createSignal('');+ const [importPassphrase, setImportPassphrase] = createSignal('');+ const [file, setFile] = createSignal<File | null>(null);+ const [pingUrl, setPingUrl] = createSignal('https://watchdog.invalid/offline-fixture');+ const [unsaved, setUnsaved] = createSignal(false);+ const [operations, setOperations] = createSignal(0);+ const unexpectedMutation = () => setOperations((count) => count + 1);++ return (+ <main class="mx-auto max-w-4xl space-y-4 p-3 text-base-content sm:p-6">+ <h1 class="text-lg font-semibold">Combined shared controls</h1>+ <p class="text-sm text-muted">Offline presentation check; no installation or notification.</p>+ <Card data-testid="controls-card" class="space-y-4">+ <FormSelect+ label="CPU averaging"+ value={averaging()}+ onChange={(event) => setAveraging(event.currentTarget.value)}+ help="Synthetic value using the production default control."+ >+ <option value="instant">Instantaneous</option>+ <option value="5m">5-minute average</option>+ <option value="15m">15-minute average</option>+ </FormSelect>+ <FormSelect+ label="Platform override"+ density="compact"+ value={compact()}+ onChange={(event) => setCompact(event.currentTarget.value)}+ >+ <option value="inherit">Inherit</option>+ <option value="5m">5-minute average</option>+ </FormSelect>+ <FilterButtonGroup+ variant="segmented"+ ariaLabel="Resource status"+ options={[+ { value: 'all', label: 'All resources' },+ { value: 'active', label: 'Active resources' },+ ]}+ value={selected()}+ onChange={setSelected}+ />+ <CopyCommandBlock command="pulse-agent --version" />+ <output aria-label="Selected controls">+ {averaging()} / {compact()} / {selected()}+ </output>+ </Card>+ <Card tone="muted" data-testid="muted-card">+ <p class="text-sm">Muted card background</p>+ </Card>+ <AlertDeadManDestinationSection+ pingUrl={pingUrl}+ setPingUrl={setPingUrl}+ setHasUnsavedChanges={setUnsaved}+ />+ <div class="flex flex-wrap gap-3">+ <Button onClick={() => setShowExport(true)}>Create backup</Button>+ <Button onClick={() => setShowImport(true)}>Restore backup</Button>+ <Button onClick={() => setPingUrl('***REDACTED***')}>Use stored watchdog URL</Button>+ </div>+ <output aria-label="Unexpected mutations">{operations()}</output>+ <output aria-label="Unsaved watchdog change">{String(unsaved())}</output>+ <BackupTransferDialogs+ securityStatus={() => ({ hasAuthentication: true, requiresAuth: true })}+ exportPassphrase={exportPassphrase}+ setExportPassphrase={setExportPassphrase}+ useCustomPassphrase={custom}+ setUseCustomPassphrase={setCustom}+ importPassphrase={importPassphrase}+ setImportPassphrase={setImportPassphrase}+ importFile={file}+ setImportFile={setFile}+ showExportDialog={showExport}+ showImportDialog={showImport}+ showApiTokenModal={() => false}+ apiTokenInput={() => ''}+ setApiTokenInput={unexpectedMutation}+ handleExport={unexpectedMutation}+ handleImport={unexpectedMutation}+ closeExportDialog={() => setShowExport(false)}+ closeImportDialog={() => setShowImport(false)}+ closeApiTokenModal={unexpectedMutation}+ handleApiTokenAuthenticate={unexpectedMutation}+ />+ </main>+ );+}++render(() => <Fixture />, document.getElementById('root')!);diff --git a/frontend-modern/browser-verification/f5bdb4a34c48923a.json b/frontend-modern/browser-verification/f5bdb4a34c48923a.jsonnew file mode 100644index 0000000000..f6d2622831--- /dev/null+++ b/frontend-modern/browser-verification/f5bdb4a34c48923a.json@@ -0,0 +1,51 @@+{+ "version": 1,+ "base_sha": "737b6c27e17cdd8234030c357e0866b6dfb6c730",+ "verified_at": "2026-10-06T00:41:27.254Z",+ "result": "passed",+ "changed_paths": [+ "frontend-modern/src/components/Settings/BackupTransferDialogs.tsx",+ "frontend-modern/src/features/alerts/AlertDeadManDestinationSection.tsx",+ "frontend-modern/src/index.css"+ ],+ "content_sha256": {+ "frontend-modern/src/components/Settings/BackupTransferDialogs.tsx": "23c58ab753541d158d20fa1dd4e2bbeafb5a5374d456898931f52b31494b57e6",+ "frontend-modern/src/features/alerts/AlertDeadManDestinationSection.tsx": "9dce4c868a2c2e3898e582ab58e072c7ff48968e95f9aeabee17ada9129f1659",+ "frontend-modern/src/index.css": "5cbd2ebb37fb3b50926200da17e391fb3bc8a8e2a987b151c2c80f48b38526df"+ },+ "routes": [+ "/browser-tests/combined-controls.html"+ ],+ "viewports": [+ {+ "width": 1440,+ "height": 1100+ },+ {+ "width": 390,+ "height": 1100+ }+ ],+ "states": [+ "Production FormSelect default/compact, FilterButtonGroup segmented and CopyCommandBlock with the merged stylesheet; light/dark desktop Chromium and phone-emulated WebKit. Carets visible, wells match the page backdrop, selected segments match the surface; values/labels retained. Forced-colors Chromium uses the native select appearance and no background image.",+ "Production BackupTransferDialogs export/import: inherited warning colours, inline underlined /docs/MIGRATION links, safe new-tab attributes and keyboard focus. Export authentication-choice well has its page background; disabled actions and Escape dismissal remain. No export/import/guide destination page is executed.",+ "Production AlertDeadManDestinationSection: synthetic healthy, delivery_failed and disabled states; page-background status well and surface disabled pill. Show/Hide keeps URL masked when hidden; stored URL is not exposed. Refresh loading disables the shared button. Phone Show/Refresh controls are at least 44px high.",+ "All 16 animation-settled final captures inspected; no horizontal body overflow, page errors, off-origin/mutating requests or export/import operations. Muted Card paints the existing alternate surface; dark surface and alternate tokens intentionally share the same colour."+ ],+ "interactions": [+ "Changed both select values and keyboard-activated a segmented option, retaining reactive values and aria-pressed.",+ "Keyboard-activated Show/Hide and Refresh; read-only intercepted GET status transitions, loading disabled control, stored URL presentation and local Remove state (no save/ping).",+ "Opened both backup dialogs, focused the migration warning links, checked exact destinations/noopener/noreferrer, and dismissed with Escape."+ ],+ "evidence": {+ "script": "frontend-modern/browser-tests/combined-controls.cjs",+ "fixture": "frontend-modern/browser-tests/combined-controls.tsx",+ "playwright_version": "1.56.1",+ "browsers": [+ "chromium 141.0.7390.37",+ "webkit 26.0"+ ],+ "capture_count": 16,+ "scope": "Production components/CSS in an offline fixture; no actual watchdog, backup, migration, installation or physical-phone acceptance. Guide-link destination/attributes/focus, not destination contents."+ }+}