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
Remove unreferenced one-off browser proof harnesses
rcourtman6a45411bd15d
diff --git a/frontend-modern/browser-tests/action-receipt-wait.cjs b/frontend-modern/browser-tests/action-receipt-wait.cjsdeleted file mode 100644index c0ec48ae07..0000000000--- a/frontend-modern/browser-tests/action-receipt-wait.cjs+++ /dev/null@@ -1,142 +0,0 @@-// Browser proof for the production action dialog's non-mutating receipt re-read.-const assert = require('node:assert/strict');-const fs = require('node:fs');-const path = require('node:path');-const { chromium } = require('playwright');--(async () => {- const root = '/workspace/frontend-modern';- const artifacts = path.join(root, 'browser-tests', 'action-receipt-proof');- fs.mkdirSync(artifacts, { recursive: true });- 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'),- server: { host: '127.0.0.1', port: 5202, strictPort: true },- });- let browser;- try {- await server.listen();- browser = await chromium.launch({ headless: true, channel: 'chromium', args: ['--no-sandbox'] });- const results = [];- for (const width of [1365, 390]) {- let mode = 'pending';- const page = await browser.newPage({ viewport: { width, height: width === 390 ? 844 : 900 } });- const pageErrors = [];- const actionRequests = [];- page.on('pageerror', (error) => pageErrors.push(error.message));- await page.route('**/*', (route) => {- const url = new URL(route.request().url());- if (url.origin !== 'http://127.0.0.1:5202') return route.abort();- if (url.pathname === '/api/security/status') {- return route.fulfill({ json: {- hasAuthentication: true,- requiresAuth: true,- settingsCapabilities: { authenticationWrite: true },- } });- }- if (url.pathname === '/api/actions/action-fixture-1') {- actionRequests.push({ method: route.request().method(), mode });- if (mode === 'error') return route.fulfill({ status: 503, json: { error: 'fixture read failed' } });- if (mode === 'complete') {- return route.fulfill({ json: {- audit: {- id: 'action-fixture-1',- createdAt: new Date().toISOString(),- updatedAt: new Date().toISOString(),- state: 'completed',- decisionRevision: 1,- request: {- requestId: 'request-fixture-1', resourceId: 'docker:container:edge',- capabilityName: 'update', reason: 'Update edge to its latest image.', requestedBy: 'operator',- },- plan: {- actionId: 'action-fixture-1', requestId: 'request-fixture-1', allowed: true,- requiresApproval: false, rollbackAvailable: false,- expiresAt: new Date(Date.now() + 30 * 60_000).toISOString(),- planHash: 'sha256:fixture-plan', policyDecision: { status: 'resolved', authorities: [] },- },- result: {- success: true,- actionResultV2: {- execution: { status: 'succeeded' },- verification: { status: 'verified', evidenceClass: 'agent' },- compensation: { status: 'not_attempted', support: 'unavailable' },- },- },- },- events: [],- attempt: { id: 'attempt-fixture-1', actionId: 'action-fixture-1', state: 'receipt_recorded',- createdAt: new Date().toISOString(), updatedAt: new Date().toISOString(), dispatchCount: 1 },- receipt: { receivedAt: new Date().toISOString() },- } });- }- return route.fulfill({ json: {- audit: {- id: 'action-fixture-1', createdAt: new Date().toISOString(), updatedAt: new Date().toISOString(),- state: 'executing', decisionRevision: 1,- request: { requestId: 'request-fixture-1', resourceId: 'docker:container:edge',- capabilityName: 'update', reason: 'Update edge to its latest image.', requestedBy: 'operator' },- plan: { actionId: 'action-fixture-1', requestId: 'request-fixture-1', allowed: true,- requiresApproval: false, rollbackAvailable: false, expiresAt: new Date(Date.now() + 30 * 60_000).toISOString(),- planHash: 'sha256:fixture-plan', policyDecision: { status: 'resolved', authorities: [] } },- },- events: [],- attempt: { id: 'attempt-fixture-1', actionId: 'action-fixture-1', state: 'receipt_pending',- createdAt: new Date(Date.now() - 5 * 60_000).toISOString(),- updatedAt: new Date(Date.now() - 5 * 60_000).toISOString(), dispatchCount: 1 },- } });- }- if (url.pathname.startsWith('/api/')) return route.abort();- return route.continue();- });- await page.goto('http://127.0.0.1:5202/browser-tests/action-receipt-wait.html', {- waitUntil: 'domcontentloaded', timeout: 120_000,- });- const dialog = page.getByRole('dialog', { name: 'Update' });- await dialog.waitFor();- await page.getByText('Receipt pending', { exact: true }).waitFor();- assert.match(await page.getByTestId('action-receipt-waiting').innerText(), /Do not start the action again/);- assert.equal(await page.getByTestId('action-stuck-recovery').count(), 0);- await page.waitForTimeout(400); // Let the dialog entrance transition finish before capture.- await page.screenshot({ path: path.join(artifacts, `pending-${width}.png`) });-- const refresh = page.getByRole('button', { name: 'Check for receipt' });- if (width === 390) {- await refresh.focus();- await page.keyboard.press('Enter');- } else {- await refresh.click();- }- await page.waitForFunction(() => document.querySelector('[data-testid="action-receipt-waiting"]') !== null);- assert.equal(actionRequests.length, 1);- mode = 'error';- await refresh.click();- await page.getByRole('alert').filter({ hasText: 'No new action was sent' }).waitFor();- await page.waitForTimeout(400);- await page.screenshot({ path: path.join(artifacts, `read-error-${width}.png`) });-- mode = 'complete';- await refresh.click();- await page.getByText('Completed', { exact: true }).waitFor();- assert.equal(await page.getByTestId('action-receipt-waiting').count(), 0);- await page.waitForTimeout(400);- await page.screenshot({ path: path.join(artifacts, `completed-${width}.png`) });- assert.equal(actionRequests.length, 3);- assert.ok(actionRequests.every((request) => request.method === 'GET'), JSON.stringify(actionRequests));- assert.deepEqual(pageErrors, []);- const dimensions = await page.evaluate(() => ({ scroll: document.documentElement.scrollWidth, inner: innerWidth }));- assert.ok(dimensions.scroll <= dimensions.inner + 1, JSON.stringify(dimensions));- results.push({ width, actionRequests, pageErrors, dimensions });- await page.close();- }- console.log(JSON.stringify({ result: 'passed', browser: browser.version(), playwright: '1.56.1', results }));- } finally {- if (browser) await browser.close();- await server.close();- }-})().catch((error) => {- console.error(error);- process.exitCode = 1;-});diff --git a/frontend-modern/browser-tests/action-receipt-wait.html b/frontend-modern/browser-tests/action-receipt-wait.htmldeleted file mode 100644index 87ed8c4775..0000000000--- a/frontend-modern/browser-tests/action-receipt-wait.html+++ /dev/null@@ -1,11 +0,0 @@-<!doctype html>-<html lang="en">- <head>- <meta charset="UTF-8" />- <meta name="viewport" content="width=device-width, initial-scale=1" />- </head>- <body>- <div id="root"></div>- <script type="module" src="/browser-tests/action-receipt-wait.tsx"></script>- </body>-</html>diff --git a/frontend-modern/browser-tests/action-receipt-wait.tsx b/frontend-modern/browser-tests/action-receipt-wait.tsxdeleted file mode 100644index f5bf6d820b..0000000000--- a/frontend-modern/browser-tests/action-receipt-wait.tsx+++ /dev/null@@ -1,73 +0,0 @@-// Mount the production action dialog with a synthetic, recent receipt wait.-// The browser runner supplies only bounded read-only API responses.-import { createSignal } from 'solid-js';-import { render } from 'solid-js/web';-import { ActionReviewDialog } from '../src/features/actions/ActionReviewDialog';-import type { ActionDetailResponse } from '../src/types/actionAudit';-import '../src/index.css';--const now = Date.now();-const initial: ActionDetailResponse = {- audit: {- id: 'action-fixture-1',- createdAt: new Date(now - 6 * 60_000).toISOString(),- updatedAt: new Date(now - 5 * 60_000).toISOString(),- state: 'executing',- decisionRevision: 1,- request: {- requestId: 'request-fixture-1',- resourceId: 'docker:container:edge',- capabilityName: 'update',- reason: 'Update edge to its latest image.',- requestedBy: 'operator',- },- plan: {- actionId: 'action-fixture-1',- requestId: 'request-fixture-1',- allowed: true,- requiresApproval: false,- approvalPolicy: 'none',- approvalRequirement: {- version: 1,- floor: 'none',- quorum: 0,- disallowRequester: false,- },- rollbackAvailable: false,- expiresAt: new Date(now + 30 * 60_000).toISOString(),- planHash: 'sha256:fixture-plan',- policyDecision: {- version: 1,- status: 'resolved',- decisionId: 'fixture-policy',- actionId: 'action-fixture-1',- scope: { orgId: 'org-fixture', resourceId: 'docker:container:edge', capabilityName: 'update' },- authorities: [],- approvalRequirement: {- version: 1,- floor: 'none',- quorum: 0,- disallowRequester: false,- },- planningAllowed: true,- requiresApproval: false,- },- },- verificationOutcome: { status: 'unknown' },- },- events: [],- attempt: {- id: 'attempt-fixture-1',- actionId: 'action-fixture-1',- state: 'receipt_pending',- createdAt: new Date(now - 5 * 60_000).toISOString(),- updatedAt: new Date(now - 5 * 60_000).toISOString(),- dispatchCount: 1,- },-};--const [selected, setSelected] = createSignal(initial);-render(- () => <ActionReviewDialog detail={selected()} onClose={() => {}} onChanged={setSelected} />,- document.getElementById('root')!,-);diff --git a/frontend-modern/browser-tests/action-review-navigation.cjs b/frontend-modern/browser-tests/action-review-navigation.cjsdeleted file mode 100644index 7e78e4dcbc..0000000000--- a/frontend-modern/browser-tests/action-review-navigation.cjs+++ /dev/null@@ -1,182 +0,0 @@-// Prove that late action reads cannot change the route-backed review or reopen it.-const assert = require('node:assert/strict');-const fs = require('node:fs');-const path = require('node:path');-const { chromium } = require('playwright');--const action = (id) => ({- id,- createdAt: '2026-09-29T18:00:00Z',- updatedAt: '2026-09-29T18:01:00Z',- state: 'executing',- decisionRevision: 1,- request: {- requestId: `request-${id}`,- resourceId: `docker:container:${id}`,- capabilityName: 'update',- reason: `Update ${id}`,- requestedBy: 'operator',- },- plan: {- actionId: id,- requestId: `request-${id}`,- allowed: true,- requiresApproval: false,- approvalPolicy: 'none',- rollbackAvailable: false,- expiresAt: '2026-09-29T21:00:00Z',- planHash: `sha256:plan-${id}`,- },- verificationOutcome: { status: 'unknown' },-});-const detail = (id) => ({- audit: action(id),- events: [],- readiness: {- ready: false,- code: 'receipt_pending',- message: 'Awaiting receipt',- refreshable: false,- checkedAt: '2026-09-29T18:01:00Z',- },- attempt: {- id: `attempt-${id}`,- actionId: id,- state: 'receipt_pending',- createdAt: '2026-09-29T18:00:00Z',- updatedAt: '2026-09-29T18:01:00Z',- dispatchCount: 1,- },-});--(async () => {- const root = '/workspace/frontend-modern';- const artifacts = path.join(root, 'node_modules', 'action-review-navigation-proof');- fs.mkdirSync(artifacts, { recursive: true });- 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'),- server: { host: '127.0.0.1', port: 5204, strictPort: true },- });- let browser;- try {- await server.listen();- browser = await chromium.launch({- headless: true,- channel: 'chromium',- args: ['--no-sandbox'],- });- const results = [];- for (const width of [1365, 390]) {- let releaseA;- let releaseReceipt;- let bReads = 0;- const requests = [];- const errors = [];- const page = await browser.newPage({- viewport: { width, height: width === 390 ? 844 : 900 },- });- page.on('pageerror', (error) => errors.push(error.message));- await page.route('**/*', async (route) => {- const request = route.request();- const url = new URL(request.url());- if (url.origin !== 'http://127.0.0.1:5204') return route.abort();- if (url.pathname.startsWith('/api/')) requests.push(`${request.method()} ${url.pathname}`);- if (url.pathname === '/api/actions') {- const view = url.searchParams.get('view');- return route.fulfill({- json: {- view,- actions: view === 'pending' ? [action('edge-a'), action('edge-b')] : [],- count: view === 'pending' ? 2 : 0,- readOnly: false,- },- });- }- if (url.pathname === '/api/actions/edge-a') {- await new Promise((resolve) => {- releaseA = resolve;- });- return route.fulfill({ json: detail('edge-a') });- }- if (url.pathname === '/api/actions/edge-b') {- bReads += 1;- if (bReads === 2)- await new Promise((resolve) => {- releaseReceipt = resolve;- });- return route.fulfill({ json: detail('edge-b') });- }- if (url.pathname === '/api/security/status')- return route.fulfill({- json: {- hasAuthentication: true,- requiresAuth: true,- settingsCapabilities: { authenticationWrite: false },- },- });- if (url.pathname.startsWith('/api/'))- return route.fulfill({ status: 503, json: { error: 'fixture unavailable' } });- return route.continue();- });- await page.goto('http://127.0.0.1:5204/browser-tests/action-review-navigation.html', {- waitUntil: 'domcontentloaded',- timeout: 120_000,- });- await page.getByRole('button', { name: /Review Update on docker:container:edge-a/ }).click();- await page.waitForFunction(() => location.search === '?action=edge-a');- await page.getByRole('button', { name: /Review Update on docker:container:edge-b/ }).click();- await page.getByRole('dialog').getByText('docker:container:edge-b').first().waitFor();- releaseA();- await page.waitForTimeout(300);- assert.match(await page.getByRole('dialog').innerText(), /docker:container:edge-b/);- assert.doesNotMatch(await page.getByRole('dialog').innerText(), /docker:container:edge-a/);- assert.equal(new URL(page.url()).search, '?action=edge-b');- await page.screenshot({ path: path.join(artifacts, `newest-review-${width}.png`) });-- const receiptRead = page.waitForRequest(- (request) =>- new URL(request.url()).pathname === '/api/actions/edge-b' && request.method() === 'GET',- );- await page.getByRole('button', { name: 'Check for receipt' }).click();- await receiptRead;- await page.waitForTimeout(50);- // The pending route is observable through the second GET, not a mutation.- assert.equal(bReads, 2);- await page.getByRole('button', { name: 'Close action review' }).click();- await page.waitForFunction(() => location.search === '');- releaseReceipt();- await page.waitForTimeout(300);- assert.equal(await page.getByRole('dialog').count(), 0);- assert.equal(new URL(page.url()).search, '');- assert.ok(- requests.every((item) => item.startsWith('GET ')),- JSON.stringify(requests),- );- assert.deepEqual(errors, []);- const dimensions = await page.evaluate(() => ({- scroll: document.documentElement.scrollWidth,- inner: innerWidth,- }));- assert.ok(dimensions.scroll <= dimensions.inner + 1, JSON.stringify(dimensions));- results.push({ width, requests, errors, dimensions });- await page.close();- }- console.log(- JSON.stringify({- result: 'passed',- browser: browser.version(),- playwright: '1.56.1',- results,- }),- );- } finally {- if (browser) await browser.close();- await server.close();- }-})().catch((error) => {- console.error(error);- process.exitCode = 1;-});diff --git a/frontend-modern/browser-tests/action-review-navigation.html b/frontend-modern/browser-tests/action-review-navigation.htmldeleted file mode 100644index ecd84c6757..0000000000--- a/frontend-modern/browser-tests/action-review-navigation.html+++ /dev/null@@ -1,11 +0,0 @@-<!doctype html>-<html lang="en">- <head>- <meta charset="UTF-8" />- <meta name="viewport" content="width=device-width, initial-scale=1" />- </head>- <body>- <div id="root"></div>- <script type="module" src="/browser-tests/action-review-navigation.tsx"></script>- </body>-</html>diff --git a/frontend-modern/browser-tests/action-review-navigation.tsx b/frontend-modern/browser-tests/action-review-navigation.tsxdeleted file mode 100644index 40a4d6a600..0000000000--- a/frontend-modern/browser-tests/action-review-navigation.tsx+++ /dev/null@@ -1,14 +0,0 @@-// Exercise the production Actions page with scripted, read-only action responses.-import { Route, Router } from '@solidjs/router';-import { render } from 'solid-js/web';-import Actions from '../src/pages/Actions';-import '../src/index.css';--render(- () => (- <Router>- <Route path="*" component={Actions} />- </Router>- ),- document.getElementById('root')!,-);diff --git a/frontend-modern/browser-tests/agent-token-file-guidance.cjs b/frontend-modern/browser-tests/agent-token-file-guidance.cjsdeleted file mode 100644index 28a4ecc94f..0000000000--- a/frontend-modern/browser-tests/agent-token-file-guidance.cjs+++ /dev/null@@ -1,95 +0,0 @@-// Real Docs/router/Markdown/CSS, with no backend or credential access.-const assert = require('node:assert/strict');-const fs = require('node:fs');-const path = require('node:path');-const crypto = require('node:crypto');-const { chromium, webkit } = require('playwright');--(async () => {- const root = '/workspace/frontend-modern';- process.chdir(root);- const artifacts = path.join(root, 'node_modules', 'agent-token-file-guidance-browser');- fs.mkdirSync(artifacts, { recursive: true });- 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-agent-token-file-guidance'),- server: { host: '127.0.0.1', port: 5251, strictPort: true },- optimizeDeps: { noDiscovery: true, include: [] },- });- let browser;- const results = [];- try {- await server.listen();- for (const [engine, width, dark] of [['chromium', 1280, false], ['webkit', 390, true]]) {- browser = await { chromium, webkit }[engine].launch(engine === 'chromium'- ? { headless: true, channel: 'chromium', args: ['--no-sandbox'] }- : { headless: true });- const page = await browser.newPage({ viewport: { width, height: 900 },- ...(engine === 'webkit' ? { isMobile: true, hasTouch: true } : {}) });- const errors = [];- const backendRequests = [];- page.on('pageerror', (error) => errors.push(error.message));- page.on('console', (message) => {- if (message.type() === 'error') errors.push(message.text());- });- await page.route('**/api/**', async (route) => {- backendRequests.push({ method: route.request().method(), pathname: new URL(route.request().url()).pathname });- await route.abort();- });- await page.goto('http://127.0.0.1:5251/browser-tests/docs-fragment-navigation.html', {- waitUntil: 'domcontentloaded', timeout: 60000,- });- await page.evaluate(() => {- history.pushState({}, '', '/docs/UNIFIED_AGENT#private-file-installation-linux-macos-and-nas');- dispatchEvent(new PopStateEvent('popstate'));- });- if (dark) await page.evaluate(() => document.documentElement.classList.add('dark'));- const waitForHeading = async (id) => {- await page.waitForFunction((target) => {- const heading = document.getElementById(target);- const rect = heading?.getBoundingClientRect();- return heading && document.activeElement === heading && rect.top >= 0 && rect.top < innerHeight;- }, id);- };- await waitForHeading('private-file-installation-linux-macos-and-nas');- const link = page.getByRole('link', { name: 'token-file format guidance', exact: true });- await link.focus();- await page.keyboard.press('Enter');- await waitForHeading('token-file-format-is-not-shell-syntax');- assert.ok(page.url().endsWith('/docs/UNIFIED_AGENT#token-file-format-is-not-shell-syntax'));- await page.waitForFunction(() => document.getAnimations().length === 0);- const table = page.getByRole('table').filter({ has: page.getByRole('columnheader', { name: 'File form', exact: true }) });- assert.equal(await table.getByRole('row').count(), 5);- assert.deepEqual(await table.getByRole('columnheader').allTextContents(), ['File form', 'What the agent reads']);- for (const phrase of ['The quotes remain part', 'The prefix remains part', 'format and cause remain unknown']) {- assert.ok((await table.innerText()).includes(phrase), phrase);- }- assert.ok(await page.evaluate(() => document.documentElement.scrollWidth <= innerWidth + 1));- await page.screenshot({ path: path.join(artifacts, `${engine}-file-form.png`) });- const safeguard = page.getByText('Use how the file was saved or an existing private observation.', { exact: false });- await safeguard.scrollIntoViewIfNeeded();- const text = (await safeguard.innerText()).replace(/\s+/g, ' ');- assert.ok(text.includes('not the value, length, hint, screenshot or file'));- assert.ok(text.includes('Do not print, source, upload or edit'));- assert.ok(text.includes('not proof of accepted reporting'));- await page.screenshot({ path: path.join(artifacts, `${engine}-private-evidence.png`) });- assert.deepEqual(backendRequests, []);- assert.deepEqual(errors, []);- results.push({ engine, version: browser.version(), width, dark,- keyboardFormatLink: true, focusedVisibleHeading: true, fourFormsAndHeaders: true,- privateUnknownEvidence: true, noHorizontalPageOverflow: true, backendRequests, errors });- await browser.close();- browser = undefined;- }- const result = { result: 'passed', playwright: require('playwright/package.json').version,- document_sha256: crypto.createHash('sha256').update(fs.readFileSync(path.join(root, 'public/docs/UNIFIED_AGENT.md'))).digest('hex'),- scope: 'shipped help and keyboard navigation; not credential hand-off, authentication or installed reporting', results };- fs.writeFileSync(path.join(artifacts, 'result.json'), JSON.stringify(result, null, 2) + '\n');- console.log(JSON.stringify(result));- } finally {- if (browser) await browser.close();- await server.close();- }-})().catch((error) => { console.error(error); process.exitCode = 1; });diff --git a/frontend-modern/browser-tests/alert-card-footer.html b/frontend-modern/browser-tests/alert-card-footer.htmldeleted file mode 100644index ac1d35ab2c..0000000000--- a/frontend-modern/browser-tests/alert-card-footer.html+++ /dev/null@@ -1,10 +0,0 @@-<!doctype html>-<html>- <head>- <meta charset="UTF-8" />- </head>- <body>- <div id="root"></div>- <script type="module" src="/browser-tests/alert-card-footer.tsx"></script>- </body>-</html>diff --git a/frontend-modern/browser-tests/alert-card-footer.tsx b/frontend-modern/browser-tests/alert-card-footer.tsxdeleted file mode 100644index 4d115741ce..0000000000--- a/frontend-modern/browser-tests/alert-card-footer.tsx+++ /dev/null@@ -1,43 +0,0 @@-// Browser fixture for issue #2119: the Alerts overview alert-card footer.-//-// It reproduces the production footer from AlertOverviewAlertCard.tsx: a flex-// row (items-center) whose first child is the "Started" line classed by-// getAlertOverviewStartedAtClass(), followed by the delivery-status span. The-// reporter's screenshot underlines the Started timestamp and the status text at-// different heights, so the fixture exists to measure whether the two runs share-// a baseline. Synthetic props only; no backend, API or WebSocket path.-import { render } from 'solid-js/web';--import { getAlertOverviewStartedAtClass } from '../src/utils/alertOverviewPresentation';-import '../src/index.css';--function AlertCardFooter() {- return (- <div- id="alert-card"- style={{- width: '960px',- margin: '24px',- padding: '16px',- border: '1px solid #f59e0b',- 'border-radius': '8px',- background: '#111827',- color: '#9ca3af',- }}- >- <p style={{ margin: '0', 'font-size': '14px', color: '#e5e7eb' }}>- Alert notifications are not reaching their destinations.- </p>- <div id="alert-card-footer" class="flex flex-wrap items-center gap-x-3 gap-y-0.5 mt-1">- <p class={getAlertOverviewStartedAtClass()} data-testid="started">- Started: 9/18/2026, 12:15:58 PM- </p>- <span class="text-xs text-muted" data-testid="status">- Notified 12:15 PM- </span>- </div>- </div>- );-}--render(() => <AlertCardFooter />, document.getElementById('root')!);diff --git a/frontend-modern/browser-tests/api-auth-help.cjs b/frontend-modern/browser-tests/api-auth-help.cjsdeleted file mode 100644index cd6ac95ca8..0000000000--- a/frontend-modern/browser-tests/api-auth-help.cjs+++ /dev/null@@ -1,130 +0,0 @@-// Consume the shipped API guide through the production Docs page/router.-// Shell transport is proved separately with real curl and synthetic fixtures.-const assert = require('node:assert/strict');-const fs = require('node:fs');-const path = require('node:path');-const { createHash } = require('node:crypto');-const { chromium } = require('playwright');--(async () => {- const root = path.resolve('frontend-modern');- const artifacts = path.join(root, 'node_modules', 'api-auth-browser');- fs.mkdirSync(artifacts, { recursive: true });- const guide = fs.readFileSync(path.join(root, 'public/docs/API.md'), 'utf8');- const helper = [...guide.matchAll(/```bash\n([\s\S]*?)```/g)]- .map(match => match[1].trim()).find(block => block.startsWith('pulse_api() ('));- assert.ok(helper);- const port = 5259;- 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-api-auth'),- server: { host: '127.0.0.1', port, strictPort: true },- optimizeDeps: { noDiscovery: true, include: [] },- });- const results = [];- let browser;- try {- await server.listen();- for (const [width, tone] of [[1280, 'light'], [390, 'dark']]) {- const engine = 'chromium';- const narrow = width < 500;- browser = await chromium.launch({ headless: true, channel: 'chromium', args: ['--no-sandbox'] });- const page = await browser.newPage({ viewport: { width, height: 1000 },- ...(narrow ? { isMobile: true, hasTouch: true } : {}) });- const errors = [];- const apiRequests = [];- const offOriginRequests = [];- page.on('pageerror', error => errors.push(error.message));- page.on('console', message => { if (message.type() === 'error') errors.push(message.text()); });- await page.route('**/*', route => {- const url = new URL(route.request().url());- if (url.origin !== `http://127.0.0.1:${port}`) {- offOriginRequests.push(url.href);- return route.abort();- }- if (url.pathname.startsWith('/api/')) {- const method = route.request().method();- apiRequests.push({ method, path: url.pathname });- // The existing Docs fixture's security context can read this one- // status. No product API server or administrative action is used.- if (method !== 'GET' || url.pathname !== '/api/security/status') return route.abort();- return route.fulfill({ status: 200, contentType: 'application/json', body: '{}' });- }- return route.continue();- });- await page.goto(`http://127.0.0.1:${port}/browser-tests/docs-fragment-navigation.html`,- { waitUntil: 'domcontentloaded', timeout: 60_000 });- await page.getByRole('link', { name: '← All documentation' }).click();- const entry = page.locator('a[data-doc-link][href="/docs/API"]').first();- if (narrow) await entry.tap();- else {- await entry.focus();- await page.keyboard.press('Enter');- }- await page.getByRole('heading', { name: 'API Token (Recommended)', exact: true }).waitFor();- if (tone === 'dark') await page.evaluate(() => document.documentElement.classList.add('dark'));- const code = page.locator('pre').filter({ hasText: 'pulse_api() (' });- assert.equal((await code.locator('code').textContent()).trim(), helper);- assert.ok(helper.includes('--globoff'));- // Place the changed command line in the viewport, and use the code- // block's own horizontal scroll on phones rather than overflowing the page.- await code.evaluate(pre => {- const style = getComputedStyle(pre.querySelector('code'));- const line = pre.textContent.split('\n').findIndex(text => text.includes('--globoff'));- window.scrollTo(0, pre.getBoundingClientRect().top + window.scrollY- + parseFloat(getComputedStyle(pre).paddingTop) + line * parseFloat(style.lineHeight) - 200);- if (innerWidth < 500) pre.scrollLeft = pre.scrollWidth;- });- assert.ok(await page.evaluate(() => document.documentElement.scrollWidth <= innerWidth + 1));- const captures = [`${engine}-${width}-helper.png`, `${engine}-${width}-boundary.png`];- await page.screenshot({ path: path.join(artifacts, captures[0]) });- const warning = page.locator('p').filter({ hasText: "shell quotes alone do not disable curl's URL globbing" });- await warning.scrollIntoViewIfNeeded();- const text = await warning.innerText();- for (const phrase of ['{review,ops}', '[1-3]', 'POST, PUT or DELETE',- 'not as a batch', 'URL-encode', 'does not encode them for you']) {- assert.ok(text.includes(phrase), phrase);- }- assert.ok(await page.evaluate(() => document.documentElement.scrollWidth <= innerWidth + 1));- await page.screenshot({ path: path.join(artifacts, captures[1]) });- // Return through the guide's own linked administration help, then use- // the real renderer's fragment focus/reload handling on the API guide.- const rbac = page.locator('a[data-doc-link][href^="/docs/RBAC#"]').first();- await rbac.scrollIntoViewIfNeeded();- if (narrow) await rbac.tap();- else { await rbac.focus(); await page.keyboard.press('Enter'); }- await page.waitForURL(`**/docs/RBAC#managing-roles`);- await page.waitForFunction(() => document.activeElement?.id === 'managing-roles');- await page.goBack({ waitUntil: 'domcontentloaded' });- await page.evaluate(() => { window.location.hash = '#api-token-recommended'; });- await page.waitForFunction(() => document.activeElement?.id === 'api-token-recommended');- await page.reload({ waitUntil: 'domcontentloaded' });- await page.waitForFunction(() => document.activeElement?.id === 'api-token-recommended');- assert.equal((await page.locator('pre').filter({ hasText: 'pulse_api() (' })- .locator('code').textContent()).trim(), helper);- assert.deepEqual(errors, []);- assert.ok(apiRequests.every(request => request.method === 'GET'- && request.path === '/api/security/status'));- assert.deepEqual(offOriginRequests, []);- results.push({ engine, browserVersion: browser.version(), width, height: 1000, tone,- entry: narrow ? 'touch' : 'keyboard', exactRenderedShell: true,- literalURLAndEncodingBoundary: true, linkedAdminHelp: true,- fragmentFocusAndReload: true, noPageOverflow: true, captures, errors,- apiRequests, offOriginRequests });- await browser.close();- browser = undefined;- }- const result = { result: 'passed', verifiedAt: new Date().toISOString(),- playwrightVersion: require('playwright/package.json').version,- scope: 'Production Docs/router and exact copied guide; not installed API or customer acceptance',- docs: { 'frontend-modern/public/docs/API.md': createHash('sha256').update(guide).digest('hex') },- results };- fs.writeFileSync(path.join(artifacts, 'result.json'), JSON.stringify(result, null, 2) + '\n');- console.log(JSON.stringify(result));- } finally {- if (browser) await browser.close();- await server.close();- }-})().catch(error => { console.error(error); process.exitCode = 1; });diff --git a/frontend-modern/browser-tests/app-refresh-verification.json b/frontend-modern/browser-tests/app-refresh-verification.jsondeleted file mode 100644index 3b913bf1c6..0000000000--- a/frontend-modern/browser-tests/app-refresh-verification.json+++ /dev/null@@ -1,187 +0,0 @@-{- "version": 1,- "verified_at": "2026-09-05T00:55:39.636242+00:00",- "application_source_sha": "0c4486102e918a6800fb317166232224fd092a0d",- "runner": "scripts/check-backup-app-refresh.mjs",- "runner_sha256": "0b1868aa9f2f288fb07153e10abb3622140357a4c1600d1ed40b59f1c3b22b3d",- "result": "passed",- "environment": "Headless Playwright Chromium; synthetic scoped REST and replacement WebSocket snapshots; actual application entry point",- "runs": [- {- "viewport": {- "width": 1440,- "height": 900- },- "coverage": {- "baseline": {- "y": 775,- "url": "http://127.0.0.1:5198/proxmox/backups/coverage"- },- "samples": [- {- "generation": 1,- "y": 775,- "url": "http://127.0.0.1:5198/proxmox/backups/coverage"- },- {- "generation": 2,- "y": 775,- "url": "http://127.0.0.1:5198/proxmox/backups/coverage"- },- {- "generation": 3,- "y": 775,- "url": "http://127.0.0.1:5198/proxmox/backups/coverage"- }- ],- "visibleCoverageRows": 140,- "pageErrors": [],- "consoleErrors": []- },- "other_views": [- {- "view": "date",- "baseline": {- "y": 989,- "url": "http://127.0.0.1:5198/proxmox/backups/date",- "active": "By date"- },- "samples": [- {- "y": 989,- "url": "http://127.0.0.1:5198/proxmox/backups/date",- "active": "By date"- },- {- "y": 989,- "url": "http://127.0.0.1:5198/proxmox/backups/date",- "active": "By date"- },- {- "y": 989,- "url": "http://127.0.0.1:5198/proxmox/backups/date",- "active": "By date"- }- ]- },- {- "view": "PBS History",- "baseline": {- "y": 0,- "url": "http://127.0.0.1:5198/proxmox/backups/date",- "active": "History"- },- "samples": [- {- "y": 0,- "url": "http://127.0.0.1:5198/proxmox/backups/date",- "active": "History"- },- {- "y": 0,- "url": "http://127.0.0.1:5198/proxmox/backups/date",- "active": "History"- },- {- "y": 0,- "url": "http://127.0.0.1:5198/proxmox/backups/date",- "active": "History"- }- ]- }- ]- },- {- "viewport": {- "width": 390,- "height": 900- },- "coverage": {- "baseline": {- "y": 636,- "url": "http://127.0.0.1:5198/proxmox/backups/coverage"- },- "samples": [- {- "generation": 1,- "y": 636,- "url": "http://127.0.0.1:5198/proxmox/backups/coverage"- },- {- "generation": 2,- "y": 636,- "url": "http://127.0.0.1:5198/proxmox/backups/coverage"- },- {- "generation": 3,- "y": 636,- "url": "http://127.0.0.1:5198/proxmox/backups/coverage"- }- ],- "visibleCoverageRows": 36,- "pageErrors": [],- "consoleErrors": []- },- "other_views": [- {- "view": "date",- "baseline": {- "y": 900,- "url": "http://127.0.0.1:5198/proxmox/backups/date",- "active": "By date"- },- "samples": [- {- "y": 900,- "url": "http://127.0.0.1:5198/proxmox/backups/date",- "active": "By date"- },- {- "y": 900,- "url": "http://127.0.0.1:5198/proxmox/backups/date",- "active": "By date"- },- {- "y": 900,- "url": "http://127.0.0.1:5198/proxmox/backups/date",- "active": "By date"- }- ]- },- {- "view": "PBS History",- "baseline": {- "y": 0,- "url": "http://127.0.0.1:5198/proxmox/backups/date",- "active": "History"- },- "samples": [- {- "y": 0,- "url": "http://127.0.0.1:5198/proxmox/backups/date",- "active": "History"- },- {- "y": 0,- "url": "http://127.0.0.1:5198/proxmox/backups/date",- "active": "History"- },- {- "y": 0,- "url": "http://127.0.0.1:5198/proxmox/backups/date",- "active": "History"- }- ]- }- ]- }- ],- "limitations": [- "Not a deployed release or reporter Brave retest; Brave executable not available on PATH",- "Keyboard interaction at narrow width, not touch",- "Static backup-artifact API after initial load; replacement resource snapshots only",- "PBS History baseline scroll is zero; no non-zero drawer-scroll proof",- "No Settings Manage editing, Authentication strategy or expansion-padding qualification",- "No full repository suite or build run; no product code changed"- ]-}diff --git a/frontend-modern/browser-tests/authentication-diagnostic-help.cjs b/frontend-modern/browser-tests/authentication-diagnostic-help.cjsdeleted file mode 100644index 6f150285bd..0000000000--- a/frontend-modern/browser-tests/authentication-diagnostic-help.cjs+++ /dev/null@@ -1,94 +0,0 @@-// Render shipped authentication help through the real Docs/router/Markdown/CSS.-// No credential, proxy, API write or installation is exercised in the browser.-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');--(async () => {- const root = path.resolve('frontend-modern');- const artifacts = path.join(root, 'node_modules', 'authentication-diagnostic-browser');- fs.mkdirSync(artifacts, { recursive: true });- 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-authentication-diagnostic'),- server: { host: '127.0.0.1', port: 5253, strictPort: true },- optimizeDeps: { noDiscovery: true, include: [] },- });- const results = [];- let browser;- try {- await server.listen();- for (const [engine, width, tone] of [['chromium', 1280, 'light'], ['webkit', 390, 'dark']]) {- browser = await { chromium, webkit }[engine].launch(engine === 'chromium'- ? { headless: true, channel: 'chromium', args: ['--no-sandbox'] }- : { headless: true });- const page = await browser.newPage({ viewport: { width, height: 1000 },- ...(engine === 'webkit' ? { isMobile: true, hasTouch: true } : {}) });- const errors = [];- page.on('pageerror', (error) => errors.push(error.message));- page.on('console', (message) => { if (message.type() === 'error') errors.push(message.text()); });- await page.goto('http://127.0.0.1:5253/browser-tests/docs-fragment-navigation.html',- { waitUntil: 'domcontentloaded', timeout: 60_000 });- if (tone === 'dark') await page.evaluate(() => document.documentElement.classList.add('dark'));- for (const guide of ['AI_AUTONOMY', 'PROXY_AUTH']) {- await page.getByRole('link', { name: '← All documentation' }).click();- const entry = page.locator(`a[data-doc-link][href="/docs/${guide}"]`).first();- await entry.focus();- await page.keyboard.press('Enter');- const heading = page.getByRole('heading', { name: guide === 'AI_AUTONOMY' ? 'Configuration' : 'Verify Headers', exact: true }).first();- await heading.waitFor();- await heading.scrollIntoViewIfNeeded();- const text = await page.locator('article').innerText();- assert.ok(!text.includes('admin:admin') && !text.includes('curl -H "X-Proxy-Secret'));- const phrases = guide === 'AI_AUTONOMY'- ? ['settings:write', 'even for GET', 'changes Patrol mode', 'after an uncertain write']- : ['not expose the backend port', 'HTTP 000', 'old behaviour'];- for (const phrase of phrases)- assert.ok(text.includes(phrase), phrase);- assert.ok(await page.evaluate(() => document.documentElement.scrollWidth <= innerWidth + 1));- if (guide === 'AI_AUTONOMY') {- await page.screenshot({ path: path.join(artifacts, `${engine}-${guide.toLowerCase()}.png`) });- const link = page.getByRole('link', { name: 'private header file', exact: true });- await link.focus();- await page.keyboard.press('Enter');- await page.waitForFunction(() => {- const h = document.getElementById('api-token-recommended');- return h && h.getBoundingClientRect().top >= 0 && h.getBoundingClientRect().top < innerHeight;- });- assert.ok(page.url().endsWith('/docs/API#api-token-recommended'));- const code = page.locator('pre').filter({ hasText: 'Refusing a symlinked credential path.' });- await code.scrollIntoViewIfNeeded();- assert.ok((await code.innerText()).includes('chmod 700 "$auth_dir"'));- await page.screenshot({ path: path.join(artifacts, `${engine}-private-header.png`) });- } else {- const code = page.locator('pre').filter({ hasText: "--write-out 'HTTP %{http_code}" });- await code.scrollIntoViewIfNeeded();- assert.ok((await code.innerText()).includes('--output /dev/null'));- assert.ok((await code.innerText()).includes('--header "@$header_file"'));- await page.screenshot({ path: path.join(artifacts, `${engine}-${guide.toLowerCase()}.png`) });- }- }- assert.deepEqual(errors, []);- results.push({ engine, browserVersion: browser.version(), width, tone,- keyboardEntryAndPrivateHeaderLink: true, credentialFileRecipeRendered: true,- roleAndTransportLimitsRendered: true, noBodyOverflow: true, errors });- await browser.close();- browser = undefined;- }- const docs = Object.fromEntries(['API', 'AI_AUTONOMY', 'PROXY_AUTH'].map((guide) => [- `frontend-modern/public/docs/${guide}.md`,- createHash('sha256').update(fs.readFileSync(path.join(root, 'public/docs', `${guide}.md`))).digest('hex'),- ]));- const result = { result: 'passed', playwrightVersion: require('playwright/package.json').version,- scope: 'rendered help/links; not native proxy, authentication or AI settings acceptance', docs, results };- fs.writeFileSync(path.join(artifacts, 'result.json'), JSON.stringify(result, null, 2) + '\n');- console.log(JSON.stringify(result));- } finally {- if (browser) await browser.close();- await server.close();- }-})().catch((error) => { console.error(error); process.exitCode = 1; });diff --git a/frontend-modern/browser-tests/backup-date-observation.html b/frontend-modern/browser-tests/backup-date-observation.htmldeleted file mode 100644index a826e7d6ee..0000000000--- a/frontend-modern/browser-tests/backup-date-observation.html+++ /dev/null@@ -1,12 +0,0 @@-<!doctype html>-<html lang="en">- <head>- <meta charset="UTF-8" />- <meta name="viewport" content="width=device-width, initial-scale=1.0" />- <title>Backup-age observation evidence</title>- </head>- <body>- <div id="root"></div>- <script type="module" src="/browser-tests/backup-date-observation.tsx"></script>- </body>-</html>diff --git a/frontend-modern/browser-tests/backup-date-observation.tsx b/frontend-modern/browser-tests/backup-date-observation.tsxdeleted file mode 100644index 013d4e9414..0000000000--- a/frontend-modern/browser-tests/backup-date-observation.tsx+++ /dev/null@@ -1,60 +0,0 @@-// Real active-alert adapter and Overview, fed only by the Go manager's frames.-import { createSignal, onMount } from 'solid-js';-import { render } from 'solid-js/web';-import { Route, Router } from '@solidjs/router';-import { AlertsAPI } from '../src/api/alerts';-import { OverviewTab } from '../src/features/alerts/OverviewTab';-import { DarkModeContext } from '../src/contexts/appRuntime';-import { aiAvailabilityStore } from '../src/stores/aiAvailability';-import type { Alert } from '../src/types/api';-import '../src/index.css';--aiAvailabilityStore.setEnabled(false);--function Fixture() {- const [active, setActive] = createSignal<Record<string, Alert>>({});- const [showAcknowledged, setShowAcknowledged] = createSignal(true);- const [generation, setGeneration] = createSignal(0);- const reload = async () => {- const alerts = await AlertsAPI.getActive();- setActive(Object.fromEntries(alerts.map((alert) => [alert.id, alert])));- setGeneration((value) => value + 1);- };- onMount(() => void reload());- Object.assign(window, { __backupDate: { reload, active, generation } });- return (- <main class="mx-auto min-h-screen max-w-5xl space-y-4 bg-surface p-3 text-base-content">- <h1 class="text-base font-semibold">Backup-age observations</h1>- <p class="text-xs text-muted">Synthetic monitoring evidence. No backup or guest operation.</p>- <button- class="min-h-11 rounded-sm border border-border px-3 text-sm"- onClick={() => void reload()}- >- Refresh monitoring evidence- </button>- <OverviewTab- overrides={[]}- activeAlerts={active()}- updateAlert={(id, updates) =>- setActive((previous) => ({ ...previous, [id]: { ...previous[id], ...updates } }))- }- showQuickTip={() => false}- dismissQuickTip={() => {}}- showAcknowledged={showAcknowledged}- setShowAcknowledged={setShowAcknowledged}- alertsDisabled={() => false}- />- </main>- );-}--render(- () => (- <DarkModeContext.Provider value={() => document.documentElement.classList.contains('dark')}>- <Router>- <Route path="*" component={Fixture} />- </Router>- </DarkModeContext.Provider>- ),- document.getElementById('root')!,-);diff --git a/frontend-modern/browser-tests/backup-details-access.cjs b/frontend-modern/browser-tests/backup-details-access.cjsdeleted file mode 100644index 0fef9ecc26..0000000000--- a/frontend-modern/browser-tests/backup-details-access.cjs+++ /dev/null@@ -1,359 +0,0 @@-const assert = require('node:assert/strict');-const fs = require('node:fs');-const path = require('node:path');-const crypto = require('node:crypto');-const { chromium, webkit } = require('playwright');-const root = '/workspace';-const frontend = path.join(root, 'frontend-modern');-const output = path.join(root, 'tmp/backup-details-access/browser');-const origin = 'http://127.0.0.1:5298';-const runtime = [- 'frontend-modern/src/components/Workloads/GuestRowCells.tsx',- 'frontend-modern/src/components/Workloads/GuestRow.tsx',-];-const hash = (p) => crypto.createHash('sha256').update(fs.readFileSync(p)).digest('hex');-(async () => {- fs.mkdirSync(output, { recursive: true });- const version = require('playwright/package.json').version;- assert.equal(- version,- JSON.parse(fs.readFileSync(path.join(root, 'tests/integration/package-lock.json'))).packages[- 'node_modules/@playwright/test'- ].version,- );- const hashes = Object.fromEntries(- runtime.map((source) => [source, hash(path.join(root, source))]),- );- process.chdir(frontend);- const { createServer } = await import(- path.join(frontend, 'node_modules/vite/dist/node/index.js')- );- const server = await createServer({- cacheDir: path.join(output, 'vite-cache'),- server: { host: '127.0.0.1', port: 5298, strictPort: true },- });- const results = [];- const captures = [];- const phases = [];- const started = Date.now();- const mark = (stage) => {- const fact = {- stage,- elapsedMs: Date.now() - started,- memory: process.memoryUsage(),- resources: process.resourceUsage(),- };- phases.push(fact);- console.log(JSON.stringify({ browserPhase: fact }));- };- let browser;- let phase = 'server';- try {- mark('listen-start');- await server.listen();- mark('listen-complete');- // Supported Vite transform warmup, not a production build or app execution.- // Keep page navigation and the tool deadline unchanged; collect phases.- await server.warmupRequest('/browser-tests/backup-details-access.tsx');- await server.warmupRequest('/src/index.css');- mark('entry-css-warmup-complete');- for (const [name, engine, phone, dark] of [- ['desktop-light', chromium, false, false],- ['desktop-dark', chromium, false, true],- ['phone-light', webkit, true, false],- ['phone-dark', webkit, true, true],- ]) {- phase = name;- browser = await engine.launch(- engine === chromium- ? { headless: true, channel: 'chromium', args: ['--no-sandbox'] }- : { headless: true },- );- const page = await browser.newPage({- viewport: { width: phone ? 390 : 1365, height: phone ? 844 : 900 },- isMobile: phone,- hasTouch: phone,- locale: 'en-GB',- timezoneId: 'UTC',- });- page.setDefaultTimeout(12000);- page.setDefaultNavigationTimeout(45000);- await page.clock.setFixedTime(new Date('2026-10-05T08:00:00Z'));- const errors = [];- const operations = [];- const reads = [];- const checks = [];- page.on('pageerror', (e) => errors.push(e.message));- await page.route('**/*', (route) => {- const request = route.request();- const url = new URL(request.url());- assert.equal(url.origin, origin, 'no off-origin requests');- if (!url.pathname.startsWith('/api/')) return route.continue();- if (request.method() !== 'GET') operations.push(`${request.method()} ${url.pathname}`);- reads.push(url.pathname);- return route.fulfill({- json: { success: true, data: [], alerts: [], config: null, anomalies: [] },- });- });- if (dark)- await page.addInitScript(() =>- document.addEventListener('DOMContentLoaded', () =>- document.documentElement.classList.add('dark'),- ),- );- mark(`${name}:navigate-start`);- await page.goto(`${origin}/browser-tests/backup-details-access.html`, {- waitUntil: 'domcontentloaded',- });- mark(`${name}:domcontentloaded`);- const row = page.getByRole('region', { name: 'backup-vm row' });- const badge = row.getByRole('button', { name: /^Backup status:/ });- await badge.waitFor();- const identity = await page.evaluate(() => window.__backupDetails.identity());- const rowActionCount = async () =>- Number(await page.getByRole('status', { name: 'Row action count' }).innerText());- const activate = async (el) => (phone ? el.tap() : el.click());- const capture = async (suffix) => {- const file = path.join(output, `${name}-${suffix}.png`);- await page.screenshot({ path: file, fullPage: true });- captures.push({- path: path.relative(root, file),- bytes: fs.statSync(file).size,- sha256: hash(file),- });- };- const dialog = page.getByRole('dialog', { name: /^Backup status details for / });- const close = page.getByRole('button', { name: 'Close backup details' });- const checkOpen = async (trigger) => {- await dialog.waitFor({ state: 'visible' });- assert.equal(await trigger.getAttribute('aria-expanded'), 'true');- assert.equal(await rowActionCount(), 0, 'backup action must not open the guest row');- await close.waitFor();- await page.waitForFunction(- () => document.activeElement?.getAttribute('aria-label') === 'Close backup details',- );- // DOM visibility can precede the CSS entrance animation. Verify and- // capture the final user-visible panel, not its initial off-screen frame.- await dialog.evaluate(async (el) => {- await Promise.all(- el- .getAnimations({ subtree: true })- .filter((a) => Number.isFinite(a.effect?.getTiming().iterations))- .map((a) => a.finished.catch(() => {})),- );- });- const rect = await dialog.boundingBox();- assert(- rect.x >= 0 && rect.x + rect.width <= (phone ? 390 : 1365),- 'dialog stays within viewport',- );- assert(- rect.y >= 0 && rect.y + rect.height <= (phone ? 844 : 900),- 'settled panel stays vertically in view',- );- assert(- await page.locator('main').evaluate((el) => el.closest('body > *').hasAttribute('inert')),- 'background isolated',- );- };- const checkClosed = async (trigger) => {- await dialog.waitFor({ state: 'hidden' });- assert.equal(await trigger.getAttribute('aria-expanded'), 'false');- assert(- await trigger.evaluate((el) => document.activeElement === el),- 'focus returns to source evidence',- );- assert.equal(- await page.locator('main').evaluate((el) => el.closest('body > *').hasAttribute('inert')),- false,- );- };- assert.equal(await badge.getAttribute('aria-haspopup'), 'dialog');- assert.equal((await badge.innerText()).trim(), '', 'fresh shield remains compact');- if (!phone) {- await badge.hover();- const tooltip = page.locator('[data-tooltip-portal="true"]');- await tooltip.waitFor({ state: 'visible' });- assert((await tooltip.innerText()).includes('Last completed backup'));- await page.getByRole('heading').hover();- // Genuine sequential keyboard traversal, not synthetic click/focus.- await page.keyboard.press('Tab'); // column control- await page.keyboard.press('Tab'); // guest disclosure- await page.keyboard.press('Tab'); // backup disclosure- assert(await badge.evaluate((el) => document.activeElement === el));- await page.keyboard.press('Enter');- checks.push('desktop hover preserved and sequential Tab/Enter opens actual badge');- } else {- const rect = await badge.boundingBox();- assert(rect.width >= 44 && rect.height >= 44, 'touch disclosure is at least 44px');- await activate(badge);- assert.equal(- await page.locator('[data-tooltip-portal="true"]').count(),- 0,- 'no synthetic hover overlay',- );- checks.push('ordinary first tap opens 44px target, without hover UI');- }- await checkOpen(badge);- assert((await dialog.innerText()).includes('backup-vm'));- assert((await dialog.innerText()).includes('Mon, 5 Oct 2026'));- assert((await dialog.innerText()).includes('06:00:00'));- assert((await dialog.innerText()).includes('2 hours ago'));- await capture('fresh-completed');- await page.keyboard.press('Tab');- assert(- await close.evaluate((el) => document.activeElement === el),- 'one-action dialog retains focus',- );- await page.evaluate(() =>- window.__backupDetails.update({ timestamp: '2026-10-05T06:00:00Z', running: true }),- );- assert((await dialog.innerText()).includes('Backup running now'));- assert((await dialog.innerText()).includes('Last completed backup'));- assert.equal(await page.evaluate(() => window.__backupDetails.identity()), identity);- checks.push('same identity updates running while preserving prior completed observation');- await capture('running-completed');- await page.evaluate(() =>- window.__backupDetails.update({ timestamp: '2026-10-05T08:01:00Z', running: true }),- );- await dialog.getByText(/timestamp is in the future/).waitFor();- assert(!(await dialog.innerText()).includes('Last completed backup'));- assert(!(await dialog.innerText()).includes('No backup has ever'));- await capture('future-running');- await page.keyboard.press('Escape');- await checkClosed(badge);- if (!phone) {- await page.keyboard.press('Space');- await checkOpen(badge);- assert((await dialog.innerText()).includes('timestamp is in the future'));- await page.keyboard.press('Escape');- await checkClosed(badge);- checks.push('native Space reopens current evidence and Escape restores focus');- }- await page.getByRole('button', { name: 'Hide Backup column' }).click();- const indicator = row.getByRole('button', { name: /^Backup running now/ });- await activate(indicator);- await checkOpen(indicator);- assert((await dialog.innerText()).includes('timestamp is in the future'));- checks.push('hidden-column indicator exposes exactly the same uncertainty');- await page.evaluate(() =>- window.__backupDetails.update({ timestamp: 'bad-time', running: false }),- );- await dialog.getByText(/invalid timestamp/).waitFor();- await page.evaluate(() => window.__backupDetails.update({ timestamp: '', running: false }));- await dialog- .getByText('No backup has ever been recorded for this guest.', { exact: true })- .waitFor();- assert(!(await dialog.innerText()).includes('Invalid Date'));- assert(!(await dialog.innerText()).includes('NaN'));- checks.push('malformed then absence retain distinct truthful states');- await activate(close);- await checkClosed(row.getByRole('button', { name: 'No backup found', exact: true }));- const ct = page- .getByRole('region', { name: 'backup-ct row' })- .getByRole('button', { name: 'No backup found', exact: true });- await activate(ct);- await checkOpen(ct);- assert((await dialog.innerText()).includes('backup-ct'));- assert(- !(await dialog.innerText()).includes('2 hours ago'),- 'adjacent guest never inherits another observation',- );- await capture('ct-missing');- await page.locator('[data-dialog-backdrop]').click({ position: { x: 3, y: 3 } });- await checkClosed(ct);- await page.evaluate(() =>- window.__backupDetails.update({ timestamp: '2026-10-05T06:00:00Z', running: false }),- );- const recovered = row.getByRole('button', { name: /^Last backup:/ });- await activate(recovered);- await checkOpen(recovered);- assert((await dialog.innerText()).includes('2 hours ago'));- await page.evaluate(() => window.__backupDetails.remove());- await dialog.waitFor({ state: 'hidden' });- assert.equal(await page.locator('[data-dialog-layer]').count(), 0);- assert.equal(- await page.locator('main').evaluate((el) => el.closest('body > *').hasAttribute('inert')),- false,- );- checks.push(- 'recovery and actual row removal release dialog/inertness without extra operations',- );- assert.equal(await rowActionCount(), 0);- await activate(- page.getByRole('region', { name: 'backup-ct row' }).getByText('backup-ct', { exact: true }),- );- assert.equal(await rowActionCount(), 1, 'ordinary row action still works');- assert.deepEqual(errors, []);- assert.deepEqual(operations, []);- assert(- !reads.some((p) => /backup|metrics|guest|resources/.test(p)),- 'opening evidence adds no collector/history read',- );- results.push({- name,- browser: browser.version(),- checks,- apiReads: reads,- operations,- errors,- finalRowActions: await rowActionCount(),- });- mark(`${name}:checks-complete`);- await page.close();- await browser.close();- browser = undefined;- }- fs.writeFileSync(- path.join(output, 'result.json'),- JSON.stringify(- {- result: 'passed',- playwrightVersion: version,- runtime: hashes,- phases,- results,- captures,- },- null,- 2,- ) + '\n',- );- console.log(- JSON.stringify({- result: 'passed',- cases: results.length,- checks: results.reduce((n, r) => n + r.checks.length, 0),- captures: captures.length,- hashes,- playwrightVersion: version,- }),- );- } catch (e) {- fs.writeFileSync(- path.join(output, 'failure.json'),- JSON.stringify(- {- result: 'failed',- phase,- error: String(e),- runtime: hashes,- phases,- playwrightVersion: version,- captures,- results,- },- null,- 2,- ) + '\n',- );- throw e;- } finally {- if (browser) await browser.close();- await server.close();- mark('browser-server-closed');- }-})().catch((e) => {- console.error(e);- process.exitCode = 1;-});diff --git a/frontend-modern/browser-tests/backup-details-access.html b/frontend-modern/browser-tests/backup-details-access.htmldeleted file mode 100644index 488f6afbdc..0000000000--- a/frontend-modern/browser-tests/backup-details-access.html+++ /dev/null@@ -1,12 +0,0 @@-<!doctype html>-<html lang="en">- <head>- <meta charset="UTF-8" />- <meta name="viewport" content="width=device-width, initial-scale=1.0" />- <title>Backup evidence accessibility verification</title>- </head>- <body>- <div id="root"></div>- <script type="module" src="./backup-details-access.tsx"></script>- </body>-</html>diff --git a/frontend-modern/browser-tests/backup-details-access.tsx b/frontend-modern/browser-tests/backup-details-access.tsxdeleted file mode 100644index 1f7c7030c9..0000000000--- a/frontend-modern/browser-tests/backup-details-access.tsx+++ /dev/null@@ -1,110 +0,0 @@-// Production Workloads rows/shared dialog, with explicit guest observations.-// Mapping/collection are unchanged. No backup, guest, thaw or credential operation.-import { createSignal, Show } from 'solid-js';-import { render } from 'solid-js/web';-import { Router, Route } from '@solidjs/router';-import { GuestRow } from '../src/components/Workloads/GuestRow';-import { DarkModeContext } from '../src/contexts/appRuntime';-import type { WorkloadGuest } from '../src/types/workloads';-import '../src/index.css';--type Observation = { timestamp: string; running: boolean };-const guest = (vmid: number, value: Observation): WorkloadGuest => ({- id: `fixture-pve1-${vmid}`,- vmid,- name: vmid === 101 ? 'backup-vm' : 'backup-ct',- node: 'pve1',- instance: 'fixture',- status: 'running',- type: vmid === 101 ? 'qemu' : 'lxc',- workloadType: vmid === 101 ? 'vm' : 'system-container',- platformType: 'proxmox-pve',- cpu: 0.1,- cpus: 2,- memory: { total: 1024 ** 3, used: 1024 ** 3 / 4, free: (3 * 1024 ** 3) / 4, usage: 25 },- disk: { total: 10 * 1024 ** 3, used: 0, free: 10 * 1024 ** 3, usage: 0 },- networkIn: 0,- networkOut: 0,- diskRead: 0,- diskWrite: 0,- uptime: 3600,- template: false,- lastBackup: value.timestamp === '' ? 0 : Date.parse(value.timestamp),- backupInProgress: value.running,- tags: null,- lock: value.running ? 'backup' : '',- lastSeen: '2026-10-05T08:00:00Z',-});-const initial: Observation = { timestamp: '2026-10-05T06:00:00Z', running: false };-function Fixture() {- const [vm, setVM] = createSignal(guest(101, initial));- const ct = guest(102, { timestamp: '', running: false });- const [vmPresent, setVMPresent] = createSignal(true);- const [actions, setActions] = createSignal(0);- const [showBackup, setShowBackup] = createSignal(true);- (window as any).__backupDetails = {- update: (value: Observation) => setVM(guest(101, value)),- remove: () => setVMPresent(false),- identity: () => vm().id,- };- return (- <main class="min-h-screen space-y-4 bg-surface p-3 text-base-content">- <h1 class="text-base font-semibold">Backup evidence accessibility</h1>- <p class="text-xs text-muted">- Synthetic guest observations, no backup commands or collector reads.- </p>- <button- class="rounded-sm border border-border p-2 text-xs focus-visible:ring-2 focus-visible:ring-blue-500"- onClick={() => setShowBackup(!showBackup())}- >- {showBackup() ? 'Hide Backup column' : 'Show Backup column'}- </button>- <Show when={vmPresent()}>- <section aria-label="backup-vm row">- <table class="w-full table-fixed">- <tbody>- <GuestRow- guest={vm()}- visibleColumnIds={showBackup() ? ['name', 'backup'] : ['name']}- workloadTableLayoutMode={window.innerWidth <= 768 ? 'phone' : 'wide'}- onClick={() => setActions((n) => n + 1)}- />- </tbody>- </table>- </section>- </Show>- <section aria-label="backup-ct row">- <table class="w-full table-fixed">- <tbody>- <GuestRow- guest={ct}- visibleColumnIds={['name']}- workloadTableLayoutMode={window.innerWidth <= 768 ? 'phone' : 'wide'}- onClick={() => setActions((n) => n + 1)}- />- </tbody>- </table>- </section>- <p role="status" aria-label="Row action count">- {actions()}- </p>- </main>- );-}-render(- () => (- <Router>- <Route- path="*"- component={() => (- <DarkModeContext.Provider- value={() => document.documentElement.classList.contains('dark')}- >- <Fixture />- </DarkModeContext.Provider>- )}- />- </Router>- ),- document.getElementById('root')!,-);diff --git a/frontend-modern/browser-tests/backup-safety.cjs b/frontend-modern/browser-tests/backup-safety.cjsdeleted file mode 100644index 7a652ac50e..0000000000--- a/frontend-modern/browser-tests/backup-safety.cjs+++ /dev/null@@ -1,527 +0,0 @@-// Read-only synthetic Resources responses consumed by the real production UI.-const assert = require('node:assert/strict');-const crypto = require('node:crypto');-const fs = require('node:fs');-const http = require('node:http');-const path = require('node:path');-const { chromium, webkit } = require('playwright');-const root = '/workspace';-const frontend = path.join(root, 'frontend-modern');-const compiled = path.join(root, 'tmp/backup-safety-static/final');-const output = path.join(root, 'tmp/backup-safety/browser');-const origin = 'http://127.0.0.1:5298';-const hash = (data) => crypto.createHash('sha256').update(data).digest('hex');-const binding = JSON.parse(fs.readFileSync(path.join(compiled, 'binding.json')));-const result = {- base: '29a8636037e801fff6536cbaef94d3b84ba57df8',- scope:- 'Canonical Resources API/useWorkloads -> GuestRow -> both BackupStatusCell disclosures; actual shipped Docs. No guest command, backup, thaw, credential or recovery operation.',- playwright: require('playwright/package.json').version,- buildBinding: binding,- harnessSha256: hash(fs.readFileSync(__filename)),- results: [],- requests: [],- captures: [],- served: {},- errors: [],- cleanup: {},-};-const resource = (vmid, observation = {}) => {- const name =- vmid === 101- ? 'windows-backup-server-with-a-long-name'- : vmid === 102- ? 'healthy-peer'- : vmid === 103- ? 'linux-container'- : 'vsphere-control';- const total = 10 * 1024 ** 3;- return {- id: `lab-pve-a-${vmid}`,- vmid,- name,- type: vmid === 103 ? 'system-container' : 'vm',- status: 'online',- sources: vmid === 104 ? ['vsphere'] : ['proxmox'],- platformScopes: vmid === 104 ? ['vmware-vsphere'] : ['proxmox-pve'],- lastSeen: '2026-10-13T01:00:00Z',- metrics: {- cpu: { percent: 10 },- memory: { percent: 25, used: total / 4, total },- disk: { percent: 50, used: total / 2, total },- },- ...(vmid === 104- ? {- vmware: {- managedObjectId: 'vm-104',- powerState: 'running',- runtimeHostName: 'vsphere-a',- },- }- : {- proxmox: {- vmid,- instance: 'lab',- nodeName: 'pve-a',- runtimeStatus: 'running',- lastBackup: '2026-10-13T00:30:00Z',- backupInProgress: false,- guestAgentStatus: 'available',- lock: '',- diskStatusReason: '',- ...observation,- },- }),- ...(vmid === 101- ? {- agent: {- agentId: 'synthetic-agent',- agentVersion: '6.5.0',- stale: false,- osName: 'Windows',- },- }- : {}),- };-};-let server;-let browser;-(async () => {- fs.mkdirSync(output, { recursive: true });- assert.equal(- result.playwright,- JSON.parse(fs.readFileSync(path.join(root, 'tests/integration/package-lock.json'))).packages[- 'node_modules/@playwright/test'- ].version,- );- assert.equal(binding.graph, hash(fs.readFileSync(path.join(frontend, 'package-lock.json'))));- for (const [file, digest] of Object.entries(binding.sources))- assert.equal(- hash(fs.readFileSync(path.join(frontend, file))),- digest,- `source changed: ${file}`,- );- for (const file of [- 'src/components/Workloads/GuestRow.tsx',- 'src/components/Workloads/GuestRowCells.tsx',- 'src/components/Workloads/guestDrawerModel.ts',- 'src/hooks/useWorkloads.ts',- 'src/hooks/useUnifiedResources.ts',- 'src/pages/Docs.tsx',- ])- assert(binding.sources[file], `source not compiled: ${file}`);- const assets = new Map();- for (const [file, digest] of Object.entries(binding.artifacts)) {- const bytes = fs.readFileSync(path.join(compiled, file));- assert.equal(hash(bytes), digest, `artifact changed: ${file}`);- assets.set('/' + file, bytes);- }- server = http.createServer((request, response) => {- let file = new URL(request.url, origin).pathname;- if (file === '/docs/VM_DISK_MONITORING') file = '/browser-tests/backup-safety.html';- const bytes = assets.get(file);- if (!bytes || !['GET', 'HEAD'].includes(request.method)) {- response.writeHead(404);- response.end();- return;- }- result.served[file] = hash(bytes);- response.writeHead(200, {- 'Content-Type':- {- '.html': 'text/html',- '.js': 'text/javascript',- '.css': 'text/css',- '.md': 'text/markdown',- }[path.extname(file)] || 'application/octet-stream',- });- response.end(request.method === 'HEAD' ? undefined : bytes);- });- await new Promise((resolve, reject) => {- server.once('error', reject);- server.listen(5298, '127.0.0.1', resolve);- });- for (const spec of [- { name: 'desktop', engine: chromium, width: 1280, height: 900, colorScheme: 'light' },- { name: 'phone', engine: webkit, width: 375, height: 812, colorScheme: 'dark' },- ]) {- browser = await spec.engine.launch(- spec.engine === chromium- ? { headless: true, channel: 'chromium', args: ['--no-sandbox'] }- : { headless: true },- );- const page = await browser.newPage({- viewport: { width: spec.width, height: spec.height },- hasTouch: spec.name === 'phone',- isMobile: spec.name === 'phone',- locale: 'en-GB',- timezoneId: 'UTC',- colorScheme: spec.colorScheme,- });- page.setDefaultTimeout(12000);- await page.clock.setFixedTime(new Date('2026-10-13T01:00:00Z'));- if (spec.colorScheme === 'dark')- await page.addInitScript(() =>- document.addEventListener('DOMContentLoaded', () =>- document.documentElement.classList.add('dark'),- ),- );- let observation = {};- let primaryPresent = true;- const checks = [];- const errors = [];- const queries = [];- const evidence = [];- page.on('pageerror', (error) => errors.push(error.message));- await page.route('**/*', async (route) => {- const request = route.request();- const url = new URL(request.url());- assert.equal(url.origin, origin, 'no off-origin request');- if (!url.pathname.startsWith('/api/')) return route.continue();- assert.equal(request.method(), 'GET', 'no mutating operation');- let body;- if (url.pathname === '/api/resources')- body = {- data: [- ...(primaryPresent ? [resource(101, observation)] : []),- resource(102),- resource(103, { lock: 'backup', backupInProgress: true, guestAgentStatus: 'deferred' }),- resource(104),- ],- meta: { totalPages: 1 },- };- else if (url.pathname === '/api/license/runtime-capabilities')- body = { plan: 'free', capabilities: {}, features: [] };- else if (url.pathname === '/api/alerts/activation') body = { enabled: false };- else if (url.pathname === '/api/alerts/config')- body = { guestDefaults: {}, hostDefaults: {} };- else if (url.pathname === '/api/alerts/active') body = [];- else if (url.pathname === '/api/ai/intelligence/anomalies')- body = { anomalies: [], count: 0 };- else if (url.pathname.startsWith('/api/guests/metadata/')) body = { customUrl: '' };- else if (- url.pathname.startsWith('/api/resources/') &&- url.pathname.endsWith('/operator-state')- )- body = { configured: false, state: null };- else {- throw new Error(`unmatched API read: ${url.pathname}`);- }- queries.push(url.pathname);- result.requests.push({- browser: spec.name,- path: url.pathname,- method: request.method(),- bodySha256: hash(JSON.stringify(body)),- ...(url.pathname === '/api/resources' ? { body } : {}),- });- await route.fulfill({ json: body });- });- await page.goto(origin + '/browser-tests/backup-safety.html');- const row = page.getByRole('region', { name: 'Guest 101 row' });- const badge = row.getByRole('button', { name: /^Backup status:/ });- const dialog = page.getByRole('dialog', { name: /^Backup status details for windows-backup/ });- const close = () => dialog.getByRole('button', { name: 'Close backup details' });- const activate = (element) => (spec.name === 'phone' ? element.tap() : element.click());- const settle = async () => {- await dialog.waitFor({ state: 'visible' });- await dialog.evaluate(async (el) => {- await Promise.all(- el- .getAnimations({ subtree: true })- .filter((animation) => Number.isFinite(animation.effect?.getTiming().iterations))- .map((animation) => animation.finished.catch(() => {})),- );- });- const rect = await dialog.boundingBox();- assert(- rect.x >= 0 &&- rect.y >= 0 &&- rect.x + rect.width <= spec.width &&- rect.y + rect.height <= spec.height,- 'settled dialog fits viewport',- );- assert.equal(- await page.evaluate(() => window.__backupSafety.actions()),- 0,- 'evidence disclosure never dispatches row action',- );- };- const capture = async (state) => {- const file = path.join(output, `${spec.name}-${state}.png`);- await page.screenshot({ path: file, fullPage: false });- result.captures.push({- path: path.relative(root, file),- sha256: hash(fs.readFileSync(file)),- bytes: fs.statSync(file).size,- state,- browser: spec.name,- });- };- const refetch = async (value) => {- observation = value;- await page.evaluate(() => window.__backupSafety.refetch());- evidence.push(await page.evaluate(() => window.__backupSafety.evidence()));- };- const noExtraReads = async (action) => {- const before = queries.length;- await action();- assert.equal(queries.length, before, 'disclosing retained evidence adds no API read');- };- await badge.waitFor();- assert.equal((await badge.innerText()).trim(), '', 'fresh badge remains compact');- if (spec.name === 'desktop') {- await page.keyboard.press('Tab'); // existing column control- await page.keyboard.press('Tab'); // row disclosure- await page.keyboard.press('Tab'); // backup evidence- assert(await badge.evaluate((el) => document.activeElement === el));- await noExtraReads(() => page.keyboard.press('Enter'));- checks.push('sequential Tab/Enter discloses backup, not row');- } else {- const rect = await badge.boundingBox();- assert(rect.height >= 44 && rect.width >= 44);- await noExtraReads(() => activate(badge));- checks.push('ordinary first tap on 44px badge discloses backup, not row');- }- await settle();- await dialog.getByText('Guest-agent reads: Reported available', { exact: true }).waitFor();- assert(- (await dialog.innerText()).includes(- 'does not independently confirm thaw or filesystem writes',- ),- );- assert.equal(await dialog.getByRole('link').count(), 0);- const time = await dialog.locator('time').getAttribute('datetime');- assert.equal(time, '2026-10-13T00:30:00.000Z');- await capture('available');- checks.push('fresh completion and reported availability remain distinct from thaw/write proof');- await refetch({- lock: 'backup',- backupInProgress: true,- guestAgentStatus: 'available',- diskStatusReason: 'prev-vm-locked',- });- await dialog.getByText('Guest-agent reads: Deferred', { exact: true }).waitFor();- await settle();- assert(- (await dialog.innerText()).includes('An OK backup or a running VM does not prove thaw.'),- );- assert.equal(await dialog.locator('time').getAttribute('datetime'), time);- assert(- (await dialog.innerText()).includes('Using last known disk stats.') === false,- 'the caution is about current requests, not inherited disk figures',- );- await capture('locked');- checks.push('same open disclosure follows lock and running backup without renewing completion');- if (spec.name === 'desktop') {- await close().click();- await dialog.waitFor({ state: 'hidden' });- await badge.hover();- const tooltip = page.locator('[data-tooltip-portal="true"]');- await tooltip.waitFor({ state: 'visible' });- assert(- (await tooltip.innerText()).includes('An OK backup or a running VM does not prove thaw.'),- );- assert.equal(- await tooltip.getByRole('link').count(),- 0,- 'hover has no unreachable interaction',- );- const rect = await tooltip.boundingBox();- assert(- rect.x >= 0 &&- rect.y >= 0 &&- rect.x + rect.width <= spec.width &&- rect.y + rect.height <= spec.height,- 'safety hover fits viewport',- );- await capture('hover-locked');- await activate(badge);- await settle();- checks.push(- 'fine-pointer hover preserves the same precaution, without a dead interactive link',- );- }-- // Follow the actual existing guidance link through the shipped Docs renderer.- const link = dialog.getByRole('link', { name: 'Backup safety guidance' });- assert.equal(await link.getAttribute('href'), '/docs/VM_DISK_MONITORING');- if (spec.name === 'desktop') {- await close().focus();- await page.keyboard.press('Tab');- assert(await link.evaluate((el) => document.activeElement === el));- await page.keyboard.press('Enter');- } else await link.tap();- await page.waitForURL(origin + '/docs/VM_DISK_MONITORING');- await page.getByRole('heading', { name: 'Backup safety', exact: true }).waitFor();- assert(- (await page.locator('main').innerText()).includes(- 'Pulse monitoring and alerts are unavailable while it',- ),- );- assert((await page.locator('main').innerText()).includes('does not prove thaw succeeded'));- assert.equal(await page.locator('[data-dialog-layer]').count(), 0);- await page- .getByRole('heading', { name: 'Backup safety', exact: true })- .scrollIntoViewIfNeeded();- await capture('guidance');- checks.push(- 'keyboard/touch link opens actual shipped safety guidance and releases dialog isolation',- );- await page.goBack();- await badge.waitFor();- await activate(badge);- await settle();- // A fresh backup/absent lock/reporting agent must not clear uncertain request completion.- await refetch({- lock: '',- backupInProgress: false,- guestAgentStatus: 'available',- diskStatusReason: 'prev-agent-timeout',- });- await dialog.getByText(/Guest request timed out\. Completion is uncertain\./).waitFor();- assert(- (await dialog.innerText()).includes(- 'Confirm thaw and writes to the filesystems covered by the backup independently.',- ),- );- assert.equal(await dialog.locator('time').getAttribute('datetime'), time);- const mapped = await page.evaluate(() => window.__backupSafety.evidence());- assert.equal(mapped.agentKind, 'pulse');- assert.equal(mapped.agentStale, undefined); // the adapter omits a false stale flag- assert.equal(mapped.agentVersion, '6.5.0');- await settle();- await capture('uncertain');- checks.push('unlocked fresh backup plus reporting Pulse Agent cannot erase QGA uncertainty');- await noExtraReads(() => page.keyboard.press('Escape'));- await dialog.waitFor({ state: 'hidden' });- assert(await badge.evaluate((el) => document.activeElement === el));- await page.getByRole('button', { name: 'Hide Backup column' }).click();- const indicator = row.getByRole('button', { name: /^Last backup:/ });- await noExtraReads(() => activate(indicator));- await settle();- assert((await dialog.innerText()).includes('Completion is uncertain.'));- assert.equal(await dialog.locator('time').getAttribute('datetime'), time);- await capture('hidden-column');- checks.push(- 'hidden-column shield shows identical safety/completion evidence without row dispatch',- );- await refetch({- guestAgentStatus: 'https://synthetic.invalid/private=fixture',- diskStatusReason: 'unrecognised-fixture-reason',- });- await dialog.getByText('Guest-agent reads: Unknown', { exact: true }).waitFor();- assert(!(await dialog.innerText()).includes('synthetic.invalid'));- assert(!(await dialog.innerText()).includes('unrecognised-fixture-reason'));- assert(!(await dialog.innerText()).includes('Completion is uncertain.'));- await refetch({ guestAgentStatus: 'available', diskStatusReason: '' });- await dialog.getByText('Guest-agent reads: Reported available', { exact: true }).waitFor();- assert.equal(await dialog.getByRole('link').count(), 0);- assert(!(await dialog.innerText()).includes('Completion is uncertain.'));- checks.push(- 'unknown raw values stay private; replacement availability withdraws old caution, never proves thaw',- );- await activate(close());- await dialog.waitFor({ state: 'hidden' });- assert(await indicator.evaluate((el) => document.activeElement === el));- const peer = page- .getByRole('region', { name: 'Guest 102 row' })- .getByRole('button', { name: /^Last backup:/ });- await activate(peer);- const peerDialog = page.getByRole('dialog', { name: 'Backup status details for healthy-peer' });- await peerDialog.getByText('Guest-agent reads: Reported available', { exact: true }).waitFor();- assert(!(await peerDialog.innerText()).includes('Completion is uncertain.'));- await peerDialog.getByRole('button', { name: 'Close backup details' }).click();- const container = page- .getByRole('region', { name: 'Guest 103 row' })- .getByRole('button', { name: /^Backup running now/ });- await activate(container);- const ctDialog = page.getByRole('dialog', {- name: 'Backup status details for linux-container',- });- await ctDialog.waitFor();- assert(!(await ctDialog.innerText()).includes('Guest-agent reads:'));- await ctDialog.getByRole('button', { name: 'Close backup details' }).click();- assert.equal(- await page- .getByRole('region', { name: 'Guest 104 row' })- .getByRole('button', { name: /backup/i })- .count(),- 0,- );- checks.push('peer, LXC and vSphere retain independent interpretation and provider scope');- await activate(indicator);- await settle();- primaryPresent = false;- await page.evaluate(() => window.__backupSafety.refetch());- await dialog.waitFor({ state: 'hidden' });- assert.equal(await page.locator('[data-dialog-layer]').count(), 0);- assert.equal(- await page.locator('main').evaluate((el) => el.closest('body > *').hasAttribute('inert')),- false,- );- assert.equal(await page.evaluate(() => document.body.style.overflow), '');- checks.push('resource removal unmounts disclosure and restores background scrolling/inertness');- assert.equal(await page.evaluate(() => window.__backupSafety.actions()), 0);- await page- .getByRole('region', { name: 'Guest 102 row' })- .getByText('healthy-peer', { exact: true })- .click();- assert.equal(await page.evaluate(() => window.__backupSafety.actions()), 1);- assert.deepEqual(errors, []);- assert(- !queries.some((query) => /\/agent|probe|diagnostic|backup|history/.test(query)),- 'no collector, history or live-probe reads',- );- assert(- await page.locator('main').evaluate((el) => el.scrollWidth <= window.innerWidth),- 'no horizontal overflow',- );- result.results.push({- name: spec.name,- browser: browser.version(),- viewport: { width: spec.width, height: spec.height },- colorScheme: spec.colorScheme,- checks,- mappedEvidence: evidence,- queries,- errors,- });- await page.close();- await browser.close();- browser = undefined;- }- result.result = 'passed';-})()- .catch(async (error) => {- result.result = 'failed';- result.errors.push(error.stack || String(error));- process.exitCode = 1;- if (browser) {- const pages = browser.contexts().flatMap((context) => context.pages());- if (pages[0])- await pages[0]- .screenshot({ path: path.join(output, 'failure.png'), fullPage: true })- .catch(() => {});- }- })- .finally(async () => {- if (browser) await browser.close();- result.cleanup.browserClosed = true;- if (server)- await new Promise((resolve, reject) =>- server.close((error) => (error ? reject(error) : resolve())),- );- result.cleanup.serverClosed = true;- fs.writeFileSync(path.join(output, 'result.json'), JSON.stringify(result, null, 2) + '\n');- console.log(- JSON.stringify({- result: result.result,- viewports: result.results.length,- checks: result.results.reduce((count, entry) => count + entry.checks.length, 0),- captures: result.captures.length,- errors: result.errors,- cleanup: result.cleanup,- }),- );- });diff --git a/frontend-modern/browser-tests/backup-safety.html b/frontend-modern/browser-tests/backup-safety.htmldeleted file mode 100644index 86d66d68a8..0000000000--- a/frontend-modern/browser-tests/backup-safety.html+++ /dev/null@@ -1,12 +0,0 @@-<!doctype html>-<html lang="en">- <head>- <meta charset="UTF-8" />- <meta name="viewport" content="width=device-width, initial-scale=1.0" />- <title>Backup guest-safety verification</title>- </head>- <body>- <div id="root"></div>- <script type="module" src="./backup-safety.tsx"></script>- </body>-</html>diff --git a/frontend-modern/browser-tests/backup-safety.tsx b/frontend-modern/browser-tests/backup-safety.tsxdeleted file mode 100644index c8228c6f08..0000000000--- a/frontend-modern/browser-tests/backup-safety.tsx+++ /dev/null@@ -1,101 +0,0 @@-// Canonical Resources API -> useWorkloads -> production row and backup disclosure.-// Synthetic observations only: no backup, guest request, thaw or recovery action.-import { createSignal, For, Show } from 'solid-js';-import { render } from 'solid-js/web';-import { Router, Route } from '@solidjs/router';-import { useWorkloads } from '../src/hooks/useWorkloads';-import { GuestRow } from '../src/components/Workloads/GuestRow';-import { GuestDrawer } from '../src/components/Workloads/GuestDrawer';-import Docs from '../src/pages/Docs';-import { DarkModeContext } from '../src/contexts/appRuntime';-import '../src/index.css';--function Fixture() {- const state = useWorkloads(() => true);- const [showBackup, setShowBackup] = createSignal(true);- const [actions, setActions] = createSignal(0);- const [expanded, setExpanded] = createSignal(false);- const primary = () => state.workloads().find((guest) => guest.vmid === 101);- const layout = window.innerWidth <= 768 ? 'phone' : 'wide';- (window as any).__backupSafety = {- refetch: state.refetch,- evidence: () => primary(),- actions,- expanded,- };- return (- <main class="min-h-screen space-y-3 bg-surface p-3 text-base-content pulse-wide-data-surface">- <h1 class="text-base font-semibold">Backup completion and guest safety</h1>- <p class="text-xs text-muted">Synthetic resource observations; no guest commands.</p>- <button- class="min-h-11 rounded-sm border border-border px-3 text-xs"- onClick={() => setShowBackup(!showBackup())}- >- {showBackup() ? 'Hide Backup column' : 'Show Backup column'}- </button>- <For each={[101, 102, 103, 104]}>- {(vmid) => {- const guest = () => state.workloads().find((value) => value.vmid === vmid);- return (- <Show when={guest()}>- <section aria-label={`Guest ${vmid} row`}>- <table class="w-full table-fixed workload-table">- <tbody>- <GuestRow- guest={guest()!}- visibleColumnIds={showBackup() ? ['name', 'backup'] : ['name']}- workloadTableLayoutMode={layout}- isExpanded={vmid === 101 && expanded()}- onClick={() => {- setActions((value) => value + 1);- if (vmid === 101) setExpanded((value) => !value);- }}- />- </tbody>- </table>- </section>- </Show>- );- }}- </For>- <Show when={expanded() && primary()}>- <section aria-label="Guest details">- <GuestDrawer guest={primary()!} onClose={() => setExpanded(false)} />- </section>- </Show>- <p role="status" aria-label="Row action count">- {actions()}- </p>- </main>- );-}-const WithDarkMode = (props: { children: any }) => (- <DarkModeContext.Provider value={() => document.documentElement.classList.contains('dark')}>- {props.children}- </DarkModeContext.Provider>-);-render(- () => (- <Router>- <Route- path="/docs/*docPath"- component={() => (- <WithDarkMode>- <main class="min-h-screen bg-surface p-3 text-base-content">- <Docs />- </main>- </WithDarkMode>- )}- />- <Route- path="*"- component={() => (- <WithDarkMode>- <Fixture />- </WithDarkMode>- )}- />- </Router>- ),- document.getElementById('root')!,-);diff --git a/frontend-modern/browser-tests/build-backup-date-observation.mjs b/frontend-modern/browser-tests/build-backup-date-observation.mjsdeleted file mode 100644index 6312d2e5fb..0000000000--- a/frontend-modern/browser-tests/build-backup-date-observation.mjs+++ /dev/null@@ -1,70 +0,0 @@-// Compile the production consumer outside the bounded browser process tree.-import { build } from 'vite';-import solid from 'vite-plugin-solid';-import tailwindcss from '@tailwindcss/vite';-import { stop } from 'esbuild';-import fs from 'node:fs';-import path from 'node:path';-import crypto from 'node:crypto';-import { fileURLToPath } from 'node:url';--const root = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..');-const outDir = path.resolve(root, '../tmp/backup-date-static');-const hash = (bytes) => crypto.createHash('sha256').update(bytes).digest('hex');-const sources = {};-const artifacts = {};--try {- await build({- root,- base: '/',- configFile: false,- publicDir: false,- resolve: { alias: { '@': path.join(root, 'src') } },- plugins: [- {- name: 'bind-backup-date-consumer',- generateBundle() {- for (const id of this.getModuleIds()) {- const file = id.split('?')[0];- if (- file.startsWith(root + '/') &&- !file.includes('/node_modules/') &&- fs.existsSync(file) &&- fs.statSync(file).isFile()- ) {- sources[path.relative(root, file)] = hash(fs.readFileSync(file));- }- }- },- },- tailwindcss(),- solid(),- ],- build: {- target: 'esnext',- outDir,- emptyOutDir: true,- rollupOptions: { input: path.join(root, 'browser-tests/backup-date-observation.html') },- },- });- const walk = (dir) => {- for (const entry of fs.readdirSync(dir, { withFileTypes: true })) {- const file = path.join(dir, entry.name);- if (entry.isDirectory()) walk(file);- else artifacts[path.relative(outDir, file)] = hash(fs.readFileSync(file));- }- };- walk(outDir);- fs.writeFileSync(- path.join(outDir, 'binding.json'),- JSON.stringify({- graph: hash(fs.readFileSync(path.join(root, 'package-lock.json'))),- builder: hash(fs.readFileSync(fileURLToPath(import.meta.url))),- sources,- artifacts,- }, null, 2) + '\n',- );-} finally {- stop();-}diff --git a/frontend-modern/browser-tests/build-backup-safety.mjs b/frontend-modern/browser-tests/build-backup-safety.mjsdeleted file mode 100644index da21a3e819..0000000000--- a/frontend-modern/browser-tests/build-backup-safety.mjs+++ /dev/null@@ -1,92 +0,0 @@-// Compile the real backup-safety fixture before bounded browser execution.-// Only a bounded static preview runs in the browser tree; no live compiler or guest command.-import { build } from 'vite';-import solid from 'vite-plugin-solid';-import tailwindcss from '@tailwindcss/vite';-import { stop } from 'esbuild';-import fs from 'node:fs';-import path from 'node:path';-import crypto from 'node:crypto';-import { fileURLToPath } from 'node:url';--const root = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..');-const output = path.resolve(root, '../tmp/backup-safety-static');-const hash = (data) => crypto.createHash('sha256').update(data).digest('hex');--try {- for (const variant of ['final']) {- const sources = {};- const artifacts = {};- const outDir = path.join(output, variant);- await build({- root,- // Root-relative assets keep the real shipped Docs viewer functional in a new tab.- base: '/',- configFile: false,- publicDir: false,- plugins: [- {- name: 'exact-backup-safety-fixture-binding',- enforce: 'pre',- generateBundle(_options, bundle) {- for (const id of this.getModuleIds()) {- if (!id.startsWith(root + '/') || id.includes('/node_modules/')) continue;- const file = id.split('?')[0];- if (!fs.existsSync(file) || !fs.statSync(file).isFile()) continue;- sources[path.relative(root, file)] = hash(fs.readFileSync(file));- }- for (const [file, asset] of Object.entries(bundle)) {- artifacts[file] = hash(asset.type === 'chunk' ? asset.code : asset.source);- }- },- },- tailwindcss(),- solid(),- ],- resolve: {- alias: { '@': path.join(root, 'src') },- conditions: ['import', 'browser', 'default'],- },- build: {- // Match the application's declared target, not Vite's older default.- target: 'esnext',- outDir,- emptyOutDir: true,- rollupOptions: { input: path.join(root, 'browser-tests/backup-safety.html') },- },- });- const doc = 'public/docs/VM_DISK_MONITORING.md';- const docBytes = fs.readFileSync(path.join(root, doc));- sources[doc] = hash(docBytes);- fs.mkdirSync(path.join(outDir, 'docs'), { recursive: true });- fs.writeFileSync(path.join(outDir, 'docs/VM_DISK_MONITORING.md'), docBytes);- sources['browser-tests/build-backup-safety.mjs'] = hash(- fs.readFileSync(fileURLToPath(import.meta.url)),- );- // Hash the bytes actually written, including HTML post-processing.- const walk = (dir) => {- for (const entry of fs.readdirSync(dir, { withFileTypes: true })) {- const file = path.join(dir, entry.name);- if (entry.isDirectory()) walk(file);- else artifacts[path.relative(outDir, file)] = hash(fs.readFileSync(file));- }- };- walk(outDir);- fs.writeFileSync(- path.join(outDir, 'binding.json'),- JSON.stringify(- {- variant,- graph: hash(fs.readFileSync(path.join(root, 'package-lock.json'))),- builder: hash(fs.readFileSync(fileURLToPath(import.meta.url))),- sources,- artifacts,- },- null,- 2,- ) + '\n',- );- }-} finally {- stop();-}diff --git a/frontend-modern/browser-tests/build-drawer-integration.mjs b/frontend-modern/browser-tests/build-drawer-integration.mjsdeleted file mode 100644index d9315c5e72..0000000000--- a/frontend-modern/browser-tests/build-drawer-integration.mjs+++ /dev/null@@ -1,123 +0,0 @@-// Prepare a static production-component preview before bounded browser use.-// This is not the production build or browser proof. All served bytes and-// Tailwind inputs are bound; no compiler runs in the browser process tree.-import { build } from 'vite';-import solid from 'vite-plugin-solid';-import tailwindcss from '@tailwindcss/vite';-import { stop } from 'esbuild';-import fs from 'node:fs';-import path from 'node:path';-import crypto from 'node:crypto';-import { execFileSync } from 'node:child_process';-import { fileURLToPath } from 'node:url';-import sourceIdentity from './publication-fixture-source.cjs';--const root = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..');-const variant = process.argv[2];-if (!['parent', 'final'].includes(variant)) throw new Error('Expected parent or final');-const outDir = path.resolve(root, `../tmp/drawer-integration/${variant}-static`);-const hash = (bytes) => crypto.createHash('sha256').update(bytes).digest('hex');-const binding = {- ...sourceIdentity.publicationSourceIdentity(process.argv.slice(3), () =>- execFileSync('git', ['rev-parse', 'HEAD'], { cwd: root, encoding: 'utf8' }),- ),- variant,- graph: hash(fs.readFileSync(path.join(root, 'package-lock.json'))),- sources: {},- artifacts: {},-};-try {- await build({- root,- base: '/',- configFile: false,- publicDir: false,- plugins: [- {- name: 'notice-action-source-binding',- generateBundle() {- for (const id of this.getModuleIds()) {- const file = id.split('?')[0];- if (- file.startsWith(root + '/') &&- !file.includes('/node_modules/') &&- fs.existsSync(file) &&- fs.statSync(file).isFile()- )- binding.sources[path.relative(root, file)] = hash(fs.readFileSync(file));- }- for (const file of [- 'src/components/Workloads/GuestDrawerOverview.tsx',- 'src/components/Workloads/NodeDrawerOverview.tsx',- 'src/components/Workloads/guestDrawerModel.ts',- 'src/utils/proxmoxUpdateEvidence.ts',- ])- if (!binding.sources[file]) throw new Error(`Required consumer not compiled: ${file}`);- },- },- tailwindcss(),- solid(),- ],- resolve: {- alias: { '@': path.join(root, 'src') },- conditions: ['import', 'browser', 'default'],- },- build: {- target: 'esnext',- outDir,- emptyOutDir: true,- rollupOptions: { input: path.join(root, 'browser-tests/drawer-integration.html') },- },- });- const bind = (directory) => {- for (const entry of fs.readdirSync(directory, { withFileTypes: true })) {- const file = path.join(directory, entry.name);- if (entry.isDirectory()) bind(file);- else if (/\.(css|js|jsx|ts|tsx|html|mjs|cjs)$/.test(file))- binding.sources[path.relative(root, file)] = hash(fs.readFileSync(file));- }- };- bind(path.join(root, 'src'));- for (const file of [- 'browser-tests/drawer-integration.tsx',- 'browser-tests/drawer-integration.html',- 'browser-tests/build-drawer-integration.mjs',- 'browser-tests/drawer-integration.cjs',- ])- binding.sources[file] = hash(fs.readFileSync(path.join(root, file)));- for (const file of [- 'index.html',- 'package.json',- 'package-lock.json',- 'tsconfig.json',- 'public/docs/VM_DISK_MONITORING.md',- ])- binding.sources[file] = hash(fs.readFileSync(path.join(root, file)));- fs.mkdirSync(path.join(outDir, 'docs'), { recursive: true });- for (const doc of ['VM_DISK_MONITORING.md', 'TROUBLESHOOTING.md'])- fs.copyFileSync(path.join(root, 'public/docs', doc), path.join(outDir, 'docs', doc));- const producer = path.join(process.env.PULSE_PROOF_INPUTS ?? '', 'temperature.json');- if (!fs.existsSync(producer))- throw new Error('Exact containing temperature producer input missing');- fs.copyFileSync(producer, path.join(outDir, 'temperature-producer.json'));- binding.temperatureProducer = hash(fs.readFileSync(producer));- const artifacts = (directory) => {- for (const entry of fs.readdirSync(directory, { withFileTypes: true })) {- const file = path.join(directory, entry.name);- if (entry.isDirectory()) artifacts(file);- else binding.artifacts[path.relative(outDir, file)] = hash(fs.readFileSync(file));- }- };- artifacts(outDir);- fs.writeFileSync(path.join(outDir, 'binding.json'), JSON.stringify(binding, null, 2) + '\n');- console.log(- JSON.stringify({- variant,- source: binding.source_sha,- source_inputs: Object.keys(binding.sources).length,- artifacts: Object.keys(binding.artifacts).length,- }),- );-} finally {- stop();-}diff --git a/frontend-modern/browser-tests/build-drawer-reading-access.mjs b/frontend-modern/browser-tests/build-drawer-reading-access.mjsdeleted file mode 100644index 85cc825915..0000000000--- a/frontend-modern/browser-tests/build-drawer-reading-access.mjs+++ /dev/null@@ -1,84 +0,0 @@-// Compile the real drawer-reading-access fixture before bounded browser execution.-// Only a bounded static preview runs in the browser tree; no live compiler or guest command.-import { build } from 'vite';-import solid from 'vite-plugin-solid';-import tailwindcss from '@tailwindcss/vite';-import { stop } from 'esbuild';-import fs from 'node:fs';-import path from 'node:path';-import crypto from 'node:crypto';-import { fileURLToPath } from 'node:url';--const root = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..');-const output = path.resolve(root, '../tmp/drawer-reading-static');-const hash = (data) => crypto.createHash('sha256').update(data).digest('hex');--try {- for (const variant of ['final']) {- const sources = {};- const artifacts = {};- const outDir = path.join(output, variant);- await build({- root,- // Root-relative assets keep the real shipped Docs viewer functional in a new tab.- base: '/',- configFile: false,- publicDir: false,- plugins: [- {- name: 'exact-drawer-reading-access-fixture-binding',- enforce: 'pre',- generateBundle(_options, bundle) {- for (const id of this.getModuleIds()) {- if (!id.startsWith(root + '/') || id.includes('/node_modules/')) continue;- const file = id.split('?')[0];- if (!fs.existsSync(file) || !fs.statSync(file).isFile()) continue;- sources[path.relative(root, file)] = hash(fs.readFileSync(file));- }- for (const [file, asset] of Object.entries(bundle)) {- artifacts[file] = hash(asset.type === 'chunk' ? asset.code : asset.source);- }- },- },- tailwindcss(),- solid(),- ],- resolve: {- alias: { '@': path.join(root, 'src') },- conditions: ['import', 'browser', 'default'],- },- build: {- // Match the application's declared target, not Vite's older default.- target: 'esnext',- outDir,- emptyOutDir: true,- rollupOptions: { input: path.join(root, 'browser-tests/drawer-reading-access.html') },- },- });- // Hash the bytes actually written, including HTML post-processing.- const walk = (dir) => {- for (const entry of fs.readdirSync(dir, { withFileTypes: true })) {- const file = path.join(dir, entry.name);- if (entry.isDirectory()) walk(file);- else artifacts[path.relative(outDir, file)] = hash(fs.readFileSync(file));- }- };- walk(outDir);- fs.writeFileSync(- path.join(outDir, 'binding.json'),- JSON.stringify(- {- variant,- graph: hash(fs.readFileSync(path.join(root, 'package-lock.json'))),- builder: hash(fs.readFileSync(fileURLToPath(import.meta.url))),- sources,- artifacts,- },- null,- 2,- ) + '\n',- );- }-} finally {- stop();-}diff --git a/frontend-modern/browser-tests/build-inline-notice-access.mjs b/frontend-modern/browser-tests/build-inline-notice-access.mjsdeleted file mode 100644index b263e56da7..0000000000--- a/frontend-modern/browser-tests/build-inline-notice-access.mjs+++ /dev/null@@ -1,66 +0,0 @@-// Prepare a static production-component preview before bounded browser use.-// This is not the production build or browser proof. All served bytes and-// Tailwind inputs are bound; no compiler runs in the browser process tree.-import { build } from 'vite';-import solid from 'vite-plugin-solid';-import tailwindcss from '@tailwindcss/vite';-import { stop } from 'esbuild';-import fs from 'node:fs';-import path from 'node:path';-import crypto from 'node:crypto';-import { execFileSync } from 'node:child_process';-import { fileURLToPath } from 'node:url';-import sourceIdentity from './publication-fixture-source.cjs';--const root = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..');-const variant = process.argv[2];-if (!['parent', 'final'].includes(variant)) throw new Error('Expected parent or final');-const outDir = path.resolve(root, `../tmp/inline-notice-access/${variant}-static`);-const hash = (bytes) => crypto.createHash('sha256').update(bytes).digest('hex');-const binding = {- ...sourceIdentity.publicationSourceIdentity(process.argv.slice(3), () =>- execFileSync('git', ['rev-parse', 'HEAD'], { cwd: root, encoding: 'utf8' }),- ),- variant, graph: hash(fs.readFileSync(path.join(root, 'package-lock.json'))), sources: {}, artifacts: {},-};-try {- await build({- root, base: '/', configFile: false, publicDir: false,- plugins: [{- name: 'notice-action-source-binding', generateBundle() {- for (const id of this.getModuleIds()) {- const file = id.split('?')[0];- if (file.startsWith(root + '/') && !file.includes('/node_modules/') && fs.existsSync(file) && fs.statSync(file).isFile())- binding.sources[path.relative(root, file)] = hash(fs.readFileSync(file));- }- for (const file of ['src/components/shared/InlineNotice.tsx', 'src/components/Workloads/GuestDrawer.tsx', 'src/components/Infrastructure/ResourceDetailDrawer.tsx', 'src/components/Settings/RolesPanel.tsx', 'src/components/Settings/UserAssignmentsPanel.tsx', 'src/pages/Docs.tsx', 'src/components/Workloads/NodeDrawer.tsx'])- if (!binding.sources[file]) throw new Error(`Required consumer not compiled: ${file}`);- },- }, tailwindcss(), solid()],- resolve: { alias: { '@': path.join(root, 'src') }, conditions: ['import', 'browser', 'default'] },- build: { target: 'esnext', outDir, emptyOutDir: true, rollupOptions: { input: [path.join(root, 'browser-tests/inline-notice-access.html'), path.join(root, 'browser-tests/drawer-composition.html')] } },- });- const bind = (directory) => {- for (const entry of fs.readdirSync(directory, { withFileTypes: true })) {- const file = path.join(directory, entry.name);- if (entry.isDirectory()) bind(file);- else if (/\.(css|js|jsx|ts|tsx|html|mjs|cjs)$/.test(file)) binding.sources[path.relative(root, file)] = hash(fs.readFileSync(file));- }- };- bind(path.join(root, 'src')); bind(path.join(root, 'browser-tests'));- for (const file of ['index.html', 'package.json', 'package-lock.json', 'tsconfig.json', 'public/docs/VM_DISK_MONITORING.md'])- binding.sources[file] = hash(fs.readFileSync(path.join(root, file)));- fs.mkdirSync(path.join(outDir, 'docs'), { recursive: true });- for (const doc of ['VM_DISK_MONITORING.md', 'TROUBLESHOOTING.md'])- fs.copyFileSync(path.join(root, 'public/docs', doc), path.join(outDir, 'docs', doc));- const artifacts = (directory) => {- for (const entry of fs.readdirSync(directory, { withFileTypes: true })) {- const file = path.join(directory, entry.name);- if (entry.isDirectory()) artifacts(file);- else binding.artifacts[path.relative(outDir, file)] = hash(fs.readFileSync(file));- }- };- artifacts(outDir);- fs.writeFileSync(path.join(outDir, 'binding.json'), JSON.stringify(binding, null, 2) + '\n');- console.log(JSON.stringify({ variant, source: binding.source_sha, source_inputs: Object.keys(binding.sources).length, artifacts: Object.keys(binding.artifacts).length }));-} finally { stop(); }diff --git a/frontend-modern/browser-tests/build-publication-reconciliation.mjs b/frontend-modern/browser-tests/build-publication-reconciliation.mjsdeleted file mode 100644index efd4be3fc4..0000000000--- a/frontend-modern/browser-tests/build-publication-reconciliation.mjs+++ /dev/null@@ -1,57 +0,0 @@-import { build } from 'vite';-import solid from 'vite-plugin-solid';-import tailwindcss from '@tailwindcss/vite';-import { stop } from 'esbuild';-import fs from 'node:fs';-import path from 'node:path';-import crypto from 'node:crypto';-import { fileURLToPath } from 'node:url';-const root = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..');-const outDir = path.resolve(root, '../tmp/publication-reconciliation-static');-const hash = (b) => crypto.createHash('sha256').update(b).digest('hex');-const binding = { sources: {}, artifacts: {} };-try {- await build({- root,- base: '/',- configFile: false,- publicDir: false,- plugins: [- solid(),- tailwindcss(),- {- name: 'bind-compiled-source',- generateBundle() {- for (const id of this.getModuleIds()) {- const f = id.split('?')[0];- if (- f.startsWith(root + '/') &&- !f.includes('/node_modules/') &&- fs.existsSync(f) &&- fs.statSync(f).isFile()- )- binding.sources[path.relative(root, f)] = hash(fs.readFileSync(f));- }- },- },- ],- resolve: { alias: { '@': path.join(root, 'src') } },- build: {- target: 'esnext',- outDir,- emptyOutDir: true,- rollupOptions: { input: path.join(root, 'browser-tests/publication-reconciliation.html') },- },- });- const walk = (d) => {- for (const f of fs.readdirSync(d)) {- const p = path.join(d, f);- if (fs.statSync(p).isDirectory()) walk(p);- else binding.artifacts[path.relative(outDir, p)] = hash(fs.readFileSync(p));- }- };- walk(outDir);- fs.writeFileSync(path.join(outDir, 'binding.json'), JSON.stringify(binding, null, 2) + '\n');-} finally {- stop();-}diff --git a/frontend-modern/browser-tests/build-snapshot-date-observation.mjs b/frontend-modern/browser-tests/build-snapshot-date-observation.mjsdeleted file mode 100644index c4ce129e24..0000000000--- a/frontend-modern/browser-tests/build-snapshot-date-observation.mjs+++ /dev/null@@ -1,70 +0,0 @@-// Compile the production consumer outside the bounded browser process tree.-import { build } from 'vite';-import solid from 'vite-plugin-solid';-import tailwindcss from '@tailwindcss/vite';-import { stop } from 'esbuild';-import fs from 'node:fs';-import path from 'node:path';-import crypto from 'node:crypto';-import { fileURLToPath } from 'node:url';--const root = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..');-const outDir = path.resolve(root, '../tmp/snapshot-date-static');-const hash = (bytes) => crypto.createHash('sha256').update(bytes).digest('hex');-const sources = {};-const artifacts = {};--try {- await build({- root,- base: '/',- configFile: false,- publicDir: false,- resolve: { alias: { '@': path.join(root, 'src') } },- plugins: [- {- name: 'bind-snapshot-date-consumer',- generateBundle() {- for (const id of this.getModuleIds()) {- const file = id.split('?')[0];- if (- file.startsWith(root + '/') &&- !file.includes('/node_modules/') &&- fs.existsSync(file) &&- fs.statSync(file).isFile()- ) {- sources[path.relative(root, file)] = hash(fs.readFileSync(file));- }- }- },- },- tailwindcss(),- solid(),- ],- build: {- target: 'esnext',- outDir,- emptyOutDir: true,- rollupOptions: { input: path.join(root, 'browser-tests/snapshot-date-observation.html') },- },- });- const walk = (dir) => {- for (const entry of fs.readdirSync(dir, { withFileTypes: true })) {- const file = path.join(dir, entry.name);- if (entry.isDirectory()) walk(file);- else artifacts[path.relative(outDir, file)] = hash(fs.readFileSync(file));- }- };- walk(outDir);- fs.writeFileSync(- path.join(outDir, 'binding.json'),- JSON.stringify({- graph: hash(fs.readFileSync(path.join(root, 'package-lock.json'))),- builder: hash(fs.readFileSync(fileURLToPath(import.meta.url))),- sources,- artifacts,- }, null, 2) + '\n',- );-} finally {- stop();-}diff --git a/frontend-modern/browser-tests/build-unix-private-install.mjs b/frontend-modern/browser-tests/build-unix-private-install.mjsdeleted file mode 100644index 62a3920a3e..0000000000--- a/frontend-modern/browser-tests/build-unix-private-install.mjs+++ /dev/null@@ -1,100 +0,0 @@-// Compile in the source-proof VM, not the bounded browser process tree.-// This is a consuming preview, not the production build or a native agent.-import { build } from 'vite';-import solid from 'vite-plugin-solid';-import tailwind from '@tailwindcss/vite';-import { stop } from 'esbuild';-import fs from 'node:fs';-import path from 'node:path';-import crypto from 'node:crypto';-import { execFileSync } from 'node:child_process';-import { fileURLToPath } from 'node:url';-import identity from './publication-fixture-source.cjs';--const root = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..');-const output = path.resolve(root, '../tmp/unix-private-install/static');-const hash = (bytes) => crypto.createHash('sha256').update(bytes).digest('hex');-const binding = {- ...identity.publicationSourceIdentity(process.argv.slice(2), () =>- execFileSync('git', ['rev-parse', 'HEAD'], { cwd: root, encoding: 'utf8' }),- ),- sources: {},- artifacts: {},-};-try {- await build({- root,- base: '/',- configFile: false,- publicDir: false,- plugins: [- {- name: 'private-input-consumer-binding',- generateBundle() {- for (const id of this.getModuleIds()) {- const file = id.split('?')[0];- if (- file.startsWith(root + '/') &&- !file.includes('/node_modules/') &&- fs.existsSync(file) &&- fs.statSync(file).isFile()- )- binding.sources[path.relative(root, file)] = hash(fs.readFileSync(file));- }- for (const file of [- 'src/utils/agentInstallCommand.ts',- 'src/components/Settings/infrastructureOperationsModel.tsx',- 'src/components/Settings/InfrastructureInstallerSection.tsx',- 'src/components/Settings/InfrastructureAgentDoctorPage.tsx',- 'src/components/Settings/useInfrastructureOperationsState.tsx',- 'src/components/Settings/useInfrastructureInstallState.tsx',- 'browser-tests/unix-private-install.tsx',- ])- if (!binding.sources[file]) throw new Error(`Consumer not compiled: ${file}`);- },- },- tailwind(),- solid(),- ],- resolve: { alias: { '@': path.join(root, 'src') } },- // This fixture targets the installed current browser, not a legacy-engine- // qualification. Match the other consuming preview's non-lowering target.- build: {- target: 'esnext',- outDir: output,- emptyOutDir: true,- rollupOptions: { input: path.join(root, 'browser-tests/unix-private-install.html') },- },- });- const bind = (directory) => {- for (const entry of fs.readdirSync(directory, { withFileTypes: true })) {- const file = path.join(directory, entry.name);- if (entry.isDirectory()) bind(file);- else if (/\.(css|js|jsx|ts|tsx|html|mjs|cjs)$/.test(file))- binding.sources[path.relative(root, file)] = hash(fs.readFileSync(file));- }- };- // Tailwind scans source beyond the consumer graph. Bind those inputs too.- bind(path.join(root, 'src'));- bind(path.join(root, 'browser-tests'));- for (const file of ['package.json', 'package-lock.json', 'tsconfig.json', 'index.html'])- binding.sources[file] = hash(fs.readFileSync(path.join(root, file)));- const artifacts = (directory) => {- for (const entry of fs.readdirSync(directory, { withFileTypes: true })) {- const file = path.join(directory, entry.name);- if (entry.isDirectory()) artifacts(file);- else binding.artifacts[path.relative(output, file)] = hash(fs.readFileSync(file));- }- };- artifacts(output);- fs.writeFileSync(path.join(output, 'binding.json'), JSON.stringify(binding, null, 2) + '\n');- console.log(- JSON.stringify({- source: binding.source_sha,- source_inputs: Object.keys(binding.sources).length,- artifacts: Object.keys(binding.artifacts).length,- }),- );-} finally {- stop();-}diff --git a/frontend-modern/browser-tests/combined-controls.cjs b/frontend-modern/browser-tests/combined-controls.cjsdeleted file mode 100644index 5daabd5a4f..0000000000--- a/frontend-modern/browser-tests/combined-controls.cjs+++ /dev/null@@ -1,268 +0,0 @@-// 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.htmldeleted file mode 100644index d127c72edf..0000000000--- a/frontend-modern/browser-tests/combined-controls.html+++ /dev/null@@ -1,12 +0,0 @@-<!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.tsxdeleted file mode 100644index 446aeabf9c..0000000000--- a/frontend-modern/browser-tests/combined-controls.tsx+++ /dev/null@@ -1,109 +0,0 @@-// 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-tests/composed-backups.cjs b/frontend-modern/browser-tests/composed-backups.cjsdeleted file mode 100644index e122af5292..0000000000--- a/frontend-modern/browser-tests/composed-backups.cjs+++ /dev/null@@ -1,333 +0,0 @@-// Production orchestration/table/CSS with synthetic read-only HTTP evidence.-// Confirms combined Tailwind rendering and source attribution, not native backup recovery.-const assert = require('node:assert/strict');-const fs = require('node:fs');-const path = require('node:path');-const crypto = require('node:crypto');-const { chromium, webkit } = require('playwright');-(async () => {- const root = '/workspace/frontend-modern';- const output = '/workspace/tmp/composed-backups-proof';- fs.mkdirSync(output, { recursive: true });- process.chdir(root);- const playwright = require('playwright/package.json').version;- assert.equal(- playwright,- JSON.parse(fs.readFileSync('/workspace/tests/integration/package-lock.json')).packages[- 'node_modules/@playwright/test'- ].version,- );- 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(output, 'vite-cache'),- server: { host: '127.0.0.1', port: 5295, strictPort: true },- });- const runtime = [- 'frontend-modern/src/features/proxmox/ProxmoxBackupsTable.tsx',- 'frontend-modern/src/features/proxmox/proxmoxBackupsTableShared.tsx',- ];- const content_sha256 = Object.fromEntries(- runtime.map((p) => [- p,- crypto- .createHash('sha256')- .update(fs.readFileSync(path.join('/workspace', p)))- .digest('hex'),- ]),- );- const observations = [];- let browser;- try {- await server.listen();- for (const [name, engine, phone] of [- ['chromium-desktop', chromium, false],- ['webkit-phone', webkit, true],- ]) {- browser = await engine.launch(- engine === chromium- ? { headless: true, channel: 'chromium', args: ['--no-sandbox'] }- : { headless: true },- );- const page = await browser.newPage({- viewport: phone ? { width: 390, height: 844 } : { width: 1365, height: 900 },- hasTouch: phone,- isMobile: phone,- locale: 'en-GB',- timezoneId: 'UTC',- });- page.setDefaultTimeout(20000);- await page.clock.setFixedTime(new Date('2026-10-03T12:00:00Z'));- const errors = [],- requests = [],- offOrigin = [],- checks = [],- screenshots = [];- const now = '2026-10-03T12:00:00Z';- const workload = {- id: 'ct-310',- type: 'system-container',- name: 'artifact-cache-310',- displayName: 'artifact-cache-310',- platformId: 'fixture-estate',- platformType: 'proxmox-pve',- sourceType: 'api',- status: 'running',- lastSeen: now,- proxmox: { vmid: 310, node: 'pve-edge', instance: 'homelab' },- };- const archive = {- id: 'file-310',- storage: 'local',- node: 'pve-edge',- instance: 'homelab',- type: 'ct',- vmid: 310,- time: '2026-09-20T02:00:00Z',- ctime: Date.parse('2026-09-20T02:00:00Z') / 1000,- size: 1048576,- format: 'tar.zst',- protected: false,- volid: 'local:backup/vzdump-lxc-310-2026_09_20-02_00_00.tar.zst',- isPBS: false,- verified: false,- };- const snapshot = {- id: 'snap-310',- name: 'fresh-local-snapshot',- node: 'pve-edge',- instance: 'homelab',- type: 'ct',- vmid: 310,- time: '2026-10-03T11:30:00Z',- vmstate: false,- };- page.on('pageerror', (error) => errors.push(error.message));- await page.route('**/*', (route) => {- const request = route.request(),- url = new URL(request.url());- if (url.origin !== 'http://127.0.0.1:5295') {- offOrigin.push(url.origin);- return route.abort();- }- if (url.pathname === '/fixture/workloads') return route.fulfill({ json: [workload] });- if (!url.pathname.startsWith('/api/')) return route.continue();- requests.push({ path: url.pathname, method: request.method() });- assert.equal(request.method(), 'GET');- if (url.pathname === '/api/backups/pve')- return route.fulfill({- json: {- data: { backupTasks: [], storageBackups: [archive], guestSnapshots: [snapshot] },- },- });- if (url.pathname === '/api/backups/pbs')- return route.fulfill({ json: { data: { backups: [] } } });- if (url.pathname === '/api/recovery/postures')- return route.fulfill({- json: {- data: [],- policy: {- freshnessWindowSeconds: 0,- verificationWindowSeconds: 0,- requireVerification: false,- },- meta: { page: 1, limit: 200, total: 0, totalPages: 0 },- },- });- return route.fulfill({- json:- url.pathname === '/api/license/runtime-capabilities'- ? {- capabilities: [],- limits: [],- max_history_days: 7,- hosted_mode: false,- runtime: { build: 'community' },- blocked_capabilities: [],- }- : { data: [], enabled: false },- });- });- try {- await page.goto('http://127.0.0.1:5295/browser-tests/backups.html', {- waitUntil: 'domcontentloaded',- timeout: 120000,- });- if (phone) await page.evaluate(() => document.documentElement.classList.add('dark'));- const capture = async (state) => {- await page.waitForTimeout(100);- const dimensions = await page.evaluate(() => ({- width: innerWidth,- scroll: document.documentElement.scrollWidth,- }));- assert.equal(- dimensions.width,- phone ? 390 : 1365,- 'actual CSS viewport, not only Playwright emulation',- );- assert.ok(dimensions.scroll <= dimensions.width + 1, JSON.stringify(dimensions));- const file = `${name}-${state}.png`;- await page.screenshot({ path: path.join(output, file), fullPage: true });- screenshots.push({ file, dimensions });- };- await page.getByRole('link', { name: 'By date', exact: true }).click();- const byDate = page.locator('[data-proxmox-backups-table="recoverable"]');- await byDate.getByText('artifact-cache-310', { exact: true }).first().waitFor();- await capture('by-date-diagnostic');- fs.writeFileSync(- path.join(output, `${name}-by-date-diagnostic.json`),- JSON.stringify({ text: await byDate.innerText(), requests, errors }, null, 2),- );- if (!phone) {- await byDate.getByText('tar.zst', { exact: true }).waitFor();- assert.ok(await byDate.locator(`[title="${archive.volid}"]`).count());- }- checks.push(- 'Explicit by-date navigation retains source, archive format and complete wide identifier',- );- await capture('by-date');- await page.getByRole('link', { name: 'Coverage', exact: true }).click();- const coverage = page.locator('[data-proxmox-backups-table="coverage"]');- await coverage.getByText('artifact-cache-310', { exact: true }).waitFor();- const columns = await coverage- .locator('colgroup col')- .evaluateAll((elements) => elements.map((e) => e.dataset.proxmoxBackupsColumn));- const row = coverage.locator('tr[data-proxmox-backup-row="coverage"]').first();- const backupAge = await row.locator('td').nth(columns.indexOf('latest')).innerText();- assert.ok(backupAge.includes('13d'), backupAge);- assert.ok(!backupAge.includes('30m'), backupAge);- if (columns.includes('snapshot'))- assert.ok(- (await row.locator('td').nth(columns.indexOf('snapshot')).innerText()).includes('30m'),- );- checks.push('Fresh local guest snapshot does not masquerade as a recent backup');- await capture('coverage');- const search = page.getByPlaceholder('Search backups by workload, node, source, or status');- await search.fill('non-existent-fixture');- await page- .getByText('No workload coverage rows match current filters', { exact: true })- .waitFor();- await search.fill('artifact-cache');- await coverage.getByText('artifact-cache-310', { exact: true }).waitFor();- checks.push('Coverage route query filters and recovery preserve the target');- if (phone && !(await page.getByRole('combobox', { name: 'Filter', exact: true }).count()))- await page.getByRole('button', { name: /^Filters/ }).click();- await page- .getByRole('combobox', { name: 'Filter', exact: true })- .selectOption({ label: 'Backup location: homelab / pve-edge' });- await page.waitForFunction(- () => new URL(location.href).searchParams.get('location') === 'snapshot:homelab:pve-edge',- );- const scopedColumns = await coverage- .locator('colgroup col')- .evaluateAll((elements) => elements.map((e) => e.dataset.proxmoxBackupsColumn));- const scopedAge = row.locator('td').nth(scopedColumns.indexOf('latest'));- await scopedAge.getByText('None', { exact: true }).waitFor();- assert.ok(- (await scopedAge.locator('span[title]').getAttribute('title')).includes(- 'A snapshot is not a separate backup, so it does not count.',- ),- );- checks.push(- 'Snapshot-only location scope reports no independent backup, not a fresh restore promise',- );- await capture('snapshot-only-location');- if (- phone &&- !(await page- .getByRole('button', { name: 'Remove Backup location filter', exact: true })- .count())- )- await page.getByRole('button', { name: /^Filters/ }).click();- await page- .getByRole('button', { name: 'Remove Backup location filter', exact: true })- .click();- await page.waitForFunction(() => !new URL(location.href).searchParams.has('location'));- await row- .locator('td')- .nth(columns.indexOf('latest'))- .getByText(phone ? '13d' : '13d ago', { exact: true })- .waitFor();- checks.push('Removing location scope restores the independently dated archive');- assert.deepEqual(errors, []);- assert.deepEqual(offOrigin, []);- assert.ok(- requests.some((r) => r.path === '/api/backups/pve') &&- requests.some((r) => r.path === '/api/backups/pbs'),- );- observations.push({- name,- browser: browser.version(),- viewport: page.viewportSize(),- checks,- requests,- errors,- offOrigin,- screenshots,- });- } catch (error) {- fs.writeFileSync(- path.join(output, `${name}-failure.json`),- JSON.stringify(- {- error: error.message,- text: await page.locator('body').innerText(),- url: page.url(),- requests,- errors,- offOrigin,- },- null,- 2,- ),- );- await page.screenshot({ path: path.join(output, `${name}-failure.png`), fullPage: true });- throw error;- }- await browser.close();- browser = null;- }- fs.writeFileSync(- path.join(output, 'result.json'),- JSON.stringify(- {- passed: true,- playwright,- content_sha256,- harness_sha256: crypto- .createHash('sha256')- .update(fs.readFileSync(__filename))- .digest('hex'),- fixture_sha256: Object.fromEntries(- ['backups.html', 'backups.tsx'].map((file) => [- file,- crypto- .createHash('sha256')- .update(fs.readFileSync(path.join(root, 'browser-tests', file)))- .digest('hex'),- ]),- ),- observations,- limitation:- 'Synthetic production component rendering, not native backup, QGA/thaw, installation or shipment.',- },- null,- 2,- ),- );- console.log(- JSON.stringify({- passed: true,- browsers: observations.length,- checks: observations.reduce((n, o) => n + o.checks.length, 0),- }),- );- } finally {- if (browser) await browser.close();- await server.close();- }-})().catch((error) => {- console.error(error);- process.exitCode = 1;-});diff --git a/frontend-modern/browser-tests/composed-disk-labels.cjs b/frontend-modern/browser-tests/composed-disk-labels.cjsdeleted file mode 100644index fe629a89ee..0000000000--- a/frontend-modern/browser-tests/composed-disk-labels.cjs+++ /dev/null@@ -1,313 +0,0 @@-const assert = require('node:assert/strict');-const fs = require('node:fs');-const path = require('node:path');-const crypto = require('node:crypto');-const { chromium, webkit } = require('playwright');--const root = '/workspace/frontend-modern';-const output = '/workspace/tmp/composed-disk-labels-settled';-const sha256 = (bytes) => crypto.createHash('sha256').update(bytes).digest('hex');-const runtime = [- 'frontend-modern/src/components/Workloads/stackedDiskBarModel.ts',- 'frontend-modern/src/components/Workloads/StackedDiskBar.tsx',- 'frontend-modern/src/components/Workloads/useStackedDiskBarState.ts',- 'frontend-modern/src/components/Workloads/GuestRow.tsx',- 'frontend-modern/src/components/Workloads/GuestDrawerOverview.tsx',- 'frontend-modern/src/components/Workloads/DiskList.tsx',- 'frontend-modern/src/utils/workloadGuestPresentation.ts',- 'frontend-modern/src/utils/format.ts',- 'frontend-modern/src/index.css',-];--(async () => {- fs.mkdirSync(output, { recursive: true });- const playwrightVersion = require('playwright/package.json').version;- assert.equal(- playwrightVersion,- JSON.parse(fs.readFileSync('/workspace/tests/integration/package-lock.json')).packages[- 'node_modules/@playwright/test'- ].version,- );- const hashes = Object.fromEntries(- runtime.map((file) => [file, sha256(fs.readFileSync(path.join('/workspace', file)))]),- );- assert.equal(- hashes[runtime[0]],- '9f50f630df8379673032052970e7cc6d287c02ecd212b3df5d16f1032be42413',- );- 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(output, 'vite-cache'),- server: { host: '127.0.0.1', port: 5301, strictPort: true },- });- const results = [],- screenshots = [];- let browser;- try {- await server.listen();- for (const [name, engine, width, dark] of [- ['chromium-desktop', chromium, 1365, false],- ['webkit-phone', webkit, 390, true],- ]) {- browser = await engine.launch(- engine === chromium- ? { headless: true, channel: 'chromium', args: ['--no-sandbox'] }- : { headless: true },- );- const context = await browser.newContext({- viewport: { width, height: width === 390 ? 844 : 900 },- isMobile: width === 390,- hasTouch: width === 390,- locale: 'en-GB',- timezoneId: 'UTC',- });- const page = await context.newPage();- page.setDefaultTimeout(15000);- page.setDefaultNavigationTimeout(60000);- const errors = [],- requests = [],- checks = [],- fits = [];- page.on('pageerror', (error) => errors.push(error.message));- page.on('request', (request) =>- requests.push({- method: request.method(),- pathname: new URL(request.url()).pathname,- origin: new URL(request.url()).origin,- }),- );- await page.route('http://127.0.0.1:5301/api/**', (route) =>- route.fulfill({- status: 200,- contentType: 'application/json',- body: JSON.stringify({- success: true,- data: [],- alerts: [],- anomalies: [],- config: null,- }),- }),- );- await page.addInitScript((value) => {- document.addEventListener('DOMContentLoaded', () => {- if (value) document.documentElement.classList.add('dark');- });- }, dark);- const capture = async (state) => {- const file = path.join(output, `${name}-${state}.png`);- await page.screenshot({ path: file, fullPage: true });- screenshots.push({- path: path.relative('/workspace', file),- sha256: sha256(fs.readFileSync(file)),- });- };- const settle = () =>- page.evaluate(- () =>- new Promise((resolve) => requestAnimationFrame(() => requestAnimationFrame(resolve))),- );- await page.goto('http://127.0.0.1:5301/browser-tests/composed-disk-labels.html');- await page.waitForFunction(() => window.__composedDiskLabels);- await settle();- const checkFit = async (expectedWidth, roomy) => {- await page.waitForFunction(- (value) =>- Math.abs(- document.querySelector('[data-fit="single"]').getBoundingClientRect().width - value,- ) < 0.5,- expectedWidth,- );- await settle();- const state = await page.evaluate(() => {- const boxes = [...document.querySelectorAll('[data-fit]')].map((box) => {- const id = box.getAttribute('data-fit');- const labels = [...box.querySelectorAll('span.whitespace-nowrap')];- return {- id,- width: box.getBoundingClientRect().width,- text: box.innerText,- labels: labels.map((label) => ({- text: label.textContent,- scroll: label.scrollWidth,- client: label.clientWidth,- })),- sublabels: box.querySelectorAll('.metric-sublabel').length,- };- });- return { boxes, presentation: window.__composedDiskLabels.presentation() };- });- for (const box of state.boxes) {- for (const label of box.labels)- assert(- label.scroll <= label.client + 1,- `${name} ${box.id} ${expectedWidth}: rendered label must fit, not be ellipsised`,- );- }- for (const id of ['single', 'anomaly', 'aggregate']) {- const box = state.boxes.find((item) => item.id === id);- assert.equal(box.sublabels, roomy ? 1 : 0, `${id}: optional detail matches actual width`);- }- assert.equal(state.presentation.single.displayLabel, '60%');- assert.equal(state.presentation.anomaly.anomalyRatio, '2.5x');- assert.equal(state.presentation.aggregate.showDiskCount, true);- assert.equal(- await page.locator('[data-fit="vertical"] [data-stacked-disk-max-label]').innerText(),- '67%',- );- assert.equal(- await page.locator('[data-fit="vertical"] [data-stacked-disk-fill="vertical"]').count(),- 2,- );- fits.push({ width: expectedWidth, boxes: state.boxes });- };- await checkFit(100, false);- const compactInline = await page.locator('[data-fit="inline"]').innerText();- assert(!compactInline.includes('MMMM'));- assert(compactInline.includes('iiii 67%'));- await capture('compact');- const roomyButton = page.getByRole('button', { name: 'Use roomy bars', exact: true });- if (engine === chromium) {- await roomyButton.focus();- await page.keyboard.press('Enter');- } else await roomyButton.tap();- await checkFit(320, true);- assert((await page.locator('[data-fit="inline"]').innerText()).includes('MMMM 50%'));- assert((await page.locator('[data-fit="inline"]').innerText()).includes('iiii 67%'));- await capture('roomy');- checks.push(- 'ResizeObserver drops optional detail at 100px and shows complete un-clipped single/anomaly/max/count and inline labels at 320px; vertical max remains truthful',- );- if (engine === chromium) {- await page.locator('[data-fit="single"] [data-stacked-disk-trigger]').hover();- const tip = page.locator('[data-tooltip-portal="true"]');- await tip.waitFor({ state: 'visible' });- assert((await tip.innerText()).includes('Guest reads paused while a backup is running.'));- assert((await tip.innerText()).includes('/data'));- await page.locator('h1').hover();- await page.getByRole('button', { name: 'Mark observation fresh' }).click();- await page.locator('[data-fit="single"] [data-stacked-disk-trigger]').hover();- await tip.waitFor({ state: 'visible' });- assert(!(await tip.innerText()).includes('Guest reads paused'));- assert((await tip.innerText()).includes('/data'));- await page.locator('h1').hover();- checks.push(- 'Caller-owned paused-read tooltip survives measured model; fresh same-disk update removes only status',- );- }- // Exercise the existing production guest callers, but only the combined- // stale-to-fresh boundary, not an unchanged eight-reason acceptance run.- await page.goto('http://127.0.0.1:5301/browser-tests/guest-disk-deferral.html');- await page.waitForFunction(() => window.__guestDiskEvidence);- const row = page.locator('[data-guest-id="fixture-pve:pve-a:101"]');- const cell = row.locator('[data-workload-col="disk"]');- if (engine === chromium) await row.click();- else- // WebKit's trusted tap emitted no click on this production row in the- // separately retained input diagnostic. Check rendering via a mouse- // click, without asserting touch acceptance or masking that failure.- await row- .locator('[data-workload-col="name"]')- .getByText('backup-guest', { exact: true })- .click();- const drawer = page.getByRole('region', { name: 'Guest Overview' });- await drawer.waitFor({ state: 'visible' });- const paused = await cell.getAttribute('title');- assert(paused.startsWith('Using last known disk stats. '));- assert(paused.includes('VM operation lock, such as a backup.'));- assert((await drawer.innerText()).includes(paused));- assert(- (await page.getByRole('region', { name: 'Guest disk list' }).innerText()).includes(paused),- );- assert((await drawer.innerText()).includes('/data'));- if (engine === chromium) {- await page.locator('h1').hover();- await cell.locator('[data-stacked-disk-trigger]').hover();- await page.locator('[data-tooltip-portal="true"]').waitFor({ state: 'visible' });- assert((await page.locator('[data-tooltip-portal="true"]').innerText()).includes(paused));- await page.locator('h1').hover();- }- await capture('guest-paused');- await page.evaluate(() => {- window.__composedOriginalRow = document.querySelector(- '[data-guest-id="fixture-pve:pve-a:101"]',- );- window.__guestDiskEvidence.update({ reason: '', data: true, usage: 75 });- });- await page.waitForFunction(- () => !document.querySelector('[data-workload-col="disk"]').hasAttribute('title'),- );- assert(!(await drawer.innerText()).includes('Using last known disk stats.'));- assert.equal(await drawer.getByRole('progressbar').getAttribute('aria-valuenow'), '75');- assert.equal(- await page.evaluate(- () =>- window.__composedOriginalRow ===- document.querySelector('[data-guest-id="fixture-pve:pve-a:101"]'),- ),- true,- );- // AnimatedNumber must finish; do not capture an intermediate old percent- // beside the new capacity and claim that it is a settled observation.- await page.waitForFunction(() =>- document.querySelector('[data-workload-col="disk"]').textContent.includes('75%'),- );- await capture('guest-fresh');- checks.push(- 'Production GuestRow, Overview and disk list retain paused provenance; same-VM resumption clears notice and updates to 75% without remount',- );- assert.equal(- await page.evaluate(() => document.documentElement.scrollWidth <= window.innerWidth),- true,- );- assert.deepEqual(errors, []);- assert(- requests.every(- (request) => request.origin === 'http://127.0.0.1:5301' && request.method === 'GET',- ),- );- results.push({- name,- browserVersion: browser.version(),- viewport: { width, height: width === 390 ? 844 : 900 },- dark,- checks,- fits,- errors,- requestCount: requests.length,- });- await context.close();- await browser.close();- browser = null;- }- fs.writeFileSync(- path.join(output, 'result.json'),- JSON.stringify(- {- result: 'passed',- verifiedAt: new Date().toISOString(),- playwrightVersion,- runtimeHashes: hashes,- results,- screenshots,- limitations:- 'Synthetic component/CSS/browser composition only; not native QGA, thaw, appliance acceptance, installation, release qualification or availability.',- },- null,- 2,- ),- );- process.stdout.write(- `COMPOSED_DISK_LABELS_PASSED ${results.length} browsers / ${screenshots.length} screenshots\n`,- );- } finally {- if (browser) await browser.close();- await server.close();- }-})().catch((error) => {- process.stderr.write(`${error.stack}\n`);- process.exitCode = 1;-});diff --git a/frontend-modern/browser-tests/composed-disk-labels.html b/frontend-modern/browser-tests/composed-disk-labels.htmldeleted file mode 100644index 1f5e9a26e6..0000000000--- a/frontend-modern/browser-tests/composed-disk-labels.html+++ /dev/null@@ -1,12 +0,0 @@-<!doctype html>-<html lang="en">- <head>- <meta charset="UTF-8" />- <meta name="viewport" content="width=device-width, initial-scale=1.0" />- <title>Composed disk label verification</title>- </head>- <body>- <div id="root"></div>- <script type="module" src="./composed-disk-labels.tsx"></script>- </body>-</html>diff --git a/frontend-modern/browser-tests/composed-disk-labels.tsx b/frontend-modern/browser-tests/composed-disk-labels.tsxdeleted file mode 100644index aff9bbdfce..0000000000--- a/frontend-modern/browser-tests/composed-disk-labels.tsx+++ /dev/null@@ -1,93 +0,0 @@-// Production disk model, shell, ResizeObserver and CSS; synthetic observations.-// This fixture verifies composition, not collection, thaw or native recovery.-import { createSignal, For } from 'solid-js';-import { render } from 'solid-js/web';-import { StackedDiskBar } from '../src/components/Workloads/StackedDiskBar';-import {- buildStackedDiskBarPresentation,- type StackedDiskBarProps,-} from '../src/components/Workloads/stackedDiskBarModel';-import type { Disk } from '../src/types/api';-import type { AnomalyReport } from '../src/types/aiIntelligence';-import '../src/index.css';--const GiB = 1024 ** 3;-const disk = (mountpoint: string, total: number, used: number): Disk => ({- mountpoint,- total: total * GiB,- used: used * GiB,- free: (total - used) * GiB,- usage: (used / total) * 100,- type: 'ext4',-});-const single = [disk('/data', 440, 265)];-const multiple = [disk('/MMMM', 180, 90), disk('/iiii', 260, 175)];-const anomaly: AnomalyReport = {- resource_id: 'fixture-pve:pve-a:101',- resource_name: 'backup-guest',- resource_type: 'vm',- metric: 'disk',- current_value: 60,- baseline_mean: 24,- baseline_std_dev: 4,- z_score: 9,- severity: 'high',- description: 'Synthetic disk anomaly',-};-const cases: { id: string; label: string; props: StackedDiskBarProps }[] = [- { id: 'single', label: 'Single filesystem', props: { disks: single } },- { id: 'anomaly', label: 'Filesystem with anomaly', props: { disks: single, anomaly } },- {- id: 'aggregate',- label: 'Aggregate with fullest disk and count',- props: { disks: multiple, mode: 'aggregate', showDiskCount: true },- },- { id: 'inline', label: 'Equal slots, different glyph widths', props: { disks: multiple } },- {- id: 'vertical',- label: 'Host micro-bars and fullest disk',- props: { disks: multiple, mode: 'vertical-bars' },- },-];--function Fixture() {- const [width, setWidth] = createSignal(100);- const [status, setStatus] = createSignal(- 'Using last known disk stats. Guest reads paused while a backup is running.',- );- (window as any).__composedDiskLabels = {- width: setWidth,- presentation: () =>- Object.fromEntries(- cases.map((item) => [item.id, buildStackedDiskBarPresentation(item.props, width())]),- ),- };- return (- <main class="min-h-screen space-y-5 bg-surface p-3 text-base-content">- <h1 class="text-base font-semibold">Composed disk evidence</h1>- <div class="flex flex-wrap gap-2">- <button class="rounded-sm border border-border p-2" onClick={() => setWidth(100)}>- Use compact bars- </button>- <button class="rounded-sm border border-border p-2" onClick={() => setWidth(320)}>- Use roomy bars- </button>- <button class="rounded-sm border border-border p-2" onClick={() => setStatus('')}>- Mark observation fresh- </button>- </div>- <For each={cases}>- {(item) => (- <section aria-label={item.label} class="space-y-2">- <h2 class="text-sm font-medium">{item.label}</h2>- <div data-fit={item.id} style={{ width: `${width()}px` }}>- <StackedDiskBar {...item.props} statusMessage={status()} />- </div>- </section>- )}- </For>- </main>- );-}--render(() => <Fixture />, document.getElementById('root')!);diff --git a/frontend-modern/browser-tests/configuration-migration.cjs b/frontend-modern/browser-tests/configuration-migration.cjsdeleted file mode 100644index 2a6fe5b658..0000000000--- a/frontend-modern/browser-tests/configuration-migration.cjs+++ /dev/null@@ -1,151 +0,0 @@-// Run from the assigned root with pulse-worker-browser. This checks the real-// dialog/flow and shipped guides, not a native migration or release delivery.-const fs = require('node:fs');-const path = require('node:path');-const assert = require('node:assert/strict');-const { createHash } = require('node:crypto');-const { chromium, webkit } = require('playwright');--(async () => {- const workspace = process.cwd();- const root = path.join(workspace, 'frontend-modern');- const output = path.join(workspace, 'tmp', 'configuration-migration');- fs.mkdirSync(output, { recursive: true });- const binding = JSON.parse(fs.readFileSync(- path.join(workspace, 'tmp', 'configuration-migration-binding.json'), 'utf8'));- assert.match(binding.sourceSha, /^[0-9a-f]{40}$/);- for (const [file, digest] of Object.entries(binding.contentSha256))- assert.equal(createHash('sha256').update(fs.readFileSync(path.join(workspace, file))).digest('hex'), digest, file);- 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'),- plugins: [{ name: 'migration-doc-harness', configureServer(server) {- server.middlewares.use((req, _res, next) => {- if (/^\/docs\/[^?]+$/.test(req.url || '') && !req.url.endsWith('.md'))- req.url = '/browser-tests/configuration-migration.html';- next();- });- } }],- server: { host: '127.0.0.1', port: 5264, strictPort: true },- });- const observations = [];- let browser;- try {- await server.listen();- for (const [engine, width, height] of [['chromium', 1440, 1000], ['webkit', 390, 844]]) {- browser = await (engine === 'chromium' ? chromium : webkit).launch(engine === 'chromium'- ? { headless: true, channel: 'chromium', args: ['--no-sandbox'] }- : { headless: true });- const context = await browser.newContext({ viewport: { width, height }, acceptDownloads: true,- ...(engine === 'webkit' ? { isMobile: true, hasTouch: true } : {}) });- const errors = [], operations = [];- await context.route('**/api/**', async (route) => {- const req = route.request();- if (req.url().endsWith('/api/config/export')) {- operations.push({ path: '/api/config/export', method: req.method(), body: req.postDataJSON() });- await route.fulfill({ status: 200, contentType: 'application/json',- body: JSON.stringify({ status: 'success', data: 'synthetic-archive-not-a-real-backup' }) });- } else if (req.url().endsWith('/api/config/import')) {- operations.push({ path: '/api/config/import', method: req.method(), body: req.postDataJSON() });- // Deliberately reject this synthetic archive: warning, error and- // cancel paths must remain available without pretending to migrate.- await route.fulfill({ status: 400, contentType: 'text/plain', body: 'Synthetic rejected archive' });- } else await route.fulfill({ status: 200, contentType: 'application/json',- body: JSON.stringify({ hasAuthentication: false }) });- });- context.on('page', (p) => p.on('pageerror', (err) => errors.push(err.message)));- const page = await context.newPage();- await page.goto('http://127.0.0.1:5264/browser-tests/configuration-migration.html');- if (engine === 'webkit') await page.evaluate(() => document.documentElement.classList.add('dark'));- await page.getByRole('button', { name: 'Create Backup', exact: true }).click();- const exporting = page.getByRole('dialog', { name: 'Export configuration', exact: true });- await exporting.waitFor();- await exporting.evaluate((el) => Promise.all(el.getAnimations({ subtree: true }).map((a) => a.finished)));- let text = await exporting.innerText();- for (const phrase of ['Configuration only:', 'SSO settings', 'API-token records',- 'not history, TrueNAS/vSphere connections', 'Local login credentials and sessions are not included'])- assert.ok(text.includes(phrase), phrase);- assert.ok(await exporting.getByRole('button', { name: 'Export', exact: true }).isDisabled());- const guide = exporting.getByRole('link', { name: 'migration guide', exact: true });- await guide.scrollIntoViewIfNeeded();- assert.ok(await page.evaluate(() => document.documentElement.scrollWidth <= innerWidth + 1));- const warning = exporting.locator('strong', { hasText: 'Configuration only:' }).locator('..');- assert.ok(await warning.isVisible(), 'configuration scope warning is visible');- const iconWidth = await exporting.locator('svg').first().evaluate((el) => el.getBoundingClientRect().width);- assert.ok(iconWidth >= 15, 'Tailwind4 warning icon does not shrink');- await page.screenshot({ animations: 'disabled', path: path.join(output, `${engine}-export.png`) });- await guide.focus();- const popupPromise = page.waitForEvent('popup');- await page.keyboard.press('Enter');- const docs = await popupPromise;- await docs.locator('article').waitFor();- const article = await docs.locator('article').innerText();- for (const phrase of ['not a full backup', 'TrueNAS, vSphere and Machine Availability',- 'SSO configuration is included', 'Stop Pulse', 'does not merge', 'reload/apply failure'])- assert.ok(article.includes(phrase), phrase);- assert.ok(docs.url().endsWith('/docs/MIGRATION'));- const scope = docs.locator('#configuration-transfer');- await scope.scrollIntoViewIfNeeded();- assert.ok(await docs.evaluate(() => document.documentElement.scrollWidth <= innerWidth + 1));- await docs.screenshot({ animations: 'disabled', path: path.join(output, `${engine}-scope.png`) });- const retarget = docs.getByRole('link', { name: 'agent retargeting guide', exact: true });- await retarget.focus();- await docs.keyboard.press('Enter');- await docs.waitForFunction(() => document.activeElement?.id === 'moving-pulse-to-a-new-address');- assert.ok((await docs.locator('article').innerText()).includes('restores API-token records, not the server-side'));- assert.ok(docs.url().endsWith('/docs/UNIFIED_AGENT#moving-pulse-to-a-new-address'));- await docs.close();- await exporting.getByLabel('Encryption Passphrase', { exact: true }).fill('synthetic-migration-passphrase');- const downloadPromise = page.waitForEvent('download');- await exporting.getByRole('button', { name: 'Export', exact: true }).click();- const download = await downloadPromise;- assert.deepEqual(JSON.parse(fs.readFileSync(await download.path(), 'utf8')),- { status: 'success', data: 'synthetic-archive-not-a-real-backup' });- await page.getByRole('button', { name: 'Restore Configuration', exact: true }).click();- const importing = page.getByRole('dialog', { name: 'Import configuration', exact: true });- await importing.waitFor();- await importing.evaluate((el) => Promise.all(el.getAnimations({ subtree: true }).map((a) => a.finished)));- text = await importing.innerText();- for (const phrase of ['Back up the destination first', 'not the whole installation',- 'inventory, enrolment state, profiles and assignments are not', 'verify fresh admission'])- assert.ok(text.includes(phrase), phrase);- assert.ok(!text.includes('restores server-side agent records'));- await importing.getByRole('link', { name: 'migration guide' }).scrollIntoViewIfNeeded();- await page.screenshot({ animations: 'disabled', path: path.join(output, `${engine}-import.png`) });- await importing.getByLabel('Backup Password', { exact: true }).fill('synthetic-migration-passphrase');- await importing.getByLabel('Configuration File', { exact: true }).setInputFiles({ name: 'synthetic-backup.json',- mimeType: 'application/json', buffer: Buffer.from(JSON.stringify({ data: 'synthetic-archive-not-a-real-backup' })) });- const rejectedResponse = page.waitForResponse((r) => r.url().endsWith('/api/config/import'));- await importing.getByRole('button', { name: 'Import', exact: true }).click();- await rejectedResponse;- assert.equal(operations.length, 2);- assert.deepEqual(operations[1], { path: '/api/config/import', method: 'POST',- body: { passphrase: 'synthetic-migration-passphrase', data: 'synthetic-archive-not-a-real-backup' } });- assert.ok(await importing.isVisible(), 'failed import retains the dialog');- await importing.getByRole('button', { name: 'Cancel', exact: true }).click();- await importing.waitFor({ state: 'hidden' });- assert.equal(operations.length, 2, 'copy/navigation/cancel never send another operation');- assert.deepEqual(errors, []);- observations.push({ engine, browserVersion: browser.version(), width, height,- warningScope: true, keyboardGuideAndRetargetLinks: true, syntheticExportAndRejectedImport: true,- noPageOverflow: true, warningIconWidth: iconWidth, errors });- await browser.close();- browser = undefined;- }- const files = ['frontend-modern/src/components/Settings/BackupTransferDialogs.tsx',- 'frontend-modern/public/docs/MIGRATION.md', 'frontend-modern/public/docs/UNIFIED_AGENT.md'];- const result = { result: 'passed', playwrightVersion: require('playwright/package.json').version,- sourceSha: binding.sourceSha, baseSha: binding.sourceSha,- dependencySnapshot: binding.dependencySnapshot,- manifestSha256: binding.manifestSha256, verifiedAt: new Date().toISOString(),- scope: 'Real dialog/flow/production Docs rendering with synthetic API; no native migration or shipment',- contentSha256: Object.fromEntries(files.map((file) => [file,- createHash('sha256').update(fs.readFileSync(path.join(workspace, file))).digest('hex')])), observations };- fs.writeFileSync(path.join(output, 'result.json'), JSON.stringify(result, null, 2) + '\n');- console.log(JSON.stringify(result));- } finally {- if (browser) await browser.close();- await server.close();- }-})().catch((err) => { console.error(err); process.exitCode = 1; });diff --git a/frontend-modern/browser-tests/configuration-migration.html b/frontend-modern/browser-tests/configuration-migration.htmldeleted file mode 100644index b27dd2abbd..0000000000--- a/frontend-modern/browser-tests/configuration-migration.html+++ /dev/null@@ -1,12 +0,0 @@-<!doctype html>-<html lang="en">- <head>- <meta charset="UTF-8" />- <meta name="viewport" content="width=device-width, initial-scale=1.0" />- <title>Configuration transfer safety</title>- </head>- <body>- <div id="root"></div>- <script type="module" src="/browser-tests/configuration-migration.tsx"></script>- </body>-</html>diff --git a/frontend-modern/browser-tests/configuration-migration.tsx b/frontend-modern/browser-tests/configuration-migration.tsxdeleted file mode 100644index 275f2a2902..0000000000--- a/frontend-modern/browser-tests/configuration-migration.tsx+++ /dev/null@@ -1,32 +0,0 @@-// Actual transfer dialogs and flow, plus the production Docs renderer/router.-// The browser driver supplies only synthetic API responses; no server or-// operational credentials are involved in this copy/interaction proof.-import { render } from 'solid-js/web';-import { Router, Route } from '@solidjs/router';-import { BackupTransferDialogs } from '../src/components/Settings/BackupTransferDialogs';-import { useBackupTransferFlow } from '../src/components/Settings/useBackupTransferFlow';-import Docs from '../src/pages/Docs';-import '../src/index.css';--function Transfer() {- const securityStatus = () => null;- const flow = useBackupTransferFlow({ securityStatus });- return (- <main class="p-6">- <h1>Configuration transfer</h1>- <button onClick={() => flow.setShowExportDialog(true)}>Create Backup</button>- <button onClick={() => flow.setShowImportDialog(true)}>Restore Configuration</button>- <BackupTransferDialogs {...flow} securityStatus={securityStatus} />- </main>- );-}--render(- () => (- <Router>- <Route path="/docs/*docPath" component={Docs} />- <Route path="*" component={Transfer} />- </Router>- ),- document.getElementById('root')!,-);diff --git a/frontend-modern/browser-tests/container-cpu-help.cjs b/frontend-modern/browser-tests/container-cpu-help.cjsdeleted file mode 100644index dbaa300a2d..0000000000--- a/frontend-modern/browser-tests/container-cpu-help.cjs+++ /dev/null@@ -1,117 +0,0 @@-// The real Docs renderer, router and shipped help. No runtime socket, workload,-// credentials, alert test or diagnostics collection is exercised.-const assert = require('node:assert/strict');-const fs = require('node:fs');-const path = require('node:path');-const crypto = require('node:crypto');-const { chromium, webkit } = require('playwright');--(async () => {- const root = path.resolve('frontend-modern');- const artifacts = path.join(root, 'node_modules', 'container-cpu-help-browser');- fs.mkdirSync(artifacts, { recursive: true });- 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-container-cpu-help'),- server: { host: '127.0.0.1', port: 5265, strictPort: true },- optimizeDeps: { noDiscovery: true, include: [] },- });- const results = [];- let browser;- try {- await server.listen();- for (const [engine, width, tone] of [- ['chromium', 1280, 'light'], ['chromium', 1280, 'dark'],- ['webkit', 390, 'light'], ['webkit', 390, 'dark'],- ]) {- browser = await { chromium, webkit }[engine].launch(engine === 'chromium'- ? { headless: true, channel: 'chromium', args: ['--no-sandbox'] }- : { headless: true });- const page = await browser.newPage({ viewport: { width, height: 900 },- ...(engine === 'webkit' ? { isMobile: true, hasTouch: true } : {}) });- const errors = [];- const operations = [];- page.on('pageerror', (error) => errors.push(error.message));- page.on('console', (message) => {- if (message.type() === 'error') errors.push(message.text());- });- page.on('request', (request) => {- if (request.url().includes('/api/') || request.method() !== 'GET')- operations.push({ method: request.method(), url: request.url() });- });- await page.goto('http://127.0.0.1:5265/browser-tests/docs-fragment-navigation.html?scenario=troubleshooting',- { waitUntil: 'domcontentloaded', timeout: 60_000 });- if (tone === 'dark') await page.evaluate(async () => {- document.documentElement.classList.add('dark');- await new Promise((resolve) => requestAnimationFrame(() => requestAnimationFrame(resolve)));- });- const entry = page.getByRole('heading', {- name: 'Container CPU differs from Docker or Podman stats', exact: true,- });- await entry.waitFor();- await entry.evaluate((heading) => heading.scrollIntoView({ block: 'start' }));- await page.screenshot({ path: path.join(artifacts, `${engine}-${tone}-entry.png`) });- const guideLink = page.getByRole('link', { name: 'container CPU readings', exact: true });- if (engine === 'webkit') await guideLink.tap();- else {- await guideLink.focus();- await page.keyboard.press('Enter');- }- const heading = page.getByRole('heading', { name: 'Container CPU readings', exact: true });- await heading.waitFor();- await page.waitForFunction(() => {- const h = document.getElementById('container-cpu-readings');- return h && h.getBoundingClientRect().top >= 0 && h.getBoundingClientRect().top < innerHeight;- });- assert.ok(page.url().endsWith('/docs/DOCKER#container-cpu-readings'));- const article = (await page.locator('article').innerText()).replace(/\s+/g, ' ');- for (const phrase of ["Docker/Podman host's total CPU capacity", '100% for one logical CPU',- 'not an assumption about your host', 'v6.5.0-rc.1', 'unavailable data, not a measured zero',- 'Do not divide Pulse History again', 'Active does not prove fresh CPU samples',- 'not that an alert should fire or that its notification was delivered',- 'Do not restart workloads, create CPU load, lower alert thresholds'])- assert.ok(article.includes(phrase), phrase);- const table = page.locator('article table').filter({ hasText: 'Example host logical CPUs' });- assert.equal(await table.getByRole('row').count(), 4);- assert.equal(await table.getByRole('columnheader').count(), 3);- const rows = await table.getByRole('row').allTextContents();- assert.ok(rows[1].includes('240%') && rows[1].includes('60%'));- assert.ok(rows[2].includes('16.52%') && rows[2].includes('2.75%'));- assert.ok(rows[3].includes('1.04%') && rows[3].includes('0.17%'));- assert.ok(await page.evaluate(() => document.documentElement.scrollWidth <= innerWidth + 1));- await table.scrollIntoViewIfNeeded();- await page.screenshot({ path: path.join(artifacts, `${engine}-${tone}-examples.png`) });- const performance = page.getByRole('link', { name: 'safe performance measurements', exact: true });- if (engine === 'webkit') await performance.tap();- else {- await performance.focus();- await page.keyboard.press('Enter');- }- await page.getByRole('heading', { name: 'Excessive CPU, writes or database growth', exact: true }).waitFor();- await page.waitForFunction(() => {- const h = document.getElementById('excessive-cpu-writes-or-database-growth');- return h && h.getBoundingClientRect().top >= 0 && h.getBoundingClientRect().top < innerHeight;- });- assert.ok(page.url().endsWith('/docs/TROUBLESHOOTING#excessive-cpu-writes-or-database-growth'));- assert.deepEqual(errors, []);- assert.deepEqual(operations, []);- results.push({ engine, version: browser.version(), width, tone, exampleRows: rows,- entryLink: engine === 'webkit' ? 'touch' : 'keyboard', performanceLink: true,- noDocumentOverflow: true, errors, operations });- await browser.close();- browser = undefined;- }- const docs = ['DOCKER.md', 'TROUBLESHOOTING.md'].map((name) => ({ name,- sha256: crypto.createHash('sha256').update(fs.readFileSync(path.join(root, 'public', 'docs', name))).digest('hex'),- }));- const result = { result: 'passed', playwright: require('playwright/package.json').version,- scope: 'shipped CPU help rendering and navigation, not collector accuracy or alert delivery', docs, results };- fs.writeFileSync(path.join(artifacts, 'result.json'), JSON.stringify(result, null, 2) + '\n');- console.log(JSON.stringify(result));- } finally {- if (browser) await browser.close();- await server.close();- }-})().catch((error) => { console.error(error); process.exitCode = 1; });diff --git a/frontend-modern/browser-tests/cors-guidance.cjs b/frontend-modern/browser-tests/cors-guidance.cjsdeleted file mode 100644index dad919d985..0000000000--- a/frontend-modern/browser-tests/cors-guidance.cjs+++ /dev/null@@ -1,93 +0,0 @@-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');--(async () => {- const root = path.resolve('frontend-modern');- const artifacts = path.join(root, 'node_modules', 'cors-guidance-browser');- fs.mkdirSync(artifacts, { recursive: true });- 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-cors-guidance'),- server: { host: '127.0.0.1', port: 5258, strictPort: true },- optimizeDeps: { noDiscovery: true, include: [] },- });- const results = [];- let browser;- try {- await server.listen();- for (const [engine, width, tone] of [['chromium', 1280, 'light'], ['webkit', 390, 'dark']]) {- browser = await { chromium, webkit }[engine].launch(engine === 'chromium'- ? { headless: true, channel: 'chromium', args: ['--no-sandbox'] }- : { headless: true });- const page = await browser.newPage({ viewport: { width, height: 1000 },- ...(engine === 'webkit' ? { isMobile: true, hasTouch: true } : {}) });- const errors = [];- page.on('pageerror', (error) => errors.push(error.message));- page.on('console', (message) => { if (message.type() === 'error') errors.push(message.text()); });- for (const override of [false, true]) {- await page.goto(`http://127.0.0.1:5258/browser-tests/cors-guidance.html${override ? '?override=1' : ''}`,- { waitUntil: 'domcontentloaded', timeout: 60_000 });- if (tone === 'dark') await page.evaluate(() => document.documentElement.classList.add('dark'));- const input = page.getByRole('textbox', { name: 'CORS Allowed Origins', exact: true });- await input.waitFor();- assert.equal(await input.getAttribute('placeholder'), 'https://app.example.com:8443');- assert.equal(await input.getAttribute('aria-describedby'), 'cors-origin-help cors-origin-limits');- assert.ok((await page.locator('#cors-origin-help').innerText()).includes('no CORS exception'));- assert.ok((await page.locator('#cors-origin-limits').innerText()).includes('without credentialed browser access'));- assert.equal(await input.isDisabled(), override);- assert.equal(await input.inputValue(), override ? 'https://managed.example.com' : '');- assert.equal(await page.getByRole('status', { name: 'Fixture changed' }).innerText(), 'unchanged');- if (!override) {- await input.focus();- await page.keyboard.type('https://one.example.com,https://two.example.com:8443');- assert.equal(await input.inputValue(), 'https://one.example.com,https://two.example.com:8443');- assert.equal(await page.getByRole('status', { name: 'Fixture changed' }).innerText(), 'changed');- assert.ok(await input.evaluate((element) => document.activeElement === element));- }- await page.locator('#cors-origin-help').scrollIntoViewIfNeeded();- assert.ok(await page.evaluate(() => document.documentElement.scrollWidth <= innerWidth + 1));- await page.screenshot({ path: path.join(artifacts, `${engine}-${override ? 'override' : 'editable'}.png`) });- }- const faq = page.getByRole('link', { name: 'Open FAQ', exact: true });- await faq.focus();- await page.keyboard.press('Enter');- await page.locator('#cors-errors').waitFor();- const help = page.getByRole('link', { name: 'CORS checks', exact: true });- assert.equal(await help.getAttribute('href'), '/docs/TROUBLESHOOTING#cors-errors');- await help.focus();- await page.keyboard.press('Enter');- await page.waitForFunction(() => {- const heading = document.getElementById('cors-errors');- return heading && heading.getBoundingClientRect().top >= 0 && heading.getBoundingClientRect().top < innerHeight;- });- assert.ok(page.url().endsWith('/docs/TROUBLESHOOTING#cors-errors'));- const text = await page.locator('article').innerText();- for (const phrase of ['without credentialed browser access', 'Multiple exact origins are comma-separated',- 'verify the effective value', 'Keep cookies, authorization headers']) assert.ok(text.includes(phrase), phrase);- assert.ok(await page.evaluate(() => document.documentElement.scrollWidth <= innerWidth + 1));- await page.screenshot({ path: path.join(artifacts, `${engine}-help.png`) });- assert.deepEqual(errors, []);- results.push({ engine, browserVersion: browser.version(), width, tone, editableAndOverride: true,- keyboardInputAndHelpLink: true, descriptionAssociation: true, noBodyOverflow: true, errors });- await browser.close();- browser = undefined;- }- const files = ['src/components/Settings/NetworkBoundarySettingsSection.tsx',- ...['FAQ', 'TROUBLESHOOTING', 'CONFIGURATION', 'REVERSE_PROXY'].map((name) => `public/docs/${name}.md`)];- const content_sha256 = Object.fromEntries(files.map((file) => [`frontend-modern/${file}`,- createHash('sha256').update(fs.readFileSync(path.join(root, file))).digest('hex')]));- const result = { result: 'passed', playwrightVersion: require('playwright/package.json').version,- scope: 'real component/Docs/router/CSS fixtures; not native CORS, settings persistence, authentication or proxy acceptance',- content_sha256, results };- fs.writeFileSync(path.join(artifacts, 'result.json'), JSON.stringify(result, null, 2) + '\n');- console.log(JSON.stringify(result));- } finally {- if (browser) await browser.close();- await server.close();- }-})().catch((error) => { console.error(error); process.exitCode = 1; });diff --git a/frontend-modern/browser-tests/cors-guidance.html b/frontend-modern/browser-tests/cors-guidance.htmldeleted file mode 100644index ed50d53764..0000000000--- a/frontend-modern/browser-tests/cors-guidance.html+++ /dev/null@@ -1,12 +0,0 @@-<!doctype html>-<html>- <head>- <meta charset="UTF-8" />- <link rel="icon" href="data:," />- <meta name="viewport" content="width=device-width, initial-scale=1" />- </head>- <body>- <div id="root"></div>- <script type="module" src="/browser-tests/cors-guidance.tsx"></script>- </body>-</html>diff --git a/frontend-modern/browser-tests/cors-guidance.tsx b/frontend-modern/browser-tests/cors-guidance.tsxdeleted file mode 100644index cb0ae91e70..0000000000--- a/frontend-modern/browser-tests/cors-guidance.tsx+++ /dev/null@@ -1,56 +0,0 @@-// Real settings section, Docs, router and CSS with local signal-only settings.-// No backend, credential, proxy, save or browser CORS request is exercised.-import { createSignal } from 'solid-js';-import { render } from 'solid-js/web';-import { A, Route, Router } from '@solidjs/router';-import { NetworkBoundarySettingsSection } from '../src/components/Settings/NetworkBoundarySettingsSection';-import Docs from '../src/pages/Docs';-import '../src/index.css';--const overridden = new URLSearchParams(window.location.search).get('override') === '1';-window.history.replaceState({}, '', `/settings/system/network${overridden ? '?override=1' : ''}`);--function SettingsFixture() {- const [publicURL, setPublicURL] = createSignal('');- const [allowedOrigins, setAllowedOrigins] = createSignal(- overridden ? 'https://managed.example.com' : '',- );- const [allowEmbedding, setAllowEmbedding] = createSignal(false);- const [allowedEmbedOrigins, setAllowedEmbedOrigins] = createSignal('');- const [webhookAllowedPrivateCIDRs, setWebhookAllowedPrivateCIDRs] = createSignal('');- const [dirty, setHasUnsavedChanges] = createSignal(false);- return (- <main class="max-w-3xl mx-auto p-4 bg-surface text-base-content">- <h1 class="text-xl font-semibold">Network settings</h1>- <NetworkBoundarySettingsSection- publicURL={publicURL}- setPublicURL={setPublicURL}- allowedOrigins={allowedOrigins}- setAllowedOrigins={setAllowedOrigins}- allowEmbedding={allowEmbedding}- setAllowEmbedding={setAllowEmbedding}- allowedEmbedOrigins={allowedEmbedOrigins}- setAllowedEmbedOrigins={setAllowedEmbedOrigins}- webhookAllowedPrivateCIDRs={webhookAllowedPrivateCIDRs}- setWebhookAllowedPrivateCIDRs={setWebhookAllowedPrivateCIDRs}- envOverrides={() => ({ allowedOrigins: overridden })}- setHasUnsavedChanges={setHasUnsavedChanges}- />- <output aria-label="Fixture changed">{dirty() ? 'changed' : 'unchanged'}</output>- <nav>- <A href="/docs/FAQ">Open FAQ</A>- </nav>- </main>- );-}--render(- () => (- <Router>- <Route path="/settings/system/network" component={SettingsFixture} />- <Route path="/docs" component={Docs} />- <Route path="/docs/*docPath" component={Docs} />- </Router>- ),- document.getElementById('root')!,-);diff --git a/frontend-modern/browser-tests/diagnostics-integration.cjs b/frontend-modern/browser-tests/diagnostics-integration.cjsdeleted file mode 100644index 2d88257b24..0000000000--- a/frontend-modern/browser-tests/diagnostics-integration.cjs+++ /dev/null@@ -1,205 +0,0 @@-// Run the actual integration spec and full app shell offline. Only unrelated-// bootstrap/auth/state APIs are synthetic; the spec owns diagnostics responses.-// This is frontend integration proof, not backend authentication or appliance proof.-const fs = require('node:fs');-const path = require('node:path');-const crypto = require('node:crypto');-const http = require('node:http');-const { spawn } = require('node:child_process');-const { chromium, webkit } = require('playwright');-const { WebSocketServer } = require('/workspace/tests/integration/node_modules/ws');-const root = '/workspace';-const out = path.join(root, 'tmp/diagnostics-integration-proof');-const origin = 'http://127.0.0.1:5393';-const backendOrigin = 'http://127.0.0.1:5394';-const state = {- resources: [],- connectedInfrastructure: [],- activeAlerts: [],- recentlyResolved: [],- lastUpdate: Date.now(),-};-const bootstrap = {- '/api/health': { status: 'healthy' },- '/api/state': state,- '/api/security/status': {- hasAuthentication: true,- requiresAuth: false,- settingsCapabilities: {- infrastructureRead: true,- systemSettingsRead: true,- diagnosticsRead: true,- apiAccessRead: true,- apiAccessWrite: true,- authenticationRead: true,- authenticationWrite: true,- },- sessionCapabilities: { isAdmin: true },- presentationPolicy: {- hideCommercial: true,- hideUpgrade: true,- demoMode: false,- readOnly: false,- },- },- '/api/config': { nodes: [], pbs: [], pmg: [], dockerHosts: [], theme: 'light' },- '/api/version': { version: '6.4.5' },- '/api/updates/check': { currentVersion: '6.4.5', latestVersion: '6.4.5', updateAvailable: false },- '/api/license/status': { valid: false, tier: 'free', features: [] },- '/api/ai/settings': { enabled: false },- '/api/alerts/active': [],-};-(async () => {- fs.mkdirSync(out, { recursive: true });- const version = require('playwright/package.json').version;- const lock = JSON.parse(fs.readFileSync(path.join(root, 'tests/integration/package-lock.json')));- if (version !== lock.packages['node_modules/@playwright/test'].version)- throw new Error('Playwright version mismatch');- const paths = [- 'tests/integration/tests/69-diagnostics-onboarding.spec.ts',- 'tests/integration/playwright.config.ts',- 'tests/integration/tests/helpers.ts',- 'tests/integration/tsconfig.json',- 'frontend-modern/src/App.tsx',- 'frontend-modern/src/components/Settings/DiagnosticsPanel.tsx',- 'frontend-modern/src/components/Settings/DiagnosticsResultsPanel.tsx',- 'frontend-modern/src/components/Settings/diagnosticsModel.ts',- 'frontend-modern/src/components/Settings/useDiagnosticsPanelState.ts',- 'frontend-modern/src/utils/diagnosticsPresentation.ts',- 'frontend-modern/package-lock.json',- 'tests/integration/package-lock.json',- 'frontend-modern/browser-tests/diagnostics-integration.cjs',- ];- const source = Object.fromEntries(- paths.map((p) => [- p,- crypto- .createHash('sha256')- .update(fs.readFileSync(path.join(root, p)))- .digest('hex'),- ]),- );- const requests = [];- const backend = http.createServer((req, res) => {- const pathname = new URL(req.url, backendOrigin).pathname;- requests.push({ method: req.method, path: pathname });- res.setHeader('Content-Type', 'application/json');- res.end(JSON.stringify(bootstrap[pathname] ?? {}));- });- const sockets = new WebSocketServer({ server: backend });- sockets.on('connection', (socket) => {- socket.send(JSON.stringify({ type: 'initialState', data: state }));- socket.on('message', () => socket.send(JSON.stringify({ type: 'pong' })));- });- process.env.PULSE_DEV_API_URL = backendOrigin;- process.env.PULSE_DEV_WS_URL = backendOrigin.replace('http:', 'ws:');- const frontend = path.join(root, 'frontend-modern');- const { createServer } = await import(- path.join(frontend, 'node_modules/vite/dist/node/index.js')- );- const server = await createServer({- root: frontend,- configFile: path.join(frontend, 'vite.config.ts'),- cacheDir: path.join(out, 'vite-cache'),- server: { host: '127.0.0.1', port: 5393, strictPort: true },- });- // A cookie-backed synthetic bootstrap fixture avoids password/auth mutation.- const cookieState = path.join(out, 'synthetic-session.json');- fs.writeFileSync(- cookieState,- JSON.stringify({- cookies: [- {- name: 'pulse_session',- value: 'synthetic-offline-only',- domain: '127.0.0.1',- path: '/',- expires: -1,- httpOnly: true,- secure: false,- sameSite: 'Lax',- },- ],- origins: [],- }),- );- const config = path.join(out, 'playwright.config.cjs');- fs.writeFileSync(- config,- `- const { devices } = require('/workspace/tests/integration/node_modules/@playwright/test');- module.exports = {- testDir: '/workspace/tests/integration/tests', testMatch: '69-diagnostics-onboarding.spec.ts',- workers: 1, retries: 0, maxFailures: 1, globalTimeout: 135000,- timeout: 180000, expect: { timeout: 20000 },- outputDir: '${out}/results', reporter: [['list'], ['json', { outputFile: '${out}/result.json' }]],- use: { baseURL: '${origin}', trace: 'off', screenshot: 'only-on-failure', acceptDownloads: true },- projects: [- { name: 'chromium', use: { ...devices['Desktop Chrome'], launchOptions: { executablePath: ${JSON.stringify(chromium.executablePath())}, args: ['--no-sandbox'] } } },- { name: 'mobile-chrome', use: { ...devices['Pixel 5'], launchOptions: { executablePath: ${JSON.stringify(chromium.executablePath())}, args: ['--no-sandbox'] } } },- { name: 'mobile-safari', use: { ...devices['iPhone 12'], launchOptions: { executablePath: ${JSON.stringify(webkit.executablePath())} } } },- ],- };- `,- );- let result, cleanup;- try {- await new Promise((resolve) => backend.listen(5394, '127.0.0.1', resolve));- await server.listen();- result = await new Promise((resolve, reject) => {- const child = spawn(- process.execPath,- [- path.join(root, 'tests/integration/node_modules/@playwright/test/cli.js'),- 'test',- '--config',- config,- ],- {- cwd: path.join(root, 'tests/integration'),- env: {- ...process.env,- PLAYWRIGHT_BASE_URL: origin,- PULSE_E2E_COOKIE_STATE_PATH: cookieState,- PULSE_E2E_REQUIRE_DEFAULT_MOCK_READY: 'false',- PULSE_E2E_RUNTIME_STATE_PATH: path.join(out, 'unused-runtime.json'),- },- stdio: 'inherit',- },- );- child.on('error', reject);- child.on('exit', (exit, signal) => resolve({ pid: child.pid, exit, signal }));- });- } finally {- for (const socket of sockets.clients) socket.terminate();- await new Promise((resolve) => sockets.close(resolve));- await server.close();- await new Promise((resolve) => backend.close(resolve));- cleanup = {- frontendClosed: true,- socketsClosed: true,- backendClosed: true,- runnerTerminal: Boolean(result),- };- fs.writeFileSync(- path.join(out, 'receipt.json'),- JSON.stringify(- {- source,- playwright: version,- result,- cleanup,- boundary:- 'Actual full app shell and exact integration spec; synthetic offline session/bootstrap/state, no native API/guest-agent requests or production authentication.',- requests,- },- null,- 2,- ) + '\n',- );- }- if (result.exit !== 0 || result.signal) throw new Error('Diagnostics integration failed');-})().catch((error) => {- console.error(error);- process.exitCode = 1;-});diff --git a/frontend-modern/browser-tests/disk-live-refresh.cjs b/frontend-modern/browser-tests/disk-live-refresh.cjsdeleted file mode 100644index 6a018642ac..0000000000--- a/frontend-modern/browser-tests/disk-live-refresh.cjs+++ /dev/null@@ -1,180 +0,0 @@-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');--(async () => {- const root = '/workspace/frontend-modern';- process.chdir(root);- const artifacts = path.join(root, 'node_modules/disk-live-refresh-proof');- fs.mkdirSync(artifacts, { recursive: true });- 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: fs.mkdtempSync(path.join(artifacts, 'vite-cache-')),- server: { host: '127.0.0.1', port: 5221, strictPort: true },- });- const observations = [];- let browser;- try {- await server.listen();- for (const scenario of [- { engine: chromium, name: 'chromium', width: 1365, height: 900, dark: false },- { engine: webkit, name: 'webkit', width: 390, height: 844, dark: true },- ]) {- browser = await scenario.engine.launch(- scenario.name === 'chromium'- ? { headless: true, channel: 'chromium', args: ['--no-sandbox'] }- : { headless: true },- );- const page = await browser.newPage({- viewport: { width: scenario.width, height: scenario.height },- isMobile: scenario.name === 'webkit',- hasTouch: scenario.name === 'webkit',- });- const errors = [],- requests = [];- page.on('pageerror', (error) => errors.push(error.message));- await page.route('**/*', async (route) => {- const url = new URL(route.request().url());- if (url.origin !== 'http://127.0.0.1:5221') return route.abort();- if (!url.pathname.startsWith('/api/')) return route.continue();- requests.push(url.pathname);- if (url.pathname === '/api/license/runtime-capabilities')- return route.fulfill({- json: {- capabilities: [],- limits: [],- max_history_days: 7,- hosted_mode: false,- runtime: { build: 'community', label: 'Pulse Community runtime' },- blocked_capabilities: [],- },- });- return route.fulfill({ json: { data: [], enabled: false } });- });- await page.goto('http://127.0.0.1:5221/browser-tests/disk-live-refresh.html');- await page.evaluate(- (dark) => document.documentElement.classList.toggle('dark', dark),- scenario.dark,- );- const fixture = page.getByTestId('disk-live-refresh-fixture');- const row = fixture.locator('[data-row-id="disk-one"]');- // A phone-width health column shows the short verdict- // (getPhysicalDiskHealthCompactLabel); the full one stays in the DOM, hidden.- const shownReplaceLabel = scenario.name === 'webkit' ? 'Replace' : 'Replace Now';- await row.getByText('Healthy', { exact: true }).waitFor();- await row.getByText('Archive SSD', { exact: true }).click();- const disclosure = row.getByRole('button', { name: 'Collapse Archive SSD', exact: true });- await disclosure.focus();- await row.evaluate((element) => {- element.dataset.proofOwner = 'retained';- });- const initialControls = await disclosure.getAttribute('aria-controls');- const snapshot = (phase) =>- page.locator(`button[data-update="${phase}"]`).evaluate((button) => button.click());- const checkContinuity = async () => {- assert.equal(await row.getAttribute('data-proof-owner'), 'retained');- assert.equal(- await row.locator('button').evaluate((button) => document.activeElement === button),- true,- );- assert.equal(await row.locator('button').getAttribute('aria-expanded'), 'true');- const controls = await row.locator('button').getAttribute('aria-controls');- assert.equal(await page.locator(`[id="${controls}"]`).count(), 1);- assert.equal(await fixture.locator('[data-inline-detail-for]').count(), 1);- const dimensions = await page.evaluate(() => ({- scroll: document.documentElement.scrollWidth,- width: innerWidth,- }));- assert.ok(dimensions.scroll <= dimensions.width + 1, JSON.stringify(dimensions));- return dimensions;- };- const screenshot = (state) =>- fixture.screenshot({ path: path.join(artifacts, `${scenario.name}-${state}.png`) });-- await snapshot('fault');- await row.getByText(shownReplaceLabel, { exact: true }).waitFor();- for (const text of ['Archive SSD (fault)', '4%', '63°C'])- assert.equal(await row.getByText(text, { exact: true }).count(), 1);- assert.equal(await row.getByText('Healthy', { exact: true }).count(), 0);- assert.equal(await row.getAttribute('data-summary-series-id'), 'agent-archive:sdz');- assert.notEqual(await row.locator('button').getAttribute('aria-controls'), initialControls);- await fixture.getByText('2', { exact: true }).waitFor();- const faultDimensions = await checkContinuity();- await screenshot('fault');-- await snapshot('missing');- await row.getByText('Unknown', { exact: true }).waitFor();- for (const text of ['Replace Now', 'SMART failed.', '4%', '63°C'])- assert.equal(await row.getByText(text, { exact: true }).count(), 0);- for (const column of ['temp', 'life', 'size', 'role', 'parent'])- assert.equal(- (await row.locator(`td[data-storage-column="${column}"]`).innerText()).trim(),- '—',- );- await fixture- .getByText('Temperature is temporarily unavailable: No current reading', { exact: true })- .waitFor();- const missingDimensions = await checkContinuity();- await screenshot('missing');-- await snapshot('healthy');- await row.getByText('Healthy', { exact: true }).waitFor();- assert.equal(await row.getByText('96%', { exact: true }).count(), 1);- assert.equal(await row.getByText('41°C', { exact: true }).count(), 1);- assert.equal(await row.getAttribute('data-summary-series-id'), 'agent-archive:sda');- assert.equal(await row.locator('button').getAttribute('aria-controls'), initialControls);- const recoveredDimensions = await checkContinuity();- await screenshot('recovered');-- await snapshot('fault');- await row.getByText(shownReplaceLabel, { exact: true }).waitFor();- await page.locator('[data-filter="attention"]').evaluate((button) => button.click());- assert.equal(await row.getByText('Replace Now', { exact: true }).count(), 1);- await snapshot('healthy');- await fixture.getByText('No disks need attention', { exact: true }).waitFor();- await page.locator('[data-filter="all"]').evaluate((button) => button.click());- await row.getByText('Healthy', { exact: true }).waitFor();- assert.deepEqual(errors, []);- observations.push({- browser: scenario.name,- version: browser.version(),- viewport: { width: scenario.width, height: scenario.height },- dark: scenario.dark,- faultDimensions,- missingDimensions,- recoveredDimensions,- errors,- requests,- });- await browser.close();- browser = undefined;- }- const source = 'src/components/Storage/DiskList.tsx';- const result = {- result: 'passed',- playwright: require('playwright/package.json').version,- content_sha256: {- [`frontend-modern/${source}`]: createHash('sha256')- .update(fs.readFileSync(path.join(root, source)))- .digest('hex'),- },- observations,- };- fs.writeFileSync(path.join(artifacts, 'result.json'), JSON.stringify(result, null, 2) + '\n');- console.log(JSON.stringify(result));- } finally {- if (browser) await browser.close();- await server.close();- for (const name of fs.readdirSync(artifacts)) {- const file = path.join(artifacts, name);- if (fs.statSync(file).isFile()) fs.chmodSync(file, 0o644);- }- }-})().catch((error) => {- console.error(error);- process.exitCode = 1;-});diff --git a/frontend-modern/browser-tests/disk-live-refresh.html b/frontend-modern/browser-tests/disk-live-refresh.htmldeleted file mode 100644index e3fc664d80..0000000000--- a/frontend-modern/browser-tests/disk-live-refresh.html+++ /dev/null@@ -1,12 +0,0 @@-<!doctype html>-<html lang="en">- <head>- <meta charset="UTF-8" />- <meta name="viewport" content="width=device-width, initial-scale=1.0" />- <title>Physical disk live refresh verification</title>- </head>- <body>- <div id="root"></div>- <script type="module" src="/browser-tests/disk-live-refresh.tsx"></script>- </body>-</html>diff --git a/frontend-modern/browser-tests/disk-live-refresh.tsx b/frontend-modern/browser-tests/disk-live-refresh.tsxdeleted file mode 100644index 6961572a15..0000000000--- a/frontend-modern/browser-tests/disk-live-refresh.tsx+++ /dev/null@@ -1,116 +0,0 @@-// Real DiskList/DiskDrawer and keyed renderer, with synthetic collector snapshots.-// This is browser behaviour evidence, not an installed SMART or appliance result.-import { createSignal } from 'solid-js';-import { render } from 'solid-js/web';-import { DiskList } from '../src/components/Storage/DiskList';-import type { StorageHealthFilter } from '../src/features/storageBackups/models';-import type { Resource } from '../src/types/resource';-import '../src/index.css';--const disk = (phase: 'healthy' | 'fault' | 'missing'): Resource => ({- id: 'disk-one',- type: 'physical_disk',- name: 'Archive disk',- platformType: 'proxmox-pbs',- sourceType: 'agent',- status: 'online',- lastSeen: Date.now(),- metricsTarget: {- resourceType: 'disk',- resourceId: phase === 'healthy' ? 'agent-archive:sda' : 'agent-archive:sdz',- },- identity: { hostname: 'archive-host' },- canonicalIdentity: { hostname: 'archive-host' },- physicalDisk: {- model: phase === 'fault' ? 'Archive SSD (fault)' : 'Archive SSD',- devPath: phase === 'healthy' ? '/dev/sda' : '/dev/sdz',- serial: 'SYNTHETIC-ONE',- diskType: phase === 'missing' ? undefined : 'ssd',- health: phase === 'healthy' ? 'PASSED' : phase === 'fault' ? 'FAILED' : 'UNKNOWN',- wearout: phase === 'healthy' ? 96 : phase === 'fault' ? 4 : -1,- temperature: phase === 'healthy' ? 41 : phase === 'fault' ? 63 : 0,- sizeBytes: phase === 'missing' ? 0 : 2_000_000_000_000,- storageRole: phase === 'missing' ? undefined : 'cache_pool',- storageGroup: phase === 'missing' ? undefined : 'Archive Pool',- risk:- phase === 'fault'- ? {- level: 'critical',- reasons: [{ code: 'smart-failed', severity: 'critical', summary: 'SMART failed.' }],- }- : undefined,- smart:- phase === 'missing'- ? undefined- : { powerOnHours: 100, pendingSectors: phase === 'fault' ? 2 : 0 },- collection:- phase === 'missing'- ? {- temperature: { state: 'unavailable', source: 'fixture', reason: 'No current reading' },- }- : undefined,- },-});--const Fixture = () => {- const [disks, setDisks] = createSignal([disk('healthy')]);- const [selectedDiskId, setSelectedDiskId] = createSignal<string | null>(null);- const [healthFilter, setHealthFilter] = createSignal<StorageHealthFilter>('all');- return (- <main class="min-h-screen space-y-4 bg-surface p-4 text-base-content">- <h1 class="text-lg font-semibold">Physical disk live refresh verification</h1>- <p class="text-sm text-muted">- Synthetic snapshots in the production PBS disk table and detail.- </p>- <div class="flex flex-wrap gap-2">- <button- class="min-h-11 rounded border border-border px-3"- data-update="fault"- onClick={() => setDisks([disk('fault')])}- >- Report disk fault- </button>- <button- class="min-h-11 rounded border border-border px-3"- data-update="missing"- onClick={() => setDisks([disk('missing')])}- >- Remove current readings- </button>- <button- class="min-h-11 rounded border border-border px-3"- data-update="healthy"- onClick={() => setDisks([disk('healthy')])}- >- Recover disk- </button>- <button- class="min-h-11 rounded border border-border px-3"- data-filter="attention"- onClick={() => setHealthFilter('attention')}- >- Show disks needing attention- </button>- <button- class="min-h-11 rounded border border-border px-3"- data-filter="all"- onClick={() => setHealthFilter('all')}- >- Show all disks- </button>- </div>- <section data-testid="disk-live-refresh-fixture">- <DiskList- disks={disks()}- nodes={[]}- selectedNode={null}- healthFilter={healthFilter()}- searchTerm=""- selectedDiskId={selectedDiskId()}- onSelectedDiskChange={setSelectedDiskId}- />- </section>- </main>- );-};-render(() => <Fixture />, document.getElementById('root')!);diff --git a/frontend-modern/browser-tests/docker-composed.cjs b/frontend-modern/browser-tests/docker-composed.cjsdeleted file mode 100644index 7ceae8b40e..0000000000--- a/frontend-modern/browser-tests/docker-composed.cjs+++ /dev/null@@ -1,303 +0,0 @@-// Fresh combined-content proof, not native Podman or alert-delivery acceptance.-const assert = require('node:assert/strict');-const fs = require('node:fs');-const path = require('node:path');-const crypto = require('node:crypto');-const { chromium, webkit } = require('playwright');-const root = '/workspace/frontend-modern';-const output = '/workspace/tmp/docker-composed-20261005-controls';-const origin = 'http://127.0.0.1:5341';-const runtimePath = 'frontend-modern/src/features/docker/DockerContainersTable.tsx';-const expectedHash = '85753788c2e982dcedbab9aed99ff74a1f1623ec35bc7886ab25661e86de2dd9';-const hash = (file) => crypto.createHash('sha256').update(fs.readFileSync(file)).digest('hex');--(async () => {- fs.mkdirSync(output, { recursive: true });- assert.equal(hash('/workspace/' + runtimePath), expectedHash);- const result = {- result: 'incomplete',- playwright: require('playwright/package.json').version,- content_sha256: { [runtimePath]: expectedHash },- cases: [],- screenshots: [],- limits:- 'Production table, drawer and CSS with selected synthetic resources/APIs. Emulated phone, not a native phone. No collector, engine, threshold duration, notification, installed or release acceptance.',- };- assert.equal(- result.playwright,- JSON.parse(fs.readFileSync('/workspace/tests/integration/package-lock.json')).packages[- 'node_modules/@playwright/test'- ].version,- );- 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: output + '/cache',- optimizeDeps: { noDiscovery: true, include: [] },- server: { host: '127.0.0.1', port: 5341, strictPort: true, watch: null },- });- let browser;- try {- await server.listen();- for (const [name, engine, width, dark] of [- ['desktop-light', chromium, 1440, false],- ['desktop-dark', chromium, 1440, true],- ['phone-light', webkit, 390, false],- ['phone-dark', webkit, 390, true],- ]) {- browser = await engine.launch(- engine === chromium- ? { headless: true, channel: 'chromium', args: ['--no-sandbox'] }- : { headless: true },- );- const page = await browser.newPage({- viewport: { width, height: width < 768 ? 844 : 900 },- isMobile: width < 768,- hasTouch: width < 768,- locale: 'en-GB',- timezoneId: 'UTC',- });- page.setDefaultTimeout(12000);- page.setDefaultNavigationTimeout(60000);- const record = {- name,- width,- dark,- browser: browser.version(),- errors: [],- requests: [],- checks: [],- };- result.cases.push(record);- page.on('pageerror', (error) => record.errors.push(error.message));- page.on('console', (message) => {- if (message.type() === 'error') record.errors.push(message.text());- });- await page.routeWebSocket('**/*', (socket) => {- if (socket.url().startsWith('ws://127.0.0.1:5341/')) socket.connectToServer();- else {- record.requests.push({ blocked: true, socket: socket.url() });- socket.close();- }- });- await page.route('**/*', (route) => {- const request = route.request(),- url = new URL(request.url());- if (url.origin !== origin || request.method() !== 'GET') {- record.requests.push({ blocked: true, url: request.url(), method: request.method() });- return route.abort();- }- if (!url.pathname.startsWith('/api/')) return route.continue();- record.requests.push({ path: url.pathname, method: request.method() });- return route.fulfill({- json: {- success: true,- data: [],- alerts: [],- anomalies: [],- config: null,- capabilities: [],- relationships: [],- recentChanges: [],- available: false,- audits: [],- count: 0,- blocked_capabilities: [],- limits: [],- max_history_days: 90,- },- });- });- await page.addInitScript((dark) => {- const apply = () => document.documentElement.classList.toggle('dark', dark);- if (document.documentElement) apply();- else document.addEventListener('DOMContentLoaded', apply, { once: true });- window.__inputs = [];- for (const type of ['click', 'keydown'])- document.addEventListener(- type,- (event) => window.__inputs.push({ type, trusted: event.isTrusted }),- true,- );- }, dark);- await page.goto(origin + '/browser-tests/docker-composed.html', { waitUntil: 'networkidle' });- const activate = async (locator) => {- if (width < 768) await locator.tap();- else {- await locator.focus();- await page.keyboard.press('Enter');- }- };- const table = page.getByRole('table');- const cpuCell = async (id) => {- const index = await table- .locator('thead th')- .evaluateAll((headers) =>- headers.findIndex((header) => header.textContent.trim() === 'CPU'),- );- assert.ok(index >= 0, JSON.stringify(await table.locator('thead th').allTextContents()));- return page.locator(`[data-docker-container-row="${id}"]`).getByRole('cell').nth(index);- };- const labels = async () => {- for (const [id, text] of [- ['small-positive', '0.3%'],- ['measured-zero', '0%'],- ['tiny-positive', '<0.1%'],- ]) {- const cell = await cpuCell(id);- await cell.getByText(text, { exact: true }).waitFor();- }- };- const screenshot = async (state) => {- await page.evaluate(async () => {- await document.fonts.ready;- await new Promise((resolve) =>- requestAnimationFrame(() => requestAnimationFrame(resolve)),- );- });- assert.ok(- await page.evaluate(() => document.documentElement.scrollWidth <= innerWidth + 1),- 'No document overflow',- );- const file = `${name}-${state}.png`;- await page.screenshot({ path: path.join(output, file), fullPage: true });- result.screenshots.push({ file, name, state, sha256: hash(path.join(output, file)) });- };- await page- .locator('[data-docker-host-group="edge-a"] [data-docker-host-group-stale]')- .waitFor();- assert.equal(- await page.locator('[data-docker-host-group-stale]').innerText(),- 'No report for 9m',- );- assert.match(- await page.locator('[data-docker-host-group-stale]').getAttribute('title'),- /last values received/,- );- assert.equal(- await table- .locator('thead th')- .filter({ hasText: /^Host$/ })- .count(),- 0,- );- assert.equal(- await table- .locator('thead th')- .filter({ hasText: /^Engine$/ })- .count(),- 0,- );- assert.match(- await page.locator('[data-docker-host-group="edge-a"]').innerText(),- /docker fixture/,- );- assert.match(- await page.locator('[data-docker-host-group="edge-b"]').innerText(),- /podman fixture/,- );- assert.equal(- await page- .locator('[data-docker-host-group="edge-b"] [data-docker-host-group-stale]')- .count(),- 0,- );- await labels();- const guidance = page.getByTestId('container-table-cpu-scale');- assert.match(await guidance.innerText(), /100% means all host CPUs.*per-core scale/);- await screenshot('grouped-with-hosts');- record.checks.push(- 'Both fractional labels and shared host/engine headings survive composition; only the silent host is qualified.',- );- await activate(page.getByRole('button', { name: 'Remove host context', exact: true }));- assert.equal(await page.locator('[data-docker-host-group-stale]').count(), 0);- assert.match(- await page.locator('[data-docker-host-group="edge-a"]').innerText(),- /docker fixture/,- );- await labels();- await screenshot('grouped-without-hosts');- record.checks.push(- 'Missing host context removes stale/status claims, keeps container engine fallback, fractions and scale guidance.',- );- await activate(page.getByRole('button', { name: 'Restore host context', exact: true }));- if (width < 768) await activate(page.getByRole('button', { name: 'Filters', exact: true }));- await activate(page.getByRole('button', { name: 'View', exact: true }));- await activate(page.getByRole('button', { name: 'List', exact: true }));- await page.keyboard.press('Escape');- assert.equal(await page.locator('[data-docker-host-group]').count(), 0);- if (width >= 1024) {- assert.equal(- await table- .locator('thead th')- .filter({ hasText: /^Host$/ })- .count(),- 1,- );- assert.equal(- await table- .locator('thead th')- .filter({ hasText: /^Engine$/ })- .count(),- 1,- );- }- await labels();- const containerRow = page.locator('[data-docker-container-row="small-positive"]');- // On phones the production disclosure button is intentionally hidden;- // use its existing whole-row pointer convenience, not a forced click.- if (width < 768) await containerRow.tap();- else await activate(containerRow.getByRole('button').first());- const detail = page.locator('[data-inline-platform-resource-detail-for="small-positive"]');- await detail.waitFor();- assert.match(- await detail.getByTestId('container-drawer-cpu-scale').innerText(),- /total host capacity/,- );- await screenshot('flat-expanded');- await activate(- detail.getByRole('button', { name: 'Collapse small-positive details', exact: true }),- );- await detail.waitFor({ state: 'detached' });- record.checks.push(- 'Flat layout retains CPU labels; trusted expansion/collapse shows the same capacity guidance in the real drawer.',- );- assert.deepEqual(record.errors, []);- assert.ok(!record.requests.some((request) => request.blocked));- record.trustedInputs = await page.evaluate(() => window.__inputs);- assert.ok(record.trustedInputs.some((event) => event.trusted));- await browser.close();- browser = undefined;- }- result.result = 'passed';- result.verified_at = new Date().toISOString();- } catch (error) {- result.error = String(error.stack || error);- const failedPage = browser?.contexts()[0]?.pages()[0];- if (failedPage) {- result.failure_headers = await failedPage.locator('thead th').allTextContents();- result.failure_body = (await failedPage.locator('body').innerText()).slice(0, 5000);- await failedPage.screenshot({ path: output + '/failure.png', fullPage: true });- }- throw error;- } finally {- if (browser) await browser.close();- await server.close();- result.browser_closed = true;- result.server_closed = true;- fs.writeFileSync(output + '/result.json', JSON.stringify(result, null, 2) + '\n');- }- process.stdout.write(- JSON.stringify({- result: result.result,- states: result.cases.length,- screenshots: result.screenshots.length,- resultPath: output + '/result.json',- }) + '\n',- );-})().catch((error) => {- process.stderr.write(String(error.stack || error) + '\n');- process.exitCode = 1;-});diff --git a/frontend-modern/browser-tests/docker-composed.html b/frontend-modern/browser-tests/docker-composed.htmldeleted file mode 100644index 93c2e13114..0000000000--- a/frontend-modern/browser-tests/docker-composed.html+++ /dev/null@@ -1,12 +0,0 @@-<!doctype html>-<html lang="en">- <head>- <meta charset="UTF-8" />- <meta name="viewport" content="width=device-width, initial-scale=1.0" />- <title>Composed container presentation proof</title>- </head>- <body>- <div id="root"></div>- <script type="module" src="/browser-tests/docker-composed.tsx"></script>- </body>-</html>diff --git a/frontend-modern/browser-tests/docker-composed.tsx b/frontend-modern/browser-tests/docker-composed.tsxdeleted file mode 100644index 80f76a7589..0000000000--- a/frontend-modern/browser-tests/docker-composed.tsx+++ /dev/null@@ -1,85 +0,0 @@-// Presentation only: selected synthetic resources, real table, drawer and CSS.-import { createSignal } from 'solid-js';-import { render } from 'solid-js/web';-import { Router, Route } from '@solidjs/router';-import { DockerContainersTable } from '../src/features/docker/DockerContainersTable';-import { DarkModeContext } from '../src/contexts/appRuntime';-import type { Resource } from '../src/types/resource';-import '../src/index.css';--const container = (name: string, host: string, cpu: number, engine = 'docker'): Resource => ({- id: name,- type: 'app-container',- name,- platformId: name,- platformType: 'docker',- sourceType: 'agent',- status: 'running',- cpu: { current: cpu },- memory: { current: 10 },- docker: { hostname: host, runtime: engine, runtimeVersion: 'fixture', containerState: 'running' },-});-const containers = [- container('small-positive', 'edge-a', 0.26),- container('measured-zero', 'edge-a', 0),- container('tiny-positive', 'edge-b', 0.04, 'podman'),-];-const hosts: Resource[] = [- {- id: 'host-a',- type: 'docker-host',- name: 'edge-a',- platformId: 'host-a',- platformType: 'docker',- sourceType: 'agent',- status: 'offline',- docker: { hostname: 'edge-a', runtime: 'docker', runtimeVersion: 'fixture' },- health: {- verdict: 'stale',- reasons: [{ code: 'telemetry_stale', detail: '9m' }],- },- },- {- id: 'host-b',- type: 'docker-host',- name: 'edge-b',- platformId: 'host-b',- platformType: 'docker',- sourceType: 'agent',- status: 'online',- docker: { hostname: 'edge-b', runtime: 'podman', runtimeVersion: 'fixture' },- },-];-function Fixture() {- const [withHosts, setWithHosts] = createSignal(true);- return (- <DarkModeContext.Provider value={() => document.documentElement.classList.contains('dark')}>- <main class="min-h-screen space-y-4 bg-surface p-3 text-base-content">- <h1 class="text-lg font-semibold">Composed container presentation</h1>- <p class="text-xs text-muted">Synthetic metrics. No container or notification action.</p>- <button- type="button"- class="min-h-11 rounded border border-border px-3 text-xs"- onClick={() => setWithHosts(!withHosts())}- >- {withHosts() ? 'Remove host context' : 'Restore host context'}- </button>- <DockerContainersTable- resources={containers}- hosts={withHosts() ? hosts : undefined}- emptyIcon={<span />}- emptyTitle="No containers"- emptyDescription="No containers"- />- </main>- </DarkModeContext.Provider>- );-}-render(- () => (- <Router>- <Route path="*" component={Fixture} />- </Router>- ),- document.getElementById('root')!,-);diff --git a/frontend-modern/browser-tests/docker-resource-sizing.cjs b/frontend-modern/browser-tests/docker-resource-sizing.cjsdeleted file mode 100644index e7fa23ff17..0000000000--- a/frontend-modern/browser-tests/docker-resource-sizing.cjs+++ /dev/null@@ -1,123 +0,0 @@-const fs = require('node:fs');-const path = require('node:path');-const http = require('node:http');-const crypto = require('node:crypto');-const assert = require('node:assert/strict');-const { chromium, webkit } = require('playwright');-const root = '/workspace';-const frontend = path.join(root, 'frontend-modern');-const evidence = path.join(root, 'tmp/doc-command-help');-const preview = path.join(evidence, 'static');-const hash = bytes => crypto.createHash('sha256').update(bytes).digest('hex');-const bindingBytes = fs.readFileSync(path.join(preview, 'binding.json'));-const binding = JSON.parse(bindingBytes);-const result = { source: binding.source_sha, binding_sha256: hash(bindingBytes),- cases: [], captures: [], pageErrors: [], requests: [], served: [] };-(async () => {- let server, browser;- try {- for (const [file, expected] of Object.entries(binding.sources))- assert.equal(hash(fs.readFileSync(path.join(frontend, file))), expected, file);- for (const [file, expected] of Object.entries(binding.artifacts))- assert.equal(hash(fs.readFileSync(path.join(preview, file))), expected, file);- result.source_inputs = Object.keys(binding.sources).length;- assert.equal(require('playwright/package.json').version, '1.56.1');- result.playwright = '1.56.1';- server = http.createServer((req, res) => {- const route = new URL(req.url, 'http://fixture.invalid').pathname;- let asset = route.slice(1);- if (route.startsWith('/docs/') && !route.endsWith('.md'))- asset = 'browser-tests/doc-command-help.html';- if (!Object.hasOwn(binding.artifacts, asset)) { res.writeHead(404); res.end(); return; }- const bytes = fs.readFileSync(path.join(preview, asset));- assert.equal(hash(bytes), binding.artifacts[asset]);- result.served.push({ route, asset, sha256: hash(bytes) });- const type = asset.endsWith('.md') ? 'text/markdown' : asset.endsWith('.css') ? 'text/css' :- asset.endsWith('.js') ? 'text/javascript' : 'text/html';- res.writeHead(200, { 'Content-Type': type, 'Cache-Control': 'no-store' }); res.end(bytes);- });- await new Promise(resolve => server.listen(0, '127.0.0.1', resolve));- const origin = `http://127.0.0.1:${server.address().port}`;- for (const state of [- { name: 'desktop', width: 1280, height: 900, dark: false, engine: 'chromium' },- { name: 'phone', width: 375, height: 812, dark: true, engine: 'webkit' },- ]) {- browser = state.engine === 'webkit' ? await webkit.launch({ headless: true }) :- await chromium.launch({ headless: true, channel: 'chromium', args: ['--no-sandbox'] });- const browserVersion = browser.version();- const context = await browser.newContext({ viewport: { width: state.width, height: state.height },- isMobile: state.width < 500, hasTouch: state.width < 500 });- const page = await context.newPage();- page.on('pageerror', error => result.pageErrors.push(error.message));- page.on('request', req => result.requests.push({ path: new URL(req.url()).pathname, method: req.method() }));- await page.addInitScript(dark => {- document.addEventListener('DOMContentLoaded', () => document.documentElement.classList.toggle('dark', dark));- }, state.dark);- const activate = async locator => {- if (state.width < 500) await locator.tap();- else { await locator.focus(); await page.keyboard.press('Enter'); }- };- const capture = async (name, locator) => {- await locator.evaluate(el => window.scrollBy(0, el.getBoundingClientRect().top - 48));- await page.evaluate(() => new Promise(resolve => requestAnimationFrame(() => requestAnimationFrame(resolve))));- assert.equal(await page.evaluate(() => document.documentElement.scrollWidth <= window.innerWidth), true, name);- const file = `docker-sizing-${state.name}-${name}.png`;- await page.screenshot({ path: path.join(evidence, file) });- result.captures.push({ file, sha256: hash(fs.readFileSync(path.join(evidence, file))), state });- };- await page.goto(`${origin}/docs/DOCKER#healthcheck-and-resource-sizing`);- await page.locator('#healthcheck-and-resource-sizing').waitFor();- const sizing = await page.locator('#healthcheck-and-resource-sizing').evaluate(heading => {- const section = document.createElement('section');- for (let node = heading.nextElementSibling; node && !/^H[123]$/.test(node.tagName); node = node.nextElementSibling)- section.append(node.cloneNode(true));- return { text: section.innerText || section.textContent, commands: [...section.querySelectorAll('pre code')].map(el => el.textContent) };- });- assert.equal(sizing.commands.length, 1);- assert.match(sizing.commands[0], /services:\s+\n?\s*pulse:\s+\n?\s*healthcheck:/);- assert.doesNotMatch(sizing.commands[0], /\b(deploy|resources|limits|memory|cpus|mem_limit):/);- assert.match(sizing.commands[0], /http:\/\/localhost:7655\/api\/health/);- for (const boundary of ['not a complete', 'not restart the container', 'no universal CPU or memory limit',- 'not an instruction to remove an existing limit', 'current resource policy', 'out-of-memory kill',- 'delay polling and notification delivery', 'Neither repairs an increased baseline',- 'not a safe container limit by itself', 'even when memory no longer grows'])- assert.equal(sizing.text.includes(boundary), true, boundary);- await capture('healthcheck', page.locator('#healthcheck-and-resource-sizing'));- const limits = page.locator('article p').filter({ hasText: 'There is no universal CPU or memory limit for Pulse.' });- assert.equal(await limits.count(), 1);- await capture('limits', limits);- await page.evaluate(() => window.__pi_docs_shell_marker = 'unchanged-shell');- for (const target of ['excessive-cpu-writes-or-database-growth', 'memory-use-keeps-growing']) {- await activate(page.locator(`article a[href="/docs/TROUBLESHOOTING#${target}"]`).first());- await page.waitForURL(`**/docs/TROUBLESHOOTING#${target}`);- await page.locator(`#${target}`).waitFor();- assert.equal(await page.locator(`#${target}`).evaluate(el => {- const box = el.getBoundingClientRect(); return box.top >= 0 && box.top < window.innerHeight;- }), true);- assert.equal(await page.evaluate(() => window.__pi_docs_shell_marker), 'unchanged-shell');- await page.goBack(); await page.waitForURL('**/docs/DOCKER#healthcheck-and-resource-sizing');- await page.locator('#healthcheck-and-resource-sizing').waitFor();- }- for (const name of ['DOCKER', 'TROUBLESHOOTING']) {- const response = await page.request.get(`${origin}/docs/${name}.md`);- assert.equal(response.status(), 200);- assert.equal(hash(await response.body()), binding.sources[`public/docs/${name}.md`]);- }- result.cases.push({ ...state, browserVersion, codeHasNoResourceCaps: true,- healthcheckPreserved: true, policyPreserved: true, diagnosticLinksAndHistory: true,- activation: state.width < 500 ? 'touch' : 'keyboard', servedBytesMatched: true, horizontalOverflow: false });- await context.close(); await browser.close(); browser = null;- }- assert.deepEqual(result.pageErrors, []);- assert.equal(result.requests.some(req => req.method !== 'GET' || req.path.startsWith('/api/') || req.path.startsWith('/ws')), false);- result.result = 'passed';- } catch (error) {- result.result = 'failed'; result.error = String(error.stack || error); process.exitCode = 1;- } finally {- if (browser) await browser.close(); result.browser_closed = true;- if (server) { await new Promise(resolve => server.close(resolve)); result.server_closed = true; }- fs.writeFileSync(path.join(evidence, 'docker-sizing-browser-result.json'), JSON.stringify(result, null, 2) + '\n');- console.log(JSON.stringify({ source: result.source, result: result.result, cases: result.cases.length,- captures: result.captures.length, browser_closed: result.browser_closed, server_closed: result.server_closed, error: result.error }));- }-})().catch(error => { console.error(error); process.exitCode = 1; });diff --git a/frontend-modern/browser-tests/docker-update-guidance.cjs b/frontend-modern/browser-tests/docker-update-guidance.cjsdeleted file mode 100644index f035f7500f..0000000000--- a/frontend-modern/browser-tests/docker-update-guidance.cjs+++ /dev/null@@ -1,232 +0,0 @@-// Production Docs viewer and shipped Docker guide; no container action is run.-const assert = require('node:assert/strict');-const fs = require('node:fs');-const path = require('node:path');-const crypto = require('node:crypto');-const { chromium, webkit } = require('playwright');--(async () => {- const root = '/workspace/frontend-modern';- process.chdir(root);- const artifacts = path.join(root, 'node_modules', 'docker-update-guidance-browser');- fs.mkdirSync(artifacts, { recursive: true });- 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-docker-update-guidance'),- server: { host: '127.0.0.1', port: 5250, strictPort: true },- optimizeDeps: { noDiscovery: true, include: [] },- });- let browser;- const results = [];- try {- await server.listen();- for (const [engine, width, dark] of [- ['chromium', 1280, false],- ['webkit', 390, true],- ]) {- browser = await { chromium, webkit }[engine].launch(- engine === 'chromium'- ? { headless: true, channel: 'chromium', args: ['--no-sandbox'] }- : { headless: true },- );- const page = await browser.newPage({- viewport: { width, height: 1000 },- ...(engine === 'webkit' ? { isMobile: true, hasTouch: true } : {}),- });- const errors = [];- page.on('pageerror', (error) => errors.push(error.message));- page.on('console', (message) => {- if (message.type() === 'error') errors.push(message.text());- });- await page.goto('http://127.0.0.1:5250/browser-tests/docs-fragment-navigation.html', {- waitUntil: 'domcontentloaded',- timeout: 60000,- });- await page.evaluate(() => {- history.pushState({}, '', '/docs/DOCKER#before-updating-a-workload');- dispatchEvent(new PopStateEvent('popstate'));- });- if (dark) await page.evaluate(() => document.documentElement.classList.add('dark'));- const waitForHeading = async (id) => {- await page.waitForFunction((target) => {- const heading = document.getElementById(target);- if (!heading) return false;- const rect = heading.getBoundingClientRect();- return document.activeElement === heading && rect.top >= 0 && rect.top < innerHeight;- }, id);- assert.ok(- await page.evaluate(() => document.documentElement.scrollWidth <= innerWidth + 1),- 'page must not overflow the viewport',- );- };- await waitForHeading('before-updating-a-workload');- // Theme colours transition after the root class changes. Capture settled- // content, not an intermediate grey background on the phone fixture.- await page.evaluate(- () => new Promise((resolve) => requestAnimationFrame(() => requestAnimationFrame(resolve))),- );- await page.waitForFunction(() => document.getAnimations().length === 0);- const article = await page.locator('article').innerText();- for (const text of [- 'independent, consistent backup',- 'not a backup of mounted data',- 'five minutes after a successful update',- 'Removal, rename or restart can fail too',- 'check the current state before retrying',- 'not a monitoring-only security boundary',- ])- assert.ok(article.replace(/\s+/g, ' ').includes(text), text);- await page.screenshot({ path: path.join(artifacts, `${engine}-precautions.png`) });- await page.evaluate(() => {- history.pushState({}, '', '/docs/DOCKER#safety-features');- dispatchEvent(new PopStateEvent('popstate'));- });- await waitForHeading('safety-features');- await page.screenshot({ path: path.join(artifacts, `${engine}-limits.png`) });- const link = page.getByRole('link', {- name: 'container lifecycle requirements',- exact: true,- });- const target = decodeURIComponent((await link.getAttribute('href')).split('#')[1]);- await link.focus();- await page.keyboard.press('Enter');- await waitForHeading(target);- assert.equal(- await page- .getByRole('heading', { name: '▶️ Container Lifecycle Actions', exact: true })- .textContent(),- '▶️ Container Lifecycle Actions',- );-- // Follow the existing troubleshooting entry, then distinguish a refused- // plan from an already-sent action before reaching any shell recipe.- await page.evaluate(() => {- history.pushState({}, '', '/docs/TROUBLESHOOTING#choose-the-affected-workflow');- dispatchEvent(new PopStateEvent('popstate'));- });- await waitForHeading('choose-the-affected-workflow');- await page.getByRole('link', { name: 'Docker workload update checks', exact: true }).focus();- await page.keyboard.press('Enter');- await waitForHeading('check-a-failed-or-pending-workload-update');- assert.ok(page.url().endsWith('/docs/DOCKER#check-a-failed-or-pending-workload-update'));- const stages = page.locator('#check-a-failed-or-pending-workload-update + p + ul');- assert.equal(await stages.locator('li').count(), 3);- const stageText = (await stages.innerText()).replace(/\s+/g, ' ');- for (const phrase of [- 'refused that plan before dispatch',- '409 alone has other causes',- 'does not establish what an earlier action did',- 'outcome is uncertain, even beside a failed banner',- 'do not assume nothing changed',- ])- assert.ok(stageText.includes(phrase), phrase);- assert.ok(- await page.evaluate(() => {- const commands = document.getElementById('command-agent-is-not-connected');- const uncertain = document.getElementById('action-was-sent-or-its-outcome-is-unknown');- const firstCode = uncertain.nextElementSibling.nextElementSibling.nextElementSibling;- return (- commands.compareDocumentPosition(uncertain) & Node.DOCUMENT_POSITION_FOLLOWING &&- firstCode.tagName === 'PRE'- );- }),- );- await page.screenshot({ path: path.join(artifacts, `${engine}-update-stages.png`) });- await page.evaluate(() => {- history.pushState({}, '', '/docs/DOCKER#command-agent-is-not-connected');- dispatchEvent(new PopStateEvent('popstate'));- });- await waitForHeading('command-agent-is-not-connected');- const authorityGuide = (await page.locator('article').innerText()).replace(/\s+/g, ' ');- for (const phrase of [- "root identifies the collector's OS user, not its server-side permission",- 'commands legacy identifies an older, unmarked compatibility profile',- 'cannot authenticate the legacy command channel',- 'An absent runner alone does not rule out an authorised legacy command connection',- 'not proof of a broken collector',- 'your usual Docker or Podman administration tool',- 'Neither is a diagnostic prerequisite',- 'unknown is valid',- ])- assert.ok(authorityGuide.includes(phrase), phrase);- await page.screenshot({ path: path.join(artifacts, `${engine}-authority.png`) });- // The existing profile choices are optional operator decisions. Both- // links must be usable by keyboard; do not exercise any install action.- for (const [name, id] of [- ['agent privilege model', 'agent-privilege-model'],- ['least-privilege profile', 'least-privilege-agent-profile'],- ]) {- await page.getByRole('link', { name, exact: true }).focus();- if (id === 'agent-privilege-model') {- await page.screenshot({ path: path.join(artifacts, `${engine}-profile-choice.png`) });- }- await page.keyboard.press('Enter');- await waitForHeading(id);- assert.ok(page.url().endsWith(`/docs/AGENT_SECURITY#${id}`));- await page.evaluate(() => {- history.pushState({}, '', '/docs/DOCKER#command-agent-is-not-connected');- dispatchEvent(new PopStateEvent('popstate'));- });- await waitForHeading('command-agent-is-not-connected');- }- await page- .getByRole('link', {- name: 'command-channel connection and admission checks',- exact: true,- })- .focus();- await page.keyboard.press('Enter');- await waitForHeading('commands-enabled-but-remote-control-blocked');- assert.ok(- page.url().endsWith('/docs/UNIFIED_AGENT#commands-enabled-but-remote-control-blocked'),- );- const connectionGuide = (await page.locator('article').innerText()).replace(/\s+/g, ' ');- assert.ok(connectionGuide.includes('not a connected session'));- assert.ok(connectionGuide.includes('Keep saved identity and credentials intact'));- assert.deepEqual(errors, []);- results.push({- engine,- version: browser.version(),- width,- dark,- precautionsAndLimitsRendered: true,- keyboardRequirementsLink: true,- refusedSentUnknownStages: true,- commandGuidanceBeforeShellChecks: true,- keyboardTroubleshootingAndCommandChannelLinks: true,- legacyCredentialAndIndependentRunnerDistinguished: true,- keyboardOptionalProfileLinks: true,- headingsFocusedAndVisible: true,- noHorizontalOverflow: true,- errors,- });- await browser.close();- browser = undefined;- }- const result = {- result: 'passed',- playwright: require('playwright/package.json').version,- scope: 'shipped help rendering and keyboard navigation, not native updates or rollback',- documents: Object.fromEntries(- ['DOCKER', 'UNIFIED_AGENT', 'TROUBLESHOOTING'].map((name) => [- name,- crypto- .createHash('sha256')- .update(fs.readFileSync(path.join(root, 'public/docs', `${name}.md`)))- .digest('hex'),- ]),- ),- results,- };- fs.writeFileSync(path.join(artifacts, 'result.json'), JSON.stringify(result, null, 2) + '\n');- console.log(JSON.stringify(result));- } finally {- if (browser) await browser.close();- await server.close();- }-})().catch((error) => {- console.error(error);- process.exitCode = 1;-});diff --git a/frontend-modern/browser-tests/docs-table-headers.cjs b/frontend-modern/browser-tests/docs-table-headers.cjsdeleted file mode 100644index e7ba98eab9..0000000000--- a/frontend-modern/browser-tests/docs-table-headers.cjs+++ /dev/null@@ -1,124 +0,0 @@-// Production Docs/router/styles and shipped plan Markdown, no backend.-const assert = require('node:assert/strict');-const fs = require('node:fs');-const path = require('node:path');-const { chromium, webkit } = require('playwright');-(async () => {- const observe = process.argv.includes('observe');- const root = '/workspace/frontend-modern';- process.chdir(root);- const artifacts = path.join(root, 'node_modules', 'docs-header-browser');- fs.mkdirSync(artifacts, { recursive: true });- 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-docs-table-headers'),- server: { host: '127.0.0.1', port: 5243, strictPort: true },- optimizeDeps: { noDiscovery: true, include: [] },- });- let browser;- const results = [];- try {- await server.listen();- for (const [engine, width, tone] of [- ['chromium', 1280, 'light'],- ['webkit', 390, 'dark'],- ]) {- browser = await { chromium, webkit }[engine].launch(- engine === 'chromium'- ? { headless: true, channel: 'chromium', args: ['--no-sandbox'] }- : { headless: true },- );- const page = await browser.newPage({- viewport: { width, height: 900 },- ...(engine === 'webkit' ? { isMobile: true, hasTouch: true } : {}),- });- const errors = [];- page.on('response', (response) => {- if (response.status() >= 400)- console.log('FAILED_RESPONSE', response.status(), response.url());- });- page.on('pageerror', (e) => errors.push(e.message));- page.on('console', (m) => {- if (m.type() === 'error') {- console.log('CONSOLE_ERROR', m.text(), m.location());- errors.push(m.text());- }- });- await page.goto(- 'http://127.0.0.1:5243/browser-tests/docs-fragment-navigation.html?scenario=plans',- { waitUntil: 'domcontentloaded', timeout: 60_000 },- );- await page.locator('article table').first().waitFor();- if (tone === 'dark')- await page.evaluate(() => document.documentElement.classList.add('dark'));- const table = page.locator('article table').filter({ hasText: 'Relay (legacy)' }).first();- const th = await table.locator('thead th').allTextContents();- const headers = await table.getByRole('columnheader').allTextContents();- const snapshot = await table.ariaSnapshot();- const scopes = await table- .locator('thead th')- .evaluateAll((nodes) => nodes.map((n) => n.getAttribute('scope')));- const scroll = await table.evaluate((t) => ({- wrapper: t.parentElement.dataset.docTableScroll !== undefined,- outer: document.documentElement.scrollWidth,- viewport: window.innerWidth,- width: t.parentElement.clientWidth,- content: t.parentElement.scrollWidth,- }));- if (!observe) {- assert.equal(th.length, 8);- assert.deepEqual(headers, th);- assert.deepEqual(scopes, Array(th.length).fill('col'));- assert.ok(snapshot.includes('columnheader "Relay (legacy)"'));- assert.ok(scroll.wrapper);- assert.ok(scroll.outer <= scroll.viewport + 1);- if (width === 390) {- assert.ok(scroll.content > scroll.width);- const moved = await table.evaluate((t) => {- t.parentElement.scrollLeft = 180;- return t.parentElement.scrollLeft;- });- assert.ok(moved > 0);- }- assert.deepEqual(errors, []);- }- await table.locator('thead').scrollIntoViewIfNeeded();- await page.screenshot({ path: path.join(artifacts, `${engine}-headers.png`) });- await page.screenshot({- path: path.join(artifacts, `${engine}-${observe ? 'before' : 'after'}.png`),- fullPage: true,- });- results.push({- engine,- version: browser.version(),- width,- tone,- th,- headers,- scopes,- scroll,- snapshot,- errors,- });- await browser.close();- browser = undefined;- }- fs.writeFileSync(- path.join(artifacts, observe ? 'before.json' : 'after.json'),- JSON.stringify(- { playwright: require('playwright/package.json').version, observe, results },- null,- 2,- ),- );- console.log(JSON.stringify({ result: observe ? 'observed' : 'passed', results, artifacts }));- } finally {- if (browser) await browser.close();- await server.close();- }-})().catch((e) => {- console.error(e);- process.exitCode = 1;-});diff --git a/frontend-modern/browser-tests/drawer-integration.cjs b/frontend-modern/browser-tests/drawer-integration.cjsdeleted file mode 100644index fb01072f66..0000000000--- a/frontend-modern/browser-tests/drawer-integration.cjs+++ /dev/null@@ -1,455 +0,0 @@-// Exact compiled production consumers; read-only synthetic fixtures, never guest commands.-const fs = require('node:fs'),- path = require('node:path'),- http = require('node:http');-const crypto = require('node:crypto'),- assert = require('node:assert/strict');-const { chromium, webkit } = require('playwright');-const root = '/workspace',- origin = 'http://127.0.0.1:5335';-const compiled = root + '/tmp/drawer-integration/final-static';-const output = root + '/tmp/drawer-integration/results';-const hash = (bytes) => crypto.createHash('sha256').update(bytes).digest('hex');-(async () => {- fs.mkdirSync(output, { recursive: true });- const binding = JSON.parse(fs.readFileSync(compiled + '/binding.json'));- const result = {- result: 'incomplete',- source: binding.source_sha,- driver: hash(fs.readFileSync(__filename)),- playwright: require('playwright/package.json').version,- binding,- cases: [],- captures: [],- cleanup: { browser: false, server: false },- limits:- 'Read-only synthetic canonical observations through actual useWorkloads, GuestRow, GuestDrawer, NodeDrawer, charts and Docs. Not native guest/PBS/thaw/restart/installed or reporter acceptance.',- };- let server, browser;- try {- assert.match(result.source, /^[0-9a-f]{40}$/);- assert.equal(- result.playwright,- JSON.parse(fs.readFileSync(root + '/tests/integration/package-lock.json')).packages[- 'node_modules/@playwright/test'- ].version,- );- for (const [file, digest] of Object.entries(binding.sources))- assert.equal(hash(fs.readFileSync(root + '/frontend-modern/' + file)), digest, file);- const assets = new Map();- for (const [file, digest] of Object.entries(binding.artifacts)) {- const bytes = fs.readFileSync(compiled + '/' + file);- assert.equal(hash(bytes), digest, file);- assets.set('/' + file, bytes);- }- for (const doc of ['VM_DISK_MONITORING.md', 'TROUBLESHOOTING.md'])- assert.equal(hash(fs.readFileSync(root + '/docs/' + doc)), binding.artifacts['docs/' + doc]);- server = http.createServer((request, response) => {- if (!['GET', 'HEAD'].includes(request.method)) {- response.writeHead(405);- return response.end();- }- let pathname = new URL(request.url, origin).pathname;- if (- ['/', '/guest', '/node', '/docs/VM_DISK_MONITORING', '/docs/TROUBLESHOOTING'].includes(- pathname,- )- )- pathname = '/browser-tests/drawer-integration.html';- const bytes = assets.get(pathname);- if (!bytes) {- response.writeHead(404);- return response.end();- }- response.setHeader(- 'Content-Type',- {- '.html': 'text/html',- '.js': 'text/javascript',- '.css': 'text/css',- '.md': 'text/markdown; charset=utf-8',- }[path.extname(pathname)] || 'application/octet-stream',- );- response.setHeader('Cache-Control', 'no-store');- response.end(request.method === 'HEAD' ? undefined : bytes);- });- await new Promise((resolve, reject) => {- server.once('error', reject);- server.listen(5335, '127.0.0.1', resolve);- });- for (const [engine, width, theme] of [- [chromium, 1365, 'light'],- [chromium, 1365, 'dark'],- [webkit, 390, 'light'],- [webkit, 390, 'dark'],- ]) {- const name = `${engine === chromium ? 'chromium' : 'webkit'}-${width}-${theme}`;- browser = await engine.launch(- engine === chromium- ? { headless: true, channel: 'chromium', args: ['--no-sandbox'] }- : { headless: true },- );- const context = await browser.newContext({- viewport: { width, height: 900 },- isMobile: width < 768,- hasTouch: width < 768,- colorScheme: theme,- locale: 'en-GB',- reducedMotion: 'reduce',- });- await context.addInitScript((theme) => {- window.__trustedInputs = [];- document.addEventListener(- 'click',- (event) =>- window.__trustedInputs.push({- trusted: event.isTrusted,- label: event.target.closest('a,button,summary')?.textContent,- }),- true,- );- document.addEventListener('DOMContentLoaded', () =>- document.documentElement.classList.toggle('dark', theme === 'dark'),- );- }, theme);- const page = await context.newPage();- page.setDefaultTimeout(8000);- const record = {- name,- browser: browser.version(),- width,- theme,- requests: [],- errors: [],- states: [],- };- result.cases.push(record);- page.on('pageerror', (error) => record.errors.push(error.message));- await page.clock.install({ time: new Date('2026-10-13T13:00:00Z') });- let historyMode = 'empty';- await context.route('**/*', (route) => {- const request = route.request(),- url = new URL(request.url());- record.requests.push({ method: request.method(), path: url.pathname, search: url.search });- assert.equal(url.origin, origin);- assert.equal(request.method(), 'GET');- assert(!/\/(?:diagnostics|run-command|guest-agent|qemu)(?:\/|$)/.test(url.pathname));- if (!url.pathname.startsWith('/api/')) return route.continue();- if (url.pathname === '/api/metrics-store/history') {- const range = url.searchParams.get('range');- assert(['24h', '7d'].includes(range));- const end = Date.parse('2026-10-13T13:00:00Z'),- start = end - (range === '7d' ? 7 : 1) * 86400000;- const metrics = Object.fromEntries(- [- 'cpu',- 'memory',- 'disk',- 'temperature',- 'netin',- 'netout',- 'diskread',- 'diskwrite',- ].map((metric) => [- metric,- historyMode === 'empty'- ? []- : [- { timestamp: start, value: 20, min: 10, max: 40 },- { timestamp: end, value: 30, min: 20, max: 90 },- ],- ]),- );- return route.fulfill({- json: {- resourceType: url.searchParams.get('resourceType'),- resourceId: url.searchParams.get('resourceId'),- range,- start,- end,- metrics,- source: 'mock_synthetic',- },- });- }- if (url.pathname === '/api/license/runtime-capabilities')- return route.fulfill({- json: {- capabilities: [],- hosted_mode: false,- max_history_days: 7,- runtime: { build: 'free' },- blocked_capabilities: [],- },- });- return route.fulfill({- json: { success: true, data: [], alerts: [], anomalies: [], config: null },- });- });- const capture = async (suffix, locator) => {- await page.evaluate(async () => {- await document.fonts.ready;- await new Promise((resolve) =>- requestAnimationFrame(() => requestAnimationFrame(resolve)),- );- });- const file = `${name}-${suffix}.png`;- if (locator) await locator.screenshot({ path: output + '/' + file });- else await page.screenshot({ path: output + '/' + file, fullPage: false });- result.captures.push({- file,- bytes: fs.statSync(output + '/' + file).size,- sha256: hash(fs.readFileSync(output + '/' + file)),- });- };- const noOverflow = async () =>- assert.equal(- await page.evaluate(- () => document.documentElement.scrollWidth - document.documentElement.clientWidth,- ),- 0,- );- const activate = async (control) => {- if (width < 768) await control.tap();- else {- await control.focus();- await page.keyboard.press('Enter');- }- };- await page.goto(origin + '/guest', { waitUntil: 'networkidle' });- const row = page.locator('[data-guest-id="fixture:pve1:101"]');- const memoryCell = row.locator('[data-workload-col="memory"]'),- diskCell = row.locator('[data-workload-col="disk"]');- // A quiet low-pressure cache reading and a setup gap add no redundant caption/button.- await memoryCell.getByText('25%', { exact: true }).waitFor();- assert.equal(await memoryCell.getByRole('button', { name: /^Memory reading/ }).count(), 0);- assert.equal(await diskCell.getByRole('button', { name: /^Disk reading/ }).count(), 0);- assert.match(await diskCell.getAttribute('title'), /not running|not responding|guest agent/i);- await noOverflow();- await capture('quiet-row', row);- await page.evaluate(() => window.__integration.memory('cache-high'));- const cache = memoryCell.getByRole('button', { name: /^Memory reading/ });- await activate(cache);- const memoryDialog = page.getByRole('dialog', {- name: 'Memory reading for integration-guest',- });- await memoryDialog.waitFor();- assert.match(await memoryDialog.textContent(), /may include cache/i);- await noOverflow();- await capture('cache-dialog');- await page.keyboard.press('Escape');- await memoryDialog.waitFor({ state: 'hidden' });- await page.evaluate(() => {- window.__integration.memory('stale');- window.__integration.mode('retained');- });- await activate(diskCell.getByRole('button', { name: /^Disk reading/ }));- const diskDialog = page.getByRole('dialog', { name: 'Disk reading for integration-guest' });- await diskDialog.waitFor();- assert.match(await diskDialog.textContent(), /last known|retained|paused/i);- await capture('disk-dialog');- await page.keyboard.press('Escape');- if (width < 768) await row.getByText('integration-guest', { exact: true }).tap();- else await activate(row.locator('[data-row-action]'));- const overview = page.getByTestId('guest-drawer-overview');- await overview.waitFor();- assert.equal(await page.getByRole('tab', { name: 'History', exact: true }).count(), 0);- const details = page.getByTestId('guest-technical-details');- assert.equal(await details.getAttribute('open'), null);- const chart = overview.locator('[data-history-group="utilization"]');- await chart.waitFor();- await chart.locator('[data-history-deferred="memory"]').waitFor();- assert.match(- await chart.locator('[data-history-deferred="memory"]').textContent(),- /stopped reporting/,- );- assert.equal(await chart.locator('[data-history-current="memory"]').count(), 0);- assert.match(- await chart.locator('[data-history-deferred="disk"]').textContent(),- /last known|paused/i,- );- await overview.getByText('/data', { exact: true }).waitFor();- const os = (await page.evaluate(() => window.__integration.evidence())).os;- const fact = overview.getByTestId('guest-drawer-facts').getByText(os, { exact: true });- await fact.waitFor();- assert.equal(await fact.evaluate((e) => e.scrollWidth <= e.clientWidth), true);- await chart.scrollIntoViewIfNeeded();- await noOverflow();- await capture('retained-charts', overview);- // A new selected current observation, not a cooldown, withdraws the qualifications.- await page.evaluate(() => {- window.__integration.memory('current-zero');- window.__integration.mode('fresh');- });- await chart.locator('[data-history-deferred="memory"]').waitFor({ state: 'hidden' });- await chart.locator('[data-history-deferred="disk"]').waitFor({ state: 'hidden' });- assert.match(await chart.locator('[data-history-current="memory"]').textContent(), /0%/);- await page.evaluate(() => window.__integration.display('sparklines'));- assert.equal(await row.getByRole('button', { name: /^(Memory|Disk) reading/ }).count(), 0);- record.states.push(- 'Quiet captions, keyboard/touch disclosures, stale-Agent/prior disk qualifications, current measured zero and sparkline withdrawal',- );- await activate(details.locator('summary'));- const completed = details.locator('time[datetime="2026-10-13T12:30:00.000Z"]');- await completed.waitFor();- assert.equal(await completed.textContent(), '2026-10-13 12:30:00 UTC');- await page.evaluate(() => window.__integration.backup('2026-10-13T13:30:00+01:00'));- assert.equal(await completed.textContent(), '2026-10-13 12:30:00 UTC');- await noOverflow();- await capture('guest-details', details);- await activate(details.locator('summary'));- record.states.push(- 'Last completed backup original instant survives offset input as visible UTC, independently of backup/read activity',- );- historyMode = 'stored';- await activate(overview.getByRole('button', { name: 'Refresh history', exact: true }));- await chart.locator('[data-history-band="memory"]').waitFor({ state: 'attached' });- assert(await chart.locator('[data-history-band="memory"]').getAttribute('d'));- const inspector = chart.getByRole('slider', { name: 'Inspect Utilization history' });- await inspector.focus();- await page.keyboard.press('End');- await chart.locator('[data-history-peak="memory"]').waitFor();- assert.match(- await chart.locator('[data-history-peak="memory"]').textContent(),- /^peak 90\.0%$/,- );- assert.match(- await chart.getByTestId('guest-history-hover-time').getAttribute('aria-label'),- /Stored observation/,- );- await noOverflow();- await capture('stored-bands', chart);- await Promise.all([- page.waitForResponse(- (response) =>- response.url().includes('/api/metrics-store/history') &&- response.url().includes('range=7d'),- ),- overview.getByLabel('History range', { exact: true }).selectOption('7d'),- ]);- assert(- record.requests.some(- (r) => r.path === '/api/metrics-store/history' && r.search.includes('range=7d'),- ),- );- await activate(page.getByRole('tab', { name: 'Manage', exact: true }));- const reads = record.requests.filter((r) => r.path === '/api/metrics-store/history').length;- await page.clock.runFor(60001);- assert.equal(- record.requests.filter((r) => r.path === '/api/metrics-store/history').length,- reads,- );- await activate(page.getByRole('tab', { name: 'Overview', exact: true }));- record.states.push(- 'Overview-only History, finite min/max spread and stored peak, range selection; hidden Manage does not poll',- );- // Missing usage stays missing and the shipped guidance is usable without hovering.- await page.evaluate(() => {- window.__integration.mode('unknown');- window.__integration.memory('powered-off');- });- await overview.getByRole('link', { name: 'Filesystem reading guidance' }).waitFor();- await activate(overview.getByRole('link', { name: 'Filesystem reading guidance' }));- await page.waitForURL('**/docs/VM_DISK_MONITORING#*');- await page- .getByRole('heading', {- name: 'A missing reading is not an installation diagnosis',- exact: true,- })- .waitFor();- await noOverflow();- await capture('safe-guide');- record.states.push(- 'Unknown usage and powered-off memory kept distinct; actual shipped safe guidance reached',- );-- historyMode = 'empty';- await page.goto(origin + '/node', { waitUntil: 'networkidle' });- await page.waitForFunction(() => window.__temperatureProducer);- record.temperatureProducer = await page.evaluate(() => window.__temperatureProducer);- assert.equal(record.temperatureProducer.resource.temperature, 55);- assert.equal(record.temperatureProducer.projected.cpuTemperature, 55);- const node = page.getByTestId('node-drawer-overview'),- nodeDetails = page.getByTestId('node-technical-details');- await node.waitFor();- assert.equal(await nodeDetails.getAttribute('open'), null);- assert.equal(await page.getByRole('tab', { name: 'History', exact: true }).count(), 0);- const thermals = node.locator('[data-history-group="thermals"]');- await thermals.locator('[data-history-current="temperature"]').waitFor();- assert.match(- await thermals.locator('[data-history-current="temperature"]').textContent(),- /55/,- );- assert.doesNotMatch(await thermals.textContent(), /91°C|95°C/);- const helpTrigger = node.getByRole('button', { name: 'Why update checks are unavailable' });- await activate(helpTrigger);- const help = page.getByRole('dialog', { name: 'Proxmox update-check access' });- await help.waitFor();- assert.match(await help.textContent(), /Sys.Modify/);- assert.match(await help.textContent(), /broader than read-only monitoring/);- await help.evaluate((e) => {- window.__retainedHelp = e;- });- await helpTrigger.evaluate((e) => {- window.__retainedTrigger = e;- });- await page.evaluate(() => window.__integration.update({ cpu: 0.2 }));- await page.clock.runFor(60001);- await page.evaluate(() =>- window.__integration.update({ pendingUpdatesStatus: 'unavailable' }),- );- assert.equal(await help.evaluate((e) => window.__retainedHelp === e), true);- assert.equal(await helpTrigger.evaluate((e) => window.__retainedTrigger === e), true);- const more = help.getByRole('link', { name: 'Learn more', exact: true });- assert.equal(- await more.getAttribute('href'),- '/docs/TROUBLESHOOTING#proxmox-pending-update-access',- );- await noOverflow();- await capture('node-help');- await page.keyboard.press('Escape');- await activate(nodeDetails.locator('summary'));- await nodeDetails.getByText('Usage unavailable · 10.0 GB total', { exact: true }).waitFor();- await nodeDetails.getByText('0% · 0 B / 10.0 GB', { exact: true }).waitFor();- await nodeDetails.getByText('50% · 5.00 GB / 10.0 GB', { exact: true }).waitFor();- assert.equal(- await nodeDetails- .getByRole('button', { name: 'Why update checks are unavailable' })- .count(),- 0,- );- await noOverflow();- await capture('node-disks', nodeDetails);- await page.evaluate(() => window.__integration.update({ cpuTemperature: undefined }));- await thermals.locator('[data-history-current="temperature"]').waitFor({ state: 'hidden' });- assert.doesNotMatch(await thermals.textContent(), /91°C|95°C/);- record.states.push(- 'Primary CPU only; missing primary not replaced by hottest sensor; per-disk missing versus measured zero; update help stable outside closed Details',- );- assert.equal(record.errors.length, 0);- record.trustedInputs = await page.evaluate(() => window.__trustedInputs);- assert(record.trustedInputs.length > 0 && record.trustedInputs.every((e) => e.trusted));- await context.close();- await browser.close();- browser = null;- }- result.result = 'passed';- } catch (error) {- result.error = String(error.stack || error);- process.exitCode = 1;- } finally {- if (browser) await browser.close();- result.cleanup.browser = true;- if (server) await new Promise((resolve) => server.close(resolve));- result.cleanup.server = true;- fs.writeFileSync(output + '/result.json', JSON.stringify(result, null, 2) + '\n');- console.log(- JSON.stringify({- result: result.result,- cases: result.cases.length,- captures: result.captures.length,- error: result.error || null,- }),- );- }-})();diff --git a/frontend-modern/browser-tests/drawer-integration.html b/frontend-modern/browser-tests/drawer-integration.htmldeleted file mode 100644index ad50727e79..0000000000--- a/frontend-modern/browser-tests/drawer-integration.html+++ /dev/null@@ -1,12 +0,0 @@-<!doctype html>-<html lang="en-GB">- <head>- <meta charset="utf-8" />- <meta name="viewport" content="width=device-width, initial-scale=1.0" />- <title>Drawer integration proof</title>- </head>- <body>- <div id="root"></div>- <script type="module" src="/browser-tests/drawer-integration.tsx"></script>- </body>-</html>diff --git a/frontend-modern/browser-tests/drawer-integration.tsx b/frontend-modern/browser-tests/drawer-integration.tsxdeleted file mode 100644index 78b84d5103..0000000000--- a/frontend-modern/browser-tests/drawer-integration.tsx+++ /dev/null@@ -1,235 +0,0 @@-// Final Overview history/caption/update-access bytes through real consuming components.-// This fixture never operates on a guest, credential, service or backup.-import { createSignal, onMount, Show } from 'solid-js';-import { render } from 'solid-js/web';-import { Router, Route } from '@solidjs/router';-import { DarkModeContext } from '../src/contexts/appRuntime';-import { useWorkloads } from '../src/hooks/useWorkloads';-import { nodeFromResource } from '../src/utils/resourceStateAdapters';-import { GuestRow } from '../src/components/Workloads/GuestRow';-import { GuestDrawer } from '../src/components/Workloads/GuestDrawer';-import { NodeDrawer } from '../src/components/Workloads/NodeDrawer';-import Docs from '../src/pages/Docs';-import type { Resource } from '../src/types/resource';-import type { Alert, Node } from '../src/types/api';-import '../src/index.css';--const os =- 'Microsoft Windows Server 2025 Datacenter Evaluation with retained build identity 26100.1742';-const capacity = 10 * 1024 ** 3;-const alert = (id: string, resourceId: string, type = 'memory'): Alert =>- ({- id,- resourceId,- resourceName: 'integration-guest',- type,- level: 'warning',- value: 92,- threshold: 85,- message: 'Synthetic metric warning',- startTime: new Date().toISOString(),- }) as Alert;-function GuestFixture() {- const [mode, setMode] = createSignal('unknown');- const [memoryMode, setMemoryMode] = createSignal('cache-low');- const [display, setDisplay] = createSignal<'bars' | 'sparklines'>('bars');- const observedAt = '2026-10-13T12:00:00Z';- const memory = () => {- const unavailable = ['unknown', 'powered-off'].includes(memoryMode());- const current = memoryMode() === 'current-zero' ? 0 : memoryMode() === 'cache-low' ? 25 : 92;- return {- current,- total: capacity,- used: (capacity * current) / 100,- ...(unavailable ? { usageUnavailable: true } : {}),- observation: {- state: unavailable ? ('unavailable' as const) : ('current' as const),- source:- memoryMode() === 'powered-off'- ? 'powered-off'- : memoryMode().startsWith('cache')- ? 'status-mem'- : 'agent',- observedAt,- },- };- };- const [open, setOpen] = createSignal(false);- const [backup, setBackup] = createSignal('2026-10-13T12:30:00Z');- const snapshot = (): Resource[] => [- {- id: 'fixture:pve1:101',- type: 'vm',- name: 'integration-guest',- displayName: 'integration-guest',- platformId: 'fixture',- platformType: 'proxmox-pve',- platformScopes: ['proxmox-pve'],- sourceType: 'api',- sources: ['proxmox'],- status: 'online',- lastSeen: Date.now(),- metricsTarget: { resourceType: 'vm', resourceId: 'fixture:pve1:101' },- cpu: { current: 10 },- memory: memory(),- agent: { stale: memoryMode() === 'stale', lastReportAt: observedAt },- ...(mode() !== 'unknown'- ? { disk: { current: 50, used: capacity / 2, total: capacity } }- : {}),- proxmox: {- lastBackup: backup(),- backupInProgress: mode() === 'retained',- vmid: 101,- nodeName: 'pve1',- instance: 'fixture',- runtimeStatus: 'running',- osName: os,- guestAgentStatus:- mode() === 'unknown' ? 'not-running' : mode() === 'retained' ? 'deferred' : 'available',- diskStatusReason:- mode() === 'unknown'- ? 'agent-not-running'- : mode() === 'retained'- ? 'prev-vm-locked'- : mode() === 'denied'- ? 'permission-denied'- : '',- lock: mode() === 'retained' ? 'backup' : '',- disks:- mode() === 'unknown'- ? []- : [- {- mountpoint: '/data',- type: 'ext4',- total: capacity,- used: capacity / 2,- usage: 50,- },- ],- },- },- ];- const state = useWorkloads(() => true, { resourceSnapshot: snapshot });- const guest = () => state.workloads()[0];- (window as any).__integration = {- mode: setMode,- memory: setMemoryMode,- display: setDisplay,- backup: setBackup,- evidence: () => ({ mode: mode(), projected: guest(), os }),- };- return (- <main class="mx-auto min-h-screen max-w-4xl space-y-3 bg-surface p-3 text-base-content">- <h1>Combined guest drawer</h1>- <p class="text-xs text-muted">Synthetic observations; no guest commands.</p>- <Show when={guest()}>- <table class="w-full table-fixed">- <tbody>- <GuestRow- guest={guest()}- visibleColumnIds={['name', 'memory', 'disk']}- metricDisplayMode={display()}- metricHoverMode="value"- isExpanded={open()}- workloadTableLayoutMode={window.innerWidth < 768 ? 'phone' : 'wide'}- onClick={() => setOpen(!open())}- />- </tbody>- </table>- <Show when={open()}>- <GuestDrawer- guest={guest()}- alerts={[alert('fixture-warning', 'fixture:pve1:101')]}- onClose={() => setOpen(false)}- />- </Show>- </Show>- </main>- );-}-function NodeFixture() {- const [node, setNode] = createSignal<Node>({- id: 'fixture-pve1',- name: 'pve1',- instance: 'fixture',- host: 'pve1',- status: 'online',- type: 'node',- cpu: 0.1,- cpuTemperature: 55,- temperature: {- available: true,- cpuPackage: 55,- cores: [{ core: 0, temp: 50 }],- hasCPU: true,- hasGPU: true,- gpu: [{ device: 'fixture-gpu', edge: 95 }],- nvme: [{ device: 'fixture-nvme', temp: 91 }],- lastUpdate: '2026-10-13T12:00:00Z',- },- memory: { total: capacity, used: capacity / 4, free: capacity * 0.75, usage: 25 },- disk: { total: capacity, used: capacity / 2, free: capacity / 2, usage: 50 },- uptime: 3600,- loadAverage: [0.1, 0.2, 0.3],- kernelVersion: '6.8.12',- pveVersion: 'pve-manager/9.2.21',- cpuInfo: {- model:- 'Fixture CPU with a deliberately long hardware model and complete revision identifier 2026-A-extended',- cores: 4,- sockets: 1,- mhz: '2400',- },- lastSeen: new Date().toISOString(),- connectionHealth: 'healthy',- linkedAgentId: 'agent:fixture-node-with-a-long-retained-identity-2026',- networkIn: 1024 ** 2,- networkOut: 2 * 1024 ** 2,- diskRead: 1024 ** 2,- diskWrite: 2 * 1024 ** 2,- pendingUpdates: 7,- pendingUpdatesStatus: 'stale',- pendingUpdatesReason: 'permission_denied',- pendingUpdatesCheckedAt: new Date(Date.now() - 60000).toISOString(),- });- onMount(async () => {- const resource = await (await fetch('/temperature-producer.json')).json();- const projected = nodeFromResource(resource);- if (!projected || projected.cpuTemperature !== 55)- throw new Error('Producer-to-node CPU projection mismatch');- setNode((previous) => ({ ...previous, cpuTemperature: projected.cpuTemperature }));- (window as any).__temperatureProducer = { resource, projected };- });- (window as any).__integration = {- update: (delta: Partial<Node>) => setNode((previous) => ({ ...previous, ...delta })),- evidence: node,- };- return (- <main class="mx-auto min-h-screen max-w-4xl space-y-3 bg-surface p-3 text-base-content">- <h1>Combined node drawer</h1>- <p class="text-xs text-muted">Synthetic observations; no permissions changed.</p>- <NodeDrawer- node={node()}- alerts={[alert('fixture-guest-warning', 'fixture:pve1:101')]}- disks={[- { mountpoint: '/unknown', total: capacity, usage: -1 },- { mountpoint: '/empty', total: capacity, free: capacity },- { mountpoint: '/measured', total: capacity, used: capacity / 2, usage: 50 },- ]}- />- </main>- );-}-render(- () => (- <DarkModeContext.Provider value={() => document.documentElement.classList.contains('dark')}>- <Router>- <Route path="/docs/*docPath" component={Docs} />- <Route path="/node" component={NodeFixture} />- <Route path="*" component={GuestFixture} />- </Router>- </DarkModeContext.Provider>- ),- document.getElementById('root')!,-);diff --git a/frontend-modern/browser-tests/drawer-reading-access.cjs b/frontend-modern/browser-tests/drawer-reading-access.cjsdeleted file mode 100644index c76ccf8a0d..0000000000--- a/frontend-modern/browser-tests/drawer-reading-access.cjs+++ /dev/null@@ -1,473 +0,0 @@-const assert = require('node:assert/strict');-const fs = require('node:fs');-const path = require('node:path');-const http = require('node:http');-const crypto = require('node:crypto');-const { chromium, webkit } = require('playwright');-const root = '/workspace';-const frontend = path.join(root, 'frontend-modern');-const staticRoot = path.join(root, 'tmp/drawer-reading-static/final');-const output = path.join(root, 'tmp/drawer-reading/browser');-const origin = 'http://127.0.0.1:5298';-const hash = (b) => crypto.createHash('sha256').update(b).digest('hex');-const longName = 'Microsoft Windows Server 2025 Datacenter Evaluation';-const version = '10.0.26100.1742 (64-bit)';-const summary = `${longName} • ${version}`;-const changed = [- 'frontend-modern/src/components/Workloads/GuestDrawerOverview.tsx',- 'frontend-modern/src/content/help/updates.ts',-];-const binding = JSON.parse(fs.readFileSync(path.join(staticRoot, 'binding.json')));-const result = {- base: 'c56cc44bd8686413f2769cc9623dc30c87c589d8',- sourceHashes: Object.fromEntries(- changed.map((p) => [p, hash(fs.readFileSync(path.join(root, p)))]),- ),- buildBinding: binding,- docHash: hash(fs.readFileSync(path.join(root, 'docs/TROUBLESHOOTING.md'))),- playwright: require('playwright/package.json').version,- scope:- 'Production Resources API/useWorkloads/GuestRow/GuestDrawer, NodeDrawer/HelpIcon, and shipped Docs viewer. Synthetic observations only; no guest command, permission, update, freeze or native recovery operation.',- checks: [],- requests: [],- served: {},- captures: [],- browsers: [],- errors: [],- cleanup: {},-};-for (const [file, digest] of Object.entries(binding.sources)) {- assert.equal(hash(fs.readFileSync(path.join(frontend, file))), digest, file);-}-const resource = (read) => {- const total = 10 * 1024 ** 3;- return {- id: 'lab-pve-a-101',- type: read.type,- name: 'system-guest',- status: 'online',- sources: ['proxmox'],- lastSeen: '2026-10-12T22:00:00Z',- metrics: {- cpu: { percent: 10 },- memory: { percent: 25, used: total / 4, total },- disk: { percent: 50, used: total / 2, total },- },- proxmox: {- vmid: 101,- instance: 'lab',- nodeName: 'pve-a',- runtimeStatus: 'running',- osName: read.name,- osVersion: read.version,- guestAgentStatus: read.status,- disks: [{ mountpoint: '/data', filesystem: 'ext4', total, used: total / 2 }],- },- };-};-let server;-(async () => {- fs.mkdirSync(output, { recursive: true });- assert.equal(- result.playwright,- JSON.parse(fs.readFileSync(path.join(root, 'tests/integration/package-lock.json'))).packages[- 'node_modules/@playwright/test'- ].version,- );- server = http.createServer((request, response) => {- const url = new URL(request.url, origin);- let file;- if (url.pathname === '/docs/TROUBLESHOOTING.md')- file = path.join(root, 'docs/TROUBLESHOOTING.md');- else {- file = path.resolve(staticRoot, '.' + decodeURIComponent(url.pathname));- if (!file.startsWith(staticRoot + '/')) {- response.writeHead(403);- response.end();- return;- }- if (url.pathname === '/docs/TROUBLESHOOTING')- file = path.join(staticRoot, 'browser-tests/drawer-reading-access.html');- }- if (!fs.existsSync(file) || !fs.statSync(file).isFile()) {- response.writeHead(404);- response.end();- return;- }- const bytes = fs.readFileSync(file);- const rel = path.relative(staticRoot, file);- assert.equal(- hash(bytes),- file.endsWith('TROUBLESHOOTING.md') ? result.docHash : binding.artifacts[rel],- );- result.served[url.pathname] = hash(bytes);- response.writeHead(200, {- 'Content-Type':- {- '.html': 'text/html',- '.js': 'text/javascript',- '.css': 'text/css',- '.md': 'text/markdown',- }[path.extname(file)] || 'application/octet-stream',- });- response.end(bytes);- });- await new Promise((resolve, reject) => {- server.once('error', reject);- server.listen(5298, '127.0.0.1', resolve);- });- for (const spec of [- {- name: 'desktop',- engine: chromium,- width: 1280,- height: 900,- colorScheme: 'light',- timezoneId: 'Europe/London',- },- {- name: 'phone',- engine: webkit,- width: 390,- height: 844,- colorScheme: 'dark',- timezoneId: 'Asia/Tokyo',- },- ]) {- const browser = await spec.engine.launch(- spec.engine === chromium- ? { headless: true, channel: 'chromium', args: ['--no-sandbox'] }- : { headless: true },- );- const context = await browser.newContext({- viewport: { width: spec.width, height: spec.height },- hasTouch: spec.name === 'phone',- isMobile: spec.name === 'phone',- colorScheme: spec.colorScheme,- locale: 'en-GB',- timezoneId: spec.timezoneId,- });- result.browsers.push({- ...Object.fromEntries(Object.entries(spec).filter(([k]) => k !== 'engine')),- version: browser.version(),- });- let read = { name: longName, version, type: 'vm', status: 'available' };- try {- await context.route('**/*', async (route) => {- const url = new URL(route.request().url());- if (url.origin !== origin) {- result.errors.push({ external: url.origin });- await route.abort();- return;- }- if (!url.pathname.startsWith('/api/')) {- await route.continue();- return;- }- result.requests.push({- browser: spec.name,- method: route.request().method(),- path: url.pathname,- });- assert.equal(route.request().method(), 'GET');- let body;- if (url.pathname === '/api/resources')- body = { data: [resource(read)], meta: { totalPages: 1 } };- else if (url.pathname === '/api/license/runtime-capabilities')- body = { plan: 'free', capabilities: {}, features: [] };- else if (url.pathname === '/api/alerts/activation') body = { enabled: false };- else if (url.pathname === '/api/alerts/config')- body = { guestDefaults: {}, hostDefaults: {} };- else if (url.pathname === '/api/alerts/active') body = [];- else if (url.pathname === '/api/ai/intelligence/anomalies')- body = { anomalies: [], count: 0 };- else if (url.pathname === '/api/ai/intelligence') body = null;- else if (url.pathname.startsWith('/api/guests/metadata/')) body = { customUrl: '' };- else if (- url.pathname.startsWith('/api/resources/') &&- url.pathname.endsWith('/operator-state')- )- body = { configured: false, state: null };- else if (url.pathname === '/api/metrics-store/history')- body = {- resourceType: url.searchParams.get('resourceType'),- resourceId: url.searchParams.get('resourceId'),- range: '24h',- start: 1,- end: 2,- metrics: {},- source: 'store',- };- else {- result.errors.push({ unmatched: url.pathname });- body = {};- }- await route.fulfill({ json: body });- });- const page = await context.newPage();- page.setDefaultTimeout(10000);- page.on('pageerror', (e) => result.errors.push({ browser: spec.name, error: e.message }));- page.on('console', (e) => {- if (e.type() === 'error') result.errors.push({ browser: spec.name, console: e.text() });- });- await page.clock.setFixedTime(new Date('2026-10-12T22:00:00Z'));- await page.routeWebSocket(/\/ws(?:\?|$)/, () => {});- await page.goto(`${origin}/browser-tests/drawer-reading-access.html`, {- waitUntil: 'domcontentloaded',- timeout: 30000,- });- if (spec.colorScheme === 'dark')- await page.evaluate(() => document.documentElement.classList.add('dark'));- const check = (name, detail = {}) =>- result.checks.push({ browser: spec.name, name, ...detail });- const capture = async (target, name) => {- await target.evaluate(async () => {- await document.fonts.ready;- await new Promise((r) => requestAnimationFrame(() => requestAnimationFrame(r)));- });- const file = path.join(output, `${spec.name}-${name}.png`);- await target.screenshot({ path: file, fullPage: false, animations: 'disabled' });- result.captures.push({- file: path.relative(root, file),- sha256: hash(fs.readFileSync(file)),- bytes: fs.statSync(file).size,- });- };- const noOverflow = async (target) =>- assert.ok(- await target.evaluate(- () => document.documentElement.scrollWidth <= window.innerWidth + 1,- ),- );- const trigger = page.getByRole('button', { name: 'Expand system-guest', exact: true });- await trigger.waitFor();- const requests = result.requests.length;- if (spec.name === 'desktop') {- await trigger.focus();- await page.keyboard.press('Enter');- } else await page.locator('tr.workload-row').tap();- const drawer = page.getByTestId('guest-technical-details');- await drawer.waitFor();- const systemValue = drawer.getByText(summary, { exact: true });- await systemValue.waitFor();- const original = await drawer.evaluate((el) => {- window.__originalDrawer = el;- return true;- });- assert.ok(original);- const measure = async (value) =>- value.evaluate((el) => {- const rect = el.getBoundingClientRect(),- style = getComputedStyle(el);- const range = document.createRange();- range.selectNodeContents(el);- return {- text: el.textContent,- width: rect.width,- height: rect.height,- scrollWidth: el.scrollWidth,- clientWidth: el.clientWidth,- whiteSpace: style.whiteSpace,- textOverflow: style.textOverflow,- lineHeight: parseFloat(style.lineHeight),- lineRects: [...range.getClientRects()].map((r) => ({- x: r.x,- right: r.right,- y: r.y,- bottom: r.bottom,- })),- };- });- const wrapped = await measure(systemValue);- assert.equal(wrapped.text, summary);- assert.equal(wrapped.whiteSpace, 'normal');- assert.notEqual(wrapped.textOverflow, 'ellipsis');- assert.ok(wrapped.scrollWidth <= wrapped.clientWidth + 1);- assert.ok(wrapped.height > wrapped.lineHeight);- assert.ok(wrapped.lineRects.every((r) => r.x >= 0 && r.right <= spec.width + 1));- assert.equal(result.requests.length, requests, 'disclosure adds no API read');- await noOverflow(page);- check(- 'keyboard/touch opens the production row and full System wraps without tooltip interaction',- wrapped,- );- await systemValue.scrollIntoViewIfNeeded();- await capture(page, 'system');- for (const next of [- {- name: 'Debian GNU/Linux',- version: '13.7 (trixie)',- type: 'system-container',- status: 'available',- },- {- name: longName,- version: 'Build-' + '1234567890'.repeat(24),- type: 'vm',- status: 'not-running',- },- { name: 'Debian GNU/Linux', version: '', type: 'system-container', status: 'available' },- { name: '', version: '13.7 (trixie)', type: 'system-container', status: 'available' },- { name: '', version: '', type: 'vm', status: 'available' },- { name: longName, version, type: 'vm', status: 'available' },- ]) {- read = next;- await page.evaluate(() => window.__drawerReading.refetch());- const expected = [next.name, next.version].filter(Boolean).join(' • ');- if (expected) {- const value = drawer.getByText(expected, { exact: true });- await value.waitFor();- const metrics = await measure(value);- assert.ok(metrics.scrollWidth <= metrics.clientWidth + 1);- assert.ok(metrics.lineRects.every((r) => r.x >= 0 && r.right <= spec.width + 1));- if (next.status === 'not-running')- assert.equal(await drawer.getByText('Not running', { exact: true }).count(), 1);- check('current synthetic OS update remains complete and qualified', {- ...next,- geometry: metrics,- });- } else {- assert.equal(- await drawer- .locator('td')- .filter({ hasText: /^System$/ })- .count(),- 0,- );- check('no OS evidence omits the System row');- }- assert.ok(await drawer.evaluate((el) => el === window.__originalDrawer));- assert.equal(- (await page.evaluate(() => window.__drawerReading.evidence())).type,- next.type,- );- await noOverflow(page);- }- const helpTrigger = page.getByRole('button', { name: 'Why update checks are unavailable' });- await helpTrigger.scrollIntoViewIfNeeded();- const count = result.requests.length;- if (spec.name === 'desktop') {- await helpTrigger.focus();- await page.keyboard.press('Enter');- } else await helpTrigger.tap();- const dialog = page.getByRole('dialog', { name: 'Proxmox update-check access' });- await dialog.waitFor();- await page.waitForFunction(() => {- const d = document.querySelector('[role="dialog"]');- return (- d &&- getComputedStyle(d).opacity === '1' &&- d.getAnimations().every((a) => a.playState === 'finished')- );- });- assert.ok((await dialog.innerText()).includes('broader than read-only monitoring'));- assert.ok(- (await dialog.innerText()).includes('does not identify the exact missing privilege'),- );- const link = dialog.getByRole('link', { name: 'Learn more' });- assert.equal(- await link.getAttribute('href'),- '/docs/TROUBLESHOOTING#proxmox-pending-update-access',- );- assert.equal(await link.getAttribute('rel'), 'noopener noreferrer');- assert.equal(result.requests.length, count);- await page.evaluate(() => {- window.__originalHelp = document.querySelector('[role="dialog"]');- window.__drawerReading.node({- cpu: 0.2,- pendingUpdates: 7,- pendingUpdatesStatus: 'stale',- pendingUpdatesCheckedAt: '2026-10-12T21:58:00Z',- });- });- assert.ok(await dialog.evaluate((el) => el === window.__originalHelp));- assert.ok((await page.getByTestId('node-drawer').innerText()).includes('7 pending'));- check(- 'denied and retained update guidance persists through synthetic polling; local protected docs link, no read or mutation',- );- // Show the link and complete help panel in the settled capture.- await link.scrollIntoViewIfNeeded();- await capture(page, 'update-help');- const popupPromise = context.waitForEvent('page');- if (spec.name === 'desktop') {- await link.focus();- await page.keyboard.press('Enter');- } else await link.tap();- const popup = await popupPromise;- popup.on('pageerror', (e) =>- result.errors.push({ browser: spec.name, docsError: e.message }),- );- await popup.waitForLoadState('domcontentloaded');- await popup.locator('article').waitFor();- if (spec.colorScheme === 'dark')- await popup.evaluate(() => document.documentElement.classList.add('dark'));- const heading = popup.getByRole('heading', {- name: 'Proxmox pending-update access',- exact: true,- });- await heading.waitFor();- await popup.waitForFunction(() => {- const h = document.querySelector('[id="proxmox-pending-update-access"]');- const r = h?.getBoundingClientRect();- return r && r.top >= 0 && r.top < window.innerHeight;- });- assert.equal(new URL(popup.url()).hash, '#proxmox-pending-update-access');- assert.ok(- (await popup.locator('article').innerText()).includes('Do not add it automatically'),- );- await noOverflow(popup);- check(- 'actual help link opens the shipped Docs renderer at its access section, containing the read-only/TLS/no-POST caveats',- );- await capture(popup, 'shipped-docs');- await popup.close();- if (spec.name === 'desktop') await page.keyboard.press('Escape');- else await dialog.getByRole('button', { name: 'Close help' }).tap();- assert.equal(await dialog.count(), 0);- assert.equal(- await page.evaluate(() => document.activeElement?.getAttribute('aria-label')),- 'Why update checks are unavailable',- );- check('Escape/Close help returns focus to the existing trigger');- await page.evaluate(() =>- window.__drawerReading.node({- pendingUpdates: 0,- pendingUpdatesStatus: 'checked',- pendingUpdatesReason: undefined,- pendingUpdatesCheckedAt: '2026-10-12T22:00:00Z',- }),- );- assert.equal(await helpTrigger.count(), 0);- assert.ok((await page.getByTestId('node-drawer').innerText()).includes('No pending updates'));- check('confirmed zero withdraws denial advice without editing access');- assert.deepEqual(result.errors, []);- } finally {- await context.close();- result.cleanup[`${spec.name}Context`] = true;- await browser.close();- result.cleanup[`${spec.name}Browser`] = true;- }- }- result.result = 'passed';-})()- .catch((error) => {- result.result = 'failed';- result.failure = { message: error.message, stack: error.stack };- process.exitCode = 1;- })- .finally(async () => {- if (server) await new Promise((resolve) => server.close(resolve));- result.cleanup.server = true;- fs.mkdirSync(output, { recursive: true });- fs.writeFileSync(path.join(output, 'result.json'), JSON.stringify(result, null, 2) + '\n');- console.log(- JSON.stringify({- result: result.result,- checks: result.checks.length,- captures: result.captures.length,- errors: result.errors,- cleanup: result.cleanup,- failure: result.failure,- }),- );- });diff --git a/frontend-modern/browser-tests/drawer-reading-access.html b/frontend-modern/browser-tests/drawer-reading-access.htmldeleted file mode 100644index e468abff12..0000000000--- a/frontend-modern/browser-tests/drawer-reading-access.html+++ /dev/null@@ -1,2 +0,0 @@-<!doctype html>-<html lang="en"><head><meta charset="UTF-8" /><meta name="viewport" content="width=device-width, initial-scale=1.0" /><title>Drawer evidence fixture</title></head><body><div id="root"></div><script type="module" src="/browser-tests/drawer-reading-access.tsx"></script></body></html>diff --git a/frontend-modern/browser-tests/drawer-reading-access.tsx b/frontend-modern/browser-tests/drawer-reading-access.tsxdeleted file mode 100644index cf0d4cce8f..0000000000--- a/frontend-modern/browser-tests/drawer-reading-access.tsx+++ /dev/null@@ -1,135 +0,0 @@-// Existing production API/row/drawers/help/Docs, supplied only synthetic observations.-// No guest-agent, backup, update, permission or native recovery operation is made.-import { createSignal, For, Show } from 'solid-js';-import { render } from 'solid-js/web';-import { Router, Route } from '@solidjs/router';-import { useWorkloads } from '../src/hooks/useWorkloads';-import { GuestRow } from '../src/components/Workloads/GuestRow';-import { GuestDrawer } from '../src/components/Workloads/GuestDrawer';-import { NodeDrawer } from '../src/components/Workloads/NodeDrawer';-import Docs from '../src/pages/Docs';-import {- GUEST_COLUMNS,- getGuestColumnWidthStyle,- getWorkloadTableLayoutModeForContainer,- getWorkloadVisibleColumnsForLayout,-} from '../src/components/Workloads/guestRowModel';-import { DarkModeContext } from '../src/contexts/appRuntime';-import type { Node } from '../src/types/api';-import '../src/index.css';--const makeNode = (): Node => ({- id: 'lab-pve-a',- name: 'pve-a',- instance: 'lab',- status: 'online',- type: 'node',- cpu: 0.1,- memory: { total: 1024, used: 256, free: 768, usage: 25 },- disk: { total: 1024, used: 256, free: 768, usage: 25 },- uptime: 3600,- loadAverage: [0.1, 0.2, 0.1],- kernelVersion: '6.8.12',- pveVersion: 'pve-manager/9.2.21',- cpuInfo: { model: 'Synthetic CPU', cores: 4, sockets: 1, mhz: '2400' },- lastSeen: '2026-10-12T22:00:00Z',- connectionHealth: 'healthy',- pendingUpdatesStatus: 'unavailable',- pendingUpdatesReason: 'permission_denied',-});-function Fixture() {- const state = useWorkloads(() => true);- const [expanded, setExpanded] = createSignal(false);- const [node, setNode] = createSignal(makeNode());- const primary = () => state.workloads()[0]!;- const layout = getWorkloadTableLayoutModeForContainer(window.innerWidth - 24);- const requested = new Set(['name', 'cpu', 'memory', 'disk', 'uptime']);- const columns = getWorkloadVisibleColumnsForLayout(- GUEST_COLUMNS.filter((c) => requested.has(c.id)),- layout,- );- const ids = columns.map((c) => c.id);- (window as any).__drawerReading = {- refetch: state.refetch,- node: (change: Partial<Node>) => setNode((prior) => ({ ...prior, ...change })),- evidence: () => ({- id: primary().id,- type: primary().type,- osName: primary().osName,- osVersion: primary().osVersion,- }),- };- return (- <main class="min-h-screen space-y-3 bg-surface p-3 text-base-content pulse-wide-data-surface">- <h1 class="text-base font-semibold">Drawer evidence access</h1>- <p class="text-xs text-muted">Synthetic readings; no guest commands or update actions.</p>- <Show when={primary()}>- <div class="table-scroll-shell overflow-x-auto">- <table class="w-full platform-table workload-table table-fixed">- <colgroup>- <For each={ids}>- {(id) => (- <col- style={getGuestColumnWidthStyle(id, window.innerWidth <= 768, layout, ids)}- />- )}- </For>- </colgroup>- <thead>- <tr>- <For each={columns}>{(column) => <th scope="col">{column.label}</th>}</For>- </tr>- </thead>- <tbody>- <GuestRow- guest={primary()}- visibleColumnIds={ids}- workloadTableLayoutMode={layout}- isExpanded={expanded()}- onClick={() => setExpanded((prior) => !prior)}- />- </tbody>- </table>- </div>- <Show when={expanded()}>- <section aria-label="Guest details">- <GuestDrawer guest={primary()} onClose={() => setExpanded(false)} />- </section>- </Show>- </Show>- <section aria-label="Node details">- <NodeDrawer node={node()} />- </section>- </main>- );-}-const WithDarkMode = (props: { children: any }) => (- <DarkModeContext.Provider value={() => document.documentElement.classList.contains('dark')}>- {props.children}- </DarkModeContext.Provider>-);-render(- () => (- <Router>- <Route- path="/docs/*docPath"- component={() => (- <WithDarkMode>- <main class="min-h-screen bg-surface p-3 text-base-content">- <Docs />- </main>- </WithDarkMode>- )}- />- <Route- path="*"- component={() => (- <WithDarkMode>- <Fixture />- </WithDarkMode>- )}- />- </Router>- ),- document.getElementById('root')!,-);diff --git a/frontend-modern/browser-tests/drawer-temperature-producer.go b/frontend-modern/browser-tests/drawer-temperature-producer.godeleted file mode 100644index e1b01c62e2..0000000000--- a/frontend-modern/browser-tests/drawer-temperature-producer.go+++ /dev/null@@ -1,37 +0,0 @@-// Read-only synthetic primary-CPU producer for the containing browser fixture.-// Run from the public module root. No monitor, database, API call or guest operation.-package main--import (- "encoding/json"- "fmt"- "time"-- "github.com/rcourtman/pulse-go-rewrite/internal/models"- "github.com/rcourtman/pulse-go-rewrite/internal/unifiedresources"-)--func main() {- temperature := &models.Temperature{Available: true, HasCPU: true, CPUPackage: 55,- Cores: []models.CoreTemp{{Core: 0, Temp: 50}}, HasGPU: true,- GPU: []models.GPUTemp{{Device: "fixture-gpu", Edge: 95}},- NVMe: []models.NVMeTemp{{Device: "fixture-nvme", Temp: 91}}, LastUpdate: time.Now().UTC()}- node := models.Node{ID: "fixture-pve1", Name: "pve1", Instance: "fixture", Type: "node", Status: "online", LastSeen: time.Now().UTC(), Temperature: temperature}- adapter := unifiedresources.NewMonitorAdapter(nil)- adapter.PopulateFromSnapshot(models.StateSnapshot{Nodes: []models.Node{node}})- resource, _, ok := adapter.GetByReference(node.ID)- if !ok || resource.Temperature == nil || *resource.Temperature != 55 {- panic("primary CPU projection did not preserve the supplied node")- }- proxmox, err := json.Marshal(resource.Proxmox)- if err != nil {- panic(err)- }- input := models.ResourceConvertInput{ID: resource.ID, Type: string(resource.Type), Name: resource.Name, Status: string(resource.Status), Temperature: resource.Temperature, Proxmox: proxmox, LastSeenUnix: resource.LastSeen.UnixMilli()}- frontend := models.ConvertResourceToFrontend(input)- b, err := json.Marshal(frontend)- if err != nil {- panic(err)- }- fmt.Printf("DRAWER_TEMPERATURE_PRODUCER_JSON %s\n", b)-}diff --git a/frontend-modern/browser-tests/faq-alert-off-help.cjs b/frontend-modern/browser-tests/faq-alert-off-help.cjsdeleted file mode 100644index f68f5758f6..0000000000--- a/frontend-modern/browser-tests/faq-alert-off-help.cjs+++ /dev/null@@ -1,94 +0,0 @@-// Exact own-parent comparison using the production Docs page/router/Markdown/CSS.-// No settings mutation, alert generation, queue replay or backend request.-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');--(async () => {- const root = path.resolve('frontend-modern');- const artifacts = path.join(root, 'node_modules/faq-alert-off-browser');- const parent = fs.readFileSync(path.join(artifacts, 'parent.md'), 'utf8');- const final = fs.readFileSync(path.join(root, 'public/docs/FAQ.md'), 'utf8');- const hash = (value) => createHash('sha256').update(value).digest('hex');- 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(artifacts, 'vite-cache'),- server: { host: '127.0.0.1', port: 5259, strictPort: true },- optimizeDeps: { noDiscovery: true, include: [] } });- const results = [];- let browser;- try {- await server.listen();- for (const [engine, width, tone] of [['chromium', 1280, 'light'], ['webkit', 390, 'dark']]) {- browser = await { chromium, webkit }[engine].launch(engine === 'chromium'- ? { headless: true, channel: 'chromium', args: ['--no-sandbox'] } : { headless: true });- const context = await browser.newContext({ viewport: { width, height: 1000 },- ...(engine === 'webkit' ? { isMobile: true, hasTouch: true } : {}) });- const captures = [];- for (const [label, content] of [['parent', parent], ['final', final]]) {- const page = await context.newPage();- const errors = [], backendRequests = [];- page.on('pageerror', (error) => errors.push(error.message));- page.on('request', (request) => { if (new URL(request.url()).pathname.startsWith('/api/')) backendRequests.push(request.url()); });- await page.route('**/docs/FAQ.md', (route) => route.fulfill({ status: 200,- contentType: 'text/markdown; charset=utf-8', body: content }));- await page.goto('http://127.0.0.1:5259/browser-tests/docs-fragment-navigation.html',- { waitUntil: 'domcontentloaded', timeout: 30_000 });- if (tone === 'dark') await page.evaluate(() => document.documentElement.classList.add('dark'));- await page.getByRole('link', { name: '← All documentation' }).click();- await page.locator('a[data-doc-link][href="/docs/FAQ"]').first().focus();- await page.keyboard.press('Enter');- const heading = page.getByRole('heading', { name: 'Can I disable alerts for specific metrics?', exact: true });- await heading.waitFor();- const text = (await page.locator('article').innerText()).replace(/\s+/g, ' ');- if (label === 'parent') {- assert.ok(text.includes('toggle next to any metric'));- assert.ok(!text.includes('Patrol findings are separate from threshold alerts'));- } else {- for (const phrase of ['not every default has a per-resource control',- 'explicit threshold can remain active', 'Already queued notifications',- 'Patrol findings are separate from threshold alerts',- 'does not hide its readings, stop collection', 'Do not induce an alert']) assert.ok(text.includes(phrase), phrase);- }- await heading.evaluate((element) => { element.scrollIntoView({ block: 'start' }); window.scrollBy(0, -20); });- assert.ok(await page.evaluate(() => document.documentElement.scrollWidth <= innerWidth + 1));- const capture = `${engine}-${label}.jpg`;- await page.screenshot({ path: path.join(artifacts, capture), type: 'jpeg', quality: 70 });- captures.push(capture);- if (label === 'final') {- for (const [name, target, title] of [- ['how Patrol works', '/docs/AI#how-patrol-works', 'How Patrol Works'],- ['ordinary notification checks', '/docs/TROUBLESHOOTING#test-succeeds-but-real-alerts-are-missing', 'Test succeeds but real alerts are missing'],- ]) {- await page.getByRole('link', { name, exact: true }).focus();- await page.keyboard.press('Enter');- await page.getByRole('heading', { name: title, exact: true }).waitFor();- assert.ok(page.url().endsWith(target));- await page.goBack();- await heading.waitFor();- }- }- assert.deepEqual(errors, []);- assert.deepEqual(backendRequests, []);- await page.close();- }- results.push({ engine, version: browser.version(), width, tone, captures,- parentGapReproduced: true, finalGuidanceRendered: true, keyboardLinks: 2,- noPageOverflow: true, backendRequests: [], errors: [] });- await context.close();- await browser.close();- browser = undefined;- }- const result = { result: 'passed', playwright: require('playwright/package.json').version,- parentSha256: hash(parent), finalSha256: hash(final), results,- scope: 'help rendering/navigation, not installed alert or Patrol suppression' };- fs.writeFileSync(path.join(artifacts, 'result.json'), JSON.stringify(result, null, 2) + '\n');- console.log(JSON.stringify(result));- } finally {- if (browser) await browser.close();- await server.close();- }-})().catch((error) => { console.error(error); process.exitCode = 1; });diff --git a/frontend-modern/browser-tests/faq-deployment-help.cjs b/frontend-modern/browser-tests/faq-deployment-help.cjsdeleted file mode 100644index 2988c40108..0000000000--- a/frontend-modern/browser-tests/faq-deployment-help.cjs+++ /dev/null@@ -1,106 +0,0 @@-// Verify shipped FAQ answers and their recovery links in the real Docs page.-// parent.md is the exact own-parent FAQ supplied locally before this run.-// No settings write, service/container change or external request is exercised.-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');--(async () => {- const root = path.resolve('frontend-modern');- const artifacts = path.join(root, 'node_modules/faq-deployment-browser');- const parent = fs.readFileSync(path.join(artifacts, 'parent.md'), 'utf8');- const final = fs.readFileSync(path.join(root, 'public/docs/FAQ.md'), 'utf8');- const digest = (text) => createHash('sha256').update(text).digest('hex');- 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(artifacts, 'vite-cache'),- server: { host: '127.0.0.1', port: 5259, strictPort: true },- optimizeDeps: { noDiscovery: true, include: [] },- });- const results = [];- let browser;- try {- await server.listen();- for (const [engine, width, tone] of [['chromium', 1280, 'light'], ['webkit', 390, 'dark']]) {- browser = await { chromium, webkit }[engine].launch(engine === 'chromium'- ? { headless: true, channel: 'chromium', args: ['--no-sandbox'] }- : { headless: true });- const context = await browser.newContext({ viewport: { width, height: 1000 },- ...(engine === 'webkit' ? { isMobile: true, hasTouch: true } : {}) });- const captures = [];- for (const [label, content] of [['parent', parent], ['final', final]]) {- const page = await context.newPage();- const errors = [];- page.on('pageerror', (error) => errors.push(error.message));- await page.route('**/docs/FAQ.md', (route) => route.fulfill({- status: 200, contentType: 'text/markdown; charset=utf-8', body: content,- }));- await page.goto('http://127.0.0.1:5259/browser-tests/docs-fragment-navigation.html',- { waitUntil: 'domcontentloaded', timeout: 30_000 });- if (tone === 'dark') await page.evaluate(() => document.documentElement.classList.add('dark'));- await page.getByRole('link', { name: '← All documentation' }).click();- const entry = page.locator('a[data-doc-link][href="/docs/FAQ"]').first();- await entry.focus();- await page.keyboard.press('Enter');- const port = page.getByRole('heading', { name: 'How do I change the port?', exact: true });- await port.waitFor();- const text = await page.locator('article').innerText();- if (label === 'parent') {- assert.ok(text.includes('Use -p 8080:7655 in your run command.'));- assert.ok(text.includes('Remove the env var to regain UI control.'));- assert.ok(!text.includes('docker restart does not apply a new port mapping'));- } else {- for (const phrase of ['docker restart does not apply a new port mapping',- 'preserving the same image, data mount and other settings',- 'inside the Pulse container, not on the Proxmox host',- 'does not necessarily erase the saved value', 'check both the warning and effective value'])- assert.ok(text.replace(/\s+/g, ' ').includes(phrase), phrase);- assert.ok(!text.includes('Remove the env var to regain UI control.'));- }- for (const [part, heading] of [['ports', port], ['overrides', page.getByRole('heading', {- name: "Why can't I change settings in the UI?", exact: true,- })]]) {- await heading.scrollIntoViewIfNeeded();- assert.ok(await page.evaluate(() => document.documentElement.scrollWidth <= innerWidth + 1));- const capture = `${engine}-${label}-${part}.jpg`;- await page.screenshot({ path: path.join(artifacts, capture), type: 'jpeg', quality: 65 });- captures.push(capture);- }- if (label === 'final') {- for (const [name, target, heading] of [- ['deployment-specific port checks', '/docs/TROUBLESHOOTING#port-change-didnt-take-effect', "Port change didn't take effect"],- ['environment precedence', '/docs/CONFIGURATION#common-overrides-environment-variables', 'Common Overrides (Environment Variables)'],- ['CORS checks', '/docs/TROUBLESHOOTING#cors-errors', 'CORS errors'],- ]) {- const link = page.getByRole('link', { name, exact: true });- await link.focus();- await page.keyboard.press('Enter');- await page.getByRole('heading', { name: heading, exact: true }).waitFor();- assert.ok(page.url().endsWith(target));- await page.goBack();- await page.getByRole('heading', { name: 'How do I change the port?', exact: true }).waitFor();- }- }- assert.deepEqual(errors, []);- await page.close();- }- results.push({ engine, version: browser.version(), width, tone, captures,- parentGapReproduced: true, finalGuidanceRendered: true, keyboardLinks: 3, noBodyOverflow: true });- await context.close();- await browser.close();- browser = undefined;- }- const result = { result: 'passed', playwrightVersion: require('playwright/package.json').version,- parentSha256: digest(parent), finalSha256: digest(final), results,- scope: 'FAQ rendering and recovery links, not installed port/override acceptance' };- fs.writeFileSync(path.join(artifacts, 'result.json'), JSON.stringify(result, null, 2) + '\n');- console.log(JSON.stringify(result));- } finally {- if (browser) await browser.close();- await server.close();- }-})().catch((error) => { console.error(error); process.exitCode = 1; });diff --git a/frontend-modern/browser-tests/guest-stopped-disk.cjs b/frontend-modern/browser-tests/guest-stopped-disk.cjsdeleted file mode 100644index 7112a91cb1..0000000000--- a/frontend-modern/browser-tests/guest-stopped-disk.cjs+++ /dev/null@@ -1,171 +0,0 @@-const assert = require('node:assert/strict');-const fs = require('node:fs');-const path = require('node:path');-const crypto = require('node:crypto');-const { chromium, webkit } = require('playwright');--const root = '/workspace/frontend-modern';-const output = '/workspace/tmp/guest-stopped-disk/browser';-const origin = 'http://127.0.0.1:5338';-const hash = (file) => crypto.createHash('sha256').update(fs.readFileSync(file)).digest('hex');-const source = [- 'frontend-modern/src/utils/workloadGuestPresentation.ts',- 'frontend-modern/browser-tests/guest-disk-provenance.tsx',- 'frontend-modern/browser-tests/guest-stopped-disk.cjs',-];-const settle = (page) => page.evaluate(async () => {- await document.fonts.ready;- await new Promise((resolve) => requestAnimationFrame(() => requestAnimationFrame(resolve)));-});--(async () => {- fs.mkdirSync(output, { recursive: true });- const result = {- result: 'incomplete',- playwright: require('playwright/package.json').version,- source_sha256: Object.fromEntries(source.map((file) => [file, hash('/workspace/' + file)])),- cases: [], screenshots: [], cleanup: { browser: false, server: false },- limits: 'Production row, full drawer, History and CSS with synthetic local observations/API. No guest command, native QGA/thaw/writes, installed restart, physical-phone or release acceptance.',- };- assert.equal(result.playwright, JSON.parse(fs.readFileSync('/workspace/tests/integration/package-lock.json')).packages['node_modules/@playwright/test'].version);- 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: output + '/cache', server: { host: '127.0.0.1', port: 5338, strictPort: true } });- let browser;- try {- await server.listen();- for (const [name, engine, width, dark] of [- ['desktop-light', chromium, 1280, false], ['phone-dark', webkit, 390, true],- ]) {- browser = await engine.launch(engine === chromium ? { headless: true, channel: 'chromium', args: ['--no-sandbox'] } : { headless: true });- const context = await browser.newContext({ viewport: { width, height: width < 768 ? 844 : 900 }, isMobile: width < 768, hasTouch: width < 768, locale: 'en-GB', timezoneId: 'UTC' });- const page = await context.newPage();- page.setDefaultTimeout(12000);- page.setDefaultNavigationTimeout(60000);- const record = { name, browser: browser.version(), width, dark, errors: [], requests: [], checks: [] };- let historyMode = 'stored';- result.cases.push(record);- page.on('pageerror', (error) => record.errors.push(error.message));- await page.route('**/*', (route) => {- const request = route.request(); const url = new URL(request.url());- if (url.origin !== origin) { record.requests.push({ path: url.pathname, method: request.method(), blocked: true }); return route.abort(); }- if (!url.pathname.startsWith('/api/')) return route.continue();- record.requests.push({ path: url.pathname, method: request.method() });- if (url.pathname === '/api/metrics-store/history') {- const end = Date.now(), start = end - 3600_000;- const point = (timestamp, value) => ({ timestamp, value, min: value, max: value });- return route.fulfill({ json: { resourceType: 'vm', resourceId: url.searchParams.get('resourceId'), range: url.searchParams.get('range'), start, end, metrics: historyMode === 'stored' ? { disk: [point(start, 25), point(end, 50)] } : {}, source: 'store' } });- }- return route.fulfill({ json: url.pathname === '/api/license/runtime-capabilities'- ? { capabilities: [], limits: [], max_history_days: 7, hosted_mode: false, runtime: { build: 'community' }, blocked_capabilities: [] }- : { success: true, data: [], alerts: [], anomalies: [], config: null } });- });- await page.addInitScript((isDark) => {- document.addEventListener('DOMContentLoaded', () => { if (isDark) document.documentElement.classList.add('dark'); });- window.__trustedInput = [];- document.addEventListener('click', (event) => window.__trustedInput.push(event.isTrusted), true);- }, dark);- // Charts poll every 30 seconds; the proof drives that poll with the clock.- await page.clock.install();- await page.goto(origin + '/browser-tests/guest-disk-provenance.html');- await page.waitForFunction(() => window.__guestDiskProvenance);- const apply = async (value) => { await page.evaluate((next) => window.__guestDiskProvenance.apply(next), value); await settle(page); };- const row = page.locator('[data-guest-id="fixture-pve:pve-a:101"]');- const control = page.locator('[data-guest-id="fixture-pve:pve-a:102"]');- const cell = row.locator('[data-workload-col="disk"]');- const click = (target) => width < 768 ? target.tap() : target.click();- await apply({ reason: '', lock: '', status: 'stopped', data: true, usage: 90 });- for (const mode of ['bars', 'sparklines']) {- await page.evaluate((value) => window.__guestDiskProvenance.mode(value), mode); await settle(page);- assert.equal(await cell.locator('[data-workload-disk-read-status] [aria-hidden="true"]').count(), 0);- assert.equal(await cell.getAttribute('title'), 'Guest filesystem stats unavailable while the VM is stopped.');- assert.equal(await cell.getByRole('progressbar').count(), 0);- for (const label of await cell.getByRole('img').evaluateAll((items) => items.map((item) => item.getAttribute('aria-label')))) assert.doesNotMatch(label, /current 90%/);- assert.equal(await control.locator('[data-workload-disk-read-status]').count(), 0);- }- record.checks.push('Both row modes withdraw stopped-VM current usage; the independent running control is unchanged.');- const disclosure = row.locator('[data-row-action]');- if (width < 768) await click(cell);- else { await disclosure.focus(); await page.keyboard.press('Enter'); }- const drawer = page.getByRole('region', { name: 'Guest details' });- await drawer.waitFor({ state: 'visible' });- // Filesystems have their own Overview section; an unavailable one may be- // lifted into Worth checking, so read the whole Overview.- const technical = drawer.getByTestId('guest-drawer-overview');- const filesystem = technical.getByText('/data', { exact: true }).locator('xpath=ancestor::tr');- const capture = async (state, target) => {- await target.scrollIntoViewIfNeeded(); await settle(page);- const file = `${name}-${state}.png`; await target.screenshot({ path: output + '/' + file });- result.screenshots.push({ file, sha256: hash(output + '/' + file), name, state });- };- assert.match(await filesystem.innerText(), /Usage unavailable/);- assert.doesNotMatch(await filesystem.innerText(), /90%|9\.00 GB/);- assert.equal(await filesystem.getByRole('progressbar').count(), 0);- assert.equal(await technical.getByRole('link', { name: 'Filesystem reading guidance' }).getAttribute('href'), '/docs/VM_DISK_MONITORING#a-missing-reading-is-not-an-installation-diagnosis');- await capture('stopped-filesystems', technical);- // A linked agent's cached numbers cannot override the known VM power state.- await apply({ disksFromAgent: true });- assert.match(await filesystem.innerText(), /Usage unavailable/);- record.checks.push('Platform and linked-agent carriers obey the same stopped-VM rule in filesystem detail.');- // History charts sit on Overview beside the filesystem detail.- const chart = drawer.locator('[data-history-group="utilization"]');- await page.waitForFunction(() => document.querySelector('[data-history-group="utilization"] path[data-history-series]'));- const stored = await chart.locator('path[data-history-series]').evaluateAll((items) => items.map((item) => item.getAttribute('d')));- assert.ok(stored.length > 0);- assert.equal(await chart.locator('[data-history-current="disk"]').count(), 0);- assert.equal(await chart.locator('[data-history-last-known="disk"]').count(), 0);- assert.match(await chart.locator('[data-history-deferred="disk"]').innerText(), /VM is stopped/);- await capture('stopped-history', chart);- await apply({ status: 'running', reason: 'prev-agent-busy', disksFromAgent: false });- assert.match(await chart.locator('[data-history-deferred="disk"]').innerText(), /earlier guest request/);- assert.equal(await chart.locator('[data-history-last-known="disk"]').count(), 0);- assert.equal(await chart.locator('[data-history-current="disk"]').count(), 0);- assert.deepEqual(await chart.locator('path[data-history-series]').evaluateAll((items) => items.map((item) => item.getAttribute('d'))), stored);- record.checks.push('Stored historical values/paths stay separate from retained live numbers throughout stop and restart.');- // A separate synthetic empty-store response exercises the live fallback- // legend, not data removal or a guest probe.- historyMode = 'empty';- const read = page.waitForResponse((r) => r.url().includes('/api/metrics-store/history'));- await page.clock.runFor(30_000);- await read;- await chart.getByText('No stored history in this range', { exact: true }).waitFor();- assert.match(await chart.locator('[data-history-last-known="disk"]').innerText(), /90.0%.*last known/s);- await apply({ status: 'stopped', reason: '' });- assert.equal(await chart.locator('[data-history-current="disk"]').count(), 0);- assert.equal(await chart.locator('[data-history-last-known="disk"]').count(), 0);- assert.match(await chart.locator('[data-history-deferred="disk"]').innerText(), /VM is stopped/);- await apply({ status: 'running', reason: 'prev-agent-busy' });- assert.match(await chart.locator('[data-history-last-known="disk"]').innerText(), /90.0%.*last known/s);- await capture('restart-retained', chart);- await apply({ reason: '', usage: 0 });- assert.match(await chart.locator('[data-history-current="disk"]').innerText(), /0.0%.*current/s);- assert.equal(await chart.locator('[data-history-deferred="disk"]').count(), 0);- assert.equal(await chart.locator('path[data-history-series]').count(), 0);- record.checks.push('Empty-store History never fabricates points: restart deferral is last known and fresh measured zero returns as current.');- assert.equal(await filesystem.getByRole('progressbar').getAttribute('aria-valuenow'), '0');- await apply({ kind: 'lxc', status: 'stopped', reason: '', usage: 30 });- assert.equal(await filesystem.getByRole('progressbar').getAttribute('aria-valuenow'), '30');- await capture('stopped-lxc-control', technical);- record.checks.push('Stopped LXC platform storage keeps its independent reading.');- const geometry = await technical.evaluate((el) => ({ width: el.clientWidth, scroll: el.scrollWidth, documentWidth: document.documentElement.clientWidth, documentScroll: document.documentElement.scrollWidth }));- assert.ok(geometry.scroll <= geometry.width + 1, JSON.stringify(geometry));- assert.ok(geometry.documentScroll <= geometry.documentWidth + 1, JSON.stringify(geometry));- record.geometry = geometry;- await click(drawer.getByRole('button', { name: 'Collapse backup-guest details' }));- assert.equal(await drawer.count(), 0);- assert.ok((await page.evaluate(() => window.__trustedInput)).some(Boolean));- assert.deepEqual(record.errors, []);- // Opening details records one content-free usage milestone; nothing else may write.- assert.ok(record.requests.every((item) => (['GET', 'HEAD'].includes(item.method) || (item.method === 'POST' && item.path === '/api/usage/workload-history')) && !item.blocked), JSON.stringify(record.requests));- record.checks.push('Trusted keyboard/touch disclosure and close; no overflow, page error, off-origin or mutating request.');- await context.close(); await browser.close(); browser = null;- }- result.result = 'passed';- } catch (error) {- result.error = String(error.stack || error); throw error;- } finally {- if (browser) await browser.close(); result.cleanup.browser = true;- await server.close(); result.cleanup.server = true;- fs.writeFileSync(output + '/result.json', JSON.stringify(result, null, 2) + '\n');- }-})().catch((error) => { console.error(error); process.exitCode = 1; });diff --git a/frontend-modern/browser-tests/held-operator-time.cjs b/frontend-modern/browser-tests/held-operator-time.cjsdeleted file mode 100644index 8c60e0cc97..0000000000--- a/frontend-modern/browser-tests/held-operator-time.cjs+++ /dev/null@@ -1,517 +0,0 @@-const assert = require('node:assert/strict');-const fs = require('node:fs');-const crypto = require('node:crypto');-const { chromium, webkit } = require('playwright');--const root = '/workspace/frontend-modern';-const start = Date.parse('2026-10-11T04:00:00Z');-const iso = (offset) => new Date(start + offset).toISOString();-const origin = 'http://127.0.0.1:5343';-const version = {- version: '6.5.0',- isDevelopment: false,- isDocker: false,- isSourceBuild: false,- deploymentType: 'systemd',-};-const update = {- available: false,- currentVersion: '6.5.0',- latestVersion: '6.5.0',- releaseNotes: '',- downloadUrl: '',- isPrerelease: false,- isMajorUpgrade: false,-};-const operatorState = (surface) => ({- canonicalId: surface,- intentionallyOffline: true,- monitoringMode: 'expected_offline',- lifecycleState: 'retired',- neverAutoRemediate: true,- note: 'Keep the saved lock',- setAt: iso(-60_000),- setBy: 'fixture-admin',- ...(surface === 'once'- ? { maintenanceStartAt: iso(30_000), maintenanceEndAt: iso(60_000) }- : {- maintenanceWindowActive: surface === 'server',- ...(surface === 'server' ? { maintenanceActiveEndAt: iso(30_000) } : {}),- maintenanceScope: 'resource_and_descendants',- maintenanceRecurrence: {- timezone: 'UTC',- weekdays: ['sunday'],- startMinute: 240,- endMinute: 241,- },- }),-});--async function run(options = {}) {- const output = options.output ?? root + '/tmp/held-operator-time/browser-complete';- const surfaces = options.surfaces ?? ['once', 'server', 'recurring', 'updates', 'guest'];- const binding = JSON.parse(fs.readFileSync(root + '/tmp/held-operator-time/source-binding.json'));- fs.mkdirSync(output, { recursive: true });- for (const [path, expected] of Object.entries(binding.content_sha256)) {- assert.equal(- crypto- .createHash('sha256')- .update(fs.readFileSync('/workspace/' + path))- .digest('hex'),- expected,- path,- );- }- const client = require('playwright/package.json').version;- assert.equal(- client,- JSON.parse(fs.readFileSync('/workspace/tests/integration/package-lock.json')).packages[- 'node_modules/@playwright/test'- ].version,- );- const result = {- playwright: client,- source: binding,- cases: [],- captures: [],- completed: false,- serverClosed: false,- browsersClosed: false,- phase: 'start',- };- const { createServer } = await import(root + '/node_modules/vite/dist/node/index.js');- const server = await createServer({- root,- configFile: root + '/vite.config.ts',- cacheDir: output + '/vite-cache',- server: { host: '127.0.0.1', port: 5343, strictPort: true, watch: null },- });- let browser, context;- try {- await server.listen();- for (const [name, engine, width, dark] of [- ['desktop', chromium, 1280, false],- ['phone', webkit, 390, true],- ]) {- browser = await engine.launch(- engine === chromium- ? { headless: true, channel: 'chromium', args: ['--no-sandbox'] }- : { headless: true },- );- for (const surface of surfaces) {- if (options.skip?.includes(name + ':' + surface)) continue;- const record = {- engine: name,- browserVersion: browser.version(),- viewport: { width, height: 950 },- dark,- surface,- checks: [],- requests: [],- writes: [],- unexpected: [],- errors: [],- offOrigin: [],- completed: false,- contextClosed: false,- };- result.cases.push(record);- result.phase = name + ' ' + surface + ' mount';- context = await browser.newContext({- viewport: record.viewport,- locale: 'en-GB',- timezoneId: 'UTC',- isMobile: width < 500,- hasTouch: width < 500,- });- const page = await context.newPage();- page.setDefaultTimeout(8000);- page.setDefaultNavigationTimeout(35000);- await page.clock.install({ time: new Date(start - 1000) });- await page.clock.pauseAt(new Date(start));- await page.addInitScript((dark) => {- localStorage.clear();- sessionStorage.clear();- document.addEventListener(- 'DOMContentLoaded',- () => document.documentElement.classList.toggle('dark', dark),- { once: true },- );- }, dark);- page.on('pageerror', (err) => record.errors.push(err.message));- await page.route('**/*', async (route) => {- const req = route.request(),- url = new URL(req.url());- if (url.origin !== origin) {- record.offOrigin.push(url.origin);- return route.abort();- }- if (!url.pathname.startsWith('/api/')) return route.continue();- record.requests.push({ path: url.pathname, method: req.method() });- if (req.method() !== 'GET') {- record.writes.push(url.pathname);- return route.fulfill({- status: 403,- json: { error: 'Synthetic fixture refuses mutations' },- });- }- let data;- if (/^\/api\/resources\/[^/]+\/operator-state$/.test(url.pathname)) {- data = url.pathname.includes('/absent/')- ? { configured: false }- : { configured: true, state: operatorState(surface) };- } else if (url.pathname === '/api/version') data = version;- else if (url.pathname === '/api/updates/check') data = update;- else if (url.pathname === '/api/updates/history') data = [];- else if (url.pathname === '/api/settings/alerts')- data = { enabled: true, backupDefaults: { freshHours: 24, staleHours: 72 } };- else if (url.pathname === '/api/security/status')- data = { hasAuthentication: true, requiresAuth: false, sessionCapabilities: {} };- else if (url.pathname === '/api/health') data = { status: 'ok' };- else {- record.unexpected.push(url.pathname);- return route.fulfill({ status: 404, json: { error: 'Unspecified synthetic read' } });- }- return route.fulfill({ json: data });- });- const check = async (label, action) => {- result.phase = name + ' ' + surface + ' ' + label;- await action();- record.checks.push(label);- };- const capture = async (label) => {- const file = output + '/' + name + '-' + surface + '-' + label + '.png';- await page.screenshot({ path: file, fullPage: true, animations: 'disabled' });- result.captures.push(file.replace('/workspace/', ''));- };- await page.goto(origin + '/browser-tests/held-operator-time.html?surface=' + surface);- await page.waitForFunction(() => window.__heldOperator?.ready());- if (surface === 'once') {- await page.getByText('Maintenance window scheduled.', { exact: true }).waitFor();- await page.getByLabel('Operator note', { exact: true }).fill('Unsaved policy note');- await page.getByRole('button', { name: 'Edit window', exact: true }).click();- await page- .getByLabel('Reason (optional)', { exact: true })- .fill('Unsaved schedule reason');- await capture('scheduled-edits');- await page.clock.fastForward(30_000);- await check('held one-off becomes active at its inclusive start', async () => {- await page.getByText('Maintenance window active.', { exact: true }).waitFor();- assert.equal(- await page.getByText('Maintenance window scheduled.', { exact: true }).count(),- 0,- );- });- await page.clock.fastForward(30_000);- await check(- 'one-off expires at its exclusive end without losing unsaved edits or releasing saved restrictions',- async () => {- assert.equal(- await page.getByText('Maintenance window active.', { exact: true }).count(),- 0,- );- assert.equal(- await page.getByText('Maintenance window scheduled.', { exact: true }).count(),- 0,- );- assert.equal(- await page.getByLabel('Operator note', { exact: true }).inputValue(),- 'Unsaved policy note',- );- assert.equal(- await page.getByLabel('Reason (optional)', { exact: true }).inputValue(),- 'Unsaved schedule reason',- );- assert.equal(- await page- .getByLabel('Never auto-remediate this resource', { exact: true })- .getAttribute('aria-pressed'),- 'true',- );- assert.equal(- await page.getByLabel('Monitoring', { exact: true }).inputValue(),- 'expected_offline',- );- assert.equal(- await page.getByLabel('Lifecycle', { exact: true }).inputValue(),- 'retired',- );- assert.equal(- record.requests.filter((r) => r.path.includes('/operator-state')).length,- 1,- );- await page.getByRole('button', { name: 'Save overrides', exact: true }).waitFor();- },- );- await capture('expired-edits');- await page.evaluate(() => window.__heldOperator.withdrawWindow());- await check('source removal stays removed across the next clock tick', async () => {- await page.waitForFunction(() => document.querySelector('textarea')?.value === '');- await page.clock.fastForward(30_000);- assert.equal(- await page.getByText('Maintenance window active.', { exact: true }).count(),- 0,- );- assert.equal(- await page.getByText('Maintenance window scheduled.', { exact: true }).count(),- 0,- );- assert.equal(- record.requests.filter((r) => r.path.includes('/operator-state')).length,- 2,- );- });- } else if (surface === 'server') {- await page.getByText('Maintenance window active.', { exact: true }).waitFor();- await page.clock.fastForward(60_000);- await check(- 'expired server verdict is last reported, preserving scope without inferring recurrence or resumption',- async () => {- assert.match(- await page- .getByText('Last reported maintenance window.', { exact: true })- .locator('..')- .innerText(),- /and its descendants/,- );- assert.equal(- await page.getByText('Recurring maintenance configured.', { exact: true }).count(),- 0,- );- await page- .getByText(- 'The reported end has passed. Current maintenance status has not been refreshed.',- { exact: true },- )- .waitFor();- assert.equal(- await page.getByText('Maintenance window active.', { exact: true }).count(),- 0,- );- assert.equal(- record.requests.filter((r) => r.path.includes('/operator-state')).length,- 1,- );- },- );- await capture('server-verdict');- } else if (surface === 'recurring') {- await page.getByText('Recurring maintenance configured.', { exact: true }).waitFor();- await page.clock.fastForward(60_000);- await check(- 'inactive recurring rule remains configured rather than becoming a locally invented active verdict',- async () => {- await page.getByText('Recurring maintenance configured.', { exact: true }).waitFor();- assert.equal(- await page.getByText('Maintenance window active.', { exact: true }).count(),- 0,- );- assert.equal(- record.requests.filter((r) => r.path.includes('/operator-state')).length,- 1,- );- },- );- await capture('configured');- } else if (surface === 'updates') {- await page.getByText('Checked 0s ago', { exact: true }).waitFor();- await page.clock.fastForward(60_000);- await check(- 'held successful check ages without a new request, verdict or operation',- async () => {- await page.getByText('Checked 1 min ago', { exact: true }).waitFor();- await page.getByText('Up to date', { exact: true }).waitFor();- assert.equal(- record.requests.filter((r) => r.path === '/api/updates/check').length,- 1,- );- assert.deepEqual(await page.evaluate(() => window.__heldOperator.controls()), {- checks: 0,- installs: 0,- dirty: false,- channel: 'stable',- auto: false,- });- },- );- await page.getByRole('button', { name: /^Preview/ }).click();- await page.clock.fastForward(60_000);- await check(- 'preview auto-update lock and unsaved preference selection survive the clock',- async () => {- await page.getByText('Checked 2 mins ago', { exact: true }).waitFor();- assert.equal(await page.getByTestId('updates-auto-check-toggle').isDisabled(), true);- assert.deepEqual(await page.evaluate(() => window.__heldOperator.controls()), {- checks: 0,- installs: 0,- dirty: true,- channel: 'rc',- auto: false,- });- },- );- await capture('aged-preview-lock');- await page.evaluate(() => window.__heldOperator.sourceBuild());- await page.clock.fastForward(30_000);- await check(- 'source build withdraws release check age and keeps check unavailable',- async () => {- await page.getByText('Release updates disabled', { exact: true }).waitFor();- assert.equal(await page.getByText(/Checked .*ago/).count(), 0);- assert.equal(- await page.getByRole('button', { name: 'Check Now', exact: true }).isDisabled(),- true,- );- },- );- } else if (surface === 'guest') {- await page.getByText('CPU 91%, above the 80% alert level', { exact: true }).waitFor();- await check(- 'final drawer simultaneously renders held current alert and visible VM cache-source guidance',- async () => {- await page.getByText('About this reading', { exact: true }).waitFor();- const details = page.getByTestId('guest-technical-details');- assert.match(await details.innerText(), /Current · Proxmox \(may include cache\)/);- assert.match(await details.innerText(), /cached memory the VM can reuse/);- assert.match(await details.innerText(), /QEMU guest agent on a Linux VM/);- },- );- await capture('current-cache-source');- await page.clock.fastForward(30_000);- await check(- 'unchanged alert becomes a last reading while its source caveat stays visible',- async () => {- await page.getByText('Last reading: CPU 91%, 10 mins ago', { exact: true }).waitFor();- assert.equal(- await page.getByText('CPU 91%, above the 80% alert level', { exact: true }).count(),- 0,- );- await page.getByText('About this reading', { exact: true }).waitFor();- },- );- await page.clock.fastForward(60_000);- await page.getByText('Last reading: CPU 91%, 11 mins ago', { exact: true }).waitFor();- await capture('stale-alert-cache-source');- await check(- 'four cache-inclusive sources retain the visible note without refreshing the held alert',- async () => {- for (const source of [- 'status-mem',- 'status-freemem',- 'cluster-resources',- 'derived-total-minus-used',- ]) {- await page.evaluate((source) => window.__heldOperator.memory(source), source);- await page.getByText('About this reading', { exact: true }).waitFor();- await page- .getByText('Last reading: CPU 91%, 11 mins ago', { exact: true })- .waitFor();- }- },- );- await check(- 'cache-aware QEMU and Pulse agent sources remove the cache note without rewriting alert evidence',- async () => {- for (const source of ['guest-agent-meminfo', 'agent']) {- await page.evaluate((source) => window.__heldOperator.memory(source), source);- assert.equal(- await page.getByText('About this reading', { exact: true }).count(),- 0,- );- assert.match(- await page.getByTestId('guest-technical-details').innerText(),- /Current · (QEMU guest agent|Pulse Agent)/,- );- await page- .getByText('Last reading: CPU 91%, 11 mins ago', { exact: true })- .waitFor();- }- },- );- await check(- 'retained fallback stays last known and unavailable source withdraws caveat instead of inventing a number',- async () => {- await page.evaluate(() => window.__heldOperator.memory('status-mem', 'last-known'));- assert.match(- await page.getByTestId('guest-technical-details').innerText(),- /Last known · Proxmox \(may include cache\)/,- );- await page.getByText('About this reading', { exact: true }).waitFor();- await page.evaluate(() => window.__heldOperator.memory('status-mem', 'unavailable'));- assert.match(- await page.getByTestId('guest-technical-details').innerText(),- /Unavailable · Proxmox/,- );- assert.equal(await page.getByText('About this reading', { exact: true }).count(), 0);- },- );- await page.evaluate(() => window.__heldOperator.withdrawAlert());- await page.clock.fastForward(30_000);- await check('withdrawn alert stays withdrawn on the next tick', async () => {- assert.equal(await page.getByTestId('drawer-attention-section').count(), 0);- });- }- await check('no page error, unspecified API, off-origin traffic or mutation', async () => {- assert.deepEqual(record.errors, []);- assert.deepEqual(record.unexpected, []);- assert.deepEqual(record.offOrigin, []);- assert.deepEqual(record.writes, []);- assert.equal(- await page.evaluate(() => document.documentElement.scrollWidth > innerWidth),- false,- );- });- record.completed = true;- await context.close();- context = undefined;- record.contextClosed = true;- }- await browser.close();- browser = undefined;- }- result.completed = true;- } catch (err) {- result.error = { name: err.name, message: err.message };- process.exitCode = 1;- } finally {- result.cleanupErrors = [];- if (context) {- try {- await context.close();- result.failedCaseContextClosed = true;- } catch (err) {- result.cleanupErrors.push({ phase: 'context-close', message: err.message });- }- }- try {- if (browser) await browser.close();- result.browsersClosed = true;- } catch (err) {- result.cleanupErrors.push({ phase: 'browser-close', message: err.message });- }- try {- await server.close();- result.serverClosed = true;- } catch (err) {- result.cleanupErrors.push({ phase: 'server-close', message: err.message });- }- if (result.cleanupErrors.length) {- result.completed = false;- process.exitCode = 1;- }- fs.writeFileSync(output + '/result.json', JSON.stringify(result, null, 2) + '\n');- console.log(- JSON.stringify({- completed: result.completed,- phase: result.phase,- cases: result.cases.filter((r) => r.completed).length,- captures: result.captures.length,- error: result.error,- output,- }),- );- }-}--module.exports = run;-if (require.main === module) void run();diff --git a/frontend-modern/browser-tests/held-operator-time.html b/frontend-modern/browser-tests/held-operator-time.htmldeleted file mode 100644index 5383ed6b00..0000000000--- a/frontend-modern/browser-tests/held-operator-time.html+++ /dev/null@@ -1,12 +0,0 @@-<!doctype html>-<html lang="en">- <head>- <meta charset="UTF-8" />- <meta name="viewport" content="width=device-width, initial-scale=1.0" />- <title>Held operational evidence</title>- </head>- <body>- <div id="root"></div>- <script type="module" src="/browser-tests/held-operator-time.tsx"></script>- </body>-</html>diff --git a/frontend-modern/browser-tests/held-operator-time.tsx b/frontend-modern/browser-tests/held-operator-time.tsxdeleted file mode 100644index c45293fb28..0000000000--- a/frontend-modern/browser-tests/held-operator-time.tsx+++ /dev/null@@ -1,146 +0,0 @@-// Existing production controls/drawer/CSS with synthetic, local-only inputs.-// No maintenance, guest, update-apply or rollback action is executed.-import { createSignal, Show } from 'solid-js';-import { render } from 'solid-js/web';-import { Route, Router } from '@solidjs/router';-import { ResourceOperatorStateSection } from '../src/components/Infrastructure/ResourceOperatorStateSection';-import { UpdatesSettingsPanel } from '../src/components/Settings/UpdatesSettingsPanel';-import { GuestDrawer } from '../src/components/Workloads/GuestDrawer';-import { DarkModeContext } from '../src/contexts/appRuntime';-import { updateStore } from '../src/stores/updates';-import { METRIC_ALERT_STATUS_STALE_MS } from '../src/features/alerts/metricAlertPresentation';-import type { Alert } from '../src/types/api';-import type { WorkloadGuest } from '../src/types/workloads';-import '../src/index.css';--const start = Date.parse('2026-10-11T04:00:00Z');-const iso = (offset: number) => new Date(start + offset).toISOString();-const surface = new URLSearchParams(location.search).get('surface') ?? 'once';--const initialGuest: WorkloadGuest = {- id: 'fixture:pve-a:101',- name: 'Held evidence VM',- instance: 'fixture',- node: 'pve-a',- vmid: 101,- type: 'qemu',- status: 'running',- cpu: 0.1,- cpus: 2,- memory: {- total: 4 * 1024 ** 3,- used: 3 * 1024 ** 3,- free: 1024 ** 3,- usage: 75,- observation: { state: 'current', source: 'status-mem', observedAt: iso(-60_000) },- },- disk: { total: 10 * 1024 ** 3, used: 5 * 1024 ** 3, usage: 50 },- tags: [],- networkIn: 0,- networkOut: 0,- diskRead: 0,- diskWrite: 0,- uptime: 3600,- template: false,- lastBackup: 0,- lastSeen: iso(0),-};-const alert: Alert = {- id: 'held-cpu-alert',- resourceId: initialGuest.id,- resourceName: initialGuest.name,- type: 'cpu',- level: 'warning',- message: 'CPU above threshold',- value: 92,- threshold: 80,- startTime: iso(-60_000),- acknowledged: false,- node: 'pve-a',- metricStatus: {- phase: 'breaching',- value: 91,- unit: '%',- observedAt: iso(-METRIC_ALERT_STATUS_STALE_MS + 5_000),- trigger: 80,- recovery: 75,- },-};--function Fixture() {- const [resourceId, setResourceId] = createSignal(surface);- const [guest, setGuest] = createSignal(initialGuest);- const [alerts, setAlerts] = createSignal([alert]);- const [channel, setChannel] = createSignal<'stable' | 'rc'>('stable');- const [auto, setAuto] = createSignal(false);- const [dirty, setDirty] = createSignal(false);- const [sourceBuild, setSourceBuild] = createSignal(false);- let checks = 0,- installs = 0;- if (surface === 'updates') void updateStore.checkForUpdates(true);-- (window as any).__heldOperator = {- ready: () => surface !== 'updates' || updateStore.lastCheckedAt() !== null,- controls: () => ({ checks, installs, dirty: dirty(), channel: channel(), auto: auto() }),- sourceBuild: () => setSourceBuild(true),- withdrawWindow: () => setResourceId('absent'),- memory: (source: string, state = 'current') =>- setGuest((current) => ({- ...current,- memory: {- ...current.memory,- usageUnavailable: state === 'unavailable',- observation: { source, state, observedAt: iso(-60_000) },- },- })),- withdrawAlert: () => setAlerts([]),- guest: () => guest(),- };- return (- <main class="mx-auto min-h-screen max-w-5xl space-y-3 bg-surface p-3 text-base-content">- <h1 class="text-base font-semibold">Held operational evidence</h1>- <p class="text-xs text-muted">Synthetic local inputs. No operation is dispatched.</p>- <Show when={['once', 'server', 'recurring'].includes(surface)}>- <ResourceOperatorStateSection resourceId={resourceId()} />- </Show>- <Show when={surface === 'updates'}>- <UpdatesSettingsPanel- versionInfo={() =>- updateStore.versionInfo() && {- ...updateStore.versionInfo()!,- isSourceBuild: sourceBuild(),- }- }- updateInfo={updateStore.updateInfo}- checkingForUpdates={updateStore.isChecking}- updateChannel={channel}- setUpdateChannel={setChannel}- autoUpdateEnabled={auto}- setAutoUpdateEnabled={setAuto}- setHasUnsavedChanges={setDirty}- checkForUpdates={async () => {- checks++;- }}- updatePlan={() => null}- onInstallUpdate={() => {- installs++;- }}- isInstalling={() => false}- />- </Show>- <Show when={surface === 'guest'}>- <GuestDrawer guest={guest()} alerts={alerts()} onClose={() => {}} />- </Show>- </main>- );-}-render(- () => (- <DarkModeContext.Provider value={() => document.documentElement.classList.contains('dark')}>- <Router>- <Route path="/*" component={Fixture} />- </Router>- </DarkModeContext.Provider>- ),- document.getElementById('root')!,-);diff --git a/frontend-modern/browser-tests/history-inspection.cjs b/frontend-modern/browser-tests/history-inspection.cjsdeleted file mode 100644index d725fdd0ad..0000000000--- a/frontend-modern/browser-tests/history-inspection.cjs+++ /dev/null@@ -1,519 +0,0 @@-// Direct production History/query + CSS with synthetic API data. Not installed PBS acceptance.-const assert = require('node:assert/strict');-const fs = require('node:fs');-const path = require('node:path');-const { createHash } = require('node:crypto');-const { chromium, firefox, webkit } = require('playwright');--(async () => {- const root = process.env.PULSE_FRONTEND_ROOT || path.resolve(__dirname, '..');- process.chdir(root);- const engine =- process.argv.find((arg) => arg.startsWith('--engine='))?.split('=')[1] || 'chromium';- assert.ok(['chromium', 'firefox', 'webkit'].includes(engine));- const touch = process.argv.includes('--phone') || process.argv.includes('--touch');- const width =- Number(process.argv.find((arg) => arg.startsWith('--width='))?.split('=')[1]) ||- (process.argv.includes('--phone') ? 390 : 1365);- const artifacts = path.join(- root,- 'node_modules',- `history-inspection-${engine}-${width}${touch ? '-touch' : ''}`,- );- fs.mkdirSync(artifacts, { recursive: true });- 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: fs.mkdtempSync(path.join(artifacts, 'vite-cache-')),- server: { host: '127.0.0.1', port: 5223, strictPort: true },- });- let browser;- let diagnosticPage;- let diagnosticRequests;- const observations = [];- try {- await server.listen();- browser = await { chromium, firefox, webkit }[engine].launch(- engine === 'chromium'- ? { headless: true, channel: 'chromium', args: ['--no-sandbox'] }- : engine === 'firefox'- ? {- headless: true,- // Headless Firefox has no host pointer. Model the input device- // explicitly: coarse=1, fine=2, hover=4.- firefoxUserPrefs: {- 'ui.primaryPointerCapabilities': touch ? 1 : 6,- 'ui.allPointerCapabilities': touch ? 1 : 6,- },- }- : { headless: true },- );- for (const theme of ['light', 'dark']) {- const page = await browser.newPage({- viewport: { width, height: width === 390 ? 844 : 900 },- locale: 'en-GB',- timezoneId: 'UTC',- ...(touch ? { isMobile: engine !== 'firefox', hasTouch: true } : {}),- });- page.setDefaultTimeout(20_000);- // Time flows normally; runFor advances it to fire the 30-second poll.- await page.clock.install();- const requests = [],- errors = [];- diagnosticPage = page;- diagnosticRequests = requests;- let action = 'original',- held;- page.on('pageerror', (error) => errors.push(error.message));- const time = 1_700_000_000_000;- const point = (offset, value) => ({- timestamp: time + offset,- value,- min: value,- max: value,- });- const metrics = (kind) => {- if (kind === 'single') return { cpu: [point(0, 11)] };- if (kind === 'empty') return {};- if (kind === 'service')- return {- cpu: [point(0, 77), point(120_000, 88)],- memory: [point(0, 33), point(120_000, 44)],- };- return {- cpu:- kind === 'updated'- ? [- point(-60_000, 8),- point(0, 11),- point(60_000, 22),- point(120_000, 43),- point(180_000, 66),- ]- : [point(120_000, 43), point(0, 11), point(60_000, 22)],- memory: [point(30_000, 30), point(120_000, 55)],- // Zero throughput is an observation, not missing history.- netin: [point(0, 0), point(120_000, 2048)],- netout: [point(0, 1024), point(120_000, 4096)],- diskread: [point(0, 2048), point(120_000, 8192)],- diskwrite: [point(0, 0), point(120_000, 0)],- };- };- const response = (id, range, kind) => ({- resourceType: 'agent',- resourceId: id,- range,- start: time,- end: time + 180_000,- source: 'store',- metrics: metrics(kind),- });- await page.route('**/*', async (route) => {- const url = new URL(route.request().url());- if (url.origin !== 'http://127.0.0.1:5223') return route.abort();- if (!url.pathname.startsWith('/api/')) return route.continue();- if (url.pathname === '/api/metrics-store/history') {- const id = url.searchParams.get('resourceId'),- range = url.searchParams.get('range');- assert.ok(['agent-three', 'pbs-three'].includes(id));- const kind = action;- action = id === 'pbs-three' ? 'service' : 'original';- requests.push({ id, range, kind, method: route.request().method() });- if (kind === 'hold') {- held = route;- return;- }- if (kind === 'failure')- return route.fulfill({ status: 503, json: { error: 'Private fixture detail' } });- return route.fulfill({ json: response(id, range, kind) });- }- if (url.pathname === '/api/license/runtime-capabilities')- return route.fulfill({- json: {- capabilities: [],- limits: [],- max_history_days: 7,- hosted_mode: false,- runtime: { build: 'community', label: 'Pulse Community runtime' },- blocked_capabilities: [],- },- });- return route.fulfill({ json: { data: [], enabled: false } });- });- await page.goto('http://127.0.0.1:5223/browser-tests/pbs-history-refresh.html', {- waitUntil: 'domcontentloaded',- });- await page.evaluate(- (dark) => document.documentElement.classList.toggle('dark', dark),- theme === 'dark',- );- const fixture = page.getByTestId('history-refresh-fixture');- const utilization = fixture.locator('[data-history-group="utilization"]');- const slider = fixture.getByRole('slider', { name: 'Inspect Utilization history' });- const controls = fixture.getByTestId('guest-history-inspection-control');- const inspectionControl = utilization.getByTestId('guest-history-inspection-control');- await slider.waitFor();- const countBeforeInspection = requests.length;- const value = () => slider.getAttribute('aria-valuetext');- const screenshot = async (state) => {- await utilization.scrollIntoViewIfNeeded();- const fineBefore = await page.evaluate(- () => matchMedia('(hover: hover) and (pointer: fine)').matches,- );- // Resizing a tall element for a screenshot can change Chromium's- // emulated pointer capability. Capture the supported viewport as-is.- await page.screenshot({ path: path.join(artifacts, `${state}-${theme}.png`) });- assert.equal(- await page.evaluate(() => matchMedia('(hover: hover) and (pointer: fine)').matches),- fineBefore,- );- };- const assertValue = async (pattern) => assert.match(await value(), pattern);- const layout = async () => {- const dimensions = await page.evaluate(() => ({- scroll: document.documentElement.scrollWidth,- inner: innerWidth,- }));- assert.ok(dimensions.scroll <= dimensions.inner + 1, JSON.stringify(dimensions));- const box = await slider.boundingBox();- assert.ok(box && box.x >= 0 && box.x + box.width <= width + 1);- assert.ok(box.width > 100, JSON.stringify(box));- if (touch) assert.ok(box.height >= 44, JSON.stringify(box));- return dimensions;- };- const collapsed = async (control = inspectionControl) => {- const bounds = await control.boundingBox();- assert.ok(bounds && bounds.width <= 1 && bounds.height <= 1, JSON.stringify(bounds));- };- assert.equal(- await page.evaluate(() => matchMedia('(hover: hover) and (pointer: fine)').matches),- !touch,- );- if (touch) {- for (const control of await controls.all()) {- const bounds = await control.boundingBox();- assert.ok(bounds && bounds.width > 100 && bounds.height > 44, JSON.stringify(bounds));- }- for (const input of await fixture.getByRole('slider').all()) {- const bounds = await input.boundingBox();- assert.ok(bounds && bounds.width > 100 && bounds.height >= 44, JSON.stringify(bounds));- }- } else {- for (const control of await controls.all()) await collapsed(control);- }- await screenshot('default-input-controls');- // Tab reaches a native slider straight after the range control (there is- // no manual refresh while reads succeed).- await fixture.getByTestId('guest-history-range-control').focus();- await page.keyboard.press('Tab');- assert.equal(await slider.evaluate((el) => document.activeElement === el), true);- const focusStyle = await slider.evaluate((el) => {- const style = getComputedStyle(el);- return {- visible: el.matches(':focus-visible'),- colour: style.outlineColor,- width: style.outlineWidth,- style: style.outlineStyle,- background: getComputedStyle(el.closest('section')).backgroundColor,- };- });- assert.equal(focusStyle.visible, true);- assert.equal(focusStyle.colour, 'rgb(59, 130, 246)');- assert.equal(focusStyle.style, 'solid');- assert.ok(parseFloat(focusStyle.width) >= 2);- const luminance = (colour) => {- const channels = colour- .match(/\d+/g)- .slice(0, 3)- .map((n) => {- const s = Number(n) / 255;- return s <= 0.04045 ? s / 12.92 : ((s + 0.055) / 1.055) ** 2.4;- });- return channels[0] * 0.2126 + channels[1] * 0.7152 + channels[2] * 0.0722;- };- const a = luminance(focusStyle.colour),- b = luminance(focusStyle.background);- focusStyle.contrast = (Math.max(a, b) + 0.05) / (Math.min(a, b) + 0.05);- assert.ok(focusStyle.contrast >= 3, JSON.stringify(focusStyle));- await assertValue(/CPU 43\.0%\. Memory 55\.0%\. Disk no observation\./);- await slider.press('Home');- assert.equal(await slider.inputValue(), '0');- await assertValue(/CPU 11\.0%\. Memory no observation\. Disk no observation\./);- await slider.press('ArrowRight');- assert.equal(await slider.inputValue(), '1');- await assertValue(/CPU no observation\. Memory 30\.0%\. Disk no observation\./);- assert.match(await utilization.innerText(), /CPU\s*no reading/);- assert.doesNotMatch(await utilization.innerText(), /53\.0%/);- await layout();- await screenshot('selected-sparse-time');- await slider.press('End');- assert.equal(await slider.inputValue(), '3');- await slider.press('ArrowLeft');- await assertValue(/CPU 22\.0%\. Memory no observation/);- assert.equal(- requests.length,- countBeforeInspection,- 'inspection must not start another API read',- );- const selectedBeforePoll = await value();- // Exercise an actual same-source background poll without moving focus.- action = 'updated';- await page.clock.runFor(30_000);- await page.waitForFunction(- () =>- document.querySelector('input[aria-label="Inspect Utilization history"]')?.max === '5',- );- assert.equal(await slider.inputValue(), '3');- assert.equal(await value(), selectedBeforePoll);- assert.equal(await slider.evaluate((el) => document.activeElement === el), true);- const plot = utilization.getByTestId('guest-history-plot');- const box = await plot.boundingBox();- await page.mouse.move(box.x + box.width - 4, box.y + box.height / 2);- await page.mouse.move(1, 1);- assert.equal(await value(), selectedBeforePoll);- assert.match(await utilization.innerText(), /CPU\s*22\.0%/);- // Native blur restores the latest legend; mouse inspection still works.- await slider.press('Tab');- assert.match(await utilization.innerText(), /CPU\s*66\.0%/);- await page.mouse.move(box.x + (34 / 360) * box.width, box.y + box.height / 2);- assert.match(await utilization.innerText(), /CPU\s*8\.0%/);- await page.mouse.move(1, 1);-- if (!touch) {- await collapsed();- // Shift+Tab reveals the same native control again, without pointer focus.- await page.keyboard.press('Shift+Tab');- assert.equal(await slider.evaluate((el) => document.activeElement === el), true);- await layout();- await slider.press('Tab');- await collapsed();- }-- let hybridTouch = false;- if (!touch && engine === 'chromium') {- await fixture.getByTestId('guest-history-range-control').focus();- const session = await page.context().newCDPSession(page);- const tap = async (x, y) => {- await session.send('Input.dispatchTouchEvent', {- type: 'touchStart',- touchPoints: [{ x, y }],- });- await session.send('Input.dispatchTouchEvent', { type: 'touchEnd', touchPoints: [] });- };- await tap(box.x + box.width / 2, box.y + box.height / 2);- // A trusted touch event on a fine-pointer device must expose all scrubbers.- assert.equal(- await page.evaluate(() => matchMedia('(hover: hover) and (pointer: fine)').matches),- true,- );- for (const input of await fixture.getByRole('slider').all()) {- const bounds = await input.boundingBox();- assert.ok(bounds && bounds.width > 100 && bounds.height >= 44, JSON.stringify(bounds));- }- const touchBox = await slider.boundingBox();- await tap(touchBox.x + 3, touchBox.y + touchBox.height / 2);- await assertValue(/CPU 8\.0%\. Memory no observation/);- await session.send('Input.dispatchTouchEvent', {- type: 'touchStart',- touchPoints: [{ x: touchBox.x + 3, y: touchBox.y + touchBox.height / 2 }],- });- await session.send('Input.dispatchTouchEvent', {- type: 'touchMove',- touchPoints: [- { x: touchBox.x + touchBox.width - 3, y: touchBox.y + touchBox.height / 2 },- ],- });- await session.send('Input.dispatchTouchEvent', { type: 'touchEnd', touchPoints: [] });- await assertValue(/CPU 66\.0%\. Memory no observation/);- await screenshot('hybrid-touch-inspection');- // Touch focus is browser-owned. Exercise a return to mouse without a- // focused slider, then preserve an explicit keyboard selection too.- await fixture.getByTestId('guest-history-range-control').focus();- await page.mouse.move(box.x + (34 / 360) * box.width, box.y + box.height / 2);- for (const control of await controls.all()) await collapsed(control);- assert.match(await utilization.innerText(), /CPU\s*8\.0%/);- await tap(box.x + box.width / 2, box.y + box.height / 2);- await slider.focus();- await slider.press('Home');- const keyboardSelection = await value();- await page.mouse.move(box.x + box.width - 4, box.y + box.height / 2);- assert.equal(await slider.evaluate((el) => document.activeElement === el), true);- assert.equal(await value(), keyboardSelection);- await layout();- await fixture.getByTestId('guest-history-range-control').focus();- for (const control of await controls.all()) await collapsed(control);- await screenshot('hybrid-mouse-resumed');- await session.detach();- hybridTouch = true;- }-- if (touch) {- await slider.scrollIntoViewIfNeeded();- const touchBox = await slider.boundingBox();- await page.touchscreen.tap(touchBox.x + 3, touchBox.y + touchBox.height / 2);- await assertValue(/CPU 8\.0%\. Memory no observation/);- assert.match(await utilization.innerText(), /CPU\s*8\.0%/);- await page.touchscreen.tap(- touchBox.x + touchBox.width - 3,- touchBox.y + touchBox.height / 2,- );- await assertValue(/CPU 66\.0%\. Memory no observation/);- assert.match(await utilization.innerText(), /CPU\s*66\.0%/);- }- action = 'failure';- await page.clock.runFor(30_000);- await fixture- .getByRole('status', { name: 'History refresh status' })- .getByText('History refresh failed. Showing previously loaded history.', { exact: true })- .waitFor();- await slider.focus();- await slider.press('Home');- await assertValue(/CPU 8\.0%\. Memory no observation/);- assert.doesNotMatch(await fixture.innerText(), /Private fixture detail/);- await layout();- await screenshot('failed-refresh-inspection');- const semantics = await slider.ariaSnapshot();- action = 'single';- await fixture.getByRole('button', { name: 'Retry history' }).click();- await page.waitForFunction(- () => document.querySelectorAll('input[type="range"]').length === 0,- );- const description = await utilization- .getByRole('img')- .evaluate((el) => document.getElementById(el.getAttribute('aria-describedby')).textContent);- assert.match(description, /1 stored observation time\. .*CPU 11\.0%/);- assert.equal(await utilization.locator('path[data-history-series]').count(), 0);- action = 'empty';- await page.clock.runFor(30_000);- await page.waitForFunction(() => {- const image = document.querySelector('[data-history-group="utilization"] svg[role="img"]');- return (- document.getElementById(image.getAttribute('aria-describedby')).textContent ===- 'No stored history observations.'- );- });- assert.equal(await fixture.getByRole('slider').count(), 0);- // Changing resource cannot carry an inspected former-host point into the new target.- action = 'original';- await page.clock.runFor(30_000);- await slider.waitFor();- await slider.focus();- await slider.press('Home');- action = 'hold';- await page.getByRole('button', { name: 'Switch to service target' }).click();- await page.waitForFunction(- () => document.querySelectorAll('input[type="range"]').length === 0,- );- assert.equal(await fixture.locator('svg path').count(), 0);- assert.equal(await fixture.getByTestId('guest-history-hover-time').count(), 0);- assert.ok(held, 'new target read must be held');- await held.fulfill({ json: response('pbs-three', '24h', 'service') });- await slider.waitFor();- assert.equal(await slider.inputValue(), '1');- await assertValue(/CPU 88\.0%\. Memory 44\.0%\. Disk no observation/);- const latestServiceTime = fixture.getByTestId('guest-history-hover-time');- assert.match(await latestServiceTime.innerText(), /^Latest stored/);- assert.equal(- await latestServiceTime.getAttribute('datetime'),- new Date(time + 120_000).toISOString(),- );- const readsBeforeLock = requests.length;- await fixture.getByTestId('guest-history-range-control').selectOption('14d');- await fixture.getByText(/14 days history requires a higher license plan/).waitFor();- assert.equal(await fixture.getByRole('slider').count(), 0);- assert.equal(requests.length, readsBeforeLock);- assert.deepEqual(errors, []);- observations.push({- engine,- version: browser.version(),- width,- theme,- requests,- errors,- semantics,- layout: { width },- singleDescription: description,- focusStyle,- nativeKeys: ['Tab', 'Home', 'ArrowRight', 'End', 'ArrowLeft'],- touch,- hybridTouch,- });- console.log(JSON.stringify({ engine, width, theme, result: 'passed' }));- await page.close();- }- fs.writeFileSync(- path.join(artifacts, 'result.json'),- JSON.stringify(- {- result: 'passed',- engine,- version: browser.version(),- playwright: require('playwright/package.json').version,- runtime_sha256: createHash('sha256')- .update(- fs.readFileSync(path.join(root, 'src/components/Workloads/GuestDrawerHistory.tsx')),- )- .digest('hex'),- observations,- },- null,- 2,- ),- );- } catch (error) {- if (diagnosticPage && !diagnosticPage.isClosed()) {- console.error(- JSON.stringify({- requests: diagnosticRequests,- browser: await diagnosticPage.evaluate(() => ({- width: innerWidth,- scrollY,- fineHover: matchMedia('(hover: hover) and (pointer: fine)').matches,- coarse: matchMedia('(pointer: coarse)').matches,- inspectionStyles: (() => {- const matches = [];- const walk = (rules, parents = []) => {- for (const rule of rules) {- if (rule.selectorText?.includes('not-focus-within')) {- matches.push({- selector: rule.selectorText,- parents,- css: rule.style?.cssText,- });- }- if (rule.cssRules)- walk(rule.cssRules, [- ...parents,- rule.conditionText || rule.selectorText || rule.cssText.split('{')[0],- ]);- }- };- for (const sheet of document.styleSheets) walk(sheet.cssRules);- return matches;- })(),- active: document.activeElement?.outerHTML,- controls: [- ...document.querySelectorAll('[data-testid="guest-history-inspection-control"]'),- ].map((el) => ({- class: el.className,- width: el.getBoundingClientRect().width,- height: el.getBoundingClientRect().height,- clip: getComputedStyle(el).clip,- position: getComputedStyle(el).position,- })),- text: document.body.innerText,- })),- }),- );- await diagnosticPage.screenshot({ path: path.join(artifacts, 'failure.png') });- }- throw error;- } finally {- if (browser) await browser.close();- await server.close();- }-})().catch((error) => {- console.error(error);- process.exitCode = 1;-});diff --git a/frontend-modern/browser-tests/history-keyboard.cjs b/frontend-modern/browser-tests/history-keyboard.cjsdeleted file mode 100644index 419182ab62..0000000000--- a/frontend-modern/browser-tests/history-keyboard.cjs+++ /dev/null@@ -1,80 +0,0 @@-const assert = require('node:assert/strict');-const fs = require('node:fs');-const path = require('node:path');-const { chromium, webkit } = require('playwright');-(async () => {- const root = '/workspace/frontend-modern';- process.chdir(root);- const artifacts = path.join(root, 'node_modules/history-keyboard-proof');- fs.mkdirSync(artifacts, { recursive: true });- 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: fs.mkdtempSync(path.join(artifacts, 'vite-')), server: { host: '127.0.0.1', port: 5223, strictPort: true } });- let browser;- const observations = [];- try {- await server.listen();- for (const [name, engine, width, height] of [['chromium', chromium, 1365, 900], ['webkit', webkit, 390, 844]]) {- browser = await engine.launch(name === 'chromium' ? { headless: true, channel: 'chromium', args: ['--no-sandbox'] } : { headless: true });- const page = await browser.newPage({ viewport: { width, height }, hasTouch: name === 'webkit', isMobile: name === 'webkit' });- const errors = [];- page.on('pageerror', e => errors.push(e.message));- await page.route('**/*', route => {- const url = new URL(route.request().url());- if (url.origin !== 'http://127.0.0.1:5223') return route.abort();- if (!url.pathname.startsWith('/api/')) return route.continue();- return route.fulfill({ json: url.pathname === '/api/license/runtime-capabilities' ? { capabilities: [], limits: [], max_history_days: 7, hosted_mode: false, runtime: { build: 'community' }, blocked_capabilities: [] } : { data: [], enabled: false } });- });- await page.goto('http://127.0.0.1:5223/browser-tests/history-keyboard.html');- if (name === 'webkit') await page.evaluate(() => document.documentElement.classList.add('dark'));- const chart = page.getByRole('img', { name: 'Usage chart', exact: true });- await chart.waitFor();- if (process.argv.includes('--parent')) {- assert.equal(await chart.getAttribute('tabindex'), null);- await page.getByRole('button', { name: 'Change target' }).focus();- await page.keyboard.press('Tab');- assert.equal(await page.evaluate(() => document.activeElement.textContent), 'After charts');- await page.screenshot({ path: path.join(artifacts, 'parent-skipped.png'), fullPage: true });- console.log('Parent reproduced: Tab skips both storage charts; no keyboard inspection');- break;- }- assert.equal(await chart.getAttribute('tabindex'), '0');- await page.getByRole('button', { name: 'Change target' }).focus();- await page.keyboard.press('Tab');- assert.equal(await chart.evaluate(el => el === document.activeElement), true);- const live = page.locator('[aria-live="polite"]').first();- for (const [phase, key, expected] of [['focus', null, '30.0%'], ['previous', 'ArrowLeft', '20.0%'], ['first', 'Home', '10.0%'], ['lower-bound', 'ArrowLeft', '10.0%'], ['last', 'End', '30.0%'], ['upper-bound', 'ArrowRight', '30.0%'], ['escape', 'Escape', '']]) {- if (key) await page.keyboard.press(key);- await page.waitForTimeout(60);- assert.ok((await live.textContent()).includes(expected));- if (!expected) assert.equal(await live.textContent(), '');- else assert.ok((await page.locator('[data-history-chart-tooltip]').first().textContent()).includes(expected));- if (phase === 'previous') {- assert.equal(await page.locator('[data-history-chart-tooltip]').count(), 2);- for (const tooltip of await page.locator('[data-history-chart-tooltip]').all()) {- assert.ok(await tooltip.evaluate(el => el.scrollHeight <= el.clientHeight));- }- assert.equal(await page.locator('[aria-live="polite"]').nth(1).textContent(), '');- const outline = await chart.evaluate(el => getComputedStyle(el).outlineWidth);- assert.notEqual(outline, '0px');- await page.screenshot({ path: path.join(artifacts, `${name}-keyboard.png`), fullPage: true });- }- observations.push({ name, version: browser.version(), phase, announcement: await live.textContent() });- }- await page.keyboard.press('Tab');- assert.equal(await page.getByRole('img', { name: 'Read chart', exact: true }).evaluate(el => el === document.activeElement), true);- await page.keyboard.press('Tab');- assert.equal(await page.getByRole('button', { name: 'After charts' }).evaluate(el => el === document.activeElement), true);- await page.getByRole('button', { name: 'Toggle empty' }).click();- await chart.focus();- await page.keyboard.press('End');- assert.equal(await live.textContent(), '');- assert.equal(await page.locator('[data-history-chart-tooltip]').count(), 0);- const dimensions = await page.evaluate(() => ({ scroll: document.documentElement.scrollWidth, width: innerWidth }));- assert.ok(dimensions.scroll <= dimensions.width + 1, JSON.stringify(dimensions));- assert.deepEqual(errors, []);- await browser.close(); browser = null;- }- fs.writeFileSync(path.join(artifacts, process.argv.includes('--parent') ? 'parent.json' : 'result.json'), JSON.stringify({ playwright: require('playwright/package.json').version, observations }, null, 2));- console.log(JSON.stringify({ result: 'passed', states: observations.length }));- } finally { if (browser) await browser.close(); await server.close(); }-})().catch(error => { console.error(error); process.exitCode = 1; });diff --git a/frontend-modern/browser-tests/history-keyboard.html b/frontend-modern/browser-tests/history-keyboard.htmldeleted file mode 100644index f04472ecf7..0000000000--- a/frontend-modern/browser-tests/history-keyboard.html+++ /dev/null@@ -1 +0,0 @@-<!doctype html><html lang="en"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>History keyboard verification</title></head><body><div id="root"></div><script type="module" src="./history-keyboard.tsx"></script></body></html>diff --git a/frontend-modern/browser-tests/history-keyboard.tsx b/frontend-modern/browser-tests/history-keyboard.tsxdeleted file mode 100644index 5747fb7079..0000000000--- a/frontend-modern/browser-tests/history-keyboard.tsx+++ /dev/null@@ -1,48 +0,0 @@-import { createSignal } from 'solid-js';-import { render } from 'solid-js/web';-import { HistoryChart, HistoryChartHoverGroup } from '../src/components/shared/HistoryChart';-import '../src/index.css';-const Fixture = () => {- const [empty, setEmpty] = createSignal(false);- const [target, setTarget] = createSignal('a');- const points = () =>- empty()- ? []- : [10, 20, 30].map((value, i) => ({- timestamp: 1790942400000 + i * 60000,- value,- min: value,- max: value,- }));- return (- <main class="min-h-screen space-y-4 bg-surface p-4 text-base-content">- <h1>Storage History keyboard inspection</h1>- <button onClick={() => setEmpty(!empty())}>Toggle empty</button>- <button onClick={() => setTarget(target() === 'a' ? 'b' : 'a')}>Change target</button>- <HistoryChartHoverGroup>- <HistoryChart- resourceType="disk"- resourceId={target()}- metric="usage"- label="Usage"- unit="%"- hideSelector- range="1h"- data={points()}- />- <HistoryChart- resourceType="disk"- resourceId={target()}- metric="diskread"- label="Read"- unit="B/s"- hideSelector- range="1h"- data={points()}- />- </HistoryChartHoverGroup>- <button>After charts</button>- </main>- );-};-render(() => <Fixture />, document.getElementById('root')!);diff --git a/frontend-modern/browser-tests/inline-notice-access.cjs b/frontend-modern/browser-tests/inline-notice-access.cjsdeleted file mode 100644index 52aff38c41..0000000000--- a/frontend-modern/browser-tests/inline-notice-access.cjs+++ /dev/null@@ -1,256 +0,0 @@-// Same consuming journey before and after the action-only repair. The parent-// mode reports unmet accessibility criteria, not a passing repair proof.-const fs = require('node:fs');-const path = require('node:path');-const http = require('node:http');-const crypto = require('node:crypto');-const assert = require('node:assert/strict');-const { chromium, webkit } = require('playwright');-const root = '/workspace';-const frontend = root + '/frontend-modern';-const origin = 'http://127.0.0.1:5326';-const hash = (bytes) => crypto.createHash('sha256').update(bytes).digest('hex');--async function presentation(action) {- return action.evaluate((element) => {- const rgba = (colour) => {- const values = colour.match(/[\d.]+/g).map(Number);- return [...values.slice(0, 3), values[3] ?? 1];- };- const luminance = (colour) => {- const rgb = colour.slice(0, 3).map((channel) => {- const value = channel / 255;- return value <= 0.04045 ? value / 12.92 : ((value + 0.055) / 1.055) ** 2.4;- });- return rgb[0] * 0.2126 + rgb[1] * 0.7152 + rgb[2] * 0.0722;- };- const contrast = (a, b) => {- const values = [luminance(a), luminance(b)].sort((x, y) => y - x);- return (values[0] + 0.05) / (values[1] + 0.05);- };- const backgrounds = [];- for (let node = element; node; node = node.parentElement) {- const background = rgba(getComputedStyle(node).backgroundColor);- backgrounds.push(background);- if (background[3] === 1) break;- }- const background = backgrounds.reverse().reduce((base, layer) =>- layer.slice(0, 3).map((value, index) => value * layer[3] + base[index] * (1 - layer[3])),- [255, 255, 255]);- const style = getComputedStyle(element), bounds = element.getBoundingClientRect();- return {- width: bounds.width, height: bounds.height, top: bounds.top, bottom: bounds.bottom,- viewport_height: window.innerHeight, focused: element === document.activeElement,- focus_visible: element.matches(':focus-visible'), outline_style: style.outlineStyle,- outline_width: style.outlineWidth, outline_offset: style.outlineOffset,- colour: style.color, outline_colour: style.outlineColor, background,- text_contrast: contrast(rgba(style.color), background),- outline_contrast: contrast(rgba(style.outlineColor), background),- underlined: style.textDecorationLine.includes('underline'),- document_width: document.documentElement.clientWidth,- document_scroll: document.documentElement.scrollWidth,- client_width: element.clientWidth, scroll_width: element.scrollWidth,- };- });-}--async function run(variant) {- assert(['parent', 'final'].includes(variant));- const output = root + '/tmp/inline-notice-access/' + variant + '-browser';- const compiled = root + '/tmp/inline-notice-access/' + variant + '-static';- fs.mkdirSync(output, { recursive: true });- const binding = JSON.parse(fs.readFileSync(compiled + '/binding.json'));- assert.equal(binding.variant, variant);- const result = {- result: 'incomplete', variant, source: binding.source_sha, binding,- driver_sha256: hash(fs.readFileSync(__filename)),- playwright: require('playwright/package.json').version, cases: [], captures: [], served: {},- cleanup: { browser: false, server: false },- limits: 'Synthetic canonical observations and API replies through actual producer/drawers/recovery panels/Docs. No guest, backup, diagnostic, native recovery, deployed access, release or reporter acceptance.',- };- let server, browser;- try {- assert.match(result.source, /^[a-f0-9]{40}$/);- assert.equal(result.playwright, JSON.parse(fs.readFileSync(root + '/tests/integration/package-lock.json')).packages['node_modules/@playwright/test'].version);- for (const [file, digest] of Object.entries(binding.sources)) {- // The parent variant is compiled in the proof VM from an explicit,- // hash-bound original primitive input. Do not replace assigned source- // or pretend the final primitive supplied those parent pixels.- const input = variant === 'parent' && file === 'src/components/shared/InlineNotice.tsx'- ? root + '/tmp/inline-notice-access/parent-runtime.tsx'- : frontend + '/' + file;- assert.equal(hash(fs.readFileSync(input)), digest, file);- }- const docHash = hash(fs.readFileSync(root + '/docs/VM_DISK_MONITORING.md'));- assert.equal(binding.artifacts['docs/VM_DISK_MONITORING.md'], docHash);- result.doc_sha256 = docHash;- const assets = new Map();- for (const [file, digest] of Object.entries(binding.artifacts)) {- const bytes = fs.readFileSync(compiled + '/' + file);- assert.equal(hash(bytes), digest, file);- assets.set('/' + file, bytes);- }- server = http.createServer((request, response) => {- if (!['GET', 'HEAD'].includes(request.method)) { response.writeHead(405); return response.end(); }- let pathname = new URL(request.url, origin).pathname;- if (['/', '/recovery-fixture', '/docs/VM_DISK_MONITORING'].includes(pathname)) pathname = '/browser-tests/inline-notice-access.html';- const bytes = assets.get(pathname);- if (!bytes) { response.writeHead(404); return response.end(); }- result.served[pathname] = hash(bytes);- response.setHeader('Content-Type', { '.html': 'text/html', '.js': 'text/javascript', '.css': 'text/css', '.md': 'text/markdown; charset=utf-8' }[path.extname(pathname)] || 'application/octet-stream');- response.setHeader('Cache-Control', 'no-store');- response.setHeader('Content-Length', bytes.length);- response.end(request.method === 'HEAD' ? undefined : bytes);- });- await new Promise((resolve, reject) => { server.once('error', reject); server.listen(5326, '127.0.0.1', resolve); });-- for (const [engine, width, theme] of [- [chromium, 1365, 'light'], [chromium, 1365, 'dark'],- [webkit, 390, 'light'], [webkit, 390, 'dark'],- ]) {- const name = `${engine === chromium ? 'chromium' : 'webkit'}-${width}-${theme}`;- browser = await engine.launch(engine === chromium ? { headless: true, channel: 'chromium', args: ['--no-sandbox'] } : { headless: true });- const context = await browser.newContext({ viewport: { width, height: 900 }, isMobile: width < 768, hasTouch: width < 768, colorScheme: theme, locale: 'en-GB', reducedMotion: 'reduce' });- await context.addInitScript((theme) => {- window.__noticeInputs = [];- document.addEventListener('click', (event) => window.__noticeInputs.push({ trusted: event.isTrusted, label: event.target.closest('a,button')?.textContent }), true);- document.addEventListener('DOMContentLoaded', () => document.documentElement.classList.toggle('dark', theme === 'dark'));- }, theme);- const record = { name, browser: browser.version(), width, theme, requests: [], errors: [], actions: [], criteria: [] };- result.cases.push(record);- const page = await context.newPage();- page.setDefaultTimeout(10000);- page.on('pageerror', (error) => record.errors.push(error.message));- const readErrors = { roles: true, users: true };- await page.route('**/*', (route) => {- const request = route.request(), url = new URL(request.url());- record.requests.push({ method: request.method(), path: url.pathname, external: url.origin !== origin });- assert.equal(url.origin, origin, 'no external requests');- assert.equal(request.method(), 'GET', 'no mutations');- assert(!/\/(?:diagnostics|run-command|guest-agent|qemu)(?:\/|$)/.test(url.pathname), 'no live probes');- if (!url.pathname.startsWith('/api/')) return route.continue();- if (url.pathname === '/api/admin/roles') return readErrors.roles- ? route.fulfill({ status: 503, json: { error: 'Synthetic read unavailable' } })- : route.fulfill({ json: [{ id: 'observer', name: 'Fixture observer', description: 'Read-only fixture', permissions: [], isBuiltIn: true }] });- if (url.pathname === '/api/admin/users') return readErrors.users- ? route.fulfill({ status: 503, json: { error: 'Synthetic read unavailable' } })- : route.fulfill({ json: [{ username: 'fixture-operator', displayName: 'Fixture operator', roleIds: ['observer'] }] });- if (url.pathname === '/api/license/runtime-capabilities') return route.fulfill({ json: { capabilities: ['rbac'], limits: [], hosted_mode: false, max_history_days: 7, runtime: { build: 'pro' }, blocked_capabilities: [] } });- return route.fulfill({ json: { success: true, data: [], alerts: [], anomalies: [], config: null } });- });-- const capture = async (file, fullPage = false) => {- await page.screenshot({ path: output + '/' + file, fullPage });- result.captures.push({ file, sha256: hash(fs.readFileSync(output + '/' + file)) });- };- const inspectAction = async (action, label) => {- // Traverse backwards then forwards using native keyboard input rather- // than treating programmatic focus as evidence of tab navigation.- await action.focus(); await page.keyboard.press('Shift+Tab'); await page.keyboard.press('Tab');- await action.evaluate((element) => element.scrollIntoView({ block: 'center' }));- await page.evaluate(async () => { await document.fonts.ready; await new Promise((resolve) => requestAnimationFrame(() => requestAnimationFrame(resolve))); });- const metrics = await presentation(action);- assert.equal(metrics.focused, true, `${label} tab focus`);- assert.equal(metrics.focus_visible, true, `${label} focus visible`);- assert.ok(metrics.text_contrast >= 4.5, `${label} text contrast`);- assert.ok(metrics.document_scroll <= metrics.document_width + 1, `${label} document overflow`);- assert.ok(metrics.scroll_width <= metrics.client_width + 1, `${label} action overflow`);- const criteria = {- label, phone_target: width >= 768 || (metrics.height >= 44 && metrics.width >= 44),- compact_desktop: width < 768 || metrics.height === 16,- persistent_underline: metrics.underlined,- explicit_focus: metrics.outline_style === 'solid' && metrics.outline_width === '2px' && metrics.outline_offset === '2px' && metrics.outline_contrast >= 3,- };- record.actions.push({ label, ...metrics }); record.criteria.push(criteria);- if (variant === 'final') for (const [key, value] of Object.entries(criteria)) if (key !== 'label') assert.equal(value, true, `${label}: ${key}`);- return metrics;- };- const openGuest = async () => {- await page.goto(origin, { waitUntil: 'domcontentloaded' });- await page.waitForFunction(() => window.__noticeAccess?.evidence().projected);- const row = page.locator('[data-guest-id="fixture:pve1:101"] [data-row-action]').first();- if (width < 768) await page.getByText('safety-guest', { exact: true }).first().tap();- else { await row.focus(); await page.keyboard.press('Enter'); }- await page.getByRole('region', { name: 'Workload drawer', exact: true }).waitFor();- record.producer = await page.evaluate(() => window.__noticeAccess.evidence());- assert.equal(record.producer.projected.diskStatusReason, 'prev-vm-locked');- assert.equal(record.producer.projected.lock, 'backup');- };-- for (const [region, testId] of [['Workload drawer', 'guest-read-precaution'], ['Canonical drawer', 'resource-guest-read-precaution']]) {- await openGuest();- const drawer = page.getByRole('region', { name: region, exact: true });- const notice = drawer.getByTestId(testId);- assert.match(await notice.innerText(), /An OK backup or a running VM does not prove thaw/);- assert.match(await notice.innerText(), /Confirm thaw and writes to the filesystems covered/);- for (const tab of ['History', 'Manage', 'Overview']) {- const button = drawer.getByRole('tab', { name: tab, exact: true });- if (width < 768) await button.tap(); else { await button.focus(); await page.keyboard.press('Enter'); }- assert.equal(await notice.isVisible(), true, `${region} notice across tabs`);- }- const action = notice.getByRole('link', { name: 'Backup safety guidance' });- assert.equal(await action.getAttribute('href'), '/docs/VM_DISK_MONITORING');- await page.evaluate(() => window.__noticeAccess.reason('prev-agent-cooldown'));- assert.match(await notice.innerText(), /cooldown/);- assert.equal(await action.getAttribute('href'), '/docs/VM_DISK_MONITORING');- await page.evaluate(() => window.__noticeAccess.reason('prev-vm-locked'));- const metrics = await inspectAction(action, region);- assert.ok(metrics.top >= 4 && metrics.bottom <= metrics.viewport_height - 4, 'whole focus target in capture');- await capture(`${name}-${region === 'Workload drawer' ? 'workload' : 'canonical'}-focus.png`);- if (width < 768) await action.tap({ position: { x: 6, y: 4 } });- else await page.keyboard.press('Enter');- await page.locator('article').waitFor();- assert.equal(new URL(page.url()).pathname, '/docs/VM_DISK_MONITORING');- assert.match(await page.locator('article').innerText(), /every\s+filesystem covered by the backup/);- // Native browser bytes bind the fetched consumer document, rather- // than trusting text or a lossy Playwright response.body projection.- const digest = await page.evaluate(async () => {- const bytes = await (await fetch('/docs/VM_DISK_MONITORING.md')).arrayBuffer();- return Array.from(new Uint8Array(await crypto.subtle.digest('SHA-256', bytes))).map((value) => value.toString(16).padStart(2, '0')).join('');- });- assert.equal(digest, docHash);- record[region + ' guidance'] = { url: page.url(), native_document_sha256: digest };- }-- await page.goto(origin + '/recovery-fixture', { waitUntil: 'domcontentloaded' });- const roles = page.getByRole('region', { name: 'Roles recovery', exact: true });- const users = page.getByRole('region', { name: 'User access recovery', exact: true });- await roles.getByRole('button', { name: 'Retry', exact: true }).waitFor();- await users.getByRole('button', { name: 'Retry', exact: true }).waitFor();- for (const [panel, key] of [[roles, 'roles'], [users, 'users']]) {- const action = panel.getByRole('button', { name: 'Retry', exact: true });- await inspectAction(action, key + ' retry');- if (key === 'roles') await capture(`${name}-recovery.png`, true);- const before = record.requests.filter((request) => request.path === '/api/admin/' + key).length;- readErrors[key] = false;- if (width < 768) await action.tap({ position: { x: 6, y: 4 } }); else await page.keyboard.press('Enter');- await panel.getByText(key === 'roles' ? 'Fixture observer' : 'Fixture operator', { exact: true }).waitFor();- assert.equal(await panel.getByRole('button', { name: 'Retry', exact: true }).count(), 0);- const after = record.requests.filter((request) => request.path === '/api/admin/' + key).length;- assert.equal(after - before, 1, 'one recovery read per activation');- record[key + '_retry'] = { before, after, result: 'loaded exact synthetic data; no access mutations' };- }- for (const tone of ['warning', 'danger', 'info', 'success']) {- const action = page.getByTestId('tone-' + tone).getByRole('link');- const metrics = await inspectAction(action, tone + ' long action');- assert.ok(width > 768 || metrics.height > 16, 'long phone label wraps');- // Long labels legitimately occupy more than one line on a phone;- // desktop labels stay one compact line in this production-size card.- }- record.inputs = await page.evaluate(() => window.__noticeInputs);- assert(record.inputs.some((event) => event.trusted && event.label?.includes('Retry')));- assert.deepEqual(record.errors, []);- await context.close(); await browser.close(); browser = null;- }- result.result = variant === 'parent' ? 'observed-parent-controls' : 'passed';- result.verified_at = new Date().toISOString();- } catch (error) { result.error = String(error.stack || error); throw error; }- finally {- if (browser) await browser.close(); result.cleanup.browser = true;- if (server) await new Promise((resolve, reject) => { server.close((error) => error ? reject(error) : resolve()); server.closeAllConnections(); });- result.cleanup.server = true;- fs.writeFileSync(output + '/result.json', JSON.stringify(result, null, 2) + '\n');- }-}-module.exports = { run };-if (require.main === module) run('final').catch((error) => { console.error(error); process.exitCode = 1; });diff --git a/frontend-modern/browser-tests/inline-notice-access.html b/frontend-modern/browser-tests/inline-notice-access.htmldeleted file mode 100644index 98f5c4f003..0000000000--- a/frontend-modern/browser-tests/inline-notice-access.html+++ /dev/null@@ -1,12 +0,0 @@-<!doctype html>-<html lang="en">- <head>- <meta charset="UTF-8" />- <meta name="viewport" content="width=device-width, initial-scale=1.0" />- <title>Safety notice action access</title>- </head>- <body>- <div id="root"></div>- <script type="module" src="./inline-notice-access.tsx"></script>- </body>-</html>diff --git a/frontend-modern/browser-tests/inline-notice-access.tsx b/frontend-modern/browser-tests/inline-notice-access.tsxdeleted file mode 100644index 427bcacf7d..0000000000--- a/frontend-modern/browser-tests/inline-notice-access.tsx+++ /dev/null@@ -1,92 +0,0 @@-// The canonical producer, both production drawers, recovery panels and Docs-// renderer. Observations and GET replies are synthetic; no guest operation.-import { createSignal, For, Show } from 'solid-js';-import { render } from 'solid-js/web';-import { Router, Route } from '@solidjs/router';-import { DarkModeContext, WebSocketContext, type WebSocketStore } from '../src/contexts/appRuntime';-import { useWorkloads } from '../src/hooks/useWorkloads';-import { GuestRow } from '../src/components/Workloads/GuestRow';-import { GuestDrawer } from '../src/components/Workloads/GuestDrawer';-import { ResourceDetailDrawer } from '../src/components/Infrastructure/ResourceDetailDrawer';-import { RolesPanel } from '../src/components/Settings/RolesPanel';-import { UserAssignmentsPanel } from '../src/components/Settings/UserAssignmentsPanel';-import { InlineNotice, type InlineNoticeTone } from '../src/components/shared/InlineNotice';-import Docs from '../src/pages/Docs';-import type { Resource } from '../src/types/resource';-import '../src/index.css';--// ResourceDetailDrawerOverviewTab reads the real context, not a mocked drawer.-// This transport is inert and cannot open a connection or send a command.-const socket = {- activeAlerts: {}, state: { resources: [], activeAlerts: [], recentlyResolved: [] },- connected: () => false, initialDataReceived: () => true, resourceSnapshotReceived: () => false,- resourceChange: () => ({ version: 0, changedIds: null, changedKeys: null }),- changedResourceMetaSince: () => null, changedResourceIdsSince: () => null, shutdown: () => {},-} as unknown as WebSocketStore;--const resource: Resource = {- id: 'fixture:pve1:101', type: 'vm', name: 'safety-guest', displayName: 'safety-guest',- platformId: 'fixture', platformType: 'proxmox-pve', platformScopes: ['proxmox-pve'],- sourceType: 'api', sources: ['proxmox'], status: 'online', lastSeen: 1791885600000,- metricsTarget: { resourceType: 'vm', resourceId: 'fixture:pve1:101' },- cpu: { current: 10 }, memory: { current: 25, total: 4 * 1024 ** 3, used: 1024 ** 3 },- disk: { current: 50, used: 5 * 1024 ** 3, total: 10 * 1024 ** 3 },- proxmox: {- vmid: 101, nodeName: 'pve1', instance: 'fixture', runtimeStatus: 'running',- guestAgentStatus: 'deferred', diskStatusReason: 'prev-vm-locked', lock: 'backup',- disks: [{ mountpoint: '/data', filesystem: 'ext4', total: 10 * 1024 ** 3, used: 5 * 1024 ** 3 }],- },-};--function GuestFixture() {- const [snapshot, setSnapshot] = createSignal<Resource[]>([resource]);- const state = useWorkloads(() => true, { resourceSnapshot: snapshot });- const guest = () => state.workloads()[0];- const [open, setOpen] = createSignal(false);- (window as any).__noticeAccess = {- evidence: () => ({ canonical: snapshot()[0], projected: guest() }),- reason: (reason: string) => setSnapshot((previous) => [{- ...previous[0], proxmox: { ...previous[0].proxmox, diskStatusReason: reason, lock: reason.includes('locked') ? 'backup' : '' },- }]),- };- return (- <main class="mx-auto min-h-screen max-w-4xl space-y-3 bg-surface p-3 text-base-content">- <h1>Safety notice action access</h1>- <p class="text-xs text-muted">Synthetic observations; no guest checks or backup actions.</p>- <Show when={guest()}>- <table class="w-full table-fixed"><tbody>- <GuestRow guest={guest()} visibleColumnIds={['name', 'disk']} isExpanded={open()}- workloadTableLayoutMode={window.innerWidth <= 768 ? 'phone' : 'wide'}- onClick={() => setOpen(!open())} />- </tbody></table>- <Show when={open()}>- <section aria-label="Workload drawer"><GuestDrawer guest={guest()} onClose={() => setOpen(false)} /></section>- <section aria-label="Canonical drawer"><ResourceDetailDrawer resource={snapshot()[0]} presentation="table-row" /></section>- </Show>- </Show>- </main>- );-}--function RecoveryFixture() {- return <main class="mx-auto min-h-screen max-w-4xl space-y-3 bg-surface p-3 text-base-content">- <h1>Notice recovery controls</h1>- <p class="text-xs text-muted">Synthetic read failures; no access settings are changed.</p>- <section aria-label="Roles recovery"><RolesPanel /></section>- <section aria-label="User access recovery"><UserAssignmentsPanel /></section>- <For each={['warning', 'danger', 'info', 'success'] as InlineNoticeTone[]}>- {(tone) => <InlineNotice tone={tone} data-testid={`tone-${tone}`} actionHref="/docs/VM_DISK_MONITORING"- actionLabel="Read the safety guidance before changing a guest's monitoring configuration">- Wrapping and focus contrast control.- </InlineNotice>}- </For>- </main>;-}--render(() => <DarkModeContext.Provider value={() => document.documentElement.classList.contains('dark')}>- <WebSocketContext.Provider value={socket}><Router>- <Route path="/docs/*docPath" component={Docs} />- <Route path="/recovery-fixture" component={RecoveryFixture} />- <Route path="*" component={GuestFixture} />- </Router></WebSocketContext.Provider>-</DarkModeContext.Provider>, document.getElementById('root')!);diff --git a/frontend-modern/browser-tests/installation-bootstrap-help.cjs b/frontend-modern/browser-tests/installation-bootstrap-help.cjsdeleted file mode 100644index 436985c69a..0000000000--- a/frontend-modern/browser-tests/installation-bootstrap-help.cjs+++ /dev/null@@ -1,94 +0,0 @@-// Exercise the Installation Guide in the production Docs/router/Markdown/CSS.-// This checks rendered instructions and navigation, not native Docker startup.-const assert = require('node:assert/strict');-const fs = require('node:fs');-const path = require('node:path');-const { chromium, webkit } = require('playwright');--(async () => {- const root = path.resolve('frontend-modern');- const artifacts = path.join(root, 'node_modules', 'installation-bootstrap-browser');- fs.mkdirSync(artifacts, { recursive: true });- 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-installation-bootstrap'),- server: { host: '127.0.0.1', port: 5250, strictPort: true },- optimizeDeps: { noDiscovery: true, include: [] },- });- const results = [];- let browser;- try {- await server.listen();- for (const [engine, width, tone] of [['chromium', 1280, 'light'], ['webkit', 390, 'dark']]) {- browser = await { chromium, webkit }[engine].launch(engine === 'chromium'- ? { headless: true, channel: 'chromium', args: ['--no-sandbox'] }- : { headless: true });- const page = await browser.newPage({ viewport: { width, height: 1000 },- ...(engine === 'webkit' ? { isMobile: true, hasTouch: true } : {}) });- const errors = [];- page.on('pageerror', (error) => errors.push(error.message));- page.on('console', (message) => { if (message.type() === 'error') errors.push(message.text()); });- await page.goto('http://127.0.0.1:5250/browser-tests/docs-fragment-navigation.html',- { waitUntil: 'domcontentloaded', timeout: 60_000 });- if (tone === 'dark') await page.evaluate(() => document.documentElement.classList.add('dark'));- await page.getByRole('link', { name: '← All documentation' }).click();- const installLink = page.getByRole('link', { name: 'Install Pulse', exact: true });- await installLink.focus();- await page.keyboard.press('Enter');- await page.getByRole('heading', { name: 'Docker Compose', exact: true }).waitFor();- const text = await page.locator('article').innerText();- for (const phrase of ['Leave authentication overrides unset for a new install',- 'do not reset authentication', 'deployment-supplied password takes precedence',- 'not a Compose interpolation recipe', 'Never share full docker inspect'])- assert.ok(text.includes(phrase), phrase);- assert.ok(!text.includes('secret123'));- const compose = page.locator('pre').filter({ hasText: 'services:' }).first();- const code = await compose.innerText();- for (const phrase of ['${PULSE_IMAGE:-rcourtman/pulse:vX.Y.Z}',- 'pulse_data:/data', 'PULSE_DEPLOYMENT_METHOD=docker_compose'])- assert.ok(code.includes(phrase), phrase);- assert.ok(!code.includes('PULSE_AUTH_'));- await compose.scrollIntoViewIfNeeded();- assert.ok(await page.evaluate(() => document.documentElement.scrollWidth <= innerWidth + 1));- await page.screenshot({ path: path.join(artifacts, `${engine}-compose.png`) });- const warning = page.getByText('For an existing installation, preserve its image', { exact: false });- await warning.scrollIntoViewIfNeeded();- await page.screenshot({ path: path.join(artifacts, `${engine}-existing-install.png`) });-- const bootstrap = page.getByRole('link', { name: 'bootstrap-token setup', exact: true }).last();- await bootstrap.focus();- await page.keyboard.press('Enter');- await page.waitForFunction(() => {- const h = document.getElementById('step-1-get-the-token');- return h && h.getBoundingClientRect().top >= 0 && h.getBoundingClientRect().top < innerHeight;- });- assert.ok(page.url().endsWith('/docs/INSTALL#step-1-get-the-token'));- assert.ok((await page.locator('article').innerText()).includes('docker exec pulse /app/pulse bootstrap-token'));- await page.screenshot({ path: path.join(artifacts, `${engine}-bootstrap.png`) });- const auth = page.getByRole('link', { name: 'authentication guide', exact: true });- await auth.focus();- await page.keyboard.press('Enter');- await page.waitForFunction(() => {- const h = document.getElementById('private-docker-authentication-file');- return h && h.getBoundingClientRect().top >= 0 && h.getBoundingClientRect().top < innerHeight;- });- assert.ok(page.url().endsWith('/docs/CONFIGURATION#private-docker-authentication-file'));- assert.ok((await page.locator('article').innerText()).includes('not out of Docker\'s container environment'));- assert.deepEqual(errors, []);- results.push({ engine, version: browser.version(), width, tone,- noSharedComposeCredentials: true, paidImageAndDataPreserved: true,- existingInstallWarning: true, keyboardBootstrapAndPrivateFileLinks: true, errors });- await browser.close();- browser = undefined;- }- const result = { result: 'passed', playwright: require('playwright/package.json').version,- scope: 'rendered installation guidance and links; not native Docker or password changes', results };- fs.writeFileSync(path.join(artifacts, 'result.json'), JSON.stringify(result, null, 2) + '\n');- console.log(JSON.stringify(result));- } finally {- if (browser) await browser.close();- await server.close();- }-})().catch((error) => { console.error(error); process.exitCode = 1; });diff --git a/frontend-modern/browser-tests/kubernetes-status-rows.cjs b/frontend-modern/browser-tests/kubernetes-status-rows.cjsdeleted file mode 100644index 2922fc5e02..0000000000--- a/frontend-modern/browser-tests/kubernetes-status-rows.cjs+++ /dev/null@@ -1,258 +0,0 @@-const assert = require('node:assert/strict');-const fs = require('node:fs');-const path = require('node:path');-const { chromium, webkit } = require('playwright');--// Each Kubernetes row's status words read in its dot's colour: a crash-looping-// Pod's reason red, a Pending one amber, a short Deployment's Ready count and a-// ReplicaSet's "1 not ready" amber, a healthy row plain.-const now = '2026-10-03T12:00:00Z';-const base = (id, type, kubernetes, extra = {}) => ({- id,- type,- name: id,- status: 'online',- lastSeen: now,- platformType: 'kubernetes',- sources: ['kubernetes'],- kubernetes: { clusterName: 'prod', namespace: 'shop', ...kubernetes },- ...extra,-});-const container = (name, ready, extra = {}) => ({- name,- image: `ghcr.io/pulse-demo/${name}:1`,- ready,- restartCount: 0,- state: ready ? 'running' : 'waiting',- ...extra,-});-const observations = () => [- base('checkout-api-7d9f-a1', 'pod', {- podName: 'checkout-api-7d9f-a1',- podPhase: 'Running',- podContainers: [container('checkout-api', true)],- ownerKind: 'ReplicaSet',- ownerName: 'checkout-api-7d9f',- }),- base('checkout-api-7d9f-b2', 'pod', {- podName: 'checkout-api-7d9f-b2',- podPhase: 'Running',- podContainers: [- container('checkout-api', false, { reason: 'CrashLoopBackOff', restartCount: 14 }),- ],- restarts: 14,- ownerKind: 'ReplicaSet',- ownerName: 'checkout-api-7d9f',- }),- base('worker-5c2-c3', 'pod', {- podName: 'worker-5c2-c3',- podPhase: 'Pending',- podContainers: [container('worker', false)],- }),- base('checkout-api', 'k8s-deployment', {- desiredReplicas: 3,- updatedReplicas: 3,- readyReplicas: 1,- availableReplicas: 1,- }),- base('storefront', 'k8s-deployment', {- desiredReplicas: 2,- updatedReplicas: 2,- readyReplicas: 2,- availableReplicas: 2,- }),- base('checkout-api-7d9f', 'k8s-replicaset', {- resourceKind: 'ReplicaSet',- desiredReplicas: 4,- currentReplicas: 4,- readyReplicas: 3,- availableReplicas: 3,- }),-];--const rgb = (colour) => colour.match(/\d+/g).map(Number);-// Red in light mode is deep, in dark mode a light pink: red leads either way.-const isRed = (colour) => {- const [r, g, b] = rgb(colour);- return r > 150 && r - g > 60 && r - b > 60;-};-const isAmber = (colour) => {- const [r, g, b] = rgb(colour);- return r > 150 && g > 70 && b < 80;-};--(async () => {- const root = '/workspace/frontend-modern';- const output = '/workspace/tmp/kubernetes-status-rows';- fs.mkdirSync(output, { recursive: true });- 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(output, 'vite-cache'),- server: { host: '127.0.0.1', port: 5273, strictPort: true },- });- const results = [],- screenshots = [];- let browser;- try {- await server.listen();- for (const [name, engine, width] of [- ['desktop', chromium, 1440],- ['phone', webkit, 390],- ]) {- browser = await engine.launch(- engine === chromium- ? { headless: true, channel: 'chromium', args: ['--no-sandbox'] }- : { headless: true },- );- const page = await browser.newPage({- viewport: { width, height: width === 390 ? 844 : 900 },- isMobile: width === 390,- hasTouch: width === 390,- locale: 'en-GB',- timezoneId: 'UTC',- });- await page.clock.setFixedTime(new Date(now));- page.setDefaultTimeout(15000);- const checks = [],- errors = [];- page.on('pageerror', (e) => errors.push(e.message));- await page.route('**/*', async (route) => {- const request = route.request(),- url = new URL(request.url());- if (url.origin !== 'http://127.0.0.1:5273') return route.abort();- if (!url.pathname.startsWith('/api/')) return route.continue();- if (url.pathname === '/api/resources')- return route.fulfill({ json: { data: observations() } });- return route.fulfill({- json: {- enabled: false,- data: [],- capabilities: [],- facets: [],- relationships: [],- recentChanges: [],- alerts: {},- },- });- });- const check = async (label, run) => {- try {- await run();- checks.push({ label, passed: true });- } catch (e) {- checks.push({ label, passed: false, error: e.message });- }- };- const colour = (locator) => locator.evaluate((el) => getComputedStyle(el).color);- const dotColour = (locator) => locator.evaluate((el) => getComputedStyle(el).backgroundColor);- // A fresh Vite cache compiles the app on the first load.- await page.goto('http://127.0.0.1:5273/browser-tests/kubernetes-status-rows.html', {- timeout: 180000,- });- await page.getByText('6 REST-mapped rows', { exact: true }).waitFor({ timeout: 60000 });- if (width === 390) await page.evaluate(() => document.documentElement.classList.add('dark'));-- await check('A Pod status reads in its dot colour', async () => {- const pods = page.getByRole('region', { name: 'Pod table' });- const crash = pods.locator('[data-kubernetes-pod-row="checkout-api-7d9f-b2"]');- const crashDot = crash.locator('[title="CrashLoopBackOff"]').first();- await crashDot.waitFor();- assert.ok(isRed(await dotColour(crashDot)), 'crash-looping dot red');- const crashWords = crash.locator('[data-kubernetes-pod-status]');- // The Status column is a desktop column; a phone row keeps the dot.- if (await crashWords.isVisible()) {- assert.equal(await crashWords.innerText(), 'CrashLoopBackOff');- // The failure reason reads whole, not "CrashLoopBa…".- const fit = await crashWords.evaluate((e) => ({- scroll: e.scrollWidth,- client: e.clientWidth,- }));- assert.ok(fit.scroll <= fit.client, JSON.stringify(fit));- assert.ok(isRed(await colour(crashWords)), 'crash-looping words red');- const pending = pods.locator(- '[data-kubernetes-pod-row="worker-5c2-c3"] [data-kubernetes-pod-status]',- );- assert.ok(isAmber(await colour(pending)), 'pending words amber');- const healthy = pods.locator(- '[data-kubernetes-pod-row="checkout-api-7d9f-a1"] [data-kubernetes-pod-status]',- );- const plain = await colour(healthy);- assert.ok(!isRed(plain) && !isAmber(plain), `healthy words plain: ${plain}`);- } else {- // A phone reads the reason under the pod name instead.- assert.equal(width, 390);- const phoneWords = crash.locator('[data-kubernetes-pod-status-phone]');- assert.equal((await phoneWords.textContent()).trim(), 'CrashLoopBackOff');- assert.ok(isRed(await colour(phoneWords)), 'phone crash-looping words red');- const fit = await phoneWords- .locator('span')- .evaluate((e) => ({ scroll: e.scrollWidth, client: e.clientWidth }));- assert.ok(fit.scroll <= fit.client, JSON.stringify(fit));- }- if (width !== 390) {- // The desktop row has its Status column, so no second line.- assert.equal(- await crash.locator('[data-kubernetes-pod-status-phone]').isVisible(),- false,- );- }- });- await check('A short Deployment reads its Ready count in amber', async () => {- const deployments = page.getByRole('region', { name: 'Deployment table' });- const short = deployments.locator('[data-kubernetes-deployment-ready="warning"]');- await short.waitFor();- assert.match((await short.innerText()).replace(/\s+/g, ''), /^1\/?3?$/);- assert.ok(isAmber(await colour(short)), 'short Ready amber');- const full = deployments.locator('[data-kubernetes-deployment-ready="success"]');- const plain = await colour(full);- assert.ok(!isRed(plain) && !isAmber(plain), `full Ready plain: ${plain}`);- });- await check('A controller exception reads in its dot colour', async () => {- const controllers = page.getByRole('region', { name: 'Controller table' });- const exception = controllers.getByText('1 not ready', { exact: true });- await exception.waitFor();- assert.ok(isAmber(await colour(exception)), 'exception amber');- });- const dimensions = await page.evaluate(() => ({- width: innerWidth,- scroll: document.documentElement.scrollWidth,- }));- checks.push({- label: 'No horizontal page overflow',- passed: dimensions.scroll <= dimensions.width + 1,- dimensions,- });- checks.push({ label: 'No page errors', passed: errors.length === 0, errors });- const file = `${name}-kubernetes.png`;- await page.screenshot({ path: path.join(output, file), fullPage: true });- screenshots.push({ file, engine: name, width });- results.push({ engine: name, width, checks });- await browser.close();- browser = undefined;- }- } finally {- if (browser) await browser.close();- await server.close();- }- const failures = results.flatMap((r) =>- r.checks.filter((c) => !c.passed).map((c) => ({ engine: r.engine, ...c })),- );- fs.writeFileSync(- path.join(output, 'result.json'),- JSON.stringify({ verified_at: new Date().toISOString(), results, screenshots }, null, 2),- );- console.log(- JSON.stringify({- checked: results.reduce((n, r) => n + r.checks.length, 0),- screenshots: screenshots.length,- failures,- }),- );- assert.equal(failures.length, 0, JSON.stringify(failures));-})().catch((error) => {- console.error(error);- process.exitCode = 1;-});diff --git a/frontend-modern/browser-tests/kubernetes-status-rows.html b/frontend-modern/browser-tests/kubernetes-status-rows.htmldeleted file mode 100644index 39dc7b9e71..0000000000--- a/frontend-modern/browser-tests/kubernetes-status-rows.html+++ /dev/null@@ -1,12 +0,0 @@-<!doctype html>-<html lang="en">- <head>- <meta charset="UTF-8" />- <meta name="viewport" content="width=device-width, initial-scale=1.0" />- <title>Kubernetes status rows verification</title>- </head>- <body>- <div id="root"></div>- <script type="module" src="./kubernetes-status-rows.tsx"></script>- </body>-</html>diff --git a/frontend-modern/browser-tests/kubernetes-status-rows.tsx b/frontend-modern/browser-tests/kubernetes-status-rows.tsxdeleted file mode 100644index 64c0ee5388..0000000000--- a/frontend-modern/browser-tests/kubernetes-status-rows.tsx+++ /dev/null@@ -1,76 +0,0 @@-// Synthetic REST observations through the real hook and the production-// Kubernetes Pods, Deployments and Controllers tables with app CSS. No real-// websocket, cluster or installed/released acceptance claim.-import { createSignal } from 'solid-js';-import { createStore } from 'solid-js/store';-import { render } from 'solid-js/web';-import { Router, Route } from '@solidjs/router';-import { useUnifiedResources } from '../src/hooks/useUnifiedResources';-import { KubernetesPodsTable } from '../src/features/kubernetes/KubernetesPodsTable';-import { KubernetesDeploymentsTable } from '../src/features/kubernetes/KubernetesDeploymentsTable';-import { KubernetesControllersTable } from '../src/features/kubernetes/KubernetesControllersTable';-import { DarkModeContext, WebSocketContext } from '../src/contexts/appRuntime';-import type { Resource } from '../src/types/resource';-import { markSystemSettingsLoadedWithDefaults } from '../src/stores/systemSettings';-import '../src/index.css';--markSystemSettingsLoadedWithDefaults();--const [wsState] = createStore({- resources: [] as Resource[],- lastUpdate: 0,- nodes: [],- pbs: [],- pmg: [],- vms: [],- containers: [],-});-const [connected] = createSignal(false);-const ws = {- state: wsState,- connected,- initialDataReceived: () => true,- resourceChange: () => ({ version: wsState.lastUpdate, changedIds: null, changedKeys: null }),- activeAlerts: () => ({}),- shutdown: () => {},-};-window.__pulseWsStore = ws as any;--function Fixture() {- const rows = useUnifiedResources({ query: '', cacheKey: 'kubernetes-status-rows-browser' });- const ofType = (...types: string[]) => rows.resources().filter((row) => types.includes(row.type));- const tableProps = {- emptyIcon: <span />,- emptyTitle: 'No fixture rows',- emptyDescription: 'No fixture rows',- showToolbar: false,- };- return (- <WebSocketContext.Provider value={ws as any}>- <DarkModeContext.Provider value={() => document.documentElement.classList.contains('dark')}>- <main class="min-h-screen space-y-4 bg-surface p-4 text-base-content">- <h1 class="text-lg font-semibold">Kubernetes status rows</h1>- <p data-fixture-loaded>{rows.resources().length} REST-mapped rows</p>- <section aria-label="Pod table">- <KubernetesPodsTable resources={ofType('pod')} {...tableProps} />- </section>- <section aria-label="Deployment table">- <KubernetesDeploymentsTable resources={ofType('k8s-deployment')} {...tableProps} />- </section>- <section aria-label="Controller table">- <KubernetesControllersTable resources={ofType('k8s-replicaset')} {...tableProps} />- </section>- </main>- </DarkModeContext.Provider>- </WebSocketContext.Provider>- );-}--render(- () => (- <Router>- <Route path="/*" component={Fixture} />- </Router>- ),- document.getElementById('root')!,-);diff --git a/frontend-modern/browser-tests/lifecycle-control.md b/frontend-modern/browser-tests/lifecycle-control.mddeleted file mode 100644index 27552b1f51..0000000000--- a/frontend-modern/browser-tests/lifecycle-control.md+++ /dev/null@@ -1,205 +0,0 @@-# Browser suspension diagnostic--Run `npm ci --ignore-scripts --no-audit --no-fund` at repository root, then-`pulse-heavy-run -- node scripts/check-browser-lifecycle-control.mjs` using an-installed Playwright Chromium. This uses owned blank pages only, no Pulse server-or credentials. It is deliberately not wired into CI or release qualification.--The comparison is fresh-session focus false versus true then false, each in a-new context. Host-side waits avoid evaluating the frozen page. Success requires-ordered freeze/resume events with identical timer counts and subsequent timer-progress, not merely acknowledged protocol commands. Exit 1 means the-intervention did not establish the control; it does not mean Pulse is broken.--On 8 September 2026, Chromium 141.0.7390.37 / Playwright 1.56.1 / Node 24.20.0-returned successful commands for both cases, but each advanced from 5 to 52-ticks and remained visible/focused without lifecycle events. The intervention-failed. No Pulse application was loaded and no incident-convergence assertion-was exercised.--The hypothesis came from the version-matched Chromium-[emulation agent source](https://raw.githubusercontent.com/chromium/chromium/141.0.7390.37/third_party/blink/renderer/core/inspector/inspector_emulation_agent.cc):-the equality guard in `setFocusEmulationEnabled` can skip updating the page on-a fresh false request. Avoiding that guard did not establish suspension in-this experiment. Do not continue treating that guard as a sufficient diagnosis.-The next investigation must establish actual page visibility/lifecycle control-under the automation harness before attempting Pulse recovery acceptance.--## Single-owner control — 8 September 2026--`pulse-heavy-run -- node scripts/check-browser-single-session-control.mjs`-launches the installed Chromium executable selected by Playwright, but uses one-raw CDP session per owned blank target. It does not attach a Playwright page-session, modify dependencies, or load Pulse. The preselected comparison is forced-focus (negative control) versus no forced focus (positive control), with fresh-targets. Both must meet their assertions for exit 0. Protocol calls have bounded-timeouts; the temporary profile and owned browser are cleaned up.--Fresh [Playwright 1.56.1 source](https://raw.githubusercontent.com/microsoft/playwright/v1.56.1/packages/playwright-core/src/server/chromium/crPage.ts)-shows focus emulation enabled on its main-frame session. This suggested a-competing-session confounder in the earlier test, not another reason to repeat-false/true-to-false commands on the separate diagnostic session.-[Chrome lifecycle guidance](https://developer.chrome.com/docs/web-platform/page-lifecycle-api)-describes timer suspension in frozen pages. These sources informed the control;-only observed timer and event behaviour determines success.--Observed on Chrome 141.0.7390.37, revision-`9f043f63b0e5b728c8d09f3e3ddfc1681a4bd58e`, Playwright 1.56.1,-Node v24.20.0, linux x64:--- Forced focus: ticks 5 → 52, visible/focused, no lifecycle events.-- No forced focus: ticks 5 → 6; visibilitychange to hidden, freeze at tick 5,- resume at tick 5, then timer progress. All commands acknowledged; exit 0.--The resumed target remained hidden/unfocused. This proves freeze/resume, **not**-foreground return, visibility restoration, incident convergence, or an installed-release. Preserve the earlier failed experiment: this uses a different protocol-ownership arrangement, not a passing rerun of that intervention. A Pulse browser-scenario must retain this ownership arrangement and its timer/event probe; adding-a Playwright page attachment may reintroduce the confounder. Before testing-foreground convergence, separately observe return to visible. Installed acceptance-still requires the authorised synthetic installation and exact byte identities-listed in `alert-recovery-acceptance.md`; neither is supplied by this control.--## Foreground activation control — 8 September 2026--`pulse-heavy-run -- node scripts/check-browser-single-session-control.mjs --foreground`-adds `Page.bringToFront` after the separate post-resume snapshot, then takes a-foreground snapshot after 250ms. Default invocation retains the original-freeze/resume-only behaviour. The optional mode requires visible **and** focused-state plus timer progress; it does not force focus emulation back on to obtain a-passing result. No Playwright page is attached.--Fresh [CDP documentation](https://chromedevtools.github.io/devtools-protocol/tot/Page/#method-bringToFront)-describes tab activation separately from lifecycle state. The command's success-is not evidence of visibility restoration. On the same Chrome revision and-runtime listed above, both the initial implementation and the final optional-mode-run exited 1:--- Forced-focus negative: ticks 5 → 52 → 57; visible/focused throughout, no events.-- Unforced positive: freeze and resume at tick 5, hidden/unfocused after resume;- after activation, **hidden/focused**, without a visible visibilitychange event.-- The first run stayed at tick 5 through the foreground sample; the optional-mode- run reached tick 6 only at that final sample. Both failed the earlier- post-resume timer-progress assertion before reaching the foreground assertion.--The 250ms post-resume sample is therefore not a dependable timer-progress bound-for this hidden target. Do not interpret that failed assertion as missing resume:-ordered freeze/resume events were recorded. Independently, visibility restoration-failed in both observed foreground samples. Neither threshold was relaxed and-neither failure is cleared by the earlier successful freeze-only control.--No Pulse fixture was exercised: the prerequisite foreground control is still-unestablished. Before applying this arrangement to application convergence,-choose and verify an actual visibility transition (potentially a headed browser-with owned window activation), retaining the suspension probe and all failed-observations. Repeating this activation unchanged, synthetically dispatching a-visibility event, or enabling forced focus would not resolve the evidence gap.-This diagnostic is not a release gate and proves nothing about installed-incident state or destination receipt.--## Headed window control — 8 September 2026--The opt-in headed diagnostic uses an owned display (never a user's desktop):--```sh-pulse-heavy-run -- xvfb-run -a -s '-screen 0 1280x800x24 -nolisten tcp' node scripts/check-browser-single-session-control.mjs --headed-window-```--[Playwright's headed Linux guidance](https://playwright.dev/docs/ci#running-headed)-identifies Xvfb as the display prerequisite. This is not proof of window-manager-activation. This mode launches real headed Chromium with one raw page session,-without enabling focus emulation. It requests minimisation of the target's owned-window before freeze, restoration after resume, then tab activation. It records-all intervention commands and samples every 250ms for a preselected ten-second-foreground bound. Freeze/resume must be ordered with identical timer counts;-subsequent timer progress is required at foreground, rather than after the old-250ms hidden-page delay. A visible event after resume and visible/focused final-state are independently required. Default/headless checks retain their old bound.--One run on Chrome 141.0.7390.37 (revision as above), Playwright 1.56.1,-Node v24.20.0, linux x64, Xvfb/xserver-common `2:21.1.12-1ubuntu1.6`, display-`:99`, exited 1 at `Must observe visible transition after resume`:--- Baseline visible/focused at tick 5.-- Acknowledged minimise request: still visible/focused at tick 10, no event.-- Freeze/resume ordered at tick 10; post-resume hidden/unfocused at tick 10.-- Acknowledged restore and tab activation: hidden/focused throughout the bounded- observation; timers eventually reached tick 20, no visible event.--Thus the short timer bound is no longer the immediate failed assertion, but-headed launch alone did not establish visibility restoration. No window manager-was started; openbox and xdotool were unavailable. The unchanged minimise sample-is adverse evidence against this window mechanism, not proof that the browser-actually minimised. Do not repeat this bare-Xvfb arrangement for favourable samples.-A subsequent experiment needs verified native window/tab state transitions,-not merely a larger timeout or successful CDP acknowledgements. No Pulse fixture,-installed convergence, destination receipt or release qualification was exercised.-Complete output is retained in maintainer run `20260908T065015Z-web-product`,-`headed-window-control.log`. Earlier failed controls remain relevant.--## Native tab-switch control — 8 September 2026--Run the same owned Xvfb command with `--headed-tab` instead of-`--headed-window`. This does not request minimisation or require a window-manager: it creates a second owned blank tab and activates it. Before freezing,-it requires observed hidden → visible/focused → hidden states, each bounded to-ten seconds with 250ms samples. It then uses the existing 2100ms host-side frozen-wait, resumes while backgrounded, and activates the original tab. Ordered-freeze/resume with unchanged ticks, a subsequent visible event, final focus and-timer progress remain required. No synthetic visibility events or forced focus-are used; no Playwright page session is attached.--One run exited 0 on the same Chrome revision, Playwright and Node versions above,-owned display :99. Preflight recorded hidden at tick 5, visible/focused at tick-11, then hidden at tick 12. Freeze and resume both recorded tick 12.-Post-resume remained hidden/unfocused at tick 12; tab activation produced a-visible event and visible/focused state at tick 18. Complete runtime identities,-intervention commands/responses and samples are retained in maintainer run-`20260908T070012Z-web-product/headed-tab-control.log`.--This establishes the positive control for the **tab-switch** mechanism, not-window minimisation. Earlier adverse results and the default mode's unreliable-250ms hidden-timer sample remain unchanged. No Pulse fixture or installed-pair-acceptance ran. The next source-level convergence fixture must retain raw-single-session ownership, the genuine background preflight, and the suspension-probe rather than attach a Playwright page and assume equivalent behaviour.--## Suspended incident component convergence — 8 September 2026--```sh-pulse-heavy-run -- xvfb-run -a -s '-screen 0 1280x800x24 -nolisten tcp' node scripts/check-browser-single-session-control.mjs --incident-convergence-```--This opt-in mode retains the raw single-session headed-tab preflight and probe,-then mounts the production incident hook and panel through a loopback Vite-fixture. No Playwright page is attached. It initiates two synthetic HTTP reads-before freezing, sends the newer response followed by the obsolete response from-the host while frozen, waits 2100ms, resumes and activates the original tab.-Both native foreground recovery and ordered suspension must pass before checking-convergence (ten-second bound): latest incident retained, obsolete incident-absent, loading/error cleared and no notification error. Fixture button clicks-are scripted setup, not a claim of native pointer/keyboard interaction.--The first run used identical pending GET URLs and exited 1 waiting for the-second request, before freeze. Only one request reached the fixture. Same-URL-request handling was a possible confounder, not an established browser diagnosis-or product failure. The revised fixture gives reads distinct query identifiers-and disables fetch caching. One revised run exited 0: hidden → visible/focused →-hidden preflight; freeze/resume both at tick 11; visible/focused at tick 17;-latest incident rendered, obsolete absent, loading/error false, notifications 0.--Both outputs are retained under maintainer run `20260908T072007Z-web-product`:-`incident-convergence.log` (adverse) and-`incident-convergence-distinct-reads.log` (passing). Runtime was Chrome-141.0.7390.37, revision `9f043f63b0e5b728c8d09f3e3ddfc1681a4bd58e`,-Playwright 1.56.1, Node v24.20.0 linux x64, owned Xvfb display :99.-The existing ownership runner now imports the unchanged shared fixture string.--This is **component-source evidence**, not full application convergence:-authentication, application WebSocket refresh, installed restart, selected public/-private release pair, native mobile lifecycle, and destination receipt are not-exercised. The fixture replaces AlertsAPI's incident read with synthetic HTTP;-it does not establish that the application initiates a refresh on foreground,-nor guarantee network callback execution order from host response order. Earlier-failed controls remain adverse evidence about their respective mechanisms.diff --git a/frontend-modern/browser-tests/maintenance-evidence.cjs b/frontend-modern/browser-tests/maintenance-evidence.cjsdeleted file mode 100644index 08d457a549..0000000000--- a/frontend-modern/browser-tests/maintenance-evidence.cjs+++ /dev/null@@ -1,416 +0,0 @@-// Read-only browser acceptance of the changed report presentation/query flow.-// Explicit review/rerun business calls are covered by the runtime component-// suite. Every POST is refused here, so a clock-induced operation fails proof.-const assert = require('node:assert/strict');-const fs = require('node:fs');-const crypto = require('node:crypto');-const { chromium, webkit } = require('playwright');-const root = '/workspace/frontend-modern';-const output = '/workspace/tmp/maintenance-evidence/browser-read-only';-const origin = 'http://127.0.0.1:5347';-const start = Date.parse('2026-10-11T04:00:00Z');-const iso = (offset) => new Date(start + offset).toISOString();-const reports = ['healthy', 'pending', 'needs_review', 'failed_verification'].map((status) => ({- id: 'report:' + status,- resourceId: 'pbs-a',- status,- trigger: 'maintenance_window_ended',- startedAt: iso(-30_000),- completedAt: status === 'pending' ? '0001-01-01T00:00:00Z' : iso(-30_000),- windowStartedAt: iso(-90_000_000),- windowEndedAt: iso(-86_400_000),- evidence: {- activeCriticalAlerts: status === 'failed_verification' ? 1 : 0,- activeWarningAlerts: 2,- activeCriticalFindings: 0,- activeWarningFindings: 1,- failedActionsSinceWindowStart: 0,- metricRecovery: { samplesAfterEnd: 3, trend: 'improving' },- },- linkedFindingIds: [],- linkedAlertIds: [],- linkedActionIds: [],- recommendation: 'Recorded evidence, not a fresh health observation.',- ...(status === 'healthy'- ? {- userOutcome: 'reviewed',- reviewedAt: iso(-10_000),- reviewedBy: 'fixture-admin',- reviewNote: 'Earlier check retained. A completed backup does not prove guest recovery.',- }- : {}),-}));-async function bounded(promise, label) {- let timer;- try {- return await Promise.race([- promise,- new Promise((_, reject) => {- timer = setTimeout(- () => reject(new Error('Fixture observation deadline: ' + label)),- 10_000,- );- }),- ]);- } finally {- clearTimeout(timer);- }-}-(async () => {- fs.mkdirSync(output, { recursive: true });- const binding = JSON.parse(- fs.readFileSync('/workspace/tmp/maintenance-evidence/source-binding.json'),- );- for (const [file, digest] of Object.entries(binding.content_sha256)) {- assert.equal(- crypto- .createHash('sha256')- .update(fs.readFileSync('/workspace/' + file))- .digest('hex'),- digest,- file,- );- }- const playwright = require('playwright/package.json').version;- assert.equal(- playwright,- JSON.parse(fs.readFileSync('/workspace/tests/integration/package-lock.json')).packages[- 'node_modules/@playwright/test'- ].version,- );- const result = {- source: binding,- playwright,- cases: [],- captures: [],- completed: false,- browsersClosed: false,- serverClosed: false,- };- const { createServer } = await import(root + '/node_modules/vite/dist/node/index.js');- const server = await createServer({- root,- configFile: root + '/vite.config.ts',- cacheDir: output + '/vite-cache',- server: { host: '127.0.0.1', port: 5347, strictPort: true, watch: null },- });- let browser, context;- try {- await server.listen();- for (const [name, engine, width, height, dark] of [- ['desktop', chromium, 1365, 900, false],- ['phone', webkit, 390, 844, true],- ]) {- browser = await engine.launch(- engine === chromium- ? { headless: true, channel: 'chromium', args: ['--no-sandbox'] }- : { headless: true },- );- context = await browser.newContext({- viewport: { width, height },- isMobile: dark,- hasTouch: dark,- locale: 'en-GB',- timezoneId: 'UTC',- });- const page = await context.newPage();- page.setDefaultTimeout(10_000);- page.setDefaultNavigationTimeout(45_000);- await page.clock.install({ time: new Date(start - 1000) });- await page.clock.pauseAt(new Date(start));- await page.addInitScript((dark) => {- localStorage.clear();- sessionStorage.clear();- document.addEventListener(- 'DOMContentLoaded',- () => document.documentElement.classList.toggle('dark', dark),- { once: true },- );- }, dark);- const record = {- name,- browserVersion: browser.version(),- viewport: { width, height },- dark,- checks: [],- reads: [],- writes: [],- errors: [],- unexpected: [],- offOrigin: [],- completed: false,- contextClosed: false,- };- result.cases.push(record);- let mode = 'pending',- releaseRead,- observeRead;- const readStarted = new Promise((resolve) => {- observeRead = resolve;- });- page.on('pageerror', (error) => record.errors.push(error.stack || error.message));- await page.route('**/*', async (route) => {- const req = route.request(),- url = new URL(req.url());- if (url.origin !== origin) {- record.offOrigin.push(url.origin);- return route.abort();- }- if (!url.pathname.startsWith('/api/')) return route.continue();- if (req.method() !== 'GET') {- record.writes.push(url.pathname);- return route.fulfill({- status: 403,- json: { error: 'Read-only fixture refuses operations' },- });- }- record.reads.push(url.pathname);- let data;- if (url.pathname.endsWith('/maintenance-verifications')) {- if (url.pathname.includes('/pending-resource/')) {- if (mode === 'pending') {- await bounded(- new Promise((resolve) => {- releaseRead = resolve;- observeRead();- }),- 'held new-resource read',- );- return route.fulfill({- status: 503,- json: { error: 'Synthetic unavailable reader' },- });- }- if (mode === 'denied')- return route.fulfill({ status: 403, json: { error: 'Synthetic access denial' } });- return route.fulfill({- json: { data: [], meta: { resourceId: 'pending-resource', limit: 25, total: 0 } },- });- }- data = { data: reports, meta: { resourceId: 'pbs-a', limit: 25, total: reports.length } };- } else if (url.pathname.endsWith('/operator-state'))- data = {- configured: true,- state: {- canonicalId: 'pbs-a',- neverAutoRemediate: true,- monitoringMode: 'expected_offline',- lifecycleState: 'retired',- note: 'Keep the saved protection',- setAt: iso(-60_000),- },- };- else if (url.pathname.endsWith('/facets'))- data = { capabilities: [], relationships: [], recentChanges: [], counts: {} };- else if (url.pathname === '/api/ai/intelligence')- data = { resourceId: 'pbs-a', findings: [], investigations: [] };- else if (url.pathname === '/api/audit/actions')- data = { audits: [], count: 0, available: false };- else if (url.pathname === '/api/license/runtime-capabilities')- data = {- capabilities: [],- limits: [],- hosted_mode: false,- runtime: { build: 'community' },- blocked_capabilities: [],- };- else if (url.pathname === '/api/ai/settings') data = { enabled: false };- else if (url.pathname === '/api/security/status')- data = { hasAuthentication: true, requiresAuth: false, sessionCapabilities: {} };- else {- record.unexpected.push(url.pathname);- return route.fulfill({ status: 404, json: { error: 'Unspecified synthetic read' } });- }- return route.fulfill({ json: data });- });- const check = async (label, action) => {- result.phase = name + ': ' + label;- console.log(result.phase);- await action();- record.checks.push(label);- };- const capture = async (label) => {- const file = output + '/' + name + '-' + label + '.png';- await page.screenshot({ path: file, fullPage: true, animations: 'disabled' });- result.captures.push(file.replace('/workspace/', ''));- };- result.phase = name + ': mount full drawer';- await page.goto(origin + '/browser-tests/maintenance-evidence.html');- await page.getByRole('tab', { name: 'Manage', exact: true }).click();- const section = page.getByTestId('maintenance-verification-section');- await section.getByText('Checked 30s ago', { exact: true }).first().waitFor();- await page.getByLabel('Operator note', { exact: true }).fill('Unsaved protected note');- await check(- 'separate recorded check/window/review ages, unknown pending completion and all four verdicts',- async () => {- assert.equal(- await section.getByText('Window ended 1 day ago', { exact: true }).count(),- 4,- );- assert.equal(await section.getByText('Checked unknown', { exact: true }).count(), 1);- assert.equal(- await section.getByText('Reviewed 10s ago by fixture-admin', { exact: true }).count(),- 1,- );- assert.match(await section.innerText(), /Reports record past checks, not current health/);- for (const status of ['healthy', 'pending', 'needs_review', 'failed_verification'])- assert.equal(- await section.getByTestId('maintenance-verification-status-' + status).count(),- 1,- );- },- );- await capture('recorded');- const reads = record.reads.length;- await page.clock.fastForward(60_000);- await check(- 'held events age past a minute without reads/writes, changing verdicts or discarding edits',- async () => {- await section.getByText('Checked 1 min ago', { exact: true }).first().waitFor();- assert.equal(- await section.getByText('Reviewed 1 min ago by fixture-admin', { exact: true }).count(),- 1,- );- assert.equal(- await page.getByLabel('Operator note', { exact: true }).inputValue(),- 'Unsaved protected note',- );- assert.equal(record.reads.length, reads);- assert.equal(record.writes.length, 0);- },- );- await page.clock.fastForward(3_600_000);- await check(- 'an hour-old verdict stays historical with its evidence, review admission and saved restrictions',- async () => {- await section.getByText('Checked 1 hour ago', { exact: true }).first().waitFor();- assert.equal(- await section- .getByText('Reviewed 1 hour ago by fixture-admin', { exact: true })- .count(),- 1,- );- assert.equal(await section.getByTestId('maintenance-verification-review').count(), 3);- assert.equal(- await page- .getByLabel('Never auto-remediate this resource', { exact: true })- .getAttribute('aria-pressed'),- 'true',- );- assert.equal(- await page.getByLabel('Monitoring', { exact: true }).inputValue(),- 'expected_offline',- );- assert.equal(await page.getByLabel('Lifecycle', { exact: true }).inputValue(), 'retired');- assert.equal(record.reads.length, reads);- assert.equal(record.writes.length, 0);- },- );- await capture('hour-old');- await page.evaluate(() => window.__maintenanceEvidence.select('pending-resource'));- // The real drawer deliberately remounts at a different canonical ID and- // starts on Overview. Open Manage as an operator would; do not assume a- // held tab or misattribute that existing protection to this repair.- await page.getByRole('tab', { name: 'Manage', exact: true }).click();- await bounded(readStarted, 'new-resource GET observed');- await check(- 'changing resource immediately withdraws prior reports while its own read waits',- async () => {- await section.getByText('Loading verification reports…', { exact: true }).waitFor();- assert.equal(await section.getByTestId('maintenance-verification-report').count(), 0);- assert.equal(await section.getByText(/No verification reports yet/).count(), 0);- await page.clock.fastForward(60_000);- assert.equal(await section.getByTestId('maintenance-verification-report').count(), 0);- },- );- await capture('other-resource-pending');- releaseRead();- await check(- 'a failed first read is unavailable, not empty history or another resource evidence',- async () => {- await section.getByTestId('maintenance-verification-load-error').waitFor();- assert.equal(await section.getByText(/No verification reports yet/).count(), 0);- assert.equal(await section.getByTestId('maintenance-verification-report').count(), 0);- const before = record.reads.length;- await page.clock.fastForward(60_000);- assert.equal(record.reads.length, before);- },- );- await capture('unavailable');- mode = 'denied';- await section.getByRole('button', { name: 'Retry reports', exact: true }).focus();- await section.getByRole('button', { name: 'Retry reports', exact: true }).press('Enter');- await check(- 'explicit keyboard read retry shows bounded denied guidance without reviving reports',- async () => {- await section- .getByText('Access denied. Check your permissions and license plan.', { exact: true })- .waitFor();- const before = record.reads.length;- await page.clock.fastForward(60_000);- assert.equal(record.reads.length, before);- assert.equal(await section.getByTestId('maintenance-verification-report').count(), 0);- assert.equal(record.writes.length, 0);- },- );- await capture('denied');- mode = 'empty';- await section.getByRole('button', { name: 'Retry reports', exact: true }).click();- await check(- 'only a successful empty read is empty history, with no subsequent clock retry',- async () => {- await section.getByText(/No verification reports yet/).waitFor();- assert.equal(await section.getByTestId('maintenance-verification-load-error').count(), 0);- const before = record.reads.length;- await page.clock.fastForward(60_000);- assert.equal(record.reads.length, before);- assert.equal(await section.getByTestId('maintenance-verification-report').count(), 0);- },- );- await capture('empty');- await check(- 'no page error, unspecified/off-origin request, operation or horizontal overflow',- async () => {- assert.deepEqual(record.errors, []);- assert.deepEqual(record.unexpected, []);- assert.deepEqual(record.offOrigin, []);- assert.deepEqual(record.writes, []);- assert.equal(- await page.evaluate(() => document.documentElement.scrollWidth <= window.innerWidth),- true,- );- },- );- record.completed = true;- await context.close();- record.contextClosed = true;- context = undefined;- await browser.close();- browser = undefined;- }- result.completed = true;- } catch (error) {- result.error = { name: error.name, message: error.message };- throw error;- } finally {- if (context) await context.close();- if (browser) await browser.close();- result.browsersClosed = true;- await server.close();- result.serverClosed = true;- fs.writeFileSync(output + '/result.json', JSON.stringify(result, null, 2) + '\n');- console.log(- JSON.stringify({- completed: result.completed,- phase: result.phase,- checks: result.cases.map((c) => ({- name: c.name,- count: c.checks.length,- errors: c.errors,- })),- captures: result.captures.length,- serverClosed: result.serverClosed,- }),- );- }-})();diff --git a/frontend-modern/browser-tests/maintenance-evidence.html b/frontend-modern/browser-tests/maintenance-evidence.htmldeleted file mode 100644index c1a585a96b..0000000000--- a/frontend-modern/browser-tests/maintenance-evidence.html+++ /dev/null@@ -1,12 +0,0 @@-<!doctype html>-<html lang="en">- <head>- <meta charset="UTF-8" />- <meta name="viewport" content="width=device-width, initial-scale=1.0" />- <title>Recorded maintenance evidence</title>- </head>- <body>- <div id="root"></div>- <script type="module" src="/browser-tests/maintenance-evidence.tsx"></script>- </body>-</html>diff --git a/frontend-modern/browser-tests/maintenance-evidence.tsx b/frontend-modern/browser-tests/maintenance-evidence.tsxdeleted file mode 100644index 3140e1013d..0000000000--- a/frontend-modern/browser-tests/maintenance-evidence.tsx+++ /dev/null@@ -1,51 +0,0 @@-// The full production resource drawer, transport/query, shared clock and CSS.-// Only snapshots and HTTP responses are synthetic. No real operation runs.-import { createSignal } from 'solid-js';-import { render } from 'solid-js/web';-import { ResourceDetailDrawer } from '../src/components/Infrastructure/ResourceDetailDrawer';-import { DarkModeContext, WebSocketContext } from '../src/contexts/appRuntime';-import type { Resource } from '../src/types/resource';-import '../src/index.css';--const [resource, setResource] = createSignal<Resource>({- id: 'pbs-a',- name: 'Recorded backup server',- displayName: 'Recorded backup server',- type: 'pbs',- platformId: 'pbs-a',- platformType: 'proxmox-pbs',- sourceType: 'api',- status: 'online',- cpu: { current: 12 },- lastSeen: Date.parse('2026-10-11T04:00:00Z'),-});-(window as any).__maintenanceEvidence = {- withdraw: () =>- setResource((current) => ({ ...current, id: 'empty-resource', name: 'No reports' })),- select: (id: string) =>- setResource((current) => ({- ...current,- id,- name: 'Different resource',- displayName: 'Different resource',- })),-};--render(- () => (- <WebSocketContext.Provider- value={{ state: { pmg: [] }, activeAlerts: {}, connected: () => true } as any}- >- <DarkModeContext.Provider value={() => document.documentElement.classList.contains('dark')}>- <main class="mx-auto min-h-screen max-w-5xl space-y-3 bg-surface p-3 text-base-content">- <h1 class="text-base font-semibold">Recorded maintenance evidence</h1>- <p class="text-xs text-muted">- Synthetic local responses. No operation reaches a server.- </p>- <ResourceDetailDrawer resource={resource()} />- </main>- </DarkModeContext.Provider>- </WebSocketContext.Provider>- ),- document.getElementById('root')!,-);diff --git a/frontend-modern/browser-tests/metrics-history-help.cjs b/frontend-modern/browser-tests/metrics-history-help.cjsdeleted file mode 100644index d64df3f744..0000000000--- a/frontend-modern/browser-tests/metrics-history-help.cjs+++ /dev/null@@ -1,164 +0,0 @@-// Exercise only existing help: real Docs fetch, renderer, routes and CSS.-// No monitored system, diagnostics, licence change or History collector runs.-const assert = require('node:assert/strict');-const fs = require('node:fs');-const path = require('node:path');-const crypto = require('node:crypto');-const { chromium, webkit } = require('playwright');--const sha256 = (bytes) => crypto.createHash('sha256').update(bytes).digest('hex');-(async () => {- const root = '/workspace/frontend-modern';- const artifacts = path.join(root, 'node_modules', 'metrics-history-help-browser');- const sourceDocs = Object.fromEntries(- ['METRICS_HISTORY', 'TROUBLESHOOTING', 'PULSE_PRO', 'VM_DISK_MONITORING'].map((name) => {- const bytes = fs.readFileSync(path.join(root, `public/docs/${name}.md`));- assert.deepEqual(bytes, fs.readFileSync(`/workspace/docs/${name}.md`));- return [name, { bytes: bytes.length, sha256: sha256(bytes) }];- }),- );- process.chdir(root);- fs.mkdirSync(artifacts, { recursive: true });- 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-metrics-history-help'),- server: { host: '127.0.0.1', port: 5257, strictPort: true },- optimizeDeps: { noDiscovery: true, include: [] },- });- const results = [];- let browser;- try {- await server.listen();- for (const [engine, width, dark] of [['chromium', 1280, false], ['webkit', 390, true]]) {- browser = await { chromium, webkit }[engine].launch(engine === 'chromium'- ? { headless: true, channel: 'chromium', args: ['--no-sandbox'] }- : { headless: true });- const page = await browser.newPage({ viewport: { width, height: 900 },- ...(engine === 'webkit' ? { isMobile: true, hasTouch: true } : {}) });- const errors = [], backendRequests = [], mutations = [], requests = [], captures = [];- await page.addInitScript(() => {- const fetch = window.fetch.bind(window);- window.__historyHelpDocuments = [];- window.fetch = async (...args) => {- const response = await fetch(...args);- const pathname = new URL(response.url).pathname;- if (/^\/docs\/.+\.md$/.test(pathname)) {- const bytes = Array.from(new Uint8Array(await response.clone().arrayBuffer()));- window.__historyHelpDocuments.push({ pathname, status: response.status, bytes });- }- return response;- };- });- page.on('pageerror', (error) => errors.push(error.message));- page.on('console', (message) => {- if (message.type() === 'error') errors.push(message.text());- });- page.on('request', (request) => {- requests.push(new URL(request.url()).pathname);- if (!['GET', 'HEAD'].includes(request.method())) mutations.push(request.method());- });- await page.route('**/api/**', async (route) => {- backendRequests.push(new URL(route.request().url()).pathname);- await route.abort();- });- const navigate = async (route, fragment) => {- await page.evaluate((href) => {- history.pushState({}, '', href);- dispatchEvent(new PopStateEvent('popstate'));- }, route);- await focused(fragment);- };- const focused = async (id) => {- await page.waitForFunction((fragment) => {- const target = document.getElementById(fragment);- const rect = target?.getBoundingClientRect();- return target && document.activeElement === target && rect.top >= 0 && rect.top < innerHeight;- }, id);- };- const activate = async (name, id) => {- const link = page.getByRole('link', { name, exact: true });- await link.focus();- await page.keyboard.press('Enter');- await focused(id);- };- const capture = async (name) => {- assert.ok(await page.evaluate(() => document.documentElement.scrollWidth <= innerWidth + 1));- await page.waitForFunction(() => document.getAnimations().length === 0);- const filename = `${engine}-${name}.png`;- const filepath = path.join(artifacts, filename);- await page.screenshot({ path: filepath });- captures.push({ filename, bytes: fs.statSync(filepath).size, sha256: sha256(fs.readFileSync(filepath)) });- };- await page.goto('http://127.0.0.1:5257/browser-tests/docs-fragment-navigation.html', {- waitUntil: 'domcontentloaded', timeout: 60000,- });- if (dark) await page.evaluate(() => document.documentElement.classList.add('dark'));- await navigate('/docs/TROUBLESHOOTING#guest-memory-is-high-but-available-memory-is-plentiful',- 'guest-memory-is-high-but-available-memory-is-plentiful');- assert.ok((await page.locator('article').innerText()).includes("today's live source does not date a past reading"));- await capture('entry');- await activate('History panel interpretation', 'read-a-history-panel');- const section = await page.evaluate(() => {- const nodes = [];- for (let node = document.getElementById('read-a-history-panel').nextElementSibling;- node && node.tagName !== 'H2'; node = node.nextElementSibling) nodes.push(node.textContent);- return nodes.join(' ').replace(/\s+/g, ' ');- });- for (const phrase of [- 'Latest stored', 'Single observation. No trend yet.', 'Missing is not measured zero',- 'CPU 22% at 12:02 and memory 95% at 12:01 are not one observation',- 'arrow keys, Home or End, or move it by touch',- "Today's source cannot identify the source of a past warning",- 'do not run Diagnostics or guest-agent probes', 'do not share raw responses, credentials',- ]) assert.ok(section.includes(phrase), `${engine}: ${phrase}`);- await capture('observations');- await page.getByText('For example, CPU', { exact: false }).scrollIntoViewIfNeeded();- await capture('comparison');- await navigate('/docs/METRICS_HISTORY#retention-and-accessible-range', 'retention-and-accessible-range');- const rendered = await page.locator('article').innerText();- for (const phrase of [- 'Community supports up to 7 days', 'Relay is no longer sold',- '14-day compatibility limit', 'not a plan to buy', '402 Payment Required',- 'do not buy another licence, reset history or reinstall',- ]) assert.ok(rendered.replace(/\s+/g, ' ').includes(phrase), `${engine}: ${phrase}`);- assert.ok(!rendered.includes('Relay unlocks'));- await capture('range');- await activate('plans and legacy subscriptions', 'self-hosted-commercial-model');- assert.ok((await page.locator('article').innerText()).includes('not the entitlement for continuing Relay subscribers'));- await navigate('/docs/METRICS_HISTORY#read-a-history-panel', 'read-a-history-panel');- await activate('Backup safety', 'backup-safety');- assert.ok((await page.locator('article').innerText()).includes('every filesystem covered by the backup'));- const documents = await page.evaluate(() => window.__historyHelpDocuments);- const consumed = documents.filter((doc) => sourceDocs[doc.pathname.split('/').at(-1).replace('.md', '')])- .map((doc) => ({ pathname: doc.pathname, status: doc.status,- bytes: doc.bytes.length, sha256: sha256(Buffer.from(doc.bytes)) }));- for (const [name, identity] of Object.entries(sourceDocs)) {- const responses = consumed.filter((doc) => doc.pathname === `/docs/${name}.md`);- assert.ok(responses.length >= 1, `${engine}: missing ${name} consumer`);- for (const response of responses) {- assert.equal(response.status, 200);- assert.equal(response.bytes, identity.bytes);- assert.equal(response.sha256, identity.sha256);- }- }- assert.deepEqual(backendRequests, []);- assert.deepEqual(mutations, []);- assert.deepEqual(errors, []);- results.push({ engine, browserVersion: browser.version(), width, dark, consumed, captures,- memoryEntryKeyboardNavigation: true, plansKeyboardNavigation: true, safetyKeyboardNavigation: true,- directRangeFragmentFocus: true, noHorizontalPageOverflow: true, backendRequests, mutations, errors,- requestedSourcePaths: [...new Set(requests.filter((url) => url.startsWith('/src/')))].sort() });- await browser.close();- browser = undefined;- }- } finally {- if (browser) await browser.close();- await server.close();- }- const result = { result: 'passed', playwright: require('playwright/package.json').version,- sourceDocs, results, browserAndServerClosed: true,- scope: 'Production Docs consumer and exact shipped help bytes; no native guest, collector, licence migration, full application or release acceptance.' };- fs.writeFileSync(path.join(artifacts, 'result.json'), JSON.stringify(result, null, 2) + '\n');- console.log(JSON.stringify(result));-})().catch((error) => { console.error(error); process.exitCode = 1; });diff --git a/frontend-modern/browser-tests/navigation-help.cjs b/frontend-modern/browser-tests/navigation-help.cjsdeleted file mode 100644index 8acc827772..0000000000--- a/frontend-modern/browser-tests/navigation-help.cjs+++ /dev/null@@ -1,123 +0,0 @@-// Production Docs/router/styles with the actual shipped Markdown; no backend.-const assert = require('node:assert/strict');-const fs = require('node:fs');-const path = require('node:path');-const { chromium, webkit } = require('playwright');--(async () => {- const root = '/workspace/frontend-modern';- process.chdir(root);- const artifacts = path.join(root, 'node_modules', 'navigation-help-browser');- fs.mkdirSync(artifacts, { recursive: true });- 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-navigation-help'),- server: { host: '127.0.0.1', port: 5247, strictPort: true },- optimizeDeps: { noDiscovery: true, include: [] },- });- const results = [];- let browser;- try {- await server.listen();- for (const [engine, width, tone] of [['chromium', 1280, 'light'], ['webkit', 390, 'dark']]) {- browser = await { chromium, webkit }[engine].launch(- engine === 'chromium'- ? { headless: true, channel: 'chromium', args: ['--no-sandbox'] }- : { headless: true },- );- const page = await browser.newPage({- viewport: { width, height: 900 },- ...(engine === 'webkit' ? { isMobile: true, hasTouch: true } : {}),- });- const errors = [];- page.on('pageerror', (e) => errors.push(e.message));- page.on('console', (m) => { if (m.type() === 'error') errors.push(m.text()); });- await page.goto('http://127.0.0.1:5247/browser-tests/docs-fragment-navigation.html?scenario=troubleshooting',- { waitUntil: 'domcontentloaded', timeout: 60_000 });- await page.getByRole('heading', { name: "Old bookmarks don't work", exact: true }).waitFor();- if (tone === 'dark') await page.evaluate(() => document.documentElement.classList.add('dark'));- const routes = page.locator('article table').filter({ hasText: '/standalone/machines' });- assert.equal(await routes.count(), 1);- const entryRoutes = await routes.locator('tbody tr').evaluateAll((rows) =>- rows.map((row) => Array.from(row.cells, (cell) => cell.textContent.trim())),- );- assert.deepEqual(entryRoutes, [- ['Proxmox', '/proxmox/overview'], ['Docker', '/docker/overview'],- ['Kubernetes', '/kubernetes/overview'], ['TrueNAS', '/truenas/overview'],- ['vSphere', '/vmware/overview'], ['Machines', '/standalone/machines'],- ]);- const article = await page.locator('article').innerText();- assert.ok(article.includes('are supported; do not replace them with the retired task-based routes.'));- assert.ok(article.includes('Do not delete connections or re-enrol agents'));- await routes.scrollIntoViewIfNeeded();- assert.ok(await page.evaluate(() => document.documentElement.scrollWidth <= window.innerWidth + 1));- await page.screenshot({ path: path.join(artifacts, `${engine}-routes.png`) });-- await page.getByRole('link', { name: 'FAQ', exact: true }).click();- const faq = page.getByRole('heading', { name: 'How is navigation organised in Pulse v6?', exact: true });- await faq.waitFor();- await page.waitForFunction(() => {- const heading = document.getElementById('how-is-navigation-organised-in-pulse-v6');- return heading && heading.getBoundingClientRect().top >= 0 && heading.getBoundingClientRect().top < innerHeight;- });- assert.ok(page.url().endsWith('/docs/FAQ#how-is-navigation-organised-in-pulse-v6'));-- await page.getByRole('link', { name: '← All documentation' }).click();- await page.getByRole('link', { name: 'TrueNAS SCALE and CORE', exact: true }).click();- const inventory = page.locator('article table').filter({ hasText: 'Pulse page / tab' });- await inventory.waitFor();- const destinations = await inventory.locator('tbody tr td:nth-child(2)').allTextContents();- assert.deepEqual(destinations, ['TrueNAS → Overview', 'TrueNAS → VMs', 'TrueNAS → Apps',- 'TrueNAS → Storage', 'TrueNAS → Storage', 'TrueNAS → Storage',- 'TrueNAS → Protection', 'TrueNAS → Protection', 'Alerts']);- const mapping = await page.locator('article').innerText();- for (const route of ['/truenas/overview', '/truenas/vms', '/truenas/apps', '/truenas/storage', '/truenas/protection'])- assert.ok(mapping.includes(route));- await inventory.scrollIntoViewIfNeeded();- const geometry = await inventory.evaluate((table) => ({- localScroll: table.parentElement.dataset.docTableScroll !== undefined,- viewport: innerWidth,- outer: document.documentElement.scrollWidth,- table: table.parentElement.scrollWidth,- wrapper: table.parentElement.clientWidth,- }));- assert.ok(geometry.localScroll);- assert.ok(geometry.outer <= geometry.viewport + 1);- if (width === 390 && geometry.table > geometry.wrapper + 1) {- const movement = await inventory.evaluate((table) => {- table.parentElement.scrollLeft = 180;- return table.parentElement.scrollLeft;- });- assert.ok(movement > 0, 'wide tables must remain locally scrollable');- } else {- assert.ok(geometry.table <= geometry.wrapper + 1, 'wrapped table must fit its container');- }- await page.screenshot({ path: path.join(artifacts, `${engine}-truenas.png`) });-- await page.getByRole('link', { name: '← All documentation' }).click();- await page.getByRole('link', { name: 'Proxmox Backup Server', exact: true }).click();- const pbs = page.getByRole('heading', { name: 'Data Source Indicator', exact: true });- await pbs.waitFor();- const pbsText = await page.locator('article').innerText();- assert.ok(pbsText.includes('Proxmox → Backups (/proxmox/backups)'));- assert.ok(pbsText.includes('There is no current top-level Recovery page'));- await pbs.scrollIntoViewIfNeeded();- assert.ok(await page.evaluate(() => document.documentElement.scrollWidth <= innerWidth + 1));- await page.screenshot({ path: path.join(artifacts, `${engine}-pbs.png`) });- assert.deepEqual(errors, []);- results.push({ engine, version: browser.version(), width, tone, routes: 6, destinations,- geometry, faqFragment: true, pbsPlacement: true, errors });- await browser.close();- browser = undefined;- }- const result = { result: 'passed', playwright: require('playwright/package.json').version,- scope: 'shipped help rendering and navigation, not appliance collection', results };- fs.writeFileSync(path.join(artifacts, 'result.json'), JSON.stringify(result, null, 2) + '\n');- console.log(JSON.stringify(result));- } finally {- if (browser) await browser.close();- await server.close();- }-})().catch((error) => { console.error(error); process.exitCode = 1; });diff --git a/frontend-modern/browser-tests/password-recovery-help.cjs b/frontend-modern/browser-tests/password-recovery-help.cjsdeleted file mode 100644index e92a6d7130..0000000000--- a/frontend-modern/browser-tests/password-recovery-help.cjs+++ /dev/null@@ -1,91 +0,0 @@-// Render actual shipped help through the production Docs/router/Markdown/CSS.-// No API, Docker, systemd or real credential is used here.-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');--(async () => {- const root = path.resolve('frontend-modern');- const artifacts = path.join(root, 'node_modules', 'password-recovery-browser');- fs.mkdirSync(artifacts, { recursive: true });- 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-password-recovery'),- server: { host: '127.0.0.1', port: 5252, strictPort: true },- optimizeDeps: { noDiscovery: true, include: [] },- });- const results = [];- let browser;- try {- await server.listen();- for (const [engine, width, tone] of [['chromium', 1280, 'light'], ['webkit', 390, 'dark']]) {- browser = await { chromium, webkit }[engine].launch(engine === 'chromium'- ? { headless: true, channel: 'chromium', args: ['--no-sandbox'] }- : { headless: true });- const page = await browser.newPage({ viewport: { width, height: 1000 },- ...(engine === 'webkit' ? { isMobile: true, hasTouch: true } : {}) });- const errors = [];- page.on('pageerror', (error) => errors.push(error.message));- page.on('console', (message) => { if (message.type() === 'error') errors.push(message.text()); });- await page.goto('http://127.0.0.1:5252/browser-tests/docs-fragment-navigation.html',- { waitUntil: 'domcontentloaded', timeout: 60_000 });- if (tone === 'dark') await page.evaluate(() => document.documentElement.classList.add('dark'));- for (const guide of ['DOCKER', 'FAQ']) {- await page.getByRole('link', { name: '← All documentation' }).click();- const entry = page.locator(`a[data-doc-link][href="/docs/${guide}"]`).first();- await entry.focus();- await page.keyboard.press('Enter');- const link = page.getByRole('link', { name: 'password recovery guide', exact: true });- await link.waitFor();- await link.focus();- await page.keyboard.press('Enter');- await page.waitForFunction(() => {- const h = document.getElementById('i-forgot-my-password');- return h && h.getBoundingClientRect().top >= 0 && h.getBoundingClientRect().top < innerHeight;- });- assert.ok(page.url().endsWith('/docs/TROUBLESHOOTING#i-forgot-my-password'));- const text = await page.locator('article').innerText();- for (const phrase of ['Do not delete .env', 'setup replaces the primary API token',- 'pulse.service.d/override.conf', 'not just docker restart',- 'existing sessions and API tokens need separate review', 'If it still fails, stop'])- assert.ok(text.includes(phrase), phrase);- assert.ok(!text.includes('rm /data/.env') && !text.includes('rm /etc/pulse/.env'));- assert.ok(await page.evaluate(() => document.documentElement.scrollWidth <= innerWidth + 1));- await page.screenshot({ path: path.join(artifacts, `${engine}-${guide.toLowerCase()}-recovery.png`) });- }- const code = page.locator('pre').filter({ hasText: 'htpasswd -nB -C 12' });- await code.scrollIntoViewIfNeeded();- assert.ok((await code.innerText()).includes('> "$recovery_dir/password-record"'));- await page.screenshot({ path: path.join(artifacts, `${engine}-private-hash.png`) });- const auth = page.getByRole('link', { name: 'authentication guide', exact: true });- await auth.focus();- await page.keyboard.press('Enter');- await page.waitForFunction(() => {- const h = document.getElementById('private-docker-authentication-file');- return h && h.getBoundingClientRect().top >= 0 && h.getBoundingClientRect().top < innerHeight;- });- assert.ok(page.url().endsWith('/docs/CONFIGURATION#private-docker-authentication-file'));- assert.deepEqual(errors, []);- results.push({ engine, browserVersion: browser.version(), width, tone,- keyboardDockerAndFAQLinks: true, fragmentInView: true, sourcePrecedenceWarning: true,- privateHashRecipeRendered: true, configurationLink: true, noBodyOverflow: true, errors });- await browser.close();- browser = undefined;- }- const docs = Object.fromEntries(['DOCKER', 'FAQ', 'TROUBLESHOOTING'].map((guide) => [- `frontend-modern/public/docs/${guide}.md`,- createHash('sha256').update(fs.readFileSync(path.join(root, 'public/docs', `${guide}.md`))).digest('hex'),- ]));- const result = { result: 'passed', playwrightVersion: require('playwright/package.json').version,- scope: 'rendered recovery guidance/links; not native deployment/password/session recovery', docs, results };- fs.writeFileSync(path.join(artifacts, 'result.json'), JSON.stringify(result, null, 2) + '\n');- console.log(JSON.stringify(result));- } finally {- if (browser) await browser.close();- await server.close();- }-})().catch((error) => { console.error(error); process.exitCode = 1; });diff --git a/frontend-modern/browser-tests/patrol-off-attention-2257.cjs b/frontend-modern/browser-tests/patrol-off-attention-2257.cjsdeleted file mode 100644index 360e79bea2..0000000000--- a/frontend-modern/browser-tests/patrol-off-attention-2257.cjs+++ /dev/null@@ -1,111 +0,0 @@-// #2257: the real Patrol page must retain its setup task and independent-// attention inbox when Patrol is off. Only API responses are synthetic.-const assert = require('node:assert/strict');-const path = require('node:path');-const { chromium } = require('playwright');--(async () => {- const root = '/workspace/frontend-modern';- 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'),- server: { host: '127.0.0.1', port: 5207, strictPort: true },- });- let browser;- try {- await server.listen();- browser = await chromium.launch({ headless: true, channel: 'chromium', args: ['--no-sandbox'] });- const seen = [];- const item = {- id: 'record-1', operationalRecordId: 'record-1', subjectResourceId: 'pve:vm:101',- subjectResourceName: 'Database VM', subjectResourceType: 'vm', kind: 'disk',- title: 'Disk pressure on Database VM',- plainLanguageSummary: 'The database disk is nearly full.', severity: 'critical',- state: 'open', firstObservedAt: '2026-09-26T18:00:00Z',- lastObservedAt: '2026-09-26T18:00:00Z', evidenceFreshness: 'fresh',- evidenceCompleteness: 'complete', impact: 'Writes may fail.',- relatedResources: [], recommendedNextStep: 'Free disk space or expand the volume.',- availableActions: [], verificationState: 'not_available',- };- const summary = { activeCount: 1, openCount: 1, acknowledgedCount: 0,- suppressedCount: 0, uncertainCount: 0, resolvedCount: 0,- calm: false, coverageState: 'current', evaluatedAt: '2026-09-26T18:00:00Z' };- for (const width of [1440, 390]) {- const pageErrors = [];- const page = await browser.newPage({ viewport: { width, height: width === 390 ? 844 : 900 } });- page.on('pageerror', (error) => pageErrors.push(error.message));- await page.routeWebSocket(/\/ws(?:\?|$)/, () => {});- await page.route('**/*', (route) => {- const url = new URL(route.request().url());- if (url.origin !== 'http://127.0.0.1:5207') return route.abort();- const p = url.pathname;- if (!p.startsWith('/api/')) return route.continue();- seen.push(p);- let json = {};- if (p === '/api/settings/ai') json = { patrol_enabled: false,- patrol_readiness: { status: 'not_ready', ready: false,- summary: 'The selected Patrol model cannot run tools.', cause: 'model_tool_check' } };- else if (p === '/api/ai/patrol/status') json = { enabled: false,- runtime_state: 'disabled', running: false, readiness: { status: 'not_ready', ready: false,- summary: 'The selected Patrol model cannot run tools.', cause: 'model_tool_check' },- summary: { active: 0, critical: 0, warning: 0, info: 0 } };- else if (p === '/api/ai/patrol/attention') json = { data: [item], summary,- meta: { page: 1, limit: 50, total: 1, totalPages: 1 } };- else if (p === '/api/ai/patrol/attention/summary') json = summary;- else if (p === '/api/ai/patrol/attention/record-1') json = {- item, operationalRecord: { id: item.id, kind: item.kind, state: item.state,- severity: item.severity, title: item.title, subjectResourceId: item.subjectResourceId,- subjectResourceName: item.subjectResourceName, createdAt: item.firstObservedAt,- updatedAt: item.lastObservedAt }, timeline: [], evidence: [] };- else if (p === '/api/ai/patrol/autonomy') json = {- autonomy_level: 'monitor', full_mode_unlocked: false };- else if (p === '/api/ai/patrol/findings' || p === '/api/ai/patrol/runs') json = [];- else if (p === '/api/ai/unified/findings') json = { findings: [] };- else if (p === '/api/ai/approvals') json = { approvals: [] };- else if (p === '/api/ai/models') json = { models: [] };- else if (p === '/api/license/runtime-capabilities') json = { capabilities: ['ai_patrol'],- limits: [], hosted_mode: false, max_history_days: 7,- runtime: { build: 'community', label: 'Pulse Community runtime' }, blocked_capabilities: [] };- return route.fulfill({ json });- });- await page.goto('http://127.0.0.1:5207/browser-tests/patrol-off-attention-2257.html', {- waitUntil: 'domcontentloaded', timeout: 120_000,- });- await page.getByRole('heading', { name: 'Patrol needs setup' }).waitFor();- await page.getByRole('region', { name: 'Patrol decision inbox' }).waitFor();- await page.getByText('Database VM · Disk pressure').waitFor();- assert.equal(await page.getByRole('button', { name: 'Toggle Patrol' }).getAttribute('aria-pressed'), 'false');- await page.waitForTimeout(350);- await page.screenshot({ path: path.join(root, 'browser-tests', `patrol-off-attention-2257-list-${width}.png`),- fullPage: true });- await page.getByRole('button', { name: 'Start review' }).click();- await page.getByRole('heading', { name: 'Database VM · Disk pressure' }).waitFor();- await page.getByText('Writes may fail.').waitFor();- await page.screenshot({ path: path.join(root, 'browser-tests', `patrol-off-attention-2257-${width}.png`),- fullPage: true });- const dimensions = await page.evaluate(() => ({ scroll: document.documentElement.scrollWidth,- inner: window.innerWidth }));- assert.ok(dimensions.scroll <= dimensions.inner + 1,- `${width}px horizontal overflow: ${JSON.stringify(dimensions)}`);- assert.deepEqual(pageErrors, [], `browser errors at ${width}px`);- await page.getByRole('button', {- name: width === 390 ? 'Back to attention list' : 'Close attention detail',- }).click();- await page.getByRole('button', { name: 'Start review' }).waitFor();- await page.goto('http://127.0.0.1:5207/browser-tests/patrol-off-attention-2257.html', {- waitUntil: 'domcontentloaded',- });- await page.getByRole('heading', { name: 'Patrol needs setup' }).waitFor();- await page.getByText('Database VM · Disk pressure').waitFor();- await page.close();- }- assert.ok(seen.includes('/api/ai/patrol/status'));- assert.ok(seen.includes('/api/ai/patrol/attention'));- console.log(JSON.stringify({ result: 'passed', browser: browser.version(), viewports: [1440, 390] }));- } finally {- if (browser) await browser.close();- await server.close();- }-})().catch((error) => { console.error(error); process.exitCode = 1; });diff --git a/frontend-modern/browser-tests/patrol-off-attention-2257.html b/frontend-modern/browser-tests/patrol-off-attention-2257.htmldeleted file mode 100644index b4d3b34b51..0000000000--- a/frontend-modern/browser-tests/patrol-off-attention-2257.html+++ /dev/null@@ -1,8 +0,0 @@-<!doctype html>-<html lang="en">- <head><meta charset="UTF-8" /><meta name="viewport" content="width=device-width, initial-scale=1" /></head>- <body>- <div id="root"></div>- <script type="module" src="/browser-tests/patrol-off-attention-2257.tsx"></script>- </body>-</html>diff --git a/frontend-modern/browser-tests/patrol-off-attention-2257.tsx b/frontend-modern/browser-tests/patrol-off-attention-2257.tsxdeleted file mode 100644index dd1bd006e4..0000000000--- a/frontend-modern/browser-tests/patrol-off-attention-2257.tsx+++ /dev/null@@ -1,16 +0,0 @@-// Mount the production Patrol surface under a local Router; the browser script-// supplies bounded API responses for the off/setup and attention states.-import { Route, Router } from '@solidjs/router';-import { render } from 'solid-js/web';-import { PatrolIntelligenceSurface } from '../src/features/patrol/PatrolIntelligenceSurface';-import '../src/index.css';--render(() => (- <Router>- <Route path="*" component={() => (- <main class="mx-auto max-w-6xl p-4">- <PatrolIntelligenceSurface />- </main>- )} />- </Router>-), document.getElementById('root')!);diff --git a/frontend-modern/browser-tests/patrol-rule-help.cjs b/frontend-modern/browser-tests/patrol-rule-help.cjsdeleted file mode 100644index 1f5ff4f0fe..0000000000--- a/frontend-modern/browser-tests/patrol-rule-help.cjs+++ /dev/null@@ -1,154 +0,0 @@-// Run from the Pulse workspace root with pulse-worker-browser.-// This exercises the documented snippet against a synthetic same-origin API,-// not a deployed Pulse installation or the still-missing rule-management UI.-const assert = require('node:assert/strict');-const crypto = require('node:crypto');-const fs = require('node:fs');-const http = require('node:http');-const path = require('node:path');-const { chromium, webkit } = require('playwright');--const guide = fs.readFileSync('docs/AI.md', 'utf8');-const section = guide.split('#### Remove a rule created by mistake\n')[1];-const snippet = section.match(/```javascript\n([\s\S]*?)\n```/)[1];-const output = 'frontend-modern/test-results/patrol-rule-help';-fs.mkdirSync(output, { recursive: true });-const escape = (text) => text.replaceAll('&', '&').replaceAll('<', '<');-const selected = { id: 'rule-one', created_from: 'manual', resource_name: 'Test VM',- resource_id: 'vm-1', category: 'backup', description: 'Created by mistake' };-const other = { ...selected, id: 'rule-two', resource_id: 'vm-2', resource_name: 'Other VM' };-let scenario;-const server = http.createServer((request, response) => {- if (request.url === '/') {- response.setHeader('Content-Type', 'text/html; charset=utf-8');- response.setHeader('Set-Cookie', [- 'pulse_session=synthetic-session; Path=/; HttpOnly; SameSite=Lax',- 'pulse_org_id=org-a; Path=/; SameSite=Lax',- ...(scenario.noCSRF ? [] : ['pulse_csrf=synthetic-csrf; Path=/; SameSite=Lax']),- ]);- response.end(`<h1>Rule removal help — synthetic browser check</h1>- <p>Cancel keeps both rules. A confirmed removal targets one exact ID.</p>- <p id="result">No removal confirmed</p>- <pre style="white-space:pre-wrap;max-width:1000px">${escape(snippet)}</pre>`);- return;- }- if (!request.url.startsWith('/api/ai/patrol/suppressions')) {- response.writeHead(404).end();- return;- }- const hasSession = (request.headers.cookie || '').includes('pulse_session=synthetic-session');- const expectedOrg = request.headers['x-pulse-org-id'] === 'org-a';- const validCSRF = request.headers['x-csrf-token'] === 'synthetic-csrf';- scenario.requests.push({ method: request.method, path: request.url,- hasSession, expectedOrg, validCSRF });- response.setHeader('Content-Type', 'application/json');- if (!hasSession || !expectedOrg) {- response.writeHead(403).end('{}');- return;- }- if (request.method === 'DELETE') {- assert.equal(request.url, '/api/ai/patrol/suppressions/rule-one');- if (!validCSRF || scenario.rejectDelete) {- response.writeHead(403).end('{}');- return;- }- scenario.removed = true;- response.end('{"success":true}');- return;- }- assert.equal(request.method, 'GET');- assert.equal(request.url, '/api/ai/patrol/suppressions');- if (scenario.removed && scenario.readbackFailure) {- response.writeHead(503).end('{}');- return;- }- response.end(JSON.stringify(scenario.removed ? [other] : [selected, other]));-});--(async () => {- let browser;- const receipts = [];- try {- await new Promise((resolve) => server.listen(0, '127.0.0.1', resolve));- const url = `http://127.0.0.1:${server.address().port}/`;- for (const [engineName, engine] of [['chromium', chromium], ['webkit', webkit]]) {- browser = await engine.launch(engineName === 'chromium'- ? { headless: true, channel: 'chromium', args: ['--no-sandbox'] }- : { headless: true });- const cases = engineName === 'chromium'- ? ['prompt-cancel', 'confirm-cancel', 'success', 'missing-csrf', 'changed-org',- 'delete-rejected', 'readback-failed']- : ['prompt-cancel', 'success'];- for (const name of cases) {- scenario = { name, requests: [], removed: false,- noCSRF: name === 'missing-csrf', rejectDelete: name === 'delete-rejected',- readbackFailure: name === 'readback-failed' };- const context = await browser.newContext({ viewport: { width: 1280, height: 900 } });- const page = await context.newPage();- const messages = [];- const dialogs = [];- page.on('console', (message) => {- if (['info', 'error'].includes(message.type())) {- messages.push({ kind: message.type(), message: message.text() });- }- });- page.on('dialog', async (dialog) => {- dialogs.push({ type: dialog.type(), message: dialog.message() });- if (dialog.type() === 'prompt') {- if (name === 'changed-org') {- await context.addCookies([{ name: 'pulse_org_id', value: 'org-b', url }]);- }- if (name === 'prompt-cancel') await dialog.dismiss();- else await dialog.accept('rule-one');- } else {- if (name === 'confirm-cancel') await dialog.dismiss();- else await dialog.accept();- }- });- await page.goto(url);- await page.evaluate((code) => window.eval(code), snippet);- const deletes = scenario.requests.filter((request) => request.method === 'DELETE');- const success = messages.some((message) => message.kind === 'info');- if (name === 'success') {- assert.equal(deletes.length, 1);- assert.ok(deletes[0].validCSRF);- assert.equal(scenario.requests.length, 3);- assert.ok(scenario.removed);- assert.ok(success);- } else {- assert.equal(success, false);- if (['delete-rejected', 'readback-failed'].includes(name)) {- assert.equal(deletes.length, 1);- } else {- assert.equal(deletes.length, 0);- }- }- assert.ok(scenario.requests.every((request) => request.hasSession && request.expectedOrg));- assert.ok(messages.every((message) => !message.message.includes('synthetic-csrf')));- assert.ok(dialogs.every((dialog) => !dialog.message.includes('synthetic-csrf')));- await page.locator('#result').evaluate((element, text) => { element.textContent = text; },- success ? 'Selected rule absent after readback; other rule retained' : `${name}: no removal confirmed`);- let screenshot;- if (['success', 'confirm-cancel', 'delete-rejected'].includes(name)) {- screenshot = path.join(output, `${engineName}-${name}.png`);- await page.screenshot({ path: screenshot, fullPage: true });- }- receipts.push({ engine: engineName, browserVersion: browser.version(), name,- requests: scenario.requests, messages, dialogs, removed: scenario.removed, screenshot });- await context.close();- }- await browser.close();- browser = null;- }- const result = { guideSHA256: crypto.createHash('sha256').update(guide).digest('hex'),- playwrightVersion: require('playwright/package.json').version,- evidenceKind: 'synthetic same-origin browser/API workaround; no installed Pulse or rule-management UI',- scenarios: receipts };- fs.writeFileSync(path.join(output, 'result.json'), JSON.stringify(result, null, 2) + '\n');- console.log(JSON.stringify({ passed: receipts.length, guideSHA256: result.guideSHA256,- playwrightVersion: result.playwrightVersion, result: path.join(output, 'result.json') }));- } finally {- if (browser) await browser.close();- await new Promise((resolve) => server.close(resolve));- }-})().catch((error) => { console.error(error); process.exitCode = 1; });diff --git a/frontend-modern/browser-tests/patrol-rule-removal-compatibility.cjs b/frontend-modern/browser-tests/patrol-rule-removal-compatibility.cjsdeleted file mode 100644index 18e8f2254c..0000000000--- a/frontend-modern/browser-tests/patrol-rule-removal-compatibility.cjs+++ /dev/null@@ -1,29 +0,0 @@-// Final shared-client content: native abort compatibility and production-// one-attempt reversal controls in desktop Chromium and narrow WebKit.-const assert = require('node:assert/strict');-const fs = require('node:fs');-const path = require('node:path');-const { journey, report, output } = require('/workspace/frontend-modern/browser-tests/patrol-rule-removal.cjs');-(async () => {- try {- await journey('/workspace/frontend-modern', 'chromium', 1365, false, true, false, true);- await journey('/workspace/frontend-modern', 'webkit', 320, false, true, false, true);- assert.equal(report.cases.length, 2);- assert(report.cases.every((c) => c.abortCompatibility && c.checks.length === 5));- report.result = 'passed';- } catch (error) {- report.result = 'failed';- report.failure = error.message;- throw error;- } finally {- report.cleanup = {- all_cases_closed: report.cases.every((c) => c.cleanup.browser_closed && c.cleanup.server_closed),- };- fs.writeFileSync(path.join(output, 'compatibility-result.json'), JSON.stringify(report, null, 2));- }- console.log(JSON.stringify({ result: report.result, cases: report.cases.length,- captures: report.captures.length, cleanup: report.cleanup }));-})().catch((error) => {- console.error(error.stack);- process.exitCode = 1;-});diff --git a/frontend-modern/browser-tests/patrol-rule-removal-long-final.cjs b/frontend-modern/browser-tests/patrol-rule-removal-long-final.cjsdeleted file mode 100644index 8f4d80baf3..0000000000--- a/frontend-modern/browser-tests/patrol-rule-removal-long-final.cjs+++ /dev/null@@ -1,38 +0,0 @@-// Complete the previously unmeasured scroll controls only. Mobile WebKit admits-// keyboard scrolling, not mouse wheel; desktop Chromium admits pointer wheel.-const fs = require('node:fs');-const path = require('node:path');-const {- journey,- report,- output,-} = require('/workspace/frontend-modern/browser-tests/patrol-rule-removal.cjs');-(async () => {- try {- await journey('/workspace/frontend-modern', 'webkit', 320, false, true, 'long');- await journey('/workspace/frontend-modern', 'chromium', 1365, false, true, 'long');- report.result = 'passed';- } catch (error) {- report.result = 'failed';- report.failure = error.message;- throw error;- } finally {- report.cleanup = {- all_cases_closed: report.cases.every(- (c) => c.cleanup.browser_closed && c.cleanup.server_closed,- ),- };- fs.writeFileSync(path.join(output, 'long-final-result.json'), JSON.stringify(report, null, 2));- }- console.log(- JSON.stringify({- result: report.result,- cases: report.cases.length,- captures: report.captures.length,- cleanup: report.cleanup,- }),- );-})().catch((error) => {- console.error(error.stack);- process.exitCode = 1;-});diff --git a/frontend-modern/browser-tests/patrol-rule-removal-long-reason.cjs b/frontend-modern/browser-tests/patrol-rule-removal-long-reason.cjsdeleted file mode 100644index 83c5835014..0000000000--- a/frontend-modern/browser-tests/patrol-rule-removal-long-reason.cjs+++ /dev/null@@ -1,29 +0,0 @@-// Measure a long existing reason without creating or deleting any rule.-const fs = require('node:fs');-const path = require('node:path');-const {- journey,- report,- output,-} = require('/workspace/frontend-modern/browser-tests/patrol-rule-removal.cjs');-(async () => {- try {- await journey('/workspace/frontend-modern', 'webkit', 320, false, true, 'long');- report.result = 'passed';- } catch (error) {- report.result = 'failed';- report.failure = error.message;- throw error;- } finally {- report.cleanup = {- all_cases_closed: report.cases.every(- (c) => c.cleanup.browser_closed && c.cleanup.server_closed,- ),- };- fs.writeFileSync(path.join(output, 'long-result.json'), JSON.stringify(report, null, 2));- }- console.log(JSON.stringify({ result: report.result, cleanup: report.cleanup }));-})().catch((error) => {- console.error(error.stack);- process.exitCode = 1;-});diff --git a/frontend-modern/browser-tests/patrol-rule-removal-visual.cjs b/frontend-modern/browser-tests/patrol-rule-removal-visual.cjsdeleted file mode 100644index bda867d1cb..0000000000--- a/frontend-modern/browser-tests/patrol-rule-removal-visual.cjs+++ /dev/null@@ -1,37 +0,0 @@-// Complete viewport-only visual inspection without replaying successful mutations.-const fs = require('node:fs');-const path = require('node:path');-const {- journey,- report,- output,-} = require('/workspace/frontend-modern/browser-tests/patrol-rule-removal.cjs');-(async () => {- try {- await journey('/workspace/frontend-modern', 'chromium', 1365, false, true, true);- await journey('/workspace/frontend-modern', 'webkit', 320, false, true, true);- report.result = 'passed';- } catch (error) {- report.result = 'failed';- report.failure = error.message;- throw error;- } finally {- report.cleanup = {- all_cases_closed: report.cases.every(- (c) => c.cleanup.browser_closed && c.cleanup.server_closed,- ),- };- fs.writeFileSync(path.join(output, 'result.json'), JSON.stringify(report, null, 2));- }- console.log(- JSON.stringify({- result: report.result,- cases: report.cases.length,- captures: report.captures.length,- cleanup: report.cleanup,- }),- );-})().catch((error) => {- console.error(error.stack);- process.exitCode = 1;-});diff --git a/frontend-modern/browser-tests/pbs-history-source-isolation.cjs b/frontend-modern/browser-tests/pbs-history-source-isolation.cjsdeleted file mode 100644index 65a864f1b5..0000000000--- a/frontend-modern/browser-tests/pbs-history-source-isolation.cjs+++ /dev/null@@ -1,237 +0,0 @@-// Mock-backed proof of the production PBS table/drawer, not installed acceptance.-const assert = require('node:assert/strict');-const fs = require('node:fs');-const path = require('node:path');-const { createHash } = require('node:crypto');-const { chromium } = require('playwright');--(async () => {- const root = '/workspace/frontend-modern';- process.chdir(root);- const phaseFile = path.join(root, 'node_modules/history-proof-phase.txt');- const phase = fs.existsSync(phaseFile) ? fs.readFileSync(phaseFile, 'utf8').trim() : 'candidate';- const artifacts = path.join(root, `node_modules/history-source-isolation-${phase}`);- fs.mkdirSync(artifacts, { recursive: true });- 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'),- server: { host: '127.0.0.1', port: 5218, strictPort: true },- });- let browser;- const observations = [];- try {- await server.listen();- browser = await chromium.launch({- headless: true,- channel: 'chromium',- args: ['--no-sandbox'],- });- for (const width of [1365, 390]) {- const page = await browser.newPage({- viewport: { width, height: width === 390 ? 844 : 900 },- });- page.setDefaultTimeout(20_000);- const requests = [],- failures = [],- errors = [];- const held = new Map();- let holdOldRange = true,- holdService = true;- page.on('pageerror', (error) => errors.push(error.message));- page.on('requestfailed', (request) => {- if (request.url().includes('/api/metrics-store/history'))- failures.push({ url: request.url(), failure: request.failure() });- });- const response = (id, range) => ({- resourceType: 'agent',- resourceId: id,- range,- start: 1_700_000_000_000,- end: 1_700_000_060_000,- source: 'store',- metrics: Object.fromEntries(- (id === 'pbs-three'- ? ['cpu', 'memory']- : ['cpu', 'memory', 'disk', 'netin', 'netout', 'diskread', 'diskwrite']- ).map((metric, i) => [- metric,- [0, 1].map((step) => ({- timestamp: 1_700_000_000_000 + step * 60_000,- value: (id === 'pbs-three' ? 12 : range === '1h' ? 31 : 88) + i + step,- min: 10,- max: 99,- })),- ]),- ),- });- await page.route('**/*', async (route) => {- const request = route.request();- const url = new URL(request.url());- if (url.origin !== 'http://127.0.0.1:5218') return route.abort();- if (!url.pathname.startsWith('/api/')) return route.continue();- if (url.pathname === '/api/metrics-store/history') {- const id = url.searchParams.get('resourceId'),- range = url.searchParams.get('range');- requests.push({ method: request.method(), id, range });- assert.ok(['agent-three', 'pbs-three'].includes(id), `unexpected target ${id}`);- if (id === 'agent-three' && range === '6h' && holdOldRange) {- holdOldRange = false;- held.set('range', route);- return;- }- if (id === 'pbs-three' && range === '1h' && holdService) {- holdService = false;- held.set('service', route);- return;- }- return route.fulfill({ json: response(id, range) });- }- if (url.pathname === '/api/license/runtime-capabilities')- return route.fulfill({- json: {- capabilities: [],- limits: [],- max_history_days: 7,- hosted_mode: false,- runtime: { build: 'community', label: 'Pulse Community runtime' },- blocked_capabilities: [],- },- });- return route.fulfill({ json: { data: [], enabled: false } });- });- await page.goto('http://127.0.0.1:5218/browser-tests/pbs-identity-boundary.html', {- waitUntil: 'domcontentloaded',- timeout: 120_000,- });- await page.getByRole('button', { name: 'Corroborate links', exact: true }).click();- const toggle = page.getByRole('button', {- name: 'Expand details for backup-connection-three',- exact: true,- });- if (width === 1365) {- await toggle.focus();- await page.keyboard.press('Enter');- } else await page.locator('td[title="backup-connection-three · tank"]').click();- const detail = page.locator('[data-inline-platform-resource-detail-for="pbs-three"]');- // History charts sit on Overview, so the read starts when it opens.- const plots = detail.locator('[data-testid="guest-history-plot"] path[data-history-series]');- await page.waitForFunction(- () =>- document.querySelectorAll('[data-testid="guest-history-plot"] path[data-history-series]')- .length === 7,- );- const originalPaths = await plots.evaluateAll((paths) =>- paths.map((p) => p.getAttribute('d')),- );- const checkLayout = async () => {- const dimensions = await page.evaluate(() => ({- scroll: document.documentElement.scrollWidth,- inner: innerWidth,- }));- assert.ok(dimensions.scroll <= dimensions.inner + 1, JSON.stringify(dimensions));- assert.equal(- await detail- .getByRole('tab', { name: 'Overview', exact: true })- .getAttribute('aria-selected'),- 'true',- );- return dimensions;- };- const screenshot = async (state) =>- page.screenshot({ path: path.join(artifacts, `${state}-${width}.png`), fullPage: true });- await screenshot('host-loaded');- await detail.getByTestId('guest-history-range-control').selectOption('6h');- await page.waitForFunction(- () => document.querySelector('[data-testid="guest-history-range-control"]').value === '6h',- );- // Wait for the route, not an arbitrary sleep or the very assertion under test.- for (let attempt = 0; !held.has('range') && attempt < 100; attempt++)- await page.waitForTimeout(10);- assert.ok(held.has('range'), 'range request was not intercepted');- await screenshot('range-loading');- assert.equal(await plots.count(), 0, 'old range plotted while 6h replacement is loading');- assert.ok((await detail.getByText('Loading history', { exact: true }).count()) > 0);- await checkLayout();- await detail.getByTestId('guest-history-range-control').selectOption('1h');- await page.waitForFunction(- () =>- document.querySelectorAll('[data-testid="guest-history-plot"] path[data-history-series]')- .length === 7,- );- const currentPaths = await plots.evaluateAll((paths) =>- paths.map((p) => p.getAttribute('d')),- );- assert.notDeepEqual(currentPaths, originalPaths);- let lateResponse;- try {- await held.get('range').fulfill({ json: response('agent-three', '6h') });- lateResponse = 'fulfilled';- } catch (error) {- lateResponse = String(error);- }- // A marker evaluation after the obsolete response; the unit proof also- // deliberately resolves a mock which ignores AbortSignal entirely.- await page.evaluate(() => new Promise(requestAnimationFrame));- assert.deepEqual(- await plots.evaluateAll((paths) => paths.map((p) => p.getAttribute('d'))),- currentPaths,- );- await page.getByRole('button', { name: 'Withdraw third link', exact: true }).click();- for (let attempt = 0; !held.has('service') && attempt < 100; attempt++)- await page.waitForTimeout(10);- assert.ok(held.has('service'), 'withdrawal request was not intercepted');- await screenshot('target-loading');- assert.equal(await plots.count(), 0, 'former host plotted while revoked target is loading');- assert.ok((await detail.getByText('Loading history', { exact: true }).count()) > 0);- await held- .get('service')- .fulfill({ status: 503, json: { error: 'Fixture replacement unavailable' } });- await detail.getByText('Failed to load history data', { exact: true }).waitFor();- assert.equal(await plots.count(), 0);- await screenshot('target-failed');- await detail.getByTestId('guest-history-range-control').selectOption('6h');- await page.waitForFunction(- () =>- document.querySelectorAll('[data-testid="guest-history-plot"] path[data-history-series]')- .length === 2,- );- assert.equal(await detail.locator('[data-history-group="network"] path').count(), 0);- assert.equal(await detail.locator('[data-history-group="disk-io"] path').count(), 0);- assert.equal(await detail.getByText('Loading history', { exact: true }).count(), 0);- await screenshot('service-loaded');- const dimensions = await checkLayout();- const beforeLocked = requests.length;- await detail.getByTestId('guest-history-range-control').selectOption('14d');- await detail.getByText(/14 days history requires a higher license plan/).waitFor();- assert.equal(await plots.count(), 0);- assert.equal(requests.length, beforeLocked);- assert.ok(requests.every((r) => r.method === 'GET'));- assert.deepEqual(errors, []);- observations.push({ width, requests, failures, lateResponse, dimensions, errors });- await page.close();- }- const file = 'src/components/Workloads/GuestDrawerHistory.tsx';- const result = {- result: 'passed',- phase,- browser: browser.version(),- playwright: require('playwright/package.json').version,- content_sha256: {- [`frontend-modern/${file}`]: createHash('sha256')- .update(fs.readFileSync(path.join(root, file)))- .digest('hex'),- },- observations,- };- fs.writeFileSync(path.join(artifacts, 'result.json'), JSON.stringify(result, null, 2) + '\n');- console.log(JSON.stringify(result));- } finally {- if (browser) await browser.close();- await server.close();- for (const name of fs.readdirSync(artifacts)) fs.chmodSync(path.join(artifacts, name), 0o644);- }-})().catch((error) => {- console.error(error);- process.exitCode = 1;-});diff --git a/frontend-modern/browser-tests/pbs-missing-help.cjs b/frontend-modern/browser-tests/pbs-missing-help.cjsdeleted file mode 100644index a74ce2965c..0000000000--- a/frontend-modern/browser-tests/pbs-missing-help.cjs+++ /dev/null@@ -1,141 +0,0 @@-// Production Docs renderer/router/CSS and exact shipped Markdown, no PBS call.-const fs = require('node:fs');-const path = require('node:path');-const http = require('node:http');-const crypto = require('node:crypto');-const assert = require('node:assert/strict');-const { chromium, webkit } = require('playwright');--const root = '/workspace';-const frontend = path.join(root, 'frontend-modern');-const evidence = path.join(root, 'tmp/pbs-missing-help');-const preview = path.join(root, 'tmp/doc-command-help/static');-const hash = bytes => crypto.createHash('sha256').update(bytes).digest('hex');-const bindingBytes = fs.readFileSync(path.join(preview, 'binding.json'));-const binding = JSON.parse(bindingBytes);-const fragment = 'pbs-is-active-but-missing-from-monitoring';-const result = { source: binding.source_sha, binding_sha256: hash(bindingBytes),- cases: [], captures: [], errors: [], backendRequests: [], mutations: [], served: [] };--(async () => {- fs.mkdirSync(evidence, { recursive: true });- let server, browser;- try {- for (const [file, expected] of Object.entries(binding.sources))- assert.equal(hash(fs.readFileSync(path.join(frontend, file))), expected, file);- for (const [file, expected] of Object.entries(binding.artifacts))- assert.equal(hash(fs.readFileSync(path.join(preview, file))), expected, file);- for (const name of ['PBS', 'TROUBLESHOOTING'])- assert.deepEqual(fs.readFileSync(path.join(preview, 'docs', `${name}.md`)),- fs.readFileSync(path.join(root, 'docs', `${name}.md`)));- result.source_inputs = Object.keys(binding.sources).length;- server = http.createServer((request, response) => {- const route = new URL(request.url, 'http://fixture.invalid').pathname;- let asset = route.slice(1);- if (route.startsWith('/docs/') && !route.endsWith('.md'))- asset = 'browser-tests/doc-command-help.html';- if (!Object.hasOwn(binding.artifacts, asset)) {- response.writeHead(404); response.end(); return;- }- const bytes = fs.readFileSync(path.join(preview, asset));- assert.equal(hash(bytes), binding.artifacts[asset]);- result.served.push({ route, asset, sha256: hash(bytes) });- const type = asset.endsWith('.md') ? 'text/markdown; charset=utf-8' :- asset.endsWith('.js') ? 'text/javascript' : asset.endsWith('.css') ? 'text/css' : 'text/html';- response.writeHead(200, { 'Content-Type': type, 'Cache-Control': 'no-store' });- response.end(bytes);- });- await new Promise(resolve => server.listen(0, '127.0.0.1', resolve));- const origin = `http://127.0.0.1:${server.address().port}`;- for (const state of [- { engine: 'chromium', name: 'desktop-light', width: 1280, height: 900, dark: false },- { engine: 'webkit', name: 'phone-dark', width: 390, height: 900, dark: true },- ]) {- browser = await { chromium, webkit }[state.engine].launch(state.engine === 'chromium'- ? { headless: true, channel: 'chromium', args: ['--no-sandbox'] } : { headless: true });- const context = await browser.newContext({ viewport: { width: state.width, height: state.height },- isMobile: state.width < 500, hasTouch: state.width < 500 });- const page = await context.newPage();- page.on('pageerror', error => result.errors.push(error.message));- page.on('request', request => {- if (!['GET', 'HEAD'].includes(request.method())) result.mutations.push(request.method());- });- await page.route('**/api/**', async route => {- result.backendRequests.push(new URL(route.request().url()).pathname); await route.abort();- });- await page.addInitScript(dark => {- document.addEventListener('DOMContentLoaded', () => document.documentElement.classList.toggle('dark', dark));- const fetch = window.fetch.bind(window);- window.__helpDocuments = [];- window.fetch = async (...args) => {- const response = await fetch(...args);- if (/\/docs\/(PBS|TROUBLESHOOTING)\.md$/.test(new URL(response.url).pathname))- window.__helpDocuments.push({ path: new URL(response.url).pathname, status: response.status,- bytes: Array.from(new Uint8Array(await response.clone().arrayBuffer())) });- return response;- };- }, state.dark);- const activate = async link => {- if (state.width < 500) await link.tap();- else { await link.focus(); await page.keyboard.press('Enter'); }- };- const capture = async (label, locator) => {- await locator.evaluate(element => window.scrollBy(0, element.getBoundingClientRect().top - 64));- await page.evaluate(() => new Promise(resolve => requestAnimationFrame(() => requestAnimationFrame(resolve))));- assert.ok(await page.evaluate(() => document.documentElement.scrollWidth <= innerWidth + 1));- const file = `${state.name}-${label}.png`;- await page.screenshot({ path: path.join(evidence, file) });- result.captures.push({ file, sha256: hash(fs.readFileSync(path.join(evidence, file))), state });- };- await page.goto(`${origin}/docs/TROUBLESHOOTING#choose-the-affected-workflow`);- const entry = page.locator(`article a[href="/docs/PBS#${fragment}"]`);- await entry.waitFor();- await capture('entry', entry.locator('..'));- await activate(entry);- await page.waitForURL(`**/docs/PBS#${fragment}`);- const heading = page.locator(`#${fragment}`);- await page.waitForFunction(id => document.activeElement?.id === id, fragment);- await capture('missing-server', heading);- const section = await heading.evaluate(element => {- const text = [];- for (let next = element.nextElementSibling; next && !/^H[1-3]$/.test(next.tagName); next = next.nextElementSibling)- text.push(next.textContent);- return text.join(' ').replace(/\s+/g, ' ');- });- for (const phrase of ["connection's polling health", 'does not require a Pulse Agent',- 'The PBS VM/LXC in Overview is a different resource', 'If Proxmox navigation is absent too',- 'PVE passthrough backups do not establish', 'unknown is valid',- 'Do not delete and re-add the connection, replace tokens, install an agent',- 'Keep certificate verification and existing access restrictions intact'])- assert.ok(section.includes(phrase), `${state.name}: ${phrase}`);- const safety = page.locator('article p').filter({ hasText: 'Do not delete and re-add the connection, replace tokens, install an agent' });- await capture('preserve-state', safety);- await activate(page.getByRole('link', { name: 'PBS History checks', exact: true }));- await page.waitForURL('**#pbs-is-connected-but-history-stays-empty');- await page.waitForFunction(() => document.activeElement?.id === 'pbs-is-connected-but-history-stays-empty');- const consumed = await page.evaluate(() => window.__helpDocuments);- assert.ok(consumed.some(item => item.path === '/docs/PBS.md'));- assert.ok(consumed.some(item => item.path === '/docs/TROUBLESHOOTING.md'));- for (const item of consumed) {- assert.equal(item.status, 200);- assert.equal(hash(Buffer.from(item.bytes)), binding.artifacts[item.path.slice(1)]);- }- result.cases.push({ ...state, browser: browser.version(), focusedFragment: true,- historyLink: true, noHorizontalPageOverflow: true,- consumed: consumed.map(item => ({ path: item.path, sha256: hash(Buffer.from(item.bytes)) })) });- await browser.close(); browser = undefined;- }- assert.deepEqual(result.errors, []);- assert.deepEqual(result.backendRequests, []);- assert.deepEqual(result.mutations, []);- result.playwright = require('playwright/package.json').version;- assert.equal(result.playwright, '1.56.1');- result.result = 'passed';- } finally {- if (browser) await browser.close();- if (server) await new Promise(resolve => server.close(resolve));- result.browserAndServerClosed = true;- fs.writeFileSync(path.join(evidence, 'result.json'), JSON.stringify(result, null, 2) + '\n');- }- console.log(JSON.stringify(result));-})().catch(error => { console.error(error); process.exitCode = 1; });diff --git a/frontend-modern/browser-tests/pbs-mixed-source-1723.html b/frontend-modern/browser-tests/pbs-mixed-source-1723.htmldeleted file mode 100644index 6022382067..0000000000--- a/frontend-modern/browser-tests/pbs-mixed-source-1723.html+++ /dev/null@@ -1,8 +0,0 @@-<!doctype html>-<html>- <head><meta charset="UTF-8" /></head>- <body>- <div id="root"></div>- <script type="module" src="/browser-tests/pbs-mixed-source-1723.tsx"></script>- </body>-</html>diff --git a/frontend-modern/browser-tests/pbs-mixed-source-1723.tsx b/frontend-modern/browser-tests/pbs-mixed-source-1723.tsxdeleted file mode 100644index c0654d66bf..0000000000--- a/frontend-modern/browser-tests/pbs-mixed-source-1723.tsx+++ /dev/null@@ -1,100 +0,0 @@-// Mock-backed current-component browser fixture for the #1723 side-by-side-// PBS API + Agent -> PBS API + PVE API + Agent transition. No live service.-import { createMemo, createSignal } from 'solid-js';-import { render } from 'solid-js/web';--import { ProxmoxBackupServersTable } from '../src/features/proxmox/ProxmoxBackupServersTable';-import type { Resource } from '../src/types/resource';-import '../src/index.css';--const seen = Date.now();-const pbs = {- id: 'pbs-service',- type: 'pbs',- name: 'backup-connection',- displayName: 'Backup connection',- platformId: 'pbs-service',- platformType: 'proxmox-pbs',- sourceType: 'api',- sources: ['pbs'],- status: 'online',- lastSeen: seen,- metricsTarget: { resourceType: 'agent', resourceId: 'pbs-service' },- pbs: {- instanceId: 'pbs-service',- hostname: '10.0.0.5',- // PBS API tokens cannot read /nodes; backend reports the corroborated ID.- linkedAgentId: 'agent-uuid',- connectionHealth: 'healthy',- version: '3.2.1',- datastores: [{ name: 'tank', total: 1000, used: 400, available: 600, usagePercent: 40 }],- },-} as Resource;--const host = {- id: 'agent-uuid',- type: 'agent',- name: 'backup-host.local',- displayName: 'Backup host',- platformId: 'agent-uuid',- platformType: 'proxmox-pbs',- sourceType: 'agent',- sources: ['agent', 'pbs'],- status: 'online',- lastSeen: seen,- agent: { agentId: 'agent-uuid', hostname: 'backup-host.local' },- metricsTarget: { resourceType: 'agent', resourceId: 'agent-uuid' },-} as Resource;--const pveOnly = {- ...host,- id: 'pve-only',- name: 'backup-connection',- displayName: 'PVE node without Agent',- sources: ['proxmox'],- agent: undefined,- platformData: { sources: ['proxmox'], proxmox: { nodeName: 'backup-connection' } },- metricsTarget: { resourceType: 'agent', resourceId: 'pve-only' },-} as Resource;--const merged = {- ...host,- id: 'pve-merged-host',- displayName: 'PVE plus PBS host',- sources: ['proxmox', 'pbs', 'agent'],- platformData: {- sources: ['proxmox', 'pbs', 'agent'],- agent: host.agent,- proxmox: { nodeName: 'backup-host' },- },-} as Resource;--const Fixture = () => {- const [pveJoined, setPveJoined] = createSignal(false);- const [hostOmitted, setHostOmitted] = createSignal(false);- const servers = createMemo(() => [- pbs,- ...(pveJoined() ? [pveOnly] : []),- ...(hostOmitted() ? [] : [pveJoined() ? merged : host]),- ]);- return (- <main class="p-4 space-y-3">- <h1>PBS mixed-source History fixture</h1>- <div class="flex flex-wrap gap-2">- <button type="button" onClick={() => setPveJoined(true)}>- Join PVE API- </button>- <button type="button" onClick={() => setHostOmitted(true)}>- Omit host row- </button>- <button type="button" onClick={() => setHostOmitted(false)}>- Restore host row- </button>- </div>- <output aria-label="Topology">{pveJoined() ? 'PBS + PVE + Agent' : 'PBS + Agent'}</output>- <ProxmoxBackupServersTable servers={servers()} />- </main>- );-};--render(() => <Fixture />, document.getElementById('root') as HTMLElement);diff --git a/frontend-modern/browser-tests/pbs-verification-help.cjs b/frontend-modern/browser-tests/pbs-verification-help.cjsdeleted file mode 100644index ed0d994384..0000000000--- a/frontend-modern/browser-tests/pbs-verification-help.cjs+++ /dev/null@@ -1,143 +0,0 @@-// Read-only help acceptance through the production Docs page, router and CSS.-// No PBS connection, diagnostic run or verification job is involved.-const assert = require('node:assert/strict');-const fs = require('node:fs');-const path = require('node:path');-const crypto = require('node:crypto');-const { chromium, webkit } = require('playwright');--(async () => {- const root = '/workspace/frontend-modern';- const artifacts = path.join(root, 'node_modules', 'pbs-verification-help-browser');- const fragment = 'backups-are-visible-but-coverage-says-unprotected';- const guide = fs.readFileSync(path.join(root, 'public/docs/PBS.md'));- assert.deepEqual(guide, fs.readFileSync('/workspace/docs/PBS.md'));- process.chdir(root);- fs.mkdirSync(artifacts, { recursive: true });- 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-pbs-verification-help'),- server: { host: '127.0.0.1', port: 5256, strictPort: true },- optimizeDeps: { noDiscovery: true, include: [] },- });- const results = [];- let browser;- try {- await server.listen();- for (const [engine, width, dark] of [['chromium', 1280, false], ['webkit', 390, true]]) {- browser = await { chromium, webkit }[engine].launch(engine === 'chromium'- ? { headless: true, channel: 'chromium', args: ['--no-sandbox'] }- : { headless: true });- const page = await browser.newPage({ viewport: { width, height: 1000 },- ...(engine === 'webkit' ? { isMobile: true, hasTouch: true } : {}) });- const errors = [], backendRequests = [], mutations = [];- // Observe the exact bytes consumed by fetch, without issuing another- // request. Chromium's DevTools response.body() re-encodes text/markdown- // without a charset as Windows-1252, unlike fetch's UTF-8 text decoder.- await page.addInitScript(() => {- const fetch = window.fetch.bind(window);- window.__pbsDocuments = [];- window.fetch = async (...args) => {- const response = await fetch(...args);- if (new URL(response.url).pathname === '/docs/PBS.md') {- const bytes = Array.from(new Uint8Array(await response.clone().arrayBuffer()));- window.__pbsDocuments.push({ status: response.status, bytes });- }- return response;- };- });- page.on('pageerror', (error) => errors.push(error.message));- page.on('console', (message) => {- if (message.type() === 'error') errors.push(message.text());- });- page.on('request', (request) => {- if (!['GET', 'HEAD'].includes(request.method())) mutations.push(request.method());- });- await page.route('**/api/**', async (route) => {- backendRequests.push(new URL(route.request().url()).pathname);- await route.abort();- });- await page.goto('http://127.0.0.1:5256/browser-tests/docs-fragment-navigation.html', {- waitUntil: 'domcontentloaded', timeout: 60000,- });- if (dark) await page.evaluate(() => document.documentElement.classList.add('dark'));- await page.evaluate(() => {- history.pushState({}, '', '/docs/RECOVERY#missing-or-inconsistent-evidence');- dispatchEvent(new PopStateEvent('popstate'));- });- const entry = page.locator(`a[href="/docs/PBS#${fragment}"]`);- await entry.waitFor({ state: 'visible' });- assert.equal(await entry.innerText(), 'backup health checks');- await entry.focus();- await page.keyboard.press('Enter');- await page.waitForFunction((id) => {- const target = document.getElementById(id);- const rect = target?.getBoundingClientRect();- return target && document.activeElement === target && rect.top >= 0 && rect.top < innerHeight;- }, fragment);- const heading = page.locator(`#${fragment}`);- const section = await page.evaluate((id) => {- const target = document.getElementById(id);- const nodes = [];- for (let node = target.nextElementSibling; node && !/^H[1-3]$/.test(node.tagName); node = node.nextElementSibling) {- nodes.push(node.textContent);- }- return nodes.join(' ').replace(/\s+/g, ' ');- }, fragment);- for (const phrase of [- "Protected in a restore point's State", "not the workload's protection assessment",- 'choose the newest point whose Source is PBS', 'Created time and State',- 'Hover the Created age for its absolute timestamp', 'if unavailable, keep the time unknown',- 'an older or absent point in Pulse is an inventory discrepancy',- "does not prove that PBS's verification job failed",- 'Verified with a workload still needing attention is a separate assessment disagreement',- 'Protected point leaves its verification state unknown from that label alone',- "Job OK is not an individual point's verification result",- 'without running Diagnostics or another verification',- 'Do not delete backups, clear History, change retention or freshness settings',- ]) assert.ok(section.includes(phrase), `${engine}: ${phrase}`);- assert.ok(await page.evaluate(() => document.documentElement.scrollWidth <= innerWidth + 1));- await page.waitForFunction(() => document.getAnimations().length === 0);- await page.screenshot({ path: path.join(artifacts, `${engine}-evidence.png`) });- const comparison = page.locator('p').filter({ hasText: 'If PBS says verified but Pulse disagrees:' });- await comparison.scrollIntoViewIfNeeded();- await page.screenshot({ path: path.join(artifacts, `${engine}-comparison.png`) });- const safety = page.getByRole('link', { name: 'Backup safety', exact: true });- await safety.focus();- await page.keyboard.press('Enter');- await page.waitForFunction(() => document.activeElement?.id === 'backup-safety');- assert.ok(await page.locator('#backup-safety').isVisible());- assert.ok(await heading.count() === 0);- assert.deepEqual(backendRequests, []);- assert.deepEqual(mutations, []);- assert.deepEqual(errors, []);- const consumedDocs = await page.evaluate(() => window.__pbsDocuments);- assert.ok(consumedDocs.length >= 1);- const servedDocs = consumedDocs.map((served) => ({ status: served.status,- bytes: served.bytes.length,- sha256: crypto.createHash('sha256').update(Buffer.from(served.bytes)).digest('hex') }));- for (const served of servedDocs) {- assert.equal(served.status, 200);- assert.equal(served.bytes, guide.length);- assert.equal(served.sha256, crypto.createHash('sha256').update(guide).digest('hex'));- }- results.push({ engine, browserVersion: browser.version(), width, dark,- helpRoute: `/docs/PBS#${fragment}`, sourceMatchedResponses: servedDocs,- recoveryEntryKeyboardNavigation: true, visibleFocusedHeading: true,- backupSafetyKeyboardNavigation: true, noHorizontalPageOverflow: true,- backendRequests, mutations, errors });- await browser.close();- browser = undefined;- }- } finally {- if (browser) await browser.close();- await server.close();- }- const result = { result: 'passed', playwright: require('playwright/package.json').version,- docSha256: crypto.createHash('sha256').update(guide).digest('hex'), results,- browserAndServerClosed: true,- scope: 'Production documentation renderer, page, router, CSS and exact shipped Markdown; no native PBS, full application, diagnosis or release acceptance.' };- fs.writeFileSync(path.join(artifacts, 'result.json'), JSON.stringify(result, null, 2) + '\n');- console.log(JSON.stringify(result));-})().catch((error) => { console.error(error); process.exitCode = 1; });diff --git a/frontend-modern/browser-tests/pbs-web-interface.cjs b/frontend-modern/browser-tests/pbs-web-interface.cjsdeleted file mode 100644index 7437d11e9d..0000000000--- a/frontend-modern/browser-tests/pbs-web-interface.cjs+++ /dev/null@@ -1,263 +0,0 @@-// Real PBS table, inline drawer and CSS on synthetic resources. No external navigation.-const assert = require('node:assert/strict');-const fs = require('node:fs');-const path = require('node:path');-const crypto = require('node:crypto');-const { pathToFileURL } = require('node:url');-const { chromium, webkit } = require('playwright');-const root = '/workspace/frontend-modern';-const output = '/workspace/tmp/pbs-web-interface-proof';-const origin = 'http://127.0.0.1:5337';-const hash = (file) => crypto.createHash('sha256').update(fs.readFileSync(file)).digest('hex');-const result = {- result: 'incomplete',- playwright: require('playwright/package.json').version,- binding: JSON.parse(fs.readFileSync(output + '/binding.json')),- sources: {},- cases: [],- captures: [],- cleanup: {},- limits:- 'Production PBS table, shared URL control, inline drawer and CSS in a synthetic fixture. Link activation is intercepted before navigation. No live PBS, guest, full application shell, installed release or reporter acceptance.',-};-assert.equal(- result.playwright,- JSON.parse(fs.readFileSync('/workspace/tests/integration/package-lock.json')).packages[- 'node_modules/@playwright/test'- ].version,-);-for (const [file, digest] of Object.entries(result.binding.inputs)) {- assert.equal(hash('/workspace/' + file), digest);-}--(async () => {- let server;- let browser;- try {- const { createServer } = await import(- pathToFileURL(path.join(root, 'node_modules/vite/dist/node/index.js'))- );- const { default: solid } = await import(- pathToFileURL(path.join(root, 'node_modules/vite-plugin-solid/dist/esm/index.mjs'))- );- const { default: tailwind } = await import(- pathToFileURL(path.join(root, 'node_modules/@tailwindcss/vite/dist/index.mjs'))- );- server = await createServer({- root,- configFile: false,- envFile: false,- publicDir: false,- plugins: [- {- name: 'pbs-proof-source-observation',- enforce: 'pre',- transform(_code, id) {- const file = id.split('?')[0];- if (file.startsWith(root + '/src/') && fs.existsSync(file)) {- result.sources[path.relative('/workspace', file)] = hash(file);- }- },- },- solid(),- tailwind(),- ],- resolve: { alias: { '@': root + '/src' } },- optimizeDeps: { noDiscovery: true, esbuildOptions: { target: 'esnext' } },- server: { host: '127.0.0.1', port: 5337, strictPort: true, hmr: false },- });- await server.listen();- for (const [name, engine, width, height, dark] of [- ['desktop', chromium, 1365, 900, false],- ['phone', webkit, 390, 844, true],- ]) {- browser = await engine.launch(- engine === chromium- ? { headless: true, channel: 'chromium', args: ['--no-sandbox'] }- : { headless: true },- );- const context = await browser.newContext({- viewport: { width, height },- isMobile: width < 768,- hasTouch: width < 768,- locale: 'en-GB',- reducedMotion: 'reduce',- });- const page = await context.newPage();- page.setDefaultTimeout(10000);- const record = {- name,- width,- height,- dark,- browser: browser.version(),- reads: [],- errors: [],- };- result.cases.push(record);- page.on('pageerror', (error) => record.errors.push(error.message));- await page.route('**/*', (route) => {- const url = new URL(route.request().url());- assert.equal(url.origin, origin, 'no external request');- if (!url.pathname.startsWith('/api/')) return route.continue();- assert.equal(route.request().method(), 'GET', 'no mutation');- assert(!/diagnostics|guest-agent|qemu|\/run/.test(url.pathname), 'no live probe');- record.reads.push(url.pathname);- return route.fulfill({- json: { success: true, data: [], alerts: [], anomalies: [], config: null },- });- });- await page.addInitScript((dark) => {- window.__pbsActivations = [];- document.addEventListener(- 'click',- (event) => {- const anchor = event.target.closest('a[target="_blank"]');- if (anchor) {- event.preventDefault();- window.__pbsActivations.push(anchor.getAttribute('href'));- }- },- true,- );- document.addEventListener('DOMContentLoaded', () =>- document.documentElement.classList.toggle('dark', dark),- );- }, dark);- await page.goto(origin + '/browser-tests/pbs-web-interface.html', {- waitUntil: 'domcontentloaded',- timeout: 45000,- });- const table = page.locator('[data-proxmox-backups-table="servers"]');- const east = table.locator('a[href="https://east.example:8007/proxy/"]').first();- await east.waitFor();- assert.equal(await table.getByRole('link').count(), 6);- assert.equal(await table.locator('a[href="http://[2001:db8::2]:8007/"]').count(), 2);- assert.equal(await table.locator('a[href*="WRONG-HOST"]').count(), 0);- assert.equal(- await table- .getByRole('img', { name: 'Web interface URL for unsafe-url is invalid' })- .count(),- 2,- );- const row = east.locator('xpath=ancestor::tr');- const identity = await row.elementHandle();- const label = row.locator('span[title="pbs-main"]');- const capture = async (state) => {- const file = `${name}-${state}.png`;- await page.screenshot({ path: output + '/' + file, fullPage: true });- result.captures.push({ file, sha256: hash(output + '/' + file) });- };- record.geometry = await label.evaluate((element) => ({- visible: element.clientWidth,- full: element.scrollWidth,- }));- assert(record.geometry.visible > 0 && record.geometry.full <= record.geometry.visible + 1);- const box = await east.boundingBox();- const cellBox = await row.locator('td').first().boundingBox();- assert(box.width >= 24 && box.height >= 24, 'shared target remains usable');- assert(box.x >= cellBox.x && box.x + box.width <= cellBox.x + cellBox.width + 1);- assert.equal(await east.getAttribute('rel'), 'noopener noreferrer');- assert.equal(await east.getAttribute('target'), '_blank');- // Real Tab order and Enter, not a synthetic click standing in for keyboard activation.- for (let step = 0; step < 30; step++) {- await page.keyboard.press('Tab');- if (await east.evaluate((element) => element === document.activeElement)) break;- }- assert.equal(- await page.locator(':focus').getAttribute('href'),- 'https://east.example:8007/proxy/',- );- await capture('keyboard-link');- await page.keyboard.press('Enter');- if (width < 768) await east.tap();- else await east.click();- assert.deepEqual(await page.evaluate(() => window.__pbsActivations), [- 'https://east.example:8007/proxy/',- 'https://east.example:8007/proxy/',- ]);- assert.equal(await page.locator('[data-inline-platform-resource-detail-for]').count(), 0);- if (width < 768) {- // Shared platform rows use the full row touch target on phones.- await label.tap();- } else {- const toggle = row.getByRole('button', { name: 'Expand details for pbs-main' });- await toggle.focus();- await page.keyboard.press('Space');- }- await page.locator('[data-inline-platform-resource-detail-for="pbs-east"]').waitFor();- assert.equal(await page.locator('[data-inline-platform-resource-detail-for]').count(), 1);- await capture('same-server-details');- await label.click();- await page.evaluate(() => {- window.__pbsWeb.reverse();- window.__pbsWeb.update('pbs-east', 'javascript:alert(1)');- });- await page.waitForFunction(- () => !document.querySelector('a[href="https://east.example:8007/proxy/"]'),- );- assert.equal(- await table.getByRole('img', { name: 'Web interface URL for pbs-main is invalid' }).count(),- 2,- );- assert.equal(await table.locator('a[href="http://[2001:db8::2]:8007/"]').count(), 2);- assert(await identity.evaluate((element) => element.isConnected));- await page.evaluate(() => window.__pbsWeb.update('pbs-east', ''));- await page.waitForFunction(- () =>- ![...document.querySelectorAll('[role="img"]')].some(- (element) =>- element.getAttribute('aria-label') === 'Web interface URL for pbs-main is invalid',- ),- );- assert.equal(await identity.evaluate((element) => element.querySelectorAll('a').length), 0);- await page.evaluate(() =>- window.__pbsWeb.update('pbs-east', ' https://edited.example:8443/pbs/ '),- );- await table.locator('a[href="https://edited.example:8443/pbs/"]').first().waitFor();- assert.equal(await table.locator('a[href="https://edited.example:8443/pbs/"]').count(), 2);- await capture('edited-url');- if (width < 768) {- await page.setViewportSize({ width: 320, height });- await page.waitForTimeout(100);- const narrow = await table- .locator('a[href="https://edited.example:8443/pbs/"]')- .first()- .boundingBox();- assert(narrow.width >= 24 && narrow.height >= 24);- await capture('narrow-320');- }- assert(await page.evaluate(() => document.documentElement.scrollWidth <= innerWidth + 1));- assert.deepEqual(record.errors, []);- record.checks = [- 'service-owned targets',- 'invalid/unset/revoked targets',- 'Tab/Enter and pointer/touch',- 'separate real drawer disclosure',- 'same keyed rows after reordering',- 'no horizontal overflow',- ];- await context.close();- await browser.close();- browser = undefined;- record.closed = true;- }- assert.equal(- result.sources['frontend-modern/src/features/proxmox/ProxmoxBackupServersTable.tsx'],- result.binding.inputs['frontend-modern/src/features/proxmox/ProxmoxBackupServersTable.tsx'],- );- result.result = 'passed';- } catch (error) {- result.error = error.message;- throw error;- } finally {- if (browser) await browser.close();- result.cleanup.browser_closed = true;- if (server) await server.close();- result.cleanup.server_closed = true;- fs.writeFileSync(output + '/result.json', JSON.stringify(result, null, 2) + '\n');- }-})().catch((error) => {- console.error(error);- process.exitCode = 1;-});diff --git a/frontend-modern/browser-tests/pbs-web-interface.html b/frontend-modern/browser-tests/pbs-web-interface.htmldeleted file mode 100644index 813842a286..0000000000--- a/frontend-modern/browser-tests/pbs-web-interface.html+++ /dev/null@@ -1,12 +0,0 @@-<!doctype html>-<html>- <head>- <meta charset="UTF-8" />- <meta name="viewport" content="width=device-width, initial-scale=1.0" />- <title>PBS web-interface parity</title>- </head>- <body>- <div id="root"></div>- <script type="module" src="/browser-tests/pbs-web-interface.tsx"></script>- </body>-</html>diff --git a/frontend-modern/browser-tests/pbs-web-interface.tsx b/frontend-modern/browser-tests/pbs-web-interface.tsxdeleted file mode 100644index 76a28fa0e8..0000000000--- a/frontend-modern/browser-tests/pbs-web-interface.tsx+++ /dev/null@@ -1,92 +0,0 @@-// Real Backups server table/drawer/CSS; synthetic, credential-free resources only.-import { createSignal } from 'solid-js';-import { render } from 'solid-js/web';-import { Router, Route } from '@solidjs/router';-import { ProxmoxBackupServersTable } from '../src/features/proxmox/ProxmoxBackupServersTable';-import type { Resource } from '../src/types/resource';-import { DarkModeContext, WebSocketContext } from '../src/contexts/appRuntime';-import '../src/index.css';--// Explicit offline context, not a live WebSocket or automatic discovery probe.-const server = (id: string, name: string, customUrl?: string): Resource => ({- id,- type: 'pbs',- name,- displayName: name,- platformId: id,- platformType: 'proxmox-pbs',- sourceType: 'api',- sources: ['pbs'],- status: 'online',- lastSeen: Date.now(),- customUrl,- pbs: {- instanceId: id,- nodeName: 'host.example',- linkedAgentId: 'agent-host',- connectionHealth: 'healthy',- version: '3.2.1',- datastores: [- { name: 'archive', total: 1000, used: 400, available: 600, status: 'available' },- { name: 'main', total: 1000, used: 200, available: 800, status: 'available' },- ],- },-});-const initial = [- server('pbs-east', 'pbs-main', 'https://east.example:8007/proxy/'),- server('pbs-west', 'pbs-main', 'http://[2001:db8::2]:8007/'),- server(- 'pbs-long',- 'backup-server-with-a-very-long-readable-identity',- 'https://long.example:8007',- ),- server('pbs-invalid', 'unsafe-url', 'javascript:alert(1)'),- server('pbs-unset', 'no-url'),-];-const host: Resource = {- id: 'host',- type: 'agent',- name: 'pbs-main',- displayName: 'pbs-main',- platformId: 'host',- platformType: 'proxmox-pbs',- sourceType: 'agent',- status: 'online',- lastSeen: Date.now(),- agent: { agentId: 'agent-host', hostname: 'host.example' },- customUrl: 'https://WRONG-HOST.example:9000',-};-function Fixture() {- const [servers, setServers] = createSignal([...initial, host]);- (window as any).__pbsWeb = {- update: (id: string, url: string) =>- setServers((current) => current.map((r) => (r.id === id ? { ...r, customUrl: url } : r))),- reverse: () =>- setServers((current) =>- [...current].reverse().map((r) => ({- ...r,- pbs: r.pbs ? { ...r.pbs, datastores: [...r.pbs.datastores!].reverse() } : undefined,- })),- ),- };- return (- <main class="min-h-screen bg-surface p-3 text-base-content">- <h1 class="mb-3 text-base font-semibold">Backup servers</h1>- <ProxmoxBackupServersTable servers={servers()} />- </main>- );-}-render(- () => (- <WebSocketContext.Provider- value={{ state: { pmg: [] }, activeAlerts: {}, connected: () => false } as any}- >- <DarkModeContext.Provider value={() => document.documentElement.classList.contains('dark')}>- <Router>- <Route path="/*" component={Fixture} />- </Router>- </DarkModeContext.Provider>- </WebSocketContext.Provider>- ),- document.getElementById('root')!,-);diff --git a/frontend-modern/browser-tests/private-auth-help.cjs b/frontend-modern/browser-tests/private-auth-help.cjsdeleted file mode 100644index 0f41b06d22..0000000000--- a/frontend-modern/browser-tests/private-auth-help.cjs+++ /dev/null@@ -1,128 +0,0 @@-// Verify shipped setup guidance in the production Docs/router/Markdown/CSS.-// No backend, Docker daemon, credentials or container startup is exercised.-const assert = require('node:assert/strict');-const fs = require('node:fs');-const path = require('node:path');-const { chromium, webkit } = require('playwright');--(async () => {- const root = path.resolve('frontend-modern');- const artifacts = path.join(root, 'node_modules', 'private-auth-help-browser');- fs.mkdirSync(artifacts, { recursive: true });- // Tailwind resolves its config/content from cwd, as the normal npm build- // does. The tool is still invoked from the assigned repository root.- 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-private-auth-help'),- server: { host: '127.0.0.1', port: 5249, strictPort: true },- optimizeDeps: { noDiscovery: true, include: [] },- });- const results = [];- let browser;- try {- await server.listen();- for (const [engine, width, tone] of [['chromium', 1280, 'light'], ['webkit', 390, 'dark']]) {- browser = await { chromium, webkit }[engine].launch(engine === 'chromium'- ? { headless: true, channel: 'chromium', args: ['--no-sandbox'] }- : { headless: true });- const page = await browser.newPage({ viewport: { width, height: 900 },- ...(engine === 'webkit' ? { isMobile: true, hasTouch: true } : {}) });- const errors = [];- page.on('pageerror', (error) => errors.push(error.message));- page.on('console', (message) => { if (message.type() === 'error') errors.push(message.text()); });- await page.goto('http://127.0.0.1:5249/browser-tests/docs-fragment-navigation.html',- { waitUntil: 'domcontentloaded', timeout: 60_000 });- if (tone === 'dark') await page.evaluate(async () => {- document.documentElement.classList.add('dark');- await new Promise((resolve) => requestAnimationFrame(resolve));- });- await page.getByRole('link', { name: '← All documentation' }).click();- await page.getByRole('link', { name: 'Configure Pulse', exact: true }).click();- const privateHeading = page.getByRole('heading', { name: 'Private Docker authentication file', exact: true });- await privateHeading.waitFor();- let text = await page.locator('article').innerText();- for (const phrase of ['complete bcrypt hash', 'no $$ substitution', 'Do not source the file',- 'Deployment-supplied environment values take precedence', 'not out of Docker\'s',- 'does not scrub its original value', 'this new-container example is not an upgrade procedure'])- assert.ok(text.includes(phrase), phrase);- assert.ok(!text.includes('secret123'));- // The production Docs sanitizer removes Markdown language classes.- const shell = await page.locator('pre code').allTextContents();- assert.ok(shell.some((block) => block.includes('--env-file "$HOME/.config/pulse/docker-auth.env"')));- assert.ok(shell.every((block) => !/-e\s+PULSE_AUTH_(PASS|USER)=/.test(block)));- const firstLogin = page.getByRole('link', { name: 'First login', exact: true });- await firstLogin.focus();- await page.keyboard.press('Enter');- await page.waitForFunction(() => {- const h = document.getElementById('step-1-get-the-token');- return h && h.getBoundingClientRect().top >= 0 && h.getBoundingClientRect().top < innerHeight;- });- assert.ok(page.url().endsWith('/docs/INSTALL#step-1-get-the-token'));- await page.goBack();- await privateHeading.waitFor();- await privateHeading.evaluate((h) => h.scrollIntoView({ block: 'start' }));- assert.ok(await page.evaluate(() => document.documentElement.scrollWidth <= innerWidth + 1));- await page.screenshot({ path: path.join(artifacts, `${engine}-private-file.png`) });- const launchCode = page.locator('pre').filter({ hasText: 'docker run -d' });- await launchCode.scrollIntoViewIfNeeded();- await page.screenshot({ path: path.join(artifacts, `${engine}-docker-credentials.png`) });-- await page.getByRole('link', { name: '← All documentation' }).click();- await page.getByRole('link', { name: 'Docker and Podman', exact: true }).click();- await page.getByRole('heading', { name: '📦 Docker Compose', exact: true }).waitFor();- text = await page.locator('article').innerText();- assert.ok(!text.includes('secret123'));- assert.ok(text.includes('Leave authentication overrides unset'));- assert.ok(text.includes('remain in the container environment and deployment file'));- const privateLink = page.getByRole('link', { name: 'private Docker authentication file', exact: true });- await privateLink.focus();- await page.keyboard.press('Enter');- await page.waitForFunction(() => {- const h = document.getElementById('private-docker-authentication-file');- return h && h.getBoundingClientRect().top >= 0 && h.getBoundingClientRect().top < innerHeight;- });- assert.ok(page.url().endsWith('/docs/CONFIGURATION#private-docker-authentication-file'));-- for (const [locale, label, heading, safeguard] of [- ['de', 'Deutsch', 'Erste Anmeldung', 'Verwende kein gemeinsames Beispielpasswort'],- ['es', 'Español', 'Primer inicio de sesión', 'No uses una contraseña de ejemplo compartida'],- ]) {- await page.getByRole('link', { name: '← All documentation' }).click();- const link = page.getByRole('link', { name: label, exact: true });- await link.focus();- await page.keyboard.press('Enter');- await page.getByRole('heading', { name: heading, exact: true }).waitFor();- text = await page.locator('article').innerText();- assert.ok(!text.includes('secret123'));- assert.ok(!text.includes('PULSE_AUTH_PASS='));- assert.ok(text.includes('docker exec pulse /app/pulse bootstrap-token'));- assert.ok(text.includes(safeguard));- const compose = page.locator('pre').filter({ hasText: 'services:' });- await compose.scrollIntoViewIfNeeded();- assert.ok(!(await compose.innerText()).includes('PULSE_AUTH_'));- assert.ok(await page.evaluate(() => document.documentElement.scrollWidth <= innerWidth + 1));- await page.screenshot({ path: path.join(artifacts, `${engine}-${locale}-bootstrap.png`) });- const target = page.locator('a[href="/docs/CONFIGURATION#private-docker-authentication-file"]');- await target.focus();- await page.keyboard.press('Enter');- await privateHeading.waitFor();- assert.ok(page.url().endsWith('/docs/CONFIGURATION#private-docker-authentication-file'));- }- assert.deepEqual(errors, []);- results.push({ engine, version: browser.version(), width, tone, firstLoginKeyboard: true,- privateFileRendering: true, noCommandCredential: true, envVisibilityWarning: true,- dockerFragmentKeyboard: true, translatedBootstrap: ['de', 'es'], errors });- await browser.close();- browser = undefined;- }- const result = { result: 'passed', playwright: require('playwright/package.json').version,- scope: 'shipped setup help and links, not native Docker or password changes', results };- fs.writeFileSync(path.join(artifacts, 'result.json'), JSON.stringify(result, null, 2) + '\n');- console.log(JSON.stringify(result));- } finally {- if (browser) await browser.close();- await server.close();- }-})().catch((error) => { console.error(error); process.exitCode = 1; });diff --git a/frontend-modern/browser-tests/probe-guidance.cjs b/frontend-modern/browser-tests/probe-guidance.cjsdeleted file mode 100644index 6ee29e6ec1..0000000000--- a/frontend-modern/browser-tests/probe-guidance.cjs+++ /dev/null@@ -1,130 +0,0 @@-// Render the existing probe help and its outage/retirement links with the real-// Docs page. No agent, destination, watchdog or Mobile operation is performed.-const assert = require('node:assert/strict');-const fs = require('node:fs');-const path = require('node:path');-const crypto = require('node:crypto');-const { chromium, webkit } = require('playwright');--(async () => {- const root = '/workspace/frontend-modern';- const artifacts = path.join(root, 'node_modules', 'probe-guidance-browser');- fs.mkdirSync(artifacts, { recursive: true });- 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-probe-guidance'),- server: { host: '127.0.0.1', port: 5253, strictPort: true },- optimizeDeps: { noDiscovery: true, include: [] },- });- const results = [];- let browser;- try {- await server.listen();- for (const [engine, width] of [['chromium', 1280], ['webkit', 390]]) {- browser = await { chromium, webkit }[engine].launch(engine === 'chromium'- ? { headless: true, channel: 'chromium', args: ['--no-sandbox'] }- : { headless: true });- const page = await browser.newPage({ viewport: { width, height: 1000 },- ...(engine === 'webkit' ? { isMobile: true, hasTouch: true } : {}) });- const errors = [];- page.on('pageerror', (error) => errors.push(error.message));- page.on('console', (message) => {- if (message.type() === 'error') errors.push(message.text());- });- await page.goto('http://127.0.0.1:5253/browser-tests/docs-fragment-navigation.html?scenario=configuration',- { waitUntil: 'domcontentloaded', timeout: 60_000 });- await page.getByRole('heading', { name: 'External probes (Pro)', exact: true }).waitFor();- if (engine === 'webkit') await page.evaluate(() => document.documentElement.classList.add('dark'));- const table = page.getByRole('table').filter({ has: page.getByRole('columnheader',- { name: 'Situation', exact: true }) });- assert.equal(await table.getByRole('row').count(), 4);- assert.ok(await table.evaluate((element) => {- const parent = element.parentElement;- return parent.dataset.docTableScroll !== undefined &&- getComputedStyle(parent).overflowX === 'auto' &&- [...element.querySelectorAll('thead th')].every((header) => header.scope === 'col');- }));- const assertBoundaries = async () => {- const body = (await page.locator('article').innerText()).replace(/\s+/g, ' ');- for (const text of ['The agent does not send notifications directly.',- 'Pulse server must be running and able to reach the notification destination',- 'Observation locations', 'This Pulse server', 'not a universal outage',- 'not proof the target is down', 'five minutes or three check intervals',- '31 March 2027', 'Relay is no longer sold', 'not a permanent substitute']) {- assert.ok(body.includes(text), text);- }- assert.ok(!body.includes('cannot disappear silently'));- assert.ok(await page.evaluate(() => document.documentElement.scrollWidth <= innerWidth + 1));- };- const screenshot = async (name, heading) => {- await page.getByRole('heading', { name: heading, exact: true })- .evaluate((element) => element.scrollIntoView({ block: 'start' }));- await page.evaluate(async () => {- await new Promise((resolve) => requestAnimationFrame(() => requestAnimationFrame(resolve)));- await Promise.all(document.getAnimations().map((animation) => animation.finished.catch(() => {})));- });- await page.screenshot({ path: path.join(artifacts, `${engine}-${name}.png`) });- };- const follow = async (name, href, heading, id) => {- const link = page.getByRole('link', { name, exact: true });- assert.equal(await link.getAttribute('href'), href);- await link.focus();- await page.keyboard.press('Enter');- await page.waitForURL(`**${href}`);- await page.getByRole('heading', { name: heading, exact: true }).waitFor();- if (id) await page.waitForFunction((id) => document.activeElement?.id === id, id);- };- await assertBoundaries();- await screenshot('configuration', 'External probes (Pro)');- await follow('agent probe guide', '/docs/UNIFIED_AGENT#external-probes-pro',- 'External Probes (Pro)', 'external-probes-pro');- await assertBoundaries();- const agentBody = (await page.locator('article').innerText()).replace(/\s+/g, ' ');- for (const text of ['up to 200 observations', 'Oldest pending observations are dropped',- 'agent restart loses the queue', 'not a complete outage record']) assert.ok(agentBody.includes(text), text);- await screenshot('agent', 'External Probes (Pro)');- await follow('external watchdog', '/docs/TROUBLESHOOTING#no-alert-when-pulse-power-or-internet-goes-down',- 'No alert when Pulse, power or internet goes down', 'no-alert-when-pulse-power-or-internet-goes-down');- assert.ok((await page.locator('article').innerText()).includes('period plus grace'));- await screenshot('watchdog', 'No alert when Pulse, power or internet goes down');- await page.goBack();- await page.getByRole('heading', { name: 'External Probes (Pro)', exact: true }).waitFor();- await follow('Mobile retirement', '/docs/RELAY', 'Relay / Pulse Mobile', '');- assert.ok((await page.locator('article').innerText()).includes('31 March 2027'));- await page.goBack();- await page.getByRole('heading', { name: 'External Probes (Pro)', exact: true }).waitFor();- await follow('configuration guide', '/docs/CONFIGURATION#external-probes-pro',- 'External probes (Pro)', 'external-probes-pro');- await follow('target fields', '/docs/API#availability-checks',- 'Availability Checks', 'availability-checks');- assert.ok((await page.locator('article').innerText()).includes('clear probeAgentId to ""'));- await page.goBack();- await page.getByRole('heading', { name: 'External probes (Pro)', exact: true }).waitFor();- await follow('external watchdog', '/docs/TROUBLESHOOTING#no-alert-when-pulse-power-or-internet-goes-down',- 'No alert when Pulse, power or internet goes down', 'no-alert-when-pulse-power-or-internet-goes-down');- assert.deepEqual(errors, []);- results.push({ engine, version: browser.version(), width,- scope: engine === 'webkit' ? 'phone-emulated, not a native device' : 'desktop',- serverDependencyVisible: true, semanticContainedCoverageTable: true,- noDocumentOverflow: true, queueAndRetirementLimitsVisible: true,- keyboardAgentGuide: true, keyboardConfigurationGuide: true,- keyboardWatchdogLinks: 2, keyboardRetirementLink: true, keyboardCanonicalApiFields: true, errors });- await browser.close();- browser = undefined;- }- const files = ['public/docs/CONFIGURATION.md', 'public/docs/UNIFIED_AGENT.md', 'public/docs/API.md',- 'browser-tests/probe-guidance.cjs', 'browser-tests/docs-fragment-navigation.tsx',- 'src/features/docs/docMarkdown.ts', 'src/pages/Docs.tsx'].map((file) => ({ file,- sha256: crypto.createHash('sha256').update(fs.readFileSync(path.join(root, file))).digest('hex') }));- const result = { result: 'passed', playwright: require('playwright/package.json').version,- scope: 'existing shipped Docs rendering and keyboard links only; no native outage or delivery acceptance',- files, results };- fs.writeFileSync(path.join(artifacts, 'result.json'), JSON.stringify(result, null, 2) + '\n');- console.log(JSON.stringify(result));- } finally {- if (browser) await browser.close();- await server.close();- }-})().catch((error) => { console.error(error); process.exitCode = 1; });diff --git a/frontend-modern/browser-tests/proxmox-collection-safety.cjs b/frontend-modern/browser-tests/proxmox-collection-safety.cjsdeleted file mode 100644index fccd2bc9b3..0000000000--- a/frontend-modern/browser-tests/proxmox-collection-safety.cjs+++ /dev/null@@ -1,380 +0,0 @@-// Source-bound offline consumer checks; no live connection test or guest request.-const assert = require('node:assert/strict');-const fs = require('node:fs');-const path = require('node:path');-const crypto = require('node:crypto');-const { chromium, webkit } = require('playwright');--(async () => {- const root = '/workspace/frontend-modern';- const artifacts = '/workspace/tmp/collection-browser';- fs.mkdirSync(artifacts, { recursive: true });- const inputs = [- 'frontend-modern/src/components/Settings/NodeModalMonitoringSection.tsx',- 'frontend-modern/src/components/Settings/useNodeModalState.ts',- 'frontend-modern/src/components/Settings/ConnectionEditor/CredentialSlots/NodeCredentialSlot.tsx',- 'frontend-modern/src/utils/nodeModalPresentation.ts',- 'frontend-modern/src/components/shared/InlineNotice.tsx',- 'frontend-modern/src/components/shared/Toggle.tsx',- 'frontend-modern/src/components/shared/useToggleState.ts',- 'frontend-modern/src/index.css',- 'frontend-modern/package.json',- 'frontend-modern/package-lock.json',- 'frontend-modern/browser-tests/proxmox-collection-safety.tsx',- 'frontend-modern/browser-tests/proxmox-collection-safety.html',- 'frontend-modern/browser-tests/proxmox-collection-safety.cjs',- ];- const hash = (raw) => crypto.createHash('sha256').update(raw).digest('hex');- const inputHashes = Object.fromEntries(- inputs.map((file) => [file, hash(fs.readFileSync(path.join('/workspace', file)))]),- );- 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'),- server: { host: '127.0.0.1', port: 5243, strictPort: true },- });- const cases = [];- const accessibleDescription = async (locator) =>- locator.evaluate((node) =>- (node.getAttribute('aria-describedby') || '')- .split(/\s+/)- .filter(Boolean)- .map((id) => {- const help = document.getElementById(id);- if (!help) throw new Error(`Missing description ${id}`);- return help.textContent.trim().replace(/\s+/g, ' ');- })- .join(' '),- );- const observedAX = async (page, locator) => {- const selector = await locator.evaluate((node) => {- const attr = node.hasAttribute('aria-labelledby') ? 'aria-labelledby' : 'aria-describedby';- return `[${attr}="${node.getAttribute(attr)}"]`;- });- const session = await page.context().newCDPSession(page);- try {- const { root } = await session.send('DOM.getDocument');- const { nodeId } = await session.send('DOM.querySelector', { nodeId: root.nodeId, selector });- const { nodes } = await session.send('Accessibility.getPartialAXTree', {- nodeId,- fetchRelatives: false,- });- assert.equal(nodes.length, 1);- return {- role: nodes[0].role?.value,- name: nodes[0].name?.value,- description: nodes[0].description?.value,- properties: nodes[0].properties,- };- } finally {- await session.detach();- }- };- const result = {- inputHashes,- playwright: require('playwright/package.json').version,- graph: {- solid: JSON.parse(fs.readFileSync(path.join(root, 'node_modules/solid-js/package.json')))- .version,- seroval: JSON.parse(fs.readFileSync(path.join(root, 'node_modules/seroval/package.json')))- .version,- },- cases,- };- let browser;- try {- await server.listen();- for (const engine of ['chromium', 'webkit']) {- browser = await { chromium, webkit }[engine].launch(- engine === 'chromium'- ? { headless: true, channel: 'chromium', args: ['--no-sandbox'] }- : { headless: true },- );- const phone = engine === 'webkit';- const viewport = phone ? { width: 390, height: 844 } : { width: 1280, height: 900 };- for (const type of ['pve', 'pbs', 'pmg']) {- const page = await browser.newPage({- viewport,- ...(phone ? { isMobile: true, hasTouch: true } : {}),- });- const errors = [];- const requests = [];- const row = {- engine,- type,- viewport,- phase: 'initial-render',- errors,- requests,- consoleErrors: [],- };- cases.push(row);- page.on('console', (message) => {- if (message.type() === 'error') row.consoleErrors.push(message.text());- });- page.on('pageerror', (error) => errors.push(error.message));- await page.route('**/api/**', async (route) => {- // Vite also serves /src/api/*.ts modules; those are source, not live APIs.- if (!new URL(route.request().url()).pathname.startsWith('/api/')) return route.continue();- requests.push({- method: route.request().method(),- path: new URL(route.request().url()).pathname,- });- await route.abort();- });- await page.goto(- `http://127.0.0.1:5243/browser-tests/proxmox-collection-safety.html?type=${type}`,- );- await page- .getByRole('heading', { name: `Edit ${type.toUpperCase()} connection` })- .waitFor()- .catch(async (error) => {- row.body = await page- .locator('body')- .innerText()- .catch(() => 'unavailable');- row.failureCapture = `${engine}-${type}-failure.png`;- await page.screenshot({- path: path.join(artifacts, row.failureCapture),- fullPage: true,- });- throw error;- });- if (phone) await page.evaluate(() => document.documentElement.classList.add('dark'));- const ssl = page.getByRole('checkbox', { name: 'Verify SSL certificate', exact: true });- assert.equal(await ssl.isChecked(), true);- const precaution = page.getByRole('note', {- name: 'Guest-agent backup precaution',- exact: true,- });- const scope =- type === 'pve'- ? page.getByRole('region', { name: 'Collection scope', exact: true })- : page.locator('div.space-y-3').filter({- has: page.getByRole('heading', { name: 'Collection scope', exact: true }),- });- assert.equal(await scope.count(), 1);- if (type === 'pve') {- await precaution.waitFor();- const text = await scope.innerText();- for (const sentence of [- 'Guest details depend on guest-agent availability and permissions.',- 'Some readings can be unavailable or temporarily deferred.',- 'stop Pulse monitoring and leave it stopped',- 'independent checks confirm thaw and writes to every filesystem covered by the backup',- 'Do not run live diagnostics or restart the guest agent during the incident.',- 'An OK backup or a running VM does not prove recovery.',- ])- assert.ok(text.includes(sentence), sentence);- assert.ok(!text.includes('full visibility without extra configuration'));- } else {- assert.equal(await precaution.count(), 0);- assert.ok(!(await scope.innerText()).includes('guest-agent reads'));- }- const label =- type === 'pve'- ? /^Virtual machines/- : type === 'pbs'- ? /^Datastores/- : /^Queue health insights/;- const collector = page.getByRole('checkbox', { name: label });- assert.equal(await collector.isChecked(), true);- if (type === 'pve') {- const description = await accessibleDescription(collector);- row.vmDescription = description;- assert.ok(description.startsWith('VM state and resource usage.'));- assert.ok(- description.includes(- 'independent checks confirm thaw and writes to every filesystem covered by the backup',- ),- );- assert.ok(- description.includes(- 'Do not run live diagnostics or restart the guest agent during the incident.',- ),- );- assert.ok(description.includes('An OK backup or a running VM does not prove recovery.'));- assert.equal(- await page.getByRole('checkbox', { name: 'Virtual machines', exact: true }).count(),- 1,- );- if (engine === 'chromium') {- row.vmAXChecked = await observedAX(page, collector);- assert.equal(row.vmAXChecked.name, 'Virtual machines');- assert.equal(row.vmAXChecked.description, description);- }- row.independentCollectors = [];- for (const [name, help] of [- ['Containers', 'LXC container state and resource usage.'],- ['Storage', 'Per-storage capacity, status, and content type breakdown.'],- ['Backups', 'vzdump schedules and recent backup activity.'],- ]) {- const control = page.getByRole('checkbox', { name, exact: true });- assert.equal(await accessibleDescription(control), help);- if (phone) {- await page.getByText(name, { exact: true }).tap();- assert.equal(await control.isChecked(), false);- await page.getByText(name, { exact: true }).tap();- } else {- await control.focus();- await page.keyboard.press('Space');- assert.equal(await control.isChecked(), false);- await page.keyboard.press('Space');- }- assert.equal(await control.isChecked(), true);- const ax = engine === 'chromium' ? await observedAX(page, control) : undefined;- if (ax) {- assert.equal(ax.name, name);- assert.equal(ax.description, help);- }- row.independentCollectors.push({ name, description: help, ax });- }- const warning =- 'This will spin up idle HDDs. Leave disabled if you rely on drive standby.';- const smart = page.getByRole('button', {- name: 'Enable physical disk monitoring',- exact: true,- });- assert.equal(await smart.getAttribute('aria-pressed'), 'false');- assert.equal(await accessibleDescription(smart), warning);- if (engine === 'chromium') {- row.smartAXDisabled = await observedAX(page, smart);- assert.equal(row.smartAXDisabled.description, warning);- }- if (phone) await smart.tap();- else {- await smart.focus();- await page.keyboard.press('Space');- }- const enabledSmart = page.getByRole('button', {- name: 'Disable physical disk monitoring',- exact: true,- });- assert.equal(await enabledSmart.getAttribute('aria-pressed'), 'true');- assert.equal(await accessibleDescription(enabledSmart), warning);- await page- .getByRole('combobox', { name: 'Physical disk health polling interval', exact: true })- .waitFor();- if (engine === 'chromium') {- row.smartAXEnabled = await observedAX(page, enabledSmart);- assert.equal(row.smartAXEnabled.description, warning);- }- if (phone) await enabledSmart.tap();- else await page.keyboard.press('Space');- assert.equal(await smart.getAttribute('aria-pressed'), 'false');- row.smartCapture = `${engine}-pve-smart.png`;- await smart- .locator('..')- .locator('..')- .screenshot({ path: path.join(artifacts, row.smartCapture) });- }- if (phone) await collector.tap();- else {- await collector.focus();- await page.keyboard.press('Space');- }- assert.equal(await collector.isChecked(), false);- if (type === 'pve') {- assert.equal(await accessibleDescription(collector), row.vmDescription);- if (engine === 'chromium') {- row.vmAXUnchecked = await observedAX(page, collector);- assert.equal(row.vmAXUnchecked.name, 'Virtual machines');- assert.equal(row.vmAXUnchecked.description, row.vmDescription);- }- }- const geometry = await scope.evaluate((node) => {- const rect = node.getBoundingClientRect();- return {- x: rect.x,- right: rect.right,- width: rect.width,- scrollWidth: document.documentElement.scrollWidth,- viewportWidth: innerWidth,- };- });- assert.ok(geometry.x >= 0 && geometry.right <= viewport.width + 1, 'scope fits viewport');- assert.ok(- geometry.scrollWidth <= geometry.viewportWidth + 1,- 'no horizontal page overflow',- );- const capture = path.join(artifacts, `${engine}-${type}-collection.png`);- await scope.screenshot({ path: capture });- const save = page.getByRole('button', { name: 'Save changes', exact: true });- if (phone) await save.tap();- else await save.click();- await page.waitForFunction(- () => document.querySelector('[data-testid="save-finished"]').textContent === 'true',- );- const saved = JSON.parse(await page.getByTestId('save-result').innerText());- assert.equal(saved.targetId, `${type}-fixture`, 'save keeps the existing edit target');- assert.equal(saved.data.type, type);- assert.equal(saved.data.verifySSL, true);- assert.ok(- !('tokenValue' in saved.data) && !('password' in saved.data),- 'existing credential is not replaced',- );- if (type === 'pve') {- assert.equal(saved.data.monitorVMs, false);- for (const key of ['monitorContainers', 'monitorStorage', 'monitorBackups'])- assert.equal(saved.data[key], true);- assert.equal(saved.data.monitorPhysicalDisks, false);- assert.equal(- await precaution.isVisible(),- true,- 'collector choice is not recovery evidence',- );- } else if (type === 'pbs') {- assert.equal(saved.data.monitorDatastores, false);- assert.equal(saved.data.monitorSyncJobs, true);- } else {- assert.equal(saved.data.monitorQueues, false);- assert.equal(saved.data.monitorMailStats, true);- }- await page.waitForTimeout(200);- assert.deepEqual(requests, [], 'no probe, token, collector, or other API request');- assert.deepEqual(errors, [], 'no page exceptions');- assert.deepEqual(row.consoleErrors, [], 'no console errors');- const bytes = fs.readFileSync(capture);- Object.assign(row, {- phase: 'complete',- engine,- browser: browser.version(),- viewport,- type,- theme: phone ? 'dark' : 'light',- geometry,- saved,- requests,- errors,- capture: path.basename(capture),- bytes: bytes.length,- sha256: hash(bytes),- passed: true,- });- await page.close();- }- await browser.close();- browser = null;- }- result.passed = true;- } catch (error) {- result.passed = false;- result.error = error.stack;- throw error;- } finally {- fs.writeFileSync(path.join(artifacts, 'result.json'), JSON.stringify(result, null, 2) + '\n');- if (browser) await browser.close();- await server.close();- console.log(- JSON.stringify({- result: '/workspace/tmp/collection-browser/result.json',- passed: result.passed,- cases: cases.length,- }),- );- }-})().catch((error) => {- console.error(error);- process.exitCode = 1;-});diff --git a/frontend-modern/browser-tests/proxmox-collection-safety.html b/frontend-modern/browser-tests/proxmox-collection-safety.htmldeleted file mode 100644index a6f41da7b6..0000000000--- a/frontend-modern/browser-tests/proxmox-collection-safety.html+++ /dev/null@@ -1,12 +0,0 @@-<!doctype html>-<html lang="en">- <head>- <meta charset="utf-8" />- <meta name="viewport" content="width=device-width, initial-scale=1.0" />- <title>Proxmox collection safety fixture</title>- </head>- <body>- <div id="root"></div>- <script type="module" src="./proxmox-collection-safety.tsx"></script>- </body>-</html>diff --git a/frontend-modern/browser-tests/proxmox-collection-safety.tsx b/frontend-modern/browser-tests/proxmox-collection-safety.tsxdeleted file mode 100644index 3d0eb5654e..0000000000--- a/frontend-modern/browser-tests/proxmox-collection-safety.tsx+++ /dev/null@@ -1,69 +0,0 @@-// Exercise the actual connection editor and save payload without a live host.-import { createSignal } from 'solid-js';-import { render } from 'solid-js/web';-import { NodeCredentialSlot } from '../src/components/Settings/ConnectionEditor/CredentialSlots/NodeCredentialSlot';-import type { InfrastructurePlatformSettingsProps } from '../src/components/Settings/proxmoxSettingsModel';-import type { NodeConfigWithStatus } from '../src/types/nodes';-import '../src/index.css';--function Fixture() {- const parameters = new URLSearchParams(location.search);- const requestedType = parameters.get('type');- const type = requestedType === 'pbs' || requestedType === 'pmg' ? requestedType : 'pve';- const [saved, setSaved] = createSignal<unknown>(null);- const [finished, setFinished] = createSignal(false);- const source = {- id: `${type}-fixture`,- type,- name: `Fixture ${type.toUpperCase()}`,- host: `https://${type}.example.invalid:${type === 'pbs' ? 8007 : 8006}`,- user: 'monitoring@pam',- tokenName: 'monitoring@pam!fixture',- hasToken: true,- verifySSL: parameters.get('verify') !== 'false',- fingerprint: parameters.get('pin') === 'fixture' ? 'ab:'.repeat(31) + 'ab' : '',- monitorVMs: true,- monitorContainers: true,- monitorStorage: true,- monitorBackups: true,- monitorPhysicalDisks: false,- monitorDatastores: true,- monitorSyncJobs: true,- monitorVerifyJobs: true,- monitorPruneJobs: true,- monitorGarbageJobs: true,- excludeDatastores: [],- monitorMailStats: true,- monitorQueues: true,- monitorQuarantine: true,- monitorDomainStats: true,- status: 'connected',- } as NodeConfigWithStatus;- const settings = {- securityStatus: () => null,- resolveTemperatureMonitoringEnabled: () => false,- temperatureMonitoringLocked: () => false,- savingTemperatureSetting: () => false,- handleNodeTemperatureMonitoringChange: async () => {},- handleTemperatureMonitoringChange: async () => {},- saveNode: async (data, target) => {- setSaved({ data, targetId: target?.id });- return true;- },- } as InfrastructurePlatformSettingsProps;- return (- <main class="mx-auto max-w-3xl bg-base p-4 text-base-content">- <h1 class="mb-4 text-lg font-semibold">Edit {type.toUpperCase()} connection</h1>- <NodeCredentialSlot- nodeType={type}- editingNode={source}- settings={settings}- onCancel={() => {}}- onSaved={() => setFinished(true)}- />- <output data-testid="save-result">{JSON.stringify(saved())}</output>- <output data-testid="save-finished">{String(finished())}</output>- </main>- );-}-render(() => <Fixture />, document.getElementById('root')!);diff --git a/frontend-modern/browser-tests/proxmox-private-input.cjs b/frontend-modern/browser-tests/proxmox-private-input.cjsdeleted file mode 100644index abc346a213..0000000000--- a/frontend-modern/browser-tests/proxmox-private-input.cjs+++ /dev/null@@ -1,238 +0,0 @@-// Browser checks only; server responses are synthetic, not installed bootstrap.-const assert = require('node:assert/strict');-const fs = require('node:fs');-const path = require('node:path');-const { chromium, webkit } = require('playwright');-(async () => {- const root = '/workspace/frontend-modern';- 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'),- server: { host: '127.0.0.1', port: 5237, strictPort: true },- });- const engine = process.argv.includes('--phone') ? 'webkit' : 'chromium';- const width = engine === 'webkit' ? 390 : 1280;- const artifacts = path.join(root, 'node_modules', `proxmox-private-${engine}`);- fs.mkdirSync(artifacts, { recursive: true });- let browser;- const observations = [];- try {- await server.listen();- browser = await { chromium, webkit }[engine].launch(- engine === 'chromium'- ? { headless: true, channel: 'chromium', args: ['--no-sandbox'] }- : { headless: true },- );- for (const type of ['pve', 'pbs']) {- const page = await browser.newPage({- viewport: { width, height: 900 },- ...(engine === 'webkit' ? { isMobile: true, hasTouch: true } : {}),- });- const errors = [];- page.on('pageerror', (e) => errors.push(e.message));- await page.addInitScript(() => {- window.__copies = [];- Object.defineProperty(navigator, 'clipboard', {- value: {- writeText: async (value) => {- window.__copies.push(value);- },- },- });- });- let count = 0;- let holdEndpoint, releaseHeld, sawHeld;- await page.route('**/api/**', async (route) => {- const url = new URL(route.request().url());- if (!url.pathname.startsWith('/api/')) return route.continue();- if (url.pathname === holdEndpoint) {- holdEndpoint = undefined;- await new Promise((resolve) => {- releaseHeld = resolve;- sawHeld();- });- }- if (url.pathname === '/api/setup-script-url') {- count++;- const body = route.request().postDataJSON();- assert.equal(body.type, type);- const scriptURL = `http://127.0.0.1:5237/api/setup-script?type=${type}`;- const command = `( curl -fsSL '${scriptURL}' -o "$install_script"; sudo bash -c 'read -r -s pulse_token; PULSE_SETUP_TOKEN_FILE="$token_file" bash "$1"'; )`;- return route.fulfill({- json: {- type,- host: body.host,- url: scriptURL,- downloadURL: scriptURL,- scriptFileName: `pulse-setup-${type}.sh`,- command,- commandWithEnv: command,- commandWithoutEnv: command,- setupToken: 'a'.repeat(32),- tokenHint: 'aaa…aaa',- expires: Math.floor(Date.now() / 1000) + 300,- },- });- }- if (url.pathname === '/api/agent-install-command') {- const body = route.request().postDataJSON();- assert.equal(body.type, type);- assert.equal(body.enableCommands, false);- assert.equal(body.insecure, false);- return route.fulfill({- json: {- command:- '( bash "$install_script" --preflight-only; sudo bash -c \'read -r -s pulse_token; bash "$1" --token-file "$token_file" --enable-proxmox\'; )',- token: 'b'.repeat(32),- },- });- }- if (url.pathname === '/api/setup-script') {- assert.ok(!url.searchParams.has('setup_token'));- return route.fulfill({- status: 200,- contentType: 'text/x-shellscript; charset=utf-8',- headers: { 'Content-Disposition': `attachment; filename="pulse-setup-${type}.sh"` },- body: '#!/bin/bash\n# no credential in the download\n',- });- }- return route.fulfill({ json: { data: [] } });- });- await page.goto(- `http://127.0.0.1:5237/browser-tests/proxmox-private-input.html?type=${type}`,- );- await page.locator('h1').waitFor();- if (engine === 'webkit')- await page.evaluate(() => document.documentElement.classList.add('dark'));- console.log(- JSON.stringify({- type,- errors,- buttons: await page.getByRole('button').allTextContents(),- body: (await page.locator('body').innerText()).slice(0, 300),- }),- );- const copy = page.getByRole('button', { name: 'Copy command', exact: true });- await copy.first().click();- let dialog = page.getByRole('dialog', { name: 'API token ready' });- await dialog.waitFor();- await page.waitForFunction(() => {- const panel = document.querySelector('[role="dialog"]');- return panel && getComputedStyle(panel).opacity === '1';- });- assert.ok((await dialog.innerText()).includes('silent “Pulse setup token” prompt'));- assert.ok(!(await page.evaluate(() => window.__copies[0])).includes('a'.repeat(32)));- await page.screenshot({ path: path.join(artifacts, `${type}-setup.png`), fullPage: true });- const tokenButton = dialog.getByRole('button', { name: 'Copy token', exact: true });- await tokenButton.focus();- await page.keyboard.press('Enter');- assert.equal(await page.evaluate(() => window.__copies.at(-1)), 'a'.repeat(32));- await page.keyboard.press('Escape');- await dialog.waitFor({ state: 'hidden' });- await copy.first().click();- await dialog.waitFor();- assert.equal(count, 1, 'live setup artifact must be reused');- await dialog.getByRole('button', { name: 'Dismiss', exact: true }).click();- await page.getByRole('button', { name: 'Close setup', exact: true }).click();- assert.equal(await page.getByTestId('cache-state').innerText(), 'empty');- await page.getByRole('button', { name: 'Reopen setup', exact: true }).click();- await copy.first().click();- await dialog.waitFor();- assert.equal(count, 2, 'closed modal must not retain its setup secret');- await dialog.getByRole('button', { name: 'Dismiss', exact: true }).click();- await page.getByText('Alternative: Download script manually', { exact: true }).click();- await page.getByRole('button', { name: 'Download setup script', exact: true }).click();- await dialog.waitFor();- assert.equal(count, 2, 'download must reuse the live credential-free artifact');- await dialog.getByRole('button', { name: 'Dismiss', exact: true }).click();- await page.getByRole('button', { name: 'Host Telemetry Agent', exact: true }).click();- await page- .getByRole('button', {- name: type === 'pbs' ? 'Copy to clipboard' : 'Copy command',- exact: true,- })- .first()- .click();- await dialog.waitFor();- await page.waitForFunction(() => {- const panel = document.querySelector('[role="dialog"]');- return panel && getComputedStyle(panel).opacity === '1';- });- assert.ok((await dialog.innerText()).includes('silent “Pulse agent token” prompt'));- assert.ok(!(await page.evaluate(() => window.__copies.at(-1))).includes('b'.repeat(32)));- await page.screenshot({ path: path.join(artifacts, `${type}-agent.png`), fullPage: true });- await dialog.getByRole('button', { name: 'Copy token', exact: true }).click();- assert.equal(await page.evaluate(() => window.__copies.at(-1)), 'b'.repeat(32));- await dialog.getByRole('button', { name: 'Dismiss', exact: true }).click();- // A late issuance must not repopulate a closed modal's secret cache- // or reopen the global reveal dialog after the user has left the flow.- for (const endpoint of ['/api/setup-script-url', '/api/agent-install-command']) {- const closeSetup = page.getByRole('button', { name: 'Close setup', exact: true });- if (await closeSetup.count()) await closeSetup.click();- await page.getByRole('button', { name: 'Reopen setup', exact: true }).click();- if (endpoint.includes('agent-install'))- await page.getByRole('button', { name: 'Host Telemetry Agent', exact: true }).click();- else await page.getByRole('button', { name: /Connect via API/ }).click();- holdEndpoint = endpoint;- let deadline;- const held = new Promise((resolve, reject) => {- sawHeld = resolve;- deadline = setTimeout(() => reject(new Error('held request not observed')), 15000);- });- const nextCopy = page- .getByRole('button', {- name:- endpoint.includes('agent-install') && type === 'pbs'- ? 'Copy to clipboard'- : 'Copy command',- exact: true,- })- .first();- await nextCopy.click();- await held;- clearTimeout(deadline);- await page.getByRole('button', { name: 'Close setup', exact: true }).click();- const completed = page.waitForResponse(- (response) => new URL(response.url()).pathname === endpoint,- );- releaseHeld();- await completed;- await page.waitForTimeout(200); // allow the actual promise continuation, not an API retry- assert.equal(await page.getByTestId('cache-state').innerText(), 'empty');- assert.equal(await page.getByRole('dialog').count(), 0);- }- assert.deepEqual(errors, []);- observations.push({- type,- engine,- width,- setupRequests: count,- credentialFreeCopies: true,- separateTokenCopy: true,- cacheClose: true,- lateIssuanceDiscarded: true,- commandsEnabled: false,- insecure: false,- });- await page.close();- }- fs.writeFileSync(- path.join(artifacts, 'result.json'),- JSON.stringify(- {- playwright: require('playwright/package.json').version,- browser: browser.version(),- observations,- },- null,- 2,- ),- );- console.log(JSON.stringify({ engine, browser: browser.version(), observations, artifacts }));- } finally {- if (browser) await browser.close();- await server.close();- }-})();diff --git a/frontend-modern/browser-tests/proxmox-private-input.html b/frontend-modern/browser-tests/proxmox-private-input.htmldeleted file mode 100644index b88f0ce1e9..0000000000--- a/frontend-modern/browser-tests/proxmox-private-input.html+++ /dev/null@@ -1,12 +0,0 @@-<!doctype html>-<html lang="en">- <head>- <meta charset="utf-8" />- <meta name="viewport" content="width=device-width, initial-scale=1.0" />- <title>Proxmox private input fixture</title>- </head>- <body>- <div id="root"></div>- <script type="module" src="./proxmox-private-input.tsx"></script>- </body>-</html>diff --git a/frontend-modern/browser-tests/proxmox-private-input.tsx b/frontend-modern/browser-tests/proxmox-private-input.tsxdeleted file mode 100644index cf4b982d69..0000000000--- a/frontend-modern/browser-tests/proxmox-private-input.tsx+++ /dev/null@@ -1,54 +0,0 @@-// Real settings state, setup section and existing token dialog; synthetic APIs.-import { createSignal, Show } from 'solid-js';-import type { NodeConfig } from '../src/types/nodes';-import { render } from 'solid-js/web';-import { useNodeModalState } from '../src/components/Settings/useNodeModalState';-import { NodeModalSetupGuideSection } from '../src/components/Settings/NodeModalSetupGuideSection';-import { TokenRevealDialog } from '../src/components/TokenRevealDialog';-import '../src/index.css';--const Fixture = () => {- const type = new URLSearchParams(location.search).get('type') === 'pbs' ? 'pbs' : 'pve';- const [open, setOpen] = createSignal(true);- const props = {- get isOpen() {- return open();- },- nodeType: type,- prefillNode: {- type,- name: `${type} fixture`,- host: `https://${type}.example:${type === 'pbs' ? 8007 : 8006}`,- verifySSL: true,- } as NodeConfig,- onClose() {- setOpen(false);- },- onSave: async () => {},- };- const state = useNodeModalState(props);- return (- <main class="mx-auto max-w-2xl p-4 bg-base text-base-content">- <h1 class="text-lg mb-3">Connect a Proxmox server</h1>- <button- type="button"- class="border border-border p-3 mb-3"- onClick={() => {- setOpen(!open());- if (open())- state.updateField('host', `https://${type}.example:${type === 'pbs' ? 8007 : 8006}`);- }}- >- {open() ? 'Close setup' : 'Reopen setup'}- </button>- <Show when={open()}>- <NodeModalSetupGuideSection modalProps={props} state={state} />- </Show>- <output data-testid="cache-state">- {state.quickSetupCommandReady() ? 'ready' : 'empty'}- </output>- <TokenRevealDialog />- </main>- );-};-render(() => <Fixture />, document.getElementById('root')!);diff --git a/frontend-modern/browser-tests/proxmox-tabs-2321-hook.ts b/frontend-modern/browser-tests/proxmox-tabs-2321-hook.tsdeleted file mode 100644index 37f37fc1f1..0000000000--- a/frontend-modern/browser-tests/proxmox-tabs-2321-hook.ts+++ /dev/null@@ -1,49 +0,0 @@-// Browser-only resource-hook seam for #2321. The production page and shared-// tab rail stay real; source-scoped facets/resources are synthetic and switch-// on command. Global counts deliberately contain unrelated provider rows.-import { createSignal } from 'solid-js';-import type { Resource } from '../src/types/resource';-import type { UnifiedResourceFacets } from '../src/hooks/useUnifiedResources';--export * from '../src/hooks/useUnifiedResources';--const pbs = {- id: 'pbs-only', type: 'pbs', name: 'pbs-only', displayName: 'pbs-only',- platformId: 'pbs-only', platformType: 'proxmox-pbs', sourceType: 'api',- sources: ['pbs'], status: 'online', lastSeen: Date.now(),- pbs: { instanceId: 'pbs-only', hostname: 'pbs-only', datastores: [] },-} as Resource;-const pmg = {- id: 'pmg-one', type: 'pmg', name: 'pmg-one', displayName: 'pmg-one',- platformId: 'pmg-one', platformType: 'proxmox-pmg', sourceType: 'api',- sources: ['pmg'], status: 'online', lastSeen: Date.now(),-} as Resource;--const [counts, setCounts] = createSignal<UnifiedResourceFacets | null>(null);-(window as unknown as { __proxmoxTabProof: { setCounts: typeof setCounts } }).__proxmoxTabProof = {- setCounts,-};--export function useUnifiedResources(options?: { cacheKey?: string }) {- const resources = () => {- switch (options?.cacheKey) {- case 'proxmox-backups-shell':- return [pbs];- case 'proxmox-mail':- return [pmg];- default:- return [] as Resource[];- }- };- return {- resources,- aggregations: () => ({ total: 5, byType: { storage: 1, vm: 1, ceph: 1, pmg: 1 } }),- facets: options?.cacheKey === 'proxmox-tab-evidence' ? counts : () => null,- policyPosture: () => null,- resourceSnapshotChange: () => ({ version: 0, changedIds: null }),- loading: () => false,- error: () => null,- refetch: async () => resources(),- mutate: () => resources(),- };-}diff --git a/frontend-modern/browser-tests/proxmox-tabs-2321-run.json b/frontend-modern/browser-tests/proxmox-tabs-2321-run.jsondeleted file mode 100644index 439e716a48..0000000000--- a/frontend-modern/browser-tests/proxmox-tabs-2321-run.json+++ /dev/null@@ -1 +0,0 @@-{"width":1365}diff --git a/frontend-modern/browser-tests/proxmox-tabs-2321.cjs b/frontend-modern/browser-tests/proxmox-tabs-2321.cjsdeleted file mode 100644index dd931c441a..0000000000--- a/frontend-modern/browser-tests/proxmox-tabs-2321.cjs+++ /dev/null@@ -1,119 +0,0 @@-// #2321 browser proof: production Proxmox page and tab rail with a synthetic-// reactive resource-hook seam. No live API, credentials or reporter data.-const assert = require('node:assert/strict');-const fs = require('node:fs');-const path = require('node:path');-const { chromium } = require('playwright');--(async () => {- const root = '/workspace/frontend-modern';- const artifacts = path.join(root, 'browser-tests');- const width = JSON.parse(fs.readFileSync(path.join(artifacts, 'proxmox-tabs-2321-run.json'), 'utf8')).width;- assert.ok(width === 1365 || width === 390);- process.chdir(root);- const { createServer } = await import(path.join(root, 'node_modules/vite/dist/node/index.js'));- const { default: solid } = await import(path.join(root, 'node_modules/vite-plugin-solid/dist/esm/index.mjs'));- const server = await createServer({- root,- configFile: false,- plugins: [solid()],- resolve: { alias: [- { find: /^@\/hooks\/useUnifiedResources$/, replacement: path.join(artifacts, 'proxmox-tabs-2321-hook.ts') },- { find: '@', replacement: path.join(root, 'src') },- ] },- optimizeDeps: { noDiscovery: true, include: [], esbuildOptions: { target: 'esnext' } },- server: { host: '127.0.0.1', port: 5201, strictPort: true },- });- let browser;- try {- await server.listen();- browser = await chromium.launch({ headless: true, channel: 'chromium', args: ['--no-sandbox'] });- const page = await browser.newPage({ viewport: { width, height: width === 390 ? 844 : 900 } });- const pageErrors = [];- const apiRequests = [];- page.on('pageerror', (error) => pageErrors.push(error.message));- await page.routeWebSocket(/\/ws(?:\?|$)/, () => {});- await page.route('**/*', (route) => {- const url = new URL(route.request().url());- if (url.origin !== 'http://127.0.0.1:5201') return route.abort();- if (url.pathname.startsWith('/api/')) {- apiRequests.push(url.pathname);- if (url.pathname === '/api/replication/jobs') return route.fulfill({ json: { data: [] } });- return route.fulfill({ json: { data: [] } });- }- return route.continue();- });- await page.goto('http://127.0.0.1:5201/browser-tests/proxmox-tabs-2321.html?tab=mail', {- waitUntil: 'domcontentloaded', timeout: 120_000,- });- await page.getByTestId('proxmox-page').waitFor();- const nav = page.getByRole('navigation', { name: 'Proxmox sections' });- const labels = async () => (await nav.locator('a').allTextContents()).map((label) => label.trim());- const setCounts = async (byType) => page.evaluate((value) => window.__proxmoxTabProof.setCounts({ incidentCount: 0, byType: value }), byType);- const screenshot = async (state) => {- await page.evaluate(() => new Promise((resolve) => requestAnimationFrame(() => requestAnimationFrame(resolve))));- const rail = await page.evaluate(() => [...document.querySelectorAll('nav[aria-label="Proxmox sections"] a')].map((link) => ({- label: link.textContent?.trim(), current: link.getAttribute('aria-current'),- selectedClass: link.classList.contains('border-blue-500'),- })));- assert.ok(rail.every((link) => link.selectedClass === (link.current === 'page')), JSON.stringify({ state, rail }));- await page.screenshot({ path: path.join(artifacts, `proxmox-tabs-2321-${state}-${width}.png`), fullPage: true });- };-- assert.equal(new URL(page.url()).pathname, '/proxmox/mail');- assert.equal(await nav.count(), 0, 'unknown counts must not show ghost tabs');- await screenshot('unknown-direct-mail');-- await setCounts({ pbs: 1 });- await nav.waitFor();- assert.deepEqual(await labels(), ['Overview', 'Backups']);- assert.equal(await nav.getByRole('link', { name: 'Overview' }).getAttribute('aria-current'), 'page');- assert.equal(new URL(page.url()).pathname, '/proxmox/mail', 'fallback keeps the bookmarked URL');- await screenshot('pbs-only-fallback');-- const backups = nav.getByRole('link', { name: 'Backups' });- if (width === 390) {- await backups.focus();- await page.keyboard.press('Enter');- } else {- await backups.click();- }- try {- await page.waitForURL('**/proxmox/backups/date', { timeout: 5_000 });- } catch (error) {- throw new Error(JSON.stringify({ href: await backups.getAttribute('href'), url: page.url(), body: await page.locator('body').innerText(), pageErrors }), { cause: error });- }- assert.equal(new URL(page.url()).pathname, '/proxmox/backups/date');- assert.equal(await backups.getAttribute('aria-current'), 'page');- await screenshot('pbs-only-backups');-- await setCounts({ pbs: 1, storage: 1, ceph: 1, pmg: 1 });- assert.deepEqual(await labels(), ['Overview', 'Storage', 'Backups', 'Ceph', 'Mail Gateway']);- await nav.getByRole('link', { name: 'Mail Gateway' }).click();- await page.waitForURL('**/proxmox/mail');- assert.equal(new URL(page.url()).pathname, '/proxmox/mail');- assert.equal(await nav.getByRole('link', { name: 'Mail Gateway' }).getAttribute('aria-current'), 'page');- await screenshot('available-mail');-- await setCounts({ pbs: 1 });- assert.deepEqual(await labels(), ['Overview', 'Backups']);- assert.equal(await nav.getByRole('link', { name: 'Overview' }).getAttribute('aria-current'), 'page');- await screenshot('removed-mail');-- await setCounts({});- assert.equal(await nav.count(), 0);- await screenshot('no-optional-services');-- const dimensions = await page.evaluate(() => ({ scrollWidth: document.documentElement.scrollWidth, innerWidth: window.innerWidth }));- assert.ok(dimensions.scrollWidth <= dimensions.innerWidth + 1, JSON.stringify(dimensions));- assert.deepEqual(pageErrors, []);- console.log(JSON.stringify({ result: 'passed', source: 'production ProxmoxPageSurface and PlatformSectionTabs; synthetic useUnifiedResources', width, browser: browser.version(), playwright: '1.56.1', apiRequests, pageErrors, dimensions }));- await page.close();- } finally {- if (browser) await browser.close();- await server.close();- }-})().catch((error) => {- console.error(error);- process.exitCode = 1;-});diff --git a/frontend-modern/browser-tests/proxmox-tabs-2321.html b/frontend-modern/browser-tests/proxmox-tabs-2321.htmldeleted file mode 100644index a7a63aaf59..0000000000--- a/frontend-modern/browser-tests/proxmox-tabs-2321.html+++ /dev/null@@ -1,12 +0,0 @@-<!doctype html>-<html lang="en">- <head>- <meta charset="UTF-8" />- <meta name="viewport" content="width=device-width, initial-scale=1" />- <title>Proxmox tabs browser fixture</title>- </head>- <body>- <div id="root"></div>- <script type="module" src="/browser-tests/proxmox-tabs-2321.tsx"></script>- </body>-</html>diff --git a/frontend-modern/browser-tests/proxmox-tabs-2321.tsx b/frontend-modern/browser-tests/proxmox-tabs-2321.tsxdeleted file mode 100644index c501ec26b6..0000000000--- a/frontend-modern/browser-tests/proxmox-tabs-2321.tsx+++ /dev/null@@ -1,25 +0,0 @@-// Mount the production page and router; the browser runner replaces only the-// resource and replication API responses for #2321's PBS-only estate.-import { Route, Router } from '@solidjs/router';-import { render } from 'solid-js/web';-import { ProxmoxPageSurface } from '../src/features/proxmox/ProxmoxPageSurface';-import { DarkModeContext, WebSocketContext } from '../src/contexts/appRuntime';-import { getGlobalWebSocketStore } from '../src/stores/websocket-global';-import '../src/index.css';--const requested = new URLSearchParams(window.location.search).get('tab');-const tab = requested === 'mail' || requested === 'backups' ? requested : 'overview';-window.history.replaceState(null, '', `/proxmox/${tab}`);--render(- () => (- <WebSocketContext.Provider value={getGlobalWebSocketStore()}>- <DarkModeContext.Provider value={() => false}>- <Router>- <Route path="/proxmox/*" component={ProxmoxPageSurface} />- </Router>- </DarkModeContext.Provider>- </WebSocketContext.Provider>- ),- document.getElementById('root')!,-);diff --git a/frontend-modern/browser-tests/proxy-auth-help.cjs b/frontend-modern/browser-tests/proxy-auth-help.cjsdeleted file mode 100644index facdbcb7e9..0000000000--- a/frontend-modern/browser-tests/proxy-auth-help.cjs+++ /dev/null@@ -1,90 +0,0 @@-// Exercise the shipped guide through the production Docs page and router.-// This checks readable/copyable help, not an IdP or a real proxy deployment.-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');--(async () => {- const root = path.resolve('frontend-modern');- const artifacts = path.join(root, 'node_modules', 'proxy-auth-browser');- fs.mkdirSync(artifacts, { recursive: true });- const guide = fs.readFileSync(path.join(root, 'public/docs/PROXY_AUTH.md'), 'utf8');- const recipe = guide.match(/```bash\n([\s\S]*?)```/)[1].trim();- const port = 5259;- 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-proxy-auth'),- server: { host: '127.0.0.1', port, strictPort: true },- optimizeDeps: { noDiscovery: true, include: [] },- });- const results = [];- let browser;- try {- await server.listen();- for (const [engine, width, tone] of [['chromium', 1280, 'light'], ['webkit', 390, 'dark']]) {- browser = await { chromium, webkit }[engine].launch(engine === 'chromium'- ? { headless: true, channel: 'chromium', args: ['--no-sandbox'] }- : { headless: true });- const page = await browser.newPage({ viewport: { width, height: 1000 },- ...(engine === 'webkit' ? { isMobile: true, hasTouch: true } : {}) });- const errors = [];- page.on('pageerror', error => errors.push(error.message));- page.on('console', message => { if (message.type() === 'error') errors.push(message.text()); });- await page.route(new RegExp(`^http://127\\.0\\.0\\.1:${port}/api/`), route =>- route.fulfill({ status: 200, contentType: 'application/json', body: '{}' }));- await page.goto(`http://127.0.0.1:${port}/browser-tests/docs-fragment-navigation.html`,- { waitUntil: 'domcontentloaded', timeout: 60_000 });- await page.getByRole('link', { name: '← All documentation' }).click();- const entry = page.locator('a[data-doc-link][href="/docs/PROXY_AUTH"]').first();- await entry.focus();- await page.keyboard.press('Enter');- await page.getByRole('heading', { name: 'Verify Headers', exact: true }).waitFor();- if (tone === 'dark') await page.evaluate(() => document.documentElement.classList.add('dark'));- const code = page.locator('pre').filter({ hasText: 'probe_dir=$(mktemp -d)' });- await code.scrollIntoViewIfNeeded();- assert.equal((await code.locator('code').textContent()).trim(), recipe);- assert.ok((await code.textContent()).includes("--proto '=http' --noproxy 127.0.0.1"));- assert.ok(await page.evaluate(() => document.documentElement.scrollWidth <= innerWidth + 1));- const captures = [`${engine}-probe.png`, `${engine}-boundary.png`];- await page.screenshot({ path: path.join(artifacts, captures[0]) });- const warning = page.locator('p').filter({ hasText: 'explicitly bypasses proxy environment settings' });- await warning.scrollIntoViewIfNeeded();- const text = await page.locator('article').innerText();- for (const phrase of ["not those environment settings", "mistaken for Pulse's role result",- "exact backend hostname or IP", "Keep backend isolation intact",- "not a successful denial test", "not your proxy's header replacement"]) {- assert.ok(text.includes(phrase), phrase);- }- assert.ok(await page.evaluate(() => document.documentElement.scrollWidth <= innerWidth + 1));- await page.screenshot({ path: path.join(artifacts, captures[1]) });- // Fragment interaction and reload must retain the real guide and exact- // shell text, not a separately rendered copy of the example.- await page.evaluate(() => { window.location.hash = '#verify-headers'; });- await page.waitForFunction(() => document.activeElement?.id === 'verify-headers');- await page.reload({ waitUntil: 'domcontentloaded' });- await page.waitForFunction(() => document.activeElement?.id === 'verify-headers');- assert.equal((await page.locator('pre').filter({ hasText: 'probe_dir=$(mktemp -d)' })- .locator('code').textContent()).trim(), recipe);- assert.deepEqual(errors, []);- results.push({ engine, browserVersion: browser.version(), width, height: 1000, tone,- keyboardEntry: true, exactCopiedShell: true, proxyAndTransportLimits: true,- fragmentFocusAndReload: true, noPageOverflow: true, captures, errors });- await browser.close();- browser = undefined;- }- const result = { result: 'passed', verifiedAt: new Date().toISOString(),- playwrightVersion: require('playwright/package.json').version,- scope: 'Production Docs/router and copied help; not installed IdP/proxy acceptance',- docs: { 'frontend-modern/public/docs/PROXY_AUTH.md':- createHash('sha256').update(guide).digest('hex') }, results };- fs.writeFileSync(path.join(artifacts, 'result.json'), JSON.stringify(result, null, 2) + '\n');- console.log(JSON.stringify(result));- } finally {- if (browser) await browser.close();- await server.close();- }-})().catch(error => { console.error(error); process.exitCode = 1; });diff --git a/frontend-modern/browser-tests/publication-fixture-source.test.mjs b/frontend-modern/browser-tests/publication-fixture-source.test.mjsdeleted file mode 100644index 255e70de39..0000000000--- a/frontend-modern/browser-tests/publication-fixture-source.test.mjs+++ /dev/null@@ -1,37 +0,0 @@-import { describe, expect, it } from 'vitest';-import source from './publication-fixture-source.cjs';--const sha = 'a'.repeat(40);-describe('publication fixture source attribution', () => {- it('reads the actual Git head by default', () => {- expect(source.publicationSourceIdentity([], () => sha + '\n')).toEqual({- source_sha: sha,- source_identity: 'git-head',- });- });- it('never silently substitutes a supplied identity after a failed Git read', () => {- expect(() =>- source.publicationSourceIdentity([], () => {- throw new Error('Git unavailable');- }),- ).toThrow('Git unavailable');- });- it('explicitly attributes an isolated copy without trying to access an unmounted Git store', () => {- expect(- source.publicationSourceIdentity(['--source-sha', sha], () => {- throw new Error('must not read outside the isolated copy');- }),- ).toEqual({ source_sha: sha, source_identity: 'supplied-for-isolated-copy' });- });- it.each([- [],- ['--source-sha'],- ['--source-sha', 'a'.repeat(39)],- ['--source-sha', 'A'.repeat(40)],- ['--source-sha', 'main'],- ['--source-sha', sha, '--extra'],- ['--unknown', sha],- ])('rejects malformed identity or arguments %j', (...args) => {- expect(() => source.publicationSourceIdentity(args, () => 'main')).toThrow();- });-});diff --git a/frontend-modern/browser-tests/publication-reconciliation.html b/frontend-modern/browser-tests/publication-reconciliation.htmldeleted file mode 100644index 2a4a031031..0000000000--- a/frontend-modern/browser-tests/publication-reconciliation.html+++ /dev/null@@ -1,12 +0,0 @@-<!doctype html>-<html lang="en">- <head>- <meta charset="UTF-8" />- <meta name="viewport" content="width=device-width,initial-scale=1" />- <title>Publication reconciliation fixture</title>- </head>- <body>- <div id="root"></div>- <script type="module" src="./publication-reconciliation.tsx"></script>- </body>-</html>diff --git a/frontend-modern/browser-tests/publication-reconciliation.tsx b/frontend-modern/browser-tests/publication-reconciliation.tsxdeleted file mode 100644index a637066953..0000000000--- a/frontend-modern/browser-tests/publication-reconciliation.tsx+++ /dev/null@@ -1,41 +0,0 @@-// Real presentation consumers with synthetic, offline observations only.-import { render } from 'solid-js/web';-import { Router, Route } from '@solidjs/router';-import { BackupStatusCell } from '../src/components/Workloads/GuestRowCells';-import { AddressProbeStep } from '../src/components/Settings/ConnectionEditor/AddressProbeStep';-import type { ConnectionEditorState } from '../src/components/Settings/ConnectionEditor/useConnectionEditor';-import '../src/index.css';-const state = {- address: () => 'intended.example.invalid',- setAddress: () => {},- phase: () => 'error',- errorMessage: () => 'HTTP 403 Forbidden',- candidates: () => [],- probedMs: () => 0,-} as unknown as ConnectionEditorState;-function Fixture() {- return (- <main class="mx-auto max-w-xl space-y-6 p-4 text-base-content">- <h1 class="text-xl font-semibold">Backup evidence and connection guidance</h1>- <BackupStatusCell- lastBackup={Date.parse('2026-10-12T00:30:00Z')}- guestName="synthetic-guest"- guestReadEvidence={{- type: 'qemu',- platformType: 'proxmox-pve',- diskStatusReason: 'agent-redirect',- guestAgentStatus: 'unavailable',- }}- />- <AddressProbeStep state={state} onSelectCandidate={() => {}} />- </main>- );-}-render(- () => (- <Router>- <Route path="/*" component={Fixture} />- </Router>- ),- document.getElementById('root')!,-);diff --git a/frontend-modern/browser-tests/pve-helper-guidance.cjs b/frontend-modern/browser-tests/pve-helper-guidance.cjsdeleted file mode 100644index a20bd32012..0000000000--- a/frontend-modern/browser-tests/pve-helper-guidance.cjs+++ /dev/null@@ -1,123 +0,0 @@-// Real shipped Docs fetch/renderer/router, with no host or agent operation.-const fs = require('node:fs');-const path = require('node:path');-const http = require('node:http');-const crypto = require('node:crypto');-const assert = require('node:assert/strict');-const { chromium, webkit } = require('playwright');-const root = '/workspace/frontend-modern';-const preview = '/workspace/tmp/doc-command-help/static';-const output = '/workspace/tmp/pve-helper-guidance';-const anchor = 'proxmox-lxc-filesystem-readings-with-the-typed-helper';-const digest = bytes => crypto.createHash('sha256').update(bytes).digest('hex');-const bindingBytes = fs.readFileSync(path.join(preview, 'binding.json'));-const binding = JSON.parse(bindingBytes);-const result = { result: 'incomplete', source_sha: binding.source_sha,- binding_sha256: digest(bindingBytes), playwright: require('playwright/package.json').version,- cases: [], captures: [], errors: [], requests: [], served: [], cleanup: {},- limits: 'Shipped help navigation/reading only; no native PVE, helper, installed recovery or release acceptance.' };--(async () => {- let server, browser;- try {- fs.mkdirSync(output, { recursive: true });- assert.equal(result.playwright, '1.56.1');- assert.equal(result.playwright, JSON.parse(fs.readFileSync('/workspace/tests/integration/package-lock.json'))- .packages['node_modules/@playwright/test'].version);- for (const [file, hash] of Object.entries(binding.sources))- assert.equal(digest(fs.readFileSync(path.join(root, file))), hash, file);- const assets = new Map();- for (const [file, hash] of Object.entries(binding.artifacts)) {- const bytes = fs.readFileSync(path.join(preview, file));- assert.equal(digest(bytes), hash, file); assets.set(file, bytes);- }- for (const name of ['AGENT_SECURITY', 'UNIFIED_AGENT'])- assert.equal(binding.artifacts[`docs/${name}.md`], binding.sources[`public/docs/${name}.md`]);- result.source_inputs = Object.keys(binding.sources).length;- server = http.createServer((req, res) => {- if (req.method !== 'GET') { res.writeHead(405); res.end(); return; }- const pathname = new URL(req.url, 'http://fixture.invalid').pathname;- const file = pathname.startsWith('/docs/') && !pathname.endsWith('.md')- ? 'browser-tests/doc-command-help.html' : pathname.slice(1);- if (!assets.has(file)) { res.writeHead(404); res.end(); return; }- const bytes = assets.get(file);- result.served.push({ pathname, file, sha256: digest(bytes) });- const ext = path.extname(file);- res.writeHead(200, { 'Content-Type': ({ '.md': 'text/markdown', '.css': 'text/css',- '.js': 'text/javascript', '.html': 'text/html' })[ext] + '; charset=utf-8', 'Cache-Control': 'no-store' });- res.end(bytes);- });- await new Promise((resolve, reject) => {- server.once('error', reject); server.listen(0, '127.0.0.1', resolve);- });- const origin = `http://127.0.0.1:${server.address().port}`;- for (const [name, engine, width, dark] of [- ['desktop-chromium', chromium, 1360, false], ['phone-webkit', webkit, 390, true],- ]) {- browser = await engine.launch(engine === chromium- ? { headless: true, channel: 'chromium', args: ['--no-sandbox'] } : { headless: true });- const context = await browser.newContext({ viewport: { width, height: 900 },- isMobile: width < 500, hasTouch: width < 500, locale: 'en-GB' });- const page = await context.newPage(); page.setDefaultTimeout(12000);- const record = { name, width, height: 900, dark, browser: browser.version(), checks: [] };- result.cases.push(record);- page.on('pageerror', error => result.errors.push(error.message));- await page.route('**/*', route => {- const url = new URL(route.request().url()); result.requests.push({ name, path: url.pathname });- assert.equal(url.origin, origin, 'no external requests permitted');- assert(!url.pathname.startsWith('/api/'), 'help must not probe a backend');- return route.continue();- });- await page.addInitScript(dark => document.addEventListener('DOMContentLoaded', () =>- document.documentElement.classList.toggle('dark', dark)), dark);- const capture = async suffix => {- await page.evaluate(() => new Promise(resolve => requestAnimationFrame(() => requestAnimationFrame(resolve))));- assert(await page.evaluate(() => document.documentElement.scrollWidth <= innerWidth), 'page overflow');- const file = `${name}-${suffix}.png`; await page.screenshot({ path: path.join(output, file) });- result.captures.push({ file, sha256: digest(fs.readFileSync(path.join(output, file))), name });- };- const activate = async link => {- if (width < 500) await link.tap(); else { await link.focus(); await page.keyboard.press('Enter'); }- };- await page.goto(`${origin}/docs/UNIFIED_AGENT#inside-guest-runtime-boundaries`, { waitUntil: 'domcontentloaded' });- const link = page.locator(`article a[href="/docs/AGENT_SECURITY#${anchor}"]`);- await link.waitFor();- await link.evaluate(element => window.scrollBy(0, element.closest('p').getBoundingClientRect().top - 64));- await capture('entry');- await page.evaluate(() => window.__helperDocsShell = 'same-shell');- await activate(link); await page.waitForURL(`**/docs/AGENT_SECURITY#${anchor}`);- await page.waitForFunction(anchor => {- const heading = document.getElementById(anchor);- return heading && document.activeElement === heading && heading.getBoundingClientRect().top >= 0- && heading.getBoundingClientRect().top < innerHeight;- }, anchor);- assert.equal(await page.evaluate(() => window.__helperDocsShell), 'same-shell');- const section = await page.locator(`#${anchor}`).evaluate(heading => {- let text = ''; for (let el = heading.nextElementSibling; el && el.tagName !== 'H3'; el = el.nextElementSibling)- text += el.textContent + ' '; return text.replace(/\s+/g, ' ');- });- for (const phrase of ['without pct or lxc-info requests', 'fallback cannot recover',- 'cgroup v1', 'degraded or unavailable', 'Do not remove PrivateNetwork',- 'omitted containers cannot refresh old filesystem readings', 'Operation v1 remains complete-only',- 'collector-only automatic update cannot replace its helper']) assert(section.includes(phrase), phrase);- record.checks.push('actual shipped cross-guide link, keyboard/touch, same shell, focused anchor, all boundary/partial distinctions');- await capture('helper');- const partial = page.locator('article p').filter({ hasText: 'When an inventory succeeds only partly' });- await partial.evaluate(element => window.scrollBy(0, element.getBoundingClientRect().top - 64));- await capture('partial');- await page.reload({ waitUntil: 'domcontentloaded' });- await page.waitForFunction(anchor => document.activeElement?.id === anchor, anchor);- record.checks.push('reload preserves deep-link heading focus');- await context.close(); await browser.close(); browser = null;- }- assert.equal(result.errors.length, 0);- result.result = 'passed';- } catch (error) { result.failure = error.stack; throw error; }- finally {- if (browser) await browser.close(); result.cleanup.browser_closed = true;- if (server) await new Promise((resolve, reject) => {- server.close(error => error ? reject(error) : resolve()); server.closeAllConnections();- }); result.cleanup.server_closed = true;- fs.writeFileSync(path.join(output, 'result.json'), JSON.stringify(result, null, 2) + '\n');- }-})().catch(error => { console.error(error); process.exitCode = 1; });diff --git a/frontend-modern/browser-tests/recovery-safe-reporting.cjs b/frontend-modern/browser-tests/recovery-safe-reporting.cjsdeleted file mode 100644index 582d449a13..0000000000--- a/frontend-modern/browser-tests/recovery-safe-reporting.cjs+++ /dev/null@@ -1,109 +0,0 @@-// Shipped Recovery -> Troubleshooting navigation, with the production Docs page.-const assert = require('node:assert/strict');-const fs = require('node:fs');-const path = require('node:path');-const { chromium, webkit } = require('playwright');--(async () => {- const root = '/workspace/frontend-modern';- process.chdir(root);- const artifacts = path.join(root, 'node_modules', 'recovery-safe-reporting-browser');- fs.mkdirSync(artifacts, { recursive: true });- 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-recovery-safe-reporting'),- server: { host: '127.0.0.1', port: 5249, strictPort: true },- optimizeDeps: { noDiscovery: true, include: [] },- });- let browser;- const results = [];- try {- await server.listen();- for (const [engine, width, dark] of [- ['chromium', 1280, false],- ['webkit', 390, true],- ]) {- browser = await { chromium, webkit }[engine].launch(- engine === 'chromium'- ? { headless: true, channel: 'chromium', args: ['--no-sandbox'] }- : { headless: true },- );- const page = await browser.newPage({- viewport: { width, height: 900 },- ...(engine === 'webkit' ? { isMobile: true, hasTouch: true } : {}),- });- const errors = [];- page.on('pageerror', (error) => errors.push(error.message));- page.on('console', (message) => {- if (message.type() === 'error') errors.push(message.text());- });- await page.goto('http://127.0.0.1:5249/browser-tests/docs-fragment-navigation.html', {- waitUntil: 'domcontentloaded',- timeout: 60000,- });- // The fixture mounts the actual /docs router. Navigate without mocking assets.- await page.evaluate(() => {- history.pushState({}, '', '/docs/RECOVERY');- dispatchEvent(new PopStateEvent('popstate'));- });- const link = page.getByRole('link', { name: 'safe issue reporting', exact: true });- await link.waitFor();- if (dark) await page.evaluate(() => document.documentElement.classList.add('dark'));- await link.focus();- await page.keyboard.press('Enter');- const verifyDestination = async () => {- await page.waitForFunction(() => {- const heading = document.getElementById('-getting-help');- if (!heading) return false;- const rect = heading.getBoundingClientRect();- return document.activeElement === heading && rect.top >= 0 && rect.top < innerHeight;- });- assert.ok(page.url().endsWith('/docs/TROUBLESHOOTING#-getting-help'));- assert.equal(await page.locator('h2#-getting-help').textContent(), '🆘 Getting Help');- const article = await page.locator('article').innerText();- for (const text of [- 'Export for GitHub (sanitized)',- 'Review before posting',- 'Never post bootstrap/recovery',- 'Do not refile information you have already supplied',- ])- assert.ok(article.includes(text), text);- assert.ok(- await page.evaluate(() => document.documentElement.scrollWidth <= innerWidth + 1),- );- };- await verifyDestination();- await page.screenshot({ path: path.join(artifacts, `${engine}-safe-reporting.png`) });- assert.deepEqual(errors, []);- results.push({- engine,- version: browser.version(),- width,- dark,- keyboardNavigation: true,- targetFocusedAndVisible: true,- safeGuidance: true,- noHorizontalOverflow: true,- errors,- });- await browser.close();- browser = undefined;- }- const result = {- result: 'passed',- playwright: require('playwright/package.json').version,- scope: 'shipped help navigation, not native recovery or release availability',- results,- };- fs.writeFileSync(path.join(artifacts, 'result.json'), JSON.stringify(result, null, 2) + '\n');- console.log(JSON.stringify(result));- } finally {- if (browser) await browser.close();- await server.close();- }-})().catch((error) => {- console.error(error);- process.exitCode = 1;-});diff --git a/frontend-modern/browser-tests/report-narration-scope-docs.cjs b/frontend-modern/browser-tests/report-narration-scope-docs.cjsdeleted file mode 100644index efcccfe3cf..0000000000--- a/frontend-modern/browser-tests/report-narration-scope-docs.cjs+++ /dev/null@@ -1,104 +0,0 @@-// Shipped report guidance under the production Docs page/router/renderer/CSS.-// This is help acceptance, not a provider call, report generation or deployment.-const assert = require('node:assert/strict');-const fs = require('node:fs');-const path = require('node:path');-const crypto = require('node:crypto');-const { chromium, webkit } = require('playwright');--(async () => {- const root = '/workspace/frontend-modern';- process.chdir(root);- const artifacts = path.join(root, 'node_modules', 'report-narration-scope-browser');- fs.mkdirSync(artifacts, { recursive: true });- 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-report-narration-scope'),- server: { host: '127.0.0.1', port: 5251, strictPort: true },- optimizeDeps: { noDiscovery: true, include: [] },- });- let browser;- const results = [];- try {- await server.listen();- for (const [engine, width, dark] of [['chromium', 1280, false], ['webkit', 390, true]]) {- browser = await { chromium, webkit }[engine].launch(engine === 'chromium'- ? { headless: true, channel: 'chromium', args: ['--no-sandbox'] }- : { headless: true });- const page = await browser.newPage({ viewport: { width, height: 900 },- ...(engine === 'webkit' ? { isMobile: true, hasTouch: true } : {}) });- const errors = [];- const backendRequests = [];- const mutations = [];- page.on('pageerror', (error) => errors.push(error.message));- page.on('console', (message) => {- if (message.type() === 'error') errors.push(message.text());- });- page.on('request', (request) => {- if (!['GET', 'HEAD'].includes(request.method())) mutations.push(request.method());- });- await page.route('**/api/**', async (route) => {- backendRequests.push({ method: route.request().method(), pathname: new URL(route.request().url()).pathname });- await route.abort();- });- await page.goto('http://127.0.0.1:5251/browser-tests/docs-fragment-navigation.html', {- waitUntil: 'domcontentloaded', timeout: 60000,- });- if (dark) await page.evaluate(() => document.documentElement.classList.add('dark'));- for (const [guide, heading] of [['API', 'advanced-reporting-pro'], ['MSP', 'per-client-reports']]) {- await page.evaluate((target) => {- history.pushState({}, '', target);- dispatchEvent(new PopStateEvent('popstate'));- }, `/docs/${guide}#${heading}`);- await page.waitForFunction((id) => {- const target = document.getElementById(id);- const rect = target?.getBoundingClientRect();- return target && document.activeElement === target && rect.top >= 0 && rect.top < innerHeight;- }, heading);- const section = await page.evaluate((id) => {- const target = document.getElementById(id);- const paragraphs = [];- for (let node = target.nextElementSibling; node && !/^H[1-3]$/.test(node.tagName); node = node.nextElementSibling) {- paragraphs.push(node.textContent);- }- return paragraphs.join(' ').replace(/\s+/g, ' ');- }, heading);- for (const phrase of [- 'Report generation uses settings:read.',- 'single-resource and fleet PDF narration, an API token also needs ai:execute (or full access).',- 'the report still succeeds with a deterministic summary and no AI provider call',- 'a single-resource PDF also explains the missing scope.',- 'Browser sessions and server-run schedules keep their existing narration behaviour.',- 'AI budgets still apply. GET and CSV never use AI narration',- ]) assert.ok(section.includes(phrase), `${guide}: ${phrase}`);- assert.ok(section.includes('POST /api/admin/reports/generate'));- assert.ok(section.includes('POST /api/admin/reports/generate-multi'));- assert.ok(await page.evaluate(() => document.documentElement.scrollWidth <= innerWidth + 1));- await page.waitForFunction(() => document.getAnimations().length === 0);- await page.screenshot({ path: path.join(artifacts, `${engine}-${guide}.png`) });- results.push({ guide, engine, browserVersion: browser.version(), width, dark,- route: new URL(page.url()).pathname + new URL(page.url()).hash,- focusedVisibleHeading: true, narrationPermissionAndFallbackVisible: true,- unchangedSessionScheduleBudgetAndGETCSVGuidance: true, noHorizontalPageOverflow: true });- }- assert.deepEqual(backendRequests, []);- assert.deepEqual(mutations, []);- assert.deepEqual(errors, []);- results.push({ engine, backendRequests, mutations, errors });- await browser.close();- browser = undefined;- }- } finally {- if (browser) await browser.close();- await server.close();- }- const documents = Object.fromEntries(['API', 'MSP'].map((guide) => [guide,- crypto.createHash('sha256').update(fs.readFileSync(path.join(root, 'public/docs', `${guide}.md`))).digest('hex')]));- const result = { result: 'passed', playwright: require('playwright/package.json').version,- documents, results, browserAndServerClosed: true,- scope: 'production documentation renderer and shipped assets; not report/provider/native/release acceptance' };- fs.writeFileSync(path.join(artifacts, 'result.json'), JSON.stringify(result, null, 2) + '\n');- console.log(JSON.stringify(result));-})().catch((error) => { console.error(error); process.exitCode = 1; });diff --git a/frontend-modern/browser-tests/residual-evidence-ages.cjs b/frontend-modern/browser-tests/residual-evidence-ages.cjsdeleted file mode 100644index 40dbf668b1..0000000000--- a/frontend-modern/browser-tests/residual-evidence-ages.cjs+++ /dev/null@@ -1,504 +0,0 @@-// Runs the same preselected matrix on exact parent bytes and final bytes.-// Synthetic local responses only; no external service or credential is used.-const assert = require('node:assert/strict');-const fs = require('node:fs');-const crypto = require('node:crypto');-const { chromium, webkit } = require('playwright');-const start = Date.parse('2026-10-11T11:00:00Z');-const origin = 'http://127.0.0.1:5349';-const hash = (p) => crypto.createHash('sha256').update(fs.readFileSync(p)).digest('hex');-const iso = (n) => new Date(n).toISOString();--(async () => {- const binding = JSON.parse(fs.readFileSync('/workspace/tmp/residual-ages/binding.json'));- const root = '/workspace/' + binding.frontend_root;- const output = '/workspace/tmp/residual-ages/' + binding.mode;- fs.mkdirSync(output, { recursive: true });- for (const [p, h] of Object.entries(binding.content_sha256))- assert.equal(hash(root + '/' + p.replace('frontend-modern/', '')), h, p);- const result = {- binding,- playwright: require('playwright/package.json').version,- cases: [],- captures: [],- cleanup: {},- completed: false,- limits:- 'Production panels/state/adapters/CSS with synthetic providers and responses, not the full application, native recovery, physical phone, publication or release. Parent observations establish stale ages, not a passing repair.',- };- assert.equal(- result.playwright,- JSON.parse(fs.readFileSync('/workspace/tests/integration/package-lock.json')).packages[- 'node_modules/@playwright/test'- ].version,- );- const { createServer } = await import(root + '/node_modules/vite/dist/node/index.js');- const server = await createServer({- root,- configFile: root + '/vite.config.ts',- cacheDir: output + '/vite-cache',- server: { host: '127.0.0.1', port: 5349, strictPort: true, watch: null },- optimizeDeps: { noDiscovery: true, include: [] },- });- let browser, currentPage;- try {- await server.listen();- for (const [name, engine, width, dark] of [- ['desktop', chromium, 1680, false],- ['phone', webkit, 390, true],- ]) {- browser = await engine.launch(- engine === chromium- ? { headless: true, channel: 'chromium', args: ['--no-sandbox'] }- : { headless: true },- );- for (const surface of binding.surfaces ?? [- 'resource',- 'operator',- 'tokens',- 'profiles',- 'drafts',- ]) {- const page = await browser.newPage({- viewport: { width, height: 950 },- isMobile: width < 500,- hasTouch: width < 500,- locale: 'en-GB',- timezoneId: 'UTC',- });- // Only synthetic local POST responses are admitted; use the normal- // CSRF header path without a paused-clock cookie-preparation delay.- await page- .context()- .addCookies([- { name: 'pulse_csrf', value: 'synthetic-clock-control', url: origin, sameSite: 'Lax' },- ]);- currentPage = page;- page.setDefaultTimeout(7000);- const record = {- name,- surface,- browser: browser.version(),- width,- dark,- checks: [],- reads: [],- computePosts: [],- writes: [],- unexpectedReads: [],- offOrigin: [],- errors: [],- };- result.cases.push(record);- let tokenTime = start - 60_000,- agentTime = start - 60_000,- draftNumber = 0;- const drafts = [];- record.consoleErrors = [];- page.on('console', (message) => {- if (message.type() === 'error') record.consoleErrors.push(message.text().slice(0, 600));- });- page.on('pageerror', (err) => record.errors.push(err.message));- await page.clock.install({ time: new Date(start - 1000) });- await page.clock.pauseAt(new Date(start));- await page.addInitScript((dark) => {- localStorage.clear();- document.addEventListener(- 'DOMContentLoaded',- () => document.documentElement.classList.toggle('dark', dark),- { once: true },- );- }, dark);- await page.addInitScript(() => {- window.__residualReadiness = { resourcesRead: false };- });- await page.route('**/*', async (route) => {- const req = route.request(),- url = new URL(req.url()),- p = url.pathname;- if (url.origin !== origin) {- record.offOrigin.push(url.origin);- return route.abort();- }- if (!p.startsWith('/api/')) return route.continue();- if (- req.method() === 'POST' &&- ['/api/admin/profiles/suggestions', '/api/admin/profiles/validate'].includes(p)- ) {- assert.equal(req.headers()['x-csrf-token'], 'synthetic-clock-control');- record.computePosts.push(p);- if (p.endsWith('/validate'))- return route.fulfill({ json: { Valid: true, Errors: [], Warnings: [] } });- draftNumber++;- const draft = {- name: draftNumber === 1 ? 'First saved draft' : 'Second saved draft',- description: 'Synthetic draft',- config: { interval: draftNumber === 1 ? '30s' : '1m' },- rationale: [],- };- drafts.push(draft);- return route.fulfill({ json: draft });- }- if (req.method() !== 'GET') {- record.writes.push({ p, method: req.method() });- return route.fulfill({- status: 403,- json: { error: 'Synthetic fixture refuses writes' },- });- }- record.reads.push(p);- let data;- if (p === '/api/security/status')- data = { hasAuthentication: true, requiresAuth: false, sessionCapabilities: {} };- else if (p === '/api/health') data = { status: 'ok' };- else if (p === '/api/license/runtime-capabilities')- data = {- capabilities: ['agent_profiles'],- limits: [],- max_history_days: 7,- hosted_mode: false,- blocked_capabilities: [],- runtime: { build: 'community' },- };- else if (p === '/api/resources')- data = {- data: [- {- id: 'fixture-agent',- type: 'agent',- name: 'Held profile host',- displayName: 'Held profile host',- platformId: 'fixture-agent',- platformType: 'agent',- sourceType: 'agent',- status: 'online',- lastSeen: iso(agentTime),- identity: { hostname: 'fixture-host' },- agent: { agentId: 'fixture-agent' },- },- ],- meta: { totalPages: 1 },- };- else if (p === '/api/security/tokens')- data = {- tokens: [- {- id: 'fixture-token',- name: 'Held token',- prefix: 'fixture',- suffix: '0000',- createdAt: iso(tokenTime),- scopes: ['monitoring:read'],- },- ],- };- else if (p === '/api/agent/capabilities')- data = {- version: 'v1',- requiredScopes: ['monitoring:read'],- capabilities: [],- categories: [],- };- else if (p === '/api/admin/profiles/')- data = [- {- id: 'profile-a',- name: 'Profile A',- config: { interval: '30s' },- created_at: iso(start),- updated_at: iso(start),- },- ];- else if (p === '/api/admin/profiles/assignments')- data = [{ agent_id: 'fixture-agent', profile_id: 'profile-a', updated_at: iso(start) }];- else if (p === '/api/admin/profiles/schema')- data = [- {- Key: 'interval',- Type: 'duration',- Description: 'Polling interval',- DefaultValue: '30s',- Required: false,- },- ];- else if (p.endsWith('/operator-state'))- data = {- configured: true,- state: {- canonicalId: 'held-policy',- intentionallyOffline: true,- monitoringMode: 'expected_offline',- lifecycleState: 'retired',- neverAutoRemediate: true,- note: 'Keep saved policy',- setAt: iso(start - 60_000),- setBy: 'fixture-admin',- },- };- else if (p.endsWith('/maintenance-verifications')) data = { reports: [] };- else {- record.unexpectedReads.push(p);- return route.fulfill({ status: 404, json: { error: 'Unspecified synthetic read' } });- }- await route.fulfill({ json: data });- if (p === '/api/resources')- await page.evaluate(() => {- window.__residualReadiness.resourcesRead = true;- });- return;- });- const activate = async (el) => {- await el.focus();- return width < 500 ? el.tap() : el.press('Enter');- };- const capture = async (label) => {- const file = output + '/' + name + '-' + surface + '-' + label + '.png';- await page.screenshot({ path: file, fullPage: false, animations: 'disabled' });- result.captures.push({- path: file.replace('/workspace/', ''),- sha256: hash(file),- bytes: fs.statSync(file).size,- });- };- await page.goto(origin + '/browser-tests/residual-evidence-ages.html?surface=' + surface, {- waitUntil: 'domcontentloaded',- timeout: 45000,- });- let age,- compact = false,- target,- baseline,- initialSnapshot;- if (surface === 'resource') {- age = page.getByTestId('resource-change-history-section');- await age.waitFor();- assert.match(await age.innerText(), /Occurred 2 mins ago/);- await activate(age.getByRole('button', { name: 'Filter history', exact: true }));- target = age.getByRole('combobox', { name: 'Change kind' });- assert.match(await page.getByTestId('held-summary').innerText(), /1m ago/);- } else if (surface === 'operator') {- await page.getByText('Set by fixture-admin', { exact: false }).waitFor();- age = page.getByText('Set by fixture-admin', { exact: false }).locator('..');- compact = true;- target = page.getByLabel('Operator note', { exact: true });- await target.fill('Unsaved operator note');- } else if (surface === 'tokens') {- // Both projections are mounted; desktop CSS hides the compact card- // from the accessibility tree, so select its DOM identity explicitly.- const card = page.locator('[data-api-token-card="fixture-token"]');- await card.waitFor({ state: 'attached' });- if (width < 500) {- age = card.getByText('Created', { exact: true }).locator('..').locator('dd');- } else {- const row = page.locator('tr').filter({ hasText: 'Held token' });- await row.waitFor();- const index = await row.evaluate((el) =>- [...el.closest('table').querySelectorAll('thead th')].findIndex(- (header) => header.textContent.trim() === 'Created',- ),- );- assert(index >= 0, 'visible token table identifies the Created column');- age = row.locator('td').nth(index);- assert.equal(await age.isVisible(), true, 'desktop Created is on screen');- }- await activate(page.getByRole('button', { name: 'Generate new', exact: true }));- target = page.getByLabel('Token name', { exact: true });- await target.fill('Unsaved token name');- } else if (surface === 'profiles') {- const row = page.locator('tr').filter({ hasText: 'Held profile host' });- await row.waitFor({ state: 'attached' });- age = row.locator('td').last();- target = row.getByRole('combobox');- assert.equal(await target.inputValue(), 'profile-a');- if (width < 500)- assert.equal(await age.isVisible(), false, 'existing phone column stays hidden');- } else {- target = page.getByPlaceholder('Describe the agents and use case for this profile...');- await target.fill('Original draft request');- await activate(page.getByRole('button', { name: 'Get Ideas', exact: true }));- await page.getByRole('heading', { name: 'First saved draft', exact: true }).waitFor();- await page.clock.fastForward(60_000);- await target.fill('Second draft request');- await activate(page.getByRole('button', { name: 'Try Again', exact: true }));- await page.getByRole('heading', { name: 'Second saved draft', exact: true }).waitFor();- age = page.getByRole('button', { name: /First saved draft/ });- target = age;- }- if (surface === 'tokens' || surface === 'profiles') {- // This panel also paints websocket resources before its existing- // 15,250ms-delayed REST revalidation. Drain that initial read before measuring- // the quiet interval; the timer under test must cause no later reads.- await page.clock.fastForward(16_000);- await page.waitForFunction(() => window.__residualReadiness.resourcesRead);- }- const text = async () => (await age.textContent()).trim();- assert.match(await text(), compact ? /1m ago/ : /1 min ago/);- await target.focus();- const element = await target.elementHandle();- initialSnapshot = await page.evaluate(() => window.__residualAges.snapshot());- baseline = { reads: record.reads.length, computePosts: record.computePosts.length };- await (surface === 'profiles' && width < 500 ? target : age).scrollIntoViewIfNeeded();- await capture('initial');- await page.clock.fastForward(2 * 3_600_000);- const held = await text();- assert.match(- held,- binding.mode === 'parent'- ? compact- ? /1m ago/- : /1 min ago/- : compact- ? /2h ago/- : /2 hours ago/,- );- assert(- await element.evaluate((el) => el === document.activeElement),- 'focused control survives tick',- );- assert.equal(- await page.evaluate(() => window.__residualAges.snapshot()),- initialSnapshot,- 'clock changes no evidence',- );- assert.equal(record.reads.length, baseline.reads, 'no age-triggered API read');- assert.equal(- record.computePosts.length,- baseline.computePosts,- 'no age-triggered computation',- );- if (surface === 'resource') {- assert.match(- held,- binding.mode === 'parent' ? /Occurred 2 mins ago/ : /Occurred 2 hours ago/,- );- assert.match(- await page.getByTestId('held-summary').innerText(),- binding.mode === 'parent' ? /1m ago/ : /2h ago/,- );- } else if (surface === 'operator') {- assert.equal(await target.inputValue(), 'Unsaved operator note');- assert.equal(- await page- .getByLabel('Never auto-remediate this resource', { exact: true })- .getAttribute('aria-pressed'),- 'true',- );- assert.equal(- await page.getByLabel('Monitoring', { exact: true }).inputValue(),- 'expected_offline',- );- } else if (surface === 'tokens')- assert.equal(await target.inputValue(), 'Unsaved token name');- else if (surface === 'profiles') assert.equal(await target.inputValue(), 'profile-a');- record.checks.push({- held,- initialSnapshot,- baseline,- unchangedEvidenceFocusAndRequests: true,- });- // Last Seen is deliberately hidden on phones. Capture its visible- // assignment control without pretending the hidden age is on screen.- await (surface === 'profiles' && width < 500 ? target : age).scrollIntoViewIfNeeded();- await capture('held-two-hours');- if (binding.mode === 'final') {- if (surface === 'resource') {- await page.evaluate(() => window.__residualAges.replaceChange());- assert.match(await age.innerText(), /0s ago/);- assert.doesNotMatch(await age.innerText(), /Occurred/);- await page.clock.fastForward(60_000);- assert.match(await age.innerText(), /1 min ago/);- await page.evaluate(() => window.__residualAges.removeChange());- await page.clock.fastForward(30_000);- assert.equal(- await page.getByText('Retained retention change', { exact: true }).count(),- 0,- );- } else if (surface === 'tokens') {- tokenTime = await page.evaluate(() => Date.now());- // refreshing is a display-only prop, not a token-list refetch- // contract. A new visit legitimately rereads the immutable list.- await page.evaluate(() => window.__residualAges.unmount());- await page.evaluate(() => window.__residualAges.remount());- await page.waitForFunction(() =>- [...document.querySelectorAll('[data-api-token-card] dd')].some(- (el) => el.textContent === '0s ago',- ),- );- assert.equal(await page.getByLabel('Token name', { exact: true }).inputValue(), '');- await page.clock.fastForward(60_000);- assert.match(await text(), /1 min ago/);- } else if (surface === 'profiles') {- agentTime = await page.evaluate(() => Date.now());- await page.evaluate(() => window.__residualAges.replaceAgent());- await page.waitForFunction(() =>- [...document.querySelectorAll('td')].some((el) => el.textContent === '0s ago'),- );- assert.equal(await target.inputValue(), 'profile-a');- await page.clock.fastForward(60_000);- assert.match(await text(), /1 min ago/);- } else if (surface === 'drafts') {- await activate(age);- await page.getByRole('heading', { name: 'First saved draft', exact: true }).waitFor();- assert.equal(- await page- .getByPlaceholder('Describe the agents and use case for this profile...')- .inputValue(),- 'Original draft request',- );- await activate(page.getByRole('button', { name: 'Use This Profile', exact: true }));- assert.deepEqual(- await page.evaluate(() => window.__residualAges.accepted()),- drafts[0],- );- assert.equal(draftNumber, 2, 'no extra suggestion');- }- // Operator coverage is the unchanged held policy above, not a- // replacement. Only the other four cases exercise a second action.- if (surface !== 'operator')- record.checks.push({ replacementOrOriginalDraftAcceptance: true });- }- assert.equal(- await page.evaluate(() => document.documentElement.scrollWidth <= innerWidth),- true,- 'no horizontal page overflow',- );- assert.deepEqual(record.errors, []);- assert.deepEqual(record.writes, []);- assert.deepEqual(record.offOrigin, []);- assert.deepEqual(record.unexpectedReads, []);- await page.close();- record.pageClosed = true;- }- await browser.close();- browser = null;- }- result.completed = true;- } catch (err) {- if (currentPage && !currentPage.isClosed()) {- result.failureHeaders = await currentPage- .locator('th')- .evaluateAll((els) =>- els.map((el) => ({ html: el.outerHTML, display: getComputedStyle(el).display })),- );- result.failureBody = (await currentPage.locator('body').innerText()).slice(0, 12000);- await currentPage.screenshot({ path: output + '/failure.png', fullPage: false });- }- result.error = String(err.stack || err);- process.exitCode = 1;- } finally {- if (browser) await browser.close();- result.cleanup.browserClosed = true;- await server.close();- result.cleanup.serverClosed = true;- fs.writeFileSync(output + '/result.json', JSON.stringify(result, null, 2) + '\n');- console.log(- JSON.stringify({- mode: binding.mode,- completed: result.completed,- cases: result.cases.length,- error: result.error,- cleanup: result.cleanup,- }),- );- }-})();diff --git a/frontend-modern/browser-tests/residual-evidence-ages.html b/frontend-modern/browser-tests/residual-evidence-ages.htmldeleted file mode 100644index efd963b97e..0000000000--- a/frontend-modern/browser-tests/residual-evidence-ages.html+++ /dev/null@@ -1,12 +0,0 @@-<!doctype html>-<html lang="en">- <head>- <meta charset="UTF-8" />- <meta name="viewport" content="width=device-width, initial-scale=1.0" />- <title>Held change and administration ages</title>- </head>- <body>- <div id="root"></div>- <script type="module" src="/browser-tests/residual-evidence-ages.tsx"></script>- </body>-</html>diff --git a/frontend-modern/browser-tests/residual-evidence-ages.tsx b/frontend-modern/browser-tests/residual-evidence-ages.tsxdeleted file mode 100644index 953421390e..0000000000--- a/frontend-modern/browser-tests/residual-evidence-ages.tsx+++ /dev/null@@ -1,168 +0,0 @@-// Actual current panels, state, API adapters and CSS with synthetic local inputs.-// No native guest, permission grant, token creation or profile save is performed.-import { createSignal, Show, Suspense } from 'solid-js';-import { createStore } from 'solid-js/store';-import { render } from 'solid-js/web';-import { Route, Router } from '@solidjs/router';-import { ResourceDetailDrawer } from '../src/components/Infrastructure/ResourceDetailDrawer';-import { ResourceChangeSummary } from '../src/components/Infrastructure/ResourceChangeSummary';-import { ResourceOperatorStateSection } from '../src/components/Infrastructure/ResourceOperatorStateSection';-import { APITokenManager } from '../src/components/Settings/APITokenManager';-import { AgentProfilesPanel } from '../src/components/Settings/AgentProfilesPanel';-import { SuggestProfileModal } from '../src/components/Settings/SuggestProfileModal';-import { DarkModeContext, WebSocketContext } from '../src/contexts/appRuntime';-import { syncAIRuntimeSettings } from '../src/stores/aiRuntimeState';-import { loadRuntimeCapabilities } from '../src/stores/license';-import type { Resource } from '../src/types/resource';-import '../src/index.css';--const start = Date.parse('2026-10-11T11:00:00Z');-const iso = (offset: number) => new Date(start + offset).toISOString();-const surface = new URLSearchParams(location.search).get('surface') ?? 'resource';-syncAIRuntimeSettings({ discovery_enabled: false });-const change = {- id: 'fixture-change',- resourceId: 'fixture:pve-a:101',- kind: 'config_update' as const,- observedAt: iso(-60_000),- occurredAt: iso(-120_000),- reason: 'Retained retention change',- sourceType: 'platform_event' as const,- sourceAdapter: 'proxmox_adapter' as const,- confidence: 'high' as const,-};-const initial: Resource = {- id: 'fixture:pve-a:101',- name: 'Held evidence guest',- displayName: 'Held evidence guest',- platformId: '101',- platformType: 'proxmox-pve',- sourceType: 'api',- type: 'vm',- status: 'online',- lastSeen: start - 60_000,- recentChanges: [change],-};-const agent: Resource = {- id: 'fixture-agent',- name: 'Held profile host',- displayName: 'Held profile host',- type: 'agent',- platformId: 'fixture-agent',- platformType: 'agent',- sourceType: 'agent',- status: 'online',- lastSeen: start - 60_000,- identity: { hostname: 'fixture-host' },- agent: { agentId: 'fixture-agent' },-};-const [wsState, setWsState] = createStore({- resources: [agent],- pmg: [],- connectedInfrastructure: [- {- id: 'fixture-host',- name: 'Held profile host',- displayName: 'Held profile host',- hostname: 'fixture-host',- status: 'active',- lastSeen: start - 60_000,- surfaces: [{ kind: 'agent', controlId: 'fixture-agent', status: 'active' }],- },- ],-});-const [resourceChange, setResourceChange] = createSignal({- version: 1,- changedIds: null,- changedKeys: null,-});-const ws = {- state: wsState,- activeAlerts: {},- connected: () => true,- initialDataReceived: () => true,- resourceSnapshotReceived: () => true,- resourceChange,- changedResourceIdsSince: () => null,- activeAlertsHydrationStatus: () => 'ready',- markAgentsTokenRevoked: () => {},- markDockerRuntimesTokenRevoked: () => {},-};-(window as any).__pulseWsStore = ws;-if (surface === 'profiles') void loadRuntimeCapabilities();--function Fixture() {- const [resource, setResource] = createSignal(initial);- const [mounted, setMounted] = createSignal(true);- const [refreshing, setRefreshing] = createSignal(false);- const [showDrafts, setShowDrafts] = createSignal(true);- let accepted: unknown = null;- (window as any).__residualAges = {- snapshot: () => JSON.stringify({ resource: resource(), agent: wsState.resources[0], accepted }),- unmount: () => setMounted(false),- remount: () => setMounted(true),- refreshTokens: () => setRefreshing(true),- replaceChange: () =>- setResource({- ...initial,- recentChanges: [- { ...change, observedAt: new Date(Date.now()).toISOString(), occurredAt: undefined },- ],- }),- removeChange: () => setResource({ ...initial, recentChanges: [] }),- replaceAgent: () => {- setWsState('resources', [{ ...agent, lastSeen: Date.now() }]);- setResourceChange((value) => ({ ...value, version: value.version + 1 }));- },- accepted: () => accepted,- };- return (- <main class="mx-auto min-h-screen max-w-6xl space-y-3 bg-surface p-3 text-base-content">- <h1 class="text-base font-semibold">Held change and administration ages</h1>- <p class="text-xs text-muted">Synthetic local evidence. No production operation is sent.</p>- <Suspense fallback={<p>Loading fixture panels</p>}>- <Show when={mounted()}>- <Show when={surface === 'resource'}>- <section data-testid="held-summary">- <ResourceChangeSummary- title="Recent changes"- changes={resource().recentChanges}- buildResourceHref={() => '#fixture-resource'}- />- </section>- <ResourceDetailDrawer resource={resource()} presentation="table-row" />- </Show>- <Show when={surface === 'operator'}>- <ResourceOperatorStateSection resourceId="held-policy" />- </Show>- <Show when={surface === 'tokens'}>- <APITokenManager canManage refreshing={refreshing()} />- </Show>- <Show when={surface === 'profiles'}>- <AgentProfilesPanel />- </Show>- <Show when={surface === 'drafts' && showDrafts()}>- <SuggestProfileModal- onClose={() => setShowDrafts(false)}- onSuggestionAccepted={(value) => {- accepted = value;- }}- />- </Show>- </Show>- </Suspense>- </main>- );-}-render(- () => (- <WebSocketContext.Provider value={ws as any}>- <DarkModeContext.Provider value={() => document.documentElement.classList.contains('dark')}>- <Router>- <Route path="/*" component={Fixture} />- </Router>- </DarkModeContext.Provider>- </WebSocketContext.Provider>- ),- document.getElementById('root')!,-);diff --git a/frontend-modern/browser-tests/reverse-proxy-help.cjs b/frontend-modern/browser-tests/reverse-proxy-help.cjsdeleted file mode 100644index db82926d91..0000000000--- a/frontend-modern/browser-tests/reverse-proxy-help.cjs+++ /dev/null@@ -1,122 +0,0 @@-// Real shipped Docs/router/CSS, with no backend, proxy or real credential.-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');--(async () => {- const workspace = process.cwd();- const root = path.join(workspace, 'frontend-modern');- const output = path.join(workspace, 'tmp', 'reverse-proxy-help');- fs.mkdirSync(output, { recursive: true });- const binding = JSON.parse(fs.readFileSync(path.join(output, 'binding.json'), 'utf8'));- assert.match(binding.sourceSha, /^[0-9a-f]{40}$/);- for (const [file, digest] of Object.entries(binding.contentSha256)) {- assert.equal(- createHash('sha256').update(fs.readFileSync(path.join(workspace, file))).digest('hex'),- digest,- file,- );- }- 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-reverse-proxy-help'),- server: { host: '127.0.0.1', port: 5268, strictPort: true },- optimizeDeps: { noDiscovery: true, include: [] },- });- const observations = [];- let browser;- const inViewport = (id) => {- const heading = document.getElementById(id);- return heading && heading.getBoundingClientRect().top >= 0 &&- heading.getBoundingClientRect().top < innerHeight;- };- try {- await server.listen();- for (const [engine, width, height, tone] of [- ['chromium', 1280, 1000, 'light'], ['webkit', 390, 844, 'dark'],- ]) {- browser = await { chromium, webkit }[engine].launch(engine === 'chromium'- ? { headless: true, channel: 'chromium', args: ['--no-sandbox'] }- : { headless: true });- const page = await browser.newPage({- viewport: { width, height },- ...(engine === 'webkit' ? { isMobile: true, hasTouch: true } : {}),- });- const errors = [];- page.on('pageerror', (error) => errors.push(error.message));- page.on('console', (message) => {- if (message.type() === 'error') errors.push(message.text());- });- await page.goto('http://127.0.0.1:5268/browser-tests/docs-fragment-navigation.html');- if (tone === 'dark') await page.evaluate(() => document.documentElement.classList.add('dark'));- await page.getByRole('link', { name: '← All documentation' }).click();- const entry = page.locator('a[data-doc-link][href="/docs/REVERSE_PROXY"]').first();- await entry.focus();- await page.keyboard.press('Enter');- const heading = page.locator('#before-configuring-the-proxy');- await heading.waitFor();- await heading.scrollIntoViewIfNeeded();- let text = await page.locator('article').innerText();- for (const phrase of [- 'configured immediate peer', 'PULSE_TRUSTED_PROXY_CIDRS=127.0.0.1/32',- 'Wildcard ranges', 'rejected at startup', 'not an authentication bypass',- 'Adding the header alone is not sufficient',- ]) assert.ok(text.includes(phrase), phrase);- assert.ok(await page.evaluate(() => document.documentElement.scrollWidth <= innerWidth + 1));- await page.screenshot({ path: path.join(output, `${engine}-trust.png`) });- const nginx = page.locator('pre').filter({ hasText: 'proxy_set_header X-Forwarded-For $remote_addr;' });- await nginx.scrollIntoViewIfNeeded();- const copied = await nginx.innerText();- assert.ok(copied.includes('proxy_set_header X-Forwarded-Proto $scheme;'));- assert.ok(copied.includes('proxy_set_header Forwarded "";'));- assert.ok(!copied.includes('$proxy_add_x_forwarded_for'));- assert.ok(await page.evaluate(() => document.documentElement.scrollWidth <= innerWidth + 1));- await page.screenshot({ path: path.join(output, `${engine}-nginx.png`) });- const configuration = page.getByRole('link', { name: 'configuration overrides', exact: true });- await configuration.focus();- await page.keyboard.press('Enter');- await page.waitForFunction(inViewport, 'common-overrides-environment-variables');- text = await page.locator('article').innerText();- assert.ok(text.includes('forwarded client IP, scheme, host and port'));- const back = page.getByRole('link', { name: 'Reverse Proxy', exact: true });- await back.focus();- await page.keyboard.press('Enter');- await page.waitForFunction(inViewport, 'before-configuring-the-proxy');- assert.ok(page.url().endsWith('/docs/REVERSE_PROXY#before-configuring-the-proxy'));- const authentication = page.getByRole('link', { name: 'proxy authentication guide', exact: true });- await authentication.focus();- await page.keyboard.press('Enter');- const boundary = page.getByRole('heading', { name: '⚠️ Header Trust Boundary', exact: true });- await boundary.waitFor();- assert.ok(page.url().endsWith('/docs/PROXY_AUTH'));- await boundary.scrollIntoViewIfNeeded();- assert.ok((await page.locator('article').innerText()).includes('never append to them'));- assert.deepEqual(errors, []);- observations.push({- engine, width, height, tone, browserVersion: browser.version(),- trustWarningRendered: true, safeNginxBlockRendered: true,- keyboardConfigurationRoundTrip: true, keyboardAuthenticationBoundary: true,- noPageOverflow: true, errors,- });- await browser.close();- browser = undefined;- }- const result = {- result: 'passed', playwrightVersion: require('playwright/package.json').version,- sourceSha: binding.sourceSha, verifiedAt: new Date().toISOString(),- contentSha256: binding.contentSha256, dependencySnapshot: binding.dependencySnapshot,- scope: 'Production Docs rendering/navigation; not native proxy configuration, TLS or SSO acceptance',- observations,- };- fs.writeFileSync(path.join(output, 'result.json'), JSON.stringify(result, null, 2) + '\n');- console.log(JSON.stringify(result));- } finally {- if (browser) await browser.close();- await server.close();- }-})().catch((error) => { console.error(error); process.exitCode = 1; });diff --git a/frontend-modern/browser-tests/server-removal-help.cjs b/frontend-modern/browser-tests/server-removal-help.cjsdeleted file mode 100644index a13c0bdabe..0000000000--- a/frontend-modern/browser-tests/server-removal-help.cjs+++ /dev/null@@ -1,125 +0,0 @@-// Render the shipped help and follow its recovery/agent links. Never execute-// any removal command: this verifies guidance, not native uninstall behaviour.-const assert = require('node:assert/strict');-const fs = require('node:fs');-const path = require('node:path');-const crypto = require('node:crypto');-const { chromium, webkit } = require('playwright');--(async () => {- const root = '/workspace/frontend-modern';- const artifacts = path.join(root, 'node_modules', 'server-removal-help-browser');- fs.mkdirSync(artifacts, { recursive: true });- 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-server-removal-help'),- server: { host: '127.0.0.1', port: 5252, strictPort: true },- optimizeDeps: { noDiscovery: true, include: [] },- });- const results = [];- let browser;- try {- await server.listen();- for (const [engine, width] of [['chromium', 1280], ['webkit', 390]]) {- browser = await { chromium, webkit }[engine].launch(engine === 'chromium'- ? { headless: true, channel: 'chromium', args: ['--no-sandbox'] }- : { headless: true });- const page = await browser.newPage({ viewport: { width, height: 1000 },- ...(engine === 'webkit' ? { isMobile: true, hasTouch: true } : {}) });- const errors = [];- page.on('pageerror', (error) => errors.push(error.message));- page.on('console', (message) => {- if (message.type() === 'error') errors.push(message.text());- });- await page.goto('http://127.0.0.1:5252/browser-tests/docs-fragment-navigation.html?scenario=installation',- { waitUntil: 'domcontentloaded', timeout: 60_000 });- const uninstall = page.getByRole('heading', { level: 2, name: '🗑️ Uninstall', exact: true });- await uninstall.waitFor();- if (engine === 'webkit') {- await page.evaluate(async () => {- document.documentElement.classList.add('dark');- await new Promise((resolve) => requestAnimationFrame(() => requestAnimationFrame(resolve)));- await Promise.all(document.getAnimations().map((animation) => animation.finished.catch(() => {})));- });- }- const section = await uninstall.evaluate((heading) => {- const nodes = [];- for (let node = heading.nextElementSibling; node; node = node.nextElementSibling)- nodes.push(node);- return {- text: nodes.map((node) => node.innerText).join(' ').replace(/\s+/g, ' '),- commands: nodes.filter((node) => node.tagName === 'PRE').flatMap((node) =>- node.innerText.replace(/\\\n\s*/g, ' ').trim().split('\n')- .map((line) => line.replace(/\s+/g, ' ').trim())),- commandBoxes: nodes.filter((node) => node.tagName === 'PRE').map((node) => ({- clientWidth: node.clientWidth, scrollWidth: node.scrollWidth,- })),- };- });- for (const text of ['stops monitoring and alert delivery', 'Keep persistent data by default',- 'every effective data path', 'A configuration export alone is not a full backup',- 'container\'s writable layer or temporary storage', '--rm can also delete anonymous volumes',- 'reattach the same data mount', 'prefixes volume names', 'without a keep policy',- 'reclaim policy can delete its backing data', 'emptyDir storage, lost when the pod is removed',- 'inside the Pulse container', 'disable Pulse, not fully uninstall it',- 'without a keep-data prompt', 'Removing the server does not remove agents'])- assert.ok(section.text.includes(text), text);- assert.deepEqual(section.commands, [- 'docker stop pulse', 'docker rm pulse', 'docker compose stop pulse', 'docker compose rm pulse',- 'kubectl scale deployment pulse --namespace pulse --replicas=0',- 'sudo systemctl disable --now pulse-update.timer', 'sudo systemctl disable --now pulse.service',- ]);- assert.ok(section.commandBoxes.every((box) => box.scrollWidth <= box.clientWidth + 1),- 'removal commands must fit without phone clipping');- for (const [name, heading] of [- ['docker', uninstall],- ['kubernetes', page.getByRole('heading', { level: 3,- name: 'Kubernetes: check claim ownership before uninstalling', exact: true })],- ['systemd', page.getByRole('heading', { level: 3,- name: 'Systemd / Proxmox LXC: disable without erasing data', exact: true })],- ]) {- await heading.evaluate((element) => element.scrollIntoView({ block: 'start' }));- await page.screenshot({ path: path.join(artifacts, `${engine}-${name}.png`) });- }- assert.ok(await page.evaluate(() => document.documentElement.scrollWidth <= innerWidth + 1));- const backup = page.getByRole('link', { name: 'full-state backup', exact: true });- assert.equal(await backup.getAttribute('href'), '/docs/MIGRATION#full-state-recovery');- await backup.focus();- await page.keyboard.press('Enter');- await page.waitForURL('**/docs/MIGRATION#full-state-recovery');- await page.getByRole('heading', { level: 3, name: 'Full-state recovery', exact: true }).waitFor();- assert.equal(await page.evaluate(() => document.activeElement?.id), 'full-state-recovery');- await page.goBack();- await uninstall.waitFor();- const agent = page.getByRole('link', { name: 'uninstall procedure', exact: true });- assert.equal(await agent.getAttribute('href'), '/docs/UNIFIED_AGENT#uninstall');- await agent.focus();- await page.keyboard.press('Enter');- await page.waitForURL('**/docs/UNIFIED_AGENT#uninstall');- await page.getByRole('heading', { level: 2, name: 'Uninstall', exact: true }).waitFor();- assert.equal(await page.evaluate(() => document.activeElement?.id), 'uninstall');- assert.deepEqual(errors, []);- results.push({ engine, version: browser.version(), width,- persistentDataWarning: true, commandsFit: true, noDocumentOverflow: true,- helmRetentionWarning: true, installerErasureWarning: true,- keyboardFullStateRecovery: true, keyboardAgentUninstall: true, errors });- await browser.close();- browser = undefined;- }- const files = ['public/docs/INSTALL.md', 'browser-tests/server-removal-help.cjs',- 'browser-tests/docs-fragment-navigation.tsx', 'src/features/docs/docMarkdown.ts',- 'src/pages/Docs.tsx'].map((file) => ({ file,- sha256: crypto.createHash('sha256').update(fs.readFileSync(path.join(root, file))).digest('hex') }));- const result = { result: 'passed', playwright: require('playwright/package.json').version,- scope: 'shipped server-removal help rendering and keyboard links; no removal/native commands executed',- dompurify: JSON.parse(fs.readFileSync(path.join(root, 'node_modules/dompurify/package.json'))).version,- files, results };- fs.writeFileSync(path.join(artifacts, 'result.json'), JSON.stringify(result, null, 2) + '\n');- console.log(JSON.stringify(result));- } finally {- if (browser) await browser.close();- await server.close();- }-})().catch((error) => { console.error(error); process.exitCode = 1; });diff --git a/frontend-modern/browser-tests/snapshot-date-observation.html b/frontend-modern/browser-tests/snapshot-date-observation.htmldeleted file mode 100644index c8e8175b5b..0000000000--- a/frontend-modern/browser-tests/snapshot-date-observation.html+++ /dev/null@@ -1,12 +0,0 @@-<!doctype html>-<html lang="en">- <head>- <meta charset="UTF-8" />- <meta name="viewport" content="width=device-width, initial-scale=1.0" />- <title>Snapshot observation evidence</title>- </head>- <body>- <div id="root"></div>- <script type="module" src="/browser-tests/snapshot-date-observation.tsx"></script>- </body>-</html>diff --git a/frontend-modern/browser-tests/snapshot-date-observation.tsx b/frontend-modern/browser-tests/snapshot-date-observation.tsxdeleted file mode 100644index a83701f0a7..0000000000--- a/frontend-modern/browser-tests/snapshot-date-observation.tsx+++ /dev/null@@ -1,60 +0,0 @@-// Real active-alert adapter and Overview, fed only by the Go manager's frames.-import { createSignal, onMount } from 'solid-js';-import { render } from 'solid-js/web';-import { Route, Router } from '@solidjs/router';-import { AlertsAPI } from '../src/api/alerts';-import { OverviewTab } from '../src/features/alerts/OverviewTab';-import { DarkModeContext } from '../src/contexts/appRuntime';-import { aiAvailabilityStore } from '../src/stores/aiAvailability';-import type { Alert } from '../src/types/api';-import '../src/index.css';--aiAvailabilityStore.setEnabled(false);--function Fixture() {- const [active, setActive] = createSignal<Record<string, Alert>>({});- const [showAcknowledged, setShowAcknowledged] = createSignal(true);- const [generation, setGeneration] = createSignal(0);- const reload = async () => {- const alerts = await AlertsAPI.getActive();- setActive(Object.fromEntries(alerts.map((alert) => [alert.id, alert])));- setGeneration((value) => value + 1);- };- onMount(() => void reload());- Object.assign(window, { __snapshotDate: { reload, active, generation } });- return (- <main class="mx-auto min-h-screen max-w-5xl space-y-4 bg-surface p-3 text-base-content">- <h1 class="text-base font-semibold">Snapshot observations</h1>- <p class="text-xs text-muted">Synthetic monitoring evidence. No backup or guest operation.</p>- <button- class="min-h-11 rounded-sm border border-border px-3 text-sm"- onClick={() => void reload()}- >- Refresh monitoring evidence- </button>- <OverviewTab- overrides={[]}- activeAlerts={active()}- updateAlert={(id, updates) =>- setActive((previous) => ({ ...previous, [id]: { ...previous[id], ...updates } }))- }- showQuickTip={() => false}- dismissQuickTip={() => {}}- showAcknowledged={showAcknowledged}- setShowAcknowledged={setShowAcknowledged}- alertsDisabled={() => false}- />- </main>- );-}--render(- () => (- <DarkModeContext.Provider value={() => document.documentElement.classList.contains('dark')}>- <Router>- <Route path="*" component={Fixture} />- </Router>- </DarkModeContext.Provider>- ),- document.getElementById('root')!,-);diff --git a/frontend-modern/browser-tests/source-evidence-age.cjs b/frontend-modern/browser-tests/source-evidence-age.cjsdeleted file mode 100644index f837d925d1..0000000000--- a/frontend-modern/browser-tests/source-evidence-age.cjs+++ /dev/null@@ -1,290 +0,0 @@-// Production drawer/state/CSS, synthetic local snapshots only. The parent-// mode records the held-age defect; the final mode requires its correction.-const assert = require('node:assert/strict');-const fs = require('node:fs');-const path = require('node:path');-const crypto = require('node:crypto');-const { chromium, webkit } = require('playwright');--const root = '/workspace/frontend-modern';-const origin = 'http://127.0.0.1:5347';-const start = Date.parse('2026-10-11T10:00:00Z');-const hash = (file) => crypto.createHash('sha256').update(fs.readFileSync(file)).digest('hex');--(async () => {- const binding = JSON.parse(fs.readFileSync('/workspace/tmp/source-evidence-age/binding.json'));- assert.ok(['parent', 'final'].includes(binding.mode));- for (const [file, expected] of Object.entries(binding.content_sha256)) {- assert.equal(hash('/workspace/' + file), expected, file);- }- const output = '/workspace/tmp/source-evidence-age/' + binding.mode;- fs.mkdirSync(output, { recursive: true });- const result = {- binding,- playwright: require('playwright/package.json').version,- cases: [],- captures: [],- completed: false,- cleanup: {},- limits:- 'Synthetic drawer/provider snapshots, not native QGA, thaw, filesystem writes, restart recovery, publication or a release. Parent observation is not a passing repair.',- };- assert.equal(- result.playwright,- JSON.parse(fs.readFileSync('/workspace/tests/integration/package-lock.json')).packages[- 'node_modules/@playwright/test'- ].version,- );- const { createServer } = await import(root + '/node_modules/vite/dist/node/index.js');- const server = await createServer({- root,- configFile: root + '/vite.config.ts',- cacheDir: output + '/vite-cache',- server: { host: '127.0.0.1', port: 5347, strictPort: true, watch: null },- optimizeDeps: { noDiscovery: true, include: [] },- });- let browser;- try {- await server.listen();- for (const [name, engine, width, dark] of [- ['desktop', chromium, 1280, false],- ['phone', webkit, 390, true],- ]) {- browser = await engine.launch(- engine === chromium- ? { headless: true, channel: 'chromium', args: ['--no-sandbox'] }- : { headless: true },- );- const page = await browser.newPage({- viewport: { width, height: 950 },- isMobile: width < 500,- hasTouch: width < 500,- locale: 'en-GB',- timezoneId: 'UTC',- });- page.setDefaultTimeout(8000);- const record = {- name,- browser: browser.version(),- width,- dark,- checks: [],- requests: [],- writes: [],- unexpectedReads: [],- offOrigin: [],- errors: [],- };- result.cases.push(record);- page.on('pageerror', (error) => record.errors.push(error.message));- await page.clock.install({ time: new Date(start - 1000) });- await page.clock.pauseAt(new Date(start));- await page.addInitScript((dark) => {- localStorage.clear();- localStorage.setItem('pulse_debug_mode', 'true');- window.__sourceEvidenceClipboard = [];- Object.defineProperty(navigator, 'clipboard', {- configurable: true,- value: {- writeText: async (text) => window.__sourceEvidenceClipboard.push(text),- },- });- document.addEventListener(- 'DOMContentLoaded',- () => document.documentElement.classList.toggle('dark', dark),- { once: true },- );- }, dark);- await page.route('**/*', async (route) => {- const req = route.request(),- url = new URL(req.url());- if (url.origin !== origin) {- record.offOrigin.push(url.origin);- return route.abort();- }- if (!url.pathname.startsWith('/api/')) return route.continue();- record.requests.push({ path: url.pathname, method: req.method() });- if (req.method() !== 'GET') {- record.writes.push(url.pathname);- return route.fulfill({- status: 403,- json: { error: 'Synthetic fixture refuses writes' },- });- }- let data;- if (/^\/api\/resources\/[^/]+\/operator-state$/.test(url.pathname))- data = { configured: false };- else if (/^\/api\/resources\/[^/]+\/maintenance-verifications$/.test(url.pathname))- data = { reports: [] };- else if (url.pathname === '/api/license/runtime-capabilities')- data = {- capabilities: [],- limits: [],- max_history_days: 7,- hosted_mode: false,- runtime: { build: 'community' },- blocked_capabilities: [],- };- else if (url.pathname === '/api/security/status')- data = {- hasAuthentication: true,- requiresAuth: false,- sessionCapabilities: {},- };- else if (url.pathname === '/api/health') data = { status: 'ok' };- else {- record.unexpectedReads.push(url.pathname);- return route.fulfill({ status: 404, json: { error: 'Unspecified synthetic read' } });- }- return route.fulfill({ json: data });- });- const activate = async (locator) => (width < 500 ? locator.tap() : locator.press('Enter'));- const summary = (label) =>- page.locator('summary').filter({ hasText: new RegExp('^' + label) });- const capture = async (label) => {- const file = path.join(output, name + '-' + label + '.png');- await page.screenshot({ path: file, fullPage: true, animations: 'disabled' });- result.captures.push({- path: file.replace('/workspace/', ''),- sha256: hash(file),- bytes: fs.statSync(file).size,- });- };- await page.goto(origin + '/browser-tests/source-evidence-age.html', {- waitUntil: 'domcontentloaded',- timeout: 60000,- });- await page.getByRole('tab', { name: 'Debug', exact: true }).waitFor();- const notice = page.getByTestId('resource-guest-read-precaution');- await notice.waitFor();- const precaution = await notice.innerText();- assert.match(precaution, /does not prove thaw/);- await activate(page.getByRole('tab', { name: 'Debug', exact: true }));- assert.match(await summary('Proxmox').innerText(), /deferred • 1 min ago/);- assert.match(await summary('Agent').innerText(), /stale • 2 mins ago/);- await activate(summary('Proxmox'));- assert(await summary('Proxmox').evaluate((el) => el.parentElement.open));- const heldElement = await summary('Proxmox').elementHandle();- const heldPayload = await summary('Proxmox').locator('..').locator('pre').innerText();- const heldResource = await page.evaluate(() =>- JSON.stringify(window.__sourceEvidenceAge.snapshot()),- );- const copy = () => page.getByRole('button', { name: /^(Copy JSON|Copied)$/ });- await activate(copy());- await page.waitForFunction(() => window.__sourceEvidenceClipboard.length === 1);- await summary('Proxmox').focus();- await capture('initial');- await page.clock.fastForward(2 * 3_600_000);- record.sourceAgeAfterTwoHours = await summary('Proxmox').innerText();- const expected =- binding.mode === 'parent' ? /deferred • 1 min ago/ : /deferred • 2 hours ago/;- assert.match(record.sourceAgeAfterTwoHours, expected);- assert.match(- await summary('Agent').innerText(),- binding.mode === 'parent' ? /stale • 2 mins ago/ : /stale • 2 hours ago/,- );- assert(await summary('Proxmox').evaluate((el, held) => el === held, heldElement));- assert(- await summary('Proxmox').evaluate(- (el) => el.parentElement.open && document.activeElement === el,- ),- );- assert.equal(await summary('Proxmox').locator('..').locator('pre').innerText(), heldPayload);- assert.equal(- await page.evaluate(() => JSON.stringify(window.__sourceEvidenceAge.snapshot())),- heldResource,- );- assert.equal(await notice.innerText(), precaution);- await activate(copy());- await page.waitForFunction(() => window.__sourceEvidenceClipboard.length === 2);- const copies = await page.evaluate(() => window.__sourceEvidenceClipboard);- assert.equal(copies[0], copies[1]);- const bundle = JSON.parse(copies[1]);- assert.equal(bundle.sources.sourceStatus.proxmox.lastSeen, start - 60_000);- assert.equal(bundle.sources.proxmox.diskStatusReason, 'prev-agent-timeout');- record.checks.push(- 'Held feed: source-age discrimination; same disclosure/focus/payload/clipboard timestamps/precaution, no new observation',- );- await capture('held-two-hours');- await activate(page.getByRole('tab', { name: 'Overview', exact: true }));- const lastSeenRow = page.getByText('Last seen', { exact: true }).locator('..');- assert.match(await lastSeenRow.innerText(), /2 hours ago/);- record.overviewAgeAfterTwoHours = await lastSeenRow.innerText();- record.checks.push(- 'Real Overview already advances, discriminating the parent Debug-only defect',- );- await activate(page.getByRole('tab', { name: 'Debug', exact: true }));- assert.match(await summary('Proxmox').innerText(), expected);- await page.evaluate(() => window.__sourceEvidenceAge.replace());- assert.match(await summary('Proxmox').innerText(), /available • 0s ago/);- assert.equal(await page.getByText('Guest read deferred', { exact: true }).count(), 0);- assert.equal(await summary('Agent').count(), 0);- await page.clock.fastForward(60_000);- assert.match(- await summary('Proxmox').innerText(),- binding.mode === 'parent' ? /available • 0s ago/ : /available • 1 min ago/,- );- record.checks.push(- 'Ordinary same-resource platformData replacement updates server status and removes the old error/source; subsequent age discrimination',- );- await page.evaluate(() => window.__sourceEvidenceAge.missingTimes());- await page.clock.fastForward(60_000);- assert.doesNotMatch(await summary('Proxmox').innerText(), /•/);- assert.doesNotMatch(await summary('Agent').innerText(), /•/);- assert.match(await summary('Docker').innerText(), /unknown/);- record.checks.push(- 'Missing/invalid timestamps remain without invented ages; absent status remains unknown',- );- await capture('unknown-times');- await page.evaluate(() => window.__sourceEvidenceAge.unmount());- assert.equal(await page.getByRole('tab', { name: 'Debug' }).count(), 0);- await page.clock.fastForward(60_000);- await page.evaluate(() => window.__sourceEvidenceAge.remount());- await activate(page.getByRole('tab', { name: 'Debug', exact: true }));- assert.match(await summary('Proxmox').innerText(), /deferred/);- assert(await page.evaluate(() => document.documentElement.scrollWidth <= innerWidth + 1));- assert.deepEqual(record.writes, []);- assert.deepEqual(record.unexpectedReads, []);- assert.deepEqual(record.offOrigin, []);- assert.deepEqual(record.errors, []);- record.checks.push(- 'Unmount/remount works; no horizontal page overflow, API writes, unexpected reads, off-origin traffic or page errors',- );- record.completed = true;- await browser.close();- browser = undefined;- }- result.completed = true;- } catch (error) {- result.error = { name: error.name, message: error.message };- process.exitCode = 1;- } finally {- try {- if (browser) await browser.close();- result.cleanup.browsersClosed = true;- } catch (error) {- result.cleanup.browserError = error.message;- process.exitCode = 1;- }- try {- await server.close();- result.cleanup.serverClosed = true;- } catch (error) {- result.cleanup.serverError = error.message;- process.exitCode = 1;- }- fs.writeFileSync(output + '/result.json', JSON.stringify(result, null, 2) + '\n');- console.log(- JSON.stringify({- completed: result.completed,- output,- error: result.error,- cases: result.cases.length,- cleanup: result.cleanup,- }),- );- }-})().catch((error) => {- console.error(error);- process.exitCode = 1;-});diff --git a/frontend-modern/browser-tests/source-evidence-age.html b/frontend-modern/browser-tests/source-evidence-age.htmldeleted file mode 100644index 04cda86be5..0000000000--- a/frontend-modern/browser-tests/source-evidence-age.html+++ /dev/null@@ -1,12 +0,0 @@-<!doctype html>-<html lang="en">- <head>- <meta charset="UTF-8" />- <meta name="viewport" content="width=device-width, initial-scale=1.0" />- <title>Resource source evidence ages</title>- </head>- <body>- <div id="root"></div>- <script type="module" src="/browser-tests/source-evidence-age.tsx"></script>- </body>-</html>diff --git a/frontend-modern/browser-tests/source-evidence-age.tsx b/frontend-modern/browser-tests/source-evidence-age.tsxdeleted file mode 100644index 4b7adf3eee..0000000000--- a/frontend-modern/browser-tests/source-evidence-age.tsx+++ /dev/null@@ -1,96 +0,0 @@-// The production canonical drawer, state and CSS with local synthetic evidence.-// No guest agent, backup, restart, poll, scan or update action is performed.-import { createSignal, Show } from 'solid-js';-import { render } from 'solid-js/web';-import { Route, Router } from '@solidjs/router';-import { ResourceDetailDrawer } from '../src/components/Infrastructure/ResourceDetailDrawer';-import { DarkModeContext, WebSocketContext } from '../src/contexts/appRuntime';-import { syncAIRuntimeSettings } from '../src/stores/aiRuntimeState';-import type { Resource } from '../src/types/resource';-import '../src/index.css';--const start = Date.parse('2026-10-11T10:00:00Z');-syncAIRuntimeSettings({ discovery_enabled: false });-const initial: Resource = {- id: 'fixture:pve-a:101',- name: 'Held backup guest',- displayName: 'Held backup guest',- platformId: '101',- platformType: 'proxmox-pve',- platformScopes: ['proxmox-pve', 'agent'],- sourceType: 'hybrid',- sources: ['proxmox', 'agent'],- status: 'online',- type: 'vm',- lastSeen: start - 60_000,- proxmox: {- vmid: 101,- nodeName: 'pve-a',- guestAgentStatus: 'deferred',- diskStatusReason: 'prev-agent-timeout',- },- platformData: {- proxmox: { vmid: 101, node: 'pve-a', diskStatusReason: 'prev-agent-timeout' },- agent: { id: 'fixture-agent' },- sourceStatus: {- proxmox: { status: 'deferred', lastSeen: start - 60_000, error: 'Guest read deferred' },- agent: { status: 'stale', lastSeen: new Date(start - 120_000).toISOString() },- },- },-};--function Fixture() {- const [resource, setResource] = createSignal(initial);- const [mounted, setMounted] = createSignal(true);- (window as any).__sourceEvidenceAge = {- snapshot: () => resource(),- unmount: () => setMounted(false),- remount: () => setMounted(true),- replace: () =>- setResource({- ...initial,- lastSeen: Date.now(),- proxmox: { ...initial.proxmox, guestAgentStatus: 'available', diskStatusReason: '' },- platformData: {- proxmox: { vmid: 101, node: 'pve-a', diskStatusReason: '' },- sourceStatus: { proxmox: { status: 'available', lastSeen: Date.now() } },- },- }),- missingTimes: () =>- setResource({- ...initial,- platformData: {- proxmox: { vmid: 101, node: 'pve-a' },- agent: { id: 'fixture-agent' },- docker: { id: 'fixture-docker' },- sourceStatus: {- proxmox: { status: 'deferred' },- agent: { status: 'stale', lastSeen: 'not-a-date', error: 'No usable timestamp' },- },- },- }),- };- return (- <main class="mx-auto min-h-screen max-w-4xl space-y-3 bg-surface p-3 text-base-content">- <h1 class="text-base font-semibold">Resource source evidence ages</h1>- <p class="text-xs text-muted">Synthetic local snapshots. No guest operation is sent.</p>- <Show when={mounted()}>- <ResourceDetailDrawer resource={resource()} presentation="table-row" />- </Show>- </main>- );-}-render(- () => (- <WebSocketContext.Provider- value={{ state: { pmg: [] }, activeAlerts: {}, connected: () => false } as any}- >- <DarkModeContext.Provider value={() => document.documentElement.classList.contains('dark')}>- <Router>- <Route path="/*" component={Fixture} />- </Router>- </DarkModeContext.Provider>- </WebSocketContext.Provider>- ),- document.getElementById('root')!,-);diff --git a/frontend-modern/browser-tests/sso-mappings-2266.cjs b/frontend-modern/browser-tests/sso-mappings-2266.cjsdeleted file mode 100644index 11609830ac..0000000000--- a/frontend-modern/browser-tests/sso-mappings-2266.cjs+++ /dev/null@@ -1,95 +0,0 @@-// #2266: prove the production SSO form keeps IdP group names with spaces.-const assert = require('node:assert/strict');-const path = require('node:path');-const { chromium } = require('playwright');--(async () => {- const root = '/workspace/frontend-modern';- 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'),- server: { host: '127.0.0.1', port: 5206, strictPort: true },- });- let browser;- try {- await server.listen();- browser = await chromium.launch({ headless: true, channel: 'chromium', args: ['--no-sandbox'] });- const observations = [];- for (const width of [1440, 390]) {- let mappings = { 'Server Access': 'admin' };- const saves = [];- const errors = [];- const page = await browser.newPage({ viewport: { width, height: width === 390 ? 844 : 900 } });- page.on('pageerror', (error) => errors.push(error.message));- await page.route('**/*', (route) => {- const url = new URL(route.request().url());- if (url.origin !== 'http://127.0.0.1:5206') return route.abort();- const method = route.request().method();- if (url.pathname === '/api/security/sso/providers' && method === 'GET') {- return route.fulfill({ json: { providers: [{ id: 'corp-oidc', name: 'Corporate OIDC',- type: 'oidc', enabled: true, priority: 0 }], allowMultipleProviders: false } });- }- if (url.pathname === '/api/security/status') {- return route.fulfill({ json: { publicUrl: 'https://pulse.example.com' } });- }- if (url.pathname === '/api/security/sso/providers/corp-oidc') {- if (method === 'GET') return route.fulfill({ json: {- id: 'corp-oidc', name: 'Corporate OIDC', type: 'oidc', enabled: true,- oidc: { issuerUrl: 'https://idp.example.com', clientId: 'pulse',- scopes: ['openid', 'profile', 'email'] }, groupsClaim: 'groups',- groupRoleMappings: mappings,- } });- if (method === 'PUT') {- const payload = JSON.parse(route.request().postData());- mappings = payload.groupRoleMappings;- saves.push(payload);- return route.fulfill({ json: { id: 'corp-oidc' } });- }- }- if (url.pathname.startsWith('/api/')) return route.fulfill({ status: 404, json: {} });- return route.continue();- });- await page.goto('http://127.0.0.1:5206/browser-tests/sso-mappings-2266.html', {- waitUntil: 'domcontentloaded', timeout: 120_000,- });- await page.getByRole('button', { name: 'Edit provider' }).click();- await page.getByRole('button', { name: 'Show access restrictions & role mapping' }).click();- const input = page.getByRole('textbox', { name: 'Group Role Mappings' });- assert.equal(await input.inputValue(), 'Server Access=admin');- await input.fill('Server Access=admin,\nEveryone=viewer');- await page.getByRole('button', { name: 'Save Changes' }).click();- await page.getByRole('button', { name: 'Edit provider' }).click();- await page.getByRole('button', { name: 'Show access restrictions & role mapping' }).click();- assert.equal(await input.inputValue(), 'Server Access=admin, Everyone=viewer');- assert.deepEqual(mappings, { 'Server Access': 'admin', Everyone: 'viewer' });- assert.equal(saves.length, 1);- assert.deepEqual(saves[0].oidc.scopes, ['openid', 'profile', 'email']);- await page.getByRole('dialog').waitFor({ state: 'visible' });- await input.scrollIntoViewIfNeeded();- await input.focus();- await page.waitForTimeout(350);- const dialogBox = await page.getByRole('dialog').boundingBox();- const mappingBox = await input.boundingBox();- assert.ok(dialogBox && mappingBox && mappingBox.y >= dialogBox.y &&- mappingBox.y + mappingBox.height <= dialogBox.y + dialogBox.height,- `mapping input clipped outside dialog at ${width}px: ${JSON.stringify({ dialogBox, mappingBox })}`);- await page.screenshot({ path: path.join(root, 'browser-tests', `sso-mappings-2266-${width}.png`),- fullPage: true });- const dimensions = await page.evaluate(() => ({ scroll: document.documentElement.scrollWidth,- inner: window.innerWidth }));- assert.ok(dimensions.scroll <= dimensions.inner + 1,- `${width}px horizontal overflow: ${JSON.stringify(dimensions)}`);- await page.keyboard.press('Escape');- assert.equal(await page.getByRole('textbox', { name: 'Group Role Mappings' }).count(), 0);- assert.deepEqual(errors, []);- observations.push({ width, dimensions, saves: saves.length, mapping: mappings });- await page.close();- }- console.log(JSON.stringify({ result: 'passed', browser: browser.version(), observations }));- } finally {- if (browser) await browser.close();- await server.close();- }-})().catch((error) => { console.error(error); process.exitCode = 1; });diff --git a/frontend-modern/browser-tests/sso-mappings-2266.html b/frontend-modern/browser-tests/sso-mappings-2266.htmldeleted file mode 100644index f2dbf62b6e..0000000000--- a/frontend-modern/browser-tests/sso-mappings-2266.html+++ /dev/null@@ -1,8 +0,0 @@-<!doctype html>-<html lang="en">- <head><meta charset="UTF-8" /><meta name="viewport" content="width=device-width, initial-scale=1" /></head>- <body>- <div id="root"></div>- <script type="module" src="/browser-tests/sso-mappings-2266.tsx"></script>- </body>-</html>diff --git a/frontend-modern/browser-tests/sso-mappings-2266.tsx b/frontend-modern/browser-tests/sso-mappings-2266.tsxdeleted file mode 100644index a6b760ff44..0000000000--- a/frontend-modern/browser-tests/sso-mappings-2266.tsx+++ /dev/null@@ -1,10 +0,0 @@-// Mount the production SSO settings panel; the browser proof replaces only its API.-import { render } from 'solid-js/web';-import { SSOProvidersPanel } from '../src/components/Settings/SSOProvidersPanel';-import '../src/index.css';--render(() => (- <main class="mx-auto max-w-5xl p-4">- <SSOProvidersPanel />- </main>-), document.getElementById('root')!);diff --git a/frontend-modern/browser-tests/systemd-install-help.cjs b/frontend-modern/browser-tests/systemd-install-help.cjsdeleted file mode 100644index e4cf19a301..0000000000--- a/frontend-modern/browser-tests/systemd-install-help.cjs+++ /dev/null@@ -1,104 +0,0 @@-// Exercise the real Docs renderer/router/styles and shipped installation guide.-// This is help verification, not an installed service migration or upgrade.-const assert = require('node:assert/strict');-const fs = require('node:fs');-const path = require('node:path');-const crypto = require('node:crypto');-const { chromium, webkit } = require('playwright');--(async () => {- const root = '/workspace/frontend-modern';- const artifacts = path.join(root, 'node_modules', 'systemd-install-help-browser');- fs.mkdirSync(artifacts, { recursive: true });- 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-systemd-install-help'),- server: { host: '127.0.0.1', port: 5251, strictPort: true },- optimizeDeps: { noDiscovery: true, include: [] },- });- const results = [];- let browser;- try {- await server.listen();- for (const [engine, width] of [['chromium', 1280], ['webkit', 390]]) {- browser = await { chromium, webkit }[engine].launch(engine === 'chromium'- ? { headless: true, channel: 'chromium', args: ['--no-sandbox'] }- : { headless: true });- const page = await browser.newPage({ viewport: { width, height: 1000 },- ...(engine === 'webkit' ? { isMobile: true, hasTouch: true } : {}) });- const errors = [];- page.on('pageerror', (error) => errors.push(error.message));- page.on('console', (message) => {- if (message.type() === 'error') errors.push(message.text());- });- await page.goto('http://127.0.0.1:5251/browser-tests/docs-fragment-navigation.html?scenario=installation',- { waitUntil: 'domcontentloaded', timeout: 60_000 });- const summary = page.locator('summary').filter({- hasText: 'Manual or custom systemd services (advanced)',- });- await summary.waitFor();- if (engine === 'webkit') {- await page.evaluate(async () => {- document.documentElement.classList.add('dark');- await new Promise((resolve) => requestAnimationFrame(() => requestAnimationFrame(resolve)));- await Promise.all(document.getAnimations().map((animation) => animation.finished.catch(() => {})));- });- }- const details = summary.locator('..');- assert.equal(await details.getAttribute('open'), null);- await summary.focus();- await page.keyboard.press('Enter');- assert.notEqual(await details.getAttribute('open'), null);- const content = await details.innerText();- for (const text of ['use the signed installer above', 'User=pulse', 'Group=pulse',- 'NoNewPrivileges=true', 'ProtectSystem=strict', 'LoadState=loaded',- 'not that a root service is running', 'an empty User=',- 'the installer preserves existing service units during updates',- 'Do not overwrite a working unit, change only its service user',- 'preserve the data directory and its encryption key',- 'separate host agent has different privilege requirements'])- assert.ok(content.includes(text), text);- const command = await details.locator('pre').innerText();- assert.ok(command.startsWith('systemctl show pulse.service'));- assert.ok(command.includes('--property=LoadState'));- assert.ok(Math.max(...command.split('\n').map((line) => line.length)) < 34);- assert.ok(!/--property=(Environment|ExecStart)|sudo|tee|install -m/.test(command));- assert.ok(!await page.locator('article').innerText().then((text) =>- text.includes('sudo tee /etc/systemd/system/pulse.service')));- await summary.evaluate((element) => element.scrollIntoView({ block: 'start' }));- await page.screenshot({ path: path.join(artifacts, `${engine}-account.png`) });- await details.locator('pre').evaluate((element) => element.scrollIntoView({ block: 'start' }));- await page.screenshot({ path: path.join(artifacts, `${engine}-checks.png`) });- assert.ok(await page.evaluate(() => document.documentElement.scrollWidth <= innerWidth + 1));- const recovery = details.getByRole('link', { name: 'the recovery guide', exact: true });- assert.equal(await recovery.getAttribute('href'), '/docs/RECOVERY');- await recovery.focus();- await page.keyboard.press('Enter');- await page.waitForURL('**/docs/RECOVERY');- await page.getByRole('heading', { level: 1 }).filter({ hasText: 'Recovery' }).waitFor();- assert.deepEqual(errors, []);- results.push({ engine, version: browser.version(), width,- keyboardDisclosure: true, nonRootServer: true, agentBoundary: true,- readOnlyCredentialSafeCommand: true, loadedUnitRequired: true, phoneCommandFits: true,- preservationWarning: true,- noDocumentOverflow: true, keyboardRecoveryLink: true, errors });- await browser.close();- browser = undefined;- }- const files = ['public/docs/INSTALL.md', 'browser-tests/systemd-install-help.cjs',- 'browser-tests/docs-fragment-navigation.tsx', 'src/features/docs/docMarkdown.ts',- 'src/pages/Docs.tsx'].map((file) => ({ file,- sha256: crypto.createHash('sha256').update(fs.readFileSync(path.join(root, file))).digest('hex') }));- const result = { result: 'passed', playwright: require('playwright/package.json').version,- scope: 'existing shipped installation-help rendering and navigation, not installed/systemd acceptance',- dompurify: JSON.parse(fs.readFileSync(path.join(root, 'node_modules/dompurify/package.json'))).version,- files, results };- fs.writeFileSync(path.join(artifacts, 'result.json'), JSON.stringify(result, null, 2) + '\n');- console.log(JSON.stringify(result));- } finally {- if (browser) await browser.close();- await server.close();- }-})().catch((error) => { console.error(error); process.exitCode = 1; });diff --git a/frontend-modern/browser-tests/thresholds-windowed-list.html b/frontend-modern/browser-tests/thresholds-windowed-list.htmldeleted file mode 100644index 0995dc4dba..0000000000--- a/frontend-modern/browser-tests/thresholds-windowed-list.html+++ /dev/null@@ -1,10 +0,0 @@-<!doctype html>-<html>- <head>- <meta charset="UTF-8" />- </head>- <body>- <div id="root"></div>- <script type="module" src="/browser-tests/thresholds-windowed-list.tsx"></script>- </body>-</html>diff --git a/frontend-modern/browser-tests/thresholds-windowed-list.tsx b/frontend-modern/browser-tests/thresholds-windowed-list.tsxdeleted file mode 100644index 5927f00b2d..0000000000--- a/frontend-modern/browser-tests/thresholds-windowed-list.tsx+++ /dev/null@@ -1,94 +0,0 @@-// Browser fixture: the production Alert Thresholds card list (the narrow-layout-// renderer) with two Proxmox hosts whose guests share display names. It exists-// to reproduce #2130: a short leading group header corrupting the virtual-// window's item-height estimate so a host's rows vanish while scrolling.-// Synthetic props only; no backend, API or WebSocket path.-import { render } from 'solid-js/web';--import { AlertResourceTableMobile } from '../src/components/Alerts/AlertResourceTableMobile';-import type { ResourceTableProps } from '../src/components/Alerts/ResourceTable';-import type { Resource } from '../src/features/alerts/thresholds/tableTypes';-import '../src/index.css';--const HOSTS = ['pve01.staging.tld', 'pve01.production.tld'];-const COLUMNS = [- 'CPU %',- 'Memory %',- 'Disk %',- 'Backup',- 'Snapshot',- 'Disk R MB/s',- 'Disk W MB/s',- 'Net In MB/s',- 'Net Out MB/s',-];--const grouped: Record<string, Resource[]> = {};-for (const [hostIndex, host] of HOSTS.entries()) {- grouped[host] = Array.from({ length: 15 }, (_, index) => {- // Both environments expose a guest named gateway01, exactly as reported.- const name =- index === 0- ? 'gateway01'- : `${hostIndex === 0 ? 'staging' : 'production'}-vm-${String(index).padStart(2, '0')}`;- return {- id: `${host}-${index}`,- name,- displayName: name,- rawName: name,- type: 'guest',- resourceType: index % 3 === 0 ? 'VM' : 'Container',- vmid: 100 + index,- node: host,- instance: host,- status: 'running',- hasOverride: false,- disabled: false,- disableConnectivity: false,- thresholds: {},- defaults: { cpu: 80, memory: 85, disk: 90 },- backup: { enabled: true },- snapshot: { enabled: true },- } satisfies Resource;- });-}--const noop = () => undefined;-const table: ResourceTableProps = {- title: '',- columns: COLUMNS,- groupedResources: grouped,- onEdit: noop,- onSaveEdit: noop,- onCancelEdit: noop,- onRemoveOverride: noop,- editingId: () => null,- editingThresholds: () => ({}),- setEditingThresholds: noop,- formatMetricValue: (_metric, value) => (typeof value === 'number' ? `${value}%` : '—'),- hasActiveAlert: () => false,- editingNote: () => '',- setEditingNote: noop,-};--render(- () => (- <div- id="thresholds-scroll"- style={{- height: '600px',- overflow: 'auto',- border: '1px solid #cbd5e1',- padding: '12px',- }}- >- <AlertResourceTableMobile- table={table}- hasRows={() => true}- hasCustomGlobalDefaults={() => false}- setActiveMetricInput={noop}- />- </div>- ),- document.getElementById('root')!,-);diff --git a/frontend-modern/browser-tests/token-guidance.cjs b/frontend-modern/browser-tests/token-guidance.cjsdeleted file mode 100644index e51b9b5da6..0000000000--- a/frontend-modern/browser-tests/token-guidance.cjs+++ /dev/null@@ -1,119 +0,0 @@-// Inspect the existing shipped help using the production Docs renderer.-// This creates no token, authenticates no client and performs no rotation.-const assert = require('node:assert/strict');-const fs = require('node:fs');-const path = require('node:path');-const crypto = require('node:crypto');-const { chromium, webkit } = require('playwright');--(async () => {- const root = '/workspace/frontend-modern';- const artifacts = path.join(root, 'node_modules', 'token-guidance-browser');- fs.mkdirSync(artifacts, { recursive: true });- 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-token-guidance'),- server: { host: '127.0.0.1', port: 5253, strictPort: true },- optimizeDeps: { noDiscovery: true, include: [] },- });- const results = [];- let browser;- try {- await server.listen();- for (const [engine, width] of [['chromium', 1280], ['webkit', 390]]) {- browser = await { chromium, webkit }[engine].launch(engine === 'chromium'- ? { headless: true, channel: 'chromium', args: ['--no-sandbox'] }- : { headless: true });- const page = await browser.newPage({ viewport: { width, height: 1000 },- ...(engine === 'webkit' ? { isMobile: true, hasTouch: true } : {}) });- const errors = [];- page.on('pageerror', (error) => errors.push(error.message));- page.on('console', (message) => {- if (message.type() === 'error') errors.push(message.text());- });- await page.goto('http://127.0.0.1:5253/browser-tests/docs-fragment-navigation.html?scenario=configuration',- { waitUntil: 'domcontentloaded', timeout: 60_000 });- const tokens = page.getByRole('heading', { name: '🔑 API Tokens', exact: true });- await tokens.waitFor();- await page.waitForFunction(() => document.activeElement?.id === '-api-tokens');- if (engine === 'webkit') {- await page.evaluate(async () => {- document.documentElement.classList.add('dark');- await new Promise((resolve) => requestAnimationFrame(() => requestAnimationFrame(resolve)));- await Promise.all(document.getAnimations().map((animation) => animation.finished.catch(() => {})));- });- }- const presetTable = page.getByRole('table').filter({ has: page.getByRole('columnheader',- { name: 'Preset', exact: true }) });- const agent = presetTable.getByRole('row').filter({ has: page.getByRole('cell',- { name: 'Agent', exact: true }) });- assert.equal(await agent.getByRole('cell').nth(1).innerText(), 'agent:report, agent:config:read');- assert.equal(await presetTable.getByRole('row').count(), 8);- const scopesTable = page.getByRole('table').filter({ has: page.getByRole('columnheader',- { name: 'Scope', exact: true }) });- assert.equal(await scopesTable.getByRole('row').count(), 17);- for (const table of [presetTable, scopesTable]) {- assert.ok(await table.evaluate((element) => {- const parent = element.parentElement;- return parent.dataset.docTableScroll !== undefined &&- getComputedStyle(parent).overflowX === 'auto' &&- [...element.querySelectorAll('thead th')].every((header) => header.scope === 'col');- }));- }- const body = (await page.locator('article').innerText()).replace(/\s+/g, ' ');- for (const text of ['Settings → API Access', 'Reporting is not remote execution',- 'not to fix a missing reading', 'revoke it promptly', 'even if that interrupts monitoring',- 'Magic Kiosk Link', 'Copy Link', 'no administrator session', 'bearer credential',- 'initial request already carried the token', 'proxy/server logs',- 'Do not rely on this session surviving']) assert.ok(body.includes(text), text);- assert.ok(!body.includes('?token=YOUR_TOKEN_HERE'));- assert.ok(await page.evaluate(() => document.documentElement.scrollWidth <= innerWidth + 1));- for (const [name, heading] of [- ['rotation', tokens],- ['presets', page.getByRole('heading', { name: 'Presets', exact: true })],- ['kiosk', page.getByRole('heading', { name: 'Kiosk Mode', exact: true })],- ]) {- await heading.evaluate((element) => element.scrollIntoView({ block: 'start' }));- await page.screenshot({ path: path.join(artifacts, `${engine}-${name}.png`) });- }- for (const [name, href, heading, id] of [- ['private header-file procedure', '/docs/API#api-token-recommended',- 'API Token (Recommended)', 'api-token-recommended'],- ['agent retargeting', '/docs/UNIFIED_AGENT#moving-pulse-to-a-new-address',- 'Moving Pulse to a new address', 'moving-pulse-to-a-new-address'],- ]) {- const link = page.getByRole('link', { name, exact: true });- assert.equal(await link.getAttribute('href'), href);- await link.focus();- await page.keyboard.press('Enter');- await page.waitForURL(`**${href}`);- await page.getByRole('heading', { name: heading, exact: true }).waitFor();- assert.equal(await page.evaluate(() => document.activeElement?.id), id);- await page.goBack();- await tokens.waitFor();- }- assert.deepEqual(errors, []);- results.push({ engine, version: browser.version(), width,- tokenAnchorFocus: true, leastPrivilegeAgentRow: true, actualPresetCount: 7,- scopeCount: 16, semanticContainedTables: true, noDocumentOverflow: true,- kioskCredentialWarning: true, keyboardApiHelp: true, keyboardAgentRetargeting: true, errors });- await browser.close();- browser = undefined;- }- const files = ['public/docs/CONFIGURATION.md', 'browser-tests/token-guidance.cjs',- 'browser-tests/docs-fragment-navigation.tsx', 'src/features/docs/docMarkdown.ts',- 'src/pages/Docs.tsx'].map((file) => ({ file,- sha256: crypto.createHash('sha256').update(fs.readFileSync(path.join(root, file))).digest('hex') }));- const result = { result: 'passed', playwright: require('playwright/package.json').version,- scope: 'shipped token guidance rendering and keyboard help links; no token/native operation performed',- dompurify: JSON.parse(fs.readFileSync(path.join(root, 'node_modules/dompurify/package.json'))).version,- files, results };- fs.writeFileSync(path.join(artifacts, 'result.json'), JSON.stringify(result, null, 2) + '\n');- console.log(JSON.stringify(result));- } finally {- if (browser) await browser.close();- await server.close();- }-})().catch((error) => { console.error(error); process.exitCode = 1; });diff --git a/frontend-modern/browser-tests/truenas-connection-help.cjs b/frontend-modern/browser-tests/truenas-connection-help.cjsdeleted file mode 100644index 3a6e38541a..0000000000--- a/frontend-modern/browser-tests/truenas-connection-help.cjs+++ /dev/null@@ -1,81 +0,0 @@-// The real Docs page/router/styles and shipped TrueNAS help, without a backend.-const assert = require('node:assert/strict');-const fs = require('node:fs');-const path = require('node:path');-const { chromium, webkit } = require('playwright');--(async () => {- const root = '/workspace/frontend-modern';- const artifacts = path.join(root, 'node_modules', 'truenas-connection-help-browser');- fs.mkdirSync(artifacts, { recursive: true });- 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-truenas-connection-help'),- server: { host: '127.0.0.1', port: 5250, strictPort: true },- optimizeDeps: { noDiscovery: true, include: [] },- });- const results = [];- let browser;- try {- await server.listen();- for (const [engine, width] of [['chromium', 1280], ['webkit', 390]]) {- browser = await { chromium, webkit }[engine].launch(engine === 'chromium'- ? { headless: true, channel: 'chromium', args: ['--no-sandbox'] }- : { headless: true });- const page = await browser.newPage({ viewport: { width, height: 900 },- ...(engine === 'webkit' ? { isMobile: true, hasTouch: true } : {}) });- const errors = [];- page.on('pageerror', (error) => errors.push(error.message));- page.on('console', (message) => {- if (message.type() === 'error') errors.push(message.text());- });- await page.goto('http://127.0.0.1:5250/browser-tests/docs-fragment-navigation.html?scenario=truenas',- { waitUntil: 'domcontentloaded', timeout: 60_000 });- const quickStart = page.getByRole('heading', { name: 'Quick Start', exact: true });- await quickStart.waitFor();- if (engine === 'webkit') {- await page.evaluate(async () => {- document.documentElement.classList.add('dark');- await new Promise((resolve) => requestAnimationFrame(() => requestAnimationFrame(resolve)));- await Promise.all(document.getAnimations().map((animation) => animation.finished.catch(() => {})));- });- }- const article = await page.locator('article').innerText();- for (const text of ['it does not validate inventory or metric collection',- 'an elapsed interval is not proof that a poll completed',- 'Some older builds, including Pulse 6.4.1 and 6.4.5',- 'use the inventory observation time rather than the test time',- 'do not copy a token or cookie', 'Do not post the full connection response'])- assert.ok(article.includes(text), text);- assert.ok(!article.includes('Data appears within one configured polling cycle'));- await quickStart.evaluate((heading) => heading.scrollIntoView({ block: 'start' }));- await page.screenshot({ path: path.join(artifacts, `${engine}-setup.png`) });- const checks = page.getByRole('link', { name: 'polling checks', exact: true }).first();- await checks.focus();- await page.keyboard.press('Enter');- await page.waitForFunction(() => {- const heading = document.getElementById('stale-truenas-data');- return heading && heading.getBoundingClientRect().top >= 0- && heading.getBoundingClientRect().top < innerHeight;- });- assert.ok(page.url().endsWith('/docs/TRUENAS#stale-truenas-data'));- assert.ok(await page.evaluate(() => document.documentElement.scrollWidth <= innerWidth + 1));- await page.screenshot({ path: path.join(artifacts, `${engine}-polling.png`) });- assert.deepEqual(errors, []);- results.push({ engine, version: browser.version(), width,- probeScope: true, noGuaranteedPoll: true, versionQualifiedWarning: true,- keyboardPollingLink: true, noDocumentOverflow: true, errors });- await browser.close();- browser = undefined;- }- const result = { result: 'passed', playwright: require('playwright/package.json').version,- scope: 'shipped help rendering/navigation, not native TrueNAS polling', results };- fs.writeFileSync(path.join(artifacts, 'result.json'), JSON.stringify(result, null, 2) + '\n');- console.log(JSON.stringify(result));- } finally {- if (browser) await browser.close();- await server.close();- }-})().catch((error) => { console.error(error); process.exitCode = 1; });diff --git a/frontend-modern/browser-tests/truenas-vsphere-status-rows.cjs b/frontend-modern/browser-tests/truenas-vsphere-status-rows.cjsdeleted file mode 100644index 04db7a0d92..0000000000--- a/frontend-modern/browser-tests/truenas-vsphere-status-rows.cjs+++ /dev/null@@ -1,183 +0,0 @@-const assert = require('node:assert/strict');-const fs = require('node:fs');-const path = require('node:path');-const { chromium, webkit } = require('playwright');--// Each TrueNAS and vSphere row's status words read in its dot's colour: a-// crashed app says "Crashed" under its name (it has no State column), a-// disabled share's State reads red and a locked one amber, a failed vSphere-// task reads red; phones, which hide those State columns, read the words-// under the name.-const now = '2026-10-03T12:00:00Z';--const rgb = (colour) => colour.match(/\d+/g).map(Number);-// Red in light mode is deep, in dark mode a light pink: red leads either way.-const isRed = (colour) => {- const [r, g, b] = rgb(colour);- return r > 150 && r - g > 60 && r - b > 60;-};-const isAmber = (colour) => {- const [r, g, b] = rgb(colour);- return r > 150 && g > 70 && b < 80;-};--(async () => {- const root = '/workspace/frontend-modern';- const output = '/workspace/tmp/truenas-vsphere-status-rows';- fs.mkdirSync(output, { recursive: true });- 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(output, 'vite-cache'),- server: { host: '127.0.0.1', port: 5274, strictPort: true },- });- const results = [],- screenshots = [];- let browser;- try {- await server.listen();- for (const [name, engine, width] of [- ['desktop', chromium, 1440],- ['phone', webkit, 390],- ]) {- browser = await engine.launch(- engine === chromium- ? { headless: true, channel: 'chromium', args: ['--no-sandbox'] }- : { headless: true },- );- const page = await browser.newPage({- viewport: { width, height: width === 390 ? 844 : 900 },- isMobile: width === 390,- hasTouch: width === 390,- locale: 'en-GB',- timezoneId: 'UTC',- });- await page.clock.setFixedTime(new Date(now));- page.setDefaultTimeout(15000);- const checks = [],- errors = [];- page.on('pageerror', (e) => errors.push(e.message));- await page.route('**/*', async (route) => {- const request = route.request(),- url = new URL(request.url());- if (url.origin !== 'http://127.0.0.1:5274') return route.abort();- if (!url.pathname.startsWith('/api/')) return route.continue();- return route.fulfill({- json: {- enabled: false,- data: [],- capabilities: [],- facets: [],- relationships: [],- recentChanges: [],- alerts: {},- },- });- });- const check = async (label, run) => {- try {- await run();- checks.push({ label, passed: true });- } catch (e) {- checks.push({ label, passed: false, error: e.message });- }- };- const colour = (locator) => locator.evaluate((el) => getComputedStyle(el).color);- const dotColour = (locator) => locator.evaluate((el) => getComputedStyle(el).backgroundColor);- // A fresh Vite cache compiles the app on the first load.- await page.goto('http://127.0.0.1:5274/browser-tests/truenas-vsphere-status-rows.html', {- timeout: 180000,- });- await page.getByText('fixture ready', { exact: true }).waitFor({ timeout: 60000 });- if (width === 390) await page.evaluate(() => document.documentElement.classList.add('dark'));- const plain = (c) => !isRed(c) && !isAmber(c);-- await check('A TrueNAS app reads its state under its name', async () => {- const table = page.getByRole('region', { name: 'App table' });- const crashed = table.locator('[data-truenas-app-state="warning"]');- await crashed.waitFor();- assert.equal((await crashed.textContent()).trim(), 'Crashed');- assert.ok(isAmber(await colour(crashed)), 'crashed app amber');- const running = table.locator('[data-truenas-app-state="success"]');- assert.equal((await running.textContent()).trim(), 'Running');- assert.ok(plain(await colour(running)), 'running app plain');- });- await check('A TrueNAS share state reads in its dot colour', async () => {- const table = page.getByRole('region', { name: 'Share table' });- const attr = width === 390 ? 'data-truenas-share-state-phone' : 'data-truenas-share-state';- const disabled = table.locator(`[${attr}="danger"]`);- await disabled.waitFor();- assert.equal((await disabled.textContent()).trim(), 'Disabled');- assert.ok(isRed(await colour(disabled)), 'disabled share red');- const locked = table.locator(`[${attr}="warning"]`);- assert.equal((await locked.textContent()).trim(), 'Attention');- assert.ok(isAmber(await colour(locked)), 'locked share amber');- });- await check('A stopped TrueNAS service that should run says so', async () => {- const table = page.getByRole('region', { name: 'Service table' });- const note =- width === 390- ? table.locator('[data-truenas-service-state-phone="danger"]')- : table.locator('[data-truenas-service-state-note="danger"]');- await note.waitFor();- assert.match((await note.textContent()).replace(/\s+/g, ' '), /should be running/);- const words = width === 390 ? note : note.getByText('should be running');- assert.ok(isRed(await colour(words)), 'should-be-running note red');- });- await check('A failed vSphere task reads red', async () => {- const table = page.getByRole('region', { name: 'Activity table' });- const attr =- width === 390 ? 'data-vsphere-activity-state-phone' : 'data-vsphere-activity-state';- const failed = table.locator(`[${attr}="danger"]`);- await failed.waitFor();- assert.equal((await failed.textContent()).trim(), 'Error');- assert.ok(isRed(await colour(failed)), 'failed task red');- if (width !== 390) {- assert.equal(- await table.locator('[data-vsphere-activity-state-phone]').isVisible(),- false,- );- }- });- const dimensions = await page.evaluate(() => ({- width: innerWidth,- scroll: document.documentElement.scrollWidth,- }));- checks.push({- label: 'No horizontal page overflow',- passed: dimensions.scroll <= dimensions.width + 1,- dimensions,- });- checks.push({ label: 'No page errors', passed: errors.length === 0, errors });- const file = `${name}-truenas-vsphere.png`;- await page.screenshot({ path: path.join(output, file), fullPage: true });- screenshots.push({ file, engine: name, width });- results.push({ engine: name, width, checks });- await browser.close();- browser = undefined;- }- } finally {- if (browser) await browser.close();- await server.close();- }- const failures = results.flatMap((r) =>- r.checks.filter((c) => !c.passed).map((c) => ({ engine: r.engine, ...c })),- );- fs.writeFileSync(- path.join(output, 'result.json'),- JSON.stringify({ verified_at: new Date().toISOString(), results, screenshots }, null, 2),- );- console.log(- JSON.stringify({- checked: results.reduce((n, r) => n + r.checks.length, 0),- screenshots: screenshots.length,- failures,- }),- );- assert.equal(failures.length, 0, JSON.stringify(failures));-})().catch((error) => {- console.error(error);- process.exitCode = 1;-});diff --git a/frontend-modern/browser-tests/truenas-vsphere-status-rows.html b/frontend-modern/browser-tests/truenas-vsphere-status-rows.htmldeleted file mode 100644index 34a9a66ad5..0000000000--- a/frontend-modern/browser-tests/truenas-vsphere-status-rows.html+++ /dev/null@@ -1,12 +0,0 @@-<!doctype html>-<html lang="en">- <head>- <meta charset="UTF-8" />- <meta name="viewport" content="width=device-width, initial-scale=1.0" />- <title>TrueNAS and vSphere status rows verification</title>- </head>- <body>- <div id="root"></div>- <script type="module" src="./truenas-vsphere-status-rows.tsx"></script>- </body>-</html>diff --git a/frontend-modern/browser-tests/truenas-vsphere-status-rows.tsx b/frontend-modern/browser-tests/truenas-vsphere-status-rows.tsxdeleted file mode 100644index 8df45306d2..0000000000--- a/frontend-modern/browser-tests/truenas-vsphere-status-rows.tsx+++ /dev/null@@ -1,197 +0,0 @@-// Synthetic resources through the production TrueNAS Apps and Shares tables and-// the vSphere Activity table with app CSS. No real appliance, vCenter or-// installed/released acceptance claim.-import { createSignal } from 'solid-js';-import { createStore } from 'solid-js/store';-import { render } from 'solid-js/web';-import { Router, Route } from '@solidjs/router';-import { TrueNASAppsTable } from '../src/features/truenas/TrueNASAppsTable';-import { TrueNASNetworkSharesTable } from '../src/features/truenas/TrueNASNetworkSharesTable';-import { TrueNASServicesTable } from '../src/features/truenas/TrueNASServicesTable';-import { buildTrueNASServiceRows } from '../src/features/truenas/truenasPageModel';-import { VsphereActivityTable } from '../src/features/vmware/VsphereActivityTable';-import { buildVmwareActivityRows } from '../src/features/vmware/vmwarePageModel';-import { DarkModeContext, WebSocketContext } from '../src/contexts/appRuntime';-import type { Resource } from '../src/types/resource';-import { markSystemSettingsLoadedWithDefaults } from '../src/stores/systemSettings';-import '../src/index.css';--markSystemSettingsLoadedWithDefaults();--const [wsState] = createStore({- resources: [] as Resource[],- lastUpdate: 0,- nodes: [],- pbs: [],- pmg: [],- vms: [],- containers: [],-});-const [connected] = createSignal(false);-const ws = {- state: wsState,- connected,- initialDataReceived: () => true,- resourceChange: () => ({ version: 0, changedIds: null, changedKeys: null }),- activeAlerts: () => ({}),- shutdown: () => {},-};-window.__pulseWsStore = ws as any;--const now = '2026-10-03T12:00:00Z';-const truenas = (resource: Partial<Resource>): Resource =>- ({- status: 'online',- lastSeen: now,- platformType: 'truenas',- platformScopes: ['truenas'],- sourceType: 'api',- parentName: 'nas-primary',- ...resource,- }) as Resource;--const system = truenas({- id: 'system-primary',- type: 'agent',- name: 'nas-primary',- displayName: 'nas-primary',- truenas: {- hostname: 'nas-primary',- version: 'TrueNAS-SCALE-24.10.2',- services: [- { id: '1', service: 'smb', enabled: true, state: 'RUNNING' },- { id: '2', service: 'smartd', enabled: true, state: 'STOPPED' },- ],- },-});-// statusFromApp / statusFromNetworkShare: CRASHED -> warning, disabled -> offline.-const apps = [- truenas({- id: 'app-plex',- type: 'app-container',- name: 'plex',- status: 'warning',- truenas: { app: { id: 'plex', name: 'plex', state: 'CRASHED', containerCount: 1 } },- }),- truenas({- id: 'app-immich',- type: 'app-container',- name: 'immich',- status: 'online',- truenas: { app: { id: 'immich', name: 'immich', state: 'RUNNING', containerCount: 4 } },- }),-];-const shares = [- truenas({- id: 'share-archive',- type: 'network-share',- name: 'archive',- status: 'offline',- truenas: {- share: {- id: '1',- name: 'archive',- protocol: 'smb',- path: '/mnt/tank/archive',- enabled: false,- },- },- }),- truenas({- id: 'share-media',- type: 'network-share',- name: 'media',- status: 'warning',- truenas: {- share: {- id: '2',- name: 'media',- protocol: 'nfs',- path: '/mnt/tank/media',- enabled: true,- locked: true,- },- },- }),-];-const vm = {- id: 'vm-201',- type: 'vm',- name: 'warehouse-api-01',- displayName: 'warehouse-api-01',- status: 'online',- platformType: 'vmware-vsphere',- platformScopes: ['vmware-vsphere'],- sourceType: 'api',- vmware: { entityType: 'vm', managedObjectId: 'vm-201', connectionName: 'lab-vcenter' },- recentChanges: [- {- id: 'activity-task-reconfigure',- observedAt: now,- occurredAt: now,- resourceId: 'vm-201',- kind: 'activity',- sourceType: 'platform_event',- sourceAdapter: 'vmware_adapter',- confidence: 'high',- reason: 'Reconfigure virtual machine (error)',- metadata: {- activity_type: 'vmware_task',- activity_native_id: 'task-901',- activity_title: 'Reconfigure virtual machine',- activity_state: 'error',- activity_message: 'Permission denied while reconfiguring VM',- vmwareManagedObjectId: 'vm-201',- vmwareEntityType: 'vm',- },- },- ],-} as unknown as Resource;--function Fixture() {- const tableProps = {- emptyIcon: <span />,- emptyTitle: 'No fixture rows',- emptyDescription: 'No fixture rows',- showToolbar: false,- };- return (- <WebSocketContext.Provider value={ws as any}>- <DarkModeContext.Provider value={() => document.documentElement.classList.contains('dark')}>- <main class="min-h-screen space-y-4 bg-surface p-4 text-base-content">- <h1 class="text-lg font-semibold">TrueNAS and vSphere status rows</h1>- <p data-fixture-loaded>fixture ready</p>- <section aria-label="App table">- <TrueNASAppsTable apps={apps} scope={[system, ...apps]} {...tableProps} />- </section>- <section aria-label="Share table">- <TrueNASNetworkSharesTable- shares={shares}- scope={[system, ...shares]}- {...tableProps}- />- </section>- <section aria-label="Service table">- <TrueNASServicesTable services={buildTrueNASServiceRows([system])} {...tableProps} />- </section>- <section aria-label="Activity table">- <VsphereActivityTable- singleVcenter- activity={buildVmwareActivityRows([vm])}- {...tableProps}- />- </section>- </main>- </DarkModeContext.Provider>- </WebSocketContext.Provider>- );-}--render(- () => (- <Router>- <Route path="/*" component={Fixture} />- </Router>- ),- document.getElementById('root')!,-);diff --git a/frontend-modern/browser-tests/unix-guidance-copy.cjs b/frontend-modern/browser-tests/unix-guidance-copy.cjsdeleted file mode 100644index c074bb0143..0000000000--- a/frontend-modern/browser-tests/unix-guidance-copy.cjs+++ /dev/null@@ -1,193 +0,0 @@-// Scoped copy proof: actual installer/Doctor/styles, synthetic token API only.-const assert = require('node:assert/strict');-const fs = require('node:fs');-const path = require('node:path');-const { chromium, webkit } = require('playwright');-(async () => {- const root = '/workspace/frontend-modern';- process.chdir(root);- const artifacts = path.join(root, 'node_modules', 'unix-guidance-browser');- fs.mkdirSync(artifacts, { recursive: true });- 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-unix-guidance-copy'),- optimizeDeps: {- noDiscovery: true,- include: ['solid-js', 'solid-js/web', '@solidjs/router'],- },- server: { host: '127.0.0.1', port: 5244, strictPort: true },- });- const secret = 'browser-synthetic-install-token';- const results = [];- let browser;- try {- await server.listen();- for (const [engine, width, tone] of [- ['chromium', 1280, 'light'],- ['webkit', 390, 'dark'],- ]) {- browser = await { chromium, webkit }[engine].launch(- engine === 'chromium'- ? { headless: true, channel: 'chromium', args: ['--no-sandbox'] }- : { headless: true },- );- const page = await browser.newPage({- viewport: { width, height: 900 },- ...(engine === 'webkit' ? { isMobile: true, hasTouch: true } : {}),- });- const errors = [];- page.on('pageerror', (error) => {- errors.push(error.message);- console.log('PAGE_ERROR', error.message);- });- page.on('console', (message) => {- if (message.type() === 'error') {- errors.push(message.text());- console.log('CONSOLE_ERROR', message.text());- }- });- await page.addInitScript(() => {- window.__copies = [];- Object.defineProperty(navigator, 'clipboard', {- value: {- writeText: async (text) => window.__copies.push(text),- },- });- });- await page.route('**/api/**', async (route) => {- const pathname = new URL(route.request().url()).pathname;- // Do not intercept the production /src/api/*.ts module requests.- if (!pathname.startsWith('/api/')) return route.continue();- if (pathname === '/api/security/status')- return route.fulfill({- json: {- requiresAuth: true,- hasAuthentication: true,- apiTokenConfigured: true,- },- });- if (pathname === '/api/agent-install-command')- return route.fulfill({- json: {- token: secret,- record: {- id: 'synthetic-record',- name: 'Synthetic installer',- prefix: 'browser',- suffix: 'token',- createdAt: new Date().toISOString(),- },- },- });- if (pathname === '/api/state')- return route.fulfill({ json: { connectedInfrastructure: [] } });- return route.fulfill({ json: { data: [] } });- });- await page.goto('http://127.0.0.1:5244/browser-tests/unix-private-install.html', {- waitUntil: 'domcontentloaded',- timeout: 60_000,- });- await page- .getByRole('heading', { name: 'Private Unix agent installation', exact: true })- .waitFor({ timeout: 60_000 });- if (tone === 'dark')- await page.evaluate(() => document.documentElement.classList.add('dark'));- await page.getByRole('button', { name: 'Generate token', exact: true }).first().click();- const dialog = page.getByRole('dialog', { name: 'API token ready' });- await dialog.waitFor();- await dialog.getByRole('button', { name: 'Dismiss', exact: true }).click();- await dialog.waitFor({ state: 'hidden' });- const privateNote = page- .locator('span')- .filter({- hasText: /^Before running, save the separately revealed token/,- })- .first();- const fileText = await privateNote.innerText();- assert.ok(- fileText.includes(- 'This command does not prompt or delete your file. Remove it through the same trusted file path afterwards.',- ),- );- for (const warning of [- '0600',- '0700',- 'Never put the token in a GUI command field',- 'console or SSH instead',- ])- assert.ok(fileText.includes(warning));- await page- .getByRole('button', {- name: 'Copy Install from a private token file (no terminal) command',- exact: true,- })- .click();- const fileCommand = await page.evaluate(() => window.__copies.at(-1));- assert.ok(fileCommand.includes('/root/.config/pulse-agent/bootstrap-token'));- assert.ok(fileCommand.includes('--token-file'));- assert.ok(!fileCommand.includes('read -r'));- assert.ok(!fileCommand.includes(secret));- await privateNote.screenshot({ path: path.join(artifacts, `${engine}-private-file.png`) });- await page- .getByRole('button', { name: 'Show details for removed-fixture', exact: true })- .click();- const removalNote = page.locator('p').filter({- hasText:- 'This agent was removed from Pulse, but the agent software may still be installed on its host.',- });- const removalText = await removalNote.innerText();- assert.ok(- removalText.includes('token at its silent prompt. Never insert it into the command.'),- );- assert.ok(removalText.includes('Pulse does not run commands remotely'));- await page- .getByRole('button', {- name: 'Copy Linux / macOS / FreeBSD uninstall command for removed-fixture',- exact: true,- })- .click();- const removalCommand = await page.evaluate(() => window.__copies.at(-1));- assert.ok(removalCommand.includes('removed-agent-42'));- assert.ok(removalCommand.includes('--uninstall'));- assert.ok(!removalCommand.includes('--preflight-only'));- assert.ok(!removalCommand.includes(secret));- await removalNote.screenshot({ path: path.join(artifacts, `${engine}-removed-note.png`) });- assert.ok(await page.evaluate(() => document.documentElement.scrollWidth <= innerWidth + 1));- await page.screenshot({ path: path.join(artifacts, `${engine}-viewport.png`) });- assert.deepEqual(errors, []);- results.push({- engine,- version: browser.version(),- width,- tone,- fileText,- removalText,- privateFileCopied: true,- scopedRemovalCopied: true,- errors,- });- await browser.close();- browser = undefined;- }- fs.writeFileSync(- path.join(artifacts, 'result.json'),- JSON.stringify(- {- playwright: require('playwright/package.json').version,- results,- },- null,- 2,- ),- );- console.log(JSON.stringify({ result: 'passed', artifacts, results }));- } finally {- if (browser) await browser.close();- await server.close();- }-})().catch((error) => {- console.error(error);- process.exitCode = 1;-});diff --git a/frontend-modern/browser-tests/unix-private-install.cjs b/frontend-modern/browser-tests/unix-private-install.cjsdeleted file mode 100644index 1d4c744fbb..0000000000--- a/frontend-modern/browser-tests/unix-private-install.cjs+++ /dev/null@@ -1,412 +0,0 @@-// UI proof only. No real token issuance, appliance, download or installation.-const assert = require('node:assert/strict');-const fs = require('node:fs');-const path = require('node:path');-const http = require('node:http');-const crypto = require('node:crypto');-const { chromium, webkit } = require('playwright');-const hash = (bytes) => crypto.createHash('sha256').update(bytes).digest('hex');-(async () => {- const workspace = process.env.PULSE_BROWSER_PROOF_ROOT || '/workspace';- const root = path.join(workspace, 'frontend-modern');- const artifacts = path.join(workspace, 'tmp/unix-private-install');- const preview = path.join(artifacts, 'static');- const bindingBytes = fs.readFileSync(path.join(preview, 'binding.json'));- const binding = JSON.parse(bindingBytes);- for (const [file, expected] of Object.entries(binding.sources))- assert.equal(hash(fs.readFileSync(path.join(root, file))), expected, file);- for (const [file, expected] of Object.entries(binding.artifacts))- assert.equal(hash(fs.readFileSync(path.join(preview, file))), expected, file);- const served = [];- const server = http.createServer((req, res) => {- const file = new URL(req.url, 'http://fixture.invalid').pathname.slice(1);- if (!['GET', 'HEAD'].includes(req.method) || !Object.hasOwn(binding.artifacts, file)) {- res.writeHead(404);- res.end();- return;- }- const bytes = fs.readFileSync(path.join(preview, file));- assert.equal(hash(bytes), binding.artifacts[file]);- served.push({ file, sha256: hash(bytes) });- res.writeHead(200, {- 'Content-Type': file.endsWith('.js')- ? 'text/javascript'- : file.endsWith('.css')- ? 'text/css'- : 'text/html',- 'Cache-Control': 'no-store',- });- res.end(bytes);- });- const captures = [],- consumerCommands = [],- requests = [];- let cleanup = { browser_closed: false, server_closed: false };- const results = [];- let browser;- const secret = 'browser-synthetic-install-token';- try {- await new Promise((resolve) => server.listen(0, '127.0.0.1', resolve));- const origin = `http://127.0.0.1:${server.address().port}`;- assert.equal(require('playwright/package.json').version, '1.56.1');- for (const [engine, width, tone] of [- ['chromium', 1280, 'light'],- ['chromium', 1280, 'dark'],- ['webkit', 390, 'light'],- ['webkit', 390, 'dark'],- ]) {- browser = await { chromium, webkit }[engine].launch(- engine === 'chromium'- ? { headless: true, channel: 'chromium', args: ['--no-sandbox'] }- : { headless: true },- );- const page = await browser.newPage({- viewport: { width, height: 900 },- ...(engine === 'webkit' ? { isMobile: true, hasTouch: true } : {}),- });- await page.clock.install();- const errors = [];- const capture = async (name, locator) => {- if (locator)- await locator.evaluate((el) => window.scrollBy(0, el.getBoundingClientRect().top - 48));- await page.evaluate(- () =>- new Promise((resolve) => requestAnimationFrame(() => requestAnimationFrame(resolve))),- );- assert.equal(- await page.evaluate(() => document.documentElement.scrollWidth <= innerWidth),- true,- name,- );- const file = `${engine}-${tone}-${name}.png`;- await page.screenshot({ path: path.join(artifacts, file) });- captures.push({- file,- sha256: hash(fs.readFileSync(path.join(artifacts, file))),- engine,- tone,- width,- height: 900,- });- };- const activate = async (locator) => {- if (engine === 'webkit') await locator.tap();- else {- await locator.focus();- await page.keyboard.press('Enter');- }- };- page.on('pageerror', (e) => errors.push(e.message));- page.on('console', (m) => {- if (m.type() === 'error') {- console.log('PAGE_CONSOLE_ERROR', m.text());- errors.push(m.text());- }- });- page.on('requestfailed', (r) => console.log('REQUEST_FAILED', r.url(), r.failure()));- let minted = 0;- let lookupReads = 0;- const seen = new Date(Date.now() - 5000).toISOString();- let optionalAuth = false;- await page.addInitScript(() => {- window.__copies = [];- Object.defineProperty(navigator, 'clipboard', {- value: { writeText: async (text) => window.__copies.push(text) },- });- });- page.on('request', (req) =>- requests.push({ path: new URL(req.url()).pathname, method: req.method() }),- );- await page.route('**/api/**', async (route) => {- const url = new URL(route.request().url());- if (!url.pathname.startsWith('/api/')) return route.continue();- if (url.pathname === '/api/security/status')- return route.fulfill({- json: {- requiresAuth: !optionalAuth,- hasAuthentication: !optionalAuth,- apiTokenConfigured: !optionalAuth,- },- });- if (url.pathname === '/api/agent-install-command') {- const body = route.request().postDataJSON();- assert.equal(body.type, 'host');- assert.equal(body.enableCommands, false);- minted++;- return route.fulfill({- json: {- token: secret,- record: {- id: 'synthetic-token-record',- name: 'Synthetic installer',- prefix: 'browser',- suffix: 'token',- createdAt: new Date().toISOString(),- },- },- });- }- if (url.pathname === '/api/agents/agent/lookup') {- lookupReads++;- return route.fulfill({- json: {- agent: {- id: 'fixture-connected',- hostname: 'fixture-host',- displayName: 'Fixture host',- connected: true,- status: 'online',- lastSeen: seen,- },- },- });- }- if (url.pathname === '/api/state')- return route.fulfill({ json: { connectedInfrastructure: [] } });- return route.fulfill({ json: { data: [] } });- });- await page.goto(`${origin}/browser-tests/unix-private-install.html`);- await page.waitForTimeout(1000);- console.log('PAGE_TITLE', await page.title());- console.log(- JSON.stringify({- engine,- errors,- body: (await page.locator('body').innerText()).slice(0, 300),- }),- );- await page- .getByRole('heading', { name: 'Private Unix agent installation', exact: true })- .waitFor();- if (tone === 'dark')- await page.evaluate(() => document.documentElement.classList.add('dark'));- await page.getByRole('button', { name: 'Generate token', exact: true }).first().click();- const dialog = page.getByRole('dialog', { name: 'API token ready' });- await dialog.waitFor();- await page.waitForFunction(() => {- const d = document.querySelector('[role="dialog"]');- return d && getComputedStyle(d).opacity === '1';- });- assert.match(await dialog.innerText(), /silent “Pulse agent token” prompt/);- const copyToken = dialog.getByRole('button', { name: 'Copy token', exact: true });- await copyToken.focus();- await page.keyboard.press('Enter');- assert.equal(await page.evaluate(() => window.__copies.at(-1)), secret);- await capture('token-dialog');- await page.keyboard.press('Escape');- await dialog.waitFor({ state: 'hidden' });- // The real component's platform cards and copy handlers.- const code = page.locator('code').filter({ hasText: 'Pulse agent token' });- assert.ok((await code.count()) >= 3);- const unixCommands = await code.allTextContents();- for (const command of unixCommands) {- assert.ok(!command.includes(secret));- assert.ok(command.includes('--token-file "$token_file"'));- assert.ok(!/[\r\n]/.test(command));- assert.ok(command.includes('tty_control=(busybox stty)'));- assert.ok(command.includes('Cannot disable terminal echo'));- assert.ok(command.includes('private token-file command'));- }- const guiCode = page.locator('code').filter({ hasText: 'token_parent=${token_file%/*}' });- assert.equal(await guiCode.count(), 2);- const guiCommand = await guiCode.first().innerText();- assert.equal(await guiCode.last().innerText(), guiCommand);- assert.ok(guiCommand.includes('/root/.config/pulse-agent/bootstrap-token'));- assert.ok(!guiCommand.includes('read -r'));- assert.ok(!guiCommand.includes(secret));- assert.ok(- (await page.locator('body').innerText()).includes(- 'Never put the token in a GUI command field',- ),- );- await activate(page.getByRole('button', { name: 'Copy Install command', exact: true }));- assert.equal(await page.evaluate(() => window.__copies.at(-1)), unixCommands[0]);- const fileCopy = page- .getByRole('button', {- name: 'Copy Install from a private token file (no terminal) command',- exact: true,- })- .first();- await activate(fileCopy);- const linuxCard = page- .getByRole('heading', { name: 'Install on Linux', exact: true })- .locator('..')- .locator('..');- assert.match(await linuxCard.innerText(), /BusyBox/);- assert.match(await linuxCard.innerText(), /root-owned/);- await capture('linux-private-file', fileCopy);- assert.equal(await page.evaluate(() => window.__copies.at(-1)), guiCommand);- consumerCommands.push({ engine, tone, kind: 'linux-file', command: guiCommand });- await activate(- page.getByRole('button', { name: 'Show details for doctor-fixture', exact: true }),- );- await page- .getByRole('button', {- name: 'Copy authentication repair command for doctor-fixture',- exact: true,- })- .click();- const doctorCommand = await page.evaluate(() => window.__copies.at(-1));- assert.ok(!doctorCommand.includes(secret));- assert.ok(doctorCommand.includes('tty_control=(busybox stty)'));- assert.ok(doctorCommand.includes('--update --enable-docker'));- assert.ok(doctorCommand.includes('doctor-fixture'));- consumerCommands.push({ engine, tone, kind: 'doctor-repair', command: doctorCommand });- await capture(- 'doctor-repair',- page.getByRole('button', {- name: 'Copy authentication repair command for doctor-fixture',- exact: true,- }),- );-- await page.getByRole('button', { name: 'Show token only', exact: true }).click();- await dialog.waitFor();- assert.equal(minted, 1);- await dialog.getByRole('button', { name: 'Dismiss', exact: true }).click();- await page- .getByRole('button', { name: 'Show advanced connection and install options', exact: true })- .click();- const signing = page- .locator('div')- .filter({ has: page.getByText('Config signing (optional)', { exact: true }) })- .last();- for (const key of [- 'PULSE_AGENT_CONFIG_SIGNATURE_REQUIRED=true',- 'PULSE_AGENT_CONFIG_SIGNING_KEY',- 'PULSE_AGENT_CONFIG_PUBLIC_KEYS',- ]) {- const code = signing.getByText(key, { exact: true });- await code.scrollIntoViewIfNeeded();- const bounds = await code.boundingBox();- assert.ok(bounds && bounds.x >= 0 && bounds.x + bounds.width <= width, key);- assert.match(await code.getAttribute('class'), /wrap-anywhere/);- }- await capture('config-signing', signing);- await page- .getByLabel('Connection URL (Agent → Pulse)', { exact: true })- .fill('https://pulse.example/base/');- await page- .getByLabel('Custom CA certificate path (optional)', { exact: true })- .fill('/etc/pulse/ca.pem');- for (const label of [- 'Copy Unix uninstall',- 'Copy Unix credential repair',- 'Copy Unix saved-state update',- ]) {- await page.getByRole('button', { name: label, exact: true }).click();- const command = await page.evaluate(() => window.__copies.at(-1));- assert.ok(!command.includes(secret));- assert.ok(command.includes('https://pulse.example/base'));- assert.ok(command.includes('--cacert'));- assert.ok(!command.includes('| bash'));- if (label.includes('uninstall')) {- assert.ok(command.includes('--uninstall'));- assert.ok(command.includes('agent-fixture-42'));- assert.ok(command.includes('node.example'));- assert.ok(!command.includes('--preflight-only'));- } else {- assert.ok(command.includes('--update'));- assert.ok(command.includes('--enable-docker'));- assert.ok(command.includes('--preflight-only'));- if (label.includes('credential')) {- assert.ok(command.includes('agent-fixture-42'));- assert.ok(command.includes('node.example'));- assert.ok(command.includes('--token-file'));- } else {- assert.ok(!command.includes('--token-file'));- assert.ok(!command.includes('read -r'));- }- }- }- assert.ok(- (await page.locator('body').innerText()).includes(- 'Never insert the token into the command',- ),- );- await capture(- 'trust-options',- page.getByLabel('Custom CA certificate path (optional)', { exact: true }),- );- consumerCommands.push({ engine, tone, kind: 'linux-install', command: unixCommands[0] });- await page.getByPlaceholder('Hostname or agent ID').fill('fixture-host');- await page.getByRole('button', { name: 'Check status', exact: true }).click();- await page.getByText('First host connected', { exact: true }).waitFor();- const age = page.getByText(/^Last seen /);- const initialAge = await age.innerText();- const readsBeforeTick = lookupReads;- await page.clock.runFor(65_000);- assert.notEqual(await age.innerText(), initialAge);- assert.equal(lookupReads, readsBeforeTick);- await capture('connected-age', age);- optionalAuth = true;- await page.goto(`${origin}/browser-tests/unix-private-install.html?optional=1`);- await page.getByRole('button', { name: 'Confirm without token', exact: true }).click();- const optionalCode = page.locator('code').filter({ hasText: 'bootstrap_dir=$(mktemp' });- const optionalCommands = await optionalCode.allTextContents();- assert.ok(optionalCommands.length >= 3);- for (const command of optionalCommands) {- assert.ok(!command.includes('--token-file'));- assert.ok(!command.includes('read -r'));- }- assert.equal(- await page- .getByRole('button', {- name: 'Copy Install from a private token file (no terminal) command',- exact: true,- })- .count(),- 0,- );- assert.deepEqual(errors, []);- results.push({- engine,- version: browser.version(),- width,- tone,- issued: minted,- copied: await page.evaluate(() => window.__copies.length),- unixCommands: unixCommands.length,- guiCommand: true,- optionalAuth: true,- errors,- });- await browser.close();- browser = undefined;- }- assert.equal(captures.length, 24);- } finally {- if (browser) await browser.close();- cleanup.browser_closed = true;- await new Promise((resolve) => server.close(resolve));- cleanup.server_closed = true;- fs.writeFileSync(- path.join(artifacts, 'consumer-commands.json'),- JSON.stringify({ source: binding.source_sha, consumerCommands }, null, 2) + '\n',- );- fs.writeFileSync(- path.join(artifacts, 'result.json'),- JSON.stringify(- {- source: binding.source_sha,- binding_sha256: hash(bindingBytes),- source_inputs: Object.keys(binding.sources).length,- playwright: require('playwright/package.json').version,- results,- captures,- requests,- served,- cleanup,- },- null,- 2,- ) + '\n',- );- }- console.log(- JSON.stringify({ result: 'passed', artifacts, results, captures: captures.length, cleanup }),- );-})().catch((e) => {- console.error(e);- process.exitCode = 1;-});diff --git a/frontend-modern/browser-tests/unix-private-install.html b/frontend-modern/browser-tests/unix-private-install.htmldeleted file mode 100644index 862d8a5e58..0000000000--- a/frontend-modern/browser-tests/unix-private-install.html+++ /dev/null@@ -1,12 +0,0 @@-<!doctype html>-<html lang="en">- <head>- <meta charset="utf-8" />- <meta name="viewport" content="width=device-width, initial-scale=1" />- <title>Unix private agent installation</title>- </head>- <body>- <div id="root"></div>- <script type="module" src="./unix-private-install.tsx"></script>- </body>-</html>diff --git a/frontend-modern/browser-tests/unix-private-install.tsx b/frontend-modern/browser-tests/unix-private-install.tsxdeleted file mode 100644index 0e6a2ec45f..0000000000--- a/frontend-modern/browser-tests/unix-private-install.tsx+++ /dev/null@@ -1,113 +0,0 @@-// Production settings state, installer and token dialog; synthetic API data only.-import { Route, Router } from '@solidjs/router';-import { render } from 'solid-js/web';-import {- InfrastructureOperationsStateProvider,- useInfrastructureOperationsContext,-} from '../src/components/Settings/useInfrastructureOperationsState';-import { InfrastructureInstallerSection } from '../src/components/Settings/InfrastructureInstallerSection';-import { InfrastructureAgentDoctorPage } from '../src/components/Settings/InfrastructureAgentDoctorPage';-import type { InfrastructureAgentDoctorTarget } from '../src/components/Settings/infrastructureAgentUpdateCommandsModel';-import { TokenRevealDialog } from '../src/components/TokenRevealDialog';-import '../src/index.css';--const Operations = () => {- const state = useInfrastructureOperationsContext();- const identity = {- agentActionId: 'agent-fixture-42',- agentId: 'unused-alias',- hostname: 'node.example',- };- const connection = {- id: 'agent:agent-fixture-42',- type: 'agent',- name: 'node.example',- address: 'node.example',- state: 'unauthorized',- agentIdentity: { hostname: 'node.example', commandsEnabled: false },- } as Parameters<typeof state.getAgentConnectionUpgradeCommand>[0];- return (- <section class="space-y-2 p-4 border border-border" aria-label="Lifecycle command fixture">- <p>Actual operations state: identity and trust options must survive.</p>- <button onClick={() => navigator.clipboard.writeText(state.getUninstallCommand(identity))}>- Copy Unix uninstall- </button>- <button- onClick={() =>- navigator.clipboard.writeText(- state.getAgentConnectionUpgradeCommand(connection, ['--enable-docker'], 'linux', true),- )- }- >- Copy Unix credential repair- </button>- <button- onClick={() =>- navigator.clipboard.writeText(- state.getAgentConnectionUpgradeCommand(connection, ['--enable-docker'], 'linux', false),- )- }- >- Copy Unix saved-state update- </button>- </section>- );-};-const Fixture = () => (- <InfrastructureOperationsStateProvider embedded>- <main class="mx-auto max-w-5xl p-4 bg-base text-base-content">- <h1 class="text-xl mb-4">Private Unix agent installation</h1>- <InfrastructureInstallerSection />- <Operations />- <Doctor />- <TokenRevealDialog />- </main>- </InfrastructureOperationsStateProvider>-);-const Doctor = () => {- const target = {- key: 'agent:doctor-fixture',- connectionId: 'agent:doctor-fixture',- displayName: 'doctor-fixture',- contextLabel: 'Machine',- currentVersion: '6.4.5',- installFlags: ['--enable-docker'],- status: 'critical',- reasons: [],- evidence: [],- needsUpdate: false,- needsCredentialRepair: true,- commandPlatform: 'linux',- safeCollector: false,- actionRunnerPosture: [],- actionRunnerCredentialEligible: false,- source: 'ledger',- connection: {- id: 'agent:doctor-fixture',- type: 'agent',- name: 'doctor-fixture',- address: 'doctor.example',- state: 'unauthorized',- agentIdentity: { hostname: 'doctor.example', commandsEnabled: false },- },- } as InfrastructureAgentDoctorTarget;- const removedTarget = {- ...target,- key: 'agent:removed-fixture',- connectionId: 'agent:removed-fixture',- displayName: 'removed-fixture',- status: 'removed',- needsCredentialRepair: false,- connection: undefined,- diagnostic: { agentId: 'removed-agent-42', hostname: 'removed.example' },- } as InfrastructureAgentDoctorTarget;- return <InfrastructureAgentDoctorPage targets={[target, removedTarget]} />;-};-render(- () => (- <Router>- <Route path="*" component={Fixture} />- </Router>- ),- document.getElementById('root')!,-);diff --git a/frontend-modern/browser-tests/update-action-receipt.cjs b/frontend-modern/browser-tests/update-action-receipt.cjsdeleted file mode 100644index aa1be43d12..0000000000--- a/frontend-modern/browser-tests/update-action-receipt.cjs+++ /dev/null@@ -1,103 +0,0 @@-// Offline browser proof: a changed registry badge cannot complete an unknown action.-const assert = require('node:assert/strict');-const fs = require('node:fs');-const path = require('node:path');-const { chromium } = require('playwright');--(async () => {- const root = '/workspace/frontend-modern';- const artifacts = path.join(root, 'browser-tests', 'update-action-receipt-proof');- fs.mkdirSync(artifacts, { recursive: true });- 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'),- server: { host: '127.0.0.1', port: 5207, strictPort: true },- });- let browser;- try {- await server.listen();- browser = await chromium.launch({ headless: true, channel: 'chromium', args: ['--no-sandbox'] });- const results = [];- for (const width of [1365, 390]) {- let mode = 'pending';- const page = await browser.newPage({ viewport: { width, height: width === 390 ? 844 : 900 } });- const pageErrors = [];- const actionRequests = [];- page.on('pageerror', (error) => pageErrors.push(error.message));- await page.route('**/*', (route) => {- const url = new URL(route.request().url());- if (url.origin !== 'http://127.0.0.1:5207') return route.abort();- if (url.pathname === '/api/security/status') {- return route.fulfill({ json: {- hasAuthentication: true, requiresAuth: true,- settingsCapabilities: { authenticationWrite: true },- } });- }- if (url.pathname === '/api/actions/action-fixture-1') {- actionRequests.push(route.request().method());- return route.fulfill({ json: {- audit: {- id: 'action-fixture-1', createdAt: new Date().toISOString(),- updatedAt: new Date().toISOString(), state: mode === 'pending' ? 'executing' : 'completed',- decisionRevision: 1,- request: { requestId: 'request-fixture-1', resourceId: 'docker:container:edge',- capabilityName: 'update', reason: 'Update edge.', requestedBy: 'operator' },- plan: { actionId: 'action-fixture-1', requestId: 'request-fixture-1', allowed: true,- requiresApproval: false, approvalPolicy: 'none', rollbackAvailable: false,- expiresAt: new Date(Date.now() + 30 * 60_000).toISOString(),- planHash: 'sha256:fixture-plan', policyDecision: { status: 'resolved', authorities: [] } },- verificationOutcome: { status: mode === 'pending' ? 'unknown' : 'verified' },- ...(mode === 'complete' ? { result: { success: true,- actionResultV2: { execution: { status: 'succeeded' },- verification: { status: 'verified', evidenceClass: 'agent' },- compensation: { status: 'not_attempted', support: 'unavailable' } } } } : {}),- },- events: [],- attempt: { id: 'attempt-fixture-1', actionId: 'action-fixture-1',- state: mode === 'pending' ? 'receipt_pending' : 'receipt_recorded',- createdAt: new Date(Date.now() - 5 * 60_000).toISOString(),- updatedAt: new Date(Date.now() - 5 * 60_000).toISOString(), dispatchCount: 1 },- } });- }- if (url.pathname.startsWith('/api/')) return route.abort();- return route.continue();- });- await page.goto('http://127.0.0.1:5207/browser-tests/update-action-receipt.html', {- waitUntil: 'domcontentloaded', timeout: 120_000,- });- const review = page.getByRole('button', { name: /outcome not yet known/i });- await review.waitFor();- assert.equal(await page.getByText('Current', { exact: true }).count(), 0);- assert.equal(await page.getByText('Completed', { exact: true }).count(), 0);- await page.screenshot({ path: path.join(artifacts, `pending-${width}.png`) });-- await review.click();- await page.getByText('Receipt pending', { exact: true }).waitFor();- assert.equal(actionRequests.length, 1);- await page.waitForTimeout(400); // Let the dialog entrance finish before capture.- await page.screenshot({ path: path.join(artifacts, `review-${width}.png`) });-- mode = 'complete';- await page.getByRole('button', { name: 'Check for receipt' }).click();- await page.getByText('Completed', { exact: true }).first().waitFor();- assert.equal(actionRequests.length, 2);- assert.ok(actionRequests.every((method) => method === 'GET'), JSON.stringify(actionRequests));- assert.deepEqual(pageErrors, []);- const dimensions = await page.evaluate(() => ({ scroll: document.documentElement.scrollWidth, inner: innerWidth }));- assert.ok(dimensions.scroll <= dimensions.inner + 1, JSON.stringify(dimensions));- await page.waitForTimeout(400);- await page.screenshot({ path: path.join(artifacts, `completed-${width}.png`) });- results.push({ width, actionRequests, pageErrors, dimensions });- await page.close();- }- console.log(JSON.stringify({ result: 'passed', browser: browser.version(), playwright: '1.56.1', results }));- } finally {- if (browser) await browser.close();- await server.close();- }-})().catch((error) => {- console.error(error);- process.exitCode = 1;-});diff --git a/frontend-modern/browser-tests/update-action-receipt.html b/frontend-modern/browser-tests/update-action-receipt.htmldeleted file mode 100644index f58f61dece..0000000000--- a/frontend-modern/browser-tests/update-action-receipt.html+++ /dev/null@@ -1,11 +0,0 @@-<!doctype html>-<html lang="en">- <head>- <meta charset="UTF-8" />- <meta name="viewport" content="width=device-width, initial-scale=1" />- </head>- <body>- <div id="root"></div>- <script type="module" src="/browser-tests/update-action-receipt.tsx"></script>- </body>-</html>diff --git a/frontend-modern/browser-tests/update-action-receipt.tsx b/frontend-modern/browser-tests/update-action-receipt.tsxdeleted file mode 100644index 0ee9f9a6fe..0000000000--- a/frontend-modern/browser-tests/update-action-receipt.tsx+++ /dev/null@@ -1,29 +0,0 @@-// Exercise the production Docker update button with an unresolved governed action.-import { render } from 'solid-js/web';-import { UpdateButton } from '../src/components/shared/ContainerUpdateBadge';-import { markContainerQueued } from '../src/stores/containerUpdates';-import { markSystemSettingsLoadedWithDefaults } from '../src/stores/systemSettings';-import '../src/index.css';--markSystemSettingsLoadedWithDefaults();-markContainerQueued('agent-fixture-1', 'container-fixture-1', 'action-fixture-1');--render(- () => (- <main class="mx-auto max-w-lg p-6">- <h1 class="mb-4 text-lg font-semibold">Container update receipt</h1>- <UpdateButton- agentId="agent-fixture-1"- containerId="container-fixture-1"- containerName="edge"- resourceId="docker:container:edge"- updateStatus={{- updateAvailable: false,- currentDigest: 'sha256:current',- lastChecked: Date.now(),- }}- />- </main>- ),- document.getElementById('root')!,-);diff --git a/frontend-modern/browser-tests/update-progress-modal.cjs b/frontend-modern/browser-tests/update-progress-modal.cjsdeleted file mode 100644index 3be13f22d7..0000000000--- a/frontend-modern/browser-tests/update-progress-modal.cjs+++ /dev/null@@ -1,348 +0,0 @@-// Offline browser proof: the update progress modal keeps moving when the-// update stream goes quiet, and reloads only on real restart evidence.-//-// node frontend-modern/browser-tests/update-progress-modal.cjs-//-// Needs Playwright 1.56.1 resolvable (NODE_PATH works) with its Chromium.-// PULSE_BROWSER_ARTIFACTS picks the screenshot directory and-// PULSE_CHROMIUM_PATH an alternative Chromium executable. Every API answer is-// synthetic and off-origin traffic is aborted; no Pulse server is contacted.-const assert = require('node:assert/strict');-const fs = require('node:fs');-const path = require('node:path');-const { chromium } = require('playwright');--const PORT = 5208;-const ORIGIN = `http://127.0.0.1:${PORT}`;-const HARNESS = `${ORIGIN}/browser-tests/update-progress-modal.html`;-const OLD = 'v6.4.4';-const NEW = 'v6.4.5';--const status = (stage, progress, message) => ({- status: stage,- progress,- message,- updatedAt: new Date().toISOString(),-});-const MESSAGES = {- downloading: 'Downloading update...',- verifying: 'Verifying download...',- extracting: 'Extracting update...',- 'backing-up': 'Backing up current installation...',- applying: 'Applying update...',- restarting: 'Restarting Pulse...',- completed: 'Update completed',- idle: '',-};-const s = (stage, progress) => status(stage, progress, MESSAGES[stage]);--const ABORT = Symbol('abort');-const UNAVAILABLE = Symbol('unavailable');--async function openHarness(browser, viewport, server) {- const context = await browser.newContext({ viewport });- const page = await context.newPage();- const record = {- pageErrors: [],- documentLoads: 0,- statusRequests: [],- versionRequests: [],- offOrigin: 0,- };- page.on('pageerror', (error) => record.pageErrors.push(error.message));- await page.route('**/*', (route) => {- const request = route.request();- const url = new URL(request.url());- if (url.origin !== ORIGIN) {- record.offOrigin += 1;- return route.abort();- }- if (url.pathname === '/browser-tests/update-progress-modal.html') {- record.documentLoads += 1;- return route.continue();- }- const answer = (value, log) => {- log.push(value === ABORT ? 'unreachable' : value === UNAVAILABLE ? '503' : value);- if (value === ABORT) return route.abort('connectionrefused');- if (value === UNAVAILABLE) return route.fulfill({ status: 503, body: 'unavailable' });- return route.fulfill({ json: value });- };- if (url.pathname === '/api/updates/status') {- return answer(server.status(), record.statusRequests);- }- if (url.pathname === '/api/version') {- const version = server.version();- return answer(- typeof version === 'string' ? { version, build: 'release' } : version,- record.versionRequests,- );- }- if (url.pathname.startsWith('/api/')) return route.abort();- return route.continue();- });- await page.goto(HARNESS, { waitUntil: 'domcontentloaded', timeout: 120_000 });- await page.waitForFunction(() => window.__updateStream && window.__updateStream.open());- await page.getByRole('dialog').waitFor();- return { context, page, record };-}--const emit = (page, value) => page.evaluate((v) => window.__updateStream.emit(v), value);-const seen = (page) => page.evaluate(() => JSON.parse(JSON.stringify(window.__seen)));-const progressText = (page, value) =>- page.getByRole('dialog').getByText(`${value}%`, { exact: true });--async function layoutCheck(page) {- const dimensions = await page.evaluate(() => {- const panel = document.querySelector('[role="dialog"]');- const rect = panel ? panel.getBoundingClientRect() : null;- return {- scroll: document.documentElement.scrollWidth,- inner: innerWidth,- panelLeft: rect ? Math.round(rect.left) : null,- panelRight: rect ? Math.round(rect.right) : null,- };- });- assert.ok(dimensions.scroll <= dimensions.inner + 1, `horizontal overflow ${JSON.stringify(dimensions)}`);- if (dimensions.panelLeft !== null) {- assert.ok(dimensions.panelLeft >= 0 && dimensions.panelRight <= dimensions.inner + 1,- `dialog outside viewport ${JSON.stringify(dimensions)}`);- }- return dimensions;-}--async function shot(page, artifacts, name, width) {- await page.waitForTimeout(350); // let the dialog entrance settle- const file = path.join(artifacts, `${name}-${width}.png`);- await page.screenshot({ path: file });- return file;-}--const scenarios = {- // (a) One downloading event, then a held-open silent stream.- async 'stalled-stream-fallback'(browser, viewport, artifacts) {- const polls = [s('downloading', 35), s('downloading', 70), s('extracting', 80), s('applying', 90)];- let pollIndex = 0;- const server = {- status: () => polls[Math.min(pollIndex++, polls.length - 1)],- version: () => OLD,- };- const { context, page, record } = await openHarness(browser, viewport, server);- await emit(page, s('downloading', 10));- const silentSince = Date.now();- await progressText(page, 10).waitFor();- await page.getByText('Downloading update...').waitFor();- const screenshots = [await shot(page, artifacts, 'a-stream-10pct', viewport.width)];- await progressText(page, 35).waitFor({ timeout: 15_000 });- const firstPollAfterMs = Date.now() - silentSince;- await progressText(page, 90).waitFor({ timeout: 20_000 });- await page.getByText('Applying update...').waitFor();- const observed = await seen(page);- assert.ok(firstPollAfterMs >= 5_000, `polling began before the silence window (${firstPollAfterMs}ms)`);- assert.deepEqual(observed.progress, [10, 35, 70, 80, 90]);- assert.equal(observed.restarting, false);- assert.equal(await page.evaluate(() => window.__updateStream.open()), true, 'stream stays open alongside polling');- screenshots.push(await shot(page, artifacts, 'a-polled-90pct', viewport.width));- const dimensions = await layoutCheck(page);- assert.deepEqual(record.pageErrors, []);- await context.close();- return { firstPollAfterMs, progress: observed.progress, statusPolls: record.statusRequests.length, dimensions, screenshots };- },-- // (b) One failed poll mid-download must not look like a restart.- async 'transient-poll-failure'(browser, viewport, artifacts) {- const polls = [s('downloading', 40), ABORT, s('downloading', 60), s('downloading', 80)];- let pollIndex = 0;- const server = {- status: () => polls[Math.min(pollIndex++, polls.length - 1)],- version: () => OLD,- };- const { context, page, record } = await openHarness(browser, viewport, server);- await emit(page, s('downloading', 20));- await progressText(page, 20).waitFor();- await page.evaluate(() => window.__updateStream.fail()); // stream closed, polling only- await progressText(page, 80).waitFor({ timeout: 20_000 });- await page.waitForTimeout(3_000); // one more poll cycle at the same stage- const observed = await seen(page);- assert.ok(record.statusRequests.includes('unreachable'), 'a poll failed');- assert.equal(observed.restarting, false, 'restart phase entered on a single failed poll');- assert.deepEqual(observed.progress, [20, 40, 60, 80]);- await page.getByText('Please do not close this window or refresh the page during the update.').waitFor();- assert.equal(record.documentLoads, 1);- const screenshots = [await shot(page, artifacts, 'b-after-failed-poll-80pct', viewport.width)];- const dimensions = await layoutCheck(page);- assert.deepEqual(record.pageErrors, []);- await context.close();- return { statusRequests: record.statusRequests.map((r) => (typeof r === 'string' ? r : `${r.status} ${r.progress}`)), progress: observed.progress, dimensions, screenshots };- },-- // (c) restarting status, then the server goes away, then the new version.- async 'restart-evidence-reload'(browser, viewport, artifacts) {- let restartServed = false;- let versionAfterRestart = 0;- const polls = [s('applying', 90), s('restarting', 100)];- let pollIndex = 0;- const server = {- status: () => {- if (restartServed) return ABORT;- const next = polls[Math.min(pollIndex++, polls.length - 1)];- if (next.status === 'restarting') restartServed = true;- return next;- },- version: () => {- if (!restartServed) return OLD;- versionAfterRestart += 1;- return versionAfterRestart <= 2 ? ABORT : NEW;- },- };- const { context, page, record } = await openHarness(browser, viewport, server);- await emit(page, s('downloading', 10));- await progressText(page, 10).waitFor();- await page.getByText('Pulse is restarting...').waitFor({ timeout: 20_000 });- const screenshots = [await shot(page, artifacts, 'c-restarting', viewport.width)];- const restartDimensions = await layoutCheck(page);- await page.getByTestId('reloaded').waitFor({ timeout: 30_000 });- await page.waitForTimeout(4_000); // no second reload- assert.equal(record.documentLoads, 2, 'reloaded exactly once');- const afterRestart = record.versionRequests.slice(record.versionRequests.findIndex((v) => v === 'unreachable'));- assert.deepEqual(afterRestart.slice(0, 3), ['unreachable', 'unreachable', { version: NEW, build: 'release' }]);- screenshots.push(await shot(page, artifacts, 'c-reloaded', viewport.width));- assert.deepEqual(record.pageErrors, []);- await context.close();- return {- documentLoads: record.documentLoads,- versionRequests: record.versionRequests.map((v) => (typeof v === 'string' ? v : v.version)),- dimensions: restartDimensions,- screenshots,- };- },-- // (d) No pre-update version; requests fail late and a new version answers,- // but the backend never confirmed completion.- async 'no-baseline-no-autoreload'(browser, viewport, artifacts) {- let failuresStarted = false;- const polls = [s('applying', 95), ABORT, ABORT, ABORT, ABORT, s('idle', 0)];- let pollIndex = 0;- const server = {- status: () => {- const next = polls[Math.min(pollIndex++, polls.length - 1)];- if (next === ABORT) failuresStarted = true;- return next;- },- version: () => (failuresStarted ? NEW : UNAVAILABLE),- };- const { context, page, record } = await openHarness(browser, viewport, server);- await emit(page, s('applying', 90));- await progressText(page, 90).waitFor();- await page.evaluate(() => window.__updateStream.fail());- await page.getByText('Pulse is restarting...').waitFor({ timeout: 20_000 });- // Past the idle answers and several healthy new-version probes.- const deadline = Date.now() + 25_000;- while (Date.now() < deadline && !(record.statusRequests.filter((r) => r.status === 'idle').length >= 2- && record.versionRequests.filter((v) => v.version === NEW).length >= 3)) {- await page.waitForTimeout(500);- }- await page.waitForTimeout(2_000);- const idleAnswers = record.statusRequests.filter((r) => r.status === 'idle').length;- const newVersionAnswers = record.versionRequests.filter((v) => v.version === NEW).length;- assert.ok(idleAnswers >= 2, `idle answers ${idleAnswers}`);- assert.ok(newVersionAnswers >= 3, `new-version answers ${newVersionAnswers}`);- assert.ok(record.versionRequests.includes('503'), 'baseline probe was unavailable');- assert.equal(record.documentLoads, 1, 'auto-reloaded without a baseline or confirmation');- assert.equal(await page.getByTestId('reloaded').count(), 0);- const observed = await seen(page);- assert.equal(observed.completed, false, 'claimed completion without confirmation');- const screenshots = [await shot(page, artifacts, 'd-unconfirmed-waiting', viewport.width)];- const dimensions = await layoutCheck(page);- assert.deepEqual(record.pageErrors, []);- await context.close();- return { documentLoads: record.documentLoads, idleAnswers, newVersionAnswers, dimensions, screenshots };- },-- // (e) The stream delivers every stage through completion.- async 'stream-happy-path'(browser, viewport, artifacts) {- let completedEmitted = false;- let versionAfterComplete = 0;- const server = {- status: () => s('applying', 95),- version: () => {- if (!completedEmitted) return OLD;- versionAfterComplete += 1;- if (versionAfterComplete === 1) return OLD; // old process still answering- if (versionAfterComplete === 2) return ABORT; // it exits- return NEW;- },- };- const { context, page, record } = await openHarness(browser, viewport, server);- const stages = [- s('downloading', 10), s('downloading', 45), s('downloading', 80), s('verifying', 85),- s('extracting', 88), s('backing-up', 90), s('applying', 95),- ];- const screenshots = [];- for (const stage of stages) {- await emit(page, stage);- await progressText(page, stage.progress).waitFor();- if (stage.status === 'applying') screenshots.push(await shot(page, artifacts, 'e-stream-applying', viewport.width));- await page.waitForTimeout(300);- }- const midDimensions = await layoutCheck(page);- completedEmitted = true;- await emit(page, s('completed', 100));- await page.getByText('Pulse is restarting...').waitFor({ timeout: 10_000 });- screenshots.push(await shot(page, artifacts, 'e-restarting', viewport.width));- await layoutCheck(page);- await page.getByTestId('reloaded').waitFor({ timeout: 30_000 });- await page.waitForTimeout(3_000);- assert.equal(record.documentLoads, 2, 'reloaded exactly once');- assert.equal(record.statusRequests.length, 0, 'fallback polling ran while the stream was live');- screenshots.push(await shot(page, artifacts, 'e-reloaded', viewport.width));- assert.deepEqual(record.pageErrors, []);- await context.close();- return {- documentLoads: record.documentLoads,- statusPolls: record.statusRequests.length,- versionRequests: record.versionRequests.map((v) => (typeof v === 'string' ? v : v.version)),- dimensions: midDimensions,- screenshots,- };- },-};--(async () => {- const root = path.resolve(__dirname, '..');- const artifacts = process.env.PULSE_BROWSER_ARTIFACTS || path.join(root, 'browser-tests', 'update-progress-modal-proof');- fs.mkdirSync(artifacts, { recursive: true });- 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'),- server: { host: '127.0.0.1', port: PORT, strictPort: true },- logLevel: 'warn',- });- let browser;- try {- await server.listen();- browser = await chromium.launch({- headless: true,- args: ['--no-sandbox'],- // Optional: a locally cached Chromium when Playwright's own build is absent.- ...(process.env.PULSE_CHROMIUM_PATH ? { executablePath: process.env.PULSE_CHROMIUM_PATH } : {}),- });- const results = [];- for (const viewport of [{ width: 1365, height: 900 }, { width: 390, height: 844 }]) {- for (const [name, run] of Object.entries(scenarios)) {- const started = Date.now();- const detail = await run(browser, viewport, artifacts);- results.push({ viewport: `${viewport.width}x${viewport.height}`, scenario: name, result: 'passed', ms: Date.now() - started, ...detail });- console.error(`passed ${name} @ ${viewport.width}x${viewport.height}`);- }- }- console.log(JSON.stringify({ result: 'passed', browser: browser.version(), playwright: require('playwright/package.json').version, results }, null, 2));- } finally {- if (browser) await browser.close();- await server.close();- }-})().catch((error) => {- console.error(error);- process.exitCode = 1;-});diff --git a/frontend-modern/browser-tests/update-progress-modal.html b/frontend-modern/browser-tests/update-progress-modal.htmldeleted file mode 100644index e49ffd5654..0000000000--- a/frontend-modern/browser-tests/update-progress-modal.html+++ /dev/null@@ -1,11 +0,0 @@-<!doctype html>-<html lang="en">- <head>- <meta charset="UTF-8" />- <meta name="viewport" content="width=device-width, initial-scale=1" />- </head>- <body>- <div id="root"></div>- <script type="module" src="/browser-tests/update-progress-modal.tsx"></script>- </body>-</html>diff --git a/frontend-modern/browser-tests/update-progress-modal.tsx b/frontend-modern/browser-tests/update-progress-modal.tsxdeleted file mode 100644index 1f09a23324..0000000000--- a/frontend-modern/browser-tests/update-progress-modal.tsx+++ /dev/null@@ -1,101 +0,0 @@-// Mount the production UpdateProgressModal against a scripted update stream.-// HTTP (/api/updates/status, /api/version) is scripted by the Playwright-// runner; the SSE transport is replaced here so the runner can hold the-// stream open and silent, which a fulfilled HTTP response cannot do.-import { render } from 'solid-js/web';-import { UpdateProgressModal } from '../src/components/UpdateProgressModal';-import '../src/index.css';--type Listener = ((event: MessageEvent | Event) => void) | null;--class ScriptedEventSource {- static instances: ScriptedEventSource[] = [];- readonly url: string;- readyState = 0;- onopen: Listener = null;- onmessage: Listener = null;- onerror: Listener = null;-- constructor(url: string) {- this.url = url;- ScriptedEventSource.instances.push(this);- setTimeout(() => {- if (this.readyState === 2) return;- this.readyState = 1;- this.onopen?.(new Event('open'));- }, 0);- }-- close() {- this.readyState = 2;- }-- addEventListener() {}- removeEventListener() {}-}--const live = () =>- ScriptedEventSource.instances.filter((instance) => instance.readyState !== 2).at(-1);--const w = window as unknown as Record<string, unknown>;-w.EventSource = ScriptedEventSource;-w.__updateStream = {- emit(status: unknown) {- const stream = live();- if (!stream) return false;- stream.onmessage?.(new MessageEvent('message', { data: JSON.stringify(status) }));- return true;- },- fail() {- const stream = live();- if (!stream) return false;- stream.onerror?.(new Event('error'));- return true;- },- opened: () => ScriptedEventSource.instances.length,- open: () => Boolean(live()),-};--// Everything the modal ever showed, so a transient restart claim that was-// later corrected still fails the run.-const seen = { restarting: false, completed: false, progress: [] as number[] };-w.__seen = seen;-new MutationObserver(() => {- const text = document.body.innerText;- if (text.includes('Pulse is restarting')) seen.restarting = true;- if (text.includes('Update Completed Successfully')) seen.completed = true;- const match = /Progress\s+(\d+)%/.exec(text);- if (match) {- const value = Number(match[1]);- if (seen.progress.at(-1) !== value) seen.progress.push(value);- }-}).observe(document.body, { subtree: true, childList: true, characterData: true });--let boots = 1;-try {- boots = Number(sessionStorage.getItem('update-progress-boots') || '0') + 1;- sessionStorage.setItem('update-progress-boots', String(boots));-} catch {- // Storage unavailable: treat as a first boot.-}--render(- () =>- boots > 1 ? (- <main class="p-6">- <p data-testid="reloaded">Reloaded after update (boot {boots})</p>- </main>- ) : (- <main class="p-6">- <h1 class="text-lg font-semibold">Update progress harness</h1>- <UpdateProgressModal- isOpen={true}- onClose={() => undefined}- onViewHistory={() => undefined}- connected={() => true}- reconnecting={() => false}- />- </main>- ),- document.getElementById('root')!,-);diff --git a/frontend-modern/browser-tests/update-recovery-help.cjs b/frontend-modern/browser-tests/update-recovery-help.cjsdeleted file mode 100644index a3045896fa..0000000000--- a/frontend-modern/browser-tests/update-recovery-help.cjs+++ /dev/null@@ -1,152 +0,0 @@-// Actual shipped Markdown in the production Docs/router/styles; no backend.-const assert = require('node:assert/strict');-const fs = require('node:fs');-const path = require('node:path');-const { chromium, webkit } = require('playwright');--(async () => {- const root = '/workspace/frontend-modern';- process.chdir(root);- const artifacts = path.join(root, 'node_modules', 'update-recovery-help-browser');- fs.mkdirSync(artifacts, { recursive: true });- 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-update-recovery-help'),- server: { host: '127.0.0.1', port: 5248, strictPort: true },- optimizeDeps: { noDiscovery: true, include: [] },- });- const results = [];- let browser;- try {- await server.listen();- for (const [engine, width, tone] of [['chromium', 1280, 'light'], ['webkit', 390, 'dark']]) {- browser = await { chromium, webkit }[engine].launch(- engine === 'chromium'- ? { headless: true, channel: 'chromium', args: ['--no-sandbox'] }- : { headless: true },- );- const page = await browser.newPage({- viewport: { width, height: 900 },- ...(engine === 'webkit' ? { isMobile: true, hasTouch: true } : {}),- });- const errors = [];- page.on('pageerror', (e) => errors.push(e.message));- page.on('console', (m) => { if (m.type() === 'error') errors.push(m.text()); });- await page.goto('http://127.0.0.1:5248/browser-tests/docs-fragment-navigation.html',- { waitUntil: 'domcontentloaded', timeout: 60_000 });- await page.getByRole('link', { name: '← All documentation' }).click();- await page.getByRole('link', { name: 'Automatic updates', exact: true }).click();- await page.getByRole('heading', { name: 'Rollback', exact: true }).waitFor();- if (tone === 'dark') await page.evaluate(async () => {- document.documentElement.classList.add('dark');- await new Promise((resolve) => requestAnimationFrame(resolve));- await Promise.all(document.getAnimations().map((animation) => animation.finished.catch(() => {})));- });- const article = await page.locator('article').innerText();- for (const text of ['Roll back from Update History', 'successful in-app update',- 'not necessarily a complete backup', 'Copy errors can leave a partial snapshot',- 'matching .encryption.key', 'SQLite sidecar files', 'keep reversible copies',- 'An image change alone is not a data rollback', 'published v6.4.5 and v6.4.6-rc.1',- 'Update History is not a full-state recovery tool',- 'Do not assume later settings and alert changes will be reverted',- 'not permission to rewind live runtime stores']) assert.ok(article.includes(text), text);- assert.ok(!article.includes('There is no rollback UI'));- assert.ok(!article.includes('sudo rm -rf'));- const scope = page.getByRole('heading', { name: 'What an update snapshot contains', exact: true });- await scope.evaluate((heading) => heading.scrollIntoView({ block: 'start' }));- assert.ok(await page.evaluate(() => document.documentElement.scrollWidth <= innerWidth + 1));- await page.screenshot({ path: path.join(artifacts, `${engine}-scope.png`) });- const manual = page.getByRole('heading', { name: 'Manual Rollback', exact: true });- await manual.evaluate((heading) => heading.scrollIntoView({ block: 'start' }));- await page.waitForFunction(() => {- const heading = document.getElementById('manual-rollback');- // Respect the product's heading scroll-margin rather than demanding- // alignment at zero pixels above its normal reading inset.- return heading && heading.getBoundingClientRect().top >= 0 && heading.getBoundingClientRect().top < 200;- });- await page.screenshot({ path: path.join(artifacts, `${engine}-manual.png`) });-- await page.getByRole('link', { name: 'audit storage and safe recovery', exact: true }).click();- await page.waitForFunction(() => {- const heading = document.getElementById('storage');- return heading && heading.getBoundingClientRect().top >= 0 && heading.getBoundingClientRect().top < innerHeight;- });- assert.ok(page.url().endsWith('/docs/AUDIT_LOGGING#storage'));- await page.getByRole('link', { name: '← All documentation' }).click();- await page.getByRole('link', { name: 'Automatic updates', exact: true }).click();- await page.getByRole('link', { name: 'Docker server updates', exact: true }).click();- const updates = page.getByRole('heading', { name: '🔄 Updates', exact: true });- await updates.waitFor();- await page.waitForFunction(() => {- const heading = document.getElementById('-updates');- return heading && heading.getBoundingClientRect().top >= 0 && heading.getBoundingClientRect().top < innerHeight;- });- assert.ok(page.url().endsWith('/docs/DOCKER#-updates'));- const dockerText = await page.locator('article').innerText();- for (const text of ['persist PULSE_IMAGE', 'has no effect on a hardcoded image line',- 'docker compose pull pulse', 'docker compose up -d --no-deps pulse',- 'paid Pro installs must keep the private image', 'no need to bring the whole Compose project down'])- assert.ok(dockerText.includes(text), text);- assert.ok(await page.evaluate(() => document.documentElement.scrollWidth <= innerWidth + 1));- await page.screenshot({ path: path.join(artifacts, `${engine}-docker.png`) });- await page.getByRole('link', { name: 'rollback and backup scope', exact: true }).click();- await page.getByRole('heading', { name: 'Rollback', exact: true }).waitFor();- assert.ok(page.url().endsWith('/docs/AUTO_UPDATE#rollback'));-- await page.getByRole('link', { name: '← All documentation' }).click();- const installLink = page.getByRole('link', { name: 'Install Pulse', exact: true });- await installLink.focus();- await page.keyboard.press('Enter');- const installRollback = page.getByRole('heading', { name: 'Rollback', exact: true });- await installRollback.waitFor();- const installText = await page.locator('article').innerText();- for (const text of ['Neither is guaranteed to include all active data',- 'Update History is not a full-state recovery tool', 'matching data and keys together',- 'preserve reversible copies', 'Do not replace live runtime data'])- assert.ok(installText.includes(text), text);- assert.ok(!installText.includes('auto-restores on failure'));- await installRollback.evaluate((heading) => heading.scrollIntoView({ block: 'start' }));- await page.waitForFunction(() => {- const heading = document.getElementById('rollback');- return heading && heading.getBoundingClientRect().top >= 0 && heading.getBoundingClientRect().top < 200;- });- assert.ok(await page.evaluate(() => document.documentElement.scrollWidth <= innerWidth + 1));- await page.screenshot({ path: path.join(artifacts, `${engine}-install-rollback.png`) });- const snapshotLink = page.getByRole('link', { name: 'version-specific snapshot scope', exact: true });- await snapshotLink.focus();- await page.keyboard.press('Enter');- await page.waitForFunction(() => {- const heading = document.getElementById('what-an-update-snapshot-contains');- return heading && heading.getBoundingClientRect().top >= 0 && heading.getBoundingClientRect().top < innerHeight;- });- assert.ok(page.url().endsWith('/docs/AUTO_UPDATE#what-an-update-snapshot-contains'));- await page.goBack();- await installRollback.waitFor();- const stoppedLink = page.getByRole('link', { name: 'stopped-service recovery procedure', exact: true });- await stoppedLink.focus();- await page.keyboard.press('Enter');- await page.waitForFunction(() => {- const heading = document.getElementById('manual-rollback');- return heading && heading.getBoundingClientRect().top >= 0 && heading.getBoundingClientRect().top < innerHeight;- });- assert.ok(page.url().endsWith('/docs/AUTO_UPDATE#manual-rollback'));- assert.deepEqual(errors, []);- results.push({ engine, version: browser.version(), width, tone,- snapshotScope: true, noDestructiveRecipe: true, scopedCompose: true,- auditLink: true, dockerFragment: true, rollbackLink: true,- versionQualifiedScope: true, noFullStatePromise: true,- installRollback: true, keyboardSnapshotLink: true, keyboardStoppedRecoveryLink: true, errors });- await browser.close();- browser = undefined;- }- const result = { result: 'passed', playwright: require('playwright/package.json').version,- scope: 'shipped help rendering and links, not installation or recovery', results };- fs.writeFileSync(path.join(artifacts, 'result.json'), JSON.stringify(result, null, 2) + '\n');- console.log(JSON.stringify(result));- } finally {- if (browser) await browser.close();- await server.close();- }-})().catch((error) => { console.error(error); process.exitCode = 1; });diff --git a/frontend-modern/browser-tests/upgrade-guide-safety.cjs b/frontend-modern/browser-tests/upgrade-guide-safety.cjsdeleted file mode 100644index 6524a174df..0000000000--- a/frontend-modern/browser-tests/upgrade-guide-safety.cjs+++ /dev/null@@ -1,146 +0,0 @@-// Consume the existing v6 migration entry point with the production Docs/router.-// Safe static documentation and one synthetic security-status GET only.-const assert = require('node:assert/strict');-const fs = require('node:fs');-const path = require('node:path');-const crypto = require('node:crypto');-const { chromium } = require('playwright');-const hash = bytes => crypto.createHash('sha256').update(bytes).digest('hex');--(async () => {- const root = path.resolve('frontend-modern');- const output = path.resolve('tmp/upgrade-guide-browser-final');- fs.mkdirSync(output, { recursive: true });- const source = fs.readFileSync(path.join(root, 'public/docs/UPGRADE_v6.md'));- assert.equal(hash(source), hash(fs.readFileSync(path.resolve('docs/UPGRADE_v6.md'))));- assert.equal(require('playwright/package.json').version,- JSON.parse(fs.readFileSync('tests/integration/package-lock.json')).packages['node_modules/@playwright/test'].version);- const port = 5263;- const origin = `http://127.0.0.1:${port}`;- 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-upgrade-guide'),- server: { host: '127.0.0.1', port, strictPort: true },- optimizeDeps: { noDiscovery: true, include: [] } });- const result = { result: 'incomplete', playwright: require('playwright/package.json').version,- driver_sha256: hash(fs.readFileSync(__filename)), document_sha256: hash(source),- scope: 'Existing migration help and actual linked Docs consumers; not installed upgrade, native recovery or private runtime acceptance',- cases: [], cleanup: { browser: false, server: false } };- let browser;- try {- await server.listen();- for (const [width, tone] of [[1280, 'light'], [390, 'dark']]) {- const phone = width < 500;- browser = await chromium.launch({ headless: true, channel: 'chromium', args: ['--no-sandbox'] });- const context = await browser.newContext({ viewport: { width, height: 1000 },- ...(phone ? { isMobile: true, hasTouch: true } : {}), locale: 'en-GB' });- const page = await context.newPage();- page.setDefaultTimeout(15000);- const record = { width, tone, input: phone ? 'touch' : 'keyboard',- browserVersion: browser.version(), checks: [], captures: [], pageErrors: [], apiRequests: [],- externalRequests: [], servedGuide: [] };- result.cases.push(record);- page.on('pageerror', error => record.pageErrors.push(error.message));- page.on('console', message => { if (message.type() === 'error') record.pageErrors.push(message.text()); });- page.on('response', async response => {- if (new URL(response.url()).pathname === '/docs/UPGRADE_v6.md') {- const body = await response.body();- fs.writeFileSync(path.join(output, `served-${width}.md`), body);- record.servedGuide.push({ status: response.status(), sha256: hash(body), bytes: body.length });- }- });- await page.route('**/*', route => {- const request = route.request(); const url = new URL(request.url());- if (url.origin !== origin) { record.externalRequests.push(url.href); return route.abort(); }- if (url.pathname.startsWith('/api/')) {- record.apiRequests.push({ method: request.method(), path: url.pathname });- if (request.method() !== 'GET' || url.pathname !== '/api/security/status') return route.abort();- return route.fulfill({ status: 200, contentType: 'application/json', body: '{}' });- }- return route.continue();- });- const activate = async locator => {- await locator.scrollIntoViewIfNeeded();- if (phone) await locator.tap();- else { await locator.focus(); await page.keyboard.press('Enter'); }- };- const overflow = async () => assert.ok(await page.evaluate(() => document.documentElement.scrollWidth <= innerWidth + 1));- const capture = async (id, name) => {- await page.evaluate(fragment => { window.location.hash = '#' + fragment; }, id);- await page.waitForFunction(fragment => document.activeElement?.id === fragment, id);- await overflow();- const filename = `chromium-${width}-${name}.png`;- await page.screenshot({ path: path.join(output, filename) });- record.captures.push(filename);- };- await page.goto(`${origin}/browser-tests/docs-fragment-navigation.html`, { waitUntil: 'domcontentloaded' });- await activate(page.getByRole('link', { name: '← All documentation', exact: true }));- await activate(page.locator('a[data-doc-link][href="/docs/UPGRADE_v6"]').first());- await page.getByRole('heading', { name: 'Upgrade to Pulse v6', exact: true }).waitFor();- if (tone === 'dark') await page.evaluate(() => document.documentElement.classList.add('dark'));- const article = page.locator('article');- let text = await article.innerText();- for (const boundary of ['not a full-state backup', 'history and agent enrolment state',- 'matching encryption/signing keys', 'recreate only the Pulse service',- 'Do not start, cancel or repeat', 'An image or binary change alone is not a data rollback',- 'Relay is no longer sold']) assert.ok(text.includes(boundary), boundary);- assert.equal(await article.locator('pre').filter({ hasText: '/bin/update --version' }).count(), 0);- assert.equal(await article.locator('pre').filter({ hasText: 'docker compose up' }).count(), 0);- record.checks.push('Published guide entry, full-state/edition/uncertainty boundaries, no copied downgrade/all-service shortcut');- await capture('before-you-upgrade', 'preparation');- await capture('docker', 'deployment');- // Real cross-document route and fragment focus, not an asserted href only.- for (const [href, id, phrase] of [- ['/docs/MIGRATION#full-state-recovery', 'full-state-recovery', 'configuration export'],- ['/docs/INSTALL#manual-update', 'manual-update', 'helper'],- ['/docs/DOCKER#-updates', '-updates', 'image'],- ['/docs/AUTO_UPDATE#manual-rollback', 'manual-rollback', 'keys'],- ]) {- await activate(page.locator(`a[data-doc-link][href="${href}"]`).first());- await page.waitForURL(`**${href}`);- await page.waitForFunction(fragment => document.activeElement?.id === fragment, id);- assert.ok((await page.locator('article').innerText()).toLowerCase().includes(phrase));- await overflow();- record.checks.push(`Consuming ${href}: input activation, focused heading and rendered recovery/deployment text`);- await page.goBack({ waitUntil: 'domcontentloaded' });- await page.getByRole('heading', { name: 'Upgrade to Pulse v6', exact: true }).waitFor();- }- await capture('failed-or-interrupted-upgrade', 'uncertainty');- await capture('can-i-keep-pulse-v5-stable-while-i-test-pulse-v6', 'rollback');- await page.evaluate(() => { window.location.hash = '#failed-or-interrupted-upgrade'; });- await page.waitForFunction(() => document.activeElement?.id === 'failed-or-interrupted-upgrade');- await page.reload({ waitUntil: 'domcontentloaded' });- await page.waitForFunction(() => document.activeElement?.id === 'failed-or-interrupted-upgrade');- assert.ok((await page.locator('article').innerText()).includes('Do not repeat the update'));- record.checks.push('Direct fragment and real reload retain focused interrupted-upgrade help');- assert.deepEqual(record.pageErrors, []);- assert.deepEqual(record.externalRequests, []);- assert.ok(record.apiRequests.every(request => request.method === 'GET' && request.path === '/api/security/status'));- assert.ok(record.servedGuide.length >= 1);- // Native page Fetch preserves raw transfer bytes. Retain the distinct- // Playwright response.body observations; that API's earlier Unicode- // byte identity failed and is not silently treated as a source pass.- const fetched = await page.evaluate(async () => {- const response = await fetch('/docs/UPGRADE_v6.md', { cache: 'no-store' });- return { status: response.status, contentType: response.headers.get('content-type'),- bytes: Array.from(new Uint8Array(await response.arrayBuffer())) };- });- const fetchedBytes = Buffer.from(fetched.bytes);- record.nativeFetch = { status: fetched.status, contentType: fetched.contentType,- bytes: fetchedBytes.length, sha256: hash(fetchedBytes) };- fs.writeFileSync(path.join(output, `native-served-${width}.md`), fetchedBytes);- assert.equal(record.nativeFetch.status, 200);- assert.equal(record.nativeFetch.sha256, result.document_sha256);- record.checks.push('Native browser Fetch raw byte identity matches both committed guide copies');- await browser.close(); browser = undefined;- }- result.result = 'passed'; result.verifiedAt = new Date().toISOString();- } finally {- if (browser) await browser.close();- result.cleanup.browser = true;- await server.close(); result.cleanup.server = true;- fs.writeFileSync(path.join(output, 'result.json'), JSON.stringify(result, null, 2) + '\n');- console.log(JSON.stringify(result));- }-})().catch(error => { console.error(error); process.exitCode = 1; });diff --git a/frontend-modern/browser-tests/vm-disk-safety-help.cjs b/frontend-modern/browser-tests/vm-disk-safety-help.cjsdeleted file mode 100644index b12a380c1e..0000000000--- a/frontend-modern/browser-tests/vm-disk-safety-help.cjs+++ /dev/null@@ -1,93 +0,0 @@-// Exercise production Docs/router/Markdown. No Proxmox or guest is contacted.-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');--(async () => {- const root = path.resolve('frontend-modern');- const artifacts = path.join(root, 'node_modules', 'vm-disk-safety-browser');- fs.mkdirSync(artifacts, { recursive: true });- const guides = Object.fromEntries(['VM_DISK_MONITORING', 'TROUBLESHOOTING'].map(name =>- [name, fs.readFileSync(path.join(root, 'public/docs', `${name}.md`), 'utf8')]));- const recipe = guides.VM_DISK_MONITORING.match(/```bash\n([\s\S]*?)```/)[1].trim();- 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-vm-disk-safety'),- server: { host: '127.0.0.1', port: 5265, strictPort: true },- optimizeDeps: { noDiscovery: true, include: [] },- });- const results = [];- let browser;- try {- await server.listen();- for (const [engine, width, tone] of [['chromium', 1280, 'light'], ['webkit', 390, 'dark']]) {- browser = await { chromium, webkit }[engine].launch(engine === 'chromium'- ? { headless: true, channel: 'chromium', args: ['--no-sandbox'] }- : { headless: true });- const page = await browser.newPage({ viewport: { width, height: 1000 },- ...(engine === 'webkit' ? { isMobile: true, hasTouch: true } : {}) });- const errors = [];- page.on('pageerror', error => errors.push(error.message));- page.on('console', message => { if (message.type() === 'error') errors.push(message.text()); });- await page.goto('http://127.0.0.1:5265/browser-tests/docs-fragment-navigation.html',- { waitUntil: 'domcontentloaded', timeout: 60_000 });- if (tone === 'dark') await page.evaluate(() => document.documentElement.classList.add('dark'));- await page.getByRole('link', { name: '← All documentation' }).click();- const entry = page.locator('a[data-doc-link][href="/docs/VM_DISK_MONITORING"]').first();- await entry.focus();- await page.keyboard.press('Enter');- const safety = page.getByRole('heading', { name: 'Backup safety', exact: true });- await safety.waitFor();- await safety.scrollIntoViewIfNeeded();- let text = await page.locator('article').innerText();- for (const phrase of ['Do not run manual guest-agent probes', 'monitoring and alerts',- 'does not prove thaw', 'temporary precaution', 'not established as a reproduced cause',- 'clear backup locks', 'host-root diagnostic does not test']) {- assert.ok(text.replace(/\s+/g, ' ').includes(phrase), phrase);- }- assert.ok(await page.evaluate(() => document.documentElement.scrollWidth <= innerWidth + 1));- await page.screenshot({ path: path.join(artifacts, `${engine}-backup-safety.png`) });- const passive = page.getByRole('heading', { name: 'Passive host preflight', exact: true });- await passive.scrollIntoViewIfNeeded();- const code = page.locator('pre').filter({ hasText: 'sudo bash ./scripts/test-vm-disk.sh 100' });- assert.equal((await code.locator('code').textContent()).trim(), recipe);- const section = text.replace(/\s+/g, ' ').split('Passive host preflight')[1];- for (const phrase of ['no guest-agent commands', 'older copies', 'bounded timeouts',- 'non-zero exit', 'does not verify disk freshness', 'before running it']) {- assert.ok(section.includes(phrase), phrase);- }- assert.ok(await page.evaluate(() => document.documentElement.scrollWidth <= innerWidth + 1));- await page.screenshot({ path: path.join(artifacts, `${engine}-passive-preflight.png`) });- const related = page.getByRole('link', { name: 'Getting help', exact: true });- await related.focus();- await page.keyboard.press('Enter');- await page.getByRole('heading', { name: '🆘 Getting Help', exact: true }).waitFor();- text = (await page.locator('article').innerText()).replace(/\s+/g, ' ');- for (const phrase of ['Do not run guest-agent probes during backup freeze/thaw',- 'passive host preflight', 'they do not by themselves establish why disk usage is absent']) {- assert.ok(text.includes(phrase), phrase);- }- assert.ok(await page.evaluate(() => document.documentElement.scrollWidth <= innerWidth + 1));- assert.deepEqual(errors, []);- results.push({ engine, browserVersion: browser.version(), width, tone,- keyboardEntry: true, backupPrecautionAndOutage: true, exactCopiedShell: true,- passiveLimits: true, relatedHelpNavigation: true, noBodyOverflow: true, errors });- await browser.close();- browser = undefined;- }- const result = { result: 'passed', playwrightVersion: require('playwright/package.json').version,- scope: 'rendered production help and copied recipe; no native guest or backup acceptance',- docs: Object.fromEntries(Object.entries(guides).map(([name, content]) =>- [`frontend-modern/public/docs/${name}.md`, createHash('sha256').update(content).digest('hex')])),- results };- fs.writeFileSync(path.join(artifacts, 'result.json'), JSON.stringify(result, null, 2) + '\n');- console.log(JSON.stringify(result));- } finally {- if (browser) await browser.close();- await server.close();- }-})().catch(error => { console.error(error); process.exitCode = 1; });diff --git a/frontend-modern/browser-tests/webhook-composed.cjs b/frontend-modern/browser-tests/webhook-composed.cjsdeleted file mode 100644index 4e572b6eae..0000000000--- a/frontend-modern/browser-tests/webhook-composed.cjs+++ /dev/null@@ -1,350 +0,0 @@-// Fresh proof of the composed heading and multiline instructions, not a replay-// of an old browser operation or installed notification-delivery acceptance.-const assert = require('node:assert/strict');-const crypto = require('node:crypto');-const fs = require('node:fs');-const path = require('node:path');-const { chromium, webkit } = require('playwright');--const root = '/workspace/frontend-modern';-const output = '/workspace/tmp/webhook-composed-proof-stable';-const hash = (file) => crypto.createHash('sha256').update(fs.readFileSync(file)).digest('hex');-const runtimePath = 'frontend-modern/src/components/Alerts/WebhookConfigForm.tsx';-const expectedHash = '0286a39d8405d214df78d8806f1792991a46e0583ab20d1b1fafb276b3c9160d';-const integration = '5e967c49f55d0fc2423e9d7ba63c7ed250069a87';-const sourceFiles = [- runtimePath,- 'frontend-modern/src/components/Alerts/WebhookConfig.tsx',- 'frontend-modern/src/components/Alerts/useWebhookConfigState.ts',- 'frontend-modern/src/utils/alertWebhookPresentation.ts',- 'frontend-modern/src/index.css',- 'frontend-modern/package-lock.json',- 'tests/integration/package-lock.json',- 'internal/notifications/webhook_templates.go',- 'frontend-modern/browser-tests/webhook-composed.html',- 'frontend-modern/browser-tests/webhook-composed.tsx',- 'frontend-modern/browser-tests/webhook-composed.cjs',-];--// Read the committed server catalogue, not a second copy of its instructions.-// This bounded extractor is only for the selected public fixture fields, not-// a Go evaluator or a substitute for a backend response/receiver test.-const templateSource = fs.readFileSync(- '/workspace/internal/notifications/webhook_templates.go',- 'utf8',-);-const starts = [...templateSource.matchAll(/^\s*Service:\s*"([^"]+)"/gm)];-const templates = ['generic', 'discord', 'telegram'].map((service) => {- const i = starts.findIndex((match) => match[1] === service);- assert.ok(i >= 0, `catalogue service ${service}`);- const block = templateSource.slice(- starts[i].index,- starts[i + 1]?.index ?? templateSource.length,- );- const value = (field, optional = false) => {- const match = block.match(new RegExp(`^\\s*${field}:\\s*("(?:[^"\\\\]|\\\\.)*")`, 'm'));- assert.ok(optional || match, `catalogue field ${service}.${field}`);- return match ? JSON.parse(match[1]) : '';- };- const payload = block.match(/^\s*PayloadTemplate:\s*`([\s\S]*?)`,/m);- assert.ok(payload, `catalogue payload ${service}`);- assert.match(block, /Headers:\s*map\[string\]string\{"Content-Type": "application\/json"\}/);- return {- service,- label: value('Label'),- name: value('Name'),- description: value('Description'),- urlPattern: value('URLPattern'),- method: value('Method'),- headers: { 'Content-Type': 'application/json' },- mentionPlaceholder: value('MentionPlaceholder', true),- mentionHelp: value('MentionHelp', true),- payloadTemplate: payload[1],- instructions: value('Instructions'),- };-});--(async () => {- fs.mkdirSync(output, { recursive: true });- const playwrightVersion = require('playwright/package.json').version;- const declared = JSON.parse(fs.readFileSync('/workspace/tests/integration/package-lock.json'))- .packages['node_modules/@playwright/test'].version;- assert.equal(playwrightVersion, declared);- assert.equal(hash(path.join('/workspace', runtimePath)), expectedHash);- const files = Object.fromEntries(- sourceFiles.map((file) => [file, hash(path.join('/workspace', file))]),- );- 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(output, 'vite-cache'),- optimizeDeps: { noDiscovery: true, include: [] },- server: { host: '127.0.0.1', port: 5307, strictPort: true, watch: null },- });- const origin = 'http://127.0.0.1:5307';- const results = [],- screenshots = [],- observations = [];- let browser,- phase = 'server',- completed = false;- try {- await server.listen();- for (const [name, engine, width, dark] of [- ['chromium-desktop-light', chromium, 1440, false],- ['chromium-desktop-dark', chromium, 1440, true],- ['webkit-phone-light', webkit, 390, false],- ['webkit-phone-dark', webkit, 390, true],- ]) {- phase = name;- browser = await engine.launch(- engine === chromium- ? { headless: true, channel: 'chromium', args: ['--no-sandbox'] }- : { headless: true },- );- const page = await browser.newPage({- viewport: { width, height: width < 500 ? 844 : 900 },- isMobile: width < 500,- hasTouch: width < 500,- locale: 'en-GB',- timezoneId: 'UTC',- });- page.setDefaultTimeout(10000);- page.setDefaultNavigationTimeout(45000);- const errors = [],- unexpectedRequests = [],- requests = [],- previewSockets = [],- checks = [];- page.on('pageerror', (error) => errors.push(error.message));- page.on('console', (message) => {- if (message.type() === 'error') errors.push(message.text());- });- await page.addInitScript((dark) => {- const apply = () => document.documentElement.classList.toggle('dark', dark);- if (document.documentElement) apply();- else document.addEventListener('DOMContentLoaded', apply, { once: true });- }, dark);- // Vite's own HMR client uses this fixed loopback endpoint. Closing it- // creates a real console error even though the form renders correctly.- // Permit that preview-only socket, not application/provider sockets;- // keep the zero-error assertion rather than filtering its diagnostic.- await page.routeWebSocket(/.*/, (socket) => {- const url = new URL(socket.url());- if (url.origin === 'ws://127.0.0.1:5307' && url.pathname === '/') {- previewSockets.push(url.pathname);- socket.connectToServer();- } else {- unexpectedRequests.push({ origin: url.origin, path: url.pathname, method: 'WebSocket' });- socket.close();- }- });- await page.route('**/*', async (route) => {- const request = route.request(),- url = new URL(request.url());- if (url.origin !== origin || request.method() !== 'GET') {- unexpectedRequests.push({ url: request.url(), method: request.method() });- return route.abort();- }- if (!url.pathname.startsWith('/api/')) return route.continue();- requests.push(url.pathname);- if (url.pathname === '/api/notifications/webhook-templates')- return route.fulfill({ json: templates });- unexpectedRequests.push({ url: request.url(), method: request.method() });- return route.abort();- });- await page.goto(`${origin}/browser-tests/webhook-composed.html`, {- waitUntil: 'networkidle',- });- await page.getByRole('button', { name: '+ Add Webhook', exact: true }).click();- await page- .getByRole('button', { name: 'Discord Discord server webhook', exact: true })- .waitFor();- for (const service of ['discord', 'telegram']) {- phase = `${name}: ${service}`;- const template = templates.find((candidate) => candidate.service === service);- if (service === 'telegram') {- const toggle = page.getByRole('button', { name: 'Discord →', exact: true });- await toggle.focus();- await page.keyboard.press('Enter');- }- const choice = page.getByRole('button', {- name: `${template.label} ${template.description}`,- exact: true,- });- if (width < 500) await choice.tap();- else {- await choice.focus();- await page.keyboard.press('Enter');- }- const heading = page.getByRole('heading', { name: 'Setup Instructions', exact: true });- await heading.waitFor();- const panel = heading.locator('..'),- instructions = panel.locator('p');- assert.equal(await instructions.textContent(), template.instructions);- assert.equal(- await page.getByLabel('Webhook URL', { exact: true }).getAttribute('placeholder'),- template.urlPattern,- );- await heading.evaluate((element) => element.scrollIntoView({ block: 'start' }));- await page.evaluate(async () => {- await document.fonts.ready;- await new Promise((resolve) =>- requestAnimationFrame(() => requestAnimationFrame(resolve)),- );- });- const layout = await panel.evaluate((element) => {- const heading = element.querySelector('h4'),- p = element.querySelector('p');- const style = getComputedStyle(heading),- pStyle = getComputedStyle(p);- const walker = document.createTreeWalker(p, NodeFilter.SHOW_TEXT);- const node = walker.nextNode();- if (!node || node.textContent !== p.textContent)- throw new Error('Instructions must remain one complete text node');- let offset = 0;- const linePositions = p.textContent.split('\n').map((line) => {- const range = document.createRange();- range.setStart(node, offset);- range.setEnd(node, offset + 2);- offset += line.length + 1;- const bounds = range.getBoundingClientRect();- const fragments = [...range.getClientRects()].map((rect) => ({- x: rect.x,- y: rect.y,- width: rect.width,- height: rect.height,- }));- // A union bound can include a zero-width newline on the preceding- // line. Measure the numbered glyphs, not that whitespace fragment.- const glyphs = fragments.filter((rect) => rect.width > 0 && rect.height > 0);- if (glyphs.length !== 1)- throw new Error('Each numbered prefix needs one painted rectangle');- return {- number: line.slice(0, 2),- x: glyphs[0].x,- y: glyphs[0].y,- bounds: { x: bounds.x, y: bounds.y, width: bounds.width, height: bounds.height },- fragments,- };- });- const canvas = document.createElement('canvas');- canvas.width = canvas.height = 1;- const context = canvas.getContext('2d');- context.fillStyle = style.color;- context.fillRect(0, 0, 1, 1);- const ancestorOpacity = [];- for (let current = heading; current; current = current.parentElement)- ancestorOpacity.push(getComputedStyle(current).opacity);- return {- headingClass: heading.className,- color: style.color,- alpha: context.getImageData(0, 0, 1, 1).data[3],- ancestorOpacity,- whiteSpace: pStyle.whiteSpace,- overflowWrap: pStyle.overflowWrap,- linePositions,- panelOverflow: element.scrollWidth - element.clientWidth,- documentOverflow: document.documentElement.scrollWidth - innerWidth,- };- });- observations.push({ name, service, layout });- const file = `${name}-${service}.png`;- await page.screenshot({ path: path.join(output, file), fullPage: true });- screenshots.push({ file, sha256: hash(path.join(output, file)), width, dark, service });- assert.ok(layout.headingClass.split(' ').includes('text-blue-900'));- assert.ok(layout.headingClass.split(' ').includes('dark:text-blue-100'));- assert.equal(layout.alpha, 255, 'heading colour is not translucent');- assert.ok(layout.ancestorOpacity.every((opacity) => opacity === '1'));- assert.equal(layout.whiteSpace, 'pre-line');- assert.equal(layout.overflowWrap, 'break-word');- assert.equal(layout.linePositions.length, service === 'discord' ? 4 : 5);- layout.linePositions.forEach((line, i, lines) => {- assert.equal(line.number, `${i + 1}.`);- if (i)- assert.ok(line.y > lines[i - 1].y + 5, 'numbered steps need separate rendered lines');- assert.ok(- Math.abs(line.x - lines[0].x) <= 1,- 'each numbered step starts at the left edge',- );- });- assert.ok(layout.panelOverflow <= 1);- assert.ok(layout.documentOverflow <= 1);- assert.equal(await page.getByLabel('Notification operations').textContent(), '0');- checks.push({- service,- templateInstructionsExact: true,- layout,- noNotificationOperation: true,- });- }- await page.getByRole('button', { name: 'Cancel', exact: true }).click();- await page.getByRole('button', { name: '+ Add Webhook', exact: true }).waitFor();- assert.equal(- await page.getByRole('heading', { name: 'Setup Instructions', exact: true }).count(),- 0,- );- assert.equal(await page.getByLabel('Notification operations').textContent(), '0');- assert.deepEqual(errors, []);- assert.deepEqual(unexpectedRequests, []);- results.push({- name,- browserVersion: browser.version(),- width,- dark,- phoneEmulated: width < 500,- checks,- cancelReturnsToAdd: true,- requests,- previewSockets,- errors,- unexpectedRequests,- });- await browser.close();- browser = undefined;- }- completed = true;- } catch (error) {- fs.writeFileSync(- path.join(output, 'failure.json'),- JSON.stringify(- { phase, error: error.message, files, results, screenshots, observations },- null,- 2,- ),- );- throw error;- } finally {- if (browser) await browser.close();- await server.close();- }- if (completed) {- fs.writeFileSync(- path.join(output, 'result.json'),- JSON.stringify(- {- integration,- playwrightVersion,- declaredPlaywrightVersion: declared,- files,- results,- screenshots,- observations,- verifiedAt: new Date().toISOString(),- browserAndServerClosed: true,- limits:- 'Production WebhookConfig/form/state/CSS in a standalone offline fixture. Source-exact public template fields, synthetic API. No full app navigation, real credentials, receiver, Test/save/delivery, native phone or installed acceptance.',- },- null,- 2,- ),- );- console.log(- `Verified ${results.length} theme/viewport states and ${screenshots.length} source-exact service captures; browser and server closed.`,- );- }-})().catch((error) => {- console.error(error);- process.exitCode = 1;-});diff --git a/frontend-modern/browser-tests/webhook-composed.html b/frontend-modern/browser-tests/webhook-composed.htmldeleted file mode 100644index f8dd556323..0000000000--- a/frontend-modern/browser-tests/webhook-composed.html+++ /dev/null@@ -1,12 +0,0 @@-<!doctype html>-<html lang="en">- <head>- <meta charset="UTF-8" />- <meta name="viewport" content="width=device-width, initial-scale=1.0" />- <title>Composed webhook instructions verification</title>- </head>- <body>- <div id="root"></div>- <script type="module" src="./webhook-composed.tsx"></script>- </body>-</html>diff --git a/frontend-modern/browser-tests/webhook-composed.tsx b/frontend-modern/browser-tests/webhook-composed.tsxdeleted file mode 100644index 43471431bc..0000000000--- a/frontend-modern/browser-tests/webhook-composed.tsx+++ /dev/null@@ -1,30 +0,0 @@-// Production form and state, source-exact template text supplied by the runner.-// No real notification receiver, credentials, save or Test operation.-import { createSignal } from 'solid-js';-import { render } from 'solid-js/web';-import { WebhookConfig } from '../src/components/Alerts/WebhookConfig';-import '../src/index.css';--function Fixture() {- const [operations, setOperations] = createSignal(0);- const unexpectedOperation = () => {- setOperations((count) => count + 1);- return false;- };- return (- <main class="mx-auto min-h-screen max-w-4xl space-y-4 bg-surface p-4 text-base-content">- <h1 class="text-lg font-semibold">Webhook setup</h1>- <p class="text-sm text-muted">Offline presentation check. No notification is sent.</p>- <WebhookConfig- webhooks={[]}- onAdd={unexpectedOperation}- onUpdate={unexpectedOperation}- onDelete={unexpectedOperation}- onTest={unexpectedOperation}- />- <output aria-label="Notification operations">{operations()}</output>- </main>- );-}--render(() => <Fixture />, document.getElementById('root')!);diff --git a/frontend-modern/browser-tests/webhook-guidance.cjs b/frontend-modern/browser-tests/webhook-guidance.cjsdeleted file mode 100644index 5a948f73d7..0000000000--- a/frontend-modern/browser-tests/webhook-guidance.cjs+++ /dev/null@@ -1,116 +0,0 @@-// Inspect the real shipped Docs page and copyable webhook template. This is-// offline rendering, not a ticket receiver, notification or external delivery.-const assert = require('node:assert/strict');-const fs = require('node:fs');-const path = require('node:path');-const crypto = require('node:crypto');-const { chromium, webkit } = require('playwright');--(async () => {- const root = '/workspace/frontend-modern';- const artifacts = path.join(root, 'node_modules', 'webhook-guidance-browser');- fs.mkdirSync(artifacts, { recursive: true });- 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-webhook-guidance'),- server: { host: '127.0.0.1', port: 5253, strictPort: true },- optimizeDeps: { noDiscovery: true, include: [] } });- const docs = fs.readFileSync(path.join(root, 'public/docs/WEBHOOKS.md'), 'utf8');- const expectedTemplate = docs.split('### Sample PSA payloads')[1].match(/```json\n([\s\S]*?)\n```/)[1];- let browser;- const results = [];- try {- await server.listen();- for (const [engine, width] of [['chromium', 1280], ['webkit', 390]]) {- browser = await { chromium, webkit }[engine].launch(engine === 'chromium'- ? { headless: true, channel: 'chromium', args: ['--no-sandbox'] } : { headless: true });- const page = await browser.newPage({ viewport: { width, height: 1000 },- ...(engine === 'webkit' ? { isMobile: true, hasTouch: true } : {}) });- const errors = [];- const unexpectedAPIRequests = [];- page.on('pageerror', (error) => errors.push(error.message));- page.on('console', (message) => { if (message.type() === 'error') errors.push(message.text()); });- page.on('request', (request) => {- const pathname = new URL(request.url()).pathname;- if (pathname.startsWith('/api/') && pathname !== '/api/security/status') {- unexpectedAPIRequests.push(pathname);- }- });- let securityRequests = 0;- // Docs imports runtime context, whose initial auth check is unrelated- // to Markdown rendering. Model first-run state explicitly; there is no- // authenticated runtime, backend or provider in this offline fixture.- await page.route('**/api/security/status', async (route) => {- securityRequests++;- await route.fulfill({ json: { hasAuthentication: false, requiresAuth: true } });- });- await page.goto('http://127.0.0.1:5253/browser-tests/docs-fragment-navigation.html?scenario=webhooks',- { waitUntil: 'domcontentloaded', timeout: 60_000 });- const heading = page.getByRole('heading', { name: 'Receiver correlation and deduplication', exact: true });- await heading.waitFor();- if (engine === 'webkit') await page.evaluate(() => document.documentElement.classList.add('dark'));- const body = (await page.locator('article').innerText()).replace(/\s+/g, ' ');- for (const text of ['not a unique incident or delivery ID', 'Do not deduplicate permanently',- 'old delayed recovery must not close a newer incident', 'event and severity',- 'whole-second precision', 'incomplete or ambiguous events',- 'successful firing-delivery receipt', 'informational conditions can use "info"']) {- assert.ok(body.includes(text), text);- }- assert.ok(!body.includes('deduplicate on it'));- const follow = async (name, href, target) => {- const link = page.getByRole('link', { name, exact: true });- assert.equal(await link.getAttribute('href'), href);- await link.focus();- await page.keyboard.press('Enter');- await page.waitForURL(`**${href}`);- await page.waitForFunction((id) => document.activeElement?.id === id, target);- };- await follow('receiver correlation and deduplication', '#receiver-correlation-and-deduplication',- 'receiver-correlation-and-deduplication');- const screenshot = async (name, headingName) => {- await page.getByRole('heading', { name: headingName, exact: true })- .evaluate((element) => element.scrollIntoView({ block: 'start' }));- await page.evaluate(async () => {- await new Promise((resolve) => requestAnimationFrame(() => requestAnimationFrame(resolve)));- await Promise.all(document.getAnimations().map((animation) => animation.finished.catch(() => {})));- });- assert.ok(await page.evaluate(() => document.documentElement.scrollWidth <= innerWidth + 1));- await page.screenshot({ path: path.join(artifacts, `${engine}-${name}.png`) });- };- await screenshot('receiver', 'Receiver correlation and deduplication');- await follow('full PSA template below', '#sample-psa-payloads', 'sample-psa-payloads');- const template = page.locator('pre code').filter({ hasText: '"alertCount":' });- assert.equal(await template.count(), 1);- assert.equal((await template.innerText()).trim(), expectedTemplate.trim());- assert.ok(await template.evaluate((element) => {- const pre = element.closest('pre');- return getComputedStyle(pre).overflowX === 'auto' || pre.scrollWidth <= pre.clientWidth + 1;- }));- await screenshot('template', 'Sample PSA payloads');- await page.reload({ waitUntil: 'domcontentloaded' });- await page.getByRole('heading', { name: 'Sample PSA payloads', exact: true }).waitFor();- await page.waitForFunction(() => document.activeElement?.id === 'sample-psa-payloads');- // An incidental import is not obliged to make an auth request on every- // engine/reload. Observe those requests, but assert only the Docs result- // and absence of unintended backend activity or errors.- await page.waitForLoadState('networkidle');- assert.deepEqual(errors, []);- assert.deepEqual(unexpectedAPIRequests, []);- results.push({ engine, browserVersion: browser.version(), width,- scope: engine === 'webkit' ? 'phone-emulated, not native' : 'desktop',- warningsRendered: true, keyboardReceiverLink: true, keyboardTemplateLink: true,- templateTextExact: true, reloadFragmentFocus: true, noDocumentOverflow: true,- syntheticFirstRunSecurityRequests: securityRequests, unexpectedAPIRequests, errors });- await browser.close();- browser = undefined;- }- const files = ['public/docs/WEBHOOKS.md', 'browser-tests/docs-fragment-navigation.tsx',- 'browser-tests/webhook-guidance.cjs', 'src/features/docs/docMarkdown.ts', 'src/pages/Docs.tsx']- .map((file) => ({ file, sha256: crypto.createHash('sha256').update(fs.readFileSync(path.join(root, file))).digest('hex') }));- fs.writeFileSync(path.join(artifacts, 'result.json'), JSON.stringify({ playwright: require('playwright/package.json').version,- files, results, limits: 'No real receiver, ticket, provider, native device or installed notification acceptance.' }, null, 2));- } finally {- if (browser) await browser.close();- await server.close();- }-})().catch((error) => { console.error(error); process.exitCode = 1; });diff --git a/frontend-modern/browser-tests/webhook-save-acknowledgement.cjs b/frontend-modern/browser-tests/webhook-save-acknowledgement.cjsdeleted file mode 100644index 58b1d817e5..0000000000--- a/frontend-modern/browser-tests/webhook-save-acknowledgement.cjs+++ /dev/null@@ -1,382 +0,0 @@-const assert = require('node:assert/strict');-const fs = require('node:fs');-const path = require('node:path');-const crypto = require('node:crypto');-const { chromium, webkit } = require('playwright');-const root = '/workspace/frontend-modern';-const output = '/workspace/tmp/webhook-save-proof/browser';-const hash = (file) => crypto.createHash('sha256').update(fs.readFileSync(file)).digest('hex');--(async () => {- const binding = JSON.parse(- fs.readFileSync('/workspace/tmp/webhook-save-proof/browser-binding.json'),- );- for (const [file, digest] of Object.entries(binding.content_sha256)) {- assert.equal(hash(path.join('/workspace', file)), digest);- }- const playwrightVersion = require('playwright/package.json').version;- assert.equal(- playwrightVersion,- JSON.parse(fs.readFileSync('/workspace/tests/integration/package-lock.json')).packages[- 'node_modules/@playwright/test'- ].version,- );- fs.mkdirSync(output, { recursive: true });- 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(output, 'vite-cache'),- server: { host: '127.0.0.1', port: 5310, strictPort: true, watch: null },- });- const origin = 'http://127.0.0.1:5310';- const results = [],- screenshots = [],- browserVersions = [];- let browser,- phase = 'server',- browserClosed = false,- serverClosed = false,- passed = false;- try {- await server.listen();- for (const [name, engine, width, height, dark] of [- ['desktop-light', chromium, 1365, 900, false],- ['desktop-dark', chromium, 1365, 900, true],- ['phone-dark', webkit, 390, 844, true],- ['narrow-light', webkit, 320, 740, false],- ]) {- browserClosed = false;- browser = await engine.launch(- engine === chromium- ? { headless: true, channel: 'chromium', args: ['--no-sandbox'] }- : { headless: true },- );- browserVersions.push({- name,- engine: engine === chromium ? 'chromium' : 'webkit',- version: browser.version(),- });- const context = await browser.newContext({- viewport: { width, height },- isMobile: width < 500,- hasTouch: width < 500,- locale: 'en-GB',- });- await context.addInitScript((dark) => {- const apply = () => document.documentElement.classList.toggle('dark', dark);- if (document.documentElement) apply();- else document.addEventListener('DOMContentLoaded', apply, { once: true });- }, dark);- const saved = {- id: 'saved-hook',- name: 'Existing destination',- url: 'https://example.test/receiver',- method: 'POST',- enabled: true,- service: 'generic',- headers: { Authorization: '********' },- customFields: { team: 'ops' },- template: '{"message":"{{message}}"}',- mention: 'operators',- tagFilter: ['department-a'],- tagFilterMode: 'any',- minimumSeverity: 'warning',- };- let inventory = [saved],- mode = 'pending',- release;- const writes = [],- unexpected = [],- errors = [],- checks = [];- await context.routeWebSocket(/.*/, (socket) => {- const url = new URL(socket.url());- if (url.origin === 'ws://127.0.0.1:5310' && url.pathname === '/') socket.connectToServer();- else {- unexpected.push({ type: 'websocket' });- socket.close();- }- });- await context.route('**/*', async (route) => {- const req = route.request(),- url = new URL(req.url());- if (url.origin !== origin) {- unexpected.push({ type: 'off-origin' });- return route.abort();- }- if (!url.pathname.startsWith('/api/')) return route.continue();- if (req.method() === 'GET') {- if (url.pathname === '/api/health') return route.fulfill({ json: { status: 'healthy' } });- if (url.pathname === '/api/notifications/webhooks')- return route.fulfill({ json: inventory });- if (url.pathname === '/api/notifications/webhook-templates')- return route.fulfill({ json: [] });- }- if (- (req.method() === 'POST' && url.pathname === '/api/notifications/webhooks') ||- (req.method() === 'PUT' && url.pathname === '/api/notifications/webhooks/saved-hook')- ) {- const write = { method: req.method(), path: url.pathname, payload: req.postDataJSON() };- writes.push(write);- if (mode === 'pending')- await new Promise((resolve) => {- release = resolve;- });- if (mode === 'failure')- return route.fulfill({- status: 500,- json: { error: 'Synthetic configuration save unavailable' },- });- const accepted = {- ...write.payload,- id: req.method() === 'POST' ? `new-hook-${writes.length}` : 'saved-hook',- headers: { Authorization: '********' },- };- inventory =- req.method() === 'POST'- ? [...inventory, accepted]- : inventory.map((hook) => (hook.id === accepted.id ? accepted : hook));- if (mode === 'lost-response') return route.abort('failed');- return route.fulfill({ json: accepted });- }- unexpected.push({ method: req.method(), path: url.pathname });- return route.fulfill({- status: 403,- json: { error: 'Fixture refuses Test, deletion and unrelated operations' },- });- });- results.push({ name, checks, writes, unexpected, errors });- const page = await context.newPage();- page.on('pageerror', (error) => errors.push(error.message));- page.setDefaultTimeout(8000);- page.setDefaultNavigationTimeout(45000);- const check = async (label, action) => {- phase = `${name}: ${label}`;- await action();- checks.push(label);- };- const click = async (locator) => {- if (width < 500) await locator.tap();- else {- await locator.focus();- await page.keyboard.press('Enter');- }- };- const capture = async (state) => {- const file = `${name}-${state}.png`;- await page.screenshot({ path: path.join(output, file) });- screenshots.push({- file,- state,- sha256: hash(path.join(output, file)),- viewport: { width, height },- });- };- const noOverflow = async () =>- assert.ok(- await page.evaluate(() => document.documentElement.scrollWidth <= innerWidth + 1),- );- phase = `${name}: load actual editor`;- await page.goto(`${origin}/browser-tests/webhook-save-acknowledgement.html`);- await page.getByText('Existing destination', { exact: true }).first().waitFor();- await click(page.getByRole('button', { name: '+ Add Webhook', exact: true }));- await page.getByLabel('Name', { exact: true }).fill('New destination');- await page.getByLabel('Webhook URL', { exact: true }).fill('https://example.test/new');- await page- .getByLabel('Custom header 1 value', { exact: true })- .fill('application/custom+json');- await page.getByLabel('Minimum alert severity', { exact: true }).selectOption('warning');- await click(page.getByRole('button', { name: 'Add Webhook', exact: true }));- await check(- 'pending save keeps draft, locks conflicting actions and admits one write',- async () => {- await page.getByRole('button', { name: 'Saving…', exact: true }).waitFor();- assert.equal(- await page.getByLabel('Name', { exact: true }).inputValue(),- 'New destination',- );- assert.equal(await page.getByLabel('Name', { exact: true }).isEnabled(), false);- for (const label of ['Saving…', 'Cancel', 'Edit', 'Delete', 'Enabled', 'Disable All'])- assert.equal(- await page.getByRole('button', { name: label, exact: true }).isEnabled(),- false,- );- await page.getByRole('button', { name: 'Saving…' }).evaluate((button) => {- button.click();- button.click();- });- await page.waitForFunction(- () => document.querySelector('fieldset')?.getAttribute('aria-busy') === 'true',- );- assert.equal(writes.length, 1);- await noOverflow();- },- );- await capture('pending');- mode = 'failure';- release();- await check(- 'failed create retains values and announces fixed uncertainty, without a replay',- async () => {- await page.getByRole('alert').waitFor();- assert.ok((await page.getByRole('alert').innerText()).includes('another tab'));- assert.equal(- await page.getByLabel('Custom header 1 value').inputValue(),- 'application/custom+json',- );- assert.equal(- await page.getByLabel('Minimum alert severity', { exact: true }).inputValue(),- 'warning',- );- assert.equal(await page.getByLabel('Name', { exact: true }).isEnabled(), true);- assert.equal(writes.length, 1);- await noOverflow();- },- );- await page.getByRole('alert').scrollIntoViewIfNeeded();- await capture('failed-create');- mode = 'success';- await click(page.getByRole('button', { name: 'Add Webhook', exact: true }));- await check('explicit create retry closes only after accepted response', async () => {- await page.getByRole('button', { name: '+ Add Webhook', exact: true }).waitFor();- assert.equal(- await page.getByLabel('Saved destination names').innerText(),- 'Existing destination, New destination',- );- assert.equal(writes.length, 2);- assert.deepEqual(writes[0].payload, writes[1].payload);- assert.equal(await page.getByRole('alert').count(), 0);- });- await click(page.getByRole('button', { name: 'Edit', exact: true }).first());- await page.getByLabel('Name', { exact: true }).fill('Edited destination');- mode = 'failure';- await click(page.getByRole('button', { name: 'Update Webhook', exact: true }));- await check('failed edit keeps masking, template, tag and severity policy', async () => {- await page.getByRole('alert').waitFor();- assert.equal(await page.getByLabel('Custom header 1 value').inputValue(), '********');- assert.equal(- await page.getByLabel('Name', { exact: true }).inputValue(),- 'Edited destination',- );- assert.equal(- await page.getByLabel('Minimum alert severity', { exact: true }).inputValue(),- 'warning',- );- const payload = writes[2].payload;- for (const key of [- 'headers',- 'customFields',- 'template',- 'mention',- 'tagFilter',- 'tagFilterMode',- 'minimumSeverity',- ])- assert.deepEqual(payload[key], saved[key]);- assert.equal(- await page.getByLabel('Saved destination names').innerText(),- 'Existing destination, New destination',- );- await noOverflow();- });- await page.getByRole('alert').scrollIntoViewIfNeeded();- await capture('failed-edit');- mode = 'success';- await click(page.getByRole('button', { name: 'Update Webhook', exact: true }));- await check('accepted edit replaces inventory with acknowledged response', async () => {- await page.getByRole('button', { name: '+ Add Webhook', exact: true }).waitFor();- assert.equal(- await page.getByLabel('Saved destination names').innerText(),- 'Edited destination, New destination',- );- assert.deepEqual(writes[2].payload, writes[3].payload);- });- await click(page.getByRole('button', { name: '+ Add Webhook', exact: true }));- await page.getByLabel('Name', { exact: true }).fill('Unconfirmed destination');- await page- .getByLabel('Webhook URL', { exact: true })- .fill('https://example.test/unconfirmed');- mode = 'lost-response';- await click(page.getByRole('button', { name: 'Add Webhook', exact: true }));- await check('lost response leaves the draft and makes no unrequested duplicate', async () => {- await page.getByRole('alert').waitFor();- assert.equal(- await page.getByLabel('Name', { exact: true }).inputValue(),- 'Unconfirmed destination',- );- assert.equal(writes.length, 5);- assert.ok(!(await page.getByRole('alert').innerText()).includes('not saved'));- const other = await context.newPage();- await other.goto(`${origin}/browser-tests/webhook-save-acknowledgement.html`);- await other.getByText('Unconfirmed destination', { exact: true }).first().waitFor();- assert.ok(- (await other.getByLabel('Saved destination names').innerText()).includes(- 'Unconfirmed destination',- ),- );- await other.close();- assert.equal(writes.length, 5);- assert.equal(new Set(inventory.map((hook) => hook.id)).size, inventory.length);- await noOverflow();- });- await page.getByRole('alert').scrollIntoViewIfNeeded();- await capture('lost-response');- await click(page.getByRole('button', { name: 'Cancel', exact: true }));- await click(page.getByRole('button', { name: '+ Add Webhook', exact: true }));- await check(- 'deliberate Cancel clears old draft and error without another write',- async () => {- assert.equal(await page.getByLabel('Name', { exact: true }).inputValue(), '');- assert.equal(await page.getByRole('alert').count(), 0);- assert.equal(writes.length, 5);- assert.deepEqual(unexpected, []);- assert.deepEqual(errors, []);- await noOverflow();- },- );-- await browser.close();- browserClosed = true;- }- passed = true;- } catch (error) {- fs.writeFileSync(- path.join(output, 'failure.json'),- JSON.stringify({ phase, error: String(error) }, null, 2),- );- throw error;- } finally {- if (browser && !browserClosed) {- await browser.close();- browserClosed = true;- }- await server.close();- serverClosed = true;- fs.writeFileSync(- path.join(output, 'result.json'),- JSON.stringify(- {- result: passed ? 'passed' : 'failed',- phase,- base_sha: binding.base_sha,- content_sha256: binding.content_sha256,- playwrightVersion,- browserVersions,- results,- screenshots,- browserClosed,- serverClosed,- scope:- 'Actual existing Webhook section/editor/mutation owner and API client with synthetic transport. No provider/notification, native persistence, deployment or release acceptance.',- },- null,- 2,- ),- );- }-})().catch((error) => {- process.stderr.write(`${error.stack || error}\n`);- process.exitCode = 1;-});diff --git a/frontend-modern/browser-tests/webhook-save-acknowledgement.html b/frontend-modern/browser-tests/webhook-save-acknowledgement.htmldeleted file mode 100644index 760e19d8d0..0000000000--- a/frontend-modern/browser-tests/webhook-save-acknowledgement.html+++ /dev/null@@ -1,12 +0,0 @@-<!doctype html>-<html lang="en">- <head>- <meta charset="UTF-8" />- <meta name="viewport" content="width=device-width, initial-scale=1.0" />- <title>Webhook save acknowledgement verification</title>- </head>- <body>- <div id="root"></div>- <script type="module" src="./webhook-save-acknowledgement.tsx"></script>- </body>-</html>diff --git a/frontend-modern/browser-tests/webhook-save-acknowledgement.tsx b/frontend-modern/browser-tests/webhook-save-acknowledgement.tsxdeleted file mode 100644index e485040ba5..0000000000--- a/frontend-modern/browser-tests/webhook-save-acknowledgement.tsx+++ /dev/null@@ -1,32 +0,0 @@-// Actual destination section, editor, API client and mutation owner. The runner-// supplies synthetic local responses; no notification, provider or saved host.-import { render } from 'solid-js/web';-import { AlertWebhookDestinationsSection } from '../src/features/alerts/AlertWebhookDestinationsSection';-import { useAlertWebhookDestinationsState } from '../src/features/alerts/useAlertWebhookDestinationsState';-import '../src/index.css';--function Fixture() {- const state = useAlertWebhookDestinationsState();- return (- <main class="mx-auto min-h-screen max-w-4xl space-y-4 bg-surface p-4 text-base-content">- <h1 class="text-lg font-semibold">Notification destinations</h1>- <p class="text-sm text-muted">Offline save-recovery check. No notification is sent.</p>- <AlertWebhookDestinationsSection- webhooks={state.webhooks()}- addWebhook={state.addWebhook}- updateWebhook={state.updateWebhook}- deleteWebhook={state.deleteWebhook}- testWebhook={state.testWebhook}- testingWebhook={state.testingWebhook()}- />- <output aria-label="Saved destination names" class="block text-sm">- {state- .webhooks()- .map((hook) => hook.name)- .join(', ')}- </output>- </main>- );-}--render(() => <Fixture />, document.getElementById('root')!);diff --git a/frontend-modern/browser-tests/webhook-verification-help.cjs b/frontend-modern/browser-tests/webhook-verification-help.cjsdeleted file mode 100644index f093455341..0000000000--- a/frontend-modern/browser-tests/webhook-verification-help.cjs+++ /dev/null@@ -1,81 +0,0 @@-// Verify the copyable receiver example through production Docs/router/Markdown.-// This does not send a webhook or exercise a native receiver or deduplication.-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');--(async () => {- const root = path.resolve('frontend-modern');- const artifacts = path.join(root, 'node_modules', 'webhook-verification-browser');- fs.mkdirSync(artifacts, { recursive: true });- const guide = fs.readFileSync(path.join(root, 'public/docs/WEBHOOKS.md'), 'utf8');- const example = guide.match(/```python\n([\s\S]*?)```/)[1].trim();- 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-webhook-verification'),- server: { host: '127.0.0.1', port: 5255, strictPort: true },- optimizeDeps: { noDiscovery: true, include: [] },- });- const results = [];- let browser;- try {- await server.listen();- for (const [engine, width, tone] of [['chromium', 1280, 'light'], ['webkit', 390, 'dark']]) {- browser = await { chromium, webkit }[engine].launch(engine === 'chromium'- ? { headless: true, channel: 'chromium', args: ['--no-sandbox'] }- : { headless: true });- const page = await browser.newPage({ viewport: { width, height: 1000 },- ...(engine === 'webkit' ? { isMobile: true, hasTouch: true } : {}) });- const errors = [];- page.on('pageerror', error => errors.push(error.message));- page.on('console', message => { if (message.type() === 'error') errors.push(message.text()); });- await page.goto('http://127.0.0.1:5255/browser-tests/docs-fragment-navigation.html',- { waitUntil: 'domcontentloaded', timeout: 60_000 });- if (tone === 'dark') await page.evaluate(() => document.documentElement.classList.add('dark'));- await page.getByRole('link', { name: '← All documentation' }).click();- const entry = page.locator('a[data-doc-link][href="/docs/WEBHOOKS"]').first();- await entry.focus();- await page.keyboard.press('Enter');- const heading = page.getByRole('heading', { name: '📦 Delivery Contract', exact: true });- await heading.waitFor();- const code = page.locator('pre').filter({ hasText: 'MAX_SKEW_SECONDS = 300' });- await code.scrollIntoViewIfNeeded();- assert.equal((await code.locator('code').textContent()).trim(), example);- assert.ok(await page.evaluate(() => document.documentElement.scrollWidth <= innerWidth + 1));- await page.screenshot({ path: path.join(artifacts, `${engine}-verifier.png`) });- const warning = page.locator('p').filter({ hasText: 'A time window rejects old captures' });- await warning.scrollIntoViewIfNeeded();- const text = await page.locator('article').innerText();- for (const phrase of ['within five minutes', 'empty secret', 'not every replay',- 'deduplicate atomically', 'receiver restarts', 'not covered by this HMAC',- 'missing or duplicate signing headers', 'before parsing the JSON']) {- assert.ok(text.includes(phrase), phrase);- }- assert.ok(await page.evaluate(() => document.documentElement.scrollWidth <= innerWidth + 1));- await page.screenshot({ path: path.join(artifacts, `${engine}-deduplication.png`) });- const payloadHeading = page.getByRole('heading', { name: 'Sample PSA payloads', exact: true });- await payloadHeading.scrollIntoViewIfNeeded();- assert.ok((await page.locator('pre').filter({ hasText: '"alertId": "{{.ID | jsonString}}"' })- .textContent()).includes('"event": "{{.Event}}"'));- assert.deepEqual(errors, []);- results.push({ engine, browserVersion: browser.version(), width, tone,- keyboardEntry: true, exactCopiedPython: true, freshnessAndReplayLimits: true,- payloadIdentity: true, noBodyOverflow: true, errors });- await browser.close();- browser = undefined;- }- const result = { result: 'passed', playwrightVersion: require('playwright/package.json').version,- scope: 'rendered guide and exact copied code; not webhook delivery or receiver processing',- docs: { 'frontend-modern/public/docs/WEBHOOKS.md':- createHash('sha256').update(guide).digest('hex') }, results };- fs.writeFileSync(path.join(artifacts, 'result.json'), JSON.stringify(result, null, 2) + '\n');- console.log(JSON.stringify(result));- } finally {- if (browser) await browser.close();- await server.close();- }-})().catch(error => { console.error(error); process.exitCode = 1; });diff --git a/scripts/check-alert-card-footer.cjs b/scripts/check-alert-card-footer.cjsdeleted file mode 100644index 87ffbd4e7b..0000000000--- a/scripts/check-alert-card-footer.cjs+++ /dev/null@@ -1,120 +0,0 @@-// Offline real-browser regression for issue #2119 (Alerts overview card footer).-//-// Mounts the production footer markup with the class returned by-// getAlertOverviewStartedAtClass() and measures whether the "Started" run and-// the adjacent delivery-status run share a vertical baseline. Run with:-// pulse-worker-browser scripts/check-alert-card-footer.cjs-const path = require("node:path");-const { chromium } = require("playwright");--const ROOT = path.resolve(process.cwd(), "frontend-modern");--const launchOptions = {- headless: true,- channel: "chromium",- args: ["--no-sandbox"],-};--const measure = () =>- (() => {- const started = document.querySelector('[data-testid="started"]');- const status = document.querySelector('[data-testid="status"]');- if (!started || !status) return null;- const textRect = (el) => {- const range = document.createRange();- range.selectNodeContents(el);- const rect = range.getBoundingClientRect();- return { top: rect.top, bottom: rect.bottom };- };- const startedText = textRect(started);- const statusText = textRect(status);- return {- startedClass: started.getAttribute("class"),- statusClass: status.getAttribute("class"),- startedText,- statusText,- baselineDelta: Math.abs(startedText.bottom - statusText.bottom),- topDelta: Math.abs(startedText.top - statusText.top),- };- })();--(async () => {- process.chdir(ROOT);- const { createServer } = await import(- path.join(ROOT, "node_modules", "vite", "dist", "node", "index.js")- );- const server = await createServer({- root: ROOT,- configFile: path.join(ROOT, "vite.config.ts"),- server: { host: "127.0.0.1", port: 5198, strictPort: true },- });- let browser;- const errors = [];- const httpErrors = [];- try {- await server.listen();- browser = await chromium.launch(launchOptions);- const page = await browser.newPage({- viewport: { width: 2010, height: 1072 },- });- page.on("pageerror", (error) => errors.push(error.message));- page.on("console", (message) => {- if (message.type() !== "error") return;- if (message.text().includes("Failed to load resource")) return;- errors.push(`console: ${message.text()}`);- });- page.on("response", (response) => {- if (response.status() >= 400)- httpErrors.push(`${response.status()} ${response.url()}`);- });-- await page.goto(- "http://127.0.0.1:5198/browser-tests/alert-card-footer.html",- );- await page.waitForSelector('[data-testid="started"]');- await page.waitForSelector('[data-testid="status"]');-- const desktop = await page.evaluate(measure);- if (!desktop) throw new Error("footer runs not rendered");- await page.screenshot({- path: path.join(ROOT, "browser-tests", "alert-card-footer-desktop.png"),- });-- await page.setViewportSize({ width: 480, height: 800 });- await page.waitForTimeout(150);- const narrow = await page.evaluate(measure);- await page.screenshot({- path: path.join(ROOT, "browser-tests", "alert-card-footer-narrow.png"),- });-- if (errors.length > 0)- throw new Error(`page errors: ${errors.join(" | ")}`);-- const worst = Math.max(- desktop.baselineDelta,- desktop.topDelta,- narrow.baselineDelta,- narrow.topDelta,- );- if (worst > 1) {- throw new Error(- `Started and status runs are vertically misaligned: desktop ${JSON.stringify(desktop)} ` +- `narrow ${JSON.stringify(narrow)}`,- );- }-- console.log(- JSON.stringify(- { result: "passed", desktop, narrow, httpErrors },- null,- 2,- ),- );- } finally {- if (browser) await browser.close();- await server.close();- }-})().catch((error) => {- console.error("FAILED:", error && error.stack ? error.stack : error);- process.exitCode = 1;-});diff --git a/scripts/check-backup-date-observation.cjs b/scripts/check-backup-date-observation.cjsdeleted file mode 100644index 09651f2a16..0000000000--- a/scripts/check-backup-date-observation.cjs+++ /dev/null@@ -1,141 +0,0 @@-// Run from the assigned root with pulse-worker-browser. No external services.-const assert = require('node:assert/strict');-const fs = require('node:fs');-const path = require('node:path');-const http = require('node:http');-const crypto = require('node:crypto');-const { chromium, webkit } = require('playwright');--const root = '/workspace';-const compiled = path.join(root, 'tmp/backup-date-static');-const output = path.join(root, 'tmp/backup-date-browser');-const origin = 'http://127.0.0.1:5371';-const hash = (bytes) => crypto.createHash('sha256').update(bytes).digest('hex');-const binding = JSON.parse(fs.readFileSync(path.join(compiled, 'binding.json')));-const producer = JSON.parse(fs.readFileSync(path.join(root, 'tmp/backup-date-producer.json')));-const frames = producer.frames;-const result = {- result: 'incomplete',- base: 'c67f8bd5002084fb4d75773893f85a448bf08534',- producer,- consumer: binding,- harness: hash(fs.readFileSync(__filename)),- playwright: require('playwright/package.json').version,- cases: [],- requests: [],- captures: [],- cleanup: { browser: false, server: false },- limits: 'Real CheckBackups/GetActiveAlerts -> AlertsAPI -> Overview/card; synthetic rollups only. No installed recovery, guest action, backup execution, notification delivery or reporter acceptance.',-};-let server;-let browser;--(async () => {- fs.mkdirSync(output, { recursive: true });- assert.equal(result.playwright, JSON.parse(fs.readFileSync(path.join(root, 'tests/integration/package-lock.json'))).packages['node_modules/@playwright/test'].version);- assert.equal(binding.graph, hash(fs.readFileSync(path.join(root, 'frontend-modern/package-lock.json'))));- assert.equal(binding.builder, hash(fs.readFileSync(path.join(root, 'frontend-modern/browser-tests/build-backup-date-observation.mjs'))));- assert.equal(producer.runtime_sha256, hash(fs.readFileSync(path.join(root, 'internal/alerts/backup_snapshot.go'))));- assert.deepEqual(frames.stale, frames.missing);- assert.deepEqual(frames.stale, frames.future);- assert.equal(frames.stale.length, 1);- assert.deepEqual(frames.recovered, []);- for (const [file, digest] of Object.entries(binding.sources)) {- assert.equal(hash(fs.readFileSync(path.join(root, 'frontend-modern', file))), digest, file);- }- for (const file of ['src/api/alerts.ts', 'src/features/alerts/OverviewTab.tsx', 'src/features/alerts/AlertOverviewAlertCard.tsx']) {- assert(binding.sources[file], `real consumer not compiled: ${file}`);- }- const assets = new Map();- for (const [file, digest] of Object.entries(binding.artifacts)) {- const bytes = fs.readFileSync(path.join(compiled, file));- assert.equal(hash(bytes), digest, file);- assets.set('/' + file, bytes);- }- server = http.createServer((request, response) => {- const pathname = new URL(request.url, origin).pathname;- const bytes = assets.get(pathname);- if (!bytes || request.method !== 'GET') {- response.writeHead(404).end();- return;- }- response.writeHead(200, { 'Content-Type': { '.html': 'text/html', '.js': 'text/javascript', '.css': 'text/css' }[path.extname(pathname)] || 'application/octet-stream' });- response.end(bytes);- });- await new Promise((resolve, reject) => {- server.once('error', reject);- server.listen(5371, '127.0.0.1', resolve);- });- for (const [name, engine, width, height] of [- ['desktop', chromium, 1280, 900],- ['narrow', webkit, 320, 812],- ]) {- browser = await engine.launch(engine === chromium ? { headless: true, channel: 'chromium', args: ['--no-sandbox'] } : { headless: true });- const page = await browser.newPage({ viewport: { width, height }, isMobile: width < 768, hasTouch: width < 768, locale: 'en-GB', timezoneId: 'UTC' });- page.setDefaultTimeout(10000);- const record = { name, width, height, browser: browser.version(), errors: [], phases: [] };- page.on('pageerror', (error) => record.errors.push(error.message));- let phase = 'stale';- await page.route('**/*', async (route) => {- const request = route.request();- const url = new URL(request.url());- assert.equal(url.origin, origin, 'external request');- assert.equal(request.method(), 'GET', 'unexpected mutation');- if (!url.pathname.startsWith('/api/')) return route.continue();- result.requests.push({ viewport: name, phase, path: url.pathname });- let body;- if (url.pathname === '/api/alerts/active') body = frames[phase];- else if (url.pathname === '/api/alerts/delivery-diagnosis') body = [];- else if (url.pathname === '/api/notifications/health') body = { queue: { status: 'unavailable' } };- else if (url.pathname === '/api/alerts/incidents') body = null;- else throw new Error(`unexpected API read: ${url.pathname}`);- return route.fulfill({ json: body });- });- await page.goto(origin + '/browser-tests/backup-date-observation.html');- await page.waitForFunction(() => window.__backupDate?.generation() === 1);- for (phase of ['stale', 'missing', 'future', 'recovered']) {- if (phase !== 'stale') {- const previous = await page.evaluate(() => window.__backupDate.generation());- await page.getByRole('button', { name: 'Refresh monitoring evidence', exact: true }).click();- await page.waitForFunction((generation) => window.__backupDate.generation() > generation, previous);- }- const active = await page.evaluate(() => Object.values(window.__backupDate.active()));- assert.deepEqual(active, frames[phase], `producer/consumer mismatch in ${name}/${phase}`);- if (phase !== 'recovered') {- await page.getByText(frames.stale[0].message, { exact: true }).waitFor();- const more = page.getByRole('button', { name: 'More', exact: true });- if (await more.count()) {- await more.click();- await page.getByRole('button', { name: 'Less', exact: true }).click();- }- } else {- assert.equal(await page.getByText(frames.stale[0].message, { exact: true }).count(), 0);- }- await page.evaluate(async () => {- await document.fonts.ready;- await new Promise((resolve) => requestAnimationFrame(() => requestAnimationFrame(resolve)));- });- const overflow = await page.evaluate(() => document.documentElement.scrollWidth > window.innerWidth);- assert.equal(overflow, false, `${name}/${phase} horizontal overflow`);- const capture = `${name}-${phase}.png`;- await page.screenshot({ path: path.join(output, capture), fullPage: true });- result.captures.push({ file: capture, sha256: hash(fs.readFileSync(path.join(output, capture))) });- record.phases.push({ phase, active: active.length, overflow });- }- assert.deepEqual(record.errors, []);- result.cases.push(record);- await browser.close();- browser = undefined;- }- result.result = 'passed';-})().catch((error) => {- result.result = 'failed';- result.error = String(error.stack || error);- process.exitCode = 1;-}).finally(async () => {- if (browser) await browser.close();- result.cleanup.browser = true;- if (server) await new Promise((resolve) => server.close(resolve));- result.cleanup.server = true;- fs.writeFileSync(path.join(output, 'result.json'), JSON.stringify(result, null, 2) + '\n');-});diff --git a/scripts/check-clone-identity-guidance.cjs b/scripts/check-clone-identity-guidance.cjsdeleted file mode 100644index d99f4539cc..0000000000--- a/scripts/check-clone-identity-guidance.cjs+++ /dev/null@@ -1,107 +0,0 @@-// Real shipped documents, production Docs renderer/router; no live host changes.-// Run from the assigned workspace root:-// pulse-worker-browser scripts/check-clone-identity-guidance.cjs-const fs = require('node:fs');-const path = require('node:path');-const crypto = require('node:crypto');-const { chromium } = require('playwright');--const root = process.cwd();-const frontend = path.join(root, 'frontend-modern');-const output = path.join(root, 'tmp', 'clone-identity-guidance');-const port = 5198;-const observations = [];-const errors = [];--function check(condition, message) {- observations.push({ passed: condition, message });- if (!condition) throw new Error(message);-}--async function sectionText(page, id) {- return page.locator(`#${id}`).evaluate((heading) => {- const parts = [heading.textContent];- for (let node = heading.nextElementSibling; node; node = node.nextElementSibling) {- if (/^H[1-3]$/.test(node.tagName)) break;- parts.push(node.textContent);- }- return parts.join('\n').replace(/\s+/g, ' ');- });-}--(async () => {- fs.mkdirSync(output, { recursive: true });- process.chdir(frontend);- const { createServer } = await import(- path.join(frontend, 'node_modules', 'vite', 'dist', 'node', 'index.js')- );- const server = await createServer({- root: frontend,- configFile: path.join(frontend, 'vite.config.ts'),- server: { host: '127.0.0.1', port, strictPort: true },- });- let browser;- let result;- try {- await server.listen();- browser = await chromium.launch({- headless: true, channel: 'chromium', args: ['--no-sandbox'],- });- const page = await browser.newPage();- page.on('pageerror', (error) => errors.push(error.message));- page.on('response', (response) => {- if (response.status() >= 400) errors.push(`${response.status()} ${response.url()}`);- });- // Authentication probing only; both Markdown documents are real assets.- await page.route(new RegExp(`^http://127\\.0\\.0\\.1:${port}/api/`), (route) =>- route.fulfill({- status: 200, contentType: 'application/json',- body: JSON.stringify({ hasAuthentication: false }),- }),- );-- for (const [size, width, height] of [['desktop', 1440, 900], ['phone', 390, 844]]) {- await page.setViewportSize({ width, height });- await page.goto(`http://127.0.0.1:${port}/browser-tests/docs-fragment-navigation.html?scenario=troubleshooting`);- await page.waitForFunction(() => document.activeElement?.id === 'recovery-mode');- await page.locator('#docker-hosts-appearingdisappearing').scrollIntoViewIfNeeded();- const shortGuide = await sectionText(page, 'docker-hosts-appearingdisappearing');- check(shortGuide.includes('saved Pulse agent ID'), `${size}: saved clone identity is identified`);- check(shortGuide.includes('Do not delete the OS machine ID'), `${size}: no destructive OS reset is prescribed`);- const link = page.getByRole('link', { name: 'Clone identity recovery', exact: true });- check((await link.getAttribute('href')) === '/docs/UNIFIED_AGENT#duplicate-agents', `${size}: link targets the shipped agent guide`);- check(!(await page.evaluate(() => document.documentElement.scrollWidth > document.documentElement.clientWidth)), `${size}: troubleshooting does not overflow`);- await page.screenshot({ path: path.join(output, `${size}-troubleshooting.png`) });-- await link.focus();- await page.keyboard.press('Enter');- await page.waitForFunction(() => document.activeElement?.id === 'duplicate-agents');- const cloneGuide = await sectionText(page, 'duplicate-agents');- check(cloneGuide.includes('argument wins over the environment variable'), `${size}: argument precedence is explicit`);- check(cloneGuide.includes('PULSE_AGENT_ID_FILE'), `${size}: custom identity files are covered`);- check(cloneGuide.includes('Environment="PULSE_AGENT_ID=vm-clone-02"'), `${size}: persistent systemd configuration is rendered`);- check(cloneGuide.includes('fresh, distinct IDs') && cloneGuide.includes('does not split or recover historical'), `${size}: verification and history limitations are rendered`);- check(cloneGuide.includes('Do not upload connection.env, token files'), `${size}: credential-bearing evidence is excluded`);- check(!(await page.evaluate(() => document.documentElement.scrollWidth > document.documentElement.clientWidth)), `${size}: agent guide does not overflow`);- await page.locator('article pre').filter({ hasText: 'PULSE_AGENT_ID=vm-clone-02' }).scrollIntoViewIfNeeded();- await page.screenshot({ path: path.join(output, `${size}-agent-configuration.png`) });- }- check(errors.length === 0, 'no page errors or failed HTTP responses');- result = {- result: 'passed', observations, errors, chromium: browser.version(),- playwright: require('playwright/package.json').version,- sourceAssets: ['TROUBLESHOOTING.md', 'UNIFIED_AGENT.md'].map((name) => ({- path: `frontend-modern/public/docs/${name}`,- sha256: crypto.createHash('sha256').update(fs.readFileSync(path.join(frontend, 'public', 'docs', name))).digest('hex'),- })),- };- } catch (error) {- result = { result: 'failed', observations, errors, error: error.message };- } finally {- if (browser) await browser.close();- await server.close();- }- fs.writeFileSync(path.join(output, 'result.json'), JSON.stringify(result, null, 2));- console.log(JSON.stringify(result, null, 2));- process.exitCode = result.result === 'passed' ? 0 : 1;-})();diff --git a/scripts/check-community-troubleshooting.cjs b/scripts/check-community-troubleshooting.cjsdeleted file mode 100644index 447e8efac0..0000000000--- a/scripts/check-community-troubleshooting.cjs+++ /dev/null@@ -1,88 +0,0 @@-// Render the real shipped troubleshooting guide with the production Docs page.-// Run from the assigned workspace root:-// pulse-worker-browser scripts/check-community-troubleshooting.cjs-const fs = require('node:fs');-const path = require('node:path');-const { chromium } = require('playwright');--const root = process.cwd();-const frontend = path.join(root, 'frontend-modern');-const output = path.join(root, 'tmp', 'community-troubleshooting');-const port = 5198;-const observations = [];-const errors = [];--function check(condition, message) {- observations.push({ passed: condition, message });- if (!condition) throw new Error(message);-}--(async () => {- fs.mkdirSync(output, { recursive: true });- // Tailwind resolves its config/content globs from the frontend working dir.- process.chdir(frontend);- const { createServer } = await import(- path.join(frontend, 'node_modules', 'vite', 'dist', 'node', 'index.js')- );- const server = await createServer({- root: frontend,- configFile: path.join(frontend, 'vite.config.ts'),- server: { host: '127.0.0.1', port, strictPort: true },- });- let browser;- let result;- try {- await server.listen();- browser = await chromium.launch({- headless: true, channel: 'chromium', args: ['--no-sandbox'],- });- const page = await browser.newPage();- page.on('pageerror', (error) => errors.push(error.message));- page.on('response', (response) => {- if (response.status() >= 400) errors.push(`${response.status()} ${response.url()}`);- });- // Only app-runtime auth probes are mocked; the Markdown asset is real.- await page.route(new RegExp(`^http://127\\.0\\.0\\.1:${port}/api/`), (route) =>- route.fulfill({- status: 200, contentType: 'application/json',- body: JSON.stringify({ hasAuthentication: false }),- }),- );-- for (const [size, width, height] of [['desktop', 1440, 900], ['phone', 390, 844]]) {- await page.setViewportSize({ width, height });- await page.goto(`http://127.0.0.1:${port}/browser-tests/docs-fragment-navigation.html?scenario=troubleshooting`);- await page.waitForFunction(() => document.activeElement?.id === 'recovery-mode');- const article = page.locator('article');- const text = await article.innerText();- check(text.includes('browser-bound recovery session'), `${size}: browser-bound recovery is explained`);- check(text.includes('A successful curl response does not unlock a separate browser'), `${size}: curl is not presented as a browser unlock`);- check(!(await article.locator('pre').allTextContents()).some((code) => code.includes('X-Recovery-Token') || code.includes('generate_token')), `${size}: no recovery credential command is offered`);- check(text.includes('Export for GitHub (sanitized)') && text.includes('Review before posting'), `${size}: safe reporting evidence is visible`);- check(text.includes('Do not repeat an update, outage or notification storm'), `${size}: unsafe reproduction is not required`);- check(!(await page.evaluate(() => document.documentElement.scrollWidth > document.documentElement.clientWidth)), `${size}: no horizontal page overflow`);- await page.screenshot({ path: path.join(output, `${size}-recovery.png`) });-- // The supported reset link must work with the real router and heading ID.- await article.getByRole('link', { name: 'I forgot my password', exact: true }).click();- await page.waitForFunction(() => document.activeElement?.id === 'i-forgot-my-password');- check((await page.locator('#i-forgot-my-password').innerText()) === 'I forgot my password', `${size}: reset link reaches the deployment-specific steps`);- await article.getByText(size === 'phone' ? 'Review before posting' : 'Keep the original evidence', { exact: true }).scrollIntoViewIfNeeded();- await page.screenshot({ path: path.join(output, `${size}-help.png`) });- }- check(errors.length === 0, 'no page errors or failed HTTP responses');- result = {- result: 'passed', observations, errors, chromium: browser.version(),- playwright: require('playwright/package.json').version,- sourceAsset: 'frontend-modern/public/docs/TROUBLESHOOTING.md',- };- } catch (error) {- result = { result: 'failed', observations, errors, error: error.message };- } finally {- if (browser) await browser.close();- await server.close();- }- fs.writeFileSync(path.join(output, 'result.json'), JSON.stringify(result, null, 2));- console.log(JSON.stringify(result, null, 2));- process.exitCode = result.result === 'passed' ? 0 : 1;-})();diff --git a/scripts/check-snapshot-collection-observation.cjs b/scripts/check-snapshot-collection-observation.cjsdeleted file mode 100644index 10b9f1a02c..0000000000--- a/scripts/check-snapshot-collection-observation.cjs+++ /dev/null@@ -1,150 +0,0 @@-// Run from the assigned root with pulse-worker-browser. No external services.-const assert = require('node:assert/strict');-const fs = require('node:fs');-const path = require('node:path');-const http = require('node:http');-const crypto = require('node:crypto');-const { chromium, webkit } = require('playwright');--const root = '/workspace';-const compiled = path.join(root, 'tmp/backup-date-static');-const output = path.join(root, 'tmp/snapshot-collection-browser');-const origin = 'http://127.0.0.1:5371';-const hash = (bytes) => crypto.createHash('sha256').update(bytes).digest('hex');-const binding = JSON.parse(fs.readFileSync(path.join(compiled, 'binding.json')));-const producer = JSON.parse(fs.readFileSync(path.join(root, 'tmp/snapshot-collection-producer.json')));-const frames = producer.frames;-const result = {- result: 'incomplete',- source: producer.source_sha,- base: producer.base_sha,- producer,- consumer: binding,- harness: hash(fs.readFileSync(__filename)),- playwright: require('playwright/package.json').version,- cases: [],- requests: [],- captures: [],- cleanup: { browser: false, server: false },- limits: 'Real pollGuestSnapshots/GetState.ActiveAlerts -> AlertsAPI -> Overview/card; synthetic PVE listings only. Inventory retention is checked by the producer, not rendered by this alert fixture. No installed recovery, guest action, backup execution, notification delivery or reporter acceptance.',-};-let server;-let browser;--(async () => {- fs.mkdirSync(output, { recursive: true });- assert.equal(result.playwright, JSON.parse(fs.readFileSync(path.join(root, 'tests/integration/package-lock.json'))).packages['node_modules/@playwright/test'].version);- assert.equal(binding.graph, hash(fs.readFileSync(path.join(root, 'frontend-modern/package-lock.json'))));- assert.equal(binding.builder, hash(fs.readFileSync(path.join(root, 'frontend-modern/browser-tests/build-backup-date-observation.mjs'))));- for (const [file, digest] of Object.entries(producer.sources)) {- assert.equal(hash(fs.readFileSync(path.join(root, file))), digest, file);- }- const phases = ['observed', 'failed-596', 'failed-unavailable', 'confirmed-empty'];- for (const phase of phases.slice(0, -1)) {- assert.deepEqual(frames[phase].snapshots, frames.observed.snapshots, phase);- assert.equal(frames[phase].alerts.length, 1, phase);- assert.equal(frames[phase].alerts[0].id, frames.observed.alerts[0].id, phase);- assert.equal(frames[phase].alerts[0].startTime, frames.observed.alerts[0].startTime, phase);- assert.equal(frames[phase].alerts[0].level, 'critical', phase);- }- assert.equal(frames['confirmed-empty'].snapshots.length, 0);- assert.deepEqual(frames['confirmed-empty'].alerts, []);- for (const [file, digest] of Object.entries(binding.sources)) {- assert.equal(hash(fs.readFileSync(path.join(root, 'frontend-modern', file))), digest, file);- }- for (const file of ['src/api/alerts.ts', 'src/features/alerts/OverviewTab.tsx', 'src/features/alerts/AlertOverviewAlertCard.tsx']) {- assert(binding.sources[file], `real consumer not compiled: ${file}`);- }- const assets = new Map();- for (const [file, digest] of Object.entries(binding.artifacts)) {- const bytes = fs.readFileSync(path.join(compiled, file));- assert.equal(hash(bytes), digest, file);- assets.set('/' + file, bytes);- }- server = http.createServer((request, response) => {- const pathname = new URL(request.url, origin).pathname;- const bytes = assets.get(pathname);- if (!bytes || request.method !== 'GET') {- response.writeHead(404).end();- return;- }- response.writeHead(200, { 'Content-Type': { '.html': 'text/html', '.js': 'text/javascript', '.css': 'text/css' }[path.extname(pathname)] || 'application/octet-stream' });- response.end(bytes);- });- await new Promise((resolve, reject) => {- server.once('error', reject);- server.listen(5371, '127.0.0.1', resolve);- });- for (const [name, engine, width, height] of [- ['desktop', chromium, 1280, 900],- ['narrow', webkit, 320, 812],- ]) {- browser = await engine.launch(engine === chromium ? { headless: true, channel: 'chromium', args: ['--no-sandbox'] } : { headless: true });- const page = await browser.newPage({ viewport: { width, height }, isMobile: width < 768, hasTouch: width < 768, locale: 'en-GB', timezoneId: 'UTC' });- page.setDefaultTimeout(10000);- const record = { name, width, height, browser: browser.version(), errors: [], phases: [] };- page.on('pageerror', (error) => record.errors.push(error.message));- let phase = 'observed';- await page.route('**/*', async (route) => {- const request = route.request();- const url = new URL(request.url());- assert.equal(url.origin, origin, 'external request');- assert.equal(request.method(), 'GET', 'unexpected mutation');- if (!url.pathname.startsWith('/api/')) return route.continue();- result.requests.push({ viewport: name, phase, path: url.pathname });- let body;- if (url.pathname === '/api/alerts/active') body = frames[phase].alerts;- else if (url.pathname === '/api/alerts/delivery-diagnosis') body = [];- else if (url.pathname === '/api/notifications/health') body = { queue: { status: 'unavailable' } };- else if (url.pathname === '/api/alerts/incidents') body = null;- else throw new Error(`unexpected API read: ${url.pathname}`);- return route.fulfill({ json: body });- });- await page.goto(origin + '/browser-tests/backup-date-observation.html');- await page.waitForFunction(() => window.__backupDate?.generation() === 1);- for (phase of phases) {- if (phase !== 'observed') {- const previous = await page.evaluate(() => window.__backupDate.generation());- await page.getByRole('button', { name: 'Refresh monitoring evidence', exact: true }).click();- await page.waitForFunction((generation) => window.__backupDate.generation() > generation, previous);- }- const active = await page.evaluate(() => Object.values(window.__backupDate.active()));- assert.deepEqual(active, frames[phase].alerts, `producer/consumer mismatch in ${name}/${phase}`);- if (phase !== 'confirmed-empty') {- await page.getByText(frames[phase].alerts[0].message, { exact: true }).waitFor();- const more = page.getByRole('button', { name: 'More', exact: true });- if (await more.count()) {- await more.click();- await page.getByRole('button', { name: 'Less', exact: true }).click();- }- } else {- assert.equal(await page.getByText(frames.observed.alerts[0].message, { exact: true }).count(), 0);- }- await page.evaluate(async () => {- await document.fonts.ready;- await new Promise((resolve) => requestAnimationFrame(() => requestAnimationFrame(resolve)));- });- const overflow = await page.evaluate(() => document.documentElement.scrollWidth > window.innerWidth);- assert.equal(overflow, false, `${name}/${phase} horizontal overflow`);- const capture = `${name}-${phase}.png`;- await page.screenshot({ path: path.join(output, capture), fullPage: true });- result.captures.push({ file: capture, sha256: hash(fs.readFileSync(path.join(output, capture))) });- record.phases.push({ phase, active: active.length, overflow });- }- assert.deepEqual(record.errors, []);- result.cases.push(record);- await browser.close();- browser = undefined;- }- result.result = 'passed';-})().catch((error) => {- result.result = 'failed';- result.error = String(error.stack || error);- process.exitCode = 1;-}).finally(async () => {- if (browser) await browser.close();- result.cleanup.browser = true;- if (server) await new Promise((resolve) => server.close(resolve));- result.cleanup.server = true;- fs.writeFileSync(path.join(output, 'result.json'), JSON.stringify(result, null, 2) + '\n');-});diff --git a/scripts/check-snapshot-date-observation.cjs b/scripts/check-snapshot-date-observation.cjsdeleted file mode 100644index 1b225fcf51..0000000000--- a/scripts/check-snapshot-date-observation.cjs+++ /dev/null@@ -1,141 +0,0 @@-// Run from the assigned root with pulse-worker-browser. No external services.-const assert = require('node:assert/strict');-const fs = require('node:fs');-const path = require('node:path');-const http = require('node:http');-const crypto = require('node:crypto');-const { chromium, webkit } = require('playwright');--const root = '/workspace';-const compiled = path.join(root, 'tmp/snapshot-date-static');-const output = path.join(root, 'tmp/snapshot-date-browser');-const origin = 'http://127.0.0.1:5371';-const hash = (bytes) => crypto.createHash('sha256').update(bytes).digest('hex');-const binding = JSON.parse(fs.readFileSync(path.join(compiled, 'binding.json')));-const producer = JSON.parse(fs.readFileSync(path.join(root, 'tmp/snapshot-date-producer.json')));-const frames = producer.frames;-const result = {- result: 'incomplete',- base: '7374abf19b434c9a275df730d28234bea3943774',- producer,- consumer: binding,- harness: hash(fs.readFileSync(__filename)),- playwright: require('playwright/package.json').version,- cases: [],- requests: [],- captures: [],- cleanup: { browser: false, server: false },- limits: 'Real CheckSnapshotsForInstance/GetActiveAlerts -> AlertsAPI -> Overview/card; synthetic snapshot listings only. No installed recovery, guest action, backup execution, notification delivery or reporter acceptance.',-};-let server;-let browser;--(async () => {- fs.mkdirSync(output, { recursive: true });- assert.equal(result.playwright, JSON.parse(fs.readFileSync(path.join(root, 'tests/integration/package-lock.json'))).packages['node_modules/@playwright/test'].version);- assert.equal(binding.graph, hash(fs.readFileSync(path.join(root, 'frontend-modern/package-lock.json'))));- assert.equal(binding.builder, hash(fs.readFileSync(path.join(root, 'frontend-modern/browser-tests/build-snapshot-date-observation.mjs'))));- assert.equal(producer.runtime_sha256, hash(fs.readFileSync(path.join(root, 'internal/alerts/backup_snapshot.go'))));- assert.deepEqual(frames.stale, frames.missing);- assert.deepEqual(frames.stale, frames.future);- assert.equal(frames.stale.length, 1);- assert.deepEqual(frames.recovered, []);- for (const [file, digest] of Object.entries(binding.sources)) {- assert.equal(hash(fs.readFileSync(path.join(root, 'frontend-modern', file))), digest, file);- }- for (const file of ['src/api/alerts.ts', 'src/features/alerts/OverviewTab.tsx', 'src/features/alerts/AlertOverviewAlertCard.tsx']) {- assert(binding.sources[file], `real consumer not compiled: ${file}`);- }- const assets = new Map();- for (const [file, digest] of Object.entries(binding.artifacts)) {- const bytes = fs.readFileSync(path.join(compiled, file));- assert.equal(hash(bytes), digest, file);- assets.set('/' + file, bytes);- }- server = http.createServer((request, response) => {- const pathname = new URL(request.url, origin).pathname;- const bytes = assets.get(pathname);- if (!bytes || request.method !== 'GET') {- response.writeHead(404).end();- return;- }- response.writeHead(200, { 'Content-Type': { '.html': 'text/html', '.js': 'text/javascript', '.css': 'text/css' }[path.extname(pathname)] || 'application/octet-stream' });- response.end(bytes);- });- await new Promise((resolve, reject) => {- server.once('error', reject);- server.listen(5371, '127.0.0.1', resolve);- });- for (const [name, engine, width, height] of [- ['desktop', chromium, 1280, 900],- ['narrow', webkit, 320, 812],- ]) {- browser = await engine.launch(engine === chromium ? { headless: true, channel: 'chromium', args: ['--no-sandbox'] } : { headless: true });- const page = await browser.newPage({ viewport: { width, height }, isMobile: width < 768, hasTouch: width < 768, locale: 'en-GB', timezoneId: 'UTC' });- page.setDefaultTimeout(10000);- const record = { name, width, height, browser: browser.version(), errors: [], phases: [] };- page.on('pageerror', (error) => record.errors.push(error.message));- let phase = 'stale';- await page.route('**/*', async (route) => {- const request = route.request();- const url = new URL(request.url());- assert.equal(url.origin, origin, 'external request');- assert.equal(request.method(), 'GET', 'unexpected mutation');- if (!url.pathname.startsWith('/api/')) return route.continue();- result.requests.push({ viewport: name, phase, path: url.pathname });- let body;- if (url.pathname === '/api/alerts/active') body = frames[phase];- else if (url.pathname === '/api/alerts/delivery-diagnosis') body = [];- else if (url.pathname === '/api/notifications/health') body = { queue: { status: 'unavailable' } };- else if (url.pathname === '/api/alerts/incidents') body = null;- else throw new Error(`unexpected API read: ${url.pathname}`);- return route.fulfill({ json: body });- });- await page.goto(origin + '/browser-tests/snapshot-date-observation.html');- await page.waitForFunction(() => window.__snapshotDate?.generation() === 1);- for (phase of ['stale', 'missing', 'future', 'recovered']) {- if (phase !== 'stale') {- const previous = await page.evaluate(() => window.__snapshotDate.generation());- await page.getByRole('button', { name: 'Refresh monitoring evidence', exact: true }).click();- await page.waitForFunction((generation) => window.__snapshotDate.generation() > generation, previous);- }- const active = await page.evaluate(() => Object.values(window.__snapshotDate.active()));- assert.deepEqual(active, frames[phase], `producer/consumer mismatch in ${name}/${phase}`);- if (phase !== 'recovered') {- await page.getByText(frames.stale[0].message, { exact: true }).waitFor();- const more = page.getByRole('button', { name: 'More', exact: true });- if (await more.count()) {- await more.click();- await page.getByRole('button', { name: 'Less', exact: true }).click();- }- } else {- assert.equal(await page.getByText(frames.stale[0].message, { exact: true }).count(), 0);- }- await page.evaluate(async () => {- await document.fonts.ready;- await new Promise((resolve) => requestAnimationFrame(() => requestAnimationFrame(resolve)));- });- const overflow = await page.evaluate(() => document.documentElement.scrollWidth > window.innerWidth);- assert.equal(overflow, false, `${name}/${phase} horizontal overflow`);- const capture = `${name}-${phase}.png`;- await page.screenshot({ path: path.join(output, capture), fullPage: true });- result.captures.push({ file: capture, sha256: hash(fs.readFileSync(path.join(output, capture))) });- record.phases.push({ phase, active: active.length, overflow });- }- assert.deepEqual(record.errors, []);- result.cases.push(record);- await browser.close();- browser = undefined;- }- result.result = 'passed';-})().catch((error) => {- result.result = 'failed';- result.error = String(error.stack || error);- process.exitCode = 1;-}).finally(async () => {- if (browser) await browser.close();- result.cleanup.browser = true;- if (server) await new Promise((resolve) => server.close(resolve));- result.cleanup.server = true;- fs.writeFileSync(path.join(output, 'result.json'), JSON.stringify(result, null, 2) + '\n');-});diff --git a/scripts/check-thresholds-windowed-list.cjs b/scripts/check-thresholds-windowed-list.cjsdeleted file mode 100644index 26775c20bc..0000000000--- a/scripts/check-thresholds-windowed-list.cjs+++ /dev/null@@ -1,131 +0,0 @@-// Offline real-browser regression for #2130.-//-// Mounts the production Alert Thresholds card list (two Proxmox hosts, 30-// guests, the leading item being a short group header) in a fixed-height-// native scroll container. It records the virtual window's spacer heights-// relative to a real card height, then scrolls a little and checks the window-// did not over-advance. Run with:-// pulse-worker-browser scripts/check-thresholds-windowed-list.cjs-const path = require('node:path');-const { chromium } = require('playwright');--// pulse-worker-browser copies this file to /request.cjs and runs it with the-// assigned workspace mounted at /workspace, so resolve from the process cwd.-const ROOT = path.resolve(process.cwd(), 'frontend-modern');--const launchOptions = { headless: true, channel: 'chromium', args: ['--no-sandbox'] };--const readWindow = () =>- (() => {- const anchor = document.querySelector('[data-platform-window-spacer="top"]');- if (!anchor) return null;- const header = anchor.nextElementSibling;- const firstCard = header ? header.nextElementSibling : null;- const bottom = document.querySelector('[data-platform-window-spacer="bottom"]');- return {- topSpacer: parseFloat(anchor.style.height || '0'),- bottomSpacer: bottom ? parseFloat(bottom.style.height || '0') : -1,- headerHeight: header ? header.getBoundingClientRect().height : -1,- cardHeight: firstCard ? firstCard.getBoundingClientRect().height : -1,- scrollHeight: document.getElementById('thresholds-scroll').scrollHeight,- scrollTop: document.getElementById('thresholds-scroll').scrollTop,- };- })();--(async () => {- process.chdir(ROOT);- const { createServer } = await import(- path.join(ROOT, 'node_modules', 'vite', 'dist', 'node', 'index.js')- );- const server = await createServer({- root: ROOT,- configFile: path.join(ROOT, 'vite.config.ts'),- server: { host: '127.0.0.1', port: 5199, strictPort: true },- });- let browser;- const errors = [];- const httpErrors = [];- try {- await server.listen();- browser = await chromium.launch(launchOptions);- const page = await browser.newPage({ viewport: { width: 480, height: 800 } });- page.on('pageerror', (error) => errors.push(error.message));- page.on('console', (message) => {- if (message.type() !== 'error') return;- // A missing static asset is recorded through the response listener; the- // generic browser console line carries no URL and is not a render fault.- if (message.text().includes('Failed to load resource')) return;- errors.push(`console: ${message.text()}`);- });- page.on('response', (response) => {- if (response.status() >= 400) httpErrors.push(`${response.status()} ${response.url()}`);- });-- await page.goto('http://127.0.0.1:5199/browser-tests/thresholds-windowed-list.html');- await page.getByText('gateway01', { exact: true }).first().waitFor({ timeout: 20000 });- await page.waitForSelector('[data-platform-window-spacer="bottom"]');-- const initial = await page.evaluate(readWindow);- if (!initial) throw new Error('window spacers not rendered');- if (!(initial.cardHeight > 80)) {- throw new Error(`card height not measured (${initial.cardHeight})`);- }-- // The estimate must track the real card, not the short group header.- const expectedBottom = 8 * initial.cardHeight;- if (!(initial.bottomSpacer > expectedBottom * 0.6)) {- throw new Error(- `bottom spacer ${initial.bottomSpacer} collapsed below card-scaled ${expectedBottom} ` +- `(header ${initial.headerHeight}, card ${initial.cardHeight})`,- );- }-- // Scrolling 70px must not advance the window past the first group header.- await page.evaluate(() => {- document.getElementById('thresholds-scroll').scrollTop = 70;- });- await page.waitForTimeout(250);- const afterScroll = await page.evaluate(readWindow);- if (!(afterScroll.topSpacer < 1)) {- throw new Error(- `window over-advanced after a 70px scroll: top spacer ${afterScroll.topSpacer}px`,- );- }-- // The last guest must be reachable at the bottom of the list.- await page.evaluate(() => {- const el = document.getElementById('thresholds-scroll');- el.scrollTop = el.scrollHeight;- });- await page.waitForTimeout(250);- await page.getByText('production-vm-14', { exact: true }).first().waitFor({ timeout: 5000 });-- await page.screenshot({ path: path.join(ROOT, 'browser-tests', 'thresholds-narrow.png') });- await page.setViewportSize({ width: 1280, height: 900 });- await page.waitForTimeout(150);- await page.screenshot({ path: path.join(ROOT, 'browser-tests', 'thresholds-wide.png') });-- if (errors.length > 0) throw new Error(`page errors: ${errors.join(' | ')}`);-- console.log(- JSON.stringify(- {- result: 'passed',- initial,- afterScroll,- expectedBottom,- scrollHeight: afterScroll.scrollHeight,- httpErrors,- },- null,- 2,- ),- );- } finally {- if (browser) await browser.close();- await server.close();- }-})().catch((error) => {- console.error('FAILED:', error && error.stack ? error.stack : error);- process.exitCode = 1;-});