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
Replace frontend source-text test pins with lint, guards and tests
rcourtman39bcbf73672a
diff --git a/docs/release-control/v6/internal/subsystems/frontend-primitives.md b/docs/release-control/v6/internal/subsystems/frontend-primitives.mdindex bc9b254354..378f21fbaa 100644--- a/docs/release-control/v6/internal/subsystems/frontend-primitives.md+++ b/docs/release-control/v6/internal/subsystems/frontend-primitives.md@@ -4978,10 +4978,9 @@ production table, router and styles; it does not qualify full-app scrolling.and register the consumer in`frontend-modern/scripts/shared-template-registry.json` instead of addingfeature-local colored panel shells. Compact settings notices must use the- shared `scale="compact"` density and keep proof in both- `frontend-modern/src/components/shared/SharedPrimitives.guardrails.test.ts`- and- `frontend-modern/src/components/Settings/__tests__/settingsArchitecture.test.ts`.+ shared `scale="compact"` density, with the registry entry as proof+ (`frontend-modern/src/components/shared/SharedPrimitives.guardrails.test.ts`+ runs the audit).Connection-editor status, feature-disabled, delete-error, and probe-resultnotices are part of the same settings callout boundary: the editor andcredential slots own the source-specific lifecycle or API meaning, while@@ -6881,6 +6880,11 @@ patterns, while `frontend-modern/scripts/shared-template-audit.mjs` enforcesthat registry. Future repeated-affordance migrations must add or extend aregistry rule as part of the same change that extracts or adopts the sharedprimitive.+Bans on local patterns live in that registry or in+`frontend-modern/eslint.config.js`, not in tests that read component source+with `?raw` or `readFileSync` and assert a string is absent.+`frontend-modern/scripts/source-text-test-audit.mjs` holds each test file's+source-read count to its baseline, and a new test file starts at zero.Button-styled commercial upgrade CTAs are one of those registry-backedtemplates. `frontend-modern/src/components/shared/UpgradeLink.tsx` owns`UpgradeButtonLink`, and the registry requires gated settings, audit, agentdiff --git a/docs/release-control/v6/internal/subsystems/unified-resources.md b/docs/release-control/v6/internal/subsystems/unified-resources.mdindex 33a72abd66..aa9420442d 100644--- a/docs/release-control/v6/internal/subsystems/unified-resources.md+++ b/docs/release-control/v6/internal/subsystems/unified-resources.md@@ -8621,8 +8621,8 @@ now sit on Overview and simply withdraw while the target is absent; the othertab bodies render their own availability notice while their tab isunavailable, so the selection can be retained and recovered withoutmanufacturing a target. The-`ResourceDetailDrawer.history.test.tsx` guard pins the single-resource reset-boundary, and `scripts/check-drawer-tab-retention.cjs` exercises the rendered+`ResourceDetailDrawer.snapshot.test.tsx` render test pins the single-resource+reset boundary, and `scripts/check-drawer-tab-retention.cjs` exercises the rendereddrawer at desktop and narrow widths: selecting Manage, dropping the mergedmetrics target, and restoring it must keep the selection and bring the Overviewcharts back. Its fixture, `browser-tests/pbs-host-history-correlation.tsx`,diff --git a/frontend-modern/eslint.config.js b/frontend-modern/eslint.config.jsindex 6d5b5cb1f5..93294a3166 100644--- a/frontend-modern/eslint.config.js+++ b/frontend-modern/eslint.config.js@@ -1,197 +1,554 @@-import js from "@eslint/js";-import tseslint from "typescript-eslint";-import solid from "eslint-plugin-solid";-import prettier from "eslint-config-prettier";-import globals from "globals";+import js from '@eslint/js';+import tseslint from 'typescript-eslint';+import solid from 'eslint-plugin-solid';+import prettier from 'eslint-config-prettier';+import globals from 'globals';export default tseslint.config(- { ignores: ["dist", "public", "node_modules", "src/api/generated"] },- js.configs.recommended,- ...tseslint.configs.recommended,- {- files: ["**/*.{ts,tsx}"],- languageOptions: {- globals: { ...globals.browser, ...globals.node },- parserOptions: {- sourceType: "module",+ { ignores: ['dist', 'public', 'node_modules', 'src/api/generated'] },+ js.configs.recommended,+ ...tseslint.configs.recommended,+ {+ files: ['**/*.{ts,tsx}'],+ languageOptions: {+ globals: { ...globals.browser, ...globals.node },+ parserOptions: {+ sourceType: 'module',+ },+ },+ plugins: {+ solid,+ },+ rules: {+ ...solid.configs.typescript.rules,+ '@typescript-eslint/no-unused-vars': [+ 'warn',+ {+ argsIgnorePattern: '^_',+ varsIgnorePattern: '^_',+ caughtErrorsIgnorePattern: '^_',+ },+ ],+ '@typescript-eslint/no-unused-expressions': 'off',+ '@typescript-eslint/no-explicit-any': 'off',+ 'no-case-declarations': 'off',+ 'no-useless-escape': 'off',+ 'prefer-const': 'off',+ 'solid/reactivity': 'off',+ 'solid/prefer-for': 'off',+ 'solid/style-prop': 'off',+ 'solid/components-return-once': 'off',+ 'solid/self-closing-comp': 'off',+ },+ },+ // Prevent metric threshold/color duplication in components.+ // Centralized definitions live in src/utils/metricThresholds.ts.+ {+ files: ['src/components/**/*.{ts,tsx}', 'src/pages/**/*.{ts,tsx}'],+ rules: {+ 'no-restricted-syntax': [+ 'error',+ // Metric color/threshold functions — use @/utils/metricThresholds+ {+ selector:+ 'FunctionDeclaration[id.name=/^get(Bar|Usage|Memory|Disk|Cpu|Metric|Threshold)(Color|Colour)/i]',+ message:+ 'Use getMetricColor*/getMetricSeverity from @/utils/metricThresholds instead of defining local metric color functions.',+ },+ {+ selector:+ 'VariableDeclarator[id.name=/^get(Bar|Usage|Memory|Disk|Cpu|Metric|Threshold)(Color|Colour)/i]',+ message:+ 'Use getMetricColor*/getMetricSeverity from @/utils/metricThresholds instead of defining local metric color functions.',+ },+ {+ selector: "VariableDeclarator[id.name='METRIC_THRESHOLDS']",+ message:+ 'Import METRIC_THRESHOLDS from @/utils/metricThresholds instead of redefining it.',+ },+ // Time formatting — use formatRelativeTime from @/utils/format+ {+ selector: 'FunctionDeclaration[id.name=/^format(RelativeTime|TimeAgo)$/i]',+ message:+ 'Use formatRelativeTime from @/utils/format instead of defining local time formatting functions.',+ },+ {+ selector: 'VariableDeclarator[id.name=/^format(RelativeTime|TimeAgo)$/i]',+ message:+ 'Use formatRelativeTime from @/utils/format instead of defining local time formatting functions.',+ },+ // formatPowerOnHours — use @/utils/format+ {+ selector: "FunctionDeclaration[id.name='formatPowerOnHours']",+ message: 'Use formatPowerOnHours from @/utils/format instead of defining it locally.',+ },+ {+ selector: "VariableDeclarator[id.name='formatPowerOnHours']",+ message: 'Use formatPowerOnHours from @/utils/format instead of defining it locally.',+ },+ // estimateTextWidth — use @/utils/format+ {+ selector: "FunctionDeclaration[id.name='estimateTextWidth']",+ message: 'Use estimateTextWidth from @/utils/format instead of defining it locally.',+ },+ {+ selector: "VariableDeclarator[id.name='estimateTextWidth']",+ message: 'Use estimateTextWidth from @/utils/format instead of defining it locally.',+ },+ // formatAnomalyRatio / ANOMALY_SEVERITY_CLASS — use @/utils/format+ {+ selector: "FunctionDeclaration[id.name='formatAnomalyRatio']",+ message: 'Use formatAnomalyRatio from @/utils/format instead of defining it locally.',+ },+ {+ selector: "VariableDeclarator[id.name='formatAnomalyRatio']",+ message: 'Use formatAnomalyRatio from @/utils/format instead of defining it locally.',+ },+ {+ selector: "VariableDeclarator[id.name='ANOMALY_SEVERITY_CLASS']",+ message: 'Import ANOMALY_SEVERITY_CLASS from @/utils/format instead of redefining it.',+ },+ // Canvas DPR setup — use setupCanvasDPR from @/utils/canvasRenderQueue+ {+ selector: 'FunctionDeclaration[id.name=/^setupCanvas(For)?DPR$/i]',+ message:+ 'Use setupCanvasDPR from @/utils/canvasRenderQueue instead of defining it locally.',+ },+ {+ selector: 'VariableDeclarator[id.name=/^setupCanvas(For)?DPR$/i]',+ message:+ 'Use setupCanvasDPR from @/utils/canvasRenderQueue instead of defining it locally.',+ },+ // Tooltip reimplementation — use useTooltip() from @/hooks/useTooltip+ {+ selector:+ "CallExpression[callee.name='createSignal'] > ArrayExpression > Identifier[name=/^(showTooltip|tooltipVisible|tooltipPos|tooltipPosition)$/]",+ message:+ 'Use the useTooltip() hook from @/hooks/useTooltip instead of reimplementing tooltip state.',+ },+ // Block hardcoded legacy colors in favor of semantic design system.+ // Only flags shades (50-200, 700-800) that look wrong in the opposite+ // color mode. Mid-range grays (300-600) are mode-neutral. 900/950 are+ // reserved for intentional terminal/code UIs.+ // dark:/hover:/focus: variants are excluded by the (?:^|\s) anchor.+ {+ selector:+ 'Literal[value=/(?:^|\\s)(?:bg|text|border|ring)-(?:slate|gray|zinc|neutral)-(?:50|100|200|700|800)(?:$|\\s)/]',+ message:+ 'Use semantic design system classes (e.g. bg-surface, text-base-content, border-border) instead of hardcoded tailwind grays. See DESIGN_SYSTEM.md for the token reference.',+ },+ {+ selector:+ 'TemplateElement[value.raw=/(?:^|\\s)(?:bg|text|border|ring)-(?:slate|gray|zinc|neutral)-(?:50|100|200|700|800)(?:$|\\s)/]',+ message:+ 'Use semantic design system classes (e.g. bg-surface, text-base-content, border-border) instead of hardcoded tailwind grays. See DESIGN_SYSTEM.md for the token reference.',+ },+ // Full-viewport shells must use semantic background tokens.+ // Hardcoded Tailwind color scales on min-h-screen wrappers are a recurring+ // source of light/dark mismatches on auth/loading screens.+ {+ selector:+ 'Literal[value=/(?=.*(?:^|\\s)min-h-screen(?:$|\\s))(?=.*(?:^|\\s)bg-(?:white|black|slate-\\d{2,3}|gray-\\d{2,3}|zinc-\\d{2,3}|neutral-\\d{2,3}|stone-\\d{2,3}|red-\\d{2,3}|orange-\\d{2,3}|amber-\\d{2,3}|yellow-\\d{2,3}|lime-\\d{2,3}|green-\\d{2,3}|emerald-\\d{2,3}|teal-\\d{2,3}|cyan-\\d{2,3}|sky-\\d{2,3}|blue-\\d{2,3}|indigo-\\d{2,3}|violet-\\d{2,3}|purple-\\d{2,3}|fuchsia-\\d{2,3}|pink-\\d{2,3}|rose-\\d{2,3})(?:$|\\s))/]',+ message:+ 'Full-screen wrappers (min-h-screen) must use semantic backgrounds (bg-base/bg-surface/bg-surface-alt) instead of hardcoded palette classes.',+ },+ {+ selector:+ 'TemplateElement[value.raw=/(?=.*(?:^|\\s)min-h-screen(?:$|\\s))(?=.*(?:^|\\s)bg-(?:white|black|slate-\\d{2,3}|gray-\\d{2,3}|zinc-\\d{2,3}|neutral-\\d{2,3}|stone-\\d{2,3}|red-\\d{2,3}|orange-\\d{2,3}|amber-\\d{2,3}|yellow-\\d{2,3}|lime-\\d{2,3}|green-\\d{2,3}|emerald-\\d{2,3}|teal-\\d{2,3}|cyan-\\d{2,3}|sky-\\d{2,3}|blue-\\d{2,3}|indigo-\\d{2,3}|violet-\\d{2,3}|purple-\\d{2,3}|fuchsia-\\d{2,3}|pink-\\d{2,3}|rose-\\d{2,3})(?:$|\\s))/]',+ message:+ 'Full-screen wrappers (min-h-screen) must use semantic backgrounds (bg-base/bg-surface/bg-surface-alt) instead of hardcoded palette classes.',+ },+ // Catch orphaned CSS prefixes (e.g. "hover: " with no utility after it).+ // These produce no CSS output and are always a bug from bad find-replace.+ {+ selector:+ 'Literal[value=/(?:^|\\s)(?:hover|focus|active|dark|group-hover|peer-focus|before|after|lg|md|sm|xl|2xl):\\s/]',+ message:+ "Orphaned CSS prefix detected (e.g. 'hover: ' with nothing after it). This is a broken class string — the utility class is missing.",+ },+ {+ selector:+ 'TemplateElement[value.raw=/(?:^|\\s)(?:hover|focus|active|dark|group-hover|peer-focus|before|after|lg|md|sm|xl|2xl):\\s/]',+ message:+ "Orphaned CSS prefix detected (e.g. 'hover: ' with nothing after it). This is a broken class string — the utility class is missing.",+ },+ // Block dark-mode white backgrounds, which are almost always unreadable.+ {+ selector: 'Literal[value=/(?:^|\\s)dark:(?:hover:)?bg-white(?:$|\\s)/]',+ message:+ 'Avoid dark:bg-white / dark:hover:bg-white. Use semantic surface tokens for dark mode-safe contrast.',+ },+ {+ selector: 'TemplateElement[value.raw=/(?:^|\\s)dark:(?:hover:)?bg-white(?:$|\\s)/]',+ message:+ 'Avoid dark:bg-white / dark:hover:bg-white. Use semantic surface tokens for dark mode-safe contrast.',+ },+ // Prevent low-contrast combinations that caused prior regressions.+ {+ selector:+ 'Literal[value=/(?=.*(?:^|\\s)bg-base(?:$|\\s))(?=.*(?:^|\\s)text-white(?:$|\\s))/]',+ message:+ 'Avoid combining bg-base with text-white. Use semantic pairs like bg-surface + text-base-content or a dedicated accent background.',+ },+ {+ selector:+ 'TemplateElement[value.raw=/(?=.*(?:^|\\s)bg-base(?:$|\\s))(?=.*(?:^|\\s)text-white(?:$|\\s))/]',+ message:+ 'Avoid combining bg-base with text-white. Use semantic pairs like bg-surface + text-base-content or a dedicated accent background.',+ },+ ],+ },+ },+ {+ files: [+ 'src/components/Settings/DiagnosticsPanel.tsx',+ 'src/components/Settings/ReportingPanel.tsx',+ 'src/components/Settings/SystemLogsPanel.tsx',+ ],+ rules: {+ 'no-restricted-imports': [+ 'error',+ {+ paths: [+ {+ name: '@/components/shared/SettingsPanel',+ message:+ 'Use @/components/Settings/OperationsPanel so Operations tab headers remain consistent.',+ },+ ],+ },+ ],+ },+ },+ // Components and features reach the API through @/utils/apiClient so org+ // scoping, auth and retry stay in one place.+ {+ files: ['src/components/**/*.{ts,tsx}', 'src/features/**/*.{ts,tsx}'],+ ignores: ['**/__tests__/**', '**/*.test.{ts,tsx}'],+ rules: {+ 'no-restricted-globals': [+ 'error',+ {+ name: 'fetch',+ message:+ 'Use apiFetch or apiFetchJSON from @/utils/apiClient so org scoping, auth and retry stay in one place.',+ },+ ],+ },+ },+ // Presentational Settings sections receive data and actions from their+ // owning state hook instead of calling the API themselves.+ {+ files: [+ 'src/components/Settings/DiagnosticsResultsPanel.tsx',+ 'src/components/Settings/AgentIntegrationsPanel.tsx',+ 'src/components/Settings/AIModelSelectionSection.tsx',+ 'src/components/Settings/UpdateHistorySection.tsx',+ ],+ rules: {+ 'no-restricted-imports': [+ 'error',+ {+ paths: [+ {+ name: '@/utils/apiClient',+ message:+ 'Presentational Settings sections receive data and actions from their owning state hook; do not call the API client here.',+ },+ ],+ },+ ],+ },+ },+ // API modules read statuses through the responseUtils helpers.+ {+ files: ['src/api/*.ts'],+ ignores: ['src/api/responseUtils.ts', 'src/api/__tests__/**', 'src/api/generated/**'],+ rules: {+ 'no-restricted-syntax': [+ 'error',+ {+ selector:+ "CallExpression[callee.type='MemberExpression'][callee.property.name='includes'][arguments.0.value=/^40[24]$/]",+ message:+ "Do not infer 402/404 from error text. Use isAPIErrorStatus(error, status) from '@/api/responseUtils'.",+ },+ {+ selector:+ "BinaryExpression[operator=/^[!=]==$/][left.type='MemberExpression'][left.object.name='response'][left.property.name='status'][right.raw=/^(204|404|503)$/]",+ message:+ "Do not branch on response.status 204/404/503. Use isAPIResponseStatus(response, status) from '@/api/responseUtils'.",+ },+ {+ selector:+ "BinaryExpression[operator=/^[!=]==$/][right.type='MemberExpression'][right.object.name='response'][right.property.name='status'][left.raw=/^(204|404|503)$/]",+ message:+ "Do not branch on response.status 204/404/503. Use isAPIResponseStatus(response, status) from '@/api/responseUtils'.",+ },+ ],+ },+ },+ // Governed parsing modules parse through responseUtils.+ {+ files: ['src/api/aiChat.ts', 'src/api/monitoring.ts'],+ rules: {+ 'no-restricted-syntax': [+ 'error',+ {+ selector:+ "CallExpression[callee.type='MemberExpression'][callee.property.name='includes'][arguments.0.value=/^40[24]$/]",+ message:+ "Do not infer 402/404 from error text. Use isAPIErrorStatus(error, status) from '@/api/responseUtils'.",+ },+ {+ selector:+ "BinaryExpression[operator=/^[!=]==$/][left.type='MemberExpression'][left.object.name='response'][left.property.name='status'][right.raw=/^(204|404|503)$/]",+ message:+ "Do not branch on response.status 204/404/503. Use isAPIResponseStatus(response, status) from '@/api/responseUtils'.",+ },+ {+ selector:+ "BinaryExpression[operator=/^[!=]==$/][right.type='MemberExpression'][right.object.name='response'][right.property.name='status'][left.raw=/^(204|404|503)$/]",+ message:+ "Do not branch on response.status 204/404/503. Use isAPIResponseStatus(response, status) from '@/api/responseUtils'.",+ },+ {+ selector:+ "CallExpression[callee.type='MemberExpression'][callee.object.name='response'][callee.property.name='json']",+ message:+ "Parse through parseRequiredAPIResponse / parseOptionalAPIResponse / parseRequiredJSON from '@/api/responseUtils', not response.json().",+ },+ {+ selector:+ "CallExpression[callee.type='MemberExpression'][callee.object.name='JSON'][callee.property.name='parse']",+ message:+ 'Parse through the shared responseUtils parsers (or consumeJSONEventStream for SSE), not JSON.parse().',+ },+ ],+ },+ },+ // Governed collection modules do not invent empty collections.+ {+ files: [+ 'src/api/alerts.ts',+ 'src/api/nodes.ts',+ 'src/api/notifications.ts',+ 'src/api/patrol.ts',+ 'src/api/security.ts',+ ],+ rules: {+ 'no-restricted-syntax': [+ 'error',+ {+ selector:+ "CallExpression[callee.type='MemberExpression'][callee.property.name='includes'][arguments.0.value=/^40[24]$/]",+ message:+ "Do not infer 402/404 from error text. Use isAPIErrorStatus(error, status) from '@/api/responseUtils'.",+ },+ {+ selector:+ "BinaryExpression[operator=/^[!=]==$/][left.type='MemberExpression'][left.object.name='response'][left.property.name='status'][right.raw=/^(204|404|503)$/]",+ message:+ "Do not branch on response.status 204/404/503. Use isAPIResponseStatus(response, status) from '@/api/responseUtils'.",+ },+ {+ selector:+ "BinaryExpression[operator=/^[!=]==$/][right.type='MemberExpression'][right.object.name='response'][right.property.name='status'][left.raw=/^(204|404|503)$/]",+ message:+ "Do not branch on response.status 204/404/503. Use isAPIResponseStatus(response, status) from '@/api/responseUtils'.",+ },+ {+ selector:+ "LogicalExpression[operator=/^(\\|\\||\\?\\?)$/][right.type='ArrayExpression'][right.elements.length=0]",+ message:+ "Do not fall back to [] in a governed API module; it invents absence. Use the shared collection normalizers in '@/api/responseUtils' or fail on an unreadable payload.",+ },+ {+ selector:+ "ConditionalExpression[test.type='CallExpression'][test.callee.object.name='Array'][test.callee.property.name='isArray'][alternate.type='ArrayExpression'][alternate.elements.length=0]",+ message:+ "Do not normalize with Array.isArray(x) ? x : []. Use the shared collection normalizers in '@/api/responseUtils'.",+ },+ ],+ },+ },+ // Modules governed for both parsing and collections.+ {+ files: ['src/api/ai.ts', 'src/api/agentProfiles.ts'],+ rules: {+ 'no-restricted-syntax': [+ 'error',+ {+ selector:+ "CallExpression[callee.type='MemberExpression'][callee.property.name='includes'][arguments.0.value=/^40[24]$/]",+ message:+ "Do not infer 402/404 from error text. Use isAPIErrorStatus(error, status) from '@/api/responseUtils'.",+ },+ {+ selector:+ "BinaryExpression[operator=/^[!=]==$/][left.type='MemberExpression'][left.object.name='response'][left.property.name='status'][right.raw=/^(204|404|503)$/]",+ message:+ "Do not branch on response.status 204/404/503. Use isAPIResponseStatus(response, status) from '@/api/responseUtils'.",+ },+ {+ selector:+ "BinaryExpression[operator=/^[!=]==$/][right.type='MemberExpression'][right.object.name='response'][right.property.name='status'][left.raw=/^(204|404|503)$/]",+ message:+ "Do not branch on response.status 204/404/503. Use isAPIResponseStatus(response, status) from '@/api/responseUtils'.",+ },+ {+ selector:+ "CallExpression[callee.type='MemberExpression'][callee.object.name='response'][callee.property.name='json']",+ message:+ "Parse through parseRequiredAPIResponse / parseOptionalAPIResponse / parseRequiredJSON from '@/api/responseUtils', not response.json().",+ },+ {+ selector:+ "CallExpression[callee.type='MemberExpression'][callee.object.name='JSON'][callee.property.name='parse']",+ message:+ 'Parse through the shared responseUtils parsers (or consumeJSONEventStream for SSE), not JSON.parse().',+ },+ {+ selector:+ "LogicalExpression[operator=/^(\\|\\||\\?\\?)$/][right.type='ArrayExpression'][right.elements.length=0]",+ message:+ "Do not fall back to [] in a governed API module; it invents absence. Use the shared collection normalizers in '@/api/responseUtils' or fail on an unreadable payload.",+ },+ {+ selector:+ "ConditionalExpression[test.type='CallExpression'][test.callee.object.name='Array'][test.callee.property.name='isArray'][alternate.type='ArrayExpression'][alternate.elements.length=0]",+ message:+ "Do not normalize with Array.isArray(x) ? x : []. Use the shared collection normalizers in '@/api/responseUtils'.",+ },+ ],+ },+ },+ // Platform tables use PlatformTableToolbar and createPlatformTableFilterState.+ {+ files: [+ 'src/features/docker/**/*.tsx',+ 'src/features/kubernetes/**/*.tsx',+ 'src/features/truenas/**/*.tsx',+ 'src/features/vmware/**/*.tsx',+ 'src/features/standalone/**/*.tsx',+ 'src/features/proxmox/Proxmox*Table.tsx',+ ],+ rules: {+ 'no-restricted-imports': [+ 'error',+ {+ paths: [+ {+ name: '@/components/shared/SearchInput',+ message:+ 'Platform tables take search from PlatformTableToolbar and createPlatformTableFilterState, not a standalone SearchInput.',+ },+ {+ name: '@/components/shared/FilterButtonGroup',+ message:+ 'Platform tables take filters from PlatformTableToolbar and createPlatformTableFilterState, not a standalone FilterButtonGroup.',},+ ],},- plugins: {- solid,- },- rules: {- ...solid.configs.typescript.rules,- "@typescript-eslint/no-unused-vars": [- "warn",- {- argsIgnorePattern: "^_",- varsIgnorePattern: "^_",- caughtErrorsIgnorePattern: "^_",- },- ],- "@typescript-eslint/no-unused-expressions": "off",- "@typescript-eslint/no-explicit-any": "off",- "no-case-declarations": "off",- "no-useless-escape": "off",- "prefer-const": "off",- "solid/reactivity": "off",- "solid/prefer-for": "off",- "solid/style-prop": "off",- "solid/components-return-once": "off",- "solid/self-closing-comp": "off",+ ],+ },+ },+ // No bespoke search signal in a platform inventory table.+ {+ files: [+ 'src/features/docker/*Table.tsx',+ 'src/features/kubernetes/*Table.tsx',+ 'src/features/truenas/*Table.tsx',+ 'src/features/vmware/*Table.tsx',+ 'src/features/standalone/*Table.tsx',+ ],+ rules: {+ 'no-restricted-syntax': [+ 'error',+ {+ selector:+ "VariableDeclarator[id.type='ArrayPattern'][id.elements.0.name='search'][init.callee.name='createSignal']",+ message:+ 'No bespoke search signal in a platform table. Read search from createPlatformTableFilterState.',},+ ],},- // Prevent metric threshold/color duplication in components.- // Centralized definitions live in src/utils/metricThresholds.ts.- {- files: [- "src/components/**/*.{ts,tsx}",- "src/pages/**/*.{ts,tsx}",- ],- rules: {- "no-restricted-syntax": [- "error",- // Metric color/threshold functions — use @/utils/metricThresholds- {- selector: "FunctionDeclaration[id.name=/^get(Bar|Usage|Memory|Disk|Cpu|Metric|Threshold)(Color|Colour)/i]",- message: "Use getMetricColor*/getMetricSeverity from @/utils/metricThresholds instead of defining local metric color functions.",- },- {- selector: "VariableDeclarator[id.name=/^get(Bar|Usage|Memory|Disk|Cpu|Metric|Threshold)(Color|Colour)/i]",- message: "Use getMetricColor*/getMetricSeverity from @/utils/metricThresholds instead of defining local metric color functions.",- },- {- selector: "VariableDeclarator[id.name='METRIC_THRESHOLDS']",- message: "Import METRIC_THRESHOLDS from @/utils/metricThresholds instead of redefining it.",- },- // Time formatting — use formatRelativeTime from @/utils/format- {- selector: "FunctionDeclaration[id.name=/^format(RelativeTime|TimeAgo)$/i]",- message: "Use formatRelativeTime from @/utils/format instead of defining local time formatting functions.",- },- {- selector: "VariableDeclarator[id.name=/^format(RelativeTime|TimeAgo)$/i]",- message: "Use formatRelativeTime from @/utils/format instead of defining local time formatting functions.",- },- // formatPowerOnHours — use @/utils/format- {- selector: "FunctionDeclaration[id.name='formatPowerOnHours']",- message: "Use formatPowerOnHours from @/utils/format instead of defining it locally.",- },- {- selector: "VariableDeclarator[id.name='formatPowerOnHours']",- message: "Use formatPowerOnHours from @/utils/format instead of defining it locally.",- },- // estimateTextWidth — use @/utils/format- {- selector: "FunctionDeclaration[id.name='estimateTextWidth']",- message: "Use estimateTextWidth from @/utils/format instead of defining it locally.",- },- {- selector: "VariableDeclarator[id.name='estimateTextWidth']",- message: "Use estimateTextWidth from @/utils/format instead of defining it locally.",- },- // formatAnomalyRatio / ANOMALY_SEVERITY_CLASS — use @/utils/format- {- selector: "FunctionDeclaration[id.name='formatAnomalyRatio']",- message: "Use formatAnomalyRatio from @/utils/format instead of defining it locally.",- },- {- selector: "VariableDeclarator[id.name='formatAnomalyRatio']",- message: "Use formatAnomalyRatio from @/utils/format instead of defining it locally.",- },- {- selector: "VariableDeclarator[id.name='ANOMALY_SEVERITY_CLASS']",- message: "Import ANOMALY_SEVERITY_CLASS from @/utils/format instead of redefining it.",- },- // Canvas DPR setup — use setupCanvasDPR from @/utils/canvasRenderQueue- {- selector: "FunctionDeclaration[id.name=/^setupCanvas(For)?DPR$/i]",- message: "Use setupCanvasDPR from @/utils/canvasRenderQueue instead of defining it locally.",- },- {- selector: "VariableDeclarator[id.name=/^setupCanvas(For)?DPR$/i]",- message: "Use setupCanvasDPR from @/utils/canvasRenderQueue instead of defining it locally.",- },- // Tooltip reimplementation — use useTooltip() from @/hooks/useTooltip- {- selector: "CallExpression[callee.name='createSignal'] > ArrayExpression > Identifier[name=/^(showTooltip|tooltipVisible|tooltipPos|tooltipPosition)$/]",- message: "Use the useTooltip() hook from @/hooks/useTooltip instead of reimplementing tooltip state.",- },- // Block hardcoded legacy colors in favor of semantic design system.- // Only flags shades (50-200, 700-800) that look wrong in the opposite- // color mode. Mid-range grays (300-600) are mode-neutral. 900/950 are- // reserved for intentional terminal/code UIs.- // dark:/hover:/focus: variants are excluded by the (?:^|\s) anchor.- {- selector: "Literal[value=/(?:^|\\s)(?:bg|text|border|ring)-(?:slate|gray|zinc|neutral)-(?:50|100|200|700|800)(?:$|\\s)/]",- message: "Use semantic design system classes (e.g. bg-surface, text-base-content, border-border) instead of hardcoded tailwind grays. See DESIGN_SYSTEM.md for the token reference.",- },- {- selector: "TemplateElement[value.raw=/(?:^|\\s)(?:bg|text|border|ring)-(?:slate|gray|zinc|neutral)-(?:50|100|200|700|800)(?:$|\\s)/]",- message: "Use semantic design system classes (e.g. bg-surface, text-base-content, border-border) instead of hardcoded tailwind grays. See DESIGN_SYSTEM.md for the token reference.",- },- // Full-viewport shells must use semantic background tokens.- // Hardcoded Tailwind color scales on min-h-screen wrappers are a recurring- // source of light/dark mismatches on auth/loading screens.- {- selector: "Literal[value=/(?=.*(?:^|\\s)min-h-screen(?:$|\\s))(?=.*(?:^|\\s)bg-(?:white|black|slate-\\d{2,3}|gray-\\d{2,3}|zinc-\\d{2,3}|neutral-\\d{2,3}|stone-\\d{2,3}|red-\\d{2,3}|orange-\\d{2,3}|amber-\\d{2,3}|yellow-\\d{2,3}|lime-\\d{2,3}|green-\\d{2,3}|emerald-\\d{2,3}|teal-\\d{2,3}|cyan-\\d{2,3}|sky-\\d{2,3}|blue-\\d{2,3}|indigo-\\d{2,3}|violet-\\d{2,3}|purple-\\d{2,3}|fuchsia-\\d{2,3}|pink-\\d{2,3}|rose-\\d{2,3})(?:$|\\s))/]",- message: "Full-screen wrappers (min-h-screen) must use semantic backgrounds (bg-base/bg-surface/bg-surface-alt) instead of hardcoded palette classes.",- },- {- selector: "TemplateElement[value.raw=/(?=.*(?:^|\\s)min-h-screen(?:$|\\s))(?=.*(?:^|\\s)bg-(?:white|black|slate-\\d{2,3}|gray-\\d{2,3}|zinc-\\d{2,3}|neutral-\\d{2,3}|stone-\\d{2,3}|red-\\d{2,3}|orange-\\d{2,3}|amber-\\d{2,3}|yellow-\\d{2,3}|lime-\\d{2,3}|green-\\d{2,3}|emerald-\\d{2,3}|teal-\\d{2,3}|cyan-\\d{2,3}|sky-\\d{2,3}|blue-\\d{2,3}|indigo-\\d{2,3}|violet-\\d{2,3}|purple-\\d{2,3}|fuchsia-\\d{2,3}|pink-\\d{2,3}|rose-\\d{2,3})(?:$|\\s))/]",- message: "Full-screen wrappers (min-h-screen) must use semantic backgrounds (bg-base/bg-surface/bg-surface-alt) instead of hardcoded palette classes.",- },- // Catch orphaned CSS prefixes (e.g. "hover: " with no utility after it).- // These produce no CSS output and are always a bug from bad find-replace.- {- selector: "Literal[value=/(?:^|\\s)(?:hover|focus|active|dark|group-hover|peer-focus|before|after|lg|md|sm|xl|2xl):\\s/]",- message: "Orphaned CSS prefix detected (e.g. 'hover: ' with nothing after it). This is a broken class string — the utility class is missing.",- },- {- selector: "TemplateElement[value.raw=/(?:^|\\s)(?:hover|focus|active|dark|group-hover|peer-focus|before|after|lg|md|sm|xl|2xl):\\s/]",- message: "Orphaned CSS prefix detected (e.g. 'hover: ' with nothing after it). This is a broken class string — the utility class is missing.",- },- // Block dark-mode white backgrounds, which are almost always unreadable.- {- selector: "Literal[value=/(?:^|\\s)dark:(?:hover:)?bg-white(?:$|\\s)/]",- message: "Avoid dark:bg-white / dark:hover:bg-white. Use semantic surface tokens for dark mode-safe contrast.",- },- {- selector: "TemplateElement[value.raw=/(?:^|\\s)dark:(?:hover:)?bg-white(?:$|\\s)/]",- message: "Avoid dark:bg-white / dark:hover:bg-white. Use semantic surface tokens for dark mode-safe contrast.",- },- // Prevent low-contrast combinations that caused prior regressions.- {- selector: "Literal[value=/(?=.*(?:^|\\s)bg-base(?:$|\\s))(?=.*(?:^|\\s)text-white(?:$|\\s))/]",- message: "Avoid combining bg-base with text-white. Use semantic pairs like bg-surface + text-base-content or a dedicated accent background.",- },- {- selector: "TemplateElement[value.raw=/(?=.*(?:^|\\s)bg-base(?:$|\\s))(?=.*(?:^|\\s)text-white(?:$|\\s))/]",- message: "Avoid combining bg-base with text-white. Use semantic pairs like bg-surface + text-base-content or a dedicated accent background.",- },- ],+ },+ // Proxmox inline detail drawers render tables through PlatformDetailTable*.+ {+ files: [+ 'src/features/proxmox/ProxmoxMailGatewayDrawer.tsx',+ 'src/features/proxmox/ProxmoxCephClusterDrawer.tsx',+ ],+ rules: {+ 'no-restricted-imports': [+ 'error',+ {+ paths: [+ {+ name: '@/components/shared/SearchInput',+ message:+ 'Platform tables take search from PlatformTableToolbar and createPlatformTableFilterState, not a standalone SearchInput.',+ },+ {+ name: '@/components/shared/FilterButtonGroup',+ message:+ 'Platform tables take filters from PlatformTableToolbar and createPlatformTableFilterState, not a standalone FilterButtonGroup.',+ },+ {+ name: '@/components/shared/Table',+ importNames: ['Table', 'TableHeader', 'TableBody'],+ message:+ 'Inline detail tables use PlatformDetailTable / PlatformDetailTableHeader / PlatformDetailTableBody from sharedPlatformPage.',+ },+ ],+ },+ ],+ 'no-restricted-syntax': [+ 'error',+ {+ selector: 'JSXOpeningElement[name.name=/^(table|thead|tbody)$/]',+ message:+ 'No raw <table>/<thead>/<tbody> in a Proxmox detail drawer. Use PlatformDetailTable* or TechnicalDetailsSection cards.',},+ ],},- {- files: [- "src/components/Settings/DiagnosticsPanel.tsx",- "src/components/Settings/ReportingPanel.tsx",- "src/components/Settings/SystemLogsPanel.tsx",- ],- rules: {- "no-restricted-imports": [- "error",- {- paths: [- {- name: "@/components/shared/SettingsPanel",- message: "Use @/components/Settings/OperationsPanel so Operations tab headers remain consistent.",- },- ],- },- ],+ },+ // TrueNAS Protection keeps search, status and sort out of the URL+ // (storage-recovery forbidden path 9).+ {+ files: ['src/features/truenas/TrueNASProtectionTable.tsx'],+ rules: {+ 'no-restricted-imports': [+ 'error',+ {+ paths: [+ {+ name: '@/components/shared/SearchInput',+ message:+ 'Platform tables take search from PlatformTableToolbar and createPlatformTableFilterState, not a standalone SearchInput.',+ },+ {+ name: '@/components/shared/FilterButtonGroup',+ message:+ 'Platform tables take filters from PlatformTableToolbar and createPlatformTableFilterState, not a standalone FilterButtonGroup.',+ },+ {+ name: '@solidjs/router',+ importNames: ['useSearchParams'],+ message:+ 'TrueNAS Protection keeps its filter and sort state out of the URL. Use createPlatformTableFilterState.',+ },+ ],+ patterns: [+ {+ group: ['@/routing/resourceLinks'],+ message: 'TrueNAS Protection must not build recovery links or URL state.',+ },+ ],},+ ],},- prettier+ },+ prettier,);diff --git a/frontend-modern/scripts/shared-template-registry.json b/frontend-modern/scripts/shared-template-registry.jsonindex 8b99e5185d..f351728e85 100644--- a/frontend-modern/scripts/shared-template-registry.json+++ b/frontend-modern/scripts/shared-template-registry.json@@ -203,20 +203,48 @@"export": "InlineDetailTableRow"},"requiredConsumers": [- { "path": "src/components/Workloads/WorkloadPanel.tsx" },- { "path": "src/features/docker/DockerAlertsTable.tsx" },- { "path": "src/features/docker/DockerHostsTable.tsx" },- { "path": "src/features/docker/DockerNetworksTable.tsx" },- { "path": "src/features/kubernetes/KubernetesAlertsTable.tsx" },- { "path": "src/features/platformPage/PlatformResourceDetailTableRow.tsx" },- { "path": "src/features/proxmox/ProxmoxCephTable.tsx" },- { "path": "src/features/proxmox/ProxmoxCoverageTable.tsx" },- { "path": "src/features/proxmox/ProxmoxNodesTable.tsx" },- { "path": "src/features/truenas/TrueNASAlertsTable.tsx" },- { "path": "src/features/truenas/TrueNASProtectionTable.tsx" },- { "path": "src/features/truenas/TrueNASServicesTable.tsx" },- { "path": "src/features/vmware/VsphereActivityTable.tsx" },- { "path": "src/features/vmware/VsphereAlertsTable.tsx" }+ {+ "path": "src/components/Workloads/WorkloadPanel.tsx"+ },+ {+ "path": "src/features/docker/DockerAlertsTable.tsx"+ },+ {+ "path": "src/features/docker/DockerHostsTable.tsx"+ },+ {+ "path": "src/features/docker/DockerNetworksTable.tsx"+ },+ {+ "path": "src/features/kubernetes/KubernetesAlertsTable.tsx"+ },+ {+ "path": "src/features/platformPage/PlatformResourceDetailTableRow.tsx"+ },+ {+ "path": "src/features/proxmox/ProxmoxCephTable.tsx"+ },+ {+ "path": "src/features/proxmox/ProxmoxCoverageTable.tsx"+ },+ {+ "path": "src/features/proxmox/ProxmoxNodesTable.tsx"+ },+ {+ "path": "src/features/truenas/TrueNASAlertsTable.tsx"+ },+ {+ "path": "src/features/truenas/TrueNASProtectionTable.tsx"+ },+ {+ "path": "src/features/truenas/TrueNASServicesTable.tsx"+ },+ {+ "path": "src/features/vmware/VsphereActivityTable.tsx"+ },+ {+ "path": "src/features/vmware/VsphereAlertsTable.tsx"+ }],"forbiddenPatterns": [{@@ -245,7 +273,11 @@"path": "src/components/Toast/Toast.tsx","export": "Toast"},- "requiredConsumers": [{ "path": "src/components/Toast/Toast.tsx" }],+ "requiredConsumers": [+ {+ "path": "src/components/Toast/Toast.tsx"+ }+ ],"forbiddenPatterns": [{"path": "src/components/Toast/Toast.tsx",@@ -272,17 +304,39 @@"export": "DetailSection"},"requiredConsumers": [- { "path": "src/components/Infrastructure/ResourceDetailDrawerOverviewTab.tsx" },- { "path": "src/components/Infrastructure/resourceDetailDrawerKubernetesModel.ts" },- { "path": "src/components/Infrastructure/resourceDetailDrawerTrueNASModel.ts" },- { "path": "src/components/Infrastructure/resourceDetailDrawerVmwareModel.ts" },- { "path": "src/features/docker/DockerAlertsTable.tsx" },- { "path": "src/features/kubernetes/KubernetesAlertsTable.tsx" },- { "path": "src/features/truenas/TrueNASAlertsTable.tsx" },- { "path": "src/features/truenas/TrueNASProtectionTable.tsx" },- { "path": "src/features/truenas/TrueNASServicesTable.tsx" },- { "path": "src/features/vmware/VsphereActivityTable.tsx" },- { "path": "src/features/vmware/VsphereAlertsTable.tsx" }+ {+ "path": "src/components/Infrastructure/ResourceDetailDrawerOverviewTab.tsx"+ },+ {+ "path": "src/components/Infrastructure/resourceDetailDrawerKubernetesModel.ts"+ },+ {+ "path": "src/components/Infrastructure/resourceDetailDrawerTrueNASModel.ts"+ },+ {+ "path": "src/components/Infrastructure/resourceDetailDrawerVmwareModel.ts"+ },+ {+ "path": "src/features/docker/DockerAlertsTable.tsx"+ },+ {+ "path": "src/features/kubernetes/KubernetesAlertsTable.tsx"+ },+ {+ "path": "src/features/truenas/TrueNASAlertsTable.tsx"+ },+ {+ "path": "src/features/truenas/TrueNASProtectionTable.tsx"+ },+ {+ "path": "src/features/truenas/TrueNASServicesTable.tsx"+ },+ {+ "path": "src/features/vmware/VsphereActivityTable.tsx"+ },+ {+ "path": "src/features/vmware/VsphereAlertsTable.tsx"+ }],"forbiddenPatterns": [{@@ -334,12 +388,24 @@"export": "ObjectDrawerHeader"},"requiredConsumers": [- { "path": "src/components/Infrastructure/ResourceDetailDrawer.tsx" },- { "path": "src/components/Workloads/GuestDrawer.tsx" },- { "path": "src/components/Workloads/NodeDrawer.tsx" },- { "path": "src/components/shared/DetailSectionTable.tsx" },- { "path": "src/features/docker/DockerHostDrawer.tsx" },- { "path": "src/features/proxmox/ProxmoxCephClusterDrawer.tsx" }+ {+ "path": "src/components/Infrastructure/ResourceDetailDrawer.tsx"+ },+ {+ "path": "src/components/Workloads/GuestDrawer.tsx"+ },+ {+ "path": "src/components/Workloads/NodeDrawer.tsx"+ },+ {+ "path": "src/components/shared/DetailSectionTable.tsx"+ },+ {+ "path": "src/features/docker/DockerHostDrawer.tsx"+ },+ {+ "path": "src/features/proxmox/ProxmoxCephClusterDrawer.tsx"+ }],"forbiddenPatterns": [],"proof": [@@ -357,9 +423,15 @@"export": "formatDetailBytesValue"},"requiredConsumers": [- { "path": "src/components/Infrastructure/resourceDetailDrawerKubernetesModel.ts" },- { "path": "src/components/Infrastructure/resourceDetailDrawerTrueNASModel.ts" },- { "path": "src/components/Infrastructure/resourceDetailDrawerVmwareModel.ts" }+ {+ "path": "src/components/Infrastructure/resourceDetailDrawerKubernetesModel.ts"+ },+ {+ "path": "src/components/Infrastructure/resourceDetailDrawerTrueNASModel.ts"+ },+ {+ "path": "src/components/Infrastructure/resourceDetailDrawerVmwareModel.ts"+ }],"forbiddenPatterns": [{@@ -399,11 +471,21 @@"export": "TableCard"},"requiredConsumers": [- { "path": "src/components/Storage/StorageContentCard.tsx" },- { "path": "src/components/Workloads/WorkloadsSurface.tsx" },- { "path": "src/components/Workloads/WorkloadsTable.tsx" },- { "path": "src/features/alerts/AlertHistoryTableSection.tsx" },- { "path": "src/features/platformPage/sharedPlatformPage.tsx" }+ {+ "path": "src/components/Storage/StorageContentCard.tsx"+ },+ {+ "path": "src/components/Workloads/WorkloadsSurface.tsx"+ },+ {+ "path": "src/components/Workloads/WorkloadsTable.tsx"+ },+ {+ "path": "src/features/alerts/AlertHistoryTableSection.tsx"+ },+ {+ "path": "src/features/platformPage/sharedPlatformPage.tsx"+ }],"proof": ["src/components/shared/SharedPrimitives.guardrails.test.ts",@@ -419,8 +501,12 @@"export": "TableCardHeader"},"requiredConsumers": [- { "path": "src/components/Storage/StorageContentCard.tsx" },- { "path": "src/features/platformPage/sharedPlatformPage.tsx" }+ {+ "path": "src/components/Storage/StorageContentCard.tsx"+ },+ {+ "path": "src/features/platformPage/sharedPlatformPage.tsx"+ }],"proof": ["src/components/shared/SharedPrimitives.guardrails.test.ts",@@ -436,19 +522,45 @@"export": "InfoCardFrame"},"requiredConsumers": [- { "path": "src/components/Infrastructure/AvailabilityProbeStatusCard.tsx" },- { "path": "src/components/Infrastructure/ResourceActionHistory.tsx" },- { "path": "src/components/Infrastructure/ResourceDetailDrawerOverviewTab.tsx" },- { "path": "src/components/shared/WebInterfaceUrlField.tsx" },- { "path": "src/components/shared/cards/DisksCard.tsx" },- { "path": "src/components/shared/cards/HardwareCard.tsx" },- { "path": "src/components/shared/cards/NetworkInterfacesCard.tsx" },- { "path": "src/components/shared/cards/RaidCard.tsx" },- { "path": "src/components/shared/cards/RootDiskCard.tsx" },- { "path": "src/components/shared/cards/SystemInfoCard.tsx" },- { "path": "src/components/shared/cards/TemperaturesCard.tsx" },- { "path": "src/components/Workloads/DrawerDiskListCard.tsx" },- { "path": "src/features/docker/DockerHostDrawerOverview.tsx" }+ {+ "path": "src/components/Infrastructure/AvailabilityProbeStatusCard.tsx"+ },+ {+ "path": "src/components/Infrastructure/ResourceActionHistory.tsx"+ },+ {+ "path": "src/components/Infrastructure/ResourceDetailDrawerOverviewTab.tsx"+ },+ {+ "path": "src/components/shared/WebInterfaceUrlField.tsx"+ },+ {+ "path": "src/components/shared/cards/DisksCard.tsx"+ },+ {+ "path": "src/components/shared/cards/HardwareCard.tsx"+ },+ {+ "path": "src/components/shared/cards/NetworkInterfacesCard.tsx"+ },+ {+ "path": "src/components/shared/cards/RaidCard.tsx"+ },+ {+ "path": "src/components/shared/cards/RootDiskCard.tsx"+ },+ {+ "path": "src/components/shared/cards/SystemInfoCard.tsx"+ },+ {+ "path": "src/components/shared/cards/TemperaturesCard.tsx"+ },+ {+ "path": "src/components/Workloads/DrawerDiskListCard.tsx"+ },+ {+ "path": "src/features/docker/DockerHostDrawerOverview.tsx"+ }],"proof": ["src/components/shared/SharedPrimitives.guardrails.test.ts",@@ -465,8 +577,12 @@"export": "CalloutCard"},"requiredConsumers": [- { "path": "src/components/Settings/AIProviderConfigurationSection.tsx" },- { "path": "src/components/Settings/ConnectionEditor/AddressProbeStep.tsx" },+ {+ "path": "src/components/Settings/AIProviderConfigurationSection.tsx"+ },+ {+ "path": "src/components/Settings/ConnectionEditor/AddressProbeStep.tsx"+ },{"path": "src/components/Settings/ConnectionEditor/CredentialSlots/AvailabilityTargetSlot.tsx"},@@ -476,12 +592,24 @@{"path": "src/components/Settings/ConnectionEditor/CredentialSlots/VMwareCredentialSlot.tsx"},- { "path": "src/components/Settings/DiagnosticsResultsPanel.tsx" },- { "path": "src/components/Settings/DiscoverySettingsForm.tsx" },- { "path": "src/components/Settings/MonitoredSystemImpactPreview.tsx" },- { "path": "src/components/Settings/ReportingPanel.tsx" },- { "path": "src/components/Settings/SecurityAuthPanel.tsx" },- { "path": "src/components/Settings/SecurityOverviewPanel.tsx" }+ {+ "path": "src/components/Settings/DiagnosticsResultsPanel.tsx"+ },+ {+ "path": "src/components/Settings/DiscoverySettingsForm.tsx"+ },+ {+ "path": "src/components/Settings/MonitoredSystemImpactPreview.tsx"+ },+ {+ "path": "src/components/Settings/ReportingPanel.tsx"+ },+ {+ "path": "src/components/Settings/SecurityAuthPanel.tsx"+ },+ {+ "path": "src/components/Settings/SecurityOverviewPanel.tsx"+ }],"forbiddenPatterns": [{@@ -549,7 +677,11 @@"path": "src/components/shared/CalloutCard.tsx","export": "CalloutCard"},- "requiredConsumers": [{ "path": "src/components/ErrorBoundary.tsx" }],+ "requiredConsumers": [+ {+ "path": "src/components/ErrorBoundary.tsx"+ }+ ],"forbiddenPatterns": [{"path": "src/components/ErrorBoundary.tsx",@@ -576,8 +708,12 @@"export": "CalloutCard"},"requiredConsumers": [- { "path": "src/components/UpdateConfirmationModal.tsx" },- { "path": "src/components/UpdateProgressModal.tsx" }+ {+ "path": "src/components/UpdateConfirmationModal.tsx"+ },+ {+ "path": "src/components/UpdateProgressModal.tsx"+ }],"forbiddenPatterns": [{@@ -618,8 +754,12 @@"export": "InlineNotice"},"requiredConsumers": [- { "path": "src/features/platformPage/PlatformOutdatedAgentNotice.tsx" },- { "path": "src/features/platformPage/PlatformOutdatedSensorSetupNotice.tsx" }+ {+ "path": "src/features/platformPage/PlatformOutdatedAgentNotice.tsx"+ },+ {+ "path": "src/features/platformPage/PlatformOutdatedSensorSetupNotice.tsx"+ }],"forbiddenPatterns": [{@@ -651,7 +791,11 @@"path": "src/components/shared/InlineNotice.tsx","export": "InlineNotice"},- "requiredConsumers": [{ "path": "src/components/DemoBanner.tsx" }],+ "requiredConsumers": [+ {+ "path": "src/components/DemoBanner.tsx"+ }+ ],"forbiddenPatterns": [{"path": "src/components/DemoBanner.tsx",@@ -678,7 +822,11 @@"path": "src/components/shared/InlineNotice.tsx","export": "InlineNotice"},- "requiredConsumers": [{ "path": "src/components/CommercialMigrationBanner.tsx" }],+ "requiredConsumers": [+ {+ "path": "src/components/CommercialMigrationBanner.tsx"+ }+ ],"forbiddenPatterns": [{"path": "src/components/CommercialMigrationBanner.tsx",@@ -708,7 +856,11 @@"path": "src/components/shared/Button.tsx","export": "Button"},- "requiredConsumers": [{ "path": "src/components/GitHubStarBanner.tsx" }],+ "requiredConsumers": [+ {+ "path": "src/components/GitHubStarBanner.tsx"+ }+ ],"forbiddenPatterns": [{"path": "src/components/GitHubStarBanner.tsx",@@ -734,7 +886,11 @@"path": "src/components/shared/Button.tsx","export": "Button"},- "requiredConsumers": [{ "path": "src/components/Settings/SSOProvidersPanel.tsx" }],+ "requiredConsumers": [+ {+ "path": "src/components/Settings/SSOProvidersPanel.tsx"+ }+ ],"forbiddenPatterns": [{"path": "src/components/Settings/SSOProvidersPanel.tsx",@@ -763,15 +919,33 @@"export": "StatusDot"},"requiredConsumers": [- { "path": "src/components/shared/StatusIndicatorBadge.tsx" },- { "path": "src/components/Settings/ResourcePicker.tsx" },- { "path": "src/components/Storage/StoragePoolDetail.tsx" },- { "path": "src/components/shared/NodeGroupHeader.tsx" },- { "path": "src/features/alerts/AlertOverviewStatsCards.tsx" },- { "path": "src/features/docker/DockerHostsTable.tsx" },- { "path": "src/features/kubernetes/KubernetesNodesTable.tsx" },- { "path": "src/features/truenas/TrueNASSystemsTable.tsx" },- { "path": "src/features/vmware/VsphereHostsTable.tsx" }+ {+ "path": "src/components/shared/StatusIndicatorBadge.tsx"+ },+ {+ "path": "src/components/Settings/ResourcePicker.tsx"+ },+ {+ "path": "src/components/Storage/StoragePoolDetail.tsx"+ },+ {+ "path": "src/components/shared/NodeGroupHeader.tsx"+ },+ {+ "path": "src/features/alerts/AlertOverviewStatsCards.tsx"+ },+ {+ "path": "src/features/docker/DockerHostsTable.tsx"+ },+ {+ "path": "src/features/kubernetes/KubernetesNodesTable.tsx"+ },+ {+ "path": "src/features/truenas/TrueNASSystemsTable.tsx"+ },+ {+ "path": "src/features/vmware/VsphereHostsTable.tsx"+ }],"proof": ["src/components/shared/SharedPrimitives.guardrails.test.ts",@@ -788,26 +962,66 @@"export": "LoadingSpinner"},"requiredConsumers": [- { "path": "src/components/AI/FindingsPanel.tsx" },- { "path": "src/components/Login.tsx" },- { "path": "src/components/Settings/AISettings.tsx" },- { "path": "src/components/Settings/AISettingsDialogs.tsx" },- { "path": "src/components/Settings/APITokenManager.tsx" },- { "path": "src/components/Settings/AgentProfilesPanel.tsx" },- { "path": "src/components/Settings/RolesPanel.tsx" },- { "path": "src/components/Settings/SSOProvidersPanel.tsx" },- { "path": "src/components/Settings/UpdateInstallGuide.tsx" },- { "path": "src/components/Settings/UpdatesSettingsPanel.tsx" },- { "path": "src/components/Settings/UserAssignmentsDialog.tsx" },- { "path": "src/components/Settings/UserAssignmentsPanel.tsx" },- { "path": "src/components/UpdateProgressModal.tsx" },- { "path": "src/components/shared/Button.tsx" },- { "path": "src/components/shared/HistoryChartOverlay.tsx" },- { "path": "src/components/shared/PulseDataGrid.tsx" },- { "path": "src/components/patrol/ApprovalSection.tsx" },- { "path": "src/components/patrol/InvestigationMessages.tsx" },- { "path": "src/components/patrol/InvestigationSection.tsx" },- { "path": "src/components/patrol/RunToolCallTrace.tsx" }+ {+ "path": "src/components/AI/FindingsPanel.tsx"+ },+ {+ "path": "src/components/Login.tsx"+ },+ {+ "path": "src/components/Settings/AISettings.tsx"+ },+ {+ "path": "src/components/Settings/AISettingsDialogs.tsx"+ },+ {+ "path": "src/components/Settings/APITokenManager.tsx"+ },+ {+ "path": "src/components/Settings/AgentProfilesPanel.tsx"+ },+ {+ "path": "src/components/Settings/RolesPanel.tsx"+ },+ {+ "path": "src/components/Settings/SSOProvidersPanel.tsx"+ },+ {+ "path": "src/components/Settings/UpdateInstallGuide.tsx"+ },+ {+ "path": "src/components/Settings/UpdatesSettingsPanel.tsx"+ },+ {+ "path": "src/components/Settings/UserAssignmentsDialog.tsx"+ },+ {+ "path": "src/components/Settings/UserAssignmentsPanel.tsx"+ },+ {+ "path": "src/components/UpdateProgressModal.tsx"+ },+ {+ "path": "src/components/shared/Button.tsx"+ },+ {+ "path": "src/components/shared/HistoryChartOverlay.tsx"+ },+ {+ "path": "src/components/shared/PulseDataGrid.tsx"+ },+ {+ "path": "src/components/patrol/ApprovalSection.tsx"+ },+ {+ "path": "src/components/patrol/InvestigationMessages.tsx"+ },+ {+ "path": "src/components/patrol/InvestigationSection.tsx"+ },+ {+ "path": "src/components/patrol/RunToolCallTrace.tsx"+ }],"forbiddenPatterns": [{@@ -945,12 +1159,24 @@"export": "SettingsLoadingSkeleton"},"requiredConsumers": [- { "path": "src/components/Settings/DataHandlingPanel.tsx" },- { "path": "src/components/Settings/OrganizationAccessLoadingState.tsx" },- { "path": "src/components/Settings/OrganizationBillingLoadingState.tsx" },- { "path": "src/components/Settings/OrganizationOverviewLoadingState.tsx" },- { "path": "src/components/Settings/OrganizationSharingLoadingState.tsx" },- { "path": "src/components/Settings/SecurityOverviewPanel.tsx" }+ {+ "path": "src/components/Settings/DataHandlingPanel.tsx"+ },+ {+ "path": "src/components/Settings/OrganizationAccessLoadingState.tsx"+ },+ {+ "path": "src/components/Settings/OrganizationBillingLoadingState.tsx"+ },+ {+ "path": "src/components/Settings/OrganizationOverviewLoadingState.tsx"+ },+ {+ "path": "src/components/Settings/OrganizationSharingLoadingState.tsx"+ },+ {+ "path": "src/components/Settings/SecurityOverviewPanel.tsx"+ }],"forbiddenPatterns": [{@@ -1000,54 +1226,132 @@"export": "Button"},"requiredConsumers": [- { "path": "src/components/patrol/ApprovalBanner.tsx" },- { "path": "src/components/patrol/ApprovalSection.tsx" },- { "path": "src/components/ErrorBoundary.tsx" },- { "path": "src/components/Infrastructure/ResourceDetailDrawerDebugTab.tsx" },- { "path": "src/components/Settings/AgentProfilesPanel.tsx" },- { "path": "src/components/Settings/APIAccessPanel.tsx" },- { "path": "src/components/Settings/AvailabilitySettingsPanel.tsx" },- { "path": "src/components/Settings/BillingAdminPanel.tsx" },- { "path": "src/components/Settings/BillingAdminOrganizationsTable.tsx" },- { "path": "src/components/Settings/ConnectionEditor/AddressProbeStep.tsx" },- { "path": "src/components/Settings/ConnectionEditor/ConnectionEditor.tsx" },{- "path": "src/components/Settings/ConnectionEditor/CredentialSlots/AvailabilityTargetSlot.tsx"+ "path": "src/components/patrol/ApprovalBanner.tsx"+ },+ {+ "path": "src/components/patrol/ApprovalSection.tsx"+ },+ {+ "path": "src/components/ErrorBoundary.tsx"+ },+ {+ "path": "src/components/Infrastructure/ResourceDetailDrawerDebugTab.tsx"+ },+ {+ "path": "src/components/Settings/AgentProfilesPanel.tsx"+ },+ {+ "path": "src/components/Settings/APIAccessPanel.tsx"+ },+ {+ "path": "src/components/Settings/AvailabilitySettingsPanel.tsx"+ },+ {+ "path": "src/components/Settings/BillingAdminPanel.tsx"+ },+ {+ "path": "src/components/Settings/BillingAdminOrganizationsTable.tsx"+ },+ {+ "path": "src/components/Settings/ConnectionEditor/AddressProbeStep.tsx"+ },+ {+ "path": "src/components/Settings/ConnectionEditor/ConnectionEditor.tsx"+ },+ {+ "path": "src/components/Settings/ConnectionEditor/CredentialSlots/AvailabilityTargetSlot.tsx"+ },+ {+ "path": "src/components/Settings/ConnectionEditor/CredentialSlots/TrueNASCredentialSlot.tsx"+ },+ {+ "path": "src/components/Settings/ConnectionEditor/CredentialSlots/VMwareCredentialSlot.tsx"+ },+ {+ "path": "src/components/Settings/CopyCommandBlock.tsx"+ },+ {+ "path": "src/components/Settings/DataHandlingPanel.tsx"+ },+ {+ "path": "src/components/Settings/GeneralSettingsPanel.tsx"+ },+ {+ "path": "src/components/Settings/InfrastructureAgentDoctorPage.tsx"+ },+ {+ "path": "src/components/Settings/InfrastructureDiscoverySettingsDialog.tsx"+ },+ {+ "path": "src/components/Settings/InfrastructureInstallerSection.tsx"+ },+ {+ "path": "src/components/Settings/InfrastructureSourceManager.tsx"+ },+ {+ "path": "src/components/Settings/InfrastructureWorkspace.tsx"+ },+ {+ "path": "src/components/Settings/OrganizationAccessInvitationsSection.tsx"+ },+ {+ "path": "src/components/Settings/OrganizationAccessManagementSection.tsx"+ },+ {+ "path": "src/components/Settings/OrganizationAccessMembersSection.tsx"+ },+ {+ "path": "src/components/Settings/OrganizationIncomingSharesSection.tsx"+ },+ {+ "path": "src/components/Settings/OrganizationOutgoingSharesSection.tsx"+ },+ {+ "path": "src/components/Settings/OrganizationOverviewDetailsSection.tsx"+ },+ {+ "path": "src/components/Settings/OrganizationSharingCreateSection.tsx"+ },+ {+ "path": "src/components/Settings/ProLicensePanel.tsx"+ },+ {+ "path": "src/components/Settings/ProLicensePlanSection.tsx"+ },+ {+ "path": "src/components/Settings/ReportingPanel.tsx"+ },+ {+ "path": "src/components/Settings/ResourcePicker.tsx"+ },+ {+ "path": "src/components/Settings/RolesPanel.tsx"},{- "path": "src/components/Settings/ConnectionEditor/CredentialSlots/TrueNASCredentialSlot.tsx"+ "path": "src/components/Settings/SelfHostedCommercialRecoverySection.tsx"},{- "path": "src/components/Settings/ConnectionEditor/CredentialSlots/VMwareCredentialSlot.tsx"+ "path": "src/components/Settings/SecurityAuthPanel.tsx"+ },+ {+ "path": "src/components/Settings/SSOProvidersPanel.tsx"+ },+ {+ "path": "src/components/Settings/UserAssignmentsPanel.tsx"+ },+ {+ "path": "src/components/UpdateConfirmationModal.tsx"+ },+ {+ "path": "src/components/UpdateProgressModal.tsx"+ },+ {+ "path": "src/features/patrol/PatrolIntelligenceWorkspace.tsx"},- { "path": "src/components/Settings/CopyCommandBlock.tsx" },- { "path": "src/components/Settings/DataHandlingPanel.tsx" },- { "path": "src/components/Settings/GeneralSettingsPanel.tsx" },- { "path": "src/components/Settings/InfrastructureAgentDoctorPage.tsx" },- { "path": "src/components/Settings/InfrastructureDiscoverySettingsDialog.tsx" },- { "path": "src/components/Settings/InfrastructureInstallerSection.tsx" },- { "path": "src/components/Settings/InfrastructureSourceManager.tsx" },- { "path": "src/components/Settings/InfrastructureWorkspace.tsx" },- { "path": "src/components/Settings/OrganizationAccessInvitationsSection.tsx" },- { "path": "src/components/Settings/OrganizationAccessManagementSection.tsx" },- { "path": "src/components/Settings/OrganizationAccessMembersSection.tsx" },- { "path": "src/components/Settings/OrganizationIncomingSharesSection.tsx" },- { "path": "src/components/Settings/OrganizationOutgoingSharesSection.tsx" },- { "path": "src/components/Settings/OrganizationOverviewDetailsSection.tsx" },- { "path": "src/components/Settings/OrganizationSharingCreateSection.tsx" },- { "path": "src/components/Settings/ProLicensePanel.tsx" },- { "path": "src/components/Settings/ProLicensePlanSection.tsx" },- { "path": "src/components/Settings/ReportingPanel.tsx" },- { "path": "src/components/Settings/ResourcePicker.tsx" },- { "path": "src/components/Settings/RolesPanel.tsx" },- { "path": "src/components/Settings/SelfHostedCommercialRecoverySection.tsx" },- { "path": "src/components/Settings/SecurityAuthPanel.tsx" },- { "path": "src/components/Settings/SSOProvidersPanel.tsx" },- { "path": "src/components/Settings/UserAssignmentsPanel.tsx" },- { "path": "src/components/UpdateConfirmationModal.tsx" },- { "path": "src/components/UpdateProgressModal.tsx" },- { "path": "src/features/patrol/PatrolIntelligenceWorkspace.tsx" },- { "path": "src/features/standalone/StandalonePageSurface.tsx" }+ {+ "path": "src/features/standalone/StandalonePageSurface.tsx"+ }],"forbiddenPatterns": [{@@ -1253,13 +1557,27 @@"export": "EmptyState"},"requiredConsumers": [- { "path": "src/components/Settings/AgentProfilesPanel.tsx" },- { "path": "src/components/Settings/AuditWebhookPanel.tsx" },- { "path": "src/components/Settings/AuditLogPanel.tsx" },- { "path": "src/components/Settings/AvailabilitySettingsPanel.tsx" },- { "path": "src/components/Settings/DiagnosticsResultsPanel.tsx" },- { "path": "src/components/patrol/RunHistoryPanel.tsx" },- { "path": "src/components/Settings/SSOProvidersPanel.tsx" }+ {+ "path": "src/components/Settings/AgentProfilesPanel.tsx"+ },+ {+ "path": "src/components/Settings/AuditWebhookPanel.tsx"+ },+ {+ "path": "src/components/Settings/AuditLogPanel.tsx"+ },+ {+ "path": "src/components/Settings/AvailabilitySettingsPanel.tsx"+ },+ {+ "path": "src/components/Settings/DiagnosticsResultsPanel.tsx"+ },+ {+ "path": "src/components/patrol/RunHistoryPanel.tsx"+ },+ {+ "path": "src/components/Settings/SSOProvidersPanel.tsx"+ }],"forbiddenPatterns": [{@@ -1313,13 +1631,27 @@"export": "ActionIconButton"},"requiredConsumers": [- { "path": "src/components/Alerts/AlertResourceTableDesktop.tsx" },- { "path": "src/components/Alerts/AlertResourceTableMobile.tsx" },- { "path": "src/components/Alerts/AlertResourceTableRow.tsx" },- { "path": "src/components/Alerts/ResourceTable.tsx" },- { "path": "src/components/Settings/RolesPanel.tsx" },- { "path": "src/components/Settings/SSOProvidersPanel.tsx" },- { "path": "src/features/standalone/AgentsMachinesTable.tsx" }+ {+ "path": "src/components/Alerts/AlertResourceTableDesktop.tsx"+ },+ {+ "path": "src/components/Alerts/AlertResourceTableMobile.tsx"+ },+ {+ "path": "src/components/Alerts/AlertResourceTableRow.tsx"+ },+ {+ "path": "src/components/Alerts/ResourceTable.tsx"+ },+ {+ "path": "src/components/Settings/RolesPanel.tsx"+ },+ {+ "path": "src/components/Settings/SSOProvidersPanel.tsx"+ },+ {+ "path": "src/features/standalone/AgentsMachinesTable.tsx"+ }],"forbiddenPatterns": [{@@ -1389,9 +1721,15 @@"export": "CopyValueButton"},"requiredConsumers": [- { "path": "src/components/patrol/ToolExecutionBlock.tsx" },- { "path": "src/components/Settings/SSOProvidersPanel.tsx" },- { "path": "src/components/shared/WebInterfaceUrlField.tsx" }+ {+ "path": "src/components/patrol/ToolExecutionBlock.tsx"+ },+ {+ "path": "src/components/Settings/SSOProvidersPanel.tsx"+ },+ {+ "path": "src/components/shared/WebInterfaceUrlField.tsx"+ }],"forbiddenPatterns": [{@@ -1432,10 +1770,18 @@"export": "UpgradeButtonLink"},"requiredConsumers": [- { "path": "src/components/Settings/AgentProfilesPanel.tsx" },- { "path": "src/components/Settings/AuditLogPanel.tsx" },- { "path": "src/components/Settings/ProLicensePlanSection.tsx" },- { "path": "src/components/shared/FeatureGateSection.tsx" }+ {+ "path": "src/components/Settings/AgentProfilesPanel.tsx"+ },+ {+ "path": "src/components/Settings/AuditLogPanel.tsx"+ },+ {+ "path": "src/components/Settings/ProLicensePlanSection.tsx"+ },+ {+ "path": "src/components/shared/FeatureGateSection.tsx"+ }],"forbiddenPatterns": [{@@ -1477,14 +1823,30 @@"export": "ExternalTextLink"},"requiredConsumers": [- { "path": "src/components/Settings/AIProviderConfigurationSection.tsx" },- { "path": "src/components/Settings/AISettingsDialogs.tsx" },- { "path": "src/components/Settings/APITokenManager.tsx" },- { "path": "src/components/Settings/AgentIntegrationsPanel.tsx" },- { "path": "src/components/Settings/BackupTransferDialogs.tsx" },- { "path": "src/components/Settings/GeneralSettingsPanel.tsx" },- { "path": "src/components/Settings/SecurityOverviewPanel.tsx" },- { "path": "src/components/Settings/SelfHostedCommercialRecoverySection.tsx" }+ {+ "path": "src/components/Settings/AIProviderConfigurationSection.tsx"+ },+ {+ "path": "src/components/Settings/AISettingsDialogs.tsx"+ },+ {+ "path": "src/components/Settings/APITokenManager.tsx"+ },+ {+ "path": "src/components/Settings/AgentIntegrationsPanel.tsx"+ },+ {+ "path": "src/components/Settings/BackupTransferDialogs.tsx"+ },+ {+ "path": "src/components/Settings/GeneralSettingsPanel.tsx"+ },+ {+ "path": "src/components/Settings/SecurityOverviewPanel.tsx"+ },+ {+ "path": "src/components/Settings/SelfHostedCommercialRecoverySection.tsx"+ }],"forbiddenPatterns": [{@@ -1535,36 +1897,84 @@"export": "FormSelect"},"requiredConsumers": [- { "path": "src/components/AI/FindingsPanel.tsx" },- { "path": "src/components/Alerts/EmailProviderSelect.tsx" },- { "path": "src/components/Alerts/WebhookConfigForm.tsx" },- { "path": "src/components/Infrastructure/ResourceDetailDrawerOverviewTab.tsx" },- { "path": "src/components/OrgSwitcher.tsx" },- { "path": "src/components/Settings/AIModelSelectionSection.tsx" },- { "path": "src/components/Settings/AgentProfilesPanel.tsx" },- { "path": "src/components/Settings/AuditLogPanel.tsx" },+ {+ "path": "src/components/AI/FindingsPanel.tsx"+ },+ {+ "path": "src/components/Alerts/EmailProviderSelect.tsx"+ },+ {+ "path": "src/components/Alerts/WebhookConfigForm.tsx"+ },+ {+ "path": "src/components/Infrastructure/ResourceDetailDrawerOverviewTab.tsx"+ },+ {+ "path": "src/components/OrgSwitcher.tsx"+ },+ {+ "path": "src/components/Settings/AIModelSelectionSection.tsx"+ },+ {+ "path": "src/components/Settings/AgentProfilesPanel.tsx"+ },+ {+ "path": "src/components/Settings/AuditLogPanel.tsx"+ },{"path": "src/components/Settings/ConnectionEditor/CredentialSlots/AvailabilityTargetSlot.tsx"},{"path": "src/components/Settings/ConnectionEditor/CredentialSlots/TrueNASCredentialSlot.tsx"},- { "path": "src/components/Settings/InfrastructureInstallerSection.tsx" },- { "path": "src/components/Settings/NodeModalMonitoringSection.tsx" },- { "path": "src/components/Settings/OrganizationAccessManagementSection.tsx" },- { "path": "src/components/Settings/OrganizationAccessMembersSection.tsx" },- { "path": "src/components/Settings/OrganizationSharingCreateSection.tsx" },- { "path": "src/components/Settings/RecoverySettingsPanel.tsx" },- { "path": "src/components/Settings/RolesEditorDialog.tsx" },- { "path": "src/components/Settings/SystemLogsPanel.tsx" },- { "path": "src/components/Storage/StoragePageControls.tsx" },- { "path": "src/components/Workloads/GuestDrawerHistory.tsx" },- { "path": "src/components/shared/FilterBar/AddFilterMenu.tsx" },- { "path": "src/components/shared/FilterToolbar.tsx" },- { "path": "src/features/alerts/AlertAppriseDestinationsSection.tsx" },- { "path": "src/features/alerts/AlertDeliveryRoutingSection.tsx" },- { "path": "src/features/alerts/AlertQuietHoursSection.tsx" },- { "path": "src/features/patrol/PatrolAttentionWorkbench.tsx" }+ {+ "path": "src/components/Settings/InfrastructureInstallerSection.tsx"+ },+ {+ "path": "src/components/Settings/NodeModalMonitoringSection.tsx"+ },+ {+ "path": "src/components/Settings/OrganizationAccessManagementSection.tsx"+ },+ {+ "path": "src/components/Settings/OrganizationAccessMembersSection.tsx"+ },+ {+ "path": "src/components/Settings/OrganizationSharingCreateSection.tsx"+ },+ {+ "path": "src/components/Settings/RecoverySettingsPanel.tsx"+ },+ {+ "path": "src/components/Settings/RolesEditorDialog.tsx"+ },+ {+ "path": "src/components/Settings/SystemLogsPanel.tsx"+ },+ {+ "path": "src/components/Storage/StoragePageControls.tsx"+ },+ {+ "path": "src/components/Workloads/GuestDrawerHistory.tsx"+ },+ {+ "path": "src/components/shared/FilterBar/AddFilterMenu.tsx"+ },+ {+ "path": "src/components/shared/FilterToolbar.tsx"+ },+ {+ "path": "src/features/alerts/AlertAppriseDestinationsSection.tsx"+ },+ {+ "path": "src/features/alerts/AlertDeliveryRoutingSection.tsx"+ },+ {+ "path": "src/features/alerts/AlertQuietHoursSection.tsx"+ },+ {+ "path": "src/features/patrol/PatrolAttentionWorkbench.tsx"+ }],"proof": ["src/components/shared/SharedPrimitives.guardrails.test.ts",@@ -1581,17 +1991,39 @@"export": "FormTextarea"},"requiredConsumers": [- { "path": "src/components/Alerts/EmailProviderSelect.tsx" },- { "path": "src/components/Alerts/IncidentTimelinePanel.tsx" },- { "path": "src/components/Alerts/ThresholdsTableDockerIgnoredPrefixesSection.tsx" },- { "path": "src/components/Alerts/WebhookConfigForm.tsx" },- { "path": "src/components/Infrastructure/ReportMergeModal.tsx" },- { "path": "src/components/Settings/AgentProfilesPanel.tsx" },- { "path": "src/components/Settings/SelfHostedCommercialRecoverySection.tsx" },- { "path": "src/components/Settings/SuggestProfileModal.tsx" },- { "path": "src/features/alerts/AlertAppriseDestinationsSection.tsx" },- { "path": "src/features/patrol/PatrolAttentionWorkbench.tsx" },- { "path": "src/features/patrol/PatrolObjectivesPanel.tsx" }+ {+ "path": "src/components/Alerts/EmailProviderSelect.tsx"+ },+ {+ "path": "src/components/Alerts/IncidentTimelinePanel.tsx"+ },+ {+ "path": "src/components/Alerts/ThresholdsTableDockerIgnoredPrefixesSection.tsx"+ },+ {+ "path": "src/components/Alerts/WebhookConfigForm.tsx"+ },+ {+ "path": "src/components/Infrastructure/ReportMergeModal.tsx"+ },+ {+ "path": "src/components/Settings/AgentProfilesPanel.tsx"+ },+ {+ "path": "src/components/Settings/SelfHostedCommercialRecoverySection.tsx"+ },+ {+ "path": "src/components/Settings/SuggestProfileModal.tsx"+ },+ {+ "path": "src/features/alerts/AlertAppriseDestinationsSection.tsx"+ },+ {+ "path": "src/features/patrol/PatrolAttentionWorkbench.tsx"+ },+ {+ "path": "src/features/patrol/PatrolObjectivesPanel.tsx"+ }],"proof": ["src/components/shared/SharedPrimitives.guardrails.test.ts",@@ -1608,29 +2040,75 @@"export": "Toggle"},"requiredConsumers": [- { "path": "src/components/Alerts/AlertResourceTableDesktop.tsx" },- { "path": "src/components/Alerts/AlertResourceTableMobile.tsx" },- { "path": "src/components/Alerts/AlertResourceTableRow.tsx" },- { "path": "src/components/Alerts/ThresholdsTableDockerServiceGapSection.tsx" },- { "path": "src/components/Alerts/ThresholdsTableProxmoxBackupsSection.tsx" },- { "path": "src/components/Infrastructure/ResourceOperatorStateSection.tsx" },- { "path": "src/components/Settings/AISettings.tsx" },- { "path": "src/components/Settings/AuditLogPanel.tsx" },- { "path": "src/components/Settings/DiscoverySettingsForm.tsx" },- { "path": "src/components/Settings/DockerRuntimeSettingsCard.tsx" },- { "path": "src/components/Settings/GeneralSettingsPanel.tsx" },- { "path": "src/components/Settings/NodeModalMonitoringSection.tsx" },- { "path": "src/components/Settings/RelaySettingsPanel.tsx" },- { "path": "src/components/Settings/SSOProvidersPanel.tsx" },- { "path": "src/components/Settings/SecurityAuthPanel.tsx" },- { "path": "src/features/alerts/AlertAppriseDestinationsSection.tsx" },- { "path": "src/features/alerts/AlertCooldownSection.tsx" },- { "path": "src/features/alerts/AlertEmailDestinationsSection.tsx" },- { "path": "src/features/alerts/AlertEscalationSection.tsx" },- { "path": "src/features/alerts/AlertGroupingSection.tsx" },- { "path": "src/features/alerts/AlertQuietHoursSection.tsx" },- { "path": "src/features/alerts/AlertRecoverySection.tsx" },- { "path": "src/features/patrol/PatrolIntelligenceHeader.tsx" }+ {+ "path": "src/components/Alerts/AlertResourceTableDesktop.tsx"+ },+ {+ "path": "src/components/Alerts/AlertResourceTableMobile.tsx"+ },+ {+ "path": "src/components/Alerts/AlertResourceTableRow.tsx"+ },+ {+ "path": "src/components/Alerts/ThresholdsTableDockerServiceGapSection.tsx"+ },+ {+ "path": "src/components/Alerts/ThresholdsTableProxmoxBackupsSection.tsx"+ },+ {+ "path": "src/components/Infrastructure/ResourceOperatorStateSection.tsx"+ },+ {+ "path": "src/components/Settings/AISettings.tsx"+ },+ {+ "path": "src/components/Settings/AuditLogPanel.tsx"+ },+ {+ "path": "src/components/Settings/DiscoverySettingsForm.tsx"+ },+ {+ "path": "src/components/Settings/DockerRuntimeSettingsCard.tsx"+ },+ {+ "path": "src/components/Settings/GeneralSettingsPanel.tsx"+ },+ {+ "path": "src/components/Settings/NodeModalMonitoringSection.tsx"+ },+ {+ "path": "src/components/Settings/RelaySettingsPanel.tsx"+ },+ {+ "path": "src/components/Settings/SSOProvidersPanel.tsx"+ },+ {+ "path": "src/components/Settings/SecurityAuthPanel.tsx"+ },+ {+ "path": "src/features/alerts/AlertAppriseDestinationsSection.tsx"+ },+ {+ "path": "src/features/alerts/AlertCooldownSection.tsx"+ },+ {+ "path": "src/features/alerts/AlertEmailDestinationsSection.tsx"+ },+ {+ "path": "src/features/alerts/AlertEscalationSection.tsx"+ },+ {+ "path": "src/features/alerts/AlertGroupingSection.tsx"+ },+ {+ "path": "src/features/alerts/AlertQuietHoursSection.tsx"+ },+ {+ "path": "src/features/alerts/AlertRecoverySection.tsx"+ },+ {+ "path": "src/features/patrol/PatrolIntelligenceHeader.tsx"+ }],"proof": ["src/components/shared/SharedPrimitives.guardrails.test.ts",@@ -1647,9 +2125,15 @@"export": "StatusIndicatorBadge"},"requiredConsumers": [- { "path": "src/components/Settings/AgentProfilesPanel.tsx" },- { "path": "src/components/Settings/DiagnosticsResultsPanel.tsx" },- { "path": "src/components/patrol/RunHistoryEntry.tsx" }+ {+ "path": "src/components/Settings/AgentProfilesPanel.tsx"+ },+ {+ "path": "src/components/Settings/DiagnosticsResultsPanel.tsx"+ },+ {+ "path": "src/components/patrol/RunHistoryEntry.tsx"+ }],"forbiddenPatterns": [{@@ -1672,10 +2156,18 @@"export": "AlertSeverityBadge"},"requiredConsumers": [- { "path": "src/features/docker/DockerAlertsTable.tsx" },- { "path": "src/features/kubernetes/KubernetesAlertsTable.tsx" },- { "path": "src/features/truenas/TrueNASAlertsTable.tsx" },- { "path": "src/features/vmware/VsphereAlertsTable.tsx" }+ {+ "path": "src/features/docker/DockerAlertsTable.tsx"+ },+ {+ "path": "src/features/kubernetes/KubernetesAlertsTable.tsx"+ },+ {+ "path": "src/features/truenas/TrueNASAlertsTable.tsx"+ },+ {+ "path": "src/features/vmware/VsphereAlertsTable.tsx"+ }],"forbiddenPatterns": [{@@ -1711,10 +2203,18 @@"export": "getPlatformAlertSeverityFilterOptions"},"requiredConsumers": [- { "path": "src/features/docker/DockerAlertsTable.tsx" },- { "path": "src/features/kubernetes/KubernetesAlertsTable.tsx" },- { "path": "src/features/truenas/TrueNASAlertsTable.tsx" },- { "path": "src/features/vmware/VsphereAlertsTable.tsx" }+ {+ "path": "src/features/docker/DockerAlertsTable.tsx"+ },+ {+ "path": "src/features/kubernetes/KubernetesAlertsTable.tsx"+ },+ {+ "path": "src/features/truenas/TrueNASAlertsTable.tsx"+ },+ {+ "path": "src/features/vmware/VsphereAlertsTable.tsx"+ }],"forbiddenPatterns": [{@@ -1764,10 +2264,18 @@"export": "getAlertSeverityDetailTone"},"requiredConsumers": [- { "path": "src/features/docker/DockerAlertsTable.tsx" },- { "path": "src/features/kubernetes/KubernetesAlertsTable.tsx" },- { "path": "src/features/truenas/TrueNASAlertsTable.tsx" },- { "path": "src/features/vmware/VsphereAlertsTable.tsx" }+ {+ "path": "src/features/docker/DockerAlertsTable.tsx"+ },+ {+ "path": "src/features/kubernetes/KubernetesAlertsTable.tsx"+ },+ {+ "path": "src/features/truenas/TrueNASAlertsTable.tsx"+ },+ {+ "path": "src/features/vmware/VsphereAlertsTable.tsx"+ }],"forbiddenPatterns": [{@@ -1802,10 +2310,18 @@"export": "formatPlatformAlertCode"},"requiredConsumers": [- { "path": "src/features/docker/DockerAlertsTable.tsx" },- { "path": "src/features/kubernetes/KubernetesAlertsTable.tsx" },- { "path": "src/features/truenas/TrueNASAlertsTable.tsx" },- { "path": "src/features/vmware/VsphereAlertsTable.tsx" }+ {+ "path": "src/features/docker/DockerAlertsTable.tsx"+ },+ {+ "path": "src/features/kubernetes/KubernetesAlertsTable.tsx"+ },+ {+ "path": "src/features/truenas/TrueNASAlertsTable.tsx"+ },+ {+ "path": "src/features/vmware/VsphereAlertsTable.tsx"+ }],"forbiddenPatterns": [{@@ -1861,15 +2377,33 @@"export": "MetadataBadge"},"requiredConsumers": [- { "path": "src/components/shared/OrganizationBadges.tsx" },- { "path": "src/components/AI/FindingsPanel.tsx" },- { "path": "src/components/patrol/ApprovalSection.tsx" },- { "path": "src/components/patrol/InvestigationSection.tsx" },- { "path": "src/components/patrol/RunHistoryEntry.tsx" },- { "path": "src/components/patrol/RunToolCallTrace.tsx" },- { "path": "src/features/proxmox/proxmoxBackupsTableShared.tsx" },- { "path": "src/features/patrol/PatrolIntelligenceWorkspace.tsx" },- { "path": "src/components/Infrastructure/ResourceDetailSummary.tsx" }+ {+ "path": "src/components/shared/OrganizationBadges.tsx"+ },+ {+ "path": "src/components/AI/FindingsPanel.tsx"+ },+ {+ "path": "src/components/patrol/ApprovalSection.tsx"+ },+ {+ "path": "src/components/patrol/InvestigationSection.tsx"+ },+ {+ "path": "src/components/patrol/RunHistoryEntry.tsx"+ },+ {+ "path": "src/components/patrol/RunToolCallTrace.tsx"+ },+ {+ "path": "src/features/proxmox/proxmoxBackupsTableShared.tsx"+ },+ {+ "path": "src/features/patrol/PatrolIntelligenceWorkspace.tsx"+ },+ {+ "path": "src/components/Infrastructure/ResourceDetailSummary.tsx"+ }],"forbiddenPatterns": [{@@ -1965,11 +2499,21 @@"export": "OrganizationRoleBadge"},"requiredConsumers": [- { "path": "src/components/Settings/OrganizationAccessInvitationsSection.tsx" },- { "path": "src/components/Settings/OrganizationAccessMembersSection.tsx" },- { "path": "src/components/Settings/OrganizationIncomingSharesSection.tsx" },- { "path": "src/components/Settings/OrganizationOutgoingSharesSection.tsx" },- { "path": "src/components/Settings/OrganizationOverviewMembersSection.tsx" }+ {+ "path": "src/components/Settings/OrganizationAccessInvitationsSection.tsx"+ },+ {+ "path": "src/components/Settings/OrganizationAccessMembersSection.tsx"+ },+ {+ "path": "src/components/Settings/OrganizationIncomingSharesSection.tsx"+ },+ {+ "path": "src/components/Settings/OrganizationOutgoingSharesSection.tsx"+ },+ {+ "path": "src/components/Settings/OrganizationOverviewMembersSection.tsx"+ }],"forbiddenPatterns": [{@@ -2008,8 +2552,12 @@"export": "OrganizationShareStatusBadge"},"requiredConsumers": [- { "path": "src/components/Settings/OrganizationIncomingSharesSection.tsx" },- { "path": "src/components/Settings/OrganizationOutgoingSharesSection.tsx" }+ {+ "path": "src/components/Settings/OrganizationIncomingSharesSection.tsx"+ },+ {+ "path": "src/components/Settings/OrganizationOutgoingSharesSection.tsx"+ }],"forbiddenPatterns": [{@@ -2036,9 +2584,15 @@"export": "PlatformDetailTable"},"requiredConsumers": [- { "path": "src/components/Kubernetes/K8sNamespacesDrawer.tsx" },- { "path": "src/features/proxmox/ProxmoxCoverageTable.tsx" },- { "path": "src/features/proxmox/ProxmoxMailGatewayDrawer.tsx" }+ {+ "path": "src/components/Kubernetes/K8sNamespacesDrawer.tsx"+ },+ {+ "path": "src/features/proxmox/ProxmoxCoverageTable.tsx"+ },+ {+ "path": "src/features/proxmox/ProxmoxMailGatewayDrawer.tsx"+ }],"proof": ["src/components/shared/SharedPrimitives.guardrails.test.ts",@@ -2055,15 +2609,33 @@"export": "PlatformTableLoadingState"},"requiredConsumers": [- { "path": "src/features/docker/DockerPageSurface.tsx" },- { "path": "src/features/kubernetes/KubernetesPageSurface.tsx" },- { "path": "src/features/proxmox/ProxmoxBackupsTable.tsx" },- { "path": "src/features/proxmox/ProxmoxPageSurface.tsx" },- { "path": "src/features/proxmox/ProxmoxReplicationTable.tsx" },- { "path": "src/features/standalone/StandalonePageSurface.tsx" },- { "path": "src/features/truenas/TrueNASPageSurface.tsx" },- { "path": "src/features/truenas/TrueNASProtectionTable.tsx" },- { "path": "src/features/vmware/VmwarePageSurface.tsx" }+ {+ "path": "src/features/docker/DockerPageSurface.tsx"+ },+ {+ "path": "src/features/kubernetes/KubernetesPageSurface.tsx"+ },+ {+ "path": "src/features/proxmox/ProxmoxBackupsTable.tsx"+ },+ {+ "path": "src/features/proxmox/ProxmoxPageSurface.tsx"+ },+ {+ "path": "src/features/proxmox/ProxmoxReplicationTable.tsx"+ },+ {+ "path": "src/features/standalone/StandalonePageSurface.tsx"+ },+ {+ "path": "src/features/truenas/TrueNASPageSurface.tsx"+ },+ {+ "path": "src/features/truenas/TrueNASProtectionTable.tsx"+ },+ {+ "path": "src/features/vmware/VmwarePageSurface.tsx"+ }],"proof": ["src/components/shared/SharedPrimitives.guardrails.test.ts",@@ -2080,18 +2652,42 @@"export": "formatPlatformTableTextValue"},"requiredConsumers": [- { "path": "src/features/kubernetes/KubernetesAutoscalingTable.tsx" },- { "path": "src/features/kubernetes/KubernetesClustersTable.tsx" },- { "path": "src/features/kubernetes/KubernetesConfigTable.tsx" },- { "path": "src/features/kubernetes/KubernetesControllersTable.tsx" },- { "path": "src/features/kubernetes/KubernetesDeploymentsTable.tsx" },- { "path": "src/features/kubernetes/KubernetesEventsTable.tsx" },- { "path": "src/features/kubernetes/KubernetesNetworkingTable.tsx" },- { "path": "src/features/kubernetes/KubernetesNodesTable.tsx" },- { "path": "src/features/kubernetes/KubernetesPodsTable.tsx" },- { "path": "src/features/kubernetes/KubernetesPolicyTable.tsx" },- { "path": "src/features/kubernetes/KubernetesServicesTable.tsx" },- { "path": "src/features/kubernetes/KubernetesStorageTable.tsx" }+ {+ "path": "src/features/kubernetes/KubernetesAutoscalingTable.tsx"+ },+ {+ "path": "src/features/kubernetes/KubernetesClustersTable.tsx"+ },+ {+ "path": "src/features/kubernetes/KubernetesConfigTable.tsx"+ },+ {+ "path": "src/features/kubernetes/KubernetesControllersTable.tsx"+ },+ {+ "path": "src/features/kubernetes/KubernetesDeploymentsTable.tsx"+ },+ {+ "path": "src/features/kubernetes/KubernetesEventsTable.tsx"+ },+ {+ "path": "src/features/kubernetes/KubernetesNetworkingTable.tsx"+ },+ {+ "path": "src/features/kubernetes/KubernetesNodesTable.tsx"+ },+ {+ "path": "src/features/kubernetes/KubernetesPodsTable.tsx"+ },+ {+ "path": "src/features/kubernetes/KubernetesPolicyTable.tsx"+ },+ {+ "path": "src/features/kubernetes/KubernetesServicesTable.tsx"+ },+ {+ "path": "src/features/kubernetes/KubernetesStorageTable.tsx"+ }],"forbiddenPatterns": [{@@ -2100,7 +2696,7 @@},{"path": "src/features/kubernetes/KubernetesClustersTable.tsx",- "patterns": ["asTrimmedString(cluster.kubernetes?.context) || '—'"]+ "patterns": ["asTrimmedString(cluster.kubernetes?.context) || '\u2014'"]},{"path": "src/features/kubernetes/KubernetesConfigTable.tsx",@@ -2112,7 +2708,7 @@},{"path": "src/features/kubernetes/KubernetesDeploymentsTable.tsx",- "patterns": ["asTrimmedString(deployment.kubernetes?.namespace) || '—'"]+ "patterns": ["asTrimmedString(deployment.kubernetes?.namespace) || '\u2014'"]},{"path": "src/features/kubernetes/KubernetesEventsTable.tsx",@@ -2124,7 +2720,7 @@},{"path": "src/features/kubernetes/KubernetesNodesTable.tsx",- "patterns": ["asTrimmedString(meta()?.kubeletVersion) || '—'"]+ "patterns": ["asTrimmedString(meta()?.kubeletVersion) || '\u2014'"]},{"path": "src/features/kubernetes/KubernetesPodsTable.tsx",@@ -2158,10 +2754,18 @@"export": "formatPlatformTableTitleCaseValue"},"requiredConsumers": [- { "path": "src/features/truenas/TrueNASAppsTable.tsx" },- { "path": "src/features/truenas/TrueNASNetworkSharesTable.tsx" },- { "path": "src/features/truenas/TrueNASServicesTable.tsx" },- { "path": "src/features/truenas/TrueNASVirtualMachinesTable.tsx" }+ {+ "path": "src/features/truenas/TrueNASAppsTable.tsx"+ },+ {+ "path": "src/features/truenas/TrueNASNetworkSharesTable.tsx"+ },+ {+ "path": "src/features/truenas/TrueNASServicesTable.tsx"+ },+ {+ "path": "src/features/truenas/TrueNASVirtualMachinesTable.tsx"+ }],"forbiddenPatterns": [{@@ -2196,14 +2800,30 @@"export": "summarizePlatformTableValues"},"requiredConsumers": [- { "path": "src/features/kubernetes/KubernetesAutoscalingTable.tsx" },- { "path": "src/features/kubernetes/KubernetesConfigTable.tsx" },- { "path": "src/features/kubernetes/KubernetesNetworkingTable.tsx" },- { "path": "src/features/kubernetes/KubernetesPolicyTable.tsx" },- { "path": "src/features/kubernetes/KubernetesServicesTable.tsx" },- { "path": "src/features/truenas/TrueNASNetworkSharesTable.tsx" },- { "path": "src/features/vmware/VsphereDatastoresTable.tsx" },- { "path": "src/features/vmware/VsphereNetworksTable.tsx" }+ {+ "path": "src/features/kubernetes/KubernetesAutoscalingTable.tsx"+ },+ {+ "path": "src/features/kubernetes/KubernetesConfigTable.tsx"+ },+ {+ "path": "src/features/kubernetes/KubernetesNetworkingTable.tsx"+ },+ {+ "path": "src/features/kubernetes/KubernetesPolicyTable.tsx"+ },+ {+ "path": "src/features/kubernetes/KubernetesServicesTable.tsx"+ },+ {+ "path": "src/features/truenas/TrueNASNetworkSharesTable.tsx"+ },+ {+ "path": "src/features/vmware/VsphereDatastoresTable.tsx"+ },+ {+ "path": "src/features/vmware/VsphereNetworksTable.tsx"+ }],"forbiddenPatterns": [{@@ -2254,14 +2874,30 @@"export": "formatPlatformTableUptimeValue"},"requiredConsumers": [- { "path": "src/features/docker/DockerHostsTable.tsx" },- { "path": "src/features/kubernetes/KubernetesNodesTable.tsx" },- { "path": "src/features/proxmox/ProxmoxMailGatewayDrawer.tsx" },- { "path": "src/features/proxmox/ProxmoxMailGatewayTable.tsx" },- { "path": "src/features/proxmox/ProxmoxNodesTable.tsx" },- { "path": "src/features/standalone/AgentsMachinesTable.tsx" },- { "path": "src/features/truenas/TrueNASSystemsTable.tsx" },- { "path": "src/features/vmware/VsphereHostsTable.tsx" }+ {+ "path": "src/features/docker/DockerHostsTable.tsx"+ },+ {+ "path": "src/features/kubernetes/KubernetesNodesTable.tsx"+ },+ {+ "path": "src/features/proxmox/ProxmoxMailGatewayDrawer.tsx"+ },+ {+ "path": "src/features/proxmox/ProxmoxMailGatewayTable.tsx"+ },+ {+ "path": "src/features/proxmox/ProxmoxNodesTable.tsx"+ },+ {+ "path": "src/features/standalone/AgentsMachinesTable.tsx"+ },+ {+ "path": "src/features/truenas/TrueNASSystemsTable.tsx"+ },+ {+ "path": "src/features/vmware/VsphereHostsTable.tsx"+ }],"forbiddenPatterns": [{@@ -2316,18 +2952,42 @@"export": "formatPlatformTableBytesValue"},"requiredConsumers": [- { "path": "src/features/docker/DockerNativeTableShared.tsx" },- { "path": "src/features/docker/DockerStorageUsageTable.tsx" },- { "path": "src/features/kubernetes/KubernetesNodesTable.tsx" },- { "path": "src/features/kubernetes/KubernetesStorageTable.tsx" },- { "path": "src/features/proxmox/ProxmoxBackupServersTable.tsx" },- { "path": "src/features/proxmox/ProxmoxCephTable.tsx" },- { "path": "src/features/proxmox/ProxmoxCoverageTable.tsx" },- { "path": "src/features/proxmox/ProxmoxRecoverableTable.tsx" },- { "path": "src/features/truenas/TrueNASProtectionTable.tsx" },- { "path": "src/features/truenas/TrueNASStorageTopologyTable.tsx" },- { "path": "src/features/truenas/TrueNASSystemsTable.tsx" },- { "path": "src/features/truenas/TrueNASVirtualMachinesTable.tsx" }+ {+ "path": "src/features/docker/DockerNativeTableShared.tsx"+ },+ {+ "path": "src/features/docker/DockerStorageUsageTable.tsx"+ },+ {+ "path": "src/features/kubernetes/KubernetesNodesTable.tsx"+ },+ {+ "path": "src/features/kubernetes/KubernetesStorageTable.tsx"+ },+ {+ "path": "src/features/proxmox/ProxmoxBackupServersTable.tsx"+ },+ {+ "path": "src/features/proxmox/ProxmoxCephTable.tsx"+ },+ {+ "path": "src/features/proxmox/ProxmoxCoverageTable.tsx"+ },+ {+ "path": "src/features/proxmox/ProxmoxRecoverableTable.tsx"+ },+ {+ "path": "src/features/truenas/TrueNASProtectionTable.tsx"+ },+ {+ "path": "src/features/truenas/TrueNASStorageTopologyTable.tsx"+ },+ {+ "path": "src/features/truenas/TrueNASSystemsTable.tsx"+ },+ {+ "path": "src/features/truenas/TrueNASVirtualMachinesTable.tsx"+ }],"forbiddenPatterns": [{@@ -2397,7 +3057,11 @@"path": "src/features/platformPage/sharedPlatformPage.tsx","export": "PlatformTableDateTimeValue"},- "requiredConsumers": [{ "path": "src/features/truenas/TrueNASProtectionTable.tsx" }],+ "requiredConsumers": [+ {+ "path": "src/features/truenas/TrueNASProtectionTable.tsx"+ }+ ],"forbiddenPatterns": [{"path": "src/features/truenas/TrueNASProtectionTable.tsx",@@ -2419,14 +3083,30 @@"export": "PlatformTableRelativeTimeValue"},"requiredConsumers": [- { "path": "src/features/docker/DockerVolumesTable.tsx" },- { "path": "src/features/kubernetes/KubernetesDeploymentsTable.tsx" },- { "path": "src/features/kubernetes/KubernetesEventsTable.tsx" },- { "path": "src/features/proxmox/proxmoxBackupsTableShared.tsx" },- { "path": "src/features/proxmox/ProxmoxReplicationTable.tsx" },- { "path": "src/features/standalone/AvailabilityChecksTable.tsx" },- { "path": "src/features/standalone/AgentsMachinesTable.tsx" },- { "path": "src/features/vmware/VsphereActivityTable.tsx" }+ {+ "path": "src/features/docker/DockerVolumesTable.tsx"+ },+ {+ "path": "src/features/kubernetes/KubernetesDeploymentsTable.tsx"+ },+ {+ "path": "src/features/kubernetes/KubernetesEventsTable.tsx"+ },+ {+ "path": "src/features/proxmox/proxmoxBackupsTableShared.tsx"+ },+ {+ "path": "src/features/proxmox/ProxmoxReplicationTable.tsx"+ },+ {+ "path": "src/features/standalone/AvailabilityChecksTable.tsx"+ },+ {+ "path": "src/features/standalone/AgentsMachinesTable.tsx"+ },+ {+ "path": "src/features/vmware/VsphereActivityTable.tsx"+ }],"forbiddenPatterns": [{@@ -2435,12 +3115,12 @@},{"path": "src/features/kubernetes/KubernetesDeploymentsTable.tsx",- "patterns": ["formatRelativeTime(createdAt, { compact: true, emptyText: '—' })"]+ "patterns": ["formatRelativeTime(createdAt, { compact: true, emptyText: '\u2014' })"]},{"path": "src/features/kubernetes/KubernetesEventsTable.tsx","patterns": [- "formatRelativeTime(observedTimestamp(resource), { compact: true, emptyText: '—' })"+ "formatRelativeTime(observedTimestamp(resource), { compact: true, emptyText: '\u2014' })"]},{@@ -2485,8 +3165,12 @@"export": "PlatformTableDurationValue"},"requiredConsumers": [- { "path": "src/features/proxmox/ProxmoxReplicationTable.tsx" },- { "path": "src/features/standalone/AvailabilityChecksTable.tsx" }+ {+ "path": "src/features/proxmox/ProxmoxReplicationTable.tsx"+ },+ {+ "path": "src/features/standalone/AvailabilityChecksTable.tsx"+ }],"forbiddenPatterns": [{@@ -2513,8 +3197,12 @@"export": "getPlatformTableWeightedColumnWidthStyle"},"requiredConsumers": [- { "path": "src/features/docker/dockerContainerTableModel.ts" },- { "path": "src/features/proxmox/proxmoxHostTableModel.ts" }+ {+ "path": "src/features/docker/dockerContainerTableModel.ts"+ },+ {+ "path": "src/features/proxmox/proxmoxHostTableModel.ts"+ }],"forbiddenPatterns": [{@@ -2541,11 +3229,21 @@"export": "formatPlatformTableIntegerValue"},"requiredConsumers": [- { "path": "src/components/Kubernetes/K8sNamespacesDrawer.tsx" },- { "path": "src/features/proxmox/ProxmoxBackupServersTable.tsx" },- { "path": "src/features/proxmox/ProxmoxMailGatewayDrawer.tsx" },- { "path": "src/features/proxmox/ProxmoxMailGatewayTable.tsx" },- { "path": "src/features/proxmox/proxmoxCephClusterDrawerModel.ts" }+ {+ "path": "src/components/Kubernetes/K8sNamespacesDrawer.tsx"+ },+ {+ "path": "src/features/proxmox/ProxmoxBackupServersTable.tsx"+ },+ {+ "path": "src/features/proxmox/ProxmoxMailGatewayDrawer.tsx"+ },+ {+ "path": "src/features/proxmox/ProxmoxMailGatewayTable.tsx"+ },+ {+ "path": "src/features/proxmox/proxmoxCephClusterDrawerModel.ts"+ }],"forbiddenPatterns": [{@@ -2584,22 +3282,42 @@"export": "PlatformTableNumberValue"},"requiredConsumers": [- { "path": "src/features/docker/DockerNativeTableShared.tsx" },- { "path": "src/features/docker/DockerServicesTable.tsx" },- { "path": "src/features/kubernetes/KubernetesAutoscalingTable.tsx" },- { "path": "src/features/kubernetes/KubernetesControllersTable.tsx" },- { "path": "src/features/kubernetes/KubernetesDeploymentsTable.tsx" },- { "path": "src/features/kubernetes/KubernetesEventsTable.tsx" },- { "path": "src/features/kubernetes/KubernetesPodsTable.tsx" },- { "path": "src/features/proxmox/ProxmoxMailGatewayTable.tsx" },- { "path": "src/features/truenas/TrueNASStorageTopologyTable.tsx" },- { "path": "src/features/truenas/TrueNASSystemsTable.tsx" }+ {+ "path": "src/features/docker/DockerNativeTableShared.tsx"+ },+ {+ "path": "src/features/docker/DockerServicesTable.tsx"+ },+ {+ "path": "src/features/kubernetes/KubernetesAutoscalingTable.tsx"+ },+ {+ "path": "src/features/kubernetes/KubernetesControllersTable.tsx"+ },+ {+ "path": "src/features/kubernetes/KubernetesDeploymentsTable.tsx"+ },+ {+ "path": "src/features/kubernetes/KubernetesEventsTable.tsx"+ },+ {+ "path": "src/features/kubernetes/KubernetesPodsTable.tsx"+ },+ {+ "path": "src/features/proxmox/ProxmoxMailGatewayTable.tsx"+ },+ {+ "path": "src/features/truenas/TrueNASStorageTopologyTable.tsx"+ },+ {+ "path": "src/features/truenas/TrueNASSystemsTable.tsx"+ }],"forbiddenPatterns": [{"path": "src/features/docker/DockerNativeTableShared.tsx","patterns": [- "typeof value === 'number' ? <span class=\"tabular-nums\">{value}</span> : <span>—</span>"+ "typeof value === 'number' ? <span class=\"tabular-nums\">{value}</span> : <span>\u2014</span>"]},{@@ -2610,14 +3328,14 @@"path": "src/features/kubernetes/KubernetesAutoscalingTable.tsx","patterns": ["const numberValue",- "typeof value === 'number' ? <span class=\"tabular-nums\">{value}</span> : <span>—</span>"+ "typeof value === 'number' ? <span class=\"tabular-nums\">{value}</span> : <span>\u2014</span>"]},{"path": "src/features/kubernetes/KubernetesControllersTable.tsx","patterns": ["const numberValue",- "typeof value === 'number' ? <span class=\"tabular-nums\">{value}</span> : <span>—</span>"+ "typeof value === 'number' ? <span class=\"tabular-nums\">{value}</span> : <span>\u2014</span>"]},{@@ -2628,19 +3346,19 @@"path": "src/features/kubernetes/KubernetesEventsTable.tsx","patterns": ["const numberValue",- "typeof value === 'number' ? <span class=\"tabular-nums\">{value}</span> : <span>—</span>"+ "typeof value === 'number' ? <span class=\"tabular-nums\">{value}</span> : <span>\u2014</span>"]},{"path": "src/features/kubernetes/KubernetesPodsTable.tsx","patterns": ["const numericValue",- "typeof value === 'number' ? <span class=\"tabular-nums\">{value}</span> : <span>—</span>"+ "typeof value === 'number' ? <span class=\"tabular-nums\">{value}</span> : <span>\u2014</span>"]},{"path": "src/features/proxmox/ProxmoxMailGatewayTable.tsx",- "patterns": ["const countCell", "value.toLocaleString() : '—'"]+ "patterns": ["const countCell", "value.toLocaleString() : '\u2014'"]},{"path": "src/features/truenas/TrueNASSystemsTable.tsx",@@ -2665,7 +3383,11 @@"path": "src/features/platformPage/sharedPlatformPage.tsx","export": "PlatformTableCountRatioValue"},- "requiredConsumers": [{ "path": "src/features/kubernetes/KubernetesClustersTable.tsx" }],+ "requiredConsumers": [+ {+ "path": "src/features/kubernetes/KubernetesClustersTable.tsx"+ }+ ],"forbiddenPatterns": [{"path": "src/features/kubernetes/KubernetesClustersTable.tsx",@@ -2686,7 +3408,11 @@"path": "src/features/platformPage/sharedPlatformPage.tsx","export": "formatPlatformTableCountRatioValue"},- "requiredConsumers": [{ "path": "src/features/kubernetes/KubernetesNetworkingTable.tsx" }],+ "requiredConsumers": [+ {+ "path": "src/features/kubernetes/KubernetesNetworkingTable.tsx"+ }+ ],"forbiddenPatterns": [{"path": "src/features/kubernetes/KubernetesNetworkingTable.tsx",@@ -2711,12 +3437,24 @@"export": "PlatformTablePercentValue"},"requiredConsumers": [- { "path": "src/features/proxmox/ProxmoxBackupServersTable.tsx" },- { "path": "src/features/proxmox/ProxmoxCephTable.tsx" },- { "path": "src/features/proxmox/ProxmoxMailGatewayDrawer.tsx" },- { "path": "src/features/proxmox/ProxmoxNodesTable.tsx" },- { "path": "src/features/truenas/TrueNASSystemsTable.tsx" },- { "path": "src/features/proxmox/proxmoxCephClusterDrawerModel.ts" }+ {+ "path": "src/features/proxmox/ProxmoxBackupServersTable.tsx"+ },+ {+ "path": "src/features/proxmox/ProxmoxCephTable.tsx"+ },+ {+ "path": "src/features/proxmox/ProxmoxMailGatewayDrawer.tsx"+ },+ {+ "path": "src/features/proxmox/ProxmoxNodesTable.tsx"+ },+ {+ "path": "src/features/truenas/TrueNASSystemsTable.tsx"+ },+ {+ "path": "src/features/proxmox/proxmoxCephClusterDrawerModel.ts"+ }],"forbiddenPatterns": [{@@ -2766,16 +3504,22 @@"export": "PlatformTableTemperatureValue"},"requiredConsumers": [- { "path": "src/features/docker/DockerHostsTable.tsx" },- { "path": "src/features/truenas/TrueNASStorageTopologyTable.tsx" },- { "path": "src/features/truenas/TrueNASSystemsTable.tsx" }+ {+ "path": "src/features/docker/DockerHostsTable.tsx"+ },+ {+ "path": "src/features/truenas/TrueNASStorageTopologyTable.tsx"+ },+ {+ "path": "src/features/truenas/TrueNASSystemsTable.tsx"+ }],"forbiddenPatterns": [{"path": "src/features/docker/DockerHostsTable.tsx","patterns": ["const formatTemperature",- "<span class=\"tabular-nums\">{celsius.toFixed(1)}°C</span>"+ "<span class=\"tabular-nums\">{celsius.toFixed(1)}\u00b0C</span>"]},{@@ -2786,7 +3530,7 @@"path": "src/features/truenas/TrueNASSystemsTable.tsx","patterns": ["const formatTemperature",- "<span class=\"tabular-nums\">{celsius.toFixed(1)}°C</span>"+ "<span class=\"tabular-nums\">{celsius.toFixed(1)}\u00b0C</span>"]}],@@ -2805,16 +3549,36 @@"export": "PlatformTableMetricFallback"},"requiredConsumers": [- { "path": "src/features/docker/DockerContainersTable.tsx" },- { "path": "src/features/docker/DockerHostsTable.tsx" },- { "path": "src/features/kubernetes/KubernetesClustersTable.tsx" },- { "path": "src/features/kubernetes/KubernetesNodesTable.tsx" },- { "path": "src/features/proxmox/ProxmoxNodesTable.tsx" },- { "path": "src/features/standalone/AgentsMachinesTable.tsx" },- { "path": "src/features/truenas/TrueNASAppsTable.tsx" },- { "path": "src/features/truenas/TrueNASSystemsTable.tsx" },- { "path": "src/features/vmware/VsphereDatastoresTable.tsx" },- { "path": "src/features/vmware/VsphereHostsTable.tsx" }+ {+ "path": "src/features/docker/DockerContainersTable.tsx"+ },+ {+ "path": "src/features/docker/DockerHostsTable.tsx"+ },+ {+ "path": "src/features/kubernetes/KubernetesClustersTable.tsx"+ },+ {+ "path": "src/features/kubernetes/KubernetesNodesTable.tsx"+ },+ {+ "path": "src/features/proxmox/ProxmoxNodesTable.tsx"+ },+ {+ "path": "src/features/standalone/AgentsMachinesTable.tsx"+ },+ {+ "path": "src/features/truenas/TrueNASAppsTable.tsx"+ },+ {+ "path": "src/features/truenas/TrueNASSystemsTable.tsx"+ },+ {+ "path": "src/features/vmware/VsphereDatastoresTable.tsx"+ },+ {+ "path": "src/features/vmware/VsphereHostsTable.tsx"+ }],"forbiddenPatterns": [{@@ -2872,7 +3636,11 @@"path": "src/features/platformPage/sharedPlatformPage.tsx","export": "getPlatformTableFiniteMetric"},- "requiredConsumers": [{ "path": "src/features/standalone/agentMachineTableModel.ts" }],+ "requiredConsumers": [+ {+ "path": "src/features/standalone/agentMachineTableModel.ts"+ }+ ],"forbiddenPatterns": [{"path": "src/features/standalone/agentMachineTableModel.ts",@@ -2893,15 +3661,33 @@"export": "PlatformErrorState"},"requiredConsumers": [- { "path": "src/features/docker/DockerPageSurface.tsx" },- { "path": "src/features/kubernetes/KubernetesPageSurface.tsx" },- { "path": "src/features/proxmox/ProxmoxBackupsTable.tsx" },- { "path": "src/features/proxmox/ProxmoxPageSurface.tsx" },- { "path": "src/features/proxmox/ProxmoxReplicationTable.tsx" },- { "path": "src/features/standalone/StandalonePageSurface.tsx" },- { "path": "src/features/truenas/TrueNASPageSurface.tsx" },- { "path": "src/features/truenas/TrueNASProtectionTable.tsx" },- { "path": "src/features/vmware/VmwarePageSurface.tsx" }+ {+ "path": "src/features/docker/DockerPageSurface.tsx"+ },+ {+ "path": "src/features/kubernetes/KubernetesPageSurface.tsx"+ },+ {+ "path": "src/features/proxmox/ProxmoxBackupsTable.tsx"+ },+ {+ "path": "src/features/proxmox/ProxmoxPageSurface.tsx"+ },+ {+ "path": "src/features/proxmox/ProxmoxReplicationTable.tsx"+ },+ {+ "path": "src/features/standalone/StandalonePageSurface.tsx"+ },+ {+ "path": "src/features/truenas/TrueNASPageSurface.tsx"+ },+ {+ "path": "src/features/truenas/TrueNASProtectionTable.tsx"+ },+ {+ "path": "src/features/vmware/VmwarePageSurface.tsx"+ }],"proof": ["src/components/shared/SharedPrimitives.guardrails.test.ts",@@ -2918,12 +3704,24 @@"export": "PlatformSectionTabs"},"requiredConsumers": [- { "path": "src/features/docker/DockerPageSurface.tsx" },- { "path": "src/features/kubernetes/KubernetesPageSurface.tsx" },- { "path": "src/features/proxmox/ProxmoxPageSurface.tsx" },- { "path": "src/features/standalone/StandalonePageSurface.tsx" },- { "path": "src/features/truenas/TrueNASPageSurface.tsx" },- { "path": "src/features/vmware/VmwarePageSurface.tsx" }+ {+ "path": "src/features/docker/DockerPageSurface.tsx"+ },+ {+ "path": "src/features/kubernetes/KubernetesPageSurface.tsx"+ },+ {+ "path": "src/features/proxmox/ProxmoxPageSurface.tsx"+ },+ {+ "path": "src/features/standalone/StandalonePageSurface.tsx"+ },+ {+ "path": "src/features/truenas/TrueNASPageSurface.tsx"+ },+ {+ "path": "src/features/vmware/VmwarePageSurface.tsx"+ }],"proof": ["src/components/shared/SharedPrimitives.guardrails.test.ts",@@ -2940,13 +3738,27 @@"export": "FilterBar"},"requiredConsumers": [- { "path": "src/components/Alerts/ThresholdsTable.tsx" },- { "path": "src/components/Settings/AuditLogPanel.tsx" },- { "path": "src/components/Storage/StoragePageControls.tsx" },- { "path": "src/components/Workloads/WorkloadsFilter.tsx" },- { "path": "src/features/alerts/AlertHistoryFiltersCard.tsx" },- { "path": "src/features/platformPage/sharedPlatformPage.tsx" },- { "path": "src/features/proxmox/ProxmoxBackupsTable.tsx" }+ {+ "path": "src/components/Alerts/ThresholdsTable.tsx"+ },+ {+ "path": "src/components/Settings/AuditLogPanel.tsx"+ },+ {+ "path": "src/components/Storage/StoragePageControls.tsx"+ },+ {+ "path": "src/components/Workloads/WorkloadsFilter.tsx"+ },+ {+ "path": "src/features/alerts/AlertHistoryFiltersCard.tsx"+ },+ {+ "path": "src/features/platformPage/sharedPlatformPage.tsx"+ },+ {+ "path": "src/features/proxmox/ProxmoxBackupsTable.tsx"+ }],"forbiddenPatterns": [{@@ -2994,12 +3806,24 @@"export": "SearchField"},"requiredConsumers": [- { "path": "src/components/Settings/InfrastructureSourcePicker.tsx" },- { "path": "src/components/Settings/ResourcePicker.tsx" },- { "path": "src/components/Settings/UserAssignmentsPanel.tsx" },- { "path": "src/components/shared/AIModelPicker.tsx" },- { "path": "src/components/shared/CommandPaletteModal.tsx" },- { "path": "src/components/shared/SearchInput.tsx" }+ {+ "path": "src/components/Settings/InfrastructureSourcePicker.tsx"+ },+ {+ "path": "src/components/Settings/ResourcePicker.tsx"+ },+ {+ "path": "src/components/Settings/UserAssignmentsPanel.tsx"+ },+ {+ "path": "src/components/shared/AIModelPicker.tsx"+ },+ {+ "path": "src/components/shared/CommandPaletteModal.tsx"+ },+ {+ "path": "src/components/shared/SearchInput.tsx"+ }],"forbiddenPatterns": [{@@ -3022,9 +3846,15 @@"export": "SearchInput"},"requiredConsumers": [- { "path": "src/components/Kubernetes/K8sNamespacesDrawer.tsx" },- { "path": "src/components/Settings/SettingsPageShell.tsx" },- { "path": "src/components/shared/FilterBar/FilterBar.tsx" }+ {+ "path": "src/components/Kubernetes/K8sNamespacesDrawer.tsx"+ },+ {+ "path": "src/components/Settings/SettingsPageShell.tsx"+ },+ {+ "path": "src/components/shared/FilterBar/FilterBar.tsx"+ }],"proof": ["src/components/shared/SharedPrimitives.guardrails.test.ts",@@ -3041,10 +3871,18 @@"export": "FilterButtonGroup"},"requiredConsumers": [- { "path": "src/components/Settings/GeneralSettingsPanel.tsx" },- { "path": "src/components/Settings/ResourcePicker.tsx" },- { "path": "src/components/Settings/ReportingPanel.tsx" },- { "path": "src/features/patrol/PatrolIntelligenceHeader.tsx" }+ {+ "path": "src/components/Settings/GeneralSettingsPanel.tsx"+ },+ {+ "path": "src/components/Settings/ResourcePicker.tsx"+ },+ {+ "path": "src/components/Settings/ReportingPanel.tsx"+ },+ {+ "path": "src/features/patrol/PatrolIntelligenceHeader.tsx"+ }],"forbiddenPatterns": [{@@ -3077,7 +3915,11 @@"path": "src/components/shared/SelectablePillButton.tsx","export": "SelectablePillButton"},- "requiredConsumers": [{ "path": "src/components/Settings/APITokenManager.tsx" }],+ "requiredConsumers": [+ {+ "path": "src/components/Settings/APITokenManager.tsx"+ }+ ],"forbiddenPatterns": [{"path": "src/components/Settings/APITokenManager.tsx",@@ -3104,8 +3946,12 @@"export": "ColumnPicker"},"requiredConsumers": [- { "path": "src/components/Workloads/WorkloadsFilter.tsx" },- { "path": "src/features/standalone/AgentsMachinesTable.tsx" }+ {+ "path": "src/components/Workloads/WorkloadsFilter.tsx"+ },+ {+ "path": "src/features/standalone/AgentsMachinesTable.tsx"+ }],"proof": ["src/components/shared/SharedPrimitives.guardrails.test.ts",@@ -3122,8 +3968,12 @@"export": "SelectionCardGroup"},"requiredConsumers": [- { "path": "src/components/Settings/AISettingsDialogs.tsx" },- { "path": "src/components/Settings/UpdatesSettingsPanel.tsx" }+ {+ "path": "src/components/Settings/AISettingsDialogs.tsx"+ },+ {+ "path": "src/components/Settings/UpdatesSettingsPanel.tsx"+ }],"proof": ["src/components/shared/SharedPrimitives.guardrails.test.ts",@@ -3139,7 +3989,11 @@"path": "src/components/shared/GroupedTableModeSegmentedControl.tsx","export": "GroupedTableModeSegmentedControl"},- "requiredConsumers": [{ "path": "src/components/Workloads/WorkloadsFilter.tsx" }],+ "requiredConsumers": [+ {+ "path": "src/components/Workloads/WorkloadsFilter.tsx"+ }+ ],"proof": ["src/components/shared/SharedPrimitives.guardrails.test.ts","scripts/shared-template-audit.mjs"@@ -3154,8 +4008,12 @@"export": "WorkloadsFilter"},"requiredConsumers": [- { "path": "src/features/proxmox/ProxmoxPageSurface.tsx" },- { "path": "src/features/vmware/VmwarePageSurface.tsx" }+ {+ "path": "src/features/proxmox/ProxmoxPageSurface.tsx"+ },+ {+ "path": "src/features/vmware/VmwarePageSurface.tsx"+ }],"proof": ["src/components/shared/SharedPrimitives.guardrails.test.ts",@@ -3711,7 +4569,7 @@},"scopes": ["src/features/kubernetes"],"extensions": [".tsx"],- "allPatterns": ["const textValue", "asTrimmedString(value) || '—'"],+ "allPatterns": ["const textValue", "asTrimmedString(value) || '\u2014'"],"legacyReason": "Retired migration debt. Kubernetes platform table text cells must use formatPlatformTableTextValue for the shared trimmed-string empty-cell marker.","allowedPaths": [],"ignoredPaths": [],@@ -3932,7 +4790,7 @@},"scopes": ["src/features/docker", "src/features/kubernetes"],"extensions": [".tsx"],- "allPatterns": ["<span class=\"tabular-nums\">{value}</span>", "<span>—</span>"],+ "allPatterns": ["<span class=\"tabular-nums\">{value}</span>", "<span>\u2014</span>"],"legacyReason": "Retired migration debt. Optional numeric platform table cells must use PlatformTableNumberValue for finite-number checks, tabular styling, and empty-cell markers.","allowedPaths": [],"ignoredPaths": [],@@ -3952,7 +4810,7 @@},"scopes": ["src/features/proxmox"],"extensions": [".tsx"],- "allPatterns": ["const countCell", "value.toLocaleString() : '—'"],+ "allPatterns": ["const countCell", "value.toLocaleString() : '\u2014'"],"legacyReason": "Retired migration debt. Locale-formatted count cells must compose PlatformTableNumberValue with a caller-owned format function instead of owning fallback markup locally.","allowedPaths": [],"ignoredPaths": [],@@ -4315,7 +5173,7 @@"extensions": [".tsx"],"allPatterns": ["const formatTemperature",- "<span class=\"tabular-nums\">{celsius.toFixed(1)}°C</span>"+ "<span class=\"tabular-nums\">{celsius.toFixed(1)}\u00b0C</span>"],"legacyReason": "Retired migration debt. Positive Celsius table cells must compose PlatformTableTemperatureValue so validity, formatting, tabular styling, and empty markers stay shared.","allowedPaths": [],@@ -6060,6 +6918,246 @@"src/components/shared/Button.test.tsx","scripts/shared-template-audit.mjs"]+ },+ {+ "id": "security-auth-panel-local-amber-action-shell",+ "category": "action-button",+ "summary": "SecurityAuthPanel must not copy the amber outline action shell; use Button.",+ "canonical": {+ "path": "src/components/shared/buttonModel.ts",+ "export": "getButtonClass"+ },+ "scopes": ["src/components/Settings/SecurityAuthPanel.tsx"],+ "extensions": [".tsx"],+ "allPatterns": [+ "w-full sm:w-auto px-3 py-2 text-xs font-medium rounded-md border border-amber-300"+ ],+ "legacyReason": "Retired migration debt. Settings actions compose the shared Button primitive family.",+ "allowedPaths": [],+ "ignoredPaths": [],+ "proof": [+ "src/components/shared/SharedPrimitives.guardrails.test.ts",+ "src/components/shared/Button.test.tsx",+ "scripts/shared-template-audit.mjs"+ ]+ },+ {+ "id": "security-auth-panel-local-primary-action-shell",+ "category": "action-button",+ "summary": "SecurityAuthPanel must not copy the blue primary action shell; use Button with the primary variant.",+ "canonical": {+ "path": "src/components/shared/buttonModel.ts",+ "export": "getButtonClass"+ },+ "scopes": ["src/components/Settings/SecurityAuthPanel.tsx"],+ "extensions": [".tsx"],+ "allPatterns": [+ "w-full sm:w-auto min-h-10 sm:min-h-10 px-4 py-2.5 text-sm font-medium bg-blue-600"+ ],+ "legacyReason": "Retired migration debt. Settings actions compose the shared Button primitive family.",+ "allowedPaths": [],+ "ignoredPaths": [],+ "proof": [+ "src/components/shared/SharedPrimitives.guardrails.test.ts",+ "src/components/shared/Button.test.tsx",+ "scripts/shared-template-audit.mjs"+ ]+ },+ {+ "id": "security-auth-panel-local-secondary-action-shell",+ "category": "action-button",+ "summary": "SecurityAuthPanel must not copy the bordered secondary action shell; use Button.",+ "canonical": {+ "path": "src/components/shared/buttonModel.ts",+ "export": "getButtonClass"+ },+ "scopes": ["src/components/Settings/SecurityAuthPanel.tsx"],+ "extensions": [".tsx"],+ "allPatterns": [+ "w-full sm:w-auto min-h-10 sm:min-h-10 px-4 py-2.5 text-sm font-medium border border-border"+ ],+ "legacyReason": "Retired migration debt. Settings actions compose the shared Button primitive family.",+ "allowedPaths": [],+ "ignoredPaths": [],+ "proof": [+ "src/components/shared/SharedPrimitives.guardrails.test.ts",+ "src/components/shared/Button.test.tsx",+ "scripts/shared-template-audit.mjs"+ ]+ },+ {+ "id": "roles-panel-local-primary-action-shell",+ "category": "action-button",+ "summary": "RolesPanel must not copy the blue primary action shell; use Button with the primary variant.",+ "canonical": {+ "path": "src/components/shared/buttonModel.ts",+ "export": "getButtonClass"+ },+ "scopes": ["src/components/Settings/RolesPanel.tsx"],+ "extensions": [".tsx"],+ "allPatterns": [+ "inline-flex w-full sm:w-auto min-h-10 sm:min-h-9 items-center justify-center gap-2 rounded-md bg-blue-600"+ ],+ "legacyReason": "Retired migration debt. Settings actions compose the shared Button primitive family.",+ "allowedPaths": [],+ "ignoredPaths": [],+ "proof": [+ "src/components/shared/SharedPrimitives.guardrails.test.ts",+ "src/components/shared/Button.test.tsx",+ "scripts/shared-template-audit.mjs"+ ]+ },+ {+ "id": "roles-panel-local-icon-action-shell",+ "category": "action-button",+ "summary": "RolesPanel row icon actions must not recreate the slate icon-button shell; compose ActionIconButton.",+ "canonical": {+ "path": "src/components/shared/Button.tsx",+ "export": "ActionIconButton"+ },+ "scopes": ["src/components/Settings/RolesPanel.tsx"],+ "extensions": [".tsx"],+ "allPatterns": ["p-1.5 rounded-md text-slate-500 hover:text-"],+ "legacyReason": "Retired migration debt. Settings actions compose the shared Button primitive family.",+ "allowedPaths": [],+ "ignoredPaths": [],+ "proof": [+ "src/components/shared/SharedPrimitives.guardrails.test.ts",+ "src/components/shared/Button.test.tsx",+ "scripts/shared-template-audit.mjs"+ ]+ },+ {+ "id": "user-assignments-panel-local-action-shell",+ "category": "action-button",+ "summary": "UserAssignmentsPanel must not copy the inline action shell; use Button.",+ "canonical": {+ "path": "src/components/shared/buttonModel.ts",+ "export": "getButtonClass"+ },+ "scopes": ["src/components/Settings/UserAssignmentsPanel.tsx"],+ "extensions": [".tsx"],+ "allPatterns": ["inline-flex min-h-10 sm:min-h-9 items-center gap-2 px-3 py-1.5 rounded-md"],+ "legacyReason": "Retired migration debt. Settings actions compose the shared Button primitive family.",+ "allowedPaths": [],+ "ignoredPaths": [],+ "proof": [+ "src/components/shared/SharedPrimitives.guardrails.test.ts",+ "src/components/shared/Button.test.tsx",+ "scripts/shared-template-audit.mjs"+ ]+ },+ {+ "id": "button-primary-settings-inline-flex-local-shell",+ "category": "action-button",+ "summary": "Settings surfaces must not copy the inline-flex blue primary action shell; use Button with the primary variant.",+ "canonical": {+ "path": "src/components/shared/buttonModel.ts",+ "export": "getButtonClass"+ },+ "scopes": ["src/components/Settings"],+ "extensions": [".tsx"],+ "allPatterns": ["inline-flex items-center justify-center rounded-md bg-blue-600"],+ "legacyReason": "Retired migration debt. Settings actions compose the shared Button primitive family.",+ "allowedPaths": [],+ "ignoredPaths": [],+ "proof": [+ "src/components/shared/SharedPrimitives.guardrails.test.ts",+ "src/components/shared/Button.test.tsx",+ "scripts/shared-template-audit.mjs"+ ]+ },+ {+ "id": "organization-sections-local-danger-ghost-row-action",+ "category": "action-button",+ "summary": "Organization access and sharing sections must not copy the red ghost row-action shell; use Button with the dangerGhost variant.",+ "canonical": {+ "path": "src/components/shared/buttonModel.ts",+ "export": "getButtonClass"+ },+ "scopes": [+ "src/components/Settings/OrganizationAccessInvitationsSection.tsx",+ "src/components/Settings/OrganizationAccessManagementSection.tsx",+ "src/components/Settings/OrganizationAccessMembersSection.tsx",+ "src/components/Settings/OrganizationIncomingSharesSection.tsx",+ "src/components/Settings/OrganizationOutgoingSharesSection.tsx",+ "src/components/Settings/OrganizationOverviewDetailsSection.tsx",+ "src/components/Settings/OrganizationSharingCreateSection.tsx"+ ],+ "extensions": [".tsx"],+ "allPatterns": ["hover:bg-red-50 dark:text-red-300"],+ "legacyReason": "Retired migration debt. Settings actions compose the shared Button primitive family.",+ "allowedPaths": [],+ "ignoredPaths": [],+ "proof": [+ "src/components/shared/SharedPrimitives.guardrails.test.ts",+ "src/components/shared/Button.test.tsx",+ "scripts/shared-template-audit.mjs"+ ]+ },+ {+ "id": "organization-sections-local-success-ghost-row-action",+ "category": "action-button",+ "summary": "Organization access and sharing sections must not copy the emerald ghost row-action shell; use Button with the successGhost variant.",+ "canonical": {+ "path": "src/components/shared/buttonModel.ts",+ "export": "getButtonClass"+ },+ "scopes": [+ "src/components/Settings/OrganizationAccessInvitationsSection.tsx",+ "src/components/Settings/OrganizationAccessManagementSection.tsx",+ "src/components/Settings/OrganizationAccessMembersSection.tsx",+ "src/components/Settings/OrganizationIncomingSharesSection.tsx",+ "src/components/Settings/OrganizationOutgoingSharesSection.tsx",+ "src/components/Settings/OrganizationOverviewDetailsSection.tsx",+ "src/components/Settings/OrganizationSharingCreateSection.tsx"+ ],+ "extensions": [".tsx"],+ "allPatterns": ["hover:bg-emerald-50 dark:text-emerald-300"],+ "legacyReason": "Retired migration debt. Settings actions compose the shared Button primitive family.",+ "allowedPaths": [],+ "ignoredPaths": [],+ "proof": [+ "src/components/shared/SharedPrimitives.guardrails.test.ts",+ "src/components/shared/Button.test.tsx",+ "scripts/shared-template-audit.mjs"+ ]+ },+ {+ "id": "settings-raw-noreferrer-link-attribute",+ "category": "link",+ "summary": "Settings surfaces must not hand-code rel=\"noreferrer\"; external links compose ExternalTextLink or ButtonLink, which own the rel value.",+ "canonical": {+ "path": "src/components/shared/ExternalTextLink.tsx",+ "export": "ExternalTextLink"+ },+ "scopes": ["src/components/Settings"],+ "extensions": [".tsx"],+ "allPatterns": ["rel=\"noreferrer\""],+ "legacyReason": "Retired migration debt. API access, API token and agent integration links compose the shared link primitives.",+ "allowedPaths": [],+ "ignoredPaths": [],+ "proof": [+ "src/components/shared/ExternalTextLink.test.tsx",+ "src/components/shared/SharedPrimitives.guardrails.test.ts",+ "scripts/shared-template-audit.mjs"+ ]+ },+ {+ "id": "app-module-import-outside-entry",+ "category": "runtime-context",+ "summary": "Pages, components and features take app runtime state from @/contexts/appRuntime, not by importing the App module.",+ "canonical": {+ "path": "src/contexts/appRuntime.ts",+ "export": "useWebSocket"+ },+ "scopes": ["src/components", "src/pages", "src/features"],+ "extensions": [".ts", ".tsx"],+ "allPatterns": ["from '@/App'"],+ "legacyReason": "Retired migration debt. Websocket and runtime access moved to the shared app runtime context.",+ "allowedPaths": [],+ "ignoredPaths": [],+ "proof": ["scripts/shared-template-audit.mjs"]}],"requiredPatternGuards": [diff --git a/frontend-modern/src/__tests__/App.architecture.test.ts b/frontend-modern/src/__tests__/App.architecture.test.tsindex ccc9b980af..f152eb7260 100644--- a/frontend-modern/src/__tests__/App.architecture.test.ts+++ b/frontend-modern/src/__tests__/App.architecture.test.ts@@ -7,15 +7,10 @@ import {sessionCanReadUpdateStatus,} from '@/App';import appSource from '@/App.tsx?raw';-import appLayoutSource from '@/AppLayout.tsx?raw';-import appRuntimeContextSource from '@/contexts/appRuntime.ts?raw';-import runtimeHomeSource from '@/pages/RuntimeHome.tsx?raw';-import routePreloadSource from '@/routing/routePreload.ts?raw';import appRuntimeStateSource from '@/useAppRuntimeState.ts?raw';import type { Resource } from '@/types/resource';const appStylesSource = readFileSync(join(process.cwd(), 'src/index.css'), 'utf8');-const headerAuditSource = readFileSync(join(process.cwd(), 'scripts/header-audit.mjs'), 'utf8');const integrationTestsDir = join(process.cwd(), '..', 'tests', 'integration', 'tests');const platformSurfaceSources = ['features/proxmox/ProxmoxPageSurface.tsx',@@ -243,26 +238,15 @@ describe('Global update progress authorization', () => {describe('App architecture', () => {it('gates Patrol navigation on the AI availability session capability (#905)', () => {+ // The tab itself is rendered in AppLayout.test.tsx; these are the App-level+ // and bootstrap wiring that no render test reaches.expect(appSource).toContain('patrolVisible: () => aiAvailabilityStore.enabled === true');expect(appSource).toContain('patrolVisible={() => aiAvailabilityStore.enabled === true}');- expect(appLayoutSource).toMatch(- /\.\.\.\(aiAvailabilityStore\.enabled === true\s*\?\s*\[\s*\{\s*id: 'ai' as const/,- );expect(appRuntimeStateSource).toContain('aiAvailabilityStore.setEnabled(securityData?.sessionCapabilities?.assistantEnabled === true)',);});- it('mounts no Assistant chat window or launcher now the chat is retired', () => {- for (const source of [appSource, appLayoutSource, appRuntimeStateSource]) {- expect(source).not.toContain('aiChatStore');- expect(source).not.toContain('@/stores/aiChat');- expect(source).not.toContain('components/AI/Chat');- }- expect(appLayoutSource).not.toContain('renderAssistantLauncher');- expect(appLayoutSource).not.toContain('getAssistantPageContext');- });-it('keeps first-load connection progress understandable and retryable', () => {expect(appSource).toContain('(!runtime.bootstrapFailed() || isPublicRoute())');expect(appSource).toContain(@@ -388,218 +372,32 @@ describe('App architecture', () => {});});- it('keeps App as the entry shell that delegates runtime and chrome ownership', () => {- expect(appSource).toContain(- "import { AppLayout, sessionHasSettingsAccess } from '@/AppLayout';",- );- expect(appSource).toContain("import { aiAvailabilityStore } from './stores/aiAvailability';");- expect(appSource).toContain(- "import { DarkModeContext, WebSocketContext, useWebSocket } from '@/contexts/appRuntime';",- );- expect(appSource).toContain("import { useAppRuntimeState } from '@/useAppRuntimeState';");- expect(appSource).toContain("} from '@/utils/appShellScrollRestoration';");- expect(appSource).toContain('const runtime = useAppRuntimeState();');- expect(appSource).toContain('pendingAppShellRestoreTop');- expect(appSource).toContain('setAppScrollShellRef');- expect(appSource).toContain('readPendingAppShellRestoreTop');- expect(appSource).toContain('clearPendingAppShellRestoreTop');- expect(appSource).toContain("const ProxmoxPage = lazy(() => import('./pages/Proxmox'));");- expect(appSource).toContain('const ROOT_PATROL_PATH = PATROL_PATH;');- expect(appSource).toContain(- "import { APP_SHELL_ROUTE_PRELOAD_PATHS, preloadRouteModule } from '@/routing/routePreload';",- );- expect(routePreloadSource).toContain('export const APP_SHELL_ROUTE_PRELOAD_PATHS = [');- expect(routePreloadSource).toContain(- 'export const APP_SHELL_ROUTE_PRELOAD_PATHS = [ACTIONS_PATH] as const;',- );- expect(routePreloadSource).not.toContain('ROOT_PROXMOX_PATH');- expect(routePreloadSource).not.toContain('ROOT_STANDALONE_PATH');- // These aggregate pages never shipped as stable top-level routes, so they- // must not remain wired as hidden compatibility or shell workspace surfaces.- expect(routePreloadSource).not.toContain('ROOT_INFRASTRUCTURE_PATH');- expect(routePreloadSource).not.toContain("id: 'workloads',");- expect(routePreloadSource).not.toContain("id: 'storage',");- expect(routePreloadSource).not.toContain("id: 'recovery',");- expect(appSource).not.toContain('const InfrastructurePage = lazy(');- expect(appSource).not.toContain('const WorkloadsPage = lazy(');- expect(appSource).not.toContain('const StoragePage = lazy(');- expect(appSource).not.toContain('const RecoveryPage = lazy(');- expect(appSource).not.toContain(- "import('./features/infrastructure/InfrastructurePageSurface')",- );- expect(appSource).not.toContain('component={InfrastructurePage}');- expect(appSource).not.toContain('INFRASTRUCTURE_PATH');- expect(appSource).not.toContain('<Route path={WORKLOADS_PATH}');- expect(appSource).not.toContain('<Route path={STORAGE_PATH}');- expect(appSource).not.toContain('<Route path={RECOVERY_PATH}');- expect(appSource).not.toContain('<Route path="/ceph"');- expect(appSource).not.toContain('<Route path="/ceph/*"');- expect(appSource).not.toContain('Route, Navigate,');- expect(appSource).not.toContain('<Navigate ');- expect(appSource).toContain('await preloadRouteModule(route);');- expect(appRuntimeStateSource).not.toContain('preloadLazyRoutes');- expect(appRuntimeStateSource).not.toContain("import('@/pages/Alerts')");- expect(appRuntimeStateSource).not.toContain("import('@/components/Settings/Settings')");- expect(appSource).toContain('const timeoutId = window.setTimeout(() => {');- expect(appSource).toContain('void preloadAppShellRoutes();');- expect(appRuntimeStateSource).not.toContain('getInfrastructureSummaryCharts');- expect(appRuntimeStateSource).not.toContain('getWorkloadCharts');- expect(appRuntimeStateSource).not.toContain('requestIdleCallback');- expect(appRuntimeStateSource).toContain('ssoSessionDisplayName?: string;');- expect(appRuntimeStateSource).toContain(- 'securityData.ssoSessionDisplayName || securityData.ssoSessionUsername',- );- expect(appRuntimeStateSource).toContain('username: ssoDisplayName');- expect(appSource).toContain("const StandalonePage = lazy(() => import('./pages/Standalone'));");- expect(appSource).toContain('<Route path={STANDALONE_PATH} component={StandalonePage} />');- expect(appSource).toContain(+ it('mounts every platform page, the workspace entry and Patrol under the app shell', () => {+ // Retired aggregate routes are gone from the source; these are the pages a+ // user reaches. No render test mounts App, so the registrations are pinned.+ for (const route of [+ '<Route path="/pricing" component={PricingHandoffPage} />',+ '<Route path="/login" component={RuntimeHomePage} />',+ '<Route path="/" component={RuntimeHomePage} />',+ '<Route path="/infrastructure" component={RuntimeHomePage} />',+ '<Route path={PROXMOX_PATH} component={ProxmoxPage} />',+ '<Route path={`${PROXMOX_PATH}/*`} component={ProxmoxPage} />',+ '<Route path={DOCKER_PATH} component={DockerPage} />',+ '<Route path={KUBERNETES_PATH} component={KubernetesPage} />',+ '<Route path={TRUENAS_PATH} component={TrueNASPage} />',+ '<Route path={VMWARE_PATH} component={VmwarePage} />',+ '<Route path={STANDALONE_PATH} component={StandalonePage} />','<Route path={`${STANDALONE_PATH}/*`} component={StandalonePage} />',- );- expect(appSource).not.toContain("import('./pages/Agents')");- expect(appSource).not.toContain('AGENTS_PATH');- expect(appSource).toContain('<Route path={PROXMOX_PATH} component={ProxmoxPage} />');- expect(appSource).toContain('<Route path={`${PROXMOX_PATH}/*`} component={ProxmoxPage} />');- expect(appSource).toContain("const DockerPage = lazy(() => import('./pages/Docker'));");- expect(appSource).toContain("const KubernetesPage = lazy(() => import('./pages/Kubernetes'));");- expect(appSource).toContain("const TrueNASPage = lazy(() => import('./pages/TrueNAS'));");- expect(appSource).toContain("const VmwarePage = lazy(() => import('./pages/Vmware'));");- expect(appSource).toContain('<Route path={DOCKER_PATH} component={DockerPage} />');- expect(appSource).toContain('<Route path={KUBERNETES_PATH} component={KubernetesPage} />');- expect(appSource).toContain('<Route path={TRUENAS_PATH} component={TrueNASPage} />');- expect(appSource).toContain('<Route path={VMWARE_PATH} component={VmwarePage} />');- expect(routePreloadSource).toContain("id: 'standalone',");- expect(routePreloadSource).toContain("id: 'docker',");- expect(routePreloadSource).toContain("id: 'kubernetes',");- expect(routePreloadSource).toContain("id: 'truenas',");- expect(routePreloadSource).toContain("id: 'vmware',");- expect(routePreloadSource.indexOf("id: 'proxmox',")).toBeLessThan(- routePreloadSource.indexOf("id: 'standalone',"),- );- expect(appLayoutSource).toContain("id: 'standalone',");- expect(appLayoutSource).toContain("id: 'docker',");- expect(appLayoutSource).toContain("id: 'kubernetes',");- expect(appLayoutSource).toContain("id: 'truenas',");- expect(appLayoutSource).toContain("id: 'vmware',");- expect(appLayoutSource).toContain(- "tooltip: 'VMware vSphere hosts, virtual machines, datastores, and networks'",- );- expect(appLayoutSource).toContain(- "tooltip: 'Pulse Agent machines, agentless computers, and availability checks'",- );- // Governed shell nav: Infrastructure, Workloads, Storage, and Recovery are- // not standalone shell tabs; platform/runtime pages own those workflows.- expect(appSource).toContain('getDefaultWorkspaceRoute');- expect(appSource).toContain('platformNavigationResolved');- expect(appSource).toContain('resolvePlatformNavigationAdmission');- expect(appSource).toContain('runtime.runtimeStateResolved()');- expect(appSource).not.toContain('store?.initialDataReceived?.()');- expect(appSource).toContain('if (!platformNavigationResolved()) return;');- expect(appSource).toContain('buildPrimaryPlatformNavigationVisibility');- expect(appLayoutSource).toContain('buildPrimaryPlatformNavigationVisibility');- expect(appLayoutSource).toContain('primaryPlatformNavigationIsVisible');- expect(appLayoutSource).toContain("label: 'Docker'");- expect(appLayoutSource).toContain("'Docker / Podman runtime lens");- expect(appLayoutSource).not.toContain("id: 'infrastructure',");- expect(appLayoutSource).not.toContain("id: 'workloads',");- expect(appLayoutSource).not.toContain("id: 'storage',");- expect(appLayoutSource).not.toContain("id: 'recovery',");- expect(appLayoutSource).not.toContain('aria-label="Workspaces"');- expect(appLayoutSource).not.toContain('buildStorageRecoveryTabSpecs(');- // Nav tab arrays are rebuilt from live store reads (activeAlerts is- // replaced wholesale by state frames), so both tab lists must route- // through the shared identity stabilizer or every reference-keyed <For>- // consumer recreates all nav buttons and drops in-flight taps.- expect(appLayoutSource).toContain(- 'const primaryTabs = createStableTabList(primaryTabsSource, primaryNavTabEquals);',- );- expect(appLayoutSource).toContain(- 'const utilityTabs = createStableTabList(utilityTabsSource, utilityNavTabEquals);',- );- expect(appSource).not.toContain('DashboardPage');- expect(headerAuditSource).not.toContain("['src/pages/Dashboard.tsx', 'PageHeader']");- expect(appSource).toContain("import RuntimeHomePage from '@/pages/RuntimeHome';");- expect(appSource).toContain('<Route path="/login" component={RuntimeHomePage} />');- expect(appSource).toContain('<Route path="/" component={RuntimeHomePage} />');- expect(appSource).toContain('<Route path="/infrastructure" component={RuntimeHomePage} />');- expect(appSource).toContain('function isWorkspaceEntryRoutePath(pathname: string): boolean');- expect(appSource).toContain("normalizedPath === '/'");- expect(appSource).toContain("normalizedPath === '/login'");- expect(appSource).toContain("normalizedPath === '/infrastructure'");- expect(appSource).toContain('let workspaceRedirectPending = false');- expect(appSource).toContain('if (workspaceRedirectPending) return');- expect(appSource).toContain('workspaceRedirectPending = true');- expect(appSource).toContain('<Route path={`${ROOT_PATROL_PATH}/*`} component={AIIntelligencePage} />',- );- expect(appSource).not.toContain('LegacyPatrolRouteRedirect');- expect(appSource).not.toContain('<Route path="/ai/*"');- expect(appSource).toContain(- "const PricingHandoffPage = lazy(() => import('./pages/PricingHandoff'));",- );- expect(appSource).toContain('<Route path="/pricing" component={PricingHandoffPage} />');- expect(appSource).not.toContain(- "const CloudPricingPage = lazy(() => import('./pages/CloudPricing'));",- );- expect(appSource).not.toContain(- "const HostedSignupPage = lazy(() => import('./pages/HostedSignup'));",- );- expect(appSource).not.toContain('<Route path="/cloud" component=');- expect(appSource).not.toContain('<Route path="/cloud/signup" component=');- expect(appSource).toContain("const ProxmoxPage = lazy(() => import('./pages/Proxmox'));");- expect(appSource).not.toContain("import('./pages/Operations')");- expect(appSource).not.toContain('<Route path="/operations/*"');- // Legacy page wrappers were deleted when primary nav moved to- // platform-first; their tables are reused inside platform pages directly.- expect(appSource).not.toContain("import('./pages/Storage')");- expect(appSource).not.toContain("import('./pages/Workloads')");- expect(appSource).not.toContain("import('./pages/Recovery')");- expect(appSource).not.toContain("import('./pages/Infrastructure')");- expect(appSource).not.toContain("import('./pages/Ceph')");- expect(appSource).not.toContain(- "const StorageComponent = lazy(() => import('./components/Storage/Storage'));",- );- expect(appSource).not.toContain(- "const WorkloadsView = lazy(() => import('./components/Workloads/WorkloadsSurface'));",- );- expect(appSource).not.toContain(- "const RecoveryRoute = lazy(() => import('./pages/RecoveryRoute'));",- );- expect(appSource).not.toContain("const PricingPage = lazy(() => import('./pages/PricingV6'));");- expect(appSource).not.toContain('function ConnectionStatusBadge(');- expect(appSource).not.toContain('function AppLayout(');- expect(appSource).not.toContain('export const WebSocketContext = createContext<');- expect(appSource).not.toContain('export const DarkModeContext = createContext<');- expect(appSource).not.toContain('const [organizations, setOrganizations] = createSignal(');- expect(appSource).not.toContain('const [themePreference, setThemePreference] =');- expect(appSource).not.toContain('const [activeOrgID, setActiveOrgID] = createSignal(');- expect(appSource).not.toContain("import('./api/ai')");- expect(appSource).not.toContain('AIAPI.getSettings()');- expect(appSource).toContain('showOrgSwitcher={runtime.showOrgSwitcher}');- expect(appSource).toContain("import { WhatsNewCard } from './components/WhatsNewCard';");- expect(appSource).toContain('<WhatsNewCard />');- expect(appSource).not.toContain('TrialBanner');- expect(appSource).not.toContain('MonitoredSystemLimitWarningBanner');- expect(appSource).not.toContain('monitoredSystemLimitWarningBanner');+ ]) {+ expect(appSource).toContain(route);+ }});it('Issue1650 keeps kiosk-scoped sessions off settings chrome in the shell', () => {- // ESC used to call toggleKioskMode() unconditionally, and setKioskMode(false)- // is sticky for the rest of the session, so a kiosk display could be walked- // out of kiosk and into settings-linked chrome it has no authority to use.- expect(appLayoutSource).toContain('export function sessionHasSettingsAccess(');- expect(appLayoutSource).toContain(- 'const hasSettingsAccess = createMemo(() => sessionHasSettingsAccess(props.tokenScopes()));',- );- expect(appLayoutSource).toContain("if (event.key !== 'Escape') return;");- expect(appLayoutSource).toContain('if (!hasSettingsAccess()) {');- expect(appLayoutSource).toContain('scheduleHideHeader(3000);');- expect(appLayoutSource).not.toContain(- "if (event.key === 'Escape') {\n toggleKioskMode();",- );- // The blocked-route guard is an authority rule, not kiosk decoration.- expect(appLayoutSource).toContain('if (!kioskMode() && hasSettingsAccess()) return;');- expect(appLayoutSource).toContain("const blockedPrefixes = ['/settings', '/patrol'];");- // Banners in the shell deep-link into settings, so they follow the same rule.+ // Escape handling and the blocked-route redirect are rendered in+ // AppLayout.test.tsx. Banners in the shell deep-link into settings, so they+ // follow the same rule; no render test mounts App itself.expect(appSource).toContain('<Show when={!kioskMode() && hasSettingsAccess()}>');expect(appSource).toContain('const hasSettingsAccess = createMemo(() =>\n sessionHasSettingsAccess(runtime.securityStatus()?.tokenScopes),\n );',@@ -626,8 +424,6 @@ describe('App architecture', () => {it('mounts the update progress watcher only behind its route capability', () => {expect(appSource).toContain('sessionCanReadUpdateStatus(runtime.securityStatus())');- expect(appSource).toContain('return status.settingsCapabilities?.systemSettingsRead === true;');- expect(appSource).toContain('if (!status || !status.requiresAuth) return true;');const watcherGate = appSource.indexOf('<Show when={canReadUpdateStatus()}>');const watcherMount = appSource.indexOf('<GlobalUpdateProgressWatcher />');@@ -651,11 +447,7 @@ describe('App architecture', () => {expect(retiredRouteNavigations).toEqual([]);});- it('keeps compact organization chrome presentational and its offline audit explicitly entitled', () => {- expect(appLayoutSource).toContain('<Show when={props.showOrgSwitcher()}>');- expect(appLayoutSource).toContain('selectedOrgId={props.activeOrgID()}');- expect(appLayoutSource).toContain('onChange={props.onSwitchOrg}');- expect(appLayoutSource).not.toContain('/api/license/activate');+ it('keeps the compact organization audit explicitly entitled before it creates an organization', () => {const audit = readFileSync(join(integrationTestsDir, '05-settings-mobile-audit.spec.ts'),'utf8',@@ -678,46 +470,9 @@ describe('App architecture', () => {// navigation. Runtime tests exercise successful and partial cleanup;// the metadata lifetime tests exercise late results after disposal.expect(appSource).toContain('when={!runtime.needsAuth()}');- expect(appRuntimeStateSource).toContain('setNeedsAuth(true)');- for (const source of platformSurfaceSources) {- expect(source).not.toContain('pulseGuestMetadata');- }});- it('keeps authenticated chrome in AppLayout and hosted bootstrap in useAppRuntimeState', () => {- expect(appLayoutSource).toContain('export function AppLayout(props: AppLayoutProps)');- expect(appLayoutSource).toContain(- "import { preloadRouteModule } from '@/routing/routePreload';",- );- expect(appLayoutSource).toContain(- "import { aiAvailabilityStore } from '@/stores/aiAvailability';",- );- expect(appLayoutSource).toContain(- "import { buildInfrastructureWorkspacePath } from '@/components/Settings/infrastructureWorkspaceModel';",- );- expect(appLayoutSource).toContain(- 'const ROOT_INFRASTRUCTURE_SETTINGS_PATH = buildInfrastructureWorkspacePath();',- );- expect(appLayoutSource).toContain('settingsRoute: ROOT_INFRASTRUCTURE_SETTINGS_PATH');- expect(appLayoutSource).not.toContain("settingsRoute: '/settings/workloads");- expect(appLayoutSource).not.toContain("settingsRoute: '/settings/infrastructure/platforms");- expect(appLayoutSource).toContain('type PrimaryRouteMemory = Partial');- expect(appLayoutSource).toContain('let primaryRouteMemory: PrimaryRouteMemory = {};');- expect(appLayoutSource).toContain('function resolvePrimaryNavigationRoute(');- expect(appLayoutSource).toContain('routeBelongsToPrimaryTab(remembered');- expect(appLayoutSource).not.toContain('primaryRouteMemory[props.activeOrgID');- expect(appLayoutSource).not.toContain('primaryRouteMemory[activeOrgID');- expect(appLayoutSource).toContain('<OrgSwitcher');- expect(appLayoutSource).toContain('const status = () => props.connectionStatus();');- expect(appLayoutSource).toContain(- "status().kind === 'sync-reconnecting' || status().kind === 'reconnecting'",- );- expect(appLayoutSource).toContain("props.connectionStatus().tone === 'healthy'");- expect(appLayoutSource).toContain('const brandMotionActive = createMemo(');- expect(appLayoutSource).toContain('pulse-brand-lockup');- expect(appLayoutSource).toContain('animate-pulse-brand');- expect(appLayoutSource).toContain('pulse-brand-wordmark');- expect(appLayoutSource).toContain("'pb-safe-or-14 xl:pb-0'");+ it('keeps the shell stylesheet contract for app chrome, brand motion and platform tables', () => {expect(appStylesSource).toContain('@utility pb-safe-or-14');expect(appStylesSource).toContain('.pulse-shell--full-width');expect(appStylesSource).toContain('.pulse-wide-data-surface.space-y-3');@@ -736,14 +491,6 @@ describe('App architecture', () => {'.pulse-wide-data-surface .host-row,\n .pulse-wide-data-surface .workload-row',);expect(appStylesSource).toContain('.pulse-footer > div');- expect(appLayoutSource).toContain('tabs mb-2 hidden xl:flex');- expect(appLayoutSource).toContain('xl:px-2 2xl:px-3');- expect(appLayoutSource).toContain('gap-1 2xl:gap-1.5');- expect(appLayoutSource).not.toContain('tabs mb-2 hidden lg:flex');- expect(appLayoutSource).not.toContain('dataUpdated: () => boolean');- expect(appLayoutSource).not.toContain('animate-pulse-logo');- expect(appRuntimeStateSource).not.toContain('dataUpdated');- expect(appRuntimeStateSource).not.toContain('DATA_FLASH');expect(appStylesSource).toContain('--pulse-brand-cycle: 3.4s;');expect(appStylesSource).toContain('@keyframes pulse-brand-wave');expect(appStylesSource).toContain(@@ -783,222 +530,6 @@ describe('App architecture', () => {expect(appStylesSource).not.toContain('--color-grouped-table-row-bg: theme(');expect(appStylesSource).not.toContain('@keyframes pulse-brand-wordmark');expect(appStylesSource).not.toContain('text-shadow');- expect(appLayoutSource).toContain("props.versionInfo()?.channel === 'rc'");- expect(appLayoutSource).toContain('Preview');- expect(appLayoutSource).not.toContain(- "import { ReleaseCandidateBanner } from '@/components/shared/ReleaseCandidateBanner';",- );- expect(appLayoutSource).not.toContain(- '<ReleaseCandidateBanner version={props.versionInfo()?.version} />',- );- expect(appLayoutSource).toContain("const blockedPrefixes = ['/settings', '/patrol'];");- expect(appLayoutSource).not.toContain("'/operations', '/patrol', '/ai'");- expect(appLayoutSource).toContain("route: '/patrol',");- expect(appLayoutSource).toContain("label: 'Patrol'");- expect(appLayoutSource).toContain("id: 'actions',");- expect(appLayoutSource).toContain("label: 'Actions',");- expect(appLayoutSource).toContain("route: '/actions',");- expect(appLayoutSource).toContain(- 'const getNavigationActiveTab = () => getActiveTabForPath(location.pathname);',- );- expect(appLayoutSource).toContain(- "tooltip: 'Review active operational attention and recent Patrol checks'",- );- expect(appLayoutSource).toContain('const patrolAttentionCount = createMemo(');- expect(appLayoutSource).toContain('countLabel: patrolAttentionCountLabel()');- expect(appLayoutSource).toContain('countLabel: actionApprovalBadge()?.label');- expect(appLayoutSource).not.toContain("label: 'Needs Attention'");- expect(appLayoutSource).not.toContain("route: '/operations',");- expect(appLayoutSource).not.toContain('props.connected()');- expect(appLayoutSource).toContain('const utilityTabsSource = createMemo<UtilityTab[]>(() =>');- expect(appLayoutSource).toContain(- 'type MobileNavBarPrimaryTab as PrimaryTab,\n type MobileNavBarUtilityTab as UtilityTab,',- );- expect(appLayoutSource).toContain("const NAV_TAB_ICON_CLASS = 'w-4 h-4 shrink-0';");- expect(appLayoutSource).toContain("} from '@/components/shared/mobileNavBarModel';");- expect(appLayoutSource).not.toContain('function getDesktopUtilityTabAriaLabel');- expect(appLayoutSource).not.toContain('return `${count} ${tab.label}`;');- expect(appLayoutSource).toContain('const primaryTabsSource = createMemo<PrimaryTab[]>(() =>');- expect(appLayoutSource).toContain("id: 'proxmox',");- expect(appLayoutSource).toContain("icon: getPlatformIcon('proxmox'),");- expect(appLayoutSource).toContain('const Icon = tab.icon;');- expect(appLayoutSource).toContain('const Icon = tab.icon;');- expect(appLayoutSource).toContain('aria-label={tab.label}');- expect(appLayoutSource).toContain('aria-label={getMobileNavTabAriaLabel(tab)}');- expect(appLayoutSource).toContain('aria-description={getMobileNavTabAriaDescription(tab)}');- expect(appLayoutSource).toContain(- '<span aria-hidden="true" class="inline-flex items-center justify-center">',- );- expect(appLayoutSource).toContain('<Icon class={NAV_TAB_ICON_CLASS} />');- expect(appLayoutSource).not.toContain('type PrimaryTab = {');- expect(appLayoutSource).not.toContain('type UtilityTab = {');- expect(appLayoutSource).not.toContain('const platformTabsDesktop = createMemo(() =>');- expect(appLayoutSource).not.toContain('const platformTabsMobile = createMemo(() =>');- expect(appLayoutSource).not.toContain(- "import { isMultiTenantEnabled } from '@/stores/license';",- );- expect(appLayoutSource).not.toContain('loadCommercialPosture');- expect(appLayoutSource).not.toContain('buildReleaseNotesUrl');- expect(appLayoutSource).not.toContain('buildV6RcFeedbackUrl');- expect(appLayoutSource).not.toContain('sessionPresentationPolicyResolved');- expect(appLayoutSource).not.toContain('presentationPolicyHidesCommercialSurfaces');- expect(appLayoutSource).not.toContain('presentationPolicyHidesOrganizationSurfaces');- expect(appLayoutSource).not.toContain('presentationPolicyIsDemoMode');- expect(appLayoutSource).toContain(- 'warmNavigationTarget(targetRoute);\n navigate(targetRoute);',- );- expect(appLayoutSource).toContain('warmNavigationTarget(tab.route);\n navigate(tab.route);');- expect(appLayoutSource).not.toContain('await preloadRouteModule(targetRoute);');- expect(appLayoutSource).not.toContain('await preloadRouteModule(tab.route);');- expect(appLayoutSource).toContain('onMouseEnter={() => warmNavigationTarget(');- expect(appLayoutSource).not.toContain('AI_CHAT_MOBILE_LAUNCHER_BUTTON_CLASS');- expect(appLayoutSource).not.toContain('AI_CHAT_DESKTOP_LAUNCHER_BUTTON_CLASS');- expect(appLayoutSource).not.toContain('Pulse Assistant (⌘K)');- expect(appSource).not.toContain("eventBus.on('theme_changed'");- expect(appSource).not.toContain("eventBus.on('websocket_reconnected'");- expect(appSource).not.toContain("apiFetch('/api/security/status')");- expect(appLayoutSource).not.toContain("eventBus.on('theme_changed'");- expect(appLayoutSource).not.toContain("apiFetch('/api/security/status')");- expect(appRuntimeStateSource).toContain('export const useAppRuntimeState = () =>');- expect(appRuntimeStateSource).toContain(- "import { aiAvailabilityStore } from '@/stores/aiAvailability';",- );- expect(appRuntimeStateSource).toContain(- 'const connectionStatus = createMemo<AppConnectionStatus>(() => {',- );- expect(appRuntimeStateSource).toContain('const showOrgSwitcher = createMemo(() => {');- expect(appRuntimeStateSource).toContain(- 'const loadAuthenticatedBootstrapState = async (): Promise<boolean> => {',- );- expect(appRuntimeStateSource).toContain(- 'const beginAuthenticatedRuntime = async (): Promise<boolean> => {',- );- expect(appRuntimeStateSource).toContain('if (!(await loadAuthenticatedBootstrapState())) {');- // The bootstrap probes the session once, and never through the full state- // payload: `/api/state` stays the oversized-snapshot recovery path only.- expect(appRuntimeStateSource.match(/apiFetch\('\/api\/state\/summary'/g)).toHaveLength(1);- expect(appRuntimeStateSource).not.toContain("apiFetch('/api/state',");- expect(appRuntimeStateSource).toContain('SettingsAPI.getRuntimeDisplay()');- expect(appRuntimeStateSource).not.toContain('SettingsAPI.getSystemSettings');- expect(appRuntimeStateSource).toContain(- 'const [backendHealthy, setBackendHealthy] = createSignal(false);',- );- expect(appRuntimeStateSource).toContain('const checkBackendHealth = async () => {');- expect(appRuntimeStateSource).toContain('const loadOrganizations = async () =>');- expect(appRuntimeStateSource).toContain('const handleOrgSwitch = (nextOrgID: string) =>');- expect(appRuntimeStateSource).toContain('const handleOrganizationsChanged = () => {');- expect(appRuntimeStateSource).toContain(- "eventBus.on('organizations_changed', handleOrganizationsChanged);",- );- expect(appRuntimeStateSource).toContain(- "eventBus.off('organizations_changed', handleOrganizationsChanged);",- );- expect(appRuntimeStateSource).toContain(- "import {\n isHostedModeEnabled,\n isMultiTenantEnabled,\n runtimeCapabilitiesLoaded,\n loadRuntimeCapabilities,\n} from '@/stores/license';",- );- expect(appRuntimeStateSource).toContain(- "import { loadCommercialPosture } from '@/stores/licenseCommercial';",- );- expect(appRuntimeStateSource).toContain('presentationPolicyHidesOrganizationSurfaces');- expect(appRuntimeStateSource).toContain('presentationPolicyHidesUpgradePrompts');- expect(appRuntimeStateSource).toContain('const [activeOrgID, setActiveOrgID] = createSignal(');- expect(appRuntimeStateSource).toContain('onMount(() => {');- expect(appRuntimeStateSource).toContain('onMount(async () => {');- expect(appRuntimeStateSource).toContain('if (!presentationPolicyHidesUpgradePrompts()) {');- expect(appRuntimeStateSource).toContain('void loadCommercialPosture();');- expect(appRuntimeStateSource).toContain('const hasLocalAuthBootstrapHint = (): boolean => {');- expect(appRuntimeStateSource).toContain(- 'const isPreAuthLoginBootstrapPath = (pathname: string): boolean =>',- );- expect(appRuntimeStateSource).toContain('const hasSSOCallbackSuccessHint = (): boolean => {');- expect(appRuntimeStateSource).toContain(- 'isPreAuthLoginBootstrapPath(window.location.pathname) &&',- );- expect(appRuntimeStateSource).toContain('!hasLocalAuthBootstrapHint() &&');- expect(appRuntimeStateSource).toContain('!hasSSOCallbackSuccessHint()');- // Remember-me sessions ride an HttpOnly cookie with no per-tab artifacts,- // so the remembered-username hint must keep the /api/state probe reachable- // after a tab close (issue #1531).- expect(appRuntimeStateSource).toContain(- 'window.localStorage.getItem(STORAGE_KEYS.REMEMBERED_LOGIN_USERNAME)',- );- expect(appRuntimeStateSource).toContain('aiAvailabilityStore.setEnabled(');- expect(appRuntimeStateSource).toContain('aiIntelligenceStore.loadPatrolFindings()');- expect(appRuntimeStateSource).toContain('aiIntelligenceStore.loadPendingApprovals()');- expect(appRuntimeStateSource).toContain('actionInboxStore.loadPendingActionCount()');- expect(appRuntimeStateSource).toContain('window.setInterval(refreshOpenWorkBadges, 30000)');- expect(appRuntimeStateSource).toContain(- "eventBus.on('theme_changed', handleRemoteThemeChange);",- );- expect(appRuntimeStateSource).toContain(- "eventBus.on('websocket_reconnected', handleWebSocketReconnected);",- );- expect(appRuntimeStateSource).not.toContain('buildInfrastructurePath');- expect(appRuntimeStateSource).not.toContain('buildWorkloadsPath');- expect(appRuntimeStateSource).not.toContain("const ROOT_DASHBOARD_PATH = '/dashboard';");- expect(appRuntimeStateSource).not.toContain(- "import { startMetricsCollector } from '@/stores/metricsCollector';",- );- expect(appRuntimeStateSource).not.toContain('startMetricsCollector();');- expect(appRuntimeStateSource).not.toContain('function AppLayout(');- expect(routePreloadSource).toContain('const ROUTE_PRELOADERS: readonly RoutePreloader[] = [');- expect(routePreloadSource).toContain('export const APP_SHELL_ROUTE_PRELOAD_PATHS = [');- expect(routePreloadSource).toContain("id: 'standalone',");- expect(routePreloadSource).toContain("id: 'proxmox',");- expect(routePreloadSource).toContain("id: 'patrol',");- expect(routePreloadSource).toContain(- 'const routePreloadCache = new Map<string, Promise<void>>();',- );- expect(routePreloadSource).toContain("import('@/pages/Standalone')");- expect(routePreloadSource).toContain("import('@/pages/Proxmox')");- expect(routePreloadSource).not.toContain("import('@/pages/Infrastructure')");- expect(routePreloadSource).not.toContain("import('@/pages/Workloads')");- expect(routePreloadSource).not.toContain("import('@/pages/Recovery')");- expect(routePreloadSource).not.toContain("import('@/pages/Storage')");- expect(routePreloadSource).not.toContain("import('@/pages/Ceph')");- expect(routePreloadSource).not.toContain("import('@/components/Workloads/WorkloadsSurface')");- expect(routePreloadSource).not.toContain("import('@/components/Storage/Storage')");- expect(routePreloadSource).not.toContain("import('@/components/Recovery/Recovery')");- expect(routePreloadSource).not.toContain("import('@/pages/RecoveryRoute')");- expect(appRuntimeContextSource).toContain(- "import { createContext, useContext } from 'solid-js';",- );- expect(appRuntimeContextSource).toContain(- 'export const WebSocketContext = createContext<WebSocketStore>();',- );- expect(appRuntimeContextSource).toContain('export const useWebSocket = () => {');- expect(appRuntimeContextSource).toContain(- 'export const DarkModeContext = createContext<() => boolean>();',- );- });-- it('keeps dashboard and Explore boundaries out of the runtime home shell', () => {- const shellEntrySources = [- { name: 'App.tsx', source: appSource },- { name: 'AppLayout.tsx', source: appLayoutSource },- { name: 'RuntimeHome.tsx', source: runtimeHomeSource },- { name: 'routePreload.ts', source: routePreloadSource },- ];-- for (const { name, source } of shellEntrySources) {- expect(source, name).not.toContain('/dashboard');- expect(source, name).not.toContain("'/explore'");- expect(source, name).not.toContain('"/explore"');- expect(source, name).not.toContain('DashboardPage');- expect(source, name).not.toContain('ExplorePage');- expect(source, name).not.toContain('getPatrolProtectionPosture');- expect(source, name).not.toContain('getMonitorContextPatrolProtectionPosture');- expect(source, name).not.toContain('Patrol protection posture');- expect(source, name).not.toContain('Proxmox Patrol coverage');- expect(source, name).not.toContain('Protection current');- }-- expect(runtimeHomeSource).toContain('runtimeHome.openingWorkspace');- expect(runtimeHomeSource).not.toContain('aiIntelligenceStore');- expect(runtimeHomeSource).not.toContain('patrolOpenWork');- expect(appLayoutSource).toContain("label: 'Patrol'");- expect(appLayoutSource).toContain('countLabel: patrolAttentionCountLabel()');- expect(appLayoutSource).toContain("label: 'Actions'");});it('keeps alert hydration separate from tenant resource admission', () => {@@ -1016,20 +547,6 @@ describe('App architecture', () => {expect(reset).toContain("setActiveAlertsHydrationStatus('pending')");});- it('drops platform admission when the tenant changes', () => {- const switchStart = appRuntimeStateSource.indexOf('const handleOrgSwitch');- expect(switchStart).toBeGreaterThan(-1);- const orgSwitch = appRuntimeStateSource.slice(switchStart, switchStart + 1200);-- // Admission is tenant-scoped. Carrying the outgoing tenant's answer across- // a switch would render their platform tabs to the incoming tenant, so it- // is cleared before the replacement is requested.- const clearIndex = orgSwitch.indexOf('setPlatformAdmission(null)');- const refetchIndex = orgSwitch.indexOf('loadPlatformAdmission()');- expect(clearIndex).toBeGreaterThan(-1);- expect(refetchIndex).toBeGreaterThan(clearIndex);- });-it('keeps licensed application branding inside the authenticated shell bootstrap', () => {// Asserted on the bootstrap's contents rather than one formatted line, so// a prettier line-wrap cannot read as branding leaving the bootstrap.@@ -1044,13 +561,6 @@ describe('App architecture', () => {expect(authenticatedBootstrap).toContain('loadRuntimeDisplayAndLayout()');expect(authenticatedBootstrap).toContain('loadRuntimeBranding()');expect(authenticatedBootstrap).toContain('loadPlatformAdmission()');- expect(appLayoutSource).toContain("import { runtimeBranding } from '@/stores/systemSettings';");- expect(appLayoutSource).toContain(- "const browserBrandName = createMemo(() => customBrandName() || 'Pulse');",- );- expect(appLayoutSource).toContain('data-testid="custom-brand-logo"');- expect(appRuntimeStateSource).not.toContain('/api/license/commercial-posture');- expect(appRuntimeStateSource).not.toContain('/api/license/entitlements');});});diff --git a/frontend-modern/src/__tests__/AppLayout.test.tsx b/frontend-modern/src/__tests__/AppLayout.test.tsxindex b164c9dbc7..26b5a246de 100644--- a/frontend-modern/src/__tests__/AppLayout.test.tsx+++ b/frontend-modern/src/__tests__/AppLayout.test.tsx@@ -81,6 +81,7 @@ const renderLayout = (tone: 'healthy',}),loggingOut: Accessor<boolean> = () => false,+ stateFrame?: Accessor<State>,) => {window.history.replaceState({}, '', initialPath);const RouteStateProbe = () => {@@ -111,11 +112,13 @@ const renderLayout = (proxyAuthInfo={() => null}handleLogout={() => {}}isLoggingOut={loggingOut}- state={() =>- ({- activeAlerts: [{ id: 'alert-1', level: 'warning', acknowledged: false }],- resources,- }) as unknown as State+ state={+ stateFrame ??+ (() =>+ ({+ activeAlerts: [{ id: 'alert-1', level: 'warning', acknowledged: false }],+ resources,+ }) as unknown as State)}platformVisibility={platformVisibility ? () => platformVisibility : undefined}tokenScopes={() => tokenScopes}@@ -136,6 +139,7 @@ const renderLayout = (<Route path="/docker/overview" component={LayoutRoute} /><Route path="/alerts" component={LayoutRoute} /><Route path="/actions" component={LayoutRoute} />+ <Route path="/patrol" component={LayoutRoute} /></Router>));};@@ -269,6 +273,36 @@ describe('AppLayout navigation icons', () => {}});+ it('keeps the same navigation links mounted when a state frame replaces the active alerts', () => {+ // Active alerts are replaced wholesale by state frames, which rebuilds both+ // tab arrays. Reference-keyed consumers would otherwise recreate every nav+ // link and drop an in-flight tap.+ const frame = () =>+ ({+ activeAlerts: [{ id: 'alert-1', level: 'warning', acknowledged: false }],+ resources: platformResources(),+ }) as unknown as State;+ const [stateFrame, setStateFrame] = createSignal(frame());+ renderLayout(+ [],+ '/settings/infrastructure',+ undefined,+ ['settings:read'],+ undefined,+ undefined,+ stateFrame,+ );+ const desktopNav = screen.getByRole('navigation', { name: 'Primary navigation' });+ const links = within(desktopNav).getAllByRole('link');+ expect(links.length).toBeGreaterThan(4);++ setStateFrame(frame());++ const after = within(desktopNav).getAllByRole('link');+ expect(after).toHaveLength(links.length);+ after.forEach((link, index) => expect(link).toBe(links[index]));+ });+it('surfaces canonical Patrol attention as a count without renaming Patrol', () => {patrolAttentionMockState.activeCount = 2;renderLayout();@@ -644,6 +678,16 @@ describe('AppLayout Issue1650 kiosk scope containment', () => {expect(within(systemGroup as HTMLElement).queryByRole('link', { name: 'Settings' })).toBeNull();});+ it('redirects a scope-limited session away from Patrol even when kiosk is off', async () => {+ setKioskMode(false);+ renderLayout([], '/patrol', DOCKER_ONLY_VISIBILITY, KIOSK_TOKEN_SCOPES);++ expect(isKioskMode()).toBe(false);+ await waitFor(() => {+ expect(window.location.pathname).toBe('/docker/overview');+ });+ });+it('leaves settings reachable with kiosk off for a session that has settings access', async () => {setKioskMode(false);renderLayout([], '/settings/infrastructure', DOCKER_ONLY_VISIBILITY, ['settings:read']);diff --git a/frontend-modern/src/__tests__/useAppRuntimeState.test.ts b/frontend-modern/src/__tests__/useAppRuntimeState.test.tsindex f36b59cf0e..c989bbd3dc 100644--- a/frontend-modern/src/__tests__/useAppRuntimeState.test.ts+++ b/frontend-modern/src/__tests__/useAppRuntimeState.test.ts@@ -1,7 +1,6 @@import { createRoot } from 'solid-js';import { waitFor } from '@solidjs/testing-library';import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';-import useAppRuntimeStateSource from '@/useAppRuntimeState.ts?raw';import type { State } from '@/types/api';import type { Resource } from '@/types/resource';@@ -1542,13 +1541,6 @@ describe('useAppRuntimeState', () => {dispose();});- it('keeps retired chart cache prewarm out of the authenticated app shell', () => {- expect(useAppRuntimeStateSource).not.toContain('getInfrastructureSummaryCharts');- expect(useAppRuntimeStateSource).not.toContain('getWorkloadCharts');- expect(useAppRuntimeStateSource).not.toContain('requestIdleCallback');- expect(useAppRuntimeStateSource).not.toContain('App prewarm');- });-it('skips the protected state bootstrap probe on the login route until a local auth hint exists', async () => {window.history.replaceState({}, '', '/login');hasStoredAuthSessionMock.mockReturnValue(false);@@ -1593,4 +1585,25 @@ describe('useAppRuntimeState', () => {dispose();});++ it('keeps the protected state bootstrap probe on the login route for a remembered login after the tab closed', async () => {+ // Remember-me sessions ride an HttpOnly cookie with no per-tab artifacts, so+ // the remembered username is the only hint left (issue #1531).+ window.history.replaceState({}, '', '/login');+ hasStoredAuthSessionMock.mockReturnValue(false);+ window.localStorage.setItem('pulse_remembered_login_username', 'demo');++ try {+ const { dispose } = mountHook();++ await flushAsync();+ await flushAsync();++ expect(apiFetchMock.mock.calls.some(([url]) => url === '/api/state/summary')).toBe(true);++ dispose();+ } finally {+ window.localStorage.removeItem('pulse_remembered_login_username');+ }+ });});diff --git a/frontend-modern/src/api/__tests__/agentCapabilities.test.ts b/frontend-modern/src/api/__tests__/agentCapabilities.test.tsindex 33bdd83bc3..cd3478d4cf 100644--- a/frontend-modern/src/api/__tests__/agentCapabilities.test.ts+++ b/frontend-modern/src/api/__tests__/agentCapabilities.test.ts@@ -23,7 +23,6 @@ import {type AgentCapabilitiesManifest,type AgentSurfaceToolContract,} from '../agentCapabilities';-import generatedAgentCapabilitiesSource from '@/api/generated/agentCapabilities.ts?raw';import { apiFetchJSON } from '@/utils/apiClient';vi.mock('@/utils/apiClient', () => ({@@ -812,38 +811,4 @@ describe('agent capabilities API client', () => {),);});-- it('uses generated backend manifest types for the frontend contract', () => {- expect(generatedAgentCapabilitiesSource).toContain(- '// Source: internal/agentcapabilities manifest structs.',- );- expect(generatedAgentCapabilitiesSource).toContain('export interface Manifest');- expect(generatedAgentCapabilitiesSource).toContain('surfaceContract: SurfaceContract');- expect(generatedAgentCapabilitiesSource).toContain('mcpAdapter: MCPAdapterContract');- expect(generatedAgentCapabilitiesSource).toContain('workflowPrompts: PulseWorkflowPrompt[]');- expect(generatedAgentCapabilitiesSource).toContain('export interface MCPAdapterContract');- expect(generatedAgentCapabilitiesSource).toContain('export interface PulseWorkflowPrompt');- expect(generatedAgentCapabilitiesSource).toContain('label?: string');- expect(generatedAgentCapabilitiesSource).toContain('arguments?: PulseWorkflowPromptArgument[]');- expect(generatedAgentCapabilitiesSource).toContain(- 'export interface SurfaceAffordanceContract',- );- expect(generatedAgentCapabilitiesSource).toContain('affordances?: SurfaceAffordanceContract');- expect(generatedAgentCapabilitiesSource).toContain('configFamilies: MCPAdapterConfigFamily[]');- expect(generatedAgentCapabilitiesSource).toContain(- 'operatorSurfaces: OperatorSurfaceContract[]',- );- expect(generatedAgentCapabilitiesSource).toContain('actionMode: AgentCapabilityActionMode');- expect(generatedAgentCapabilitiesSource).toContain(- 'approvalPolicy: AgentCapabilityApprovalPolicy',- );- expect(generatedAgentCapabilitiesSource).toContain('inputSchema?: Record<string, unknown>');- expect(generatedAgentCapabilitiesSource).toContain('export interface SurfaceToolContract');- expect(generatedAgentCapabilitiesSource).toContain('surfaceId: string');- expect(generatedAgentCapabilitiesSource).toContain('toolSource: string');- expect(generatedAgentCapabilitiesSource).toContain('toolNames: string[]');- expect(generatedAgentCapabilitiesSource).toContain('registryToolNames?: string[]');- expect(generatedAgentCapabilitiesSource).toContain('capabilityNames?: string[]');- expect(generatedAgentCapabilitiesSource).toContain('nativeToolNames?: string[]');- });});diff --git a/frontend-modern/src/api/__tests__/apiErrorStatus.guardrails.test.ts b/frontend-modern/src/api/__tests__/apiErrorStatus.guardrails.test.tsdeleted file mode 100644index 621f30c669..0000000000--- a/frontend-modern/src/api/__tests__/apiErrorStatus.guardrails.test.ts+++ /dev/null@@ -1,481 +0,0 @@-import { describe, expect, it } from 'vitest';-import aiSource from '@/api/ai.ts?raw';-import agentProfilesSource from '@/api/agentProfiles.ts?raw';-import alertsSource from '@/api/alerts.ts?raw';-import agentMetadataSource from '@/api/agentMetadata.ts?raw';-import dockerMetadataSource from '@/api/dockerMetadata.ts?raw';-import monitoringSource from '@/api/monitoring.ts?raw';-import notificationsSource from '@/api/notifications.ts?raw';-import nodesSource from '@/api/nodes.ts?raw';-import patrolSource from '@/api/patrol.ts?raw';-import guestMetadataSource from '@/api/guestMetadata.ts?raw';-import metadataClientSource from '@/api/metadataClient.ts?raw';-import resourcesSource from '@/api/resources.ts?raw';-import responseUtilsSource from '@/api/responseUtils.ts?raw';-import securitySource from '@/api/security.ts?raw';-import streamingSource from '@/api/streaming.ts?raw';--const apiSources = import.meta.glob('../*.ts', {- query: '?raw',- eager: true,- import: 'default',-}) as Record<string, string>;--describe('API error-status guardrails', () => {- it('keeps canonical API error status helpers in responseUtils', () => {- expect(responseUtilsSource).toContain('export function apiErrorStatus');- expect(responseUtilsSource).toContain('export function isAPIErrorStatus');- expect(responseUtilsSource).toContain('export async function withAPIErrorStatusFallback');- expect(responseUtilsSource).toContain('export async function withAPIErrorStatusNull');- expect(responseUtilsSource).toContain('export function apiResponseStatus');- expect(responseUtilsSource).toContain('export function isAPIResponseStatus');- expect(responseUtilsSource).toContain('export async function assertAPIResponseOK');- expect(responseUtilsSource).toContain(- 'export async function assertAPIResponseOKOrAllowedStatus',- );- expect(responseUtilsSource).toContain('export async function assertAPIResponseOKOrThrowStatus');- expect(responseUtilsSource).toContain('export async function parseRequiredAPIResponse');- expect(responseUtilsSource).toContain('export async function parseOptionalAPIResponse');- expect(responseUtilsSource).toContain('export async function parseOptionalSuccessAPIResponse');- expect(responseUtilsSource).toContain(- 'export async function parseOptionalAPIResponseOrAllowedStatus',- );- expect(responseUtilsSource).toContain('export async function parseRequiredAPIResponseOrNull');- expect(responseUtilsSource).toContain('export async function parseOptionalAPIResponseOrNull');- expect(responseUtilsSource).toContain('export async function parseRequiredJSON');- expect(responseUtilsSource).toContain('export async function parseJSONSafe');- expect(responseUtilsSource).toContain('export function parseJSONTextSafe');- expect(responseUtilsSource).toContain('export function arrayOrEmpty');- expect(responseUtilsSource).toContain('export function arrayOrUndefined');- expect(responseUtilsSource).toContain('export function objectArrayFieldOrEmpty');- expect(responseUtilsSource).toContain('export function trimmedString');- expect(responseUtilsSource).toContain('export function optionalTrimmedString');- expect(responseUtilsSource).toContain('export function strictString');- expect(responseUtilsSource).toContain('export function strictBoolean');- expect(responseUtilsSource).toContain('export function finiteNumberOrUndefined');- expect(responseUtilsSource).toContain('export function coerceTimestampMillis');- expect(responseUtilsSource).toContain('export function stringArray');- expect(responseUtilsSource).toContain('export function stringRecordOrUndefined');- expect(responseUtilsSource).toContain('export function normalizeStructuredAPIError');- expect(responseUtilsSource).toContain('export function promoteLegacyAlertIdentifier');- expect(metadataClientSource).toContain('export function buildMetadataAPI');- expect(metadataClientSource).toContain('export interface ResourceMetadataRecord');- expect(resourcesSource).toContain('export class ResourceAPI');- expect(resourcesSource).toContain('apiFetchJSON');- expect(resourcesSource).not.toContain('response.json()');- expect(streamingSource).toContain('export async function consumeJSONEventStream');- expect(responseUtilsSource).toContain('(error as APIErrorLike).status');- expect(responseUtilsSource).toContain('response.status');- });-- it('routes canonical status and JSON parsing through responseUtils', () => {- expect(aiSource).toContain('withAPIErrorStatusFallback');- expect(aiSource).toContain('withAPIErrorStatusNull');- expect(aiSource).toContain('assertAPIResponseOK(response,');- expect(aiSource).toContain('consumeJSONEventStream<AIStreamEvent>(response,');- expect(aiSource).toContain('promoteLegacyAlertIdentifier(');- expect(aiSource).not.toContain("message.includes('402')");- expect(aiSource).not.toContain('isAPIErrorStatus(error, 402)');- expect(aiSource).not.toContain('isAPIErrorStatus(error, 404)');- expect(aiSource).not.toContain('JSON.parse(');- expect(aiSource).not.toContain('TextDecoder');- expect(aiSource).not.toContain('getReader(');- expect(aiSource).not.toContain('STREAM_TIMEOUT_MS');- expect(aiSource).not.toContain('private static encodeSegment(');- expect(aiSource).not.toContain('private static isPaymentRequiredError(');- expect(aiSource).not.toContain('readAPIErrorMessage(');- expect(aiSource).not.toContain('} catch {\n return null;');- expect(aiSource).not.toContain('normalizeUnifiedFinding(');-- expect(agentProfilesSource).toContain('withAPIErrorStatusFallback');- expect(agentProfilesSource).toContain('withAPIErrorStatusNull');- expect(agentProfilesSource).toContain('assertAPIResponseOKOrAllowedStatus(');- expect(agentProfilesSource).toContain('assertAPIResponseOKOrThrowStatus(');- expect(agentProfilesSource).toContain('parseRequiredAPIResponse(');- expect(agentProfilesSource).toContain('assertAPIResponseOK(response,');- expect(agentProfilesSource).not.toContain("message.includes('402')");- expect(agentProfilesSource).not.toContain("message.includes('404')");- expect(agentProfilesSource).not.toContain('isAPIErrorStatus(err, 402)');- expect(agentProfilesSource).not.toContain('isAPIErrorStatus(err, 404)');- expect(agentProfilesSource).not.toContain('response.status !== 204');- expect(agentProfilesSource).not.toContain('if (!isAPIResponseStatus(response, 204))');- expect(agentProfilesSource).not.toContain('response.status === 503');- expect(agentProfilesSource).not.toContain('return response.json()');- expect(agentProfilesSource).not.toContain('parseRequiredJSON(response,');- expect(agentProfilesSource).not.toContain('readAPIErrorMessage(');-- expect(monitoringSource).toContain('parseOptionalAPIResponseOrAllowedStatus(');- expect(monitoringSource).toContain('parseOptionalSuccessAPIResponse<');- expect(monitoringSource).toContain('parseOptionalAPIResponseOrNull<AgentLookupResponse>(');- expect(monitoringSource).toContain('async function deleteResource<');- expect(monitoringSource).toContain('async function runIdempotentResourceMutation(url: string)');- expect(monitoringSource).toContain('async function setResourceDisplayName(');- expect(monitoringSource).toContain('async function runResourceAction(url: string)');- expect(monitoringSource).toContain('async function triggerResourceCommand<');- expect(monitoringSource).toContain('assertAPIResponseOK(response,');- expect(monitoringSource).toContain('assertAPIResponseOKOrAllowedStatus(response, 404,');- expect(monitoringSource).toContain('assertAPIResponseOKOrThrowStatus(');- expect(monitoringSource).toContain('coerceTimestampMillis(identity.lastSeen, Date.now())');- expect(monitoringSource).toContain("'Failed to parse agent lookup response'");- expect(- monitoringSource.match(- /parseOptionalAPIResponseOrAllowedStatus\(\s*response,\s*\[204,\s*404\]/g,- ) ?? [],- ).toHaveLength(1);- expect(- monitoringSource.match(- /assertAPIResponseOKOrAllowedStatus\(response,\s*404,\s*`Failed with status \$\{response\.status\}`\)/g,- ) ?? [],- ).toHaveLength(1);- expect(- monitoringSource.match(/body:\s*JSON\.stringify\(\{\s*displayName\s*\}\)/g) ?? [],- ).toHaveLength(1);- expect(- monitoringSource.match(/assertAPIResponseOKOrThrowStatus\(\s*response,\s*404,/g) ?? [],- ).toHaveLength(1);- expect(- monitoringSource.match(- /const response = await apiFetch\(url,\s*\{\s*method: 'POST',\s*\}\);/g,- ) ?? [],- ).toHaveLength(1);- expect(monitoringSource.match(/return triggerResourceCommand</g) ?? []).toHaveLength(1);- expect(monitoringSource.match(/await runResourceAction\(url\);/g) ?? []).toHaveLength(3);- expect(monitoringSource.match(/parseOptionalSuccessAPIResponse</g) ?? []).toHaveLength(1);- expect(monitoringSource).not.toContain('response.status === 404');- expect(monitoringSource).not.toContain('JSON.parse(');- expect(monitoringSource).not.toContain("typeof lastSeen === 'string'");- expect(monitoringSource).not.toContain('Date.parse(lastSeen)');- expect(monitoringSource).not.toContain('readAPIErrorMessage(');-- expect(agentMetadataSource).toContain(- "buildMetadataAPI<AgentMetadata>('/api/agents/metadata')",- );- expect(agentMetadataSource).not.toContain('apiFetchJSON(');- expect(dockerMetadataSource).toContain(- "buildMetadataAPI<DockerMetadata>('/api/docker/metadata')",- );- expect(dockerMetadataSource).not.toContain('apiFetchJSON(');- expect(guestMetadataSource).toContain(- "buildMetadataAPI<GuestMetadata>('/api/guests/metadata')",- );- expect(guestMetadataSource).not.toContain('apiFetchJSON(');- });-- it('keeps thin metadata models as shared record aliases', () => {- expect(agentMetadataSource).toContain('export type AgentMetadata = ResourceMetadataRecord;');- expect(agentMetadataSource).not.toContain(- 'export interface AgentMetadata extends ResourceMetadataRecord',- );- expect(dockerMetadataSource).toContain('export type DockerMetadata = ResourceMetadataRecord;');- expect(dockerMetadataSource).not.toContain(- 'export interface DockerMetadata extends ResourceMetadataRecord',- );- expect(guestMetadataSource).toContain('export type GuestMetadata = ResourceMetadataRecord;');- expect(guestMetadataSource).not.toContain(- 'export interface GuestMetadata extends ResourceMetadataRecord',- );- });-- it('shares tolerant collection normalization without inventing credential absence', () => {- expect(aiSource).toContain('arrayOrEmpty<UnifiedFindingRecord>(response.findings)');- expect(aiSource).toContain("objectArrayFieldOrEmpty<ApprovalRequest>(response, 'approvals')");- expect(aiSource).not.toContain('response.approvals || []');- expect(aiSource).not.toContain('Array.isArray(data?.plans)');-- expect(alertsSource).toContain('arrayOrEmpty<Incident>(incidents)');- expect(alertsSource).toContain('arrayOrEmpty<{');- expect(alertsSource).not.toContain('incidents || []');- expect(alertsSource).not.toContain('response.results || []');- expect(alertsSource).not.toContain('normalizeAlertResult(');- expect(alertsSource).not.toContain('normalizeIncident(');- expect(alertsSource).not.toContain('normalizeIncidents(');-- // Credential absence can drive access posture and local revocation state.- // It must not use the tolerant empty-on-malformed collection helper.- // security.test.ts exercises complete admission and rejection at runtime.- expect(securitySource).not.toContain('objectArrayFieldOrEmpty');- expect(securitySource).not.toContain('response.tokens ?? []');-- expect(notificationsSource).toContain('arrayOrEmpty<Webhook>(data)');- expect(notificationsSource).not.toContain('Array.isArray(data) ? data : []');-- expect(nodesSource).toContain('arrayOrUndefined<RawClusterEndpoint>(node.clusterEndpoints)');- expect(nodesSource).not.toContain('Array.isArray(node.clusterEndpoints)');-- expect(patrolSource).toContain('arrayOrEmpty<PatrolRunRecord>(runs)');- expect(patrolSource).toContain('promoteLegacyAlertIdentifier(');- expect(patrolSource).toContain('async function fetchPatrolRunHistory(search: URLSearchParams)');- expect(patrolSource).not.toContain('runs || []');- expect(- patrolSource.match(- /apiFetchJSON<PatrolRunRecord\[\]>\(`\/api\/ai\/patrol\/runs\?\$\{search\.toString\(\)\}`\)/g,- ) ?? [],- ).toHaveLength(1);- expect(- patrolSource.match(/arrayOrEmpty<PatrolRunRecord>\(runs\)\s*\.map\(/g) ?? [],- ).toHaveLength(1);- expect(patrolSource.match(/return fetchPatrolRunHistory\(search\);/g) ?? []).toHaveLength(2);-- expect(agentProfilesSource).toContain('arrayOrEmpty<AgentProfile>(response)');- expect(agentProfilesSource).toContain('arrayOrEmpty<AgentProfileAssignment>(response)');- expect(agentProfilesSource).toContain('parseRequiredJSON<ConfigKeyDefinitionResponse[]>');- expect(agentProfilesSource).toContain('arrayOrEmpty<ConfigKeyDefinitionResponse>(');- expect(agentProfilesSource).toContain(- "objectArrayFieldOrEmpty<ConfigValidationErrorResponse>(parsed, 'Errors')",- );- expect(agentProfilesSource).not.toContain('response || []');- expect(agentProfilesSource).not.toContain('response.Errors || []');- });-- it('routes canonical scalar coercion through responseUtils', () => {- expect(nodesSource).toContain('trimmedString(endpoint.nodeId)');- expect(nodesSource).toContain('optionalTrimmedString(endpoint.guestURL)');- expect(nodesSource).toContain('strictBoolean(endpoint.online)');- expect(nodesSource).not.toContain('const asString =');- expect(nodesSource).not.toContain('const asOptionalString =');- expect(nodesSource).not.toContain('const asBoolean =');-- expect(notificationsSource).toContain('strictString(backendConfig.provider)');- expect(notificationsSource).toContain('strictBoolean(backendConfig.enabled)');- expect(notificationsSource).toContain('finiteNumberOrUndefined(backendConfig.port)');- expect(notificationsSource).toContain('stringArray(backendConfig.to)');- expect(notificationsSource).not.toContain('private static readString(');- expect(notificationsSource).not.toContain('private static readBoolean(');- expect(notificationsSource).not.toContain('private static readNumber(');- expect(notificationsSource).not.toContain('private static readStringArray(');- });-- it('bans raw message-based 402/404 heuristics, raw governed response-status checks, raw governed response parsing, module-local collection fallbacks, module-local scalar helper stacks, module-local structured error normalization, module-local timestamp coercion, no-op governed payload wrappers, duplicate legacy alert_identifier promotion, no-op AI helper aliases, raw governed parsed-error throwing, raw governed assert-then-parse pipelines, raw governed 404-null response branches, raw duplicated metadata CRUD clients, raw duplicated SSE stream readers, raw monitoring allowed-status branches, raw agent-profile 204 success branches, raw custom-status error branches, raw monitoring success-envelope fallbacks, raw apiFetchJSON status-fallback catches', () => {- const runtimeEntries = Object.entries(apiSources).filter(- ([path]) => !path.endsWith('/responseUtils.ts'),- );- const rawStatusHeuristicPattern = /message\.includes\((['"])40[24]\1\)/;- const rawGovernedResponseStatusPattern = /response\.status\s*(?:===|!==)\s*(?:204|404|503)/;- const governedParsingEntries = runtimeEntries.filter(([path]) =>- /\/(?:ai|aiChat|agentProfiles|monitoring)\.ts$/.test(path),- );- const rawResponseJSONPattern = /(?:return\s+)?(?:await\s+)?response\.json\(/;- const rawManualJSONParsePattern = /JSON\.parse\(/;- const governedCollectionEntries = runtimeEntries.filter(([path]) =>- /\/(?:ai|alerts|agentProfiles|nodes|notifications|patrol|security)\.ts$/.test(path),- );- const rawArrayFallbackPattern = /(?:\|\||\?\?)\s*\[\]/;- const rawArrayIsArrayFallbackPattern = /Array\.isArray\(.+\)\s*\?\s*.+:\s*\[\]/;- const rawOptionalArrayNormalizationPattern = /Array\.isArray\(node\.clusterEndpoints\)/;- const governedScalarEntries = runtimeEntries.filter(([path]) =>- /\/(?:nodes|notifications)\.ts$/.test(path),- );- const rawScalarHelperPattern =- /(?:const\s+asString\s*=|const\s+asOptionalString\s*=|const\s+asBoolean\s*=|private\s+static\s+readString\(|private\s+static\s+readBoolean\(|private\s+static\s+readNumber\(|private\s+static\s+readStringArray\()/;- const governedStructuredErrorEntries = runtimeEntries.filter(([path]) =>- /\/hostedSignup\.ts$/.test(path),- );- const rawStructuredErrorPattern =- /(?:function\s+normalizeHostedError\(|typeof\s+obj\.code\s*===\s*'string'|typeof\s+obj\.message\s*===\s*'string')/;- const governedTimestampEntries = runtimeEntries.filter(([path]) =>- /\/monitoring\.ts$/.test(path),- );- const rawTimestampCoercionPattern =- /(?:typeof\s+lastSeen\s*===\s*'string'|Date\.parse\(lastSeen\)|typeof\s+lastSeen\s*===\s*'number')/;- const governedWrapperEntries = runtimeEntries.filter(([path]) => /\/alerts\.ts$/.test(path));- const noOpWrapperPattern =- /(?:normalizeAlertResult\(|normalizeIncident\(|normalizeIncidents\()/;- const governedAlertIdentifierEntries = runtimeEntries.filter(([path]) =>- /\/(?:ai|patrol)\.ts$/.test(path),- );- const duplicateAlertIdentifierPattern =- /(?:normalizeUnifiedFinding\(|alert_identifier:\s*_alertIdentifier|const\s+alertIdentifier\s*=\s*.+alert_identifier)/;- const governedAiAliasEntries = runtimeEntries.filter(([path]) =>- /\/(?:ai|aiChat)\.ts$/.test(path),- );- const noOpAiAliasPattern =- /(?:private\s+static\s+encodeSegment\(|private\s+static\s+isPaymentRequiredError\()/;- const governedResponseErrorEntries = runtimeEntries.filter(([path]) =>- /\/(?:ai|aiChat|agentProfiles|monitoring)\.ts$/.test(path),- );- const rawParsedErrorThrowPattern =- /(?:readAPIErrorMessage\(|throw\s+new\s+Error\(\s*await\s+readAPIErrorMessage\()/;- const governedAssertParseEntries = runtimeEntries.filter(([path]) =>- /\/(?:agentProfiles|monitoring)\.ts$/.test(path),- );- const rawAssertThenParsePattern =- /assertAPIResponseOK\((response|agentListResponse),[\s\S]{0,160}?parse(?:Required|Optional)JSON\(\1,/;- const governedNullLookupEntries = runtimeEntries.filter(([path]) =>- /\/monitoring\.ts$/.test(path),- );- const rawNullLookupPattern =- /if\s*\(\s*isAPIResponseStatus\(response,\s*404\)\s*\)\s*\{\s*return null;\s*\}/;- const governedMetadataEntries = runtimeEntries.filter(([path]) =>- /\/(?:agentMetadata|dockerMetadata|guestMetadata)\.ts$/.test(path),- );- const rawMetadataCrudPattern =- /(?:apiFetchJSON\(|private static baseUrl = '\/api\/(?:agents|docker|guests)\/metadata')/;- const governedStreamEntries = runtimeEntries.filter(([path]) =>- /\/(?:ai|aiChat)\.ts$/.test(path),- );- const rawStreamReaderPattern =- /(?:TextDecoder|getReader\(|STREAM_TIMEOUT_MS|Read timeout|split\('\n\n'\)|startsWith\('data: '\))/;- const governedMonitoringAllowedStatusEntries = runtimeEntries.filter(([path]) =>- /\/monitoring\.ts$/.test(path),- );- const rawMonitoringAllowedDeletePattern =- /if\s*\(!response\.ok\)\s*\{\s*if\s*\(isAPIResponseStatus\(response,\s*404\)\)\s*\{\s*return\s+\{\};\s*\}[\s\S]{0,160}?assertAPIResponseOK\([^\n]+\);\s*\}\s*if\s*\(isAPIResponseStatus\(response,\s*204\)\)\s*\{\s*return\s+\{\};\s*\}/;- const rawMonitoringAllowedMutationPattern =- /if\s*\(!response\.ok\)\s*\{\s*if\s*\(isAPIResponseStatus\(response,\s*404\)\)\s*\{\s*(?:\/\/[^\n]*\n\s*)?return;\s*\}[\s\S]{0,160}?assertAPIResponseOK\([^\n]+\);\s*\}/;- const governedAgentProfileAllowedStatusEntries = runtimeEntries.filter(([path]) =>- /\/agentProfiles\.ts$/.test(path),- );- const rawAgentProfileAllowedStatusPattern =- /if\s*\(!isAPIResponseStatus\(response,\s*204\)\)\s*\{\s*await\s+assertAPIResponseOK\(response,\s*`Failed to (?:delete profile|unassign profile): \$\{response\.status\}`\);\s*\}/;- const governedCustomStatusErrorEntries = runtimeEntries.filter(([path]) =>- /\/(?:agentProfiles|monitoring)\.ts$/.test(path),- );- const rawCustomStatusErrorPattern =- /if\s*\(!response\.ok\)\s*\{\s*if\s*\(isAPIResponseStatus\(response,\s*(?:404|503)\)\)\s*\{\s*throw\s+new\s+Error\(/;- const governedMonitoringSuccessEnvelopeEntries = runtimeEntries.filter(([path]) =>- /\/monitoring\.ts$/.test(path),- );- const rawMonitoringSuccessEnvelopePattern =- /parseOptionalAPIResponse\(\s*response,\s*\{\s*success:\s*true\s*\}/;- const governedFetchJSONFallbackEntries = runtimeEntries.filter(([path]) =>- /\/(?:ai|agentProfiles)\.ts$/.test(path),- );- const rawFetchJSONStatusFallbackPattern = /isAPIErrorStatus\((?:error|err),\s*(?:402|404)\)/;-- const heuristicOffenders = runtimeEntries- .filter(([, source]) => rawStatusHeuristicPattern.test(source))- .map(([path]) => path)- .sort();-- const responseStatusOffenders = runtimeEntries- .filter(([, source]) => rawGovernedResponseStatusPattern.test(source))- .map(([path]) => path)- .sort();-- const responseJSONOffenders = governedParsingEntries- .filter(([, source]) => rawResponseJSONPattern.test(source))- .map(([path]) => path)- .sort();-- const manualJSONParseOffenders = governedParsingEntries- .filter(([, source]) => rawManualJSONParsePattern.test(source))- .map(([path]) => path)- .sort();-- const arrayFallbackOffenders = governedCollectionEntries- .filter(- ([, source]) =>- rawArrayFallbackPattern.test(source) ||- rawArrayIsArrayFallbackPattern.test(source) ||- rawOptionalArrayNormalizationPattern.test(source),- )- .map(([path]) => path)- .sort();-- const scalarHelperOffenders = governedScalarEntries- .filter(([, source]) => rawScalarHelperPattern.test(source))- .map(([path]) => path)- .sort();-- const structuredErrorOffenders = governedStructuredErrorEntries- .filter(([, source]) => rawStructuredErrorPattern.test(source))- .map(([path]) => path)- .sort();-- const timestampCoercionOffenders = governedTimestampEntries- .filter(([, source]) => rawTimestampCoercionPattern.test(source))- .map(([path]) => path)- .sort();-- const noOpWrapperOffenders = governedWrapperEntries- .filter(([, source]) => noOpWrapperPattern.test(source))- .map(([path]) => path)- .sort();-- const duplicateAlertIdentifierOffenders = governedAlertIdentifierEntries- .filter(([, source]) => duplicateAlertIdentifierPattern.test(source))- .map(([path]) => path)- .sort();-- const noOpAiAliasOffenders = governedAiAliasEntries- .filter(([, source]) => noOpAiAliasPattern.test(source))- .map(([path]) => path)- .sort();-- const rawParsedErrorThrowOffenders = governedResponseErrorEntries- .filter(([, source]) => rawParsedErrorThrowPattern.test(source))- .map(([path]) => path)- .sort();-- const rawAssertThenParseOffenders = governedAssertParseEntries- .filter(([, source]) => rawAssertThenParsePattern.test(source))- .map(([path]) => path)- .sort();-- const rawNullLookupOffenders = governedNullLookupEntries- .filter(([, source]) => rawNullLookupPattern.test(source))- .map(([path]) => path)- .sort();-- const rawMetadataCrudOffenders = governedMetadataEntries- .filter(([, source]) => rawMetadataCrudPattern.test(source))- .map(([path]) => path)- .sort();-- const rawStreamReaderOffenders = governedStreamEntries- .filter(([, source]) => rawStreamReaderPattern.test(source))- .map(([path]) => path)- .sort();-- const rawMonitoringAllowedStatusOffenders = governedMonitoringAllowedStatusEntries- .filter(- ([, source]) =>- rawMonitoringAllowedDeletePattern.test(source) ||- rawMonitoringAllowedMutationPattern.test(source),- )- .map(([path]) => path)- .sort();-- const rawAgentProfileAllowedStatusOffenders = governedAgentProfileAllowedStatusEntries- .filter(([, source]) => rawAgentProfileAllowedStatusPattern.test(source))- .map(([path]) => path)- .sort();-- const rawCustomStatusErrorOffenders = governedCustomStatusErrorEntries- .filter(([, source]) => rawCustomStatusErrorPattern.test(source))- .map(([path]) => path)- .sort();-- const rawMonitoringSuccessEnvelopeOffenders = governedMonitoringSuccessEnvelopeEntries- .filter(([, source]) => rawMonitoringSuccessEnvelopePattern.test(source))- .map(([path]) => path)- .sort();-- const rawFetchJSONStatusFallbackOffenders = governedFetchJSONFallbackEntries- .filter(([, source]) => rawFetchJSONStatusFallbackPattern.test(source))- .map(([path]) => path)- .sort();-- expect(heuristicOffenders).toEqual([]);- expect(responseStatusOffenders).toEqual([]);- expect(responseJSONOffenders).toEqual([]);- expect(manualJSONParseOffenders).toEqual([]);- expect(arrayFallbackOffenders).toEqual([]);- expect(scalarHelperOffenders).toEqual([]);- expect(structuredErrorOffenders).toEqual([]);- expect(timestampCoercionOffenders).toEqual([]);- expect(noOpWrapperOffenders).toEqual([]);- expect(duplicateAlertIdentifierOffenders).toEqual([]);- expect(noOpAiAliasOffenders).toEqual([]);- expect(rawParsedErrorThrowOffenders).toEqual([]);- expect(rawAssertThenParseOffenders).toEqual([]);- expect(rawNullLookupOffenders).toEqual([]);- expect(rawMetadataCrudOffenders).toEqual([]);- expect(rawStreamReaderOffenders).toEqual([]);- expect(rawMonitoringAllowedStatusOffenders).toEqual([]);- expect(rawAgentProfileAllowedStatusOffenders).toEqual([]);- expect(rawCustomStatusErrorOffenders).toEqual([]);- expect(rawMonitoringSuccessEnvelopeOffenders).toEqual([]);- expect(rawFetchJSONStatusFallbackOffenders).toEqual([]);- });-});diff --git a/frontend-modern/src/components/AI/__tests__/FindingsPanel.links.test.tsx b/frontend-modern/src/components/AI/__tests__/FindingsPanel.links.test.tsxindex 3f4f38fa6e..9a531f8e6e 100644--- a/frontend-modern/src/components/AI/__tests__/FindingsPanel.links.test.tsx+++ b/frontend-modern/src/components/AI/__tests__/FindingsPanel.links.test.tsx@@ -1,9 +1,10 @@-import { fireEvent, render, screen, waitFor } from '@solidjs/testing-library';+import { fireEvent, render, screen, waitFor, within } from '@solidjs/testing-library';import { createSignal, type JSX } from 'solid-js';import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';import { FindingsPanel } from '../FindingsPanel';import { RELATIVE_TIME_TICK_MS } from '@/utils/relativeTimeClock';+import { notificationStore } from '@/stores/notifications';const mockState = vi.hoisted(() => {const loadFindings = vi.fn();@@ -85,9 +86,16 @@ const mockState = vi.hoisted(() => {getResource,loadFindings,loadPatrolFindings,+ resolveFinding: vi.fn(async (_id: string) => true),+ reopenFinding: vi.fn(async (_id: string) => true),+ copyToClipboard: vi.fn(async (_text: string) => true),};});+vi.mock('@/utils/clipboard', () => ({+ copyToClipboard: (text: string) => mockState.copyToClipboard(text),+}));+vi.mock('@solidjs/router', () => ({A: (props: { href: string; children?: JSX.Element; [key: string]: unknown }) => (<a href={props.href} aria-label={props['aria-label'] as string} onClick={props.onClick as any}>@@ -174,6 +182,8 @@ vi.mock('@/stores/aiIntelligence', () => ({patrolFindingsSignal: () => mockState.patrolFindings,loadFindings: mockState.loadFindings,loadPatrolFindings: mockState.loadPatrolFindings,+ resolveFinding: (id: string) => mockState.resolveFinding(id),+ reopenFinding: (id: string) => mockState.reopenFinding(id),},}));@@ -222,6 +232,11 @@ describe('FindingsPanel resource links', () => {mockState.loadFindings.mockClear();mockState.loadPatrolFindings.mockClear();mockState.getResource.mockClear();+ mockState.resolveFinding.mockClear().mockResolvedValue(true);+ mockState.reopenFinding.mockClear().mockResolvedValue(true);+ mockState.copyToClipboard.mockClear().mockResolvedValue(true);+ vi.mocked(notificationStore.success).mockClear();+ vi.mocked(notificationStore.error).mockClear();mockState.findingsLoading = false;mockState.findingsError = null;mockState.patrolFindingsLoading = false;@@ -301,6 +316,7 @@ describe('FindingsPanel resource links', () => {);expect(screen.queryByRole('button', { name: 'Open in Assistant' })).not.toBeInTheDocument();expect(screen.queryByText('Manage')).not.toBeInTheDocument();+ expect(screen.queryByText('Resolve or dismiss')).not.toBeInTheDocument();});it('keeps finding disclosure separate from inline manual controls', async () => {@@ -684,6 +700,337 @@ describe('FindingsPanel resource links', () => {),).toBeInTheDocument();});++ describe('expanded finding detail and actions', () => {+ const providerIssue = () => mockState.initialPatrolFindings[0];+ const providerTitle = 'Provider connection issue';+ const expandRow = () =>+ fireEvent.click(screen.getByRole('button', { name: `Review issue for ${providerTitle}` }));++ const renderPatrol = async (props: Record<string, unknown> = {}) => {+ const view = render(() => <FindingsPanel findingsSource="patrol" {...props} />);+ await waitFor(() => expect(mockState.loadPatrolFindings).toHaveBeenCalled());+ return view;+ };+ const openOptions = async (props: Record<string, unknown> = {}) => {+ const view = await renderPatrol(props);+ fireEvent.click(screen.getByRole('button', { name: `Finding options for ${providerTitle}` }));+ return view;+ };++ it('shows the consequence, evidence, last fix and fill-up forecast in the expanded issue', async () => {+ mockState.patrolFindings = [+ {+ ...providerIssue(),+ key: 'apt-host-updates',+ impact: 'Writes fail once the pool is full.',+ evidence:+ 'pending_updates=3 inventory=abc123 checked_at=2026-04-01T10:00:00Z received_at=2026-04-01T10:01:00Z reboot_required=false',+ previousResolvedFixSummary: 'Pruned old snapshots.',+ capacityForecast: { current_pct: 86, daily_change: 1.2, days_to_full: 5 },+ },+ ];+ await renderPatrol();+ expandRow();++ const panel = within(+ await screen.findByRole('complementary', { name: `Review ${providerTitle}` }),+ );+ expect(panel.getByText('Impact:').parentElement).toHaveTextContent(+ 'Writes fail once the pool is full.',+ );+ const checked = panel.getByText('What Pulse checked:').parentElement;+ expect(checked).toHaveTextContent('3 operating system updates were pending');+ expect(checked).not.toHaveTextContent('inventory=');+ expect(panel.getByText('Last time this resolved:').parentElement).toHaveTextContent(+ 'Pruned old snapshots.',+ );+ expect(panel.getByText('Filling up').parentElement).toHaveTextContent(+ '5 days to full at +1.2%/day · 86% used',+ );+ expect(panel.queryByText('Recommendation:')).not.toBeInTheDocument();+ });++ it('offers the plan-locked Pro handoff in the expanded issue', async () => {+ await renderPatrol({+ patrolProHandoff: () => ({ detail: 'Investigating fixes needs Pulse Pro.' }),+ });+ expandRow();++ expect(screen.getByText('Investigating fixes needs Pulse Pro.')).toBeInTheDocument();+ });++ it('puts confidence and regression count on a collapsed row only when they apply', async () => {+ mockState.findings = [+ {+ ...mockState.initialFindings[0],+ id: 'regressed',+ title: 'Regressed finding',+ investigationRecord: { confidence: 'high' },+ regressionCount: 2,+ },+ {+ ...mockState.initialFindings[0],+ id: 'fresh',+ title: 'Fresh finding',+ regressionCount: 0,+ },+ ] as unknown as typeof mockState.findings;+ render(() => <FindingsPanel />);+ await waitFor(() => expect(mockState.loadFindings).toHaveBeenCalled());++ expect(screen.getAllByText('high confidence')).toHaveLength(1);+ expect(screen.getAllByText('regressed 2×')).toHaveLength(1);+ expect(screen.queryByText(/regressed 0/)).not.toBeInTheDocument();+ });++ it('opens and closes a finding with Enter and Space', async () => {+ render(() => <FindingsPanel />);+ await waitFor(() => expect(mockState.loadFindings).toHaveBeenCalled());+ const impact = 'Nextcloud is unreachable for users until readiness recovers.';++ const title = 'Nextcloud failed readiness checks';+ fireEvent.keyDown(screen.getByRole('button', { name: `Open issue details for ${title}` }), {+ key: 'Enter',+ });+ expect(screen.getByText(impact)).toBeInTheDocument();++ fireEvent.keyDown(screen.getByRole('button', { name: `Close issue details for ${title}` }), {+ key: ' ',+ });+ expect(screen.queryByText(impact)).not.toBeInTheDocument();++ fireEvent.click(screen.getByRole('button', { name: `Open issue details for ${title}` }));+ expect(screen.getByText(impact)).toBeInTheDocument();+ });++ it('marks an active finding resolved through the store and says so', async () => {+ await openOptions();+ expect(screen.queryByRole('button', { name: 'Reopen finding' })).not.toBeInTheDocument();++ fireEvent.click(screen.getByRole('button', { name: 'Mark resolved' }));++ await waitFor(() =>+ expect(mockState.resolveFinding).toHaveBeenCalledWith('finding-provider-issue'),+ );+ await waitFor(() =>+ expect(notificationStore.success).toHaveBeenCalledWith('Finding marked resolved'),+ );+ });++ it('lets an operator reopen a dismissed finding', async () => {+ mockState.patrolFindings = [+ { ...providerIssue(), status: 'dismissed', dismissedReason: 'not_an_issue' },+ ];+ await renderPatrol({ filterOverride: 'all' });+ expandRow();+ expect(screen.queryByRole('button', { name: 'Mark resolved' })).not.toBeInTheDocument();++ fireEvent.click(screen.getByRole('button', { name: 'Reopen finding' }));++ await waitFor(() =>+ expect(mockState.reopenFinding).toHaveBeenCalledWith('finding-provider-issue'),+ );+ await waitFor(() =>+ expect(notificationStore.success).toHaveBeenCalledWith('Finding reopened'),+ );+ });++ it('attributes a dismissal made by an operator-set state to its cause', async () => {+ mockState.patrolFindings = [+ {+ ...providerIssue(),+ status: 'dismissed',+ dismissedReason: 'expected_behavior',+ lifecycle: [+ {+ at: '2026-04-03T00:00:00Z',+ type: 'dismissed',+ metadata: { operator_state_cause: 'maintenance_window' },+ },+ ],+ },+ {+ ...providerIssue(),+ id: 'manual-dismissal',+ title: 'Manually dismissed issue',+ status: 'dismissed',+ dismissedReason: 'expected_behavior',+ lifecycle: [+ { at: '2026-04-03T00:00:00Z', type: 'dismissed', metadata: { reason: 'expected' } },+ ],+ },+ ];+ await renderPatrol({ filterOverride: 'all' });++ const badges = screen.getAllByTitle(+ 'Auto-suppressed by Pulse based on operator-set state for this resource.',+ );+ expect(badges).toHaveLength(1);+ expect(badges[0]).toHaveTextContent('auto: maintenance');+ });++ it('copies a finding summary and says whether it worked', async () => {+ await openOptions();++ fireEvent.click(screen.getByRole('button', { name: 'Copy summary' }));+ await waitFor(() => expect(mockState.copyToClipboard).toHaveBeenCalledTimes(1));+ expect(mockState.copyToClipboard.mock.calls[0][0]).toContain(providerTitle);+ await waitFor(() =>+ expect(notificationStore.success).toHaveBeenCalledWith('Finding summary copied'),+ );++ mockState.copyToClipboard.mockResolvedValueOnce(false);+ fireEvent.click(screen.getByRole('button', { name: 'Copy summary' }));+ await waitFor(() =>+ expect(notificationStore.error).toHaveBeenCalledWith('Could not copy finding summary'),+ );+ });++ it('will not offer a suppression rule for a finding with no concrete category', async () => {+ mockState.patrolFindings = [{ ...providerIssue(), category: '' }];+ await openOptions();++ const createRule = screen.getByRole('button', { name: 'Create rule from this' });+ expect(createRule).toBeDisabled();+ expect(createRule).toHaveAttribute(+ 'title',+ 'This finding is missing the resource or category needed for a scoped rule',+ );+ });++ it('tells the operator what each dismissal will do before they confirm', async () => {+ mockState.patrolFindings = [{ ...providerIssue(), regressionCount: 2 }];+ await openOptions();++ fireEvent.click(screen.getByRole('button', { name: 'Dismiss: Later' }));+ expect(screen.getByText(/Pulse will stay quiet on this for 7 days/)).toBeInTheDocument();+ expect(screen.queryByText(/this finding has regressed/)).not.toBeInTheDocument();++ fireEvent.click(screen.getByRole('button', { name: 'Remember as expected' }));+ expect(+ screen.getByText(/Pulse will keep this finding visible as acknowledged/),+ ).toBeInTheDocument();+ expect(screen.getByText(/this finding has regressed 2 times before/)).toBeInTheDocument();++ fireEvent.click(screen.getByRole('button', { name: 'Dismiss: Not an issue' }));+ expect(screen.getByText(/Pulse will permanently suppress/)).toBeInTheDocument();+ expect(screen.getByText(/this finding has regressed 2 times before/)).toBeInTheDocument();+ });++ // Pulse mirrors the backend's seven-day default, so the confirmation names the+ // date the finding comes back before the operator commits to it.+ it('names the date a will-fix-later dismissal comes back, seven days out', async () => {+ vi.useFakeTimers({ toFake: ['Date'] });+ vi.setSystemTime(new Date('2026-04-01T12:00:00Z'));+ try {+ await openOptions();+ fireEvent.click(screen.getByRole('button', { name: 'Dismiss: Later' }));++ const comesBack = new Date('2026-04-08T12:00:00Z').toLocaleDateString(undefined, {+ weekday: 'short',+ month: 'short',+ day: 'numeric',+ });+ const notice = screen.getByText(/Pulse will stay quiet on this for 7 days/);+ expect(notice).toHaveTextContent(+ `surface it again on ${comesBack} if it is still happening`,+ );+ } finally {+ vi.useRealTimers();+ }+ });++ it('does not warn about recurrence for a finding that has regressed only once', async () => {+ mockState.patrolFindings = [{ ...providerIssue(), regressionCount: 1 }];+ await openOptions();++ fireEvent.click(screen.getByRole('button', { name: 'Dismiss: Not an issue' }));++ expect(screen.getByText(/Pulse will permanently suppress/)).toBeInTheDocument();+ expect(screen.queryByText(/this finding has regressed/)).not.toBeInTheDocument();+ });++ it('keeps raw lifecycle history out of an active issue until history is asked for', async () => {+ mockState.patrolFindings = [+ {+ ...providerIssue(),+ lifecycle: [{ at: '2026-03-30T11:00:00Z', type: 'detected', message: 'Detected' }],+ },+ ];+ const first = await renderPatrol();+ expandRow();+ await screen.findByRole('complementary', { name: `Review ${providerTitle}` });+ expect(screen.queryByText('Lifecycle')).not.toBeInTheDocument();+ first.unmount();++ await renderPatrol({ filterOverride: 'all' });+ expandRow();+ expect(await screen.findByText('Lifecycle')).toBeInTheDocument();+ });++ // Every other way into an issue keeps its history: a finding from the+ // general findings source, one that is no longer active, a Patrol run record,+ // and the resolved list.+ describe('lifecycle history stays visible where it is the point', () => {+ const lifecycle = [{ at: '2026-03-30T11:00:00Z', type: 'detected', message: 'Detected' }];++ it('shows it on a finding from the general findings source', async () => {+ mockState.findings = [+ { ...mockState.initialFindings[0], lifecycle },+ ] as unknown as typeof mockState.findings;+ render(() => <FindingsPanel />);+ await waitFor(() => expect(mockState.loadFindings).toHaveBeenCalled());++ fireEvent.click(+ screen.getByRole('button', {+ name: 'View details for Nextcloud failed readiness checks',+ }),+ );++ expect(await screen.findByText('Lifecycle')).toBeInTheDocument();+ });++ it('shows it on a Patrol finding that is no longer active', async () => {+ mockState.patrolFindings = [{ ...providerIssue(), status: 'dismissed', lifecycle }];+ mockState.attentionFindingIds = ['finding-provider-issue'];+ try {+ await renderPatrol({ filterOverride: 'attention' });+ expandRow();++ expect(await screen.findByText('Lifecycle')).toBeInTheDocument();+ } finally {+ mockState.attentionFindingIds = [];+ }+ });++ it('shows it on an active finding opened from a Patrol run record', async () => {+ mockState.patrolFindings = [{ ...providerIssue(), lifecycle }];+ await renderPatrol({+ filterFindingIds: ['finding-provider-issue'],+ runSnapshot: {+ resources_checked: 3,+ scope_resource_ids: [],+ effective_scope_resource_ids: [],+ finding_ids: ['finding-provider-issue'],+ status: 'critical',+ error_count: 0,+ },+ });+ expandRow();++ expect(await screen.findByText('Lifecycle')).toBeInTheDocument();+ });++ it('shows it in the resolved list', async () => {+ mockState.patrolFindings = [{ ...providerIssue(), status: 'resolved', lifecycle }];+ await renderPatrol({ filterOverride: 'resolved' });+ expandRow();++ expect(await screen.findByText('Lifecycle')).toBeInTheDocument();+ });+ });+ });});describe('FindingsPanel investigate action gating', () => {diff --git a/frontend-modern/src/components/AI/__tests__/FindingsPanel.test.ts b/frontend-modern/src/components/AI/__tests__/FindingsPanel.test.tsindex c051677a80..344555c334 100644--- a/frontend-modern/src/components/AI/__tests__/FindingsPanel.test.ts+++ b/frontend-modern/src/components/AI/__tests__/FindingsPanel.test.ts@@ -63,217 +63,21 @@ const aiFindingPresentationSource = readFileSync();describe('FindingsPanel source wiring', () => {- it('routes bounded APT evidence through the canonical finding presenter in collapsed and expanded detail', () => {- expect(findingsPanelSource).toContain('getFindingEvidencePresentation');- expect(findingsPanelSource).toContain('{getFindingEvidencePresentation(finding)}');- expect(aiFindingPresentationSource).toContain("finding.key === 'apt-host-updates'");- expect(aiFindingPresentationSource).toContain("finding.key === 'apt-package-cache-pressure'");- expect(aiFindingPresentationSource).not.toContain('inventory=${');- expect(aiFindingPresentationSource).not.toContain('fingerprint=${');- });-it('passes stale Patrol coverage into the current-work empty-state presenter', () => {expect(findingsPanelSource).toContain('coverageStale?: boolean');expect(findingsPanelSource).toContain('coverageStale: props.coverageStale');expect(patrolWorkspaceSource).toContain('coverageStale={coverageStale()}');});- it('routes finding loading indicators through the shared LoadingSpinner primitive', () => {- expect(findingsPanelSource).toContain("from '@/components/shared/LoadingSpinner'");- expect(findingsPanelSource).toContain('<LoadingSpinner size="xs" />');- expect(findingsPanelSource).toContain('<LoadingSpinner size="md" />');- });-- it('renders the deterministic capacity-forecast urgency line in expanded finding detail', () => {- // capacity_forecast is a backend-computed fact, not model prose. The panel- // must project it through presentCapacityForecast so the operator sees a- // deterministic "Filling up / Stable · days-to-full · % used" line rather- // than relying on the model-authored description for urgency.- expect(findingsPanelSource).toContain("from '@/utils/patrolCapacityForecastPresentation'");- expect(findingsPanelSource).toContain('presentCapacityForecast(finding.capacityForecast)');- expect(findingsPanelSource).toContain('capacityForecastToneClass');- });-- it('renders the plan-locked at-need Pulse Pro handoff in the finding primary-action area', () => {- expect(findingsPanelSource).toContain('patrolProHandoff?:');- expect(findingsPanelSource).toContain('{proHandoff!.detail}');- expect(findingsPanelSource).toContain('UpgradeButtonLink');+ // The panel renders what it is handed (FindingsPanel.links.test.tsx covers the+ // rendering); only the workspace decides to hand the Pro handoff and the+ // Watch-only nudge over, and which findings source to read.+ it('hands the Pro handoff, the Watch-only nudge and the Patrol source from the Patrol workspace', () => {expect(patrolWorkspaceSource).toContain('getPatrolProInvestigationHandoff');expect(patrolWorkspaceSource).toContain('patrolProHandoff=');- });-- it('renders previousResolvedFixSummary as operational memory in the expanded card', () => {- // The previous-fix summary is captured at regression time and surfaced- // in chat context for Assistant. The expanded card must also show it- // directly so operators see "what worked last time" without opening- // Assistant. The styling is intentionally distinct (emerald accent) so- // it reads as a positive memory cue rather than another alert.- expect(findingsPanelSource).toContain('finding.previousResolvedFixSummary');- expect(findingsPanelSource).toContain('Last time this resolved');- });-- it('keeps finding actions free of Assistant routing now the chat is retired', () => {- expect(findingsPanelSource).not.toContain('Open in Assistant');- expect(findingsPanelSource).not.toContain('aiChatStore');- expect(findingsPanelSource).not.toContain('openFindingInAssistant');- expect(findingsPanelSource).not.toContain('Ask Assistant');- expect(findingsPanelSource).not.toContain('remediationPlans');- expect(findingsPanelSource).not.toContain('handleExplainFinding');- expect(findingsPanelSource).not.toContain('handleInvestigateFinding');- expect(findingsPanelSource).not.toContain('handleWhyFinding');- expect(findingsPanelSource).not.toContain('handleVerifyFixFinding');- expect(findingsPanelSource).not.toContain("openFindingInAssistant(finding, '");- });-- it('surfaces investigation_record.confidence as a badge in the collapsed row', () => {- // The seven-question schema's confidence answer should be visible to- // operators without expanding the card. The badge sits next to the- // investigation outcome badge so trust can be scanned in the row.- expect(findingsPanelSource).toContain('finding.investigationRecord?.confidence');- expect(findingsPanelSource).toContain('getInvestigationConfidenceBadgeTone');- expect(findingsPanelSource).toContain('confidence');- });-- it('keeps collapsed finding disclosure separate from inline manual controls', () => {- // The collapsed finding row contains acknowledge/snooze/dismiss controls.- // Those controls must remain siblings of the disclosure area, while the- // row body itself opens the same details panel for normal scanning.- expect(findingsPanelSource).toContain('role="button"');- expect(findingsPanelSource).toContain('tabIndex={0}');- expect(findingsPanelSource).toContain(- 'class="min-w-0 flex-1 cursor-pointer rounded-sm text-left',- );- expect(findingsPanelSource).toContain('aria-expanded={expandedId() === finding.id}');- expect(findingsPanelSource).toContain(- "aria-label={`${expandedId() === finding.id ? 'Close issue details' : 'Open issue details'} for ${title.label}`}",- );- expect(findingsPanelSource).toContain("'Close review'");- expect(findingsPanelSource).toContain("'Review issue'");- expect(findingsPanelSource).toContain("'Hide'");- expect(findingsPanelSource).toContain("'View'");- expect(findingsPanelSource).toContain("e.key === 'Enter' || e.key === ' '");- expect(findingsPanelSource).toContain('onClick={toggleExpanded}');- });-- it('previews the will_fix_later remind-at deadline before the operator confirms dismiss', () => {- // The backend now treats will_fix_later as a real operational commitment- // (Finding.RemindAt, default 7 days), not a silent shut-up. The dismiss- // confirmation panel must communicate that to the operator BEFORE they- // confirm — otherwise the new behavior is invisible until the reminder- // fires a week later. See ai-runtime / patrol-intelligence subsystem- // contracts for the three-way dismissal semantics.- expect(findingsPanelSource).toContain('formatWillFixLaterRemindDate');- expect(findingsPanelSource).toContain("dismissReason() === 'will_fix_later'");- expect(findingsPanelSource).toContain('Pulse will stay quiet on this for 7 days');- // The other two reasons must also have explanatory copy so all three- // dismissal paths feel deliberate, not undifferentiated.- expect(findingsPanelSource).toContain("dismissReason() === 'expected_behavior'");- expect(findingsPanelSource).toContain("dismissReason() === 'not_an_issue'");- expect(findingsPanelSource).toContain('Pulse will keep this finding visible as acknowledged');- expect(findingsPanelSource).toContain('Pulse will permanently suppress');- });-- it('exposes a Copy summary action wired to formatFindingForClipboard and the shared clipboard helper', () => {- // Operators frequently need to delegate a finding by pasting a summary- // into Slack, email, or a ticket. Pin the wiring so the Copy summary- // button routes through the canonical formatter (same shape as the- // helper test below) and the shared copyToClipboard helper, with- // success/error notifications routed through notificationStore.- expect(findingsPanelSource).toContain('handleCopyFindingSummary');- expect(findingsPanelSource).toContain('formatFindingForClipboard(finding)');- expect(findingsPanelSource).toContain('copyToClipboard(text)');- expect(findingsPanelSource).toContain('Finding summary copied');- expect(findingsPanelSource).toContain('Could not copy finding summary');- expect(findingsPanelSource).toMatch(/>\s*Copy summary\s*</);- });-- it('keeps expanded finding actions behind a canonical primary action and explicit outcome menu', () => {- expect(findingsPanelSource).toContain('getFindingPrimaryActionPresentation(finding)');- expect(findingsPanelSource).toContain('Resolve or dismiss');- expect(findingsPanelSource).toContain('min-w-48');- expect(findingsPanelSource).not.toContain('min-w-40');- });-- it('keeps primary-action Patrol runtime findings out of secondary action clutter', () => {- // Runtime/setup findings already have one canonical recovery path:- // provider settings. The expanded card must not add the Assistant- // secondary button or generic outcome menu beside that primary action.- expect(findingsPanelSource).toContain('const shouldShowExpandedManageMenu =');- expect(findingsPanelSource).toContain('!primaryAction ||');- expect(findingsPanelSource).toContain('<Show when={shouldShowExpandedManageMenu}>');- expect(findingsPanelSource).toContain('when={primaryAction}');- expect(findingsPanelSource).not.toContain(- 'getPrimaryAssistantFindingAction(finding).label}\n </button>\n </>',- );- });-- it('surfaces primary Patrol issue actions before expansion', () => {- expect(findingsPanelSource).toContain('shouldShowCollapsedPrimaryAction');- expect(findingsPanelSource).toContain('isPatrolFindingsSource()');- expect(findingsPanelSource).toContain("finding.status === 'active'");- expect(findingsPanelSource).toContain('props.runSnapshot === undefined');- expect(findingsPanelSource).toContain('expandedId() !== finding.id');- expect(findingsPanelSource).toContain(- 'const rowPrimaryAction = getFindingPrimaryActionPresentation(finding)',- );- expect(findingsPanelSource).toContain(- 'shouldShowCollapsedPrimaryAction(finding) && rowPrimaryAction',- );- });-- it('exposes a manual Mark resolved action that goes through the patrol resolve store action', () => {- // The /api/ai/patrol/resolve endpoint exists server-side but had no- // operator path on the canonical Patrol surface. An operator fixing- // an issue out-of-band must be able to close the loop without waiting- // for auto-resolution. The button is gated to active findings (the- // server rejects double-resolves with 404) and routes through- // aiIntelligenceStore.resolveFinding so refresh/error UX stays- // uniform with the existing acknowledge/snooze/dismiss patterns.- expect(findingsPanelSource).toContain('handleResolve');- expect(findingsPanelSource).toContain('aiIntelligenceStore.resolveFinding(finding.id)');- expect(findingsPanelSource).toContain('Mark resolved');- expect(findingsPanelSource).toContain("finding.status === 'active'");- expect(findingsPanelSource).toContain('Show when={manualControls.acknowledge}');- expect(findingsPanelSource).toContain('Finding marked resolved');- });-- it('lets operators reopen dismissed findings from the centralized Findings view', () => {- expect(findingsPanelSource).toContain('handleReopen');- expect(findingsPanelSource).toContain('aiIntelligenceStore.reopenFinding(finding.id)');- expect(findingsPanelSource).toContain("finding.status === 'dismissed'");- expect(findingsPanelSource).toContain('Reopen finding');- expect(findingsPanelSource).toContain('Finding reopened');- });-- it('fails closed before creating a per-finding suppression rule without concrete scope', () => {- // Empty resource/category fields are backend wildcards. The per-finding- // shortcut must not turn missing metadata into a broad suppression rule.- expect(findingsPanelSource).toContain('getFindingSuppressionRuleScope');- expect(findingsPanelSource).toContain('canCreate: Boolean(resourceId && category)');- expect(findingsPanelSource).toContain('!scope.canCreate');- expect(findingsPanelSource).toContain('resourceId: scope.resourceId');- expect(findingsPanelSource).toContain('category: scope.category');- expect(findingsPanelSource).toContain(- 'missing the resource or category needed for a scoped rule',- );- });-- it('surfaces regressionCount as a pill on the collapsed finding row', () => {- // regressionCount is the strongest "this is not a one-off" signal Pulse- // can give an operator scanning a list. The pill must appear in the- // collapsed row (alongside the confidence badge) so triage decisions- // can be made without expanding each card. The pill must only appear- // when regressionCount > 0 — fresh detections must stay clean.- expect(findingsPanelSource).toContain('(finding.regressionCount || 0) > 0');- expect(findingsPanelSource).toContain('regressed {finding.regressionCount}×');- expect(findingsPanelSource).toContain('text-amber-700 dark:text-amber-300');- // The regression pill must sit next to the confidence badge in source order- // so the row reads as one trust-related cluster.- const confidenceIndex = findingsPanelSource.indexOf('confidence');- const regressionIndex = findingsPanelSource.indexOf('regressed {finding.regressionCount}×');- expect(confidenceIndex).toBeGreaterThan(0);- expect(regressionIndex).toBeGreaterThan(0);- expect(regressionIndex).toBeGreaterThan(confidenceIndex);+ expect(patrolWorkspaceSource).toContain('getPatrolWatchOnlyInvestigationNudge');+ expect(patrolWorkspaceSource).toContain("handleAutonomyChange('approval')");+ expect(patrolWorkspaceSource).toContain('findingsSource="patrol"');});it('surfaces only actionable Patrol workflow states from the shared presentation model', () => {@@ -301,84 +105,6 @@ describe('FindingsPanel source wiring', () => {expect(findingsPanelSource).toContain('title={action().detail}');expect(findingsPanelSource).toContain('{action().label}');});-- it('warns the operator before dismissing a recurrent finding as not_an_issue or expected_behavior', () => {- // not_an_issue and expected_behavior both stay quiet forever after dismiss.- // If the finding has already regressed before, the operator may be- // silently dismissing a recurring issue. The dismiss confirmation panel- // must surface that recurrence as a non-blocking hint and nudge them- // toward the reminder-bearing 'will_fix_later' path. The hint must NOT- // appear for will_fix_later itself (already commitment-tracking) or for- // findings with no prior regression.- expect(findingsPanelSource).toContain('(finding.regressionCount || 0) > 1');- expect(findingsPanelSource).toContain("dismissReason() === 'not_an_issue'");- expect(findingsPanelSource).toContain("dismissReason() === 'expected_behavior'");- expect(findingsPanelSource).toContain('this finding has regressed');- expect(findingsPanelSource).toContain('"Later" sets a');- });-- it('badges dismissed-as-will_fix_later rows with their pending remind-at deadline', () => {- // Once a finding is dismissed as will_fix_later, the row must surface the- // pending reminder so the operator knows the commitment exists; otherwise- // the only place the deadline lives is the lifecycle log. The amber tone- // signals "pending operator action" rather than a generic muted note. The- // deadline is in the future, so it counts down on the shared clock rather- // than going through the past-only age formatter, and it reads overdue from- // the same list as the Overdue commitments chip.- expect(findingsPanelSource).toMatch(- /getFindingReminderPresentation\(\s*finding,\s*now\(\),\s*overdueFindingIdSet\(\)\.has\(finding\.id\),?\s*\)/,- );- expect(findingsPanelSource).not.toContain('formatTime(finding.remindAt');- expect(findingsPanelSource).toContain('text-amber-600 dark:text-amber-400');- });-- it('renders the operator-facing Impact line without a Pulse-authored recommendation line', () => {- // The expanded finding card must surface Finding.Impact directly so- // detection-time consequence-if-ignored copy reaches the operator on the- // findings list, not just inside the durable investigation record.- expect(findingsPanelSource).toContain('Show when={finding.impact}');- expect(findingsPanelSource).toContain('>Impact:</span> {finding.impact}');- expect(findingsPanelSource).not.toContain('>Recommendation:</span>');- });-- it('renders the What Pulse checked line from finding.evidence in the expanded card', () => {- // The expanded finding card must surface Finding.Evidence so the- // operator can see what data or checks led to this finding — not just- // the conclusion. This is trust scaffolding: the user can verify that- // Pulse actually checked something relevant before acting.- expect(findingsPanelSource).toContain('Show when={finding.evidence}');- expect(findingsPanelSource).toContain('>What Pulse checked:</span>');- expect(findingsPanelSource).toContain('{finding.evidence}');- });-- it('keeps active Patrol lifecycle history out of the default issue expansion', () => {- // Current issues should answer "what needs doing" first. Raw lifecycle- // history is still available when the operator chooses all/resolved history- // or a run record, but it should not be dumped into the default active- // Patrol issue expansion.- expect(findingsPanelSource).toContain('shouldShowFindingLifecycle');- expect(findingsPanelSource).toContain('!isPatrolFindingsSource()');- expect(findingsPanelSource).toContain("finding.status !== 'active'");- expect(findingsPanelSource).toContain('props.runSnapshot !== undefined');- expect(findingsPanelSource).toContain("filter() === 'all'");- expect(findingsPanelSource).toContain("filter() === 'resolved'");- expect(findingsPanelSource).toContain('Show when={shouldShowFindingLifecycle(finding)}');- });-});--describe('FindingsPanel Watch-only mode nudge slot', () => {- // An actionable active finding on an unlocked Watch-only install must offer- // a forward path into the governed action loop from its own expanded row.- // The nudge lives in the same slot as the plan-locked Pro handoff, and the- // switch must reuse the canonical autonomy save path (handleAutonomyChange)- // rather than introducing a second mode mutation surface.- it('renders the mode nudge in the expanded row and keeps the switch on the shared autonomy save path', () => {- expect(findingsPanelSource).toContain('props.patrolModeNudge?.(finding)');- expect(findingsPanelSource).toContain('props.onPatrolModeNudgeAction?.()');- expect(findingsPanelSource).toContain("'Switching…'");- expect(patrolWorkspaceSource).toContain('getPatrolWatchOnlyInvestigationNudge');- expect(patrolWorkspaceSource).toContain("handleAutonomyChange('approval')");- });});describe('aiFindingPresentation', () => {@@ -866,75 +592,6 @@ describe('aiFindingPresentation', () => {});describe('patrol empty-state presentation', () => {- it('does not duplicate patrol timing metadata in the findings empty state', () => {- expect(findingsPanelSource).not.toContain('CountdownTimer');- expect(findingsPanelSource).not.toContain('lastPatrolLabel');- expect(findingsPanelSource).not.toContain('Runs every');- expect(findingsPanelSource).not.toContain('Next: ');- });-- it('keeps the findings card header functional instead of repeating product marketing copy', () => {- expect(findingsPanelSource).not.toContain(- '<span class="font-medium text-base-content">Patrol findings</span>',- );- expect(findingsPanelSource).not.toContain('Pulse Patrol Findings');- expect(findingsPanelSource).not.toContain('AI-discovered insights');- });-- it('exposes the canonical primary action for Patrol runtime findings inside the expanded row', () => {- expect(findingsPanelSource).toContain('getFindingPrimaryActionPresentation');- expect(findingsPanelSource).toContain('{action().label}');- expect(findingsPanelSource).toContain('href={action().href}');- });-- it('does not cross-jump expanded findings to broad Infrastructure or aggregate workspace routes', () => {- // The platform-first migration retired buildResolvedResourceSurfaceLinks- // and the broad surface-link chips; Patrol findings now stay in place- // rather than offering external surface jumps.- expect(findingsPanelSource).not.toContain("from '@/hooks/useResources'");- expect(findingsPanelSource).not.toContain('buildResolvedResourceSurfaceLinks');- expect(findingsPanelSource).not.toContain('useResources()');- expect(findingsPanelSource).not.toContain('{link.compactLabel}');- });-- it('routes generic finding controls through the shared manual-controls helper', () => {- expect(findingsPanelSource).toContain('getFindingManualControlsPresentation(finding)');- expect(findingsPanelSource).toContain('manualControls.acknowledge');- expect(findingsPanelSource).toContain('manualControls.snooze');- expect(findingsPanelSource).toContain('manualControls.dismiss');- });-- it('keeps inline manual controls out of the default Patrol queue rows', () => {- expect(findingsPanelSource).toContain('const shouldShowInlineManualControls =');- expect(findingsPanelSource).toContain(- "finding.status === 'active' && !isPatrolFindingsSource()",- );- expect(findingsPanelSource).toContain(- '<Show when={shouldShowInlineManualControls(finding)}>',- );- });-- it('does not load legacy remediation plans', () => {- expect(findingsPanelSource).not.toContain('loadRemediationPlans');- expect(findingsPanelSource).not.toContain('getRemediationPlans');- });-- it('can source Patrol findings from the direct Patrol store boundary', () => {- expect(findingsPanelSource).toContain("findingsSource?: 'unified' | 'patrol'");- expect(findingsPanelSource).toContain('aiIntelligenceStore.loadPatrolFindings()');- expect(findingsPanelSource).toContain('aiIntelligenceStore.patrolFindings');- expect(findingsPanelSource).toContain('const sourceHasFindings = createMemo(');- expect(findingsPanelSource).toContain('const shouldShowLoadingState = createMemo(');- expect(findingsPanelSource).toContain('aiIntelligenceStore.patrolFindingsLoading');- expect(findingsPanelSource).toContain('aiIntelligenceStore.patrolFindingsError');- expect(findingsPanelSource).toContain('aiIntelligenceStore.patrolFindingsSignal()');- expect(findingsPanelSource).toContain('aiIntelligenceStore.patrolFindingsNeedingAttention');- expect(findingsPanelSource).toContain(- 'aiIntelligenceStore.patrolFindingsWithPendingApprovals',- );- expect(patrolWorkspaceSource).toContain('findingsSource="patrol"');- });-it('passes Patrol history regression evidence into the findings empty-state helper', () => {expect(findingsPanelSource).toContain('historicalRegressionCount?: number');expect(findingsPanelSource).toContain(@@ -953,11 +610,6 @@ describe('aiFindingPresentation', () => {);});- it('routes same-severity ordering through the shared patrol runtime sort helper', () => {- expect(findingsPanelSource).toContain('getFindingActiveRuntimeSortOrder(a)');- expect(findingsPanelSource).toContain('getFindingActiveRuntimeSortOrder(b)');- });-it('only shows the sort control when there are multiple Patrol findings to sort', () => {expect(findingsPanelSource).toContain('patrolFindingDisplayGroups().length > 1');expect(findingsPanelSource).toContain('FormSelect');@@ -1100,40 +752,6 @@ describe('aiFindingPresentation', () => {expect(aiFindingPresentationSource).toContain('correlatedFindingIds');expect(aiFindingPresentationSource).toContain("String(finding.node || '').trim()");});-- it('uses canonical finding recency presentation instead of raw detected timestamps for active rows', () => {- expect(findingsPanelSource).toContain(- 'const recency = getFindingRecencyPresentation(finding);',- );- expect(findingsPanelSource).toContain("{subject.label} {' · '} {recency.label}");- expect(findingsPanelSource).toContain('{formatTime(recency.timestamp)}');- });-- it('routes row badges through shared metadata badge primitives', () => {- expect(findingsPanelSource).toContain(- 'const severityPresentation = getFindingSeverityPresentation(finding);',- );- expect(findingsPanelSource).toContain('MetadataBadge');- expect(findingsPanelSource).toContain('FINDING_ROW_BADGE_PROPS');- expect(findingsPanelSource).toContain('severityPresentation.badgeTone');- expect(findingsPanelSource).toContain('severityPresentation.label');- expect(findingsPanelSource).not.toContain(- 'px-1.5 py-0.5 border text-[10px] font-medium rounded-sm',- );- });-- it('routes visible finding titles through the shared title presentation helper', () => {- expect(findingsPanelSource).toContain('const title = getFindingTitlePresentation(finding);');- expect(findingsPanelSource).toContain('{title.label}');- });-- it('uses the shared finding subject presentation instead of raw patrol service resource tokens', () => {- expect(findingsPanelSource).toContain(- 'const subject = getFindingSubjectPresentation(finding);',- );- expect(findingsPanelSource).toContain("{subject.label} {' · '} {recency.label}");- expect(findingsPanelSource).not.toContain('{finding.resourceName} ({finding.resourceType})');- });});describe('sourceColors', () => {@@ -1889,30 +1507,4 @@ describe('aiFindingPresentation', () => {expect(formatOperatorStateDismissCauseLabel('')).toBe('');});});-- describe('FindingsPanel operator-state dismiss badge wiring', () => {- it('renders an "auto: <cause>" badge for operator-state-driven dismissals', () => {- // Both manual and auto-dismissed findings show DismissedReason=- // expected_behavior; the auto-dismiss is distinguished by the- // operator_state_cause lifecycle metadata. Pin the wiring so the- // FindingsPanel renders the parallel badge through the canonical- // helper, not by re-implementing the lifecycle scan inline.- expect(findingsPanelSource).toContain('getOperatorStateDismissCause(finding)');- expect(findingsPanelSource).toContain('formatOperatorStateDismissCauseLabel(');- expect(findingsPanelSource).toContain('auto:');- expect(findingsPanelSource).toContain(- 'formatOperatorStateDismissCauseLabel(getOperatorStateDismissCause(finding))',- );- // The badge sits next to the existing dismissed-reason badge in- // source order so the two pieces of information read together- // (the reason and the attribution).- const dismissedReasonIndex = findingsPanelSource.indexOf(- '({formatIdentifierLabel(finding.dismissedReason)})',- );- const autoBadgeIndex = findingsPanelSource.indexOf('auto:');- expect(dismissedReasonIndex).toBeGreaterThan(0);- expect(autoBadgeIndex).toBeGreaterThan(0);- expect(autoBadgeIndex).toBeGreaterThan(dismissedReasonIndex);- });- });});diff --git a/frontend-modern/src/components/Alerts/EmailProviderSelect.test.tsx b/frontend-modern/src/components/Alerts/EmailProviderSelect.test.tsxindex 96eee21c24..0ab9b6a101 100644--- a/frontend-modern/src/components/Alerts/EmailProviderSelect.test.tsx+++ b/frontend-modern/src/components/Alerts/EmailProviderSelect.test.tsx@@ -2,7 +2,6 @@ import { describe, it, expect, vi, beforeEach, afterEach } from 'vitest';import { createSignal } from 'solid-js';import { cleanup, fireEvent, render, screen, waitFor } from '@solidjs/testing-library';import type { UIEmailConfig } from '@/features/alerts/types';-import emailProviderSelectSource from './EmailProviderSelect.tsx?raw';// --- Mock setup (must be before component import) ---const getEmailProvidersMock = vi.fn();@@ -116,11 +115,6 @@ describe('EmailProviderSelect', () => {);});- it('routes multi-line recipient input through FormTextarea', () => {- expect(emailProviderSelectSource).toContain('FormTextarea');- expect(emailProviderSelectSource).not.toContain('<textarea');- });-it('edits resource tag routing and its all-or-any matching mode', () => {render(() => (<EmailProviderSelectdiff --git a/frontend-modern/src/components/Alerts/ResourceTable.test.tsx b/frontend-modern/src/components/Alerts/ResourceTable.test.tsxindex b3e99317fb..32ca4029db 100644--- a/frontend-modern/src/components/Alerts/ResourceTable.test.tsx+++ b/frontend-modern/src/components/Alerts/ResourceTable.test.tsx@@ -2,14 +2,7 @@ import { describe, it, expect, vi, beforeEach, afterEach } from 'vitest';import { createSignal } from 'solid-js';import { waitFor, cleanup, fireEvent, render, screen } from '@solidjs/testing-library';import { ALERT_BULK_EDIT_CLEAR_LABEL } from '@/utils/alertBulkEditPresentation';-import resourceTableSource from '@/components/Alerts/ResourceTable.tsx?raw';-import alertResourceGroupHeaderSource from '@/components/Alerts/AlertResourceGroupHeader.tsx?raw';-import alertResourceTableDesktopSource from '@/components/Alerts/AlertResourceTableDesktop.tsx?raw';-import alertResourceTableMobileSource from '@/components/Alerts/AlertResourceTableMobile.tsx?raw';-import alertResourceTableRowSource from '@/components/Alerts/AlertResourceTableRow.tsx?raw';import alertResourceMetricEditorSource from '@/components/Alerts/AlertResourceMetricEditor.tsx?raw';-import alertResourceTableModelSource from '@/components/Alerts/alertResourceTableModel.ts?raw';-import alertResourceTableStateSource from '@/components/Alerts/useAlertResourceTableState.ts?raw';import {alertResourceSupportsMetric,buildAlertResourceEditPayload,@@ -451,72 +444,10 @@ describe('ResourceTable', () => {});describe('table ownership model', () => {- it('keeps table state and metric rules in dedicated owners', () => {- const rawSvgTag = ['<', 'svg'].join('');-- expect(resourceTableSource).toContain('useAlertResourceTableState');- expect(resourceTableSource).toContain('AlertResourceTableDesktop');- expect(resourceTableSource).toContain('AlertResourceTableMobile');- expect(resourceTableSource).toContain('ActionIconButton');- expect(resourceTableSource).not.toContain(rawSvgTag);- expect(resourceTableSource).not.toContain('const flattenResources = (): Resource[] => {');- expect(resourceTableSource).not.toContain(- 'const normalizeMetricKey = (column: string): string => {',- );- expect(resourceTableSource).not.toContain(- "if (resource.type === 'agent' && ['diskRead', 'diskWrite', 'networkIn', 'networkOut'].includes(",- );- expect(alertResourceTableDesktopSource).toContain(- 'export function AlertResourceTableDesktop',- );- expect(alertResourceTableDesktopSource).toContain('PlatformWindowedRows');- expect(alertResourceTableDesktopSource).toContain('AlertResourceTableRow');- expect(alertResourceTableDesktopSource).toContain('AlertResourceGroupHeader');- expect(alertResourceTableDesktopSource).toContain('ActionIconButton');- expect(alertResourceTableDesktopSource).not.toContain(rawSvgTag);- expect(alertResourceTableMobileSource).toContain('export function AlertResourceTableMobile');- expect(alertResourceTableMobileSource).toContain('PlatformWindowedList');- expect(alertResourceTableMobileSource).toContain('AlertResourceGroupHeader');- expect(alertResourceTableMobileSource).toContain('FormTextarea');- expect(alertResourceTableMobileSource).toContain('ActionIconButton');+ it('keeps the metric editor input touch-sized on phones', () => {expect(alertResourceMetricEditorSource).toContain('min-h-11 w-full rounded-sm border p-1 text-center text-sm sm:min-h-0',);- expect(alertResourceTableMobileSource).not.toContain(['<', 'textarea'].join(''));- expect(alertResourceTableMobileSource).not.toContain(rawSvgTag);- expect(alertResourceGroupHeaderSource).toContain('export function AlertResourceGroupHeader');- expect(alertResourceGroupHeaderSource).toContain('ResourceNameWithWebInterfaceLink');- expect(alertResourceGroupHeaderSource).not.toContain('target="_blank"');- expect(alertResourceGroupHeaderSource).not.toContain('rel="noopener noreferrer"');- expect(alertResourceTableRowSource).toContain('export function AlertResourceTableRow');- expect(alertResourceTableRowSource).toContain('alertResourceSupportsMetric');- expect(alertResourceTableRowSource).toContain('FormTextarea');- expect(alertResourceTableRowSource).toContain('ActionIconButton');- expect(alertResourceTableRowSource).toContain('ResourceNameWithWebInterfaceLink');- expect(alertResourceTableRowSource).not.toContain(['<', 'textarea'].join(''));- expect(alertResourceTableRowSource).not.toContain('target="_blank"');- expect(alertResourceTableRowSource).not.toContain('rel="noopener noreferrer"');- expect(alertResourceTableRowSource).not.toContain(rawSvgTag);- expect(alertResourceTableStateSource).toContain('export function useAlertResourceTableState');- expect(alertResourceTableModelSource).toContain(- 'export function normalizeAlertResourceMetricKey',- );- expect(alertResourceTableModelSource).toContain(- 'export function getAlertResourceMetricDisplayValue',- );- expect(alertResourceTableModelSource).toContain(- 'export function alertResourceSupportsMetric',- );- // The off sentinel is engine truth, not per-surface trivia: every editor- // reads it through the shared model instead of comparing against -1 inline.- expect(alertResourceTableModelSource).toContain('export function isAlertResourceMetricOff');- expect(alertResourceTableModelSource).toContain(- 'export function resolveAlertResourceMetricEnableValue',- );- const strictOffComparison = ['===', ' -1'].join('');- expect(alertResourceTableDesktopSource).not.toContain(strictOffComparison);- expect(alertResourceTableMobileSource).not.toContain(strictOffComparison);- expect(alertResourceTableRowSource).not.toContain(strictOffComparison);});it('resolves metric values and edit payloads through the shared model', () => {@@ -843,6 +774,33 @@ describe('ResourceTable', () => {expect(memoryCalls.length).toBeGreaterThanOrEqual(1);});+ it.each([false, true])(+ 'reads a legacy 0 override as Off, like -1, without formatting it (mobile=%s)',+ (mobile) => {+ mockIsMobile.mockReturnValue(mobile);+ const formatMetricValue = vi.fn((_metric: string, value: number | undefined) =>+ value !== undefined ? String(value) : '-',+ );+ const props = makeProps({+ resources: [makeResource({ id: 'vm-1', thresholds: { cpu: 0, memory: 85 } })],+ columns: ['CPU %', 'Memory %'],+ formatMetricValue,+ });+ render(() => <ResourceTable {...props} />);++ expect(screen.getAllByText('Off').length).toBeGreaterThan(0);+ if (!mobile) {+ expect(screen.getAllByText('Off').some((el) => el.className.includes('italic'))).toBe(+ true,+ );+ }+ expect(formatMetricValue.mock.calls.filter(([metric]) => metric === 'cpu')).toHaveLength(0);+ expect(+ formatMetricValue.mock.calls.filter(([metric]) => metric === 'memory').length,+ ).toBeGreaterThanOrEqual(1);+ },+ );+it('shows active alert indicator dot when hasActiveAlert returns true', () => {const hasActiveAlert = vi.fn((_resource: unknown, metric: string) => metric === 'cpu');const resource = makeResource({diff --git a/frontend-modern/src/components/Alerts/WebhookConfig.test.tsx b/frontend-modern/src/components/Alerts/WebhookConfig.test.tsxindex b2cc22efb7..c0aca1f0fb 100644--- a/frontend-modern/src/components/Alerts/WebhookConfig.test.tsx+++ b/frontend-modern/src/components/Alerts/WebhookConfig.test.tsx@@ -2,10 +2,6 @@ import { createRoot } from 'solid-js';import { useWebhookConfigState } from './useWebhookConfigState';import { describe, it, expect, vi, beforeEach, afterEach } from 'vitest';import { cleanup, fireEvent, render, screen, waitFor } from '@solidjs/testing-library';-import webhookConfigSource from '@/components/Alerts/WebhookConfig.tsx?raw';-import webhookConfigFormSource from '@/components/Alerts/WebhookConfigForm.tsx?raw';-import webhookConfigListSource from '@/components/Alerts/WebhookConfigList.tsx?raw';-import webhookConfigStateSource from '@/components/Alerts/useWebhookConfigState.ts?raw';// --- Mock setup (must be before component import) ---const getWebhookTemplatesMock = vi.fn();@@ -125,22 +121,6 @@ describe('WebhookConfig', () => {cleanup();});- it('keeps webhook runtime state and section owners out of the shell', () => {- expect(webhookConfigSource).toContain('useWebhookConfigState');- expect(webhookConfigSource).toContain('WebhookConfigList');- expect(webhookConfigSource).toContain('WebhookConfigForm');- expect(webhookConfigSource).not.toContain('NotificationsAPI.getWebhookTemplates');- expect(webhookConfigSource).not.toContain('const saveWebhook = () => {');- expect(webhookConfigSource).not.toContain('const editWebhook = (webhook: Webhook) => {');- expect(webhookConfigSource).not.toContain('const toggleAllWebhooks = (enabled: boolean) => {');- expect(webhookConfigListSource).toContain('getAlertWebhookSummaryLabel');- expect(webhookConfigListSource).toContain('getAlertWebhookToggleAllLabel');- expect(webhookConfigFormSource).toContain('getAlertWebhookServices');- expect(webhookConfigFormSource).toContain('getAlertWebhookSubmitLabel');- expect(webhookConfigStateSource).toContain('NotificationsAPI.getWebhookTemplates');- expect(webhookConfigStateSource).toContain('normalizeAlertWebhookCustomFields');- });-// --- Rendering existing webhooks ---it('renders the "Add Webhook" button when no form is open', () => {diff --git a/frontend-modern/src/components/Infrastructure/__tests__/MaintenanceVerificationSection.render.test.tsx b/frontend-modern/src/components/Infrastructure/__tests__/MaintenanceVerificationSection.render.test.tsxindex 196d06212b..493df63486 100644--- a/frontend-modern/src/components/Infrastructure/__tests__/MaintenanceVerificationSection.render.test.tsx+++ b/frontend-modern/src/components/Infrastructure/__tests__/MaintenanceVerificationSection.render.test.tsx@@ -404,4 +404,32 @@ describe('durable maintenance verification evidence', () => {expect(mutations()).toHaveLength(1);},);++ it('requests the resource reports by encoded id and lists every evidence count with the Patrol follow-up', async () => {+ await mount([+ report({+ evidence: {+ ...report().evidence,+ activeCriticalAlerts: 4,+ activeCriticalFindings: 5,+ activeWarningFindings: 6,+ failedActionsSinceWindowStart: 7,+ patrolRunTodo: 'Run a scoped Patrol check for this resource',+ },+ }),+ ]);+ expect(api.apiFetchJSON.mock.calls[0][0]).toBe(+ '/api/resources/cluster%3Apve-a%3A101/maintenance-verifications?limit=25',+ );+ for (const [label, count] of [+ ['Critical alerts', '4'],+ ['Warning alerts', '2'],+ ['Critical findings', '5'],+ ['Warning findings', '6'],+ ['Failed actions', '7'],+ ]) {+ expect(screen.getByText(label).nextElementSibling).toHaveTextContent(count);+ }+ expect(screen.getByText('Run a scoped Patrol check for this resource')).toBeInTheDocument();+ });});diff --git a/frontend-modern/src/components/Infrastructure/__tests__/MaintenanceVerificationSection.test.ts b/frontend-modern/src/components/Infrastructure/__tests__/MaintenanceVerificationSection.test.tsdeleted file mode 100644index ed343b02f0..0000000000--- a/frontend-modern/src/components/Infrastructure/__tests__/MaintenanceVerificationSection.test.ts+++ /dev/null@@ -1,90 +0,0 @@-import { readFileSync } from 'node:fs';-import { resolve } from 'node:path';-import { describe, expect, it } from 'vitest';--const sectionSource = readFileSync(- resolve(__dirname, '..', 'MaintenanceVerificationSection.tsx'),- 'utf-8',-);--const drawerSource = readFileSync(resolve(__dirname, '..', 'ResourceDetailDrawer.tsx'), 'utf-8');--const apiClientSource = readFileSync(- resolve(__dirname, '..', '..', '..', 'api', 'maintenanceVerification.ts'),- 'utf-8',-);--describe('MaintenanceVerificationSection', () => {- it('routes list/rerun/review through the canonical maintenanceVerification API client', () => {- expect(sectionSource).toContain("from '@/api/maintenanceVerification'");- expect(sectionSource).toContain('listMaintenanceVerificationsForResource');- expect(sectionSource).toContain('rerunMaintenanceVerification');- expect(sectionSource).toContain('reviewMaintenanceVerification');- });-- it('keeps the section out of the parent Suspense fallback by using createNonSuspendingQuery', () => {- expect(sectionSource).toContain('createNonSuspendingQuery');- expect(sectionSource).not.toContain('createResource<');- });-- it('renders an empty state for resources with no reports yet', () => {- expect(sectionSource).toContain('No verification reports yet.');- });-- it('surfaces the deterministic evidence counts the report exposes', () => {- expect(sectionSource).toContain('Critical alerts');- expect(sectionSource).toContain('Warning alerts');- expect(sectionSource).toContain('Critical findings');- expect(sectionSource).toContain('Warning findings');- expect(sectionSource).toContain('Failed actions');- });-- it('exposes both operator actions (rerun + mark reviewed) the MVP committed to', () => {- expect(sectionSource).toContain('data-testid="maintenance-verification-rerun"');- expect(sectionSource).toContain('data-testid="maintenance-verification-review"');- });-- it('hides the review button once the report has been reviewed', () => {- expect(sectionSource).toContain('when={!report.userOutcome}');- expect(sectionSource).toContain("when={report.userOutcome === 'reviewed'}");- });-- it('renders the patrolRunTodo breadcrumb when the sentinel surfaced one', () => {- expect(sectionSource).toContain('report.evidence.patrolRunTodo');- });-});--describe('maintenanceVerification API client', () => {- it('encodes the resource id segment so canonical ids with colons survive', () => {- expect(apiClientSource).toContain('encodeURIComponent(resourceId)');- expect(apiClientSource).toContain('encodeURIComponent(reportId)');- });-- it('exposes the four operations the section needs', () => {- expect(apiClientSource).toContain(- 'export async function listMaintenanceVerificationsForResource',- );- expect(apiClientSource).toContain('export async function reviewMaintenanceVerification');- expect(apiClientSource).toContain('export async function rerunMaintenanceVerification');- });-- it('pins the four-state status enum the UI branches on', () => {- expect(apiClientSource).toContain("'pending'");- expect(apiClientSource).toContain("'healthy'");- expect(apiClientSource).toContain("'needs_review'");- expect(apiClientSource).toContain("'failed_verification'");- });-});--describe('ResourceDetailDrawer manage-tab integration', () => {- it('renders MaintenanceVerificationSection directly under the operator-state section', () => {- expect(drawerSource).toContain("from './MaintenanceVerificationSection'");- expect(drawerSource).toContain(- '<MaintenanceVerificationSection resourceId={props.resource.id} />',- );- const operatorIndex = drawerSource.indexOf('<ResourceOperatorStateSection');- const verificationIndex = drawerSource.indexOf('<MaintenanceVerificationSection');- expect(operatorIndex).toBeGreaterThan(0);- expect(verificationIndex).toBeGreaterThan(operatorIndex);- });-});diff --git a/frontend-modern/src/components/Infrastructure/__tests__/ResourceActionHistory.verification.test.ts b/frontend-modern/src/components/Infrastructure/__tests__/ResourceActionHistory.verification.test.tsindex 38a2eadf28..cd020dab24 100644--- a/frontend-modern/src/components/Infrastructure/__tests__/ResourceActionHistory.verification.test.ts+++ b/frontend-modern/src/components/Infrastructure/__tests__/ResourceActionHistory.verification.test.ts@@ -1,34 +1,10 @@-import { readFileSync } from 'node:fs';-import { resolve } from 'node:path';import { afterEach, describe, expect, it, vi } from 'vitest';import { cleanup, render, screen, within } from '@solidjs/testing-library';import { ResourceActionHistory } from '../ResourceActionHistory';import type { ActionAuditRecord } from '@/types/actionAudit';-const sourceText = readFileSync(resolve(__dirname, '..', 'ResourceActionHistory.tsx'), 'utf-8');-describe('ResourceActionHistory verification rendering', () => {- it('renders the post-dispatch verification outcome on each audit row when ran=true', () => {- // The broker's read-after-write verification outcome lives on- // result.verification (ActionVerificationResult). The audit history row- // must surface it without implying independent evidence. Pin the wiring- // so the surface cannot silently regress to an output-only render.- expect(sourceText).toContain('shouldRenderActionAuditVerification(props.audit)');- expect(sourceText).toContain('Legacy check passed (source unclassified)');- expect(sourceText).toContain('Legacy check failed (source unclassified)');- });-- it('shows the verification command and output verbatim when present', () => {- // The verification command (e.g. "systemctl is-active 'nginx'") is- // operator-trusted context, not just internal plumbing — it must be- // rendered so the operator can see exactly what Pulse read back, not- // just a yes/no.- expect(sourceText).toContain('v.command');- expect(sourceText).toContain('v.output');- expect(sourceText).toContain('v.note');- });-it('renders exactly one verification row for ran=true and omits ran=false', () => {cleanup();render(() =>@@ -79,6 +55,8 @@ describe('ResourceActionHistory verification rendering', () => {expect(approvalRow?.lastElementChild).toHaveClass('text-right', 'lg:text-left');expect(actionHistory.getAllByText('Legacy check passed (source unclassified)')).toHaveLength(1);expect(actionHistory.getByText("systemctl is-active 'nginx'")).toBeInTheDocument();+ expect(actionHistory.getByText('active')).toBeInTheDocument();+ expect(actionHistory.getByText('service reported active')).toBeInTheDocument();expect(actionHistory.queryByText('should not render')).toBeNull();expect(actionHistory.queryByText('sensitive output')).toBeNull();});diff --git a/frontend-modern/src/components/Infrastructure/__tests__/ResourceChangeSummary.test.tsx b/frontend-modern/src/components/Infrastructure/__tests__/ResourceChangeSummary.test.tsxindex 50f0f43f3e..7edcf3be3e 100644--- a/frontend-modern/src/components/Infrastructure/__tests__/ResourceChangeSummary.test.tsx+++ b/frontend-modern/src/components/Infrastructure/__tests__/ResourceChangeSummary.test.tsx@@ -103,6 +103,31 @@ describe('ResourceChangeSummary', () => {expect(screen.queryByText('Proxmox adapter')).toBeNull();expect(screen.queryByText('Heuristic')).toBeNull();});++ it('labels an alert that moved to its agent as a move, not a recovery', () => {+ const reason =+ 'Alert moved to pve1 (Host Agent). This is not a recovery: check the agent for the current reading.';+ render(() => (+ <ResourceChangeSummary+ title="Recent changes"+ changes={[+ {+ id: 'moved-change',+ resourceId: 'node:pve1',+ kind: 'alert_resolved',+ reason,+ observedAt: '2026-10-06T15:00:00Z',+ sourceType: 'heuristic',+ confidence: 'high',+ metadata: { alert_resolution: 'moved_to_agent', alert_type: 'memory' },+ },+ ]}+ />+ ));++ expect(screen.getByText('Alert moved')).toBeInTheDocument();+ expect(screen.queryByText('Alert resolved')).toBeNull();+ });});afterEach(() => {diff --git a/frontend-modern/src/components/Infrastructure/__tests__/ResourceDetailDrawer.history.test.tsx b/frontend-modern/src/components/Infrastructure/__tests__/ResourceDetailDrawer.history.test.tsxindex e6fd47e641..adf6711e71 100644--- a/frontend-modern/src/components/Infrastructure/__tests__/ResourceDetailDrawer.history.test.tsx+++ b/frontend-modern/src/components/Infrastructure/__tests__/ResourceDetailDrawer.history.test.tsx@@ -10,25 +10,7 @@ import { createSignal, Suspense } from 'solid-js';import { ChartsAPI, type AllMetricsHistoryResponse } from '@/api/charts';import { resetCreateNonSuspendingQueryCacheForTest } from '@/hooks/createNonSuspendingQuery';-import resourceDetailDrawerShellSource from '@/components/Infrastructure/ResourceDetailDrawer.tsx?raw';import resourceDetailDrawerOverviewSource from '@/components/Infrastructure/ResourceDetailDrawerOverviewTab.tsx?raw';-import resourceDetailSummarySource from '@/components/Infrastructure/ResourceDetailSummary.tsx?raw';-import resourceInvestigationContextSource from '@/components/Infrastructure/ResourceInvestigationContextTables.tsx?raw';-import resourceActionHistorySource from '@/components/Infrastructure/ResourceActionHistory.tsx?raw';-import resourceDetailDrawerHistoryStateSource from '@/components/Infrastructure/useResourceDetailDrawerHistoryState.ts?raw';-import createNonSuspendingQuerySource from '@/hooks/createNonSuspendingQuery.ts?raw';-import resourceDetailDrawerDerivedStateSource from '@/components/Infrastructure/useResourceDetailDrawerDerivedState.ts?raw';-import resourceDetailDrawerDiscoveryModelSource from '@/components/Infrastructure/resourceDetailDiscoveryModel.ts?raw';-import resourceDetailDrawerIdentityModelSource from '@/components/Infrastructure/resourceDetailDrawerIdentityModel.ts?raw';-import resourceDetailDrawerOperationalModelSource from '@/components/Infrastructure/resourceDetailDrawerOperationalModel.ts?raw';-import resourceDetailDrawerServiceModelSource from '@/components/Infrastructure/resourceDetailDrawerServiceModel.ts?raw';-import resourceDetailDrawerVmwareModelSource from '@/components/Infrastructure/resourceDetailDrawerVmwareModel.ts?raw';-import resourceDetailDrawerTrueNASModelSource from '@/components/Infrastructure/resourceDetailDrawerTrueNASModel.ts?raw';-import resourceDetailDrawerDockerActionsStateSource from '@/components/Infrastructure/useResourceDetailDrawerDockerActionsState.ts?raw';-import resourceDetailDrawerStateSource from '@/components/Infrastructure/useResourceDetailDrawerState.ts?raw';-import guestDrawerHistorySource from '@/components/Workloads/GuestDrawerHistory.tsx?raw';-import actionAuditApiSource from '@/api/actionAudit.ts?raw';-import actionAuditPresentationSource from '@/utils/actionAuditPresentation.ts?raw';import type { Resource } from '@/types/resource';import { ResourceDetailDrawer } from '@/components/Infrastructure/ResourceDetailDrawer';@@ -530,190 +512,6 @@ describe('ResourceDetailDrawer change history section', () => {},);- it('keeps current readings separate from stored history samples', () => {- expect(guestDrawerHistorySource).toContain('currentMetrics');- expect(guestDrawerHistorySource).toContain('No stored history in this range');- expect(guestDrawerHistorySource).not.toContain('buildFallbackHistoryPoints');- });-- it('keeps drawer presentation separate from runtime ownership', () => {- expect(resourceDetailDrawerOverviewSource).toContain("from './ResourceDetailSummary'");- expect(resourceDetailDrawerOverviewSource).toContain(- "from './ResourceInvestigationContextTables'",- );- expect(resourceDetailSummarySource).toContain("from '@/components/shared/TagBadges'");- expect(resourceDetailSummarySource).toContain("from '@/components/shared/DetailSectionTable'");- expect(resourceDetailSummarySource).not.toContain('<table');- expect(resourceInvestigationContextSource).toContain(- "from '@/components/shared/DetailSectionTable'",- );- expect(resourceInvestigationContextSource).not.toContain('<table');- expect(resourceInvestigationContextSource).toContain('RESOURCE_SAFE_SUMMARY_LABEL');- expect(resourceDetailDrawerOverviewSource).toContain('getAllFilterOptionLabel');- expect(resourceDetailDrawerOverviewSource).not.toContain("'All kinds'");- expect(resourceDetailDrawerOverviewSource).not.toContain("'All sources'");- expect(resourceDetailDrawerOverviewSource).not.toContain("'All adapters'");- expect(resourceDetailSummarySource).not.toContain("from '@/components/Workloads/TagBadges'");- expect(resourceDetailDrawerShellSource).toContain("from './ResourceDetailDrawerOverviewTab'");- expect(resourceDetailDrawerShellSource).toContain("from './ResourceDetailDrawerDebugTab'");- expect(resourceDetailDrawerShellSource).toContain('data-testid="resource-header-badges"');- expect(resourceDetailDrawerShellSource).toContain('drawer.headerBadges()');- expect(resourceDetailDrawerShellSource).toContain('ObjectDrawerHeader');- expect(resourceDetailDrawerShellSource).not.toContain('drawer.headerIdentity()');- expect(resourceDetailDrawerShellSource).not.toContain('drawer.unifiedSourceBadges()');- expect(resourceDetailDrawerShellSource).not.toContain('Change history');- expect(resourceDetailDrawerStateSource).toContain(- "from './useResourceDetailDrawerHistoryState'",- );- expect(resourceDetailDrawerStateSource).toContain(- "from './useResourceDetailDrawerDerivedState'",- );- expect(resourceDetailDrawerStateSource).toContain(- "from './useResourceDetailDrawerDockerActionsState'",- );- expect(resourceDetailDrawerStateSource).toContain(- 'const [showHistoryFilters, setShowHistoryFilters]',- );- expect(resourceDetailDrawerStateSource).not.toContain('createResource(');- expect(resourceDetailDrawerStateSource).not.toContain('MonitoringAPI.');- // #1723: a transient snapshot change (for example a momentarily absent- // merged metrics target) must not discard the selected drawer tab. The- // guard resets only when the drawer starts showing a different resource.- expect(resourceDetailDrawerStateSource).toContain('lastResourceId');- expect(resourceDetailDrawerStateSource).toContain('resourceId !== lastResourceId');- expect(resourceDetailDrawerHistoryStateSource).toContain(- "from '@/hooks/createNonSuspendingQuery'",- );- expect(resourceDetailDrawerHistoryStateSource).toContain('createNonSuspendingQuery');- expect(resourceDetailDrawerHistoryStateSource).not.toContain('createResource(');- expect(resourceDetailDrawerHistoryStateSource).toContain('ResourceAPI.getFacetBundle');- expect(resourceDetailDrawerHistoryStateSource).toContain('AIAPI.getResourceIntelligence');- expect(resourceDetailDrawerHistoryStateSource).toContain('ActionAuditAPI.listActionAudits');- expect(resourceDetailDrawerOverviewSource).not.toContain("from './ResourceActionHistory'");- expect(resourceDetailDrawerShellSource).toContain("from './ResourceActionHistory'");- expect(resourceDetailDrawerOverviewSource).toContain(- 'dataTestId="resource-relationship-map-section"',- );- expect(resourceDetailDrawerHistoryStateSource).toContain('resourceFacetRelationships');- expect(resourceDetailDrawerDerivedStateSource).toContain('options.resourceRelationships?.()');- expect(resourceDetailDrawerDerivedStateSource).toContain('resource().relationships ?? []');- expect(resourceActionHistorySource).toContain('getActionAuditRecordStatePresentation');- expect(resourceActionHistorySource).toContain('getActionAuditResultPresentation');- expect(resourceActionHistorySource).toContain('getActionAuditVerificationOutcomePresentation');- expect(resourceActionHistorySource).toContain('formatActionApprovalPolicyLabel');- expect(resourceActionHistorySource).toContain('getAPTActionPresentation');- expect(resourceActionHistorySource).toContain('resource-apt-action-facts');- expect(resourceActionHistorySource).toContain('resource-action-recovery-truth');- expect(resourceActionHistorySource).toContain('resource-apt-action-next-step');- // The audit history must surface the broker's read-after-write- // verification outcome alongside the dispatch result, not silently- // drop it. Pin the wiring so future refactors cannot regress to an- // output-only render.- expect(resourceActionHistorySource).toContain(- 'shouldRenderActionAuditVerification(props.audit)',- );- expect(resourceActionHistorySource).toContain('Legacy check passed (source unclassified)');- expect(resourceActionHistorySource).toContain('Legacy check failed (source unclassified)');- expect(actionAuditPresentationSource).toContain('resource_remediation_locked:');- expect(actionAuditPresentationSource).toContain('Confirmed by executing agent');- expect(actionAuditPresentationSource).toContain('Confirmed by independent observer');- expect(actionAuditApiSource).toContain('/api/audit/actions');- expect(actionAuditApiSource).toContain('ACTION_AUDIT_UNAVAILABLE_STATUSES');- expect(actionAuditPresentationSource).toContain('pending_approval');- expect(resourceDetailDrawerDerivedStateSource).toContain('toDiscoveryConfig');- expect(resourceDetailDrawerDerivedStateSource).toContain(- "from '@/components/Infrastructure/resourceDetailDiscoveryModel'",- );- expect(resourceDetailDrawerDerivedStateSource).toContain(- "from './resourceDetailDrawerOperationalModel'",- );- expect(resourceDetailDrawerDerivedStateSource).toContain(- "from './resourceDetailDrawerServiceModel'",- );- expect(resourceDetailDrawerDerivedStateSource).toContain(- "from './resourceDetailDrawerIdentityModel'",- );- expect(resourceDetailDrawerDerivedStateSource).toContain(- "from './resourceDetailDrawerVmwareModel'",- );- expect(resourceDetailDrawerDerivedStateSource).toContain(- "from './resourceDetailDrawerTrueNASModel'",- );- expect(resourceDetailDrawerDiscoveryModelSource).toContain('export const toDiscoveryConfig');- expect(resourceDetailDrawerIdentityModelSource).toContain(- 'export const buildResourceIdentityView',- );- expect(resourceDetailDrawerIdentityModelSource).toContain(- 'export const buildResourceDebugBundle',- );- expect(resourceDetailDrawerVmwareModelSource).toContain(- 'export const buildVMwareDetailSections',- );- expect(resourceDetailDrawerVmwareModelSource).toContain(- 'export const buildVMwareDetailsSummary',- );- expect(resourceDetailDrawerTrueNASModelSource).toContain(- 'export const buildTrueNASDetailSections',- );- expect(resourceDetailDrawerTrueNASModelSource).toContain(- 'export const buildTrueNASDetailsSummary',- );- expect(resourceDetailDrawerDerivedStateSource).not.toContain('buildWorkloadsHref');- expect(resourceDetailDrawerDerivedStateSource).not.toContain('buildServiceDetailLinks');- expect(resourceDetailDrawerDerivedStateSource).not.toContain('const supportedBadge =');- expect(resourceDetailDrawerDerivedStateSource).not.toContain(- 'const links: Array<{ href: string;',- );- expect(resourceDetailDrawerDerivedStateSource).not.toContain('ALIAS_COLLAPSE_THRESHOLD');- expect(resourceDetailDrawerDerivedStateSource).not.toContain('formatIdentifierLabel');- expect(resourceDetailDrawerOperationalModelSource).toContain(- 'export const buildKubernetesCapabilityBadges',- );- expect(resourceDetailDrawerOperationalModelSource).toContain('export const buildSourceSummary');- expect(resourceDetailDrawerOperationalModelSource).toContain(- 'export const buildHostDetailCards',- );- expect(resourceDetailDrawerOperationalModelSource).toContain('export const buildRelatedLinks');- expect(resourceDetailDrawerServiceModelSource).toContain(- 'export const getServiceDetailsSummary',- );- expect(resourceDetailDrawerServiceModelSource).toContain(- 'export const buildPbsVisibleJobBreakdown',- );- expect(resourceDetailDrawerServiceModelSource).toContain(- 'export const buildPmgVisibleQueueBreakdown',- );- expect(resourceDetailDrawerServiceModelSource).toContain(- 'export const buildPmgVisibleMailBreakdown',- );- expect(resourceDetailDrawerServiceModelSource).toContain(- "formatCount(pmg.queueTotal || 0, 'queued message')",- );- expect(resourceDetailDrawerServiceModelSource).toContain("'delayed message'");- expect(resourceDetailDrawerOverviewSource).not.toContain('MonitoringAPI.');- expect(resourceDetailDrawerOverviewSource).toContain('drawer.queueDockerUpdateCheck');- expect(resourceDetailDrawerOverviewSource).toContain('drawer.queueDockerUpdateAll');- expect(resourceDetailDrawerOverviewSource).toContain('Filter history');- expect(resourceDetailDrawerOverviewSource).not.toContain(- 'const modeLabel = formatSourceType(resource.sourceType);',- );- expect(resourceDetailDrawerOverviewSource).not.toContain(- '<span class="text-muted">Mode</span>',- );- expect(createNonSuspendingQuerySource).toContain('const retainedQueryCache = new Map<');- expect(createNonSuspendingQuerySource).toContain(- 'export function resetCreateNonSuspendingQueryCacheForTest()',- );- expect(createNonSuspendingQuerySource).toContain('setResolvedOnce(true);');- expect(createNonSuspendingQuerySource).toContain('setResolvedOnce(false);');- expect(resourceDetailDrawerDockerActionsStateSource).toContain(- 'MonitoringAPI.checkDockerUpdates',- );- expect(resourceDetailDrawerDockerActionsStateSource).not.toContain(- 'MonitoringAPI.updateAllDockerContainers',- );- });-it('keeps drawer history fetches out of the page-level suspense fallback', async () => {const pendingFacetBundle = new Promise(() => {});const pendingIntelligence = new Promise(() => {});diff --git a/frontend-modern/src/components/Infrastructure/__tests__/ResourceDetailDrawer.snapshot.test.tsx b/frontend-modern/src/components/Infrastructure/__tests__/ResourceDetailDrawer.snapshot.test.tsxindex 106d356864..12885f0cf3 100644--- a/frontend-modern/src/components/Infrastructure/__tests__/ResourceDetailDrawer.snapshot.test.tsx+++ b/frontend-modern/src/components/Infrastructure/__tests__/ResourceDetailDrawer.snapshot.test.tsx@@ -166,6 +166,30 @@ describe('ResourceDetailDrawer snapshot ownership', () => {expect(screen.getByRole('tab', { name: 'Overview' })).toHaveAttribute('aria-selected', 'true');});+ it('keeps the selected tab when a same-ID snapshot briefly drops it (#1723)', () => {+ const pmg = () =>+ snapshot({+ id: 'pmg-a',+ type: 'pmg',+ name: 'PMG A',+ displayName: 'PMG A',+ platformType: 'proxmox-pmg',+ });+ const [resource, setResource] = createSignal(pmg());+ render(() => <ResourceDetailDrawer resource={resource()} presentation="table-row" />);+ fireEvent.click(screen.getByRole('tab', { name: 'Mail' }));+ expect(screen.getByRole('tab', { name: 'Mail' })).toHaveAttribute('aria-selected', 'true');++ // A refresh that momentarily reports the resource without its Mail tab must+ // not discard the operator's selection: the drawer resets to Overview only+ // when it starts showing a different resource.+ setResource(snapshot({ id: 'pmg-a', type: 'pbs', name: 'PMG A', displayName: 'PMG A' }));+ expect(screen.queryByRole('tab', { name: 'Mail' })).not.toBeInTheDocument();+ setResource(pmg());+ expect(screen.getByRole('tab', { name: 'Mail' })).toHaveAttribute('aria-selected', 'true');+ expect(screen.getByRole('tab', { name: 'Overview' })).toHaveAttribute('aria-selected', 'false');+ });+it('updates availability evidence in Overview instead of retaining the initial snapshot', () => {const initial = snapshot({type: 'network-endpoint',diff --git a/frontend-modern/src/components/Infrastructure/__tests__/ResourceOperatorStateSection.render.test.tsx b/frontend-modern/src/components/Infrastructure/__tests__/ResourceOperatorStateSection.render.test.tsxindex 6b74f58d94..bfa53f107e 100644--- a/frontend-modern/src/components/Infrastructure/__tests__/ResourceOperatorStateSection.render.test.tsx+++ b/frontend-modern/src/components/Infrastructure/__tests__/ResourceOperatorStateSection.render.test.tsx@@ -1,5 +1,5 @@import { describe, expect, it, vi } from 'vitest';-import { render, screen, waitFor } from '@solidjs/testing-library';+import { fireEvent, render, screen, waitFor } from '@solidjs/testing-library';import type { ResourceCapability } from '@/types/resource';@@ -116,3 +116,55 @@ describe('maintenance schedule timestamps', () => {},);});++describe('operator override validation', () => {+ it('keeps Save window disabled until a one-time window ends after it starts', async () => {+ apiClientMock.apiFetchJSON.mockResolvedValue({ canonicalId: 'schedule-validation' });+ render(() => <ResourceOperatorStateSection resourceId="schedule-validation" />);++ fireEvent.click(await screen.findByRole('button', { name: 'Schedule window' }));+ const saveWindow = screen.getByRole('button', { name: 'Save window' });+ const start = screen.getByLabelText('Start') as HTMLInputElement;+ const end = screen.getByLabelText('End') as HTMLInputElement;+ expect(saveWindow).toBeEnabled();++ fireEvent.input(end, { target: { value: '2000-01-01T00:00' } });+ expect(screen.getByText('End must be after start.')).toBeInTheDocument();+ expect(saveWindow).toBeDisabled();++ const hoursBetween = () =>+ (new Date(end.value).getTime() - new Date(start.value).getTime()) / 3_600_000;+ fireEvent.click(screen.getByRole('button', { name: '4h' }));+ expect(screen.queryByText('End must be after start.')).not.toBeInTheDocument();+ expect(saveWindow).toBeEnabled();+ expect(hoursBetween()).toBe(4);++ fireEvent.click(screen.getByRole('button', { name: '1h' }));+ expect(hoursBetween()).toBe(1);+ // Daylight saving can make a calendar day 23 or 25 hours.+ fireEvent.click(screen.getByRole('button', { name: '24h' }));+ expect(hoursBetween()).toBeGreaterThanOrEqual(23);+ expect(hoursBetween()).toBeLessThanOrEqual(25);+ });++ it('keeps Save overrides disabled while automatic actions are limited to no action', async () => {+ apiClientMock.apiFetchJSON.mockResolvedValue({ canonicalId: 'auto-validation' });+ render(() => (+ <ResourceOperatorStateSection+ resourceId="auto-validation"+ capabilities={RESTART_CAPABILITY}+ />+ ));++ fireEvent.click(+ await screen.findByRole('button', { name: 'Limit automatic actions for this resource' }),+ );+ expect(screen.getByText('Select at least one eligible capability.')).toBeInTheDocument();+ const save = screen.getByRole('button', { name: 'Save overrides' });+ expect(save).toBeDisabled();++ fireEvent.click(screen.getByRole('checkbox', { name: /^Restart/ }));+ expect(screen.queryByText('Select at least one eligible capability.')).not.toBeInTheDocument();+ expect(save).toBeEnabled();+ });+});diff --git a/frontend-modern/src/components/Infrastructure/__tests__/ResourceOperatorStateSection.test.ts b/frontend-modern/src/components/Infrastructure/__tests__/ResourceOperatorStateSection.test.tsindex b02b6ad6f2..0f24897e7b 100644--- a/frontend-modern/src/components/Infrastructure/__tests__/ResourceOperatorStateSection.test.ts+++ b/frontend-modern/src/components/Infrastructure/__tests__/ResourceOperatorStateSection.test.ts@@ -7,21 +7,11 @@ const sectionSource = readFileSync('utf-8',);-const resourceDetailDrawerSource = readFileSync(- resolve(__dirname, '..', 'ResourceDetailDrawer.tsx'),- 'utf-8',-);-const supportDisclosureSource = readFileSync(resolve(__dirname, '..', 'ResourceDetailDrawerSupportDisclosure.tsx'),'utf-8',);-const guestManageSource = readFileSync(- resolve(__dirname, '..', '..', 'Workloads', 'GuestDrawerManage.tsx'),- 'utf-8',-);-describe('ResourceOperatorStateSection', () => {it('exposes operator-set controls bound to the canonical API client', () => {// The section is the operator's window into the per-resource state@@ -29,10 +19,6 @@ describe('ResourceOperatorStateSection', () => {// Patrol priority and note fields, all routed through the canonical// resourceOperatorState client — no parallel fetch path that could// drift from the API contract.- expect(sectionSource).toContain("from '@/api/resourceOperatorState'");- expect(sectionSource).toContain('getResourceOperatorState');- expect(sectionSource).toContain('setResourceOperatorState');- expect(sectionSource).toContain('clearResourceOperatorState');expect(sectionSource).toContain('Normal monitoring');expect(sectionSource).toContain('Expected offline');expect(sectionSource).toContain('Mute all attention');@@ -40,8 +26,6 @@ describe('ResourceOperatorStateSection', () => {expect(sectionSource).toContain('Never auto-remediate');expect(sectionSource).toContain('Patrol priority');expect(sectionSource).toContain('Operator note');- expect(sectionSource).toContain('setCriticality');- expect(sectionSource).toContain('setNote');});it('explains each control by its effect, not by implementation terms', () => {@@ -78,20 +62,8 @@ describe('ResourceOperatorStateSection', () => {it('presents resource action policy as an optional limit on global Patrol autonomy', () => {expect(sectionSource).toContain('Automatic action limits');expect(sectionSource).toContain('follows your Patrol mode by default');- expect(sectionSource).toContain("capability.autoAuthorization !== 'never'");expect(sectionSource).toContain('Select at least one eligible capability.');expect(sectionSource).toContain('Restrict to daily hours');- expect(sectionSource).toContain('autoRemediationPolicy');- expect(sectionSource).toContain('disabled={saving() || Boolean(autoPolicyValidationError())}');- });-- it('keeps the section out of the parent Suspense fallback by using createNonSuspendingQuery', () => {- // The drawer wraps its children in a page-level Suspense fallback;- // a vanilla createResource here would flicker the fallback every- // time the section's fetch resolves. Pin the helper choice so this- // does not silently regress to createResource.- expect(sectionSource).toContain('createNonSuspendingQuery');- expect(sectionSource).not.toContain('createResource<');});it('requires explicit confirmation before flipping never-auto-remediate to true', () => {@@ -152,33 +124,12 @@ describe('ResourceOperatorStateSection', () => {expect(sectionSource).not.toContain('note: current?.note');});- it('exposes a maintenance-window scheduler with HTML5 datetime-local inputs and quick presets', () => {- // The scheduler is the operator's path to setting a maintenance- // window without curling the API. Pin the wiring: datetime-local- // inputs, validation that end > start, optional reason field, and- // 1h/4h/24h quick presets.- expect(sectionSource).toContain('schedulerOpen');- expect(sectionSource).toContain('handleScheduleSave');- expect(sectionSource).toContain('handleClearMaintenanceWindow');- expect(sectionSource).toContain('applyPresetDuration');- expect(sectionSource).toContain('type="datetime-local"');- expect(sectionSource).toContain('scheduleValidationError');- // Quick presets — the three most common operator durations.- expect(sectionSource).toContain('<For each={[1, 4, 24]}>');- expect(sectionSource).toContain('applyPresetDuration(hours)');- // Both directions of the datetime conversion live in helpers so the- // scheduler stays free of inline date arithmetic.- expect(sectionSource).toContain('formatLocalForInput');- expect(sectionSource).toContain('parseLocalFromInput');- });-it('validates client-side that the scheduled end is strictly after start', () => {// The server validates the same constraint and returns 400 with// operator_state_invalid; pinning client-side validation keeps the// operator out of an avoidable round-trip. The Save button is gated// on the validation memo so a stale form state cannot be submitted.expect(sectionSource).toContain('End must be after start.');- expect(sectionSource).toContain('disabled={saving() || Boolean(scheduleValidationError())}');});it('distinguishes a future-scheduled window from an active one in the badge surface', () => {@@ -186,7 +137,6 @@ describe('ResourceOperatorStateSection', () => {// Each surfaces a distinct badge so operators see "scheduled"// before the window opens, "active" while it covers now, and// nothing once it ends.- expect(sectionSource).toContain('scheduledMaintenanceWindow');expect(sectionSource).toContain('Maintenance window scheduled.');});@@ -213,28 +163,16 @@ describe('ResourceOperatorStateSection', () => {});it('offers recurring timezone-aware windows and explicit descendant scope', () => {- expect(sectionSource).toContain("createSignal<'once' | 'recurring'>");expect(sectionSource).toContain('Days the window starts');- expect(sectionSource).toContain('scheduleTimezone');- expect(sectionSource).toContain('startMinute: timeToMinute(scheduleRecurringStart())');- expect(sectionSource).toContain('endMinute: timeToMinute(scheduleRecurringEnd())');- expect(sectionSource).toContain('resource_and_descendants');expect(sectionSource).toContain('Recurring maintenance configured.');});it('keeps drawer disclosure and operator controls touch-safe on phones', () => {expect(supportDisclosureSource).toContain('inline-flex min-h-11 shrink-0 items-center');- expect(sectionSource).toContain('density="compact"');- expect(sectionSource).toContain('<FormSelect');- expect(sectionSource).toContain('<FormTextarea');- expect(sectionSource).toContain('min-h-11 min-w-11 px-1.5 py-0.5');expect(sectionSource).toContain('flex flex-col items-stretch justify-between gap-3 border-t border-border-subtle pt-2 sm:flex-row sm:items-center',);expect(sectionSource).toContain('min-h-11 self-start rounded-sm border border-border');- expect(sectionSource).toContain(- 'min-h-11 px-2.5 py-1 text-xs font-medium text-white bg-blue-600',- );});it('renders a maintenance-window-active badge when the persisted window covers now', () => {@@ -242,60 +180,6 @@ describe('ResourceOperatorStateSection', () => {// now-falls-within-window check, not just on the presence of a// window — a future-scheduled window surfaces under a separate// "scheduled" badge instead.- expect(sectionSource).toContain('activeMaintenanceWindow');expect(sectionSource).toContain('Maintenance window active.');- expect(sectionSource).toContain('const currentTime = now();');- expect(sectionSource).toContain('if (currentTime < start || currentTime >= end) return null;');- });-- it('attributes the persisted state with set-by and set-at metadata', () => {- // The audit-attribution comes from server-side population (setAt /- // setBy populated from the authenticated identity). The section- // must surface both so operators can see "I set this 3 days ago"- // when revisiting a resource.- expect(sectionSource).toContain('persisted()?.setBy');- expect(sectionSource).toContain('persisted()?.setAt');- });-});--describe('ResourceDetailDrawer manage-tab integration', () => {- it('renders ResourceOperatorStateSection alongside ResourceActionHistory', () => {- // The operator-set state and the action audit history are- // conceptually paired — what the operator decided to suppress, and- // what Pulse actually did. They belong on the same drawer surface- // so the operator can read both stories together.- expect(resourceDetailDrawerSource).toContain("from './ResourceOperatorStateSection'");- expect(resourceDetailDrawerSource).toContain('capabilities={props.resource.capabilities}');- // Section must precede the action-history block so the override- // explains the actions that follow, not vice versa.- const operatorIndex = resourceDetailDrawerSource.indexOf('<ResourceOperatorStateSection');- const historyIndex = resourceDetailDrawerSource.indexOf('<ResourceActionHistory');- expect(operatorIndex).toBeGreaterThan(0);- expect(historyIndex).toBeGreaterThan(0);- expect(operatorIndex).toBeLessThan(historyIndex);- });-- it('renders operator overrides for every resource regardless of capability eligibility', () => {- // Issue #1622: the section used to be gated on the resource exposing- // an auto-authorizable capability, which hid intentionally-offline /- // never-auto-remediate exactly when they matter most (a stopped- // container only exposes `start`, which is never auto-authorized).- // The overrides don't depend on capabilities — only the- // automatic-actions block does, and it self-gates inside the section- // via eligibleAutoCapabilities.- expect(resourceDetailDrawerSource).toContain('resourceId={props.resource.id}');- expect(resourceDetailDrawerSource).not.toContain('shouldRenderOperatorStateSection');- expect(sectionSource).toContain('<Show when={eligibleAutoCapabilities().length > 0}>');- });-});--describe('Proxmox guest drawer integration', () => {- it('exposes the same canonical policy with provider ownership context', () => {- expect(guestManageSource).toContain(- "from '@/components/Infrastructure/ResourceOperatorStateSection'",- );- expect(guestManageSource).toContain('<ResourceOperatorStateSection');- expect(guestManageSource).toContain('resourceId={props.resourceId}');- expect(guestManageSource).toContain("platformType={props.guest.platformType || 'proxmox'}");});});diff --git a/frontend-modern/src/components/Infrastructure/__tests__/resourceDetailMappers.test.ts b/frontend-modern/src/components/Infrastructure/__tests__/resourceDetailMappers.test.tsindex 9a3f4849f0..6490d68d0e 100644--- a/frontend-modern/src/components/Infrastructure/__tests__/resourceDetailMappers.test.ts+++ b/frontend-modern/src/components/Infrastructure/__tests__/resourceDetailMappers.test.ts@@ -9,8 +9,6 @@ import {toAgentFromResource,toNodeFromProxmox,} from '@/components/Infrastructure/resourceDetailMappers';-import resourceDetailMappersSource from '@/components/Infrastructure/resourceDetailMappers.ts?raw';-import resourceDetailDiscoveryModelSource from '@/components/Infrastructure/resourceDetailDiscoveryModel.ts?raw';import type { PhysicalDiskCollectionStatus, Resource } from '@/types/resource';const createHybridHostResource = (): Resource =>@@ -448,16 +446,6 @@ describe('resourceDetailMappers', () => {});});- describe('detail row projection boundary', () => {- it('formats temperature, GPU, power, fan and custom rows from the selected resource payload only', () => {- expect(resourceDetailMappersSource).not.toContain('fetch(');- expect(resourceDetailMappersSource).not.toContain('nvidia-smi');- expect(resourceDetailMappersSource).not.toContain('powercap');- expect(resourceDetailMappersSource).not.toContain('export const toDiscoveryConfig');- expect(resourceDetailDiscoveryModelSource).toContain('export const toDiscoveryConfig');- });- });-describe('toNodeFromProxmox', () => {it('preserves canonical linkedAgentId for hybrid hosts', () => {const node = toNodeFromProxmox(createHybridHostResource());diff --git a/frontend-modern/src/components/Settings/__tests__/AISettings.test.tsx b/frontend-modern/src/components/Settings/__tests__/AISettings.test.tsxindex f3bc1a8f4d..8c0f5d40c4 100644--- a/frontend-modern/src/components/Settings/__tests__/AISettings.test.tsx+++ b/frontend-modern/src/components/Settings/__tests__/AISettings.test.tsx@@ -1093,6 +1093,53 @@ describe('AISettings Ollama provider options', () => {);});});++ it('offers the server-authored suggested model as the Ollama pull command', async () => {+ getSettingsMock.mockResolvedValue({+ ...baseSettings(),+ configured: true,+ model: 'ollama:llama3',+ ollama_configured: true,+ configured_providers: ['ollama'],+ providers: [+ {+ id: 'ollama',+ display_name: 'Ollama',+ description: 'Local models',+ protocol: 'ollama',+ requires_api_key: false,+ user_configurable: true,+ gateway: false,+ configured: true,+ env_vars: [],+ suggested_model: 'served-model:7b',+ suggested_model_note: 'Needs 8 GB of free memory.',+ },+ ],+ });++ renderComponent();+ fireEvent.click(await screen.findByRole('button', { name: /ollama/i }));++ expect(await screen.findByText('ollama pull served-model:7b')).toBeInTheDocument();+ expect(screen.getByText('Needs 8 GB of free memory.')).toBeInTheDocument();+ });++ it('shows no Ollama pull command when the server suggests no model', async () => {+ getSettingsMock.mockResolvedValue({+ ...baseSettings(),+ configured: true,+ model: 'ollama:llama3',+ ollama_configured: true,+ configured_providers: ['ollama'],+ });++ renderComponent();+ fireEvent.click(await screen.findByRole('button', { name: /ollama/i }));++ await screen.findByLabelText('Ollama Keep Alive');+ expect(screen.queryByText(/ollama pull/)).not.toBeInTheDocument();+ });});describe('AISettings OpenAI-compatible provider lifecycle', () => {@@ -1455,6 +1502,49 @@ describe('AISettings provider save failure context', () => {});expect(await screen.findByRole('button', { name: 'Check Patrol model' })).toBeInTheDocument();});++ it('shows the last persisted readiness result and its age after a reload without re-running the check', async () => {+ getSettingsMock.mockResolvedValue({+ ...baseSettings(),+ enabled: true,+ configured: true,+ model: 'ollama:qwen3:8b',+ patrol_model: 'ollama:qwen3:8b',+ ollama_configured: true,+ configured_providers: ['ollama'],+ patrol_model_readiness: {+ probe_version: 'patrol-readiness/v1',+ success: true,+ status: 'pass',+ provider: 'ollama',+ model: 'qwen3:8b',+ duration_ms: 9_100,+ max_verified_mode: 'monitor',+ summary: 'Verified for Watch only on this install.',+ recommendation: 'Keep higher autonomy disabled until an extended canary passes.',+ dimensions: {+ connectivity: { status: 'pass', summary: 'Connected.' },+ tool_protocol: { status: 'pass', summary: 'Passed.', attempts: 3, passed: 3 },+ context_quality: { status: 'pass', summary: 'Passed.', attempts: 2, passed: 2 },+ latency: { status: 'pass', summary: 'Passed.', warm_p50_ms: 1_000 },+ },+ modes: {+ monitor: { status: 'verified', summary: 'Verified.' },+ approval: { status: 'not_suitable', summary: 'Continuation failed.' },+ assisted: { status: 'not_assessed', summary: 'Extended canary required.' },+ full: { status: 'not_assessed', summary: 'Governed canary required.' },+ },+ recorded_at: '2026-07-13T08:00:00Z',+ recorded_at_unix: Math.floor(Date.now() / 1000) - 2 * 60 * 60,+ },+ });++ renderComponent('patrol');++ expect(await screen.findByText('Verified for Watch only')).toBeInTheDocument();+ expect(screen.getByText(/last evaluated 2h ago/)).toBeInTheDocument();+ expect(runPatrolModelReadinessMock).not.toHaveBeenCalled();+ });});describe('AISettings provider setup flow', () => {@@ -1555,6 +1645,44 @@ describe('AISettings provider setup flow', () => {);});+ it.each([+ ['Codex plan', 'codex_subscription_enabled'],+ ['Claude plan', 'claude_subscription_enabled'],+ ])('sets up the %s as a credential-free local login', async (optionName, enabledField) => {+ updateSettingsMock.mockResolvedValue({+ ...baseSettings(),+ enabled: true,+ configured: true,+ [enabledField]: true,+ });++ renderComponent();++ await waitFor(() => {+ expect(getSettingsMock).toHaveBeenCalledTimes(1);+ });++ fireEvent.click(screen.getByRole('button', { name: /enable pulse intelligence/i }));+ const setupDialog = await screen.findByRole('dialog', {+ name: 'Set up Pulse Intelligence',+ });+ fireEvent.click(within(setupDialog).getByRole('button', { name: new RegExp(optionName) }));++ expect(+ within(setupDialog).getByText(/No API key or OAuth token is stored in Pulse/),+ ).toBeInTheDocument();+ expect(setupDialog.querySelector('input')).toBeNull();++ fireEvent.click(within(setupDialog).getByRole('button', { name: 'Enable Pulse Intelligence' }));++ await waitFor(() => {+ expect(updateSettingsMock).toHaveBeenCalledWith({+ enabled: true,+ [enabledField]: true,+ });+ });+ });+it('keeps legacy quickstart-only installs on the provider setup path', async () => {getSettingsMock.mockResolvedValue({...baseSettings(),diff --git a/frontend-modern/src/components/Settings/__tests__/APITokenManager.test.tsx b/frontend-modern/src/components/Settings/__tests__/APITokenManager.test.tsxindex d52fb287d3..389ef97467 100644--- a/frontend-modern/src/components/Settings/__tests__/APITokenManager.test.tsx+++ b/frontend-modern/src/components/Settings/__tests__/APITokenManager.test.tsx@@ -17,9 +17,7 @@ import {SETTINGS_WRITE_SCOPE,} from '@/constants/apiScopes';import { API_TOKEN_CREATE_ANCHOR, PULSE_MCP_TOKEN_SETUP_PATH } from '@/routing/resourceLinks';-import apiAccessPanelSource from '../APIAccessPanel.tsx?raw';import apiTokenManagerSource from '../APITokenManager.tsx?raw';-import apiTokenManagerDialogsSource from '../APITokenManagerDialogs.tsx?raw';import { APIAccessPanel } from '../APIAccessPanel';import { APITokenManager } from '../APITokenManager';@@ -164,15 +162,6 @@ describe('APITokenManager security surface', () => {// external-agent setup; API Access only mints and manages the// scoped token that setup links to when credentials are needed.it('keeps API Access separate from Pulse Intelligence external-agent setup', () => {- expect(apiAccessPanelSource).toContain('<APITokenManager');- expect(apiAccessPanelSource).toContain('api-access-token-section');- expect(apiAccessPanelSource).not.toContain('AgentIntegrationsPanel');- expect(apiAccessPanelSource).not.toContain('isExternalAgentSetupHash');- expect(apiAccessPanelSource).not.toContain('api-access-external-agent-section');- expect(apiTokenManagerSource).toContain("import('./APITokenManagerDialogs')");- expect(apiTokenManagerSource).not.toContain('<Dialog');- expect(apiTokenManagerDialogsSource).toContain('ariaLabel="Edit API token scopes"');- expect(apiTokenManagerDialogsSource).toContain('ariaLabel="Revoke API token"');expect(apiTokenManagerSource).toContain('flex flex-col items-stretch gap-4 sm:flex-row sm:items-start sm:justify-between',);@@ -495,17 +484,6 @@ describe('APITokenManager', () => {});it('creates scoped tokens from the canonical preset path', async () => {- expect(apiTokenManagerSource).toContain('@/components/shared/SelectablePillButton');- expect(apiTokenManagerSource.match(/<SelectablePillButton/g) ?? []).toHaveLength(3);- expect(apiTokenManagerSource).not.toContain(- 'inline-flex min-h-10 sm:min-h-10 items-center rounded-full border px-3 py-2 text-sm font-semibold transition',- );- expect(apiTokenManagerSource).not.toContain(- 'min-h-10 sm:min-h-10 rounded-full border px-3 py-2 text-sm font-semibold transition',- );- expect(apiTokenManagerSource).not.toContain('border-blue-500 bg-blue-600 text-white shadow-xs');- expect(apiTokenManagerSource).not.toContain('hover:border-blue-400 hover:text-blue-600');-render(() => <APITokenManager onTokensChanged={vi.fn()} canManage />);await waitFor(() => {@@ -887,8 +865,6 @@ describe('APITokenManager', () => {expect(compactCard.getByText('Last used')).toBeInTheDocument();expect(compactCard.getByRole('button', { name: 'Edit scopes' })).toBeInTheDocument();expect(compactCard.getByRole('button', { name: 'Revoke' })).toBeInTheDocument();- expect(apiTokenManagerSource).toContain('class="hidden min-[1600px]:block"');- expect(apiTokenManagerSource).toContain('desktopMinWidth="960px"');});it('keeps the reconciled desktop row actionable after a confirmed scope edit', async () => {diff --git a/frontend-modern/src/components/Settings/__tests__/AgentProfilesPanel.test.tsx b/frontend-modern/src/components/Settings/__tests__/AgentProfilesPanel.test.tsxindex 5584845b38..b0b7f575d0 100644--- a/frontend-modern/src/components/Settings/__tests__/AgentProfilesPanel.test.tsx+++ b/frontend-modern/src/components/Settings/__tests__/AgentProfilesPanel.test.tsx@@ -1,8 +1,8 @@import { describe, it, expect, vi, beforeEach, afterEach } from 'vitest';import { render, screen, waitFor, fireEvent, cleanup, within } from '@solidjs/testing-library';-import agentProfilesPanelStateSource from '../useAgentProfilesPanelState.ts?raw';import agentProfilesPanelSource from '../AgentProfilesPanel.tsx?raw';import { AgentProfilesPanel } from '../AgentProfilesPanel';+import { aiAvailabilityStore } from '@/stores/aiAvailability';import { notificationStore } from '@/stores/notifications';import type { ConnectedInfrastructureItem, State } from '@/types/api';import type { Resource } from '@/types/resource';@@ -302,17 +302,19 @@ describe('AgentProfilesPanel V6 agent ID handling', () => {expect(assignProfileMock).not.toHaveBeenCalled();});- it('relies on shared commercial posture bootstrap instead of local posture loads', () => {- expect(agentProfilesPanelStateSource).not.toContain('loadCommercialPosture(');- expect(agentProfilesPanelStateSource).not.toContain('canOfferCommercialTrial');- expect(agentProfilesPanelSource).not.toContain('UPGRADE_TRIAL_LABEL');- expect(agentProfilesPanelStateSource).not.toContain('commercialPosture()?.trial_eligible');+ it('names the Ideas button for what it does rather than as an AI feature', async () => {+ const store = aiAvailabilityStore as unknown as { enabled: boolean };+ store.enabled = true;+ try {+ render(() => <AgentProfilesPanel />);+ const ideas = await screen.findByRole('button', { name: 'Ideas' });+ expect(ideas).toHaveAttribute('title', 'Suggest profiles for your estate');+ } finally {+ store.enabled = false;+ }});- it('keeps the Ideas button tooltip product-first instead of AI-branded', () => {- expect(agentProfilesPanelSource).toContain('title="Suggest profiles for your estate"');- expect(agentProfilesPanelSource).not.toContain('title="Get AI-powered profile suggestions"');- expect(agentProfilesPanelSource).toContain('hiddenOnMobile: true');+ it('keeps profile row actions touch-sized on phones', () => {expect(agentProfilesPanelSource).toContain('inline-flex min-h-11 min-w-11 items-center justify-center',);diff --git a/frontend-modern/src/components/Settings/__tests__/AuditWebhookPanel.test.tsx b/frontend-modern/src/components/Settings/__tests__/AuditWebhookPanel.test.tsxindex aad8bb5e3c..e4f6793f2d 100644--- a/frontend-modern/src/components/Settings/__tests__/AuditWebhookPanel.test.tsx+++ b/frontend-modern/src/components/Settings/__tests__/AuditWebhookPanel.test.tsx@@ -636,3 +636,24 @@ describe('audit webhook reader lifetime', () => {expect(showWarning).not.toHaveBeenCalled();});});++describe('audit webhook alert-notifications signpost (#1344)', () => {+ // The only webhook page in Settings carries security events, not alert+ // delivery, so it must point to alert notifications in every state.+ const signpostLink = () => screen.findByRole('link', { name: 'alert notifications' });++ it('links the enabled panel to alert notifications', async () => {+ await openPanel();++ expect(screen.getByText(/These carry security events only/)).toBeInTheDocument();+ expect(await signpostLink()).toHaveAttribute('href', '/alerts/notifications');+ });++ it('links the feature-gated panel to alert notifications', async () => {+ setEnabled(false);+ render(() => <AuditWebhookPanel />);++ expect(await screen.findByText(/These carry security events only/)).toBeInTheDocument();+ expect(await signpostLink()).toHaveAttribute('href', '/alerts/notifications');+ });+});diff --git a/frontend-modern/src/components/Settings/__tests__/AvailabilitySettingsPanel.test.tsx b/frontend-modern/src/components/Settings/__tests__/AvailabilitySettingsPanel.test.tsxindex 194b6e2a1c..56741f656a 100644--- a/frontend-modern/src/components/Settings/__tests__/AvailabilitySettingsPanel.test.tsx+++ b/frontend-modern/src/components/Settings/__tests__/AvailabilitySettingsPanel.test.tsx@@ -1,7 +1,6 @@import { cleanup, fireEvent, render, screen, waitFor } from '@solidjs/testing-library';import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';import { AvailabilityTargetsAPI, type AvailabilityTarget } from '@/api/availabilityTargets';-import availabilitySettingsPanelSource from '../AvailabilitySettingsPanel.tsx?raw';import { AvailabilitySettingsPanel } from '../AvailabilitySettingsPanel';const routeState = vi.hoisted(() => ({@@ -103,9 +102,23 @@ describe('AvailabilitySettingsPanel', () => {afterEach(() => cleanup());- it('keeps large target inventories on the shared bounded list renderer', () => {- expect(availabilitySettingsPanelSource).toContain('PlatformWindowedList');- expect(availabilitySettingsPanelSource).toContain('estimatedItemHeight={92}');+ it('mounts a bounded window of a large target inventory', async () => {+ vi.mocked(AvailabilityTargetsAPI.list).mockResolvedValue(+ Array.from({ length: 80 }, (_, index) => ({+ id: `target-${index}`,+ name: `Target ${index}`,+ address: `host-${index}.local`,+ protocol: 'tcp' as const,+ port: 1000 + index,+ enabled: true,+ })),+ );++ const { container } = render(() => <AvailabilitySettingsPanel />);++ const rows = await screen.findAllByText(/^Target \d+$/);+ expect(rows.length).toBeLessThan(80);+ expect(container.querySelectorAll('[data-platform-window-spacer]')).toHaveLength(2);});it('lists monitor-only MQTT and HTTP endpoint checks in the monitoring home', async () => {diff --git a/frontend-modern/src/components/Settings/__tests__/BillingAdminPanel.test.tsx b/frontend-modern/src/components/Settings/__tests__/BillingAdminPanel.test.tsxindex a8ee90d34e..9ae1415015 100644--- a/frontend-modern/src/components/Settings/__tests__/BillingAdminPanel.test.tsx+++ b/frontend-modern/src/components/Settings/__tests__/BillingAdminPanel.test.tsx@@ -2,9 +2,6 @@ import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';import { cleanup, fireEvent, render, screen, waitFor } from '@solidjs/testing-library';import { BillingAdminPanel } from '../BillingAdminPanel';-import billingAdminOrganizationsTableSource from '../BillingAdminOrganizationsTable.tsx?raw';-import billingAdminPanelSource from '../BillingAdminPanel.tsx?raw';-import billingAdminPanelStateSource from '../useBillingAdminPanelState.ts?raw';const isMobileMock = vi.fn();const listOrganizationsMock = vi.fn();@@ -137,43 +134,6 @@ describe('BillingAdminPanel', () => {expect(payload.plan_version).toBe('cloud_power');});- it('keeps hosted billing admin split into shell, runtime, and table owners', () => {- expect(billingAdminPanelSource).toContain('@/components/shared/Button');- expect(billingAdminPanelSource).toContain('variant="secondary"');- expect(billingAdminPanelSource).toContain('size="sm"');- expect(billingAdminPanelSource).not.toContain(- 'w-full sm:w-auto px-3 py-1.5 text-xs font-medium rounded-md border border-border bg-surface hover:bg-surface-hover disabled:opacity-50',- );- expect(billingAdminPanelSource).toContain('./useBillingAdminPanelState');- expect(billingAdminPanelSource).toContain('./BillingAdminOrganizationsTable');- expect(billingAdminPanelSource).not.toContain('createSignal(');- expect(billingAdminPanelSource).not.toContain('BillingAdminAPI.listOrganizations');- expect(billingAdminPanelStateSource).toContain('BillingAdminAPI.listOrganizations');- expect(billingAdminPanelStateSource).toContain('BillingAdminAPI.getBillingState');- expect(billingAdminPanelStateSource).toContain('BillingAdminAPI.putBillingState');- expect(billingAdminPanelStateSource).toContain('promisePool');- expect(billingAdminOrganizationsTableSource).toContain('PulseDataGrid');- expect(billingAdminOrganizationsTableSource).toContain('Billing state JSON');- expect(billingAdminOrganizationsTableSource).toContain('@/components/shared/Button');- expect(billingAdminOrganizationsTableSource).toContain('variant="secondary"');- expect(billingAdminOrganizationsTableSource).toContain('size="sm"');- expect(billingAdminOrganizationsTableSource).toContain('size="xs"');- for (const key of ['owner', 'trial', 'stripeCustomer']) {- expect(billingAdminOrganizationsTableSource).toMatch(- new RegExp(`key: '${key}',[\\s\\S]*?hiddenOnMobile: true`),- );- }- expect(billingAdminOrganizationsTableSource).not.toMatch(- /key: 'subscription',\s+label: 'Subscription',\s+hiddenOnMobile:/,- );- expect(billingAdminOrganizationsTableSource).not.toContain(- 'px-2.5 py-1.5 text-xs font-medium rounded-md border border-border bg-surface hover:bg-surface-hover disabled:opacity-50',- );- expect(billingAdminOrganizationsTableSource).not.toContain(- 'px-2 py-1 text-xs rounded-md border border-border bg-surface hover:bg-surface-hover',- );- });-it('stays unavailable in demo mode without loading hosted billing admin data', () => {presentationPolicyHidesOrganizationSurfacesMock.mockReturnValue(true);diff --git a/frontend-modern/src/components/Settings/__tests__/GeneralSettingsPanel.guardrails.test.ts b/frontend-modern/src/components/Settings/__tests__/GeneralSettingsPanel.guardrails.test.tsindex 1ffa9efd3f..feec41f285 100644--- a/frontend-modern/src/components/Settings/__tests__/GeneralSettingsPanel.guardrails.test.ts+++ b/frontend-modern/src/components/Settings/__tests__/GeneralSettingsPanel.guardrails.test.ts@@ -1,23 +1,7 @@import { describe, expect, it } from 'vitest';import generalSettingsPanelSource from '@/components/Settings/GeneralSettingsPanel.tsx?raw';-import dockerRuntimeSettingsCardSource from '@/components/Settings/DockerRuntimeSettingsCard.tsx?raw';import { EN_MESSAGES } from '@/i18n/messages';-const migratedGeneralSettingsCopy = [- 'Usage data and privacy',- 'Outbound usage telemetry',- 'Preview payload',- 'Refresh payload',- 'Reset ID',- 'Copy JSON',- 'Current heartbeat payload',- 'Telemetry payload preview',- 'Monitoring cadence',- 'Current cadence:',- 'Custom polling interval',- 'Managed via environment variable',-];-describe('GeneralSettingsPanel guardrails', () => {it('routes telemetry disclosure through the shipped privacy doc URL', () => {expect(generalSettingsPanelSource).toContain('PRIVACY_DOC_URL');@@ -26,29 +10,6 @@ describe('GeneralSettingsPanel guardrails', () => {);});- it('keeps telemetry preview and reset controls in the general settings panel', () => {- expect(generalSettingsPanelSource).toContain('settings.general.telemetry.section.title');- expect(generalSettingsPanelSource).toContain('settings.general.telemetry.previewPayload');- expect(generalSettingsPanelSource).toContain('settings.general.telemetry.resetId');- expect(generalSettingsPanelSource).toContain('settings.general.telemetry.payloadAriaLabel');- });-- it('routes telemetry command controls through the shared Button primitive', () => {- expect(generalSettingsPanelSource).toContain(- "import { Button } from '@/components/shared/Button';",- );- expect(generalSettingsPanelSource).toContain('size="settingsActionXs"');- expect(generalSettingsPanelSource).not.toContain(- 'inline-flex items-center rounded-md border border-border bg-surface px-3 py-2 text-xs font-medium text-base-content transition hover:bg-surface-hover',- );- });-- it('keeps maintainer commercial event controls out of customer settings', () => {- expect(generalSettingsPanelSource).not.toContain('Disable local-only commercial events');- expect(generalSettingsPanelSource).not.toContain('commercial handoff events');- expect(generalSettingsPanelSource).not.toContain('PULSE_DISABLE_LOCAL_UPGRADE_METRICS');- });-it('summarizes telemetry retention and non-storage guarantees in-product', () => {expect(EN_MESSAGES['settings.general.telemetry.description']).toContain('retained for up to 90 days',@@ -60,17 +21,4 @@ describe('GeneralSettingsPanel guardrails', () => {'not stored in telemetry rows',);});-- it('prevents migrated general settings copy from reverting to hardcoded English', () => {- for (const copy of migratedGeneralSettingsCopy) {- expect(generalSettingsPanelSource).not.toContain(copy);- }- expect(generalSettingsPanelSource).toContain(- 'settings.general.monitoringCadence.section.title',- );- expect(generalSettingsPanelSource).toContain('getPvePollingCadenceSummary');- expect(dockerRuntimeSettingsCardSource).toContain('getDockerUpdateActionsPresentation');- expect(dockerRuntimeSettingsCardSource).not.toContain('Docker / Podman updates');- expect(dockerRuntimeSettingsCardSource).not.toContain('Hide update buttons');- });});diff --git a/frontend-modern/src/components/Settings/__tests__/InfrastructureOperationsModel.test.tsx b/frontend-modern/src/components/Settings/__tests__/InfrastructureOperationsModel.test.tsxindex 835d8f0e3f..3a25ea96cb 100644--- a/frontend-modern/src/components/Settings/__tests__/InfrastructureOperationsModel.test.tsx+++ b/frontend-modern/src/components/Settings/__tests__/InfrastructureOperationsModel.test.tsx@@ -258,12 +258,7 @@ describe('infrastructure operations model', () => {expect(infrastructureInstallerSectionSource).toContain('No root agent is required for normal platform inventory and metrics',);- expect(infrastructureInstallerSectionSource).toContain(- "buildInfrastructureOnboardingPath('pve')",- );- expect(infrastructureInstallerSectionSource).toContain(- "buildInfrastructureOnboardingPath('pbs')",- );+ // A shipped docs link the operator clicks from this copy.expect(infrastructureInstallerSectionSource).toContain('/docs/PRODUCTION_SECURITY');});@@ -289,9 +284,6 @@ describe('infrastructure operations model', () => {});it('keeps the embedded installer section on the canonical host-install framing', () => {- expect(infrastructureInstallerSectionSource).toContain(- "title={state.isEmbedded() ? presentation().title : 'Infrastructure'}",- );expect(infrastructureInstallerSectionSource).toContain('Install on Unraid');expect(infrastructureInstallerSectionSource).toContain('Run on Unraid');expect(infrastructureInstallerSectionSource).toContain('Install for Docker / Podman');@@ -303,9 +295,6 @@ describe('infrastructure operations model', () => {/bounded[\s\S]{0,20}?<code>pct exec<\/code>/,);expect(infrastructureInstallerSectionSource).toContain('Install on a Kubernetes node');- expect(infrastructureInstallerSectionSource).toContain(- 'state.handleInstallProfileChange(presentation().preferredProfile)',- );expect(infrastructureInstallerSectionSource).toContain('Generate install token');expect(infrastructureInstallerSectionSource).toContain('Generate token');expect(infrastructureInstallerSectionSource).toContain('Show token only');@@ -338,19 +327,9 @@ describe('infrastructure operations model', () => {expect(infrastructureInstallerSectionSource).toContain('commands keep it separate: copy the command first, then use Show token only.',);- expect(infrastructureInstallerSectionSource).toContain(- 'getUnifiedAgentCommandAccessOptionLabel',- );expect(infrastructureInstallerSectionSource).toContain('Pulse can then run commands as root on this host',);- expect(infrastructureInstallerSectionSource).not.toContain('legacy combined');- expect(infrastructureInstallerSectionSource).not.toContain('Patrol auto-fix');- expect(infrastructureInstallerSectionSource).not.toContain('auto-fix requires Pulse Pro');- expect(infrastructureInstallerSectionSource).not.toContain('<api-token>');- expect(infrastructureInstallerSectionSource).not.toContain(- 'Copy disabled until an install token is generated',- );expect(infrastructureOperationsModelSource).toContain('preflights this Pulse URL, verifies the matching agent binary is available',);@@ -362,17 +341,8 @@ describe('infrastructure operations model', () => {expect(infrastructureOperationsModelSource).toContain('admin password');});- it('keeps first-host completion handoff on Infrastructure instead of the retired dashboard', async () => {- const installStateSource = await import('../useInfrastructureInstallState.tsx?raw').then(- (mod) => (mod as { default: string }).default,- );-+ it('keeps first-host completion handoff on Infrastructure instead of the retired dashboard', () => {expect(infrastructureInstallerSectionSource).toContain('Open infrastructure');- expect(infrastructureInstallerSectionSource).not.toContain('Open dashboard');- expect(installStateSource).toContain('const openInfrastructure = () => {');- expect(installStateSource).toContain('navigate(buildInfrastructureWorkspacePath())');- expect(installStateSource).not.toContain('openDashboard');- expect(installStateSource).not.toContain("navigate('/dashboard')");});it('only auto-creates setup handoff install tokens on installer routes', async () => {@@ -465,41 +435,6 @@ describe('infrastructure operations model', () => {);});- it('keeps infrastructure install and operations surfaces free of retired commercial telemetry wrappers', () => {- for (const source of [- infrastructureOperationsModelSource,- infrastructureInstallerSectionSource,- useInfrastructureInstallStateSource,- ]) {- expect(source).not.toContain('upgradeMetrics');- expect(source).not.toContain('conversionEvents');- expect(source).not.toContain('infrastructureOnboardingMetrics');- expect(source).not.toContain('UNIFIED_AGENT_TELEMETRY_SURFACE');- expect(source).not.toContain('normalizeTelemetryPart');- expect(source).not.toContain('trackAgentInstallTokenCreated');- expect(source).not.toContain('trackAgentInstallCommandsCopied');- expect(source).not.toContain('trackAgentFirstConnected');- expect(source).not.toContain('/api/upgrade-metrics/events');- }- });-- it('does not reintroduce the retired reporting state hook on the operations state', async () => {- const operationsStateSource = await import('../useInfrastructureOperationsState?raw').then(- (mod) => (mod as { default: string }).default,- );- expect(operationsStateSource).not.toContain('useInfrastructureReportingState');- });-- it('routes Windows upgrade commands through the shared seamless installer command builder', async () => {- const operationsStateSource = await import('../useInfrastructureOperationsState?raw').then(- (mod) => (mod as { default: string }).default,- );-- expect(operationsStateSource).toContain('buildWindowsAgentInstallCommand({');- expect(operationsStateSource).toContain('extraEnvAssignments: envAssignments');- expect(operationsStateSource).not.toContain('const tokenEnv = token ?');- });-it('pins the existing agent identity in the Unix credential repair command', async () => {const operationsStateSource = await import('../useInfrastructureOperationsState?raw').then((mod) => (mod as { default: string }).default,@@ -545,28 +480,14 @@ describe('infrastructure operations model', () => {expect(agentUpgradeSource).toContain('if (replaceCredential) {');});- it('resolves connection upgrade platforms through the shared caption-tolerant resolver', async () => {- const operationsStateSource = await import('../useInfrastructureOperationsState?raw').then(- (mod) => (mod as { default: string }).default,- );+ it('resolves connection upgrade platforms through the shared caption-tolerant resolver', () => {// Legacy agents report gopsutil OS captions ("microsoft windows 11 pro"),// so the hook must route through resolveAgentCommandPlatform instead of// exact-matching platform tokens locally (refs #1555).- expect(operationsStateSource).toContain(- 'resolveAgentCommandPlatform(connection.agentIdentity?.platform)',- );expect(resolveAgentCommandPlatform('microsoft windows 11 pro')).toBe('windows');expect(resolveAgentCommandPlatform('linux')).toBe('linux');});- it('keeps discovered-node filtering anchored to canonical represented-host dedupe', async () => {- const discoveryStateSource = await import('../useInfrastructureDiscoveryRuntimeState?raw').then(- (mod) => (mod as { default: string }).default,- );- expect(discoveryStateSource).toContain('filterRepresentedDiscoveredServers');- expect(discoveryStateSource).toContain('nodes()');- });-// /api/discover is RequireAdmin + settings:write and Settings mounts this// hook for every settings tab, so both the one-shot read and the 30s poller// must consult the served infrastructure capability. Without the gate adiff --git a/frontend-modern/src/components/Settings/__tests__/OrganizationBillingPanel.test.tsx b/frontend-modern/src/components/Settings/__tests__/OrganizationBillingPanel.test.tsxindex 2e31327028..6b8e3f33b3 100644--- a/frontend-modern/src/components/Settings/__tests__/OrganizationBillingPanel.test.tsx+++ b/frontend-modern/src/components/Settings/__tests__/OrganizationBillingPanel.test.tsx@@ -2,9 +2,6 @@ import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';import { cleanup, render, screen, waitFor } from '@solidjs/testing-library';import { OrganizationBillingPanel } from '../OrganizationBillingPanel';-import organizationBillingPanelSource from '../OrganizationBillingPanel.tsx?raw';-import organizationBillingLoadingStateSource from '../OrganizationBillingLoadingState.tsx?raw';-import organizationBillingStateSource from '../useOrganizationBillingPanelState.ts?raw';const getStatusMock = vi.hoisted(() => vi.fn());const listOrgsMock = vi.hoisted(() => vi.fn());@@ -114,6 +111,10 @@ describe('OrganizationBillingPanel', () => {expect(getStatusMock).toHaveBeenCalledTimes(1);});+ expect(eventBusOnMock).toHaveBeenCalledWith('org_switched', expect.any(Function));+ expect(getStatusMock).toHaveBeenLastCalledWith(+ expect.objectContaining({ expectedOrgID: 'org-1' }),+ );eventBusHandlers[0]?.();await waitFor(() => {@@ -136,18 +137,6 @@ describe('OrganizationBillingPanel', () => {expect(errorMock).not.toHaveBeenCalled();});- it('keeps organization billing runtime split into dedicated state and loading owners', () => {- expect(organizationBillingPanelSource).toContain('./useOrganizationBillingPanelState');- expect(organizationBillingPanelSource).toContain('./OrganizationBillingLoadingState');- expect(organizationBillingPanelSource).not.toContain('createSignal(');- expect(organizationBillingPanelSource).not.toContain('onMount(() =>');- expect(organizationBillingStateSource).toContain('normalizeOrgScope(getOrgID())');- expect(organizationBillingStateSource).toContain("eventBus.on('org_switched'");- expect(organizationBillingStateSource).not.toContain("getOrgID() || 'default'");- expect(organizationBillingLoadingStateSource).toContain('SettingsLoadingSkeleton');- expect(organizationBillingLoadingStateSource).not.toContain('animate-pulse');- });-it('stays unavailable in demo mode without loading organization billing data', () => {presentationPolicyHidesOrganizationSurfacesMock.mockReturnValue(true);diff --git a/frontend-modern/src/components/Settings/__tests__/ProLicensePanel.test.tsx b/frontend-modern/src/components/Settings/__tests__/ProLicensePanel.test.tsxindex e3ee655c62..34107ce875 100644--- a/frontend-modern/src/components/Settings/__tests__/ProLicensePanel.test.tsx+++ b/frontend-modern/src/components/Settings/__tests__/ProLicensePanel.test.tsx@@ -5,9 +5,6 @@ import { Route, Router } from '@solidjs/router';import type { LicenseEntitlements } from '@/api/license';import type { AgentOperationsLoopStatus } from '@/api/agentCapabilities';import { ProLicensePanel } from '../ProLicensePanel';-import proLicensePanelSource from '../ProLicensePanel.tsx?raw';-import proLicensePanelStateSource from '../useProLicensePanelState.ts?raw';-import proLicensePlanSectionSource from '../ProLicensePlanSection.tsx?raw';import selfHostedCommercialRecoverySectionSource from '../SelfHostedCommercialRecoverySection.tsx?raw';import {getSelfHostedBillingHref,@@ -1735,106 +1732,10 @@ describe('ProLicensePanel', () => {).not.toBeInTheDocument();});- it('keeps Pro license split into shell, runtime, and plan owners', () => {- expect(proLicensePanelSource).toContain('./useProLicensePanelState');- expect(proLicensePanelSource).toContain('sessionPresentationPolicyResolved');- expect(proLicensePanelSource).toContain('presentationPolicyHidesCommercialSurfaces');- expect(proLicensePanelSource).toContain('ProLicensePanelContent');- expect(proLicensePanelSource).toContain('./ProLicensePlanSection');- expect(proLicensePanelSource).toContain('SelfHostedCommercialRecoverySection');- expect(selfHostedCommercialRecoverySectionSource).toContain('FormTextarea');- expect(selfHostedCommercialRecoverySectionSource).not.toContain('<textarea');- expect(selfHostedCommercialRecoverySectionSource).toContain('@/components/shared/Button');- expect(selfHostedCommercialRecoverySectionSource).toContain('variant="primary"');- expect(selfHostedCommercialRecoverySectionSource).toContain('variant="outline"');- expect(selfHostedCommercialRecoverySectionSource).toContain('size="settingsAction"');- expect(selfHostedCommercialRecoverySectionSource).not.toContain(- 'min-h-10 sm:min-h-9 px-4 py-2.5 text-sm font-medium rounded-md bg-blue-600 text-white hover:bg-blue-700 transition-colors disabled:opacity-60 disabled:cursor-not-allowed',- );- expect(selfHostedCommercialRecoverySectionSource).not.toContain(- 'min-h-10 sm:min-h-9 px-4 py-2.5 text-sm font-medium rounded-md border border-border text-base-content hover:bg-surface-hover transition-colors disabled:opacity-60 disabled:cursor-not-allowed',- );- expect(proLicensePanelSource).toContain('SELF_HOSTED_PRO_BILLING_PRESENTATION');- expect(proLicensePanelSource).toContain('value={state.activeSection()}');- expect(proLicensePanelSource).toContain('<Subtabs');- expect(proLicensePanelSource).not.toContain('createSignal(');- expect(proLicensePanelSource).not.toContain('useLocation()');- expect(proLicensePanelStateSource).toContain('useLocation');- expect(proLicensePanelStateSource).toContain('resolveSelfHostedBillingSection');- expect(proLicensePanelStateSource).toContain('getSelfHostedBillingPlanIntent');- expect(proLicensePanelStateSource).not.toContain('getSelfHostedBillingUsageDetail');- expect(proLicensePanelStateSource).toContain('const setActiveSection = (section: string) => {');- expect(proLicensePanelStateSource).toContain('loadLicenseEntitlements(true)');- expect(proLicensePanelStateSource).toContain('fetchAgentOperationsLoopStatus');- expect(proLicensePanelStateSource).toContain('loadCommercialPosture(true)');- expect(proLicensePanelStateSource).toContain('loadRuntimeCapabilities(true)');- expect(proLicensePanelStateSource).toContain('buildSelfHostedCommercialPlanModel');- expect(proLicensePanelStateSource).toContain('getSelfHostedCurrentPlanPresentation({');- expect(proLicensePanelStateSource).toContain('getSelfHostedCurrentPlanStatusPresentation');- expect(proLicensePanelStateSource).toContain('getSelfHostedPlanComparisonPresentation({');- expect(proLicensePanelStateSource).toContain('getSelfHostedActivationSuccessPresentation({');- expect(proLicensePanelStateSource).not.toContain('runStartProTrialAction({');- expect(proLicensePanelStateSource).not.toContain('startProTrial()');- expect(proLicensePanelStateSource).toContain("'A license key is required'");- expect(proLicensePanelSource).toContain('@/components/shared/Button');- expect(proLicensePanelSource).toContain('variant="outline"');- expect(proLicensePanelSource).toContain('size="settingsAction"');- expect(proLicensePanelSource).not.toContain(- 'inline-flex min-h-10 sm:min-h-9 items-center gap-2 px-3 py-2 text-sm font-medium rounded-md border border-border text-base-content hover:bg-surface-hover transition-colors disabled:opacity-60',- );- expect(proLicensePlanSectionSource).toContain('getLicenseStatusLoadingState');- expect(proLicensePlanSectionSource).toContain('getNoActiveSelfHostedActivationState');- expect(proLicensePlanSectionSource).not.toContain('getTrialEndedProLicenseNotice');- expect(proLicensePlanSectionSource).toContain('currentPlanSummary.title');- expect(proLicensePlanSectionSource).toContain('currentPlanSummary.supplementalBadges');- expect(proLicensePlanSectionSource).toContain('currentPlanSummary.privateRuntimeAction');- expect(proLicensePlanSectionSource).toContain('props.activationSuccessSummary');- expect(proLicensePlanSectionSource).toContain('summary().actionUrl');- expect(proLicensePlanSectionSource).toContain('ButtonLink');- expect(proLicensePlanSectionSource).toContain('variant="warning"');- expect(proLicensePlanSectionSource).toContain('size="settingsActionXs"');- expect(proLicensePlanSectionSource).not.toContain(- 'mt-2 inline-flex min-h-10 sm:min-h-9 items-center gap-2 px-3 py-2 text-xs font-medium rounded-md border border-amber-300 dark:border-amber-700 text-amber-800 dark:text-amber-200 hover:bg-amber-100 dark:hover:bg-amber-800 transition-colors disabled:opacity-60',- );- expect(proLicensePlanSectionSource).toContain('UpgradeButtonLink');- expect(selfHostedCommercialRecoverySectionSource).toContain('ExternalTextLink');- expect(selfHostedCommercialRecoverySectionSource).not.toContain('target="_blank"');- expect(selfHostedCommercialRecoverySectionSource).not.toContain('rel="noopener noreferrer"');- expect(proLicensePlanSectionSource).not.toContain(- 'inline-flex items-center gap-1 mt-3 min-h-10 sm:min-h-9 rounded-md border px-3 py-2 text-xs font-medium hover:bg-black/5 dark:hover:bg-white/5',- );- expect(proLicensePlanSectionSource).toContain('props.planComparisonSummary.cards.length > 0');- expect(proLicensePlanSectionSource).toContain(- 'SELF_HOSTED_PRO_BILLING_PRESENTATION.planComparisonSectionTitle',- );- expect(proLicensePlanSectionSource).toContain('summary().highlightsLabel');- expect(proLicensePlanSectionSource).toContain('currentPlanSummary.unlockedFeaturesLabel');- expect(proLicensePlanSectionSource).toContain('currentPlanSummary.includedExtras.length > 0');- expect(proLicensePlanSectionSource).not.toContain('getInactiveProUpsellNotice');- expect(proLicensePlanSectionSource).not.toContain('MonitoredSystemDefinitionDisclosure');- expect(proLicensePlanSectionSource).not.toContain('trialStartTitle');- expect(proLicensePlanSectionSource).not.toContain('trialStartIdleActionLabel');- expect(proLicensePlanSectionSource).not.toContain('trialEndedNotice');- expect(proLicensePlanSectionSource).not.toContain('props.trialEnded');- expect(proLicensePlanSectionSource).toContain('planSelectionPrompt');- expect(proLicensePlanSectionSource).not.toContain(- "resolveSelfHostedPurchaseStartDestination('self_hosted_plan')",- );- expect(proLicensePlanSectionSource).not.toContain('Your Pro trial has ended');- expect(proLicensePlanSectionSource).not.toContain('Turn alert noise into');- expect(selfHostedCommercialRecoverySectionSource).toContain(- 'SELF_HOSTED_RECOVERY_PRESENTATION',- );+ it('routes the terms link through the shipped docs URL', () => {expect(selfHostedCommercialRecoverySectionSource).toContain('TERMS_DOC_URL');- expect(selfHostedCommercialRecoverySectionSource).toContain('disclosureLabel');- expect(selfHostedCommercialRecoverySectionSource).toContain('privateRuntimeNotice');- expect(selfHostedCommercialRecoverySectionSource).toContain('recoverySectionTitle');expect(selfHostedCommercialRecoverySectionSource).not.toContain('https://github.com/rcourtman/Pulse/blob/main/TERMS.md',);- expect(selfHostedCommercialRecoverySectionSource).not.toContain('Start 14-day Pro Trial');- expect(selfHostedCommercialRecoverySectionSource).not.toContain('Legacy v5 license detected');- expect(proLicensePanelSource).toContain('id={SELF_HOSTED_PRO_BILLING_PLAN_SECTION_ID}');- expect(proLicensePanelSource).not.toContain('SELF_HOSTED_PRO_BILLING_USAGE_SECTION_ID');});});diff --git a/frontend-modern/src/components/Settings/__tests__/RelaySettingsPanel.runtime.test.tsx b/frontend-modern/src/components/Settings/__tests__/RelaySettingsPanel.runtime.test.tsxindex 2f66de0b69..cfb86b1224 100644--- a/frontend-modern/src/components/Settings/__tests__/RelaySettingsPanel.runtime.test.tsx+++ b/frontend-modern/src/components/Settings/__tests__/RelaySettingsPanel.runtime.test.tsx@@ -1,8 +1,5 @@import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';import { cleanup, fireEvent, render, screen, waitFor } from '@solidjs/testing-library';-import relayPairingSectionSource from '../RelayPairingSection.tsx?raw';-import relaySettingsPanelSource from '../RelaySettingsPanel.tsx?raw';-import relaySettingsPanelStateSource from '../useRelaySettingsPanelState.ts?raw';const loadLicenseStatusMock = vi.fn();const hasFeatureMock = vi.fn();@@ -173,12 +170,6 @@ describe('RelaySettingsPanel runtime', () => {cleanup();});- it('relies on shared commercial posture bootstrap for relay settings', () => {- expect(relaySettingsPanelStateSource).not.toContain('loadCommercialPosture(');- expect(relaySettingsPanelStateSource).not.toContain('canOfferCommercialTrial');- expect(relaySettingsPanelStateSource).not.toContain('commercialPosture()?.trial_eligible');- });-it('explains the Pulse Mobile retirement without an upsell when the plan lacks it', async () => {hasFeatureMock.mockReturnValue(false);@@ -240,6 +231,17 @@ describe('RelaySettingsPanel runtime', () => {expect(deleteTokenMock).not.toHaveBeenCalled();});+ it('links the pairing help text to the Pulse Mobile download page', async () => {+ render(() => <RelaySettingsPanel canManage />);++ const link = await screen.findByRole('link', { name: 'your download page' });+ expect(link).toHaveAttribute('href', 'https://pulserelay.pro/download.html');+ expect(link).toHaveAttribute('rel', 'noopener noreferrer');+ expect(+ screen.getByText(/Pulse Mobile stays available for iOS and Android until 31 March 2027/),+ ).toBeInTheDocument();+ });+it('shows disconnected state and withholds pairing until relay is connected', async () => {getRelayStatusMock.mockResolvedValueOnce({connected: false,@@ -561,17 +563,4 @@ describe('RelaySettingsPanel runtime', () => {).toBeInTheDocument();expect(showErrorMock).toHaveBeenCalledWith('Failed to generate pairing QR code');});-- it('keeps relay settings split into shell, runtime, and pairing owners', () => {- expect(relaySettingsPanelSource).toContain('./useRelaySettingsPanelState');- expect(relaySettingsPanelSource).toContain('./RelayPairingSection');- expect(relaySettingsPanelSource).not.toContain('@/utils/upgradePresentation');- expect(relaySettingsPanelSource).not.toContain('UPGRADE_TRIAL_LABEL');- expect(relaySettingsPanelSource).not.toContain('createSignal(');- expect(relaySettingsPanelSource).not.toContain('QRCode.toDataURL(');- expect(relaySettingsPanelSource).not.toContain('>Start free trial<');- expect(relaySettingsPanelStateSource).toContain('QRCode.toDataURL(payload.deep_link');- expect(relaySettingsPanelStateSource).toContain('setInterval(() => void loadStatus(), 5000)');- expect(relayPairingSectionSource).toContain('getRelayDiagnosticClass');- });});diff --git a/frontend-modern/src/components/Settings/__tests__/RelaySettingsPanel.test.ts b/frontend-modern/src/components/Settings/__tests__/RelaySettingsPanel.test.tsdeleted file mode 100644index f6096c238c..0000000000--- a/frontend-modern/src/components/Settings/__tests__/RelaySettingsPanel.test.ts+++ /dev/null@@ -1,65 +0,0 @@-import { describe, expect, it } from 'vitest';-import relayPairingSectionSource from '../RelayPairingSection.tsx?raw';-import relaySettingsPanelStateSource from '../useRelaySettingsPanelState.ts?raw';--const onboardingSource = Object.values(- import.meta.glob('../../../api/onboarding.ts', {- query: '?raw',- eager: true,- import: 'default',- }),-)[0] as string;--const relaySettingsPanelSource = Object.values(- import.meta.glob('../RelaySettingsPanel.tsx', {- query: '?raw',- eager: true,- import: 'default',- }),-)[0] as string;--describe('OnboardingAPI', () => {- it('getQRPayload calls /api/onboarding/qr', () => {- expect(onboardingSource).toContain("private static baseUrl = '/api/onboarding';");- expect(onboardingSource).toContain("const url = this.baseUrl + '/qr';");- expect(onboardingSource).toContain('throw new OnboardingNotReadyError');- });-});--describe('Onboarding QR payload contract', () => {- it('defines expected response shape fields', () => {- expect(onboardingSource).toContain('export interface OnboardingRelayDetails');- expect(onboardingSource).toContain('enabled: boolean;');- expect(onboardingSource).toContain('url: string;');-- expect(onboardingSource).toContain('export interface OnboardingDiagnostic');- expect(onboardingSource).toContain("severity: 'warning' | 'error';");-- expect(onboardingSource).toContain('export interface OnboardingQRResponse');- expect(onboardingSource).toContain('schema: string;');- expect(onboardingSource).toContain('instance_url?: string;');- expect(onboardingSource).toContain('relay: OnboardingRelayDetails;');- expect(onboardingSource).toContain('auth_token: string;');- expect(onboardingSource).toContain('deep_link: string;');- expect(onboardingSource).toContain('diagnostics?: OnboardingDiagnostic[];');- expect(onboardingSource).toContain('export interface OnboardingNotReadyResponse');- expect(onboardingSource).toContain('export class OnboardingNotReadyError');- });-- it('keeps relay settings split into shell, runtime, and pairing owners', () => {- expect(relaySettingsPanelSource).toContain('./useRelaySettingsPanelState');- expect(relaySettingsPanelSource).toContain('./RelayPairingSection');- expect(relaySettingsPanelSource).not.toContain('createSignal(');- expect(relaySettingsPanelSource).not.toContain('QRCode.toDataURL(');- expect(relaySettingsPanelStateSource).toContain('QRCode.toDataURL(payload.deep_link');- expect(relaySettingsPanelStateSource).toContain('setInterval(() => void loadStatus(), 5000)');- expect(relayPairingSectionSource).toContain('getRelayDiagnosticClass');- });-- it('points pairing users at the download page for the Pulse Mobile app', () => {- expect(relayPairingSectionSource).toContain('PULSE_PRO_DOWNLOAD_URL');- expect(relayPairingSectionSource).toContain('RELAY_PAIRING_APP_AVAILABILITY_TEXT');- expect(relayPairingSectionSource).toContain('ExternalTextLink');- expect(relayPairingSectionSource).not.toContain('<a');- });-});diff --git a/frontend-modern/src/components/Settings/__tests__/ResourcePicker.test.tsx b/frontend-modern/src/components/Settings/__tests__/ResourcePicker.test.tsxindex 3900a2666a..b78735e22d 100644--- a/frontend-modern/src/components/Settings/__tests__/ResourcePicker.test.tsx+++ b/frontend-modern/src/components/Settings/__tests__/ResourcePicker.test.tsx@@ -2,7 +2,6 @@ import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';import { cleanup, fireEvent, render, screen, waitFor } from '@solidjs/testing-library';import { createSignal } from 'solid-js';import type { Resource } from '@/types/resource';-import resourcePickerSource from '../ResourcePicker.tsx?raw';import { ResourcePicker, type SelectedResource } from '../ResourcePicker';let mockResources: Resource[] = [];@@ -222,9 +221,19 @@ describe('ResourcePicker', () => {).toBe(false);expect(showWarningMock).not.toHaveBeenCalled();});- it('keeps large resource inventories on the shared bounded list renderer', () => {- expect(resourcePickerSource).toContain('PlatformWindowedList');- expect(resourcePickerSource).toContain('estimatedItemHeight={56}');++ it('mounts a bounded window of a large resource inventory', () => {+ mockResources = Array.from({ length: 61 }, (_, index) =>+ makeResource({ id: `vm-${index}`, name: `VM ${index}`, displayName: `VM ${index}` }),+ );+ const { container } = render(() => (+ <ResourcePicker maxSelection={null} selected={() => []} onSelectionChange={vi.fn()} />+ ));++ const rows = screen.getAllByText(/^VM \d+$/);+ expect(rows.length).toBeGreaterThan(0);+ expect(rows.length).toBeLessThan(61);+ expect(container.querySelectorAll('[data-platform-window-spacer]')).toHaveLength(2);});it('keeps the initial hydration state distinct from a genuinely empty estate', () => {diff --git a/frontend-modern/src/components/Settings/__tests__/SystemLogsPanel.test.tsx b/frontend-modern/src/components/Settings/__tests__/SystemLogsPanel.test.tsxindex e78a1dd4b6..a00090bf1a 100644--- a/frontend-modern/src/components/Settings/__tests__/SystemLogsPanel.test.tsx+++ b/frontend-modern/src/components/Settings/__tests__/SystemLogsPanel.test.tsx@@ -3,7 +3,6 @@ import { afterEach, describe, expect, it, vi } from 'vitest';import { SystemLogsPanel } from '../SystemLogsPanel';import diagnosticsPanelSource from '../DiagnosticsPanel.tsx?raw';import systemLogsPanelSource from '../SystemLogsPanel.tsx?raw';-import systemLogsPanelStateSource from '../useSystemLogsPanelState.ts?raw';vi.mock('../useSystemLogsPanelState', () => ({useSystemLogsPanelState: () => ({@@ -30,34 +29,15 @@ vi.mock('../useSystemLogsPanelState', () => ({afterEach(cleanup);describe('SystemLogsPanel architecture', () => {- it('keeps system logs split into shell and runtime owners', () => {- expect(systemLogsPanelSource).toContain('./useSystemLogsPanelState');- expect(systemLogsPanelSource).not.toContain('createSignal(');- expect(systemLogsPanelSource).not.toContain('new EventSource(');- expect(systemLogsPanelSource).not.toContain("apiFetchJSON('/api/logs/level'");- expect(systemLogsPanelStateSource).toContain('new EventSource');- expect(systemLogsPanelStateSource).toContain("apiFetchJSON('/api/logs/level'");- expect(systemLogsPanelStateSource).toContain("anchor.href = '/api/logs/download'");- expect(systemLogsPanelStateSource).toContain('eventSource === source');- expect(systemLogsPanelStateSource).toContain('expectedOrgID: acceptedReader.org');- expect(systemLogsPanelStateSource).toContain('retry: false');- expect(systemLogsPanelStateSource).not.toContain('notificationStore');- });-it('keeps support-page controls touch-sized on phones', () => {expect(diagnosticsPanelSource).toContain('min-h-11 sm:min-h-9 min-w-11 sm:min-w-10');expect(diagnosticsPanelSource).toContain('flex min-h-11 sm:min-h-9 items-center');expect(systemLogsPanelSource).toContain('form-select min-h-11 sm:min-h-9');expect(systemLogsPanelSource).toContain('min-h-11 sm:min-h-9 min-w-11 sm:min-w-9');- expect(systemLogsPanelSource).toContain('size="settingsAction"');});- it('keeps new lines immediately readable and support download on the themed button', () => {+ it('keeps new log lines immediately readable', () => {expect(systemLogsPanelSource).not.toContain('animate-enter');- expect(systemLogsPanelSource).toContain('<Button');- expect(systemLogsPanelSource).toContain('variant="primaryFlat"');- expect(systemLogsPanelSource).not.toContain('bg-primary-600');- expect(systemLogsPanelSource).toContain('SYSTEM_LOGS_PANEL_COPY.bufferHelp');});it('preserves accessible scope and privacy descriptions on the composed controls', () => {diff --git a/frontend-modern/src/components/Settings/__tests__/adminOnlySettingsNavGates.test.ts b/frontend-modern/src/components/Settings/__tests__/adminOnlySettingsNavGates.test.tsindex d53103e379..89c7d59095 100644--- a/frontend-modern/src/components/Settings/__tests__/adminOnlySettingsNavGates.test.ts+++ b/frontend-modern/src/components/Settings/__tests__/adminOnlySettingsNavGates.test.ts@@ -30,6 +30,29 @@ const createContext = (...overrides,});+const PAID_FEATURE_TABS: readonly SettingsTab[] = [+ 'support-reporting',+ 'security-roles',+ 'security-users',+ 'security-audit',+ 'security-webhooks',+ 'system-relay',+ 'organization-overview',+ 'organization-access',+ 'organization-sharing',+ 'organization-billing',+ 'organization-billing-admin',+];++describe('paid-feature settings nav gates', () => {+ it.each(PAID_FEATURE_TABS)('%s is hidden without its paid feature and shown with it', (tab) => {+ const context = createContext({ hostedModeEnabled: true });++ expect(shouldHideSettingsNavItem(tab, { ...context, hasFeature: () => false })).toBe(true);+ expect(shouldHideSettingsNavItem(tab, { ...context, hasFeature: () => true })).toBe(false);+ });+});+describe('admin-only settings nav gates', () => {it.each(ADMIN_ONLY_TABS)('$tab declares $capability', ({ tab, capability }) => {expect(getSettingsNavItem(tab)?.requiredCapability).toBe(capability);diff --git a/frontend-modern/src/components/Settings/__tests__/settingsArchitecture.test.ts b/frontend-modern/src/components/Settings/__tests__/settingsArchitecture.test.tsindex edbeafa307..6501abe459 100644--- a/frontend-modern/src/components/Settings/__tests__/settingsArchitecture.test.ts+++ b/frontend-modern/src/components/Settings/__tests__/settingsArchitecture.test.ts@@ -3,111 +3,37 @@ import { sanitizeDiagnosticsData } from '../diagnosticsModel';import type { DiagnosticsData } from '../diagnosticsModel';import settingsSource from '../Settings.tsx?raw';import { EN_MESSAGES } from '@/i18n/messages';-import settingsDialogsSource from '../SettingsDialogs.tsx?raw';-import settingsPageShellSource from '../SettingsPageShell.tsx?raw';import aiSettingsSource from '../AISettings.tsx?raw';-import aiSettingsDialogsSource from '../AISettingsDialogs.tsx?raw';-import aiSettingsStatusAndActionsSource from '../AISettingsStatusAndActions.tsx?raw';import aiModelSelectionSectionSource from '../AIModelSelectionSection.tsx?raw';import aiProviderConfigurationSectionSource from '../AIProviderConfigurationSection.tsx?raw';-import aiRuntimeControlsSectionSource from '../AIRuntimeControlsSection.tsx?raw';import aiSettingsModelSource from '../aiSettingsModel.ts?raw';import generalSettingsPanelSource from '../GeneralSettingsPanel.tsx?raw';-import brandingSettingsCardSource from '../BrandingSettingsCard.tsx?raw';-import dockerRuntimeSettingsCardSource from '../DockerRuntimeSettingsCard.tsx?raw';-import settingsHeaderMetaSource from '../settingsHeaderMeta.ts?raw';-import settingsNavCatalogSource from '../settingsNavCatalog.ts?raw';-import settingsNavVisibilitySource from '../settingsNavVisibility.ts?raw';-import settingsNavigationModelSource from '../settingsNavigationModel.ts?raw';-import settingsNavigationHookSource from '../useSettingsNavigation.ts?raw';import settingsAccessSource from '../useSettingsAccess.ts?raw';import aiSettingsStateSource from '../useAISettingsState.ts?raw';import settingsPanelRegistryContextSource from '../settingsPanelRegistryContext.tsx?raw';-import apiAccessPanelSource from '../APIAccessPanel.tsx?raw';-import apiTokenManagerSource from '../APITokenManager.tsx?raw';-import apiTokenManagerModelSource from '../apiTokenManagerModel.ts?raw';-import apiTokenManagerStateSource from '../useAPITokenManagerState.ts?raw';-import agentIntegrationsPanelSource from '../AgentIntegrationsPanel.tsx?raw';-import agentCapabilitiesApiSource from '@/api/agentCapabilities.ts?raw';-import dataHandlingPanelSource from '../DataHandlingPanel.tsx?raw';import auditLogPanelSource from '../AuditLogPanel.tsx?raw';-import auditWebhookPanelSource from '../AuditWebhookPanel.tsx?raw';-import reportingPanelSource from '../ReportingPanel.tsx?raw';-import rbacFeatureGateSectionSource from '../RBACFeatureGateSection.tsx?raw';-import recoverySettingsPanelSource from '../RecoverySettingsPanel.tsx?raw';import securityAuthPanelSource from '../SecurityAuthPanel.tsx?raw';import securityOverviewPanelSource from '../SecurityOverviewPanel.tsx?raw';-import systemLogsPanelSource from '../SystemLogsPanel.tsx?raw';import updatesSettingsPanelSource from '../UpdatesSettingsPanel.tsx?raw';-import updatesSettingsModelSource from '../updatesSettingsModel.ts?raw';-import updateHistorySectionSource from '../UpdateHistorySection.tsx?raw';-import updateInstallGuideSource from '../UpdateInstallGuide.tsx?raw';-import updatesPresentationSource from '../../../utils/updatesPresentation.ts?raw';-import agentProfilesPanelSource from '../AgentProfilesPanel.tsx?raw';import infrastructureWorkspaceSource from '../InfrastructureWorkspace.tsx?raw';import infrastructureInstallerSectionSource from '../InfrastructureInstallerSection.tsx?raw';-import infrastructureOperationsModelSource from '../infrastructureOperationsModel.tsx?raw';-import connectionsTableModelSource from '../connectionsTableModel.ts?raw';-import connectionsApiSource from '@/api/connections.ts?raw';-import infrastructureSourceManagerSource from '../InfrastructureSourceManager.tsx?raw';-import infrastructureSourcePickerSource from '../InfrastructureSourcePicker.tsx?raw';-import discoverySettingsFormSource from '../DiscoverySettingsForm.tsx?raw';-import availabilitySettingsPanelSource from '../AvailabilitySettingsPanel.tsx?raw';-import availabilitySettingsModelSource from '../availabilitySettingsModel.ts?raw';-import infrastructureWorkspaceModelSource from '../infrastructureWorkspaceModel.ts?raw';-import useConnectionsLedgerSource from '../useConnectionsLedger.ts?raw';-import agentProfileSettingsSource from '../agentProfileSettings.ts?raw';-import monitoredSystemImpactPreviewSource from '../MonitoredSystemImpactPreview.tsx?raw';-import infrastructureImportPlanModelSource from '../infrastructureImportPlanModel.ts?raw';-import connectionEditorSource from '../ConnectionEditor/ConnectionEditor.tsx?raw';-import addressProbeStepSource from '../ConnectionEditor/AddressProbeStep.tsx?raw';-import connectionEditorStateSource from '../ConnectionEditor/useConnectionEditor.ts?raw';import nodeCredentialSlotSource from '../ConnectionEditor/CredentialSlots/NodeCredentialSlot.tsx?raw';-import nodeCandidateImportPlanSource from '../ConnectionEditor/CredentialSlots/NodeCandidateImportPlan.tsx?raw';-import networkBoundarySettingsSectionSource from '../NetworkBoundarySettingsSection.tsx?raw';-import nodeModalBasicInfoSectionSource from '../NodeModalBasicInfoSection.tsx?raw';-import nodeModalClusterMembersSectionSource from '../NodeModalClusterMembersSection.tsx?raw';-import nodeModalAuthenticationSectionSource from '../NodeModalAuthenticationSection.tsx?raw';-import nodeModalMonitoringSectionSource from '../NodeModalMonitoringSection.tsx?raw';import nodeModalSetupGuideSectionSource from '../NodeModalSetupGuideSection.tsx?raw';-import nodeModalStatusFooterSource from '../NodeModalStatusFooter.tsx?raw';-import nodeModalModelSource from '../nodeModalModel.ts?raw';import nodeModalStateSource from '../useNodeModalState.ts?raw';-import nodeModalPresentationSource from '../../../utils/nodeModalPresentation.ts?raw';-import availabilityTargetSlotSource from '../ConnectionEditor/CredentialSlots/AvailabilityTargetSlot.tsx?raw';import trueNASCredentialSlotSource from '../ConnectionEditor/CredentialSlots/TrueNASCredentialSlot.tsx?raw';import vmwareCredentialSlotSource from '../ConnectionEditor/CredentialSlots/VMwareCredentialSlot.tsx?raw';-import organizationAccessInvitationsSectionSource from '../OrganizationAccessInvitationsSection.tsx?raw';-import organizationAccessManagementSectionSource from '../OrganizationAccessManagementSection.tsx?raw';import organizationAccessMembersSectionSource from '../OrganizationAccessMembersSection.tsx?raw';import organizationIncomingSharesSectionSource from '../OrganizationIncomingSharesSection.tsx?raw';import organizationOutgoingSharesSectionSource from '../OrganizationOutgoingSharesSection.tsx?raw';-import organizationOverviewDetailsSectionSource from '../OrganizationOverviewDetailsSection.tsx?raw';import organizationOverviewMembersSectionSource from '../OrganizationOverviewMembersSection.tsx?raw';-import organizationSharingCreateSectionSource from '../OrganizationSharingCreateSection.tsx?raw';-import rolesEditorDialogSource from '../RolesEditorDialog.tsx?raw';import rolesPanelSource from '../RolesPanel.tsx?raw';import userAssignmentsPanelSource from '../UserAssignmentsPanel.tsx?raw';-import diagnosticsResultsPanelSource from '../DiagnosticsResultsPanel.tsx?raw';-import diagnosticsModelSource from '../diagnosticsModel.ts?raw';-import agentProfilesStateSource from '../useAgentProfilesPanelState.ts?raw';-import auditLogStateSource from '../useAuditLogPanelState.ts?raw';-import auditWebhookStateSource from '../useAuditWebhookPanelState.ts?raw';-import rbacFeatureGateStateSource from '../useRBACFeatureGateState.ts?raw';-import reportingStateSource from '../useReportingPanelState.ts?raw';import ssoProvidersPanelSource from '../SSOProvidersPanel.tsx?raw';import ssoProvidersStateSource from '../useSSOProvidersState.ts?raw';-import ssoProvidersModelSource from '../ssoProvidersModel.ts?raw';import useInfrastructureInstallStateSource from '../useInfrastructureInstallState.tsx?raw';import useInfrastructureConfiguredNodesStateSource from '../useInfrastructureConfiguredNodesState.ts?raw';import useInfrastructureSettingsStateSource from '../useInfrastructureSettingsState.ts?raw';-import infrastructureOnboardingPresentationSource from '../../../utils/infrastructureOnboardingPresentation.ts?raw';-import selfHostedBillingPresentationSource from '../selfHostedBillingPresentation.ts?raw';-import systemSettingsPresentationSource from '../../../utils/systemSettingsPresentation.ts?raw';import ssoProviderPresentationSource from '../../../utils/ssoProviderPresentation.ts?raw';-import aiSettingsPresentationSource from '../../../utils/aiSettingsPresentation.ts?raw';-import auditLogPresentationSource from '../../../utils/auditLogPresentation.ts?raw';-import statusIndicatorBadgeSource from '../../shared/StatusIndicatorBadge.tsx?raw';const settingsRuntimeSources = import.meta.glob(['../*.tsx', '../ConnectionEditor/**/*.tsx'], {query: '?raw',@@ -116,67 +42,6 @@ const settingsRuntimeSources = import.meta.glob(['../*.tsx', '../ConnectionEdito}) as Record<string, string>;describe('settings architecture guardrails', () => {- it('forwards both export passphrase inputs without a login-password mode', () => {- for (const source of [settingsSource, settingsDialogsSource]) {- expect(source).toMatch(/exportPassphraseConfirmation=\{/);- expect(source).toMatch(/setExportPassphraseConfirmation=\{/);- expect(source).not.toContain('useCustomPassphrase');- }- expect(recoverySettingsPanelSource).not.toContain('securityStatus');- expect(recoverySettingsPanelSource).not.toContain('setUseCustomPassphrase');- });-- it('carries transfer target, pending and dialog-owned feedback through the Settings shell', () => {- for (const name of [- 'transferOrgID',- 'isTransferring',- 'transferError',- 'transferNotice',- 'apiTokenError',- ]) {- expect(settingsSource).toContain(`${name}={backupTransferFlow.${name}}`);- expect(settingsDialogsSource).toContain(`${name}={props.${name}}`);- }- });-- it('keeps the retired Assistant chat controls and protected guests list out of AI settings', () => {- expect(aiRuntimeControlsSectionSource).not.toContain('Chat action mode');- expect(aiRuntimeControlsSectionSource).not.toContain('controlLevel');- expect(aiRuntimeControlsSectionSource).not.toMatch(/protected.?guests/i);- expect(aiSettingsStateSource).not.toMatch(/protected.?guests/i);- });-- it('keeps the Patrol cost preview on the canonical cost-preview API and presentation helper', () => {- // The price table and the install's run history live on the server; the- // settings surface must not re-derive dollars from model names.- expect(aiSettingsStateSource).toContain("from '@/api/aiPatrolCost'");- expect(aiSettingsStateSource).toContain('getPatrolCostPreview({ model, intervalMinutes }');- expect(aiSettingsStateSource).toContain('getPatrolIntervalAutoAdjust(projection, {');- expect(aiModelSelectionSectionSource).toContain(- 'getPatrolCostPresentation(state.patrolCostPreview())',- );- expect(aiModelSelectionSectionSource).toContain(- 'resolvePatrolModelGuidance(models(), state.patrolModelGuidance())',- );- expect(aiSettingsSource).toContain(- 'getPatrolIntervalCostHint(props.state.patrolCostPreview(), option.value)',- );- expect(aiSettingsSource).not.toMatch(/usd_per_mtok|per_million/i);- expect(aiModelSelectionSectionSource).not.toMatch(/usd_per_mtok/i);- });-- it('keeps the audit log filter bar free of a saved-views affordance', () => {- // A saved view was only the page's URL query string; bookmarks already- // cover that and survive a new browser, so the control was removed.- expect(auditLogPanelSource).not.toContain('savedViewsKey');- expect(auditLogPanelSource).not.toContain('SavedViews');- });-- it('sends Proxmox Docker-in-LXC users to the shared command-access option', () => {- expect(nodeModalSetupGuideSectionSource).toContain('getUnifiedAgentCommandAccessOptionLabel()');- expect(nodeModalSetupGuideSectionSource).not.toContain('combined command profile');- });-it('keeps the Proxmox installer TLS override explicit and request-bound', () => {expect(nodeModalSetupGuideSectionSource).toContain('Skip TLS certificate verification when downloading the installer and',@@ -187,256 +52,9 @@ describe('settings architecture guardrails', () => {expect(nodeModalStateSource).toContain('insecure: agentInstallInsecure()');});- it('keeps Unified Agent lifecycle failures on the shared connections contract', () => {- expect(connectionsApiSource).toContain("| 'failed'");- expect(connectionsApiSource).toContain("'disabled' | 'disconnected' | 'enabled'");- expect(connectionsApiSource).toContain('agentUpdate?: ConnectionAgentUpdateStatus;');- expect(connectionsApiSource).toContain('agentModules?: ConnectionAgentModuleStatus[];');- expect(connectionsTableModelSource).toContain("key: 'module-health'");- expect(connectionsTableModelSource).toContain("label: 'Agent update failed'");- expect(connectionsTableModelSource).toContain('update?.lastError');- expect(connectionsTableModelSource).toContain("case 'disconnected':");- });-- it('keeps Settings on the canonical page shell boundary', () => {- expect(settingsSource).toContain("import { SettingsDialogs } from './SettingsDialogs';");- expect(settingsSource).toContain("import { SettingsPageShell } from './SettingsPageShell';");- expect(settingsSource).toContain('useSettingsNavigation({');- expect(settingsSource).toContain('<SettingsPageShell');- expect(settingsSource).toContain('<SettingsDialogs');- expect(settingsSource).toContain('const SettingsPanelLoadingFallback');- expect(settingsSource).not.toContain('border-dashed border-border bg-surface-alt py-12');- expect(settingsSource).not.toContain('<PageHeader');-- expect(settingsPageShellSource).toContain('import { PageHeader } from');- expect(settingsPageShellSource).toContain(- '<PageHeader title={props.headerMeta().title} description={props.headerMeta().description} />',- );- expect(settingsPageShellSource).toContain('max-h-[calc(100dvh-8rem)]');- expect(settingsPageShellSource).toContain('overflow-y-auto overscroll-contain');- expect(settingsPageShellSource).toContain('lg:min-h-[600px]');- expect(settingsPageShellSource).toContain('data-settings-content');- expect(settingsPageShellSource).toContain(- 'class={`min-w-0 flex-1 overflow-visible lg:overflow-hidden',- );- expect(settingsPageShellSource).not.toContain('animate-slideInRight');- expect(settingsPageShellSource).not.toContain('min-h-[600px]">');- expect(settingsDialogsSource).toContain('export const SettingsDialogs');- });-- it('keeps preview release maturity explicit in the shared update settings surface', () => {- expect(updatesSettingsModelSource).toContain("title: 'Preview'");- expect(updatesSettingsModelSource).toContain(- 'Beta user-testing builds and release candidates for opt-in validation',- );- expect(updatesPresentationSource).toContain(- 'Use beta builds for user testing and release candidates only when they may become stable without product changes.',- );- expect(updatesPresentationSource).toContain(- 'Automatic stable updates are unavailable while the Preview channel is selected.',- );- });-- it('keeps infrastructure onboarding query-backed under the shared settings shell', () => {- expect(settingsHeaderMetaSource).toContain("'infrastructure-systems': {");- expect(settingsHeaderMetaSource).toContain(- 'Add, discover, and verify the infrastructure Pulse monitors.',- );- expect(settingsHeaderMetaSource).toContain("'monitoring-availability': {");- expect(settingsHeaderMetaSource).toContain(- 'Monitor endpoint-only devices and services with ping, TCP, and HTTP probes.',- );- expect(settingsHeaderMetaSource).toContain("'organization-access': {");- expect(settingsHeaderMetaSource).toContain(- 'Manage organization invitations, member roles, and ownership transfers.',- );-- expect(settingsSource).toContain("import NotFound from '@/pages/NotFound';");- expect(settingsSource).toContain(- 'isRouteableSettingsLocation(location.pathname, location.search)',- );- expect(settingsNavigationHookSource).not.toContain('deriveAddStepFromLegacyPath');- expect(settingsNavigationHookSource).not.toContain('buildInfrastructureOnboardingPath');- expect(settingsNavigationHookSource).toContain(- 'navigate(buildInfrastructureWorkspacePath(), {',- );- expect(settingsNavigationHookSource).toContain('resolveCanonicalSettingsPath(path)');-- expect(infrastructureWorkspaceModelSource).toContain(- "const INFRASTRUCTURE_BASE_PATH = '/settings/infrastructure';",- );- expect(infrastructureWorkspaceModelSource).toContain(- 'export function buildInfrastructureOnboardingPath(',- );- expect(infrastructureWorkspaceModelSource).not.toContain("| 'availability'");- expect(infrastructureWorkspaceModelSource).not.toContain('deriveAddStepFromLegacyPath');- expect(infrastructureWorkspaceModelSource).toContain(- 'export function deriveAddStepFromSearch(',- );- expect(availabilitySettingsModelSource).toContain(- "export const AVAILABILITY_SETTINGS_PATH = '/settings/monitoring/availability';",- );- expect(availabilitySettingsModelSource).toContain(- 'export function buildAvailabilityTargetAddPath(',- );- });-- it('keeps Assistant OAuth callback compatibility on the shared settings shell', () => {- expect(settingsNavigationModelSource).toContain(- 'export const SETTINGS_PROVIDER_MODELS_PATH = `${SETTINGS_PULSE_INTELLIGENCE_PATH}/provider`;',- );- expect(settingsNavigationModelSource).toContain(- "const LEGACY_SYSTEM_AI_PREFIX = '/settings/system-ai';",- );- expect(settingsNavigationModelSource).toContain('normalizedPath === LEGACY_SYSTEM_AI_PREFIX');- expect(settingsNavigationModelSource).toContain(- "case 'system-ai':\n return PULSE_INTELLIGENCE_PROVIDER_PREFIX;",- );- expect(settingsNavigationModelSource).toContain(- 'export function isAISettingsOAuthCallbackQuery(search: string): boolean',- );- expect(settingsNavigationModelSource).toContain(- "return params.has('ai_oauth_success') || params.has('ai_oauth_error');",- );- expect(settingsNavigationModelSource).toContain(- "if (isAISettingsOAuthCallbackQuery(search)) return 'system-ai';",- );- expect(settingsNavigationHookSource).toContain(- "resolvedTab === 'system-ai' && isAISettingsOAuthCallbackQuery(search)",- );- expect(settingsNavigationHookSource).toContain(- 'const targetHref = shouldPreserveQuery ? `${target}${search}${hash}` : `${target}${hash}`;',- );- });-- it('keeps retired operations paths out of the settings routing model', () => {- expect(settingsNavigationModelSource).toContain(- "const RETIRED_SETTINGS_OPERATIONS_PREFIX = '/settings/operations';",- );- expect(settingsNavigationModelSource).not.toContain('buildLegacyOperationsSettingsPath');- expect(settingsNavigationModelSource).not.toContain('LEGACY_SETTINGS_OPERATIONS_PREFIX');- expect(settingsNavigationModelSource).not.toContain("normalizedPath === '/operations/logs'");- expect(settingsNavigationModelSource).not.toContain(- "normalizedPath.startsWith('/operations/logs/')",- );- expect(settingsNavigationModelSource).not.toContain(- "normalizedPath === '/operations/reporting'",- );- expect(settingsNavigationModelSource).not.toContain(- "normalizedPath.startsWith('/operations/reporting/')",- );- });-- it('keeps paid-feature settings navigation opt-in while direct panels own their gates', () => {- const itemBlock = (id: string): string => {- const start = settingsNavCatalogSource.indexOf(`id: '${id}'`);- expect(start, `nav item ${id} present in catalog`).toBeGreaterThan(-1);- const next = settingsNavCatalogSource.indexOf("id: '", start + 1);- return settingsNavCatalogSource.slice(start, next === -1 ? undefined : next);- };-- for (const id of [- 'support-reporting',- 'security-roles',- 'security-users',- 'security-audit',- 'security-webhooks',- 'system-relay',- 'organization-overview',- 'organization-access',- 'organization-sharing',- 'organization-billing',- 'organization-billing-admin',- ]) {- expect(itemBlock(id), `${id} stays hidden without its paid feature`).toContain(- 'hideWhenUnavailable: true',- );- }- });-- it('keeps allowed organization deep links on the canonical settings shell', () => {- expect(settingsSource).toContain("import { useSettingsAccess } from './useSettingsAccess';");- expect(settingsSource).toContain('const activeSettingsPanelEntry = createMemo(() => {');- expect(settingsSource).toContain('component={activeSettingsPanelEntry()?.component}');- expect(settingsSource).toContain('...(activeSettingsPanelEntry()?.getProps?.() ?? {})');- expect(settingsSource).not.toContain('entry().getProps');- expect(settingsSource).toContain('if (!flatTabs().some((tab) => tab.id === currentTab)) {');- expect(settingsSource).toContain('return settingsPanelRegistry()[currentTab];');- expect(settingsPanelRegistryContextSource).toContain(- 'params.securityStatus()?.proxyAuthUsername',- );- expect(settingsPanelRegistryContextSource).toContain(- 'params.securityStatus()?.ssoSessionUsername',- );- expect(settingsPanelRegistryContextSource).toContain('params.securityStatus()?.authUsername);');- expect(settingsPanelRegistryContextSource).toContain('getOrganizationOverviewPanelProps');- expect(settingsPanelRegistryContextSource).toContain('getOrganizationAccessPanelProps');- expect(settingsPanelRegistryContextSource).toContain('getOrganizationSharingPanelProps');- });-- it('keeps self-hosted commercial settings plan-owned under one shared presentation model', () => {- expect(selfHostedBillingPresentationSource).toContain("navLabel: 'Plans & Billing'");- expect(selfHostedBillingPresentationSource).toContain("shellTitle: 'Plans & Billing'");- expect(selfHostedBillingPresentationSource).toContain(- 'Plan, license, and Patrol mode for this instance.',- );- expect(selfHostedBillingPresentationSource).toContain("planSectionTitle: 'Current plan'");- expect(selfHostedBillingPresentationSource).toContain(- "recoverySectionTitle: 'License recovery'",- );-- expect(settingsNavCatalogSource).toContain(- 'label: SELF_HOSTED_PRO_BILLING_PRESENTATION.navLabel',- );- const pulseIntelligenceNavBlock = settingsNavCatalogSource.match(- /id: 'pulse-intelligence',[\s\S]*?id: 'organization',/,- );- expect(pulseIntelligenceNavBlock?.[0]).toContain("id: 'system-billing'");- const systemBillingNavBlock = settingsNavCatalogSource.match(- /id: 'system-billing',[\s\S]*?hideWhenCommercialHidden: true,\n\s*},/,- );- expect(systemBillingNavBlock?.[0]).toContain(- 'label: SELF_HOSTED_PRO_BILLING_PRESENTATION.navLabel',- );- // Listed for free installs so buying is findable; only demo and- // white-label runtimes hide it.- expect(systemBillingNavBlock?.[0]).not.toContain('hideWhenUpgradeHidden');- expect(systemBillingNavBlock?.[0]).not.toContain('hideFromSidebar');- const systemNavBlock = settingsNavCatalogSource.match(/id: 'system',[\s\S]*?id: 'support',/);- expect(systemNavBlock?.[0]).not.toContain("id: 'system-billing'");- expect(settingsNavCatalogSource).toContain("features: ['rbac']");- expect(settingsNavCatalogSource).toContain("features: ['audit_logging']");- expect(settingsNavCatalogSource).toContain("features: ['relay']");- expect(settingsNavCatalogSource).toContain("features: ['advanced_reporting']");- expect(settingsNavCatalogSource).toContain('hideWhenUnavailable: true');- const systemRelayNavBlock = settingsNavCatalogSource.match(- /id: 'system-relay',[\s\S]*?requiredCapability: 'relayRead',\n\s*},/,- );- expect(systemRelayNavBlock?.[0]).toContain("features: ['relay']");- expect(systemRelayNavBlock?.[0]).toContain('hideWhenUnavailable: true');- // Relay only ever connected Pulse Mobile; the section is named for the app,- // never as remote access to the web UI.- expect(systemRelayNavBlock?.[0]).toContain("label: 'Pulse Mobile'");- expect(settingsNavCatalogSource).not.toContain("label: 'Remote Access'");- expect(settingsHeaderMetaSource).toContain(- 'title: SELF_HOSTED_PRO_BILLING_PRESENTATION.shellTitle',- );- expect(settingsHeaderMetaSource).toContain(- 'description: SELF_HOSTED_PRO_BILLING_PRESENTATION.shellDescription',- );- });-it('gates the Infrastructure nav item on the served infrastructureRead capability', () => {- // Unlike system-relay, Infrastructure is not a paid-feature teaser: every- // endpoint behind it is RequireAdmin, so a session without settings:read- // gets an all-empty page whose 15s and 30s pollers log a warn-level denial- // on every tick. Hiding the item is what stops the pollers mounting.- const infrastructureNavBlock = settingsNavCatalogSource.match(- /id: 'infrastructure-systems',[\s\S]*?requiredCapability: 'infrastructureRead',\n\s*},/,- );- expect(infrastructureNavBlock?.[0]).toBeTruthy();-- // DEFAULT_SETTINGS_TAB points at the tab we just made blockable, so the+ // The nav gate itself is exercised in infrastructureNavCapabilityGate.test.ts.+ // DEFAULT_SETTINGS_TAB points at the tab that gate made blockable, so the// fallback must resolve a reachable tab rather than the hardcoded default,// or a non-admin lands back on the blocked route.expect(settingsAccessSource).toContain('SETTINGS_FALLBACK_TAB_ORDER.find(');@@ -453,42 +71,6 @@ describe('settings architecture guardrails', () => {expect(settingsAccessSource).toContain("DEFAULT_SETTINGS_TAB,\n 'system-general'");});- it('gates every remaining admin-only Settings panel on its named capability', () => {- const adminOnlyTabs: Array<[string, string]> = [- ['monitoring-availability', 'availabilityRead'],- ['system-ai', 'pulseIntelligenceRead'],- ['system-ai-patrol', 'pulseIntelligenceRead'],- ['system-ai-agents', 'pulseIntelligenceRead'],- ['support-diagnostics', 'diagnosticsRead'],- ['support-reporting', 'reportingRead'],- ['support-logs', 'systemLogsRead'],- ];-- for (const [tab, capability] of adminOnlyTabs) {- expect(settingsNavCatalogSource).toMatch(- new RegExp(`id: '${tab}',[\\s\\S]*?requiredCapability: '${capability}',`),- );- }- });-- it('gates the admin-only System tabs on the served systemSettingsRead capability', () => {- // Same rationale as Infrastructure rather than the paid-feature one: a free- // install can act on a paid tab by upgrading, but a non-admin cannot grant- // themselves admin, so Network / Updates / Recovery can only- // end in a panel they will never populate.- for (const id of ['system-network', 'system-updates', 'system-recovery']) {- const navBlock = settingsNavCatalogSource.match(- new RegExp(`id: '${id}',[\\s\\S]*?requiredCapability: 'systemSettingsRead',\\n\\s*},`),- );- expect(navBlock?.[0]).toBeTruthy();- }-- // system-general carries user-scoped theme, language, and unit preferences,- // so gating it would take personal settings away from every non-admin.- const generalNavBlock = settingsNavCatalogSource.match(/id: 'system-general',[\s\S]*?\n {6}},/);- expect(generalNavBlock?.[0]).not.toContain('requiredCapability');- });-it('keeps viewer sessions on the runtime-display settings projection when infrastructure read is denied', () => {// system-general stays ungated (previous test), so a session without// infrastructureRead still renders the General panel. The system-settings@@ -502,60 +84,6 @@ describe('settings architecture guardrails', () => {expect(gatedBranch?.[0]).toContain('await initializeSystemSettingsState();');});- it('keeps the external-agent (MCP) connector setup findable from sidebar search', () => {- // The External agents page hosts the pulse-mcp connector setup, but its- // label and copy can't carry every term users search for. The nav item's- // search-only keywords are the canonical bridge; losing them regresses- // "mcp"/"claude" searches back to "No settings found".- const agentsNavBlock = settingsNavCatalogSource.match(/id: 'system-ai-agents',[\s\S]*?},/);- for (const keyword of ['mcp', 'external agent', 'claude', 'opencode', 'connector']) {- expect(agentsNavBlock?.[0]).toContain(`'${keyword}'`);- }- expect(agentsNavBlock?.[0]).toContain("label: 'External agents'");- expect(settingsHeaderMetaSource).toContain(- "Connect Claude Code, Codex, and other MCP clients to Pulse's governed tools.",- );- });-- it('keeps Agent Doctor route-backed under the infrastructure workspace', () => {- expect(settingsNavigationModelSource).toContain(- 'normalizedPath !== INFRASTRUCTURE_AGENT_DOCTOR_PATH',- );- expect(settingsNavigationModelSource).toContain(- 'canonicalPath === INFRASTRUCTURE_AGENT_DOCTOR_PATH',- );- expect(settingsNavigationModelSource).toContain('INFRASTRUCTURE_AGENT_DOCTOR_PATH,');- expect(settingsNavigationHookSource).toContain('isLegacyAgentDoctorLocation(path, search)');- expect(settingsNavigationHookSource).toContain(- 'buildInfrastructureAgentDoctorPath(deriveAgentDoctorScopeFromLocation(path, search))',- );- });-- it('keeps Pulse updates separate from Agent Doctor lifecycle triage', () => {- const updatesNavBlock = settingsNavCatalogSource.match(- /id: 'system-updates',[\s\S]*?id: 'system-recovery',/,- );- expect(updatesNavBlock?.[0]).toContain("label: 'Updates'");- expect(settingsHeaderMetaSource).toContain("title: 'Updates'");- expect(settingsNavCatalogSource).not.toContain("label: 'Agent Doctor'");- });-- it('keeps resource privacy route-backed instead of sidebar-promoted', () => {- expect(settingsNavCatalogSource).toMatch(- /id: 'security-data-handling',[\s\S]*label: 'Resource Privacy',[\s\S]*hideFromSidebar: true/,- );- expect(settingsHeaderMetaSource).toContain("title: 'Resource Privacy'");- expect(settingsHeaderMetaSource).toContain(- 'See which monitored resource details can be summarized, must stay local, or are redacted.',- );- expect(dataHandlingPanelSource).toContain('title="Resource Data Policy"');- expect(dataHandlingPanelSource).toContain('Read-only resource privacy posture');- expect(dataHandlingPanelSource).toContain('<PolicyScopeSummary />');- expect(dataHandlingPanelSource).toContain('<EmptyPolicyPostureState />');- expect(dataHandlingPanelSource).toContain('useResourceStats()');- expect(dataHandlingPanelSource).not.toContain('useUnifiedResources');- });-it('keeps retained settings inventory scoped to configured agent nodes', () => {expect(useInfrastructureSettingsStateSource).toContain('canReadInfrastructure,');expect(useInfrastructureConfiguredNodesStateSource).toContain("query: 'type=agent'");@@ -572,250 +100,12 @@ describe('settings architecture guardrails', () => {expect(useInfrastructureConfiguredNodesStateSource).not.toContain('useResources()');});- it('keeps default self-hosted commercial copy opt-in from shared settings primitives', () => {- expect(aiSettingsDialogsSource).not.toContain('Open hosted handoff');- expect(aiSettingsDialogsSource).not.toContain(- 'Hosted quickstart routes policy-redacted prompts',- );- expect(aiSettingsDialogsSource).not.toContain('quickstartBlockedReason');- expect(aiSettingsStateSource).not.toContain('hasQuickstartAvailable');- expect(aiSettingsDialogsSource).not.toContain('Start Trial');- expect(aiSettingsDialogsSource).not.toContain('RELAY_ONBOARDING_TRIAL_STARTING_LABEL');- expect(generalSettingsPanelSource).not.toContain('Disable local-only commercial events');- expect(generalSettingsPanelSource).not.toContain('commercial handoff events');- expect(generalSettingsPanelSource).not.toContain('PULSE_DISABLE_LOCAL_UPGRADE_METRICS');- expect(generalSettingsPanelSource).not.toContain('Disable local-only upgrade events');- expect(systemSettingsPresentationSource).not.toContain(- 'Unable to update local-only commercial events.',- );- expect(systemSettingsPresentationSource).not.toContain(- 'Unable to update commercial prompt preferences.',- );- expect(dataHandlingPanelSource).not.toContain('Start Trial');- expect(dataHandlingPanelSource).not.toContain('higher limits');- expect(dataHandlingPanelSource).not.toContain('Upgrade');- expect(auditWebhookPanelSource).toContain('getAuditWebhookFeatureGateCopy({');- expect(auditWebhookPanelSource).toContain('paidRuntimeRequired: paidRuntimeRequired()');- expect(auditWebhookPanelSource).not.toContain('Audit Webhooks (Pro)');- // The only webhook page in Settings says it is not alert delivery and- // links to alert notifications, in both the gated and enabled states.- expect(auditWebhookPanelSource).toContain('getAuditWebhookNotificationsSignpost()');- expect(auditWebhookPanelSource).toContain("pathForTab('destinations')");- expect(auditWebhookPanelSource.match(/<AuditWebhookNotificationsSignpost \/>/g)).toHaveLength(- 2,- );- expect(reportingPanelSource).toContain('if (!catalog || !state || showUpgradePrompts())');- expect(reportingPanelSource).toContain('title: `${state.title} unavailable`');- expect(reportingPanelSource).toContain(- 'Reporting is locked for this session. The report builder appears when advanced reporting is available.',- );- expect(reportingPanelSource).not.toContain('Advanced Reporting (Pro)');- expect(aiRuntimeControlsSectionSource).not.toContain('showAutonomousControlOption');- expect(aiRuntimeControlsSectionSource).not.toContain('Command auto-run');- expect(aiRuntimeControlsSectionSource).not.toContain('without per-command approval');- expect(aiRuntimeControlsSectionSource).not.toContain('Legal Disclaimer');- expect(aiRuntimeControlsSectionSource).not.toContain('label="Chat action mode"');- expect(aiRuntimeControlsSectionSource).not.toContain('label="Command mode"');- expect(aiSettingsPresentationSource).not.toContain('Assistant chat actions');- expect(aiSettingsPresentationSource).not.toContain('Assistant command access');- expect(aiSettingsSource).toContain('AI_SETTINGS_PAGE_META');- expect(aiSettingsSource).toContain("saveLabel: 'Save provider settings'");- expect(aiSettingsSource).toContain("saveLabel: 'Save Patrol settings'");- expect(aiSettingsSource).not.toContain("saveLabel: 'Save Assistant settings'");- expect(aiSettingsStatusAndActionsSource).toContain('props.saveLabel');- expect(aiSettingsStatusAndActionsSource).not.toContain('Save changes</button>');- expect(aiSettingsStateSource).toContain('options.savedLabel');- expect(aiSettingsStateSource).toContain('notificationStore.success(savedLabel)');- expect(aiRuntimeControlsSectionSource).not.toContain('without approval (Pro)');- expect(aiRuntimeControlsSectionSource).not.toContain(- 'Pulse Assistant executes without approval',- );- });-- it('keeps settings command actions on the shared button primitive', () => {- expect(generalSettingsPanelSource).toContain(- "import { Button } from '@/components/shared/Button';",- );- expect(generalSettingsPanelSource).toContain('size="settingsActionXs"');- expect(generalSettingsPanelSource).not.toContain(- 'inline-flex items-center rounded-md border border-border bg-surface px-3 py-2 text-xs font-medium text-base-content transition hover:bg-surface-hover',- );-- expect(reportingPanelSource).toContain("import { Button } from '@/components/shared/Button';");- expect(reportingPanelSource).toContain('<Button');- expect(reportingPanelSource).toContain('variant="primary"');- expect(reportingPanelSource).toContain('variant="success"');- expect(reportingPanelSource).toContain('isLoading={generating()}');- expect(reportingPanelSource).toContain('isLoading={exportingInventory()}');- expect(reportingPanelSource).not.toContain(- 'flex w-full items-center justify-center gap-2 rounded-md px-6 py-3 font-semibold transition-all sm:w-auto',- );- expect(reportingPanelSource).not.toContain('bg-blue-600 text-white hover:bg-blue-700');- expect(reportingPanelSource).not.toContain('bg-emerald-600 text-white hover:bg-emerald-700');-- expect(infrastructureInstallerSectionSource).toContain(- "import { Button, CommandCopyButton } from '@/components/shared/Button';",- );- expect(infrastructureInstallerSectionSource).toContain('variant="success"');- expect(infrastructureInstallerSectionSource).toContain('variant="successOutline"');- expect(infrastructureInstallerSectionSource).toContain('variant="successGhost"');- expect(infrastructureInstallerSectionSource).not.toContain(- 'inline-flex items-center justify-center rounded-md bg-emerald-600 px-3 py-2 text-sm font-medium text-white transition-colors hover:bg-emerald-700',- );- expect(infrastructureInstallerSectionSource).not.toContain(- 'inline-flex items-center justify-center rounded-md border border-emerald-300 bg-white px-3 py-2 text-sm font-medium text-emerald-900 transition-colors hover:bg-emerald-100',- );- expect(infrastructureInstallerSectionSource).not.toContain(- 'inline-flex items-center justify-center rounded-md px-3 py-2 text-sm font-medium text-emerald-900 hover:bg-emerald-100',- );-- expect(ssoProvidersPanelSource).toContain(- "import { ActionIconButton, Button, CopyValueButton } from '@/components/shared/Button';",- );- expect(ssoProvidersPanelSource).toContain('size="settingsAction"');- expect(ssoProvidersPanelSource).toContain('ActionIconButton');- expect(ssoProvidersPanelSource).toContain('CopyValueButton');- expect(ssoProvidersPanelSource).not.toContain('<button');- expect(ssoProvidersPanelSource).not.toContain('lucide-solid/icons/copy');- expect(ssoProvidersPanelSource).not.toContain(- 'min-h-10 sm:min-h-9 px-3 py-2.5 text-sm font-medium bg-blue-600',- );- expect(ssoProvidersPanelSource).not.toContain('p-2 text-slate-500 hover:text-blue-600');- expect(ssoProvidersPanelSource).not.toContain(- 'text-blue-600 hover:underline flex items-center gap-1',- );-- expect(securityAuthPanelSource).toContain(- "import { Button } from '@/components/shared/Button';",- );- expect(securityAuthPanelSource).toContain('variant="warning"');- expect(securityAuthPanelSource).toContain('variant="primary"');- expect(securityAuthPanelSource).toContain('size="settingsAction"');- expect(securityAuthPanelSource).not.toContain(- 'w-full sm:w-auto px-3 py-2 text-xs font-medium rounded-md border border-amber-300',- );- expect(securityAuthPanelSource).not.toContain(- 'w-full sm:w-auto min-h-10 sm:min-h-10 px-4 py-2.5 text-sm font-medium bg-blue-600',- );- expect(securityAuthPanelSource).not.toContain(- 'w-full sm:w-auto min-h-10 sm:min-h-10 px-4 py-2.5 text-sm font-medium border border-border',- );+ it('renders security restart guidance from the shared presenter', () => {// Restart guidance comes from the shared presenter for every deployment// type, not from a hand-written block per type.expect(securityAuthPanelSource).toContain('{restartInstruction().label}');expect(securityAuthPanelSource).not.toContain('deploymentType ===');expect(securityAuthPanelSource).not.toContain('ProxmoxVE console');-- expect(rolesPanelSource).toContain(- "import { ActionIconButton, Button } from '@/components/shared/Button';",- );- expect(rolesPanelSource).toContain('variant="primary"');- expect(rolesPanelSource).toContain('ActionIconButton');- expect(rolesPanelSource).not.toContain(- 'inline-flex w-full sm:w-auto min-h-10 sm:min-h-9 items-center justify-center gap-2 rounded-md bg-blue-600',- );- expect(rolesPanelSource).not.toContain('p-1.5 rounded-md text-slate-500 hover:text-blue-600');- expect(rolesPanelSource).not.toContain('p-1.5 rounded-md text-slate-500 hover:text-red-600');-- expect(userAssignmentsPanelSource).toContain(- "import { Button } from '@/components/shared/Button';",- );- expect(userAssignmentsPanelSource).toContain('variant="ghost"');- expect(userAssignmentsPanelSource).toContain('size="settingsAction"');- expect(userAssignmentsPanelSource).not.toContain(- 'inline-flex min-h-10 sm:min-h-9 items-center gap-2 px-3 py-1.5 rounded-md',- );-- for (const organizationActionSource of [- organizationAccessInvitationsSectionSource,- organizationAccessManagementSectionSource,- organizationAccessMembersSectionSource,- organizationIncomingSharesSectionSource,- organizationOutgoingSharesSectionSource,- organizationOverviewDetailsSectionSource,- organizationSharingCreateSectionSource,- ]) {- expect(organizationActionSource).toContain('@/components/shared/Button');- expect(organizationActionSource).toContain('<Button');- }- expect(organizationAccessInvitationsSectionSource).toContain('variant="dangerOutline"');- expect(organizationIncomingSharesSectionSource).toContain('variant="successGhost"');- expect(organizationIncomingSharesSectionSource).toContain('variant="dangerGhost"');- expect(organizationAccessMembersSectionSource).toContain('variant="dangerGhost"');- expect(organizationOutgoingSharesSectionSource).toContain('variant="dangerGhost"');- expect(organizationSharingCreateSectionSource).toContain('variant="ghost"');- for (const source of [- organizationAccessInvitationsSectionSource,- organizationAccessManagementSectionSource,- organizationAccessMembersSectionSource,- organizationIncomingSharesSectionSource,- organizationOutgoingSharesSectionSource,- organizationOverviewDetailsSectionSource,- organizationSharingCreateSectionSource,- ]) {- expect(source).not.toContain(- 'inline-flex items-center justify-center rounded-md bg-blue-600',- );- expect(source).not.toContain('hover:bg-red-50 dark:text-red-300');- expect(source).not.toContain('hover:bg-emerald-50 dark:text-emerald-300');- }- });-- it('keeps settings callouts on the shared CalloutCard primitive', () => {- for (const source of [- aiProviderConfigurationSectionSource,- diagnosticsResultsPanelSource,- discoverySettingsFormSource,- monitoredSystemImpactPreviewSource,- reportingPanelSource,- securityAuthPanelSource,- securityOverviewPanelSource,- addressProbeStepSource,- availabilityTargetSlotSource,- trueNASCredentialSlotSource,- vmwareCredentialSlotSource,- ]) {- expect(source).toContain('CalloutCard');- }-- expect(discoverySettingsFormSource).toContain('scale="compact"');- expect(aiProviderConfigurationSectionSource).toContain('scale="compact"');- expect(diagnosticsResultsPanelSource).toContain('scale="compact"');- for (const source of [- addressProbeStepSource,- availabilityTargetSlotSource,- trueNASCredentialSlotSource,- vmwareCredentialSlotSource,- ]) {- expect(source).toContain('scale="compact"');- expect(source).toContain('padding="sm"');- }- expect(discoverySettingsFormSource).not.toContain(- 'rounded-md border border-amber-200 bg-amber-50/80',- );- expect(aiProviderConfigurationSectionSource).not.toContain('rounded-sm border border-red-200');- expect(diagnosticsResultsPanelSource).not.toContain(- 'rounded-md border border-amber-200 bg-amber-50',- );- expect(addressProbeStepSource).not.toContain('rounded-md border border-red-300 bg-red-50');- expect(addressProbeStepSource).not.toContain('rounded-md border border-amber-300 bg-amber-50');- expect(availabilityTargetSlotSource).not.toContain('testToneClass');- expect(availabilityTargetSlotSource).not.toContain('border-green-300 bg-green-50');- expect(availabilityTargetSlotSource).not.toContain(- 'rounded-md border border-rose-300 bg-rose-50',- );- expect(trueNASCredentialSlotSource).not.toContain(- 'rounded-md border border-amber-300 bg-amber-50',- );- expect(trueNASCredentialSlotSource).not.toContain(- 'rounded-md border border-rose-300 bg-rose-50',- );- expect(vmwareCredentialSlotSource).not.toContain(- 'rounded-md border border-amber-300 bg-amber-50',- );- expect(vmwareCredentialSlotSource).not.toContain(- 'rounded-md border border-rose-300 bg-rose-50',- );});it('keeps dense settings tables on deliberate phone information priorities', () => {@@ -846,14 +136,6 @@ describe('settings architecture guardrails', () => {// browser matrix verify visible recovery actions instead of table markup.});- it('keeps settings loading skeletons on the shared skeleton primitive', () => {- for (const source of [dataHandlingPanelSource, securityOverviewPanelSource]) {- expect(source).toContain('@/components/shared/SettingsLoadingSkeleton');- expect(source).toContain('SettingsLoadingSkeleton');- expect(source).not.toContain('animate-pulse');- }- });-it('normalizes sparse security status before deriving privileged posture', () => {expect(securityAuthPanelSource).toContain('apiTokenConfigured?: boolean;');expect(securityOverviewPanelSource).toContain(@@ -873,91 +155,6 @@ describe('settings architecture guardrails', () => {);});- it('keeps settings loading spinners on the shared spinner primitive', () => {- const spinnerConsumers: Array<[string, string[]]> = [- [- '../AISettings.tsx',- ['h-4 w-4 border-2 border-current border-t-transparent rounded-full animate-spin'],- ],- [- '../AISettingsDialogs.tsx',- ['h-4 w-4 border-2 border-white border-t-transparent rounded-full animate-spin'],- ],- ['../APITokenManager.tsx', ['<svg class="h-4 w-4 animate-spin"']],- [- '../AgentProfilesPanel.tsx',- ['animate-spin rounded-full h-6 w-6 border-b-2 border-blue-500'],- ],- ['../RolesPanel.tsx', ['animate-spin rounded-full h-6 w-6 border-b-2 border-blue-500']],- [- '../SSOProvidersPanel.tsx',- ['h-4 w-4 border-2 border-current border-t-transparent rounded-full animate-spin'],- ],- [- '../UpdateInstallGuide.tsx',- ['h-4 w-4 animate-spin rounded-full border-2 border-white border-t-transparent'],- ],- [- '../UpdatesSettingsPanel.tsx',- ['animate-spin h-4 w-4 border-2 border-white border-t-transparent rounded-full'],- ],- [- '../UserAssignmentsDialog.tsx',- ['animate-spin rounded-full h-4 w-4 border-b-2 border-blue-500'],- ],- [- '../UserAssignmentsPanel.tsx',- ['animate-spin rounded-full h-6 w-6 border-b-2 border-blue-500'],- ],- ];-- for (const [path, retiredPatterns] of spinnerConsumers) {- const source = settingsRuntimeSources[path];- expect(source).toContain('@/components/shared/LoadingSpinner');- expect(source).toContain('LoadingSpinner');- for (const retiredPattern of retiredPatterns) {- expect(source).not.toContain(retiredPattern);- }- }- });-- it('keeps embedded settings panel empty states on the shared primitive', () => {- const panelEmptyStateConsumers = [- agentProfilesPanelSource,- auditWebhookPanelSource,- auditLogPanelSource,- availabilitySettingsPanelSource,- diagnosticsResultsPanelSource,- ssoProvidersPanelSource,- ];-- for (const source of panelEmptyStateConsumers) {- expect(source).toContain('@/components/shared/EmptyState');- expect(source).toContain('<EmptyState');- }-- expect(agentProfilesPanelSource.match(/variant="panel"/g) ?? []).toHaveLength(2);- expect(auditWebhookPanelSource).toContain('variant="panel"');- expect(auditLogPanelSource).toContain('variant="panel"');- expect(availabilitySettingsPanelSource).toContain('variant="panel"');- expect(diagnosticsResultsPanelSource).toContain('variant="panel"');- expect(ssoProvidersPanelSource).toContain('variant="panel"');- expect(agentProfilesPanelSource).not.toContain('text-center py-8 text-muted');- expect(auditWebhookPanelSource).not.toContain(- 'py-10 flex flex-col items-center justify-center text-muted border-2 border-dashed border-border rounded-md',- );- expect(auditLogPanelSource).not.toContain(- 'text-center py-12 px-4 bg-surface-alt rounded-md border border-dashed border-border',- );- expect(availabilitySettingsPanelSource).not.toContain(- 'flex flex-col items-center justify-center gap-3 px-4 py-12 text-center',- );- expect(diagnosticsResultsPanelSource).not.toContain(- 'inline-flex min-h-10 items-center gap-2 rounded-md bg-blue-600',- );- expect(ssoProvidersPanelSource).not.toContain('text-center py-8 text-muted');- });-it('keeps telemetry disclosure aligned with the security privacy contract', () => {expect(EN_MESSAGES['settings.general.telemetry.description']).toContain('coarse deployment and lifecycle buckets',@@ -971,55 +168,10 @@ describe('settings architecture guardrails', () => {expect(EN_MESSAGES['settings.general.telemetry.description']).toContain('identifiers, URLs, paths, locale, raw browser events, an event-level clickstream, prompts, chat messages, command text, action output, token values, names, email addresses, or IP addresses',);- expect(generalSettingsPanelSource).toContain('settings.general.telemetry.payloadAriaLabel');- expect(generalSettingsPanelSource).toContain('settings.general.telemetry.resetId');- expect(generalSettingsPanelSource).toContain('id="usage-telemetry"');- // The payload-update banner and its one-click disable deep link were- // retired: payload changes are disclosed in release notes and the dated- // PRIVACY.md changelog, and the preference is changed only from the panel.- expect(settingsSource).not.toContain('telemetryAction');- expect(settingsSource).not.toContain('handleTelemetryEnabledChange(false)');- expect(generalSettingsPanelSource).toContain('variant="primary"');expect(generalSettingsPanelSource).not.toContain('license_tier');expect(generalSettingsPanelSource).not.toContain('api_tokens');});- // Every supported locale is offered from the registry, and with four options- // the row must stack on phones or the last option is clipped at 375px.- it('keeps the language selector registry-driven and stacked on phones', () => {- expect(generalSettingsPanelSource).toContain('SUPPORTED_LOCALES.map((locale) => ({');- expect(generalSettingsPanelSource).toContain(- 'class="flex flex-col items-start gap-2 p-2 sm:flex-row sm:items-center sm:justify-between sm:gap-4 sm:p-6"',- );- expect(generalSettingsPanelSource).toContain(- 'class="max-w-full shrink-0 [&_button]:px-1.5 sm:w-auto sm:[&_button]:px-3"',- );- });-- it('keeps panel-owned gated settings routes separate from sidebar visibility', () => {- expect(settingsNavVisibilitySource).toContain('const PANEL_OWNED_FEATURE_GATE_TABS');- expect(settingsNavVisibilitySource).toContain('shouldBlockSettingsRouteItem');- expect(settingsNavVisibilitySource).toContain('!PANEL_OWNED_FEATURE_GATE_TABS.has(tab)');- expect(settingsAccessSource).toContain('const routeTabGroups = createMemo');- expect(settingsAccessSource).toContain('const navTabGroups = createMemo');- expect(settingsAccessSource).toContain('!shouldBlockSettingsRouteItem');- expect(settingsAccessSource).toContain('!shouldHideSettingsNavItem');- });-- it('keeps Assistant and Patrol provider diagnostics backend-owned in settings state', () => {- expect(aiSettingsModelSource).toContain(- 'export type ProviderTestResult = AIProviderTestResult',- );- expect(aiSettingsModelSource).toContain(- "{ value: 'deepseek', title: 'DeepSeek', description: 'V4' }",- );- expect(aiSettingsModelSource).not.toContain("description: 'V3'");- expect(aiSettingsStateSource).toContain('getProviderTestDiagnosticMessage(result)');- expect(aiSettingsStateSource).toContain('recommendation: result.recommendation');- expect(aiSettingsStateSource).toContain('providerHealth[erroredCandidate].message');- expect(aiSettingsStateSource).not.toContain('OpenRouter returned 401');- });-it('reveals Patrol entry points after AI settings saves without a page reload', () => {// Every successful AI settings save path must re-derive the session// assistantEnabled capability so the Patrol tab and alert Investigate@@ -1034,49 +186,23 @@ describe('settings architecture guardrails', () => {);});- it('keeps Assistant and Patrol provider-specific fields model-driven', () => {- expect(aiSettingsModelSource).toContain('export const AI_PROVIDERS: AIProvider[] = [');- for (const provider of ['zai', 'groq', 'mistral', 'cerebras', 'together', 'fireworks']) {- expect(aiSettingsModelSource).toContain(`provider: '${provider}'`);- expect(aiSettingsStateSource).toContain(`${provider}_api_key`);- expect(aiSettingsStateSource).toContain(`${provider}_configured`);- }- expect(aiSettingsModelSource).toContain('extraFields: [');- expect(aiSettingsModelSource).toContain("inputField: 'ollamaKeepAlive'");- expect(aiSettingsModelSource).toContain("helpContentId: 'ai.ollama.keepAlive'");- expect(aiSettingsModelSource).toContain("inputField: 'zaiBaseUrl'");- expect(aiProviderConfigurationSectionSource).toContain('<For each={config.extraFields || []}>');- expect(aiProviderConfigurationSectionSource).toContain(- 'aria-label={`${getAIProviderDisplayName(config.provider)} ${extraField.label}`}',+ it('keeps the language selector registry-driven and stacked on phones', () => {+ expect(generalSettingsPanelSource).toContain('SUPPORTED_LOCALES.map((locale) => ({');+ expect(generalSettingsPanelSource).toContain(+ 'class="flex flex-col items-start gap-2 p-2 sm:flex-row sm:items-center sm:justify-between sm:gap-4 sm:p-6"',+ );+ expect(generalSettingsPanelSource).toContain(+ 'class="max-w-full shrink-0 [&_button]:px-1.5 sm:w-auto sm:[&_button]:px-3"',);- expect(aiProviderConfigurationSectionSource).not.toContain('<Show when={config.extraField}>');- expect(aiProviderConfigurationSectionSource).not.toContain('extraField()');- });-- it('keeps local subscription agents explicit and credential-free in settings', () => {- for (const provider of ['codex-subscription', 'claude-subscription']) {- expect(aiSettingsModelSource).toContain(`provider: '${provider}'`);- }- expect(aiSettingsModelSource).toContain("inputType: 'toggle'");- expect(aiSettingsModelSource).toContain("inputField: 'codexSubscriptionEnabled'");- expect(aiSettingsModelSource).toContain("inputField: 'claudeSubscriptionEnabled'");- expect(aiSettingsDialogsSource).toContain("props.setupProvider() === 'codex-subscription'");- expect(aiSettingsDialogsSource).toContain("props.setupProvider() === 'claude-subscription'");- expect(aiSettingsDialogsSource).toContain('key or OAuth token is stored in Pulse');});- it('keeps the Ollama quickstart on the server-authored suggested-model projection', () => {- // The blessed Patrol model is registry-owned backend metadata; the- // provider row renders the projection and must not hardcode model IDs.- expect(aiProviderConfigurationSectionSource).toContain(- "registryDefinition()?.suggested_model ?? ''",- );- expect(aiProviderConfigurationSectionSource).toContain(- 'command={`ollama pull ${suggestedModel()}`}',- );- expect(aiProviderConfigurationSectionSource).toContain('suggested_model_equivalents');- expect(aiProviderConfigurationSectionSource).not.toContain('qwen');- expect(aiSettingsModelSource).not.toContain('qwen');+ it('keeps the Proxmox agent install request command-free and its setup token off the clipboard', () => {+ // An agent installed from the node editor must not get remote command+ // execution, and the clipboard carries only the credential-free command;+ // the one-time setup token is shown separately.+ expect(nodeModalStateSource).toContain('copyToClipboard(data.command)');+ expect(nodeModalStateSource).toContain('showSetupToken(data)');+ expect(nodeModalStateSource).toContain('enableCommands: false');});it('keeps Ollama credentials in the provider editor with write-only saved state', () => {@@ -1093,43 +219,6 @@ describe('settings architecture guardrails', () => {expect(aiSettingsStateSource).not.toContain('form.ollamaPassword.trim()');});- it('keeps local provider inheritance and removal on explicit lifecycle contracts', () => {- expect(aiSettingsStateSource).toContain("data.ollama_keep_alive ?? ''");- expect(aiSettingsStateSource).toContain('remove_providers: [provider]');- expect(aiSettingsStateSource).not.toContain('clearPayload.clear_openai_key');- expect(aiSettingsModelSource).toContain('API key (optional for a custom endpoint)');- expect(aiSettingsModelSource).toContain(- 'Leave the API key blank when the endpoint does not require one.',- );- });-- it('keeps Assistant session maintenance limited to Pulse-owned session actions', () => {- expect(aiSettingsStateSource).not.toContain('handleSessionDiff');- expect(aiSettingsStateSource).not.toContain('handleSessionRevert');- expect(aiSettingsStateSource).not.toContain('showDiffModal');- expect(aiSettingsStateSource).not.toContain('diffFiles');- expect(aiSettingsDialogsSource).not.toContain('Session file changes');- });-- it('keeps the Patrol model readiness advisor wired through canonical settings state', () => {- expect(aiSettingsStateSource).toContain('runPatrolModelReadiness');- expect(aiSettingsStateSource).toContain('runPatrolModelReadinessAdvisor');- expect(aiSettingsStateSource).toContain('patrolModelReadinessResult');- expect(aiSettingsStateSource).toContain('patrolModelReadinessRunning');- expect(aiSettingsStateSource).toContain('AbortController');- expect(aiModelSelectionSectionSource).toContain('PatrolModelReadinessControl');- expect(aiModelSelectionSectionSource).toContain('runPatrolModelReadinessAdvisor');- expect(aiModelSelectionSectionSource).toContain('Autonomy suitability');- expect(aiModelSelectionSectionSource).not.toContain("fetch('/api/ai/patrol/readiness");- });-- it('hydrates the Patrol readiness advisor from the persisted settings snapshot', () => {- expect(aiSettingsStateSource).toContain('hydratePatrolModelReadinessFromSettings');- expect(aiSettingsStateSource).toContain('patrol_model_readiness');- expect(aiModelSelectionSectionSource).toContain('formatRecordedAt');- expect(aiModelSelectionSectionSource).toContain('last evaluated');- });-it("passes the form's pending patrolModel to the advisor so the model check tests the unsaved selection", () => {// Without this, clicking Check Patrol model after changing the model// dropdown silently tested the previously-saved model and the@@ -1154,58 +243,6 @@ describe('settings architecture guardrails', () => {);});- it('presents a readiness run that was never assessed neutrally instead of as a model failure', () => {- // An operator cancel or a proxy severing a slow local evaluation measures- // nothing about the model. Rendering that in the red "Patrol model not- // verified" treatment is the blame-the-model presentation #1640 removed- // from the backend, so the banner needs its own neutral branch. Tone and- // headline are exported pure functions so the presentation is provable- // without mounting the settings shell.- expect(aiModelSelectionSectionSource).toContain('export const patrolReadinessBannerTone');- expect(aiModelSelectionSectionSource).toContain('export const patrolReadinessBannerHeadline');- expect(aiModelSelectionSectionSource).toContain('isPatrolReadinessUnassessed');- expect(aiModelSelectionSectionSource).toContain("'not_assessed'");- expect(aiModelSelectionSectionSource).toContain("'interrupted'");- expect(aiModelSelectionSectionSource).toContain('Patrol model check did not complete');- expect(aiModelSelectionSectionSource).toContain("case 'neutral':");- });-- it('keeps contextual settings feature gates free of retired commercial telemetry wrappers', () => {- for (const source of [- agentProfilesPanelSource,- agentProfilesStateSource,- aiRuntimeControlsSectionSource,- auditLogPanelSource,- auditLogStateSource,- auditWebhookPanelSource,- auditWebhookStateSource,- rbacFeatureGateSectionSource,- rbacFeatureGateStateSource,- reportingPanelSource,- reportingStateSource,- ssoProvidersPanelSource,- ssoProvidersStateSource,- ]) {- expect(source).not.toContain('upgradeMetrics');- expect(source).not.toContain('conversionEvents');- expect(source).not.toContain('infrastructureOnboardingMetrics');- expect(source).not.toContain('trackPaywallViewed');- expect(source).not.toContain('trackUpgradeClicked');- expect(source).not.toContain('/api/upgrade-metrics/events');- }-- expect(agentProfilesPanelSource).not.toContain('Pro feature');- expect(agentProfilesPanelSource).toContain('UpgradeButtonLink');- expect(agentProfilesPanelSource).not.toContain('getUpgradeActionButtonClass');- expect(auditLogPanelSource).toContain('UpgradeButtonLink');- expect(auditLogPanelSource).not.toContain('getUpgradeActionButtonClass');- expect(auditWebhookPanelSource).not.toContain('Audit Webhooks (Pro)');- expect(reportingPanelSource).not.toContain('Advanced Reporting (Pro)');- expect(rbacFeatureGateSectionSource).not.toContain('Custom Roles (Pro)');- expect(rbacFeatureGateSectionSource).not.toContain('Centralized Access Control (Pro)');- expect(ssoProvidersPanelSource).not.toContain('Add SAML (Pro)');- });-it('keeps the SSO editor header outside its independently scrolling fields', () => {const editor = ssoProvidersPanelSource.slice(ssoProvidersPanelSource.indexOf('{/* Add/Edit Modal */}'),@@ -1251,35 +288,6 @@ describe('settings architecture guardrails', () => {expect(presentation).not.toContain('error.message');});- it('keeps SAML SSO available without a self-hosted Pro upsell boundary', () => {- expect(ssoProvidersPanelSource).toContain('@/components/shared/Button');- expect(ssoProvidersPanelSource).toContain('ActionIconButton');- expect(ssoProvidersPanelSource).toContain('CopyValueButton');- expect(ssoProvidersPanelSource).toContain("openAddModal('saml')");- expect(ssoProvidersPanelSource).toContain('getSSOProviderAddButtonLabel');- expect(ssoProvidersPanelSource).toContain('Groups Claim');- expect(ssoProvidersPanelSource).toContain('FormTextarea');- expect(ssoProvidersPanelSource).not.toContain(['<', 'textarea'].join(''));- expect(ssoProvidersPanelSource).toContain(- 'Claim used for OIDC allowed groups and role mappings.',- );- expect(ssoProvidersPanelSource).not.toContain('showSamlUpsell');- expect(ssoProvidersPanelSource).not.toContain('UpgradeLink');- expect(ssoProvidersPanelSource).not.toContain('Add SAML (Pro)');- expect(ssoProvidersStateSource).not.toContain('advanced_sso');- expect(ssoProvidersStateSource).not.toContain('getUpgradeActionDestination');- expect(ssoProvidersStateSource).not.toContain('loadRuntimeCapabilities');- });-- it('separates SSO mapping entries without splitting spaces inside IdP group names', () => {- expect(ssoProvidersModelSource).toContain('input.split(/[,\\r\\n]+/)');- expect(ssoProvidersModelSource).not.toContain('splitList(input).forEach');- expect(ssoProvidersModelSource).toContain('allowedGroups: splitGroupList(form.allowedGroups)');- expect(ssoProvidersModelSource).toContain('scopes: splitList(form.oidcScopes)');- expect(ssoProvidersPanelSource).toContain('Comma- or newline-separated.');- expect(ssoProvidersPanelSource).toContain('Group names may contain spaces.');- });-it('keeps card endpoint labels outside the wrapping shared copy control', () => {const endpoint = ssoProvidersPanelSource.slice(ssoProvidersPanelSource.indexOf('const SSOEndpoint:'),@@ -1299,115 +307,6 @@ describe('settings architecture guardrails', () => {expect(ssoProvidersPanelSource).not.toContain('max-w-[18rem]');});- it('never offers a localhost SSO endpoint URL as if it were registerable with an IdP', () => {- // The panel tells admins to register these URLs with their IdP, so a- // hardcoded localhost guess would be copied out and fail at the IdP. The- // backend derives them from the configured public URL or the request; when- // neither resolves, the panel must guide instead of offering a copy button.- expect(ssoProvidersPanelSource).not.toContain('localhost:7655');- expect(ssoProvidersPanelSource).toContain('getSSOEndpointUnavailableHint');- expect(ssoProviderPresentationSource).toContain('getSSOEndpointUnavailableHint');- expect(ssoProviderPresentationSource).toContain(- 'Set the public URL in Settings > System to generate the correct',- );- // The add-provider modal closes on save, so it must not promise the URL- // will appear in the modal itself.- expect(ssoProvidersPanelSource).not.toContain('shown here and on the provider card');- expect(ssoProvidersPanelSource).toContain('then copy it from the provider card');- });-- it('keeps Docker and Podman update-action copy on the system settings presentation owner', () => {- expect(dockerRuntimeSettingsCardSource).toContain('getDockerUpdateActionsPresentation');- expect(dockerRuntimeSettingsCardSource).toContain('DOCKER_UPDATE_ACTIONS_ENV_VAR');- expect(dockerRuntimeSettingsCardSource).toContain('TogglePrimitive');- expect(dockerRuntimeSettingsCardSource).not.toContain('role="switch"');- expect(dockerRuntimeSettingsCardSource).not.toContain('aria-checked');- expect(dockerRuntimeSettingsCardSource).not.toContain('Container Updates');- expect(dockerRuntimeSettingsCardSource).not.toContain('container update actions');-- expect(systemSettingsPresentationSource).toContain("getSourcePlatformLabel('docker')");- expect(systemSettingsPresentationSource).toContain('getDockerUpdateActionsPresentation');- expect(systemSettingsPresentationSource).toContain('DOCKER_UPDATE_ACTIONS_SECTION_TITLE');- expect(systemSettingsPresentationSource).toContain('DOCKER_UPDATE_ACTIONS_ENV_VAR');- });-- it('keeps audit-log filter labels and pagination on their presentation owners', () => {- expect(auditLogPanelSource).toContain('AUDIT_EVENT_FILTER_ALL_LABEL');- expect(auditLogPanelSource).toContain('AUDIT_EVENT_CONFIG_CHANGE_LABEL');- expect(auditLogPanelSource).toContain('AUDIT_SUCCESS_FILTER_SUCCESS_ONLY_LABEL');- expect(auditLogPanelSource).toContain('AUDIT_VERIFICATION_FILTER_ALL_LABEL');- expect(auditLogPanelSource).not.toContain('All Events');- expect(auditLogPanelSource).not.toContain('All Verification');- expect(auditLogPanelSource).not.toContain('Success Only');- expect(auditLogPanelSource).toContain('viewOptions={');- expect(auditLogPanelSource).toContain('Pagination');- expect(auditLogPanelSource).toContain('label="Audit page size"');- expect(auditLogPanelSource).not.toContain('viewOptionsTrailing');- expect(auditLogPresentationSource).toContain(- "AUDIT_EVENT_FILTER_ALL_LABEL = getAllFilterOptionLabel('events')",- );- expect(auditLogPresentationSource).toContain(- "AUDIT_VERIFICATION_FILTER_ALL_LABEL = getAllFilterOptionLabel('verification')",- );- });-- it('keeps audit-log fetch errors and page-size normalization on shared owners', () => {- expect(auditLogStateSource).toContain('apiErrorFromResponse');- expect(auditLogStateSource).toContain('getAuditLogFetchErrorMessage');- expect(auditLogStateSource).toContain('normalizeAuditPageSize');- expect(auditLogStateSource).toContain('ALLOWED_AUDIT_PAGE_SIZES');- expect(auditLogPresentationSource).toContain("code === 'audit_store_busy'");- expect(auditLogPresentationSource).toContain("code === 'audit_store_unavailable'");- expect(auditLogPresentationSource).toContain("code === 'query_failed'");- });-- it('keeps API token Docker and Podman copy on shared presentation helpers', () => {- expect(apiAccessPanelSource).toContain('API_TOKEN_ACCESS_PANEL_DESCRIPTION');- expect(apiAccessPanelSource).toContain('ButtonLink');- expect(apiAccessPanelSource).toContain('variant="info"');- expect(apiAccessPanelSource).not.toContain('rel="noreferrer"');- expect(apiAccessPanelSource).not.toContain(- 'inline-flex min-h-10 sm:min-h-10 w-fit items-center gap-2 rounded-md border border-blue-200 bg-blue-50 px-3 py-2 text-sm font-semibold text-blue-700',- );- expect(apiTokenManagerModelSource).toContain('API_TOKEN_DOCKER_REPORT_PRESET_DESCRIPTION');- expect(apiTokenManagerModelSource).toContain('API_TOKEN_DOCKER_MANAGE_PRESET_DESCRIPTION');- expect(apiTokenManagerSource).toContain('ExternalTextLink');- expect(apiTokenManagerSource).not.toContain('rel="noreferrer"');- expect(apiTokenManagerSource).toContain('getAPITokenDockerPodmanUsageSummary');- expect(apiTokenManagerSource).toContain('getAPITokenDockerPodmanUsageTitle');- expect(apiTokenManagerStateSource).toContain('getAPITokenDockerPodmanUsageCountLabel');-- for (const source of [- apiAccessPanelSource,- apiTokenManagerSource,- apiTokenManagerModelSource,- apiTokenManagerStateSource,- ]) {- expect(source).not.toContain('container runtime');- expect(source).not.toContain('Container runtime');- expect(source).not.toContain('container runtimes');- expect(source).not.toContain('Container runtimes');- }- });-- it('keeps infrastructure Docker and Podman settings copy on shared source-platform labels', () => {- expect(infrastructureOperationsModelSource).toContain("getSourcePlatformLabel('docker')");- expect(agentProfileSettingsSource).toContain("getSourcePlatformLabel('docker')");- expect(diagnosticsResultsPanelSource).toContain("getSourcePlatformLabel('docker')");-- for (const source of [- infrastructureOperationsModelSource,- agentProfileSettingsSource,- diagnosticsResultsPanelSource,- ]) {- expect(source).not.toContain('Container Runtime Agents');- expect(source).not.toContain('Agent-backed container runtime monitoring');- expect(source).not.toContain('Force container runtime monitoring');- expect(source).not.toContain('Force a specific container runtime');- expect(source).not.toContain('Docker Runtime');- }- });-it('keeps settings native select controls on the shared labelled primitive', () => {const rawSelectUsers = Object.entries(settingsRuntimeSources).filter(([, source]) => source.includes('<select'))@@ -1415,104 +314,6 @@ describe('settings architecture guardrails', () => {.sort();expect(rawSelectUsers).toEqual([]);-- for (const source of [- auditLogPanelSource,- recoverySettingsPanelSource,- systemLogsPanelSource,- agentProfilesPanelSource,- infrastructureInstallerSectionSource,- nodeModalMonitoringSectionSource,- trueNASCredentialSlotSource,- organizationAccessManagementSectionSource,- organizationAccessMembersSectionSource,- organizationSharingCreateSectionSource,- rolesEditorDialogSource,- ]) {- expect(source).toContain("import { FormSelect } from '@/components/shared/FormSelect';");- expect(source).toContain('<FormSelect');- }- });-- it('keeps settings copy aligned with Infrastructure as the default workspace', () => {- // Copy phrases are matched against whitespace-normalized source so- // prettier line-wrapping inside JSX text cannot break the guard.- const normalize = (source: string) => source.replace(/\s+/g, ' ');- expect(normalize(settingsHeaderMetaSource)).toContain(- 'Manage appearance, layout, and default monitoring cadence.',- );- expect(normalize(generalSettingsPanelSource)).not.toContain('Dashboard, Infrastructure');- expect(normalize(networkBoundarySettingsSectionSource)).toContain(- 'Pulse URL for Alerts and Agent Commands',- );- expect(normalize(networkBoundarySettingsSectionSource)).not.toContain('Dashboard URL');- expect(normalize(nodeModalBasicInfoSectionSource)).toContain('monitoring views');- expect(normalize(nodeModalBasicInfoSectionSource)).not.toContain('dashboards');- // The server names an unnamed node from its host and disambiguates- // duplicates, so the form must not claim either is the user's job.- expect(normalize(nodeModalBasicInfoSectionSource)).not.toContain('must be unique');- expect(normalize(nodeModalMonitoringSectionSource)).toContain('trim workload noise');- expect(normalize(nodeModalMonitoringSectionSource)).toContain('Existing monitoring readings');- expect(normalize(nodeModalMonitoringSectionSource)).not.toContain('dashboard readings');- expect(normalize(recoverySettingsPanelSource)).toContain('Required for workload backup status');- expect(normalize(recoverySettingsPanelSource)).not.toContain('dashboard backup status');- });-- it('keeps cluster member address edits on the durable IPOverride boundary', () => {- // Existing PVE clusters expose per-member connection addresses in the- // node editor; the discovered Host and IP are rebuilt on re-discovery,- // so the editor must write ClusterEndpoint.ipOverride, never host.- expect(nodeCredentialSlotSource).toContain('<NodeModalClusterMembersSection');- expect(nodeModalClusterMembersSectionSource).toContain('updateClusterEndpointOverride(');- expect(nodeModalClusterMembersSectionSource).toContain('Connection address for ');- // Only changed members ride the write-only PUT payload.- expect(nodeModalStateSource).toContain('buildClusterEndpointOverridesPayload(');- expect(nodeModalStateSource).toContain('buildClusterEndpointTrustOverridesPayload(');- expect(nodeModalStateSource).toContain('clusterEndpointTrustEdited');- expect(nodeModalStatusFooterSource).toContain('!state.testResult()?.endpoint');- expect(nodeModalModelSource).toContain('export const buildClusterEndpointOverridesPayload = (');- });-- it('keeps system AI model catalogs on the shared searchable picker boundary', () => {- expect(aiModelSelectionSectionSource).toContain(- "import { AIModelPicker } from '@/components/shared/AIModelPicker';",- );- expect(aiModelSelectionSectionSource).toContain('const selectableModels =');- expect(aiModelSelectionSectionSource).toContain(- 'isModelProviderConfigured(model.id, state.settings()) || model.id === selected',- );- expect(aiModelSelectionSectionSource).toContain(- 'searchPlaceholder="Search configured provider models"',- );- expect(aiModelSelectionSectionSource).toContain('formatAIModelRouteLabel(match || trimmed)');- expect(aiSettingsStatusAndActionsSource).toContain('formatAIModelRouteLabel(match || modelId)');- expect(aiSettingsStatusAndActionsSource).not.toContain("model?.split(':').pop()");- expect(aiModelSelectionSectionSource).not.toContain('<select');- expect(aiModelSelectionSectionSource).not.toContain('<optgroup');-- expect(aiModelSelectionSectionSource).toContain('type AIModelOverrideKind');- expect(aiModelSelectionSectionSource).toContain("formKey: 'patrolModel'");- expect(aiModelSelectionSectionSource).not.toContain('chatModel');- expect(aiModelSelectionSectionSource).not.toContain('Pulse Assistant model');- expect(aiModelSelectionSectionSource).not.toContain('approved fix execution');- expect(aiModelSelectionSectionSource).toContain("label: 'Patrol model'");- expect(aiModelSelectionSectionSource).toContain(- 'Used when Patrol checks, investigates, and verifies work.',- );- expect(aiModelSelectionSectionSource).not.toContain("label: 'Service context model'");- expect(aiModelSelectionSectionSource).toContain('export const AIModelOverrideField');- expect(aiSettingsSource).not.toContain('kind="assistant"');- expect(aiSettingsSource).toContain(- '<AIModelOverrideField state={props.state} kind="patrol" includePatrolReadiness />',- );- expect(aiSettingsStateSource).not.toContain('discoveryModel');-- expect(aiSettingsModelSource).toContain('AIProviderTestResult');- expect(aiSettingsModelSource).toContain('AISettings as AISettingsType');- expect(aiSettingsModelSource).toContain('export type AIAvailableModel = ModelInfo;');- expect(aiSettingsStateSource).toContain(- 'const [availableModels, setAvailableModels] = createSignal<ModelInfo[]>([]);',- );});it('keeps provider configuration fields out of login credential autofill', () => {@@ -1529,283 +330,14 @@ describe('settings architecture guardrails', () => {);});- it('explains the container update risk lock through the canonical Patrol availability policy', () => {- expect(aiSettingsSource).toContain('getPatrolAlertAnalysisAvailabilityPresentation({');- expect(aiSettingsSource).toContain(- 'commercialSurfacesHidden: presentationPolicyHidesCommercialSurfaces(),',- );- // Plan-locked lines in Settings always say where the plan lives.- expect(aiSettingsSource).toContain('upgradePromptsHidden: false,');- expect(aiSettingsSource).not.toContain('presentationPolicyHidesUpgradePrompts');- expect(aiSettingsSource).toContain(- 'runtimeCapabilityBlock: getRuntimeCapabilityBlock(PATROL_ALERT_ANALYSIS_FEATURE_KEY),',- );- expect(aiSettingsSource).toContain(- 'planUpgradeDestination: getUpgradeActionDestination(PATROL_ALERT_ANALYSIS_FEATURE_KEY),',- );- expect(aiSettingsSource).toContain(- 'disabled={props.state.saving() || alertAnalysisAvailability().locked}',- );- expect(aiSettingsSource).toContain(- '<p id={alertAnalysisLockId} class="mt-1 text-xs text-muted">',- );- expect(aiSettingsSource).toContain(- 'alertAnalysisAvailability().locked ? alertAnalysisLockId : undefined',- );- // The shared Toggle declares locked/lockedMessage but never renders them,- // so the card must carry the explanation itself.- expect(aiSettingsSource).not.toContain('lockedMessage=');- expect(aiSettingsSource).not.toContain('Requires Pulse Pro');- });-- it('keeps system AI save feedback tied to provider and Patrol readiness context', () => {- expect(aiSettingsSource).toContain('Choose a Patrol mode on the Patrol page.');- expect(aiSettingsSource).toContain('Open Patrol');- expect(aiSettingsSource).toContain("const isProviderPage = () => page() === 'provider';");- expect(aiSettingsSource).toContain('showConnectionControls={isProviderPage()}');- expect(aiSettingsStatusAndActionsSource).toContain('showConnectionControls?: boolean');- expect(aiSettingsStatusAndActionsSource).toContain(- 'props.showConnectionControls && state.settings()?.configured',- );- expect(aiSettingsSource).not.toContain(- 'Set how much Patrol can do on its own from the Patrol page',- );- expect(aiSettingsSource).not.toContain('Patrol autonomy is the operations policy');- expect(aiSettingsStateSource).toContain(- "import { apiErrorDetails } from '@/api/responseUtils';",- );- expect(aiSettingsStateSource).toContain('resolveAISettingsSaveProviderFailure');- expect(aiSettingsStateSource).toContain('getAISettingsPatrolReadinessSaveMessage(');- expect(aiSettingsStateSource).toContain(- "getAISettingsPatrolReadinessSaveMessage(\n updated.patrol_readiness,\n 'Pulse Intelligence enabled',",- );- expect(aiSettingsStateSource).toContain('notificationStore.warning(patrolReadinessMessage);');- expect(aiSettingsStateSource).toContain('getAISettingsSaveProviderFailureMessage(');- });-- it('keeps update readiness checks on the shared install guide boundary', () => {- expect(updateInstallGuideSource).toContain('UpdateReadinessPanel');- expect(updateInstallGuideSource).toContain("props.updatePlan?.readiness?.status === 'blocked'");- expect(updateInstallGuideSource).toContain('Install blocked');- expect(updateInstallGuideSource).toContain(- 'disabled={props.isInstalling || readinessBlocked()}',- );- });-it('keeps Pro-runtime docker updates off the community image commands', () => {// A Pro-runtime container updates with digest-pinned commands from the// license server broker; pulling the community rcourtman/pulse image// would silently downgrade it to the community build. The panel keys the- // suppression off the compiled runtime identity, and the install guide- // routes both the available-update steps and the idle Docker box through- // that flag.+ // suppression off the compiled runtime identity; UpdateInstallGuide.test.tsx+ // renders the guide's Pro and community command sets.expect(updatesSettingsPanelSource).toContain("runtimeCapabilities()?.runtime?.build === 'pro'");expect(updatesSettingsPanelSource).toContain('isProRuntime={isProRuntime()}');- expect(updateInstallGuideSource).toContain('isProRuntime: boolean');- expect(updateInstallGuideSource).toContain('IDLE_DOCKER_PRO_NOTICE');- });-- it('keeps update history and rollback on the dedicated section boundary', () => {- // The panel shell mounts the history section; it must not inline history- // rows or rollback confirmation itself.- expect(updatesSettingsPanelSource).toContain(- "import { UpdateHistorySection } from '@/components/Settings/UpdateHistorySection';",- );- expect(updatesSettingsPanelSource).toContain('<UpdateHistorySection />');- expect(updatesSettingsPanelSource).not.toContain('listUpdateHistory');- expect(updatesSettingsPanelSource).not.toContain('rollbackUpdate');- // The section starts rollbacks through the shared store action, never its- // own POST, and always behind an explicit confirmation dialog gated to- // successful updates whose backup is still retained.- expect(updateHistorySectionSource).toContain('updateStore.rollbackUpdate');- expect(updateHistorySectionSource).not.toContain('apiFetchJSON');- expect(updateHistorySectionSource).toContain('ariaLabel="Confirm rollback"');- expect(updateHistorySectionSource).toContain(- "entry.action === 'update' && entry.status === 'success' && Boolean(entry.backup_path)",- );- });-- it('keeps published release notes discoverable from the current-version card', () => {- expect(updatesSettingsPanelSource).toContain('Current release notes');- expect(updatesSettingsPanelSource).toContain('buildReleaseNotesUrl');- expect(updatesSettingsPanelSource).toContain('isReleaseVersion');- expect(updatesSettingsPanelSource).toContain('!props.versionInfo()?.isDevelopment');- expect(updatesSettingsPanelSource).toContain('!props.versionInfo()?.isSourceBuild');- expect(updatesSettingsPanelSource).toContain('variant="compactAction"');- });-- it('keeps the update verdict honest about the age of the check behind it', () => {- // The displayed verdict can come from the 24h localStorage cache, so the- // Up to date state must carry the age of the check it came from through- // the shared presentation helper, or a stale verdict reads as a live- // comparison (#1601). The shared clock must keep that age moving while- // the panel stays mounted. The copy stays in the presentation owner,- // never inline in the panel shell.- expect(updatesSettingsPanelSource).toContain(- "import { useRelativeTimeNow } from '@/utils/relativeTimeClock';",- );- expect(updatesSettingsPanelSource).toContain('const now = useRelativeTimeNow();');- expect(updatesSettingsPanelSource).toContain(- 'getUpdateCheckedLabel(updateStore.lastCheckedAt(), now())',- );- expect(updatesSettingsPanelSource).toContain('!props.versionInfo()?.isSourceBuild');- expect(updatesPresentationSource).toContain("return 'Not checked yet'");- expect(updatesPresentationSource).toContain('`Checked ${relative}`');- });-- it('keeps infrastructure on a source-manager landing with route-backed dialogs', () => {- expect(infrastructureWorkspaceSource).toContain(- "import { ConnectionEditor } from './ConnectionEditor/ConnectionEditor';",- );- expect(infrastructureWorkspaceSource).toContain(- "import { InfrastructureSourceManager } from './InfrastructureSourceManager';",- );- expect(infrastructureWorkspaceSource).toContain(- "import { InfrastructureSourcePicker } from './InfrastructureSourcePicker';",- );- expect(infrastructureWorkspaceSource).toContain(- "import { Dialog } from '@/components/shared/Dialog';",- );- expect(infrastructureWorkspaceSource).toContain('NodeCredentialSlot');- expect(infrastructureWorkspaceSource).toContain('TrueNASCredentialSlot');- expect(infrastructureWorkspaceSource).toContain('VMwareCredentialSlot');- expect(infrastructureWorkspaceSource).not.toContain('AvailabilityTargetSlot');- expect(infrastructureWorkspaceSource).toContain(- ": (type) => openAddFlow(type === 'agent' ? 'agent' : (type as ManagedAddTypeStep))",- );- expect(infrastructureWorkspaceSource).toContain('reviewDiscoveredSource');- expect(infrastructureWorkspaceSource).toContain('selectedDiscoveredSource');- expect(infrastructureWorkspaceSource).toContain('selectedProbeCandidate');- expect(infrastructureWorkspaceSource).toContain('importCandidateForNodeType');- expect(infrastructureWorkspaceSource).toContain('importCandidate={importCandidate ?? null}');- expect(infrastructureWorkspaceSource).toContain(- "return { kind: 'discovery', server: discovered };",- );- expect(infrastructureWorkspaceSource).toContain("return { kind: 'probe', candidate: probed };");- expect(infrastructureWorkspaceSource).toContain(- "import { InfrastructureDiscoverySettingsDialog } from './InfrastructureDiscoverySettingsDialog';",- );- expect(infrastructureWorkspaceSource).toContain(- 'const [showDiscoverySettings, setShowDiscoverySettings] = createSignal(false);',- );- expect(infrastructureWorkspaceSource).toContain('<InfrastructureDiscoverySettingsDialog');- expect(infrastructureWorkspaceSource).toContain('onReviewDiscoveredSource');- expect(infrastructureWorkspaceSource).toContain('void props.loadDiscoveredNodes();');- expect(infrastructureWorkspaceSource).toContain('<InfrastructureSourceManager');- expect(infrastructureWorkspaceSource).toContain('<InfrastructureSourcePicker');- expect(infrastructureWorkspaceSource).not.toContain('<ConnectionsTable rows={rows} />');- expect(infrastructureWorkspaceSource).not.toContain("from './ConnectionsTable'");- expect(infrastructureWorkspaceSource).toContain('flex h-full min-h-0 flex-col');- expect(infrastructureWorkspaceSource).toContain('showSlotHeader={false}');- expect(infrastructureWorkspaceSource).toContain(- "onDetectApiPlatform={() => openAddFlow('detect')}",- );- expect(infrastructureWorkspaceSource).toContain("onBackToCatalog={() => openAddFlow('pick')}");- expect(infrastructureWorkspaceSource).not.toContain('trackInitialCatalogSelection');- expect(infrastructureWorkspaceSource).not.toContain('recordCatalogSelection');- expect(infrastructureWorkspaceSource).not.toContain('onboardingMetricsTracker');- expect(infrastructureWorkspaceSource).toContain('renderAgentConnectionDetails');- expect(infrastructureWorkspaceSource).not.toContain('InfrastructureOperationsController');- expect(infrastructureWorkspaceSource).not.toContain('PlatformConnectionsWorkspace');- // Card title shifted from 'Infrastructure systems' (which duplicated- // the page header) to 'Connected systems' which describes the card- // content distinctly.- expect(infrastructureSourceManagerSource).toContain('Connected systems');- // Discovery owns an explicit status/action band inside Connected systems- // so manual scans are observable without opening the settings dialog.- expect(infrastructureSourceManagerSource).toContain('Run discovery');- // Scan scope choices must be full-row controls; a narrow native radio input- // regressed the custom subnet path into a hard-to-click target.- expect(discoverySettingsFormSource).toContain('role="radiogroup"');- expect(discoverySettingsFormSource).toContain('role="radio"');- expect(discoverySettingsFormSource).toContain('selectDiscoveryMode');- expect(infrastructureSourceManagerSource).toContain('Discover Proxmox systems');- expect(infrastructureSourceManagerSource).toContain('Configure discovery');- expect(monitoredSystemImpactPreviewSource).toContain('getMonitoredSystemImpactPreviewTitle');- expect(monitoredSystemImpactPreviewSource).toContain(- 'formatMonitoredSystemImpactPreviewSummary',- );- expect(monitoredSystemImpactPreviewSource).not.toContain('Current usage');- expect(monitoredSystemImpactPreviewSource).not.toContain(' / ');- expect(monitoredSystemImpactPreviewSource).not.toContain(- 'reuses your current monitored-system allowance',- );- expect(monitoredSystemImpactPreviewSource).not.toContain('frees monitored-system allowance');- expect(nodeCandidateImportPlanSource).toContain('aria-label="Candidate import plan"');- expect(nodeCandidateImportPlanSource).toContain('MonitoredSystemImpactPreview');- expect(nodeCandidateImportPlanSource).toContain('Preview impact');- expect(nodeCandidateImportPlanSource).toContain('Approve this import plan');- // Card-level description was dropped; the page-level subtitle from- // SETTINGS_HEADER_META carries the same intent without duplication.- expect(infrastructureSourceManagerSource).toContain('onReviewDiscoveredSource');- expect(infrastructureSourceManagerSource).toContain('Discovered');- expect(infrastructureSourceManagerSource).toContain('getInfrastructureSourceManagerProducts');- expect(infrastructureSourceManagerSource).toContain('TableHeader');- expect(infrastructureSourceManagerSource).toContain('getGroupedTableRowClass');- expect(infrastructureSourceManagerSource).not.toContain('bg-base hover:bg-base');- expect(infrastructureSourceManagerSource).toContain('aria-label={`Add ${group.label}`}');- expect(infrastructureWorkspaceSource).toContain('onAddSourceStep');- expect(infrastructureSourceManagerSource).toContain('getAgentHostProfileFamily');- expect(infrastructureSourceManagerSource).toContain('visibleSourceGroupsForProduct');- expect(infrastructureSourceManagerSource).toContain(- 'group.id === product.type && discoveredRows().length > 0',- );- expect(infrastructureSourceManagerSource).toContain('Review');- expect(infrastructureSourceManagerSource).toContain('Manage');- expect(infrastructureSourceManagerSource).not.toContain('Detect address');- expect(infrastructureSourceManagerSource).toContain("'Install agent'");- // Cluster members install in one step through the server-side deploy, so- // the install actions route through the canonical dialog and keep the- // scoped installer as the fallback instead of a hand-copied token.- expect(infrastructureSourceManagerSource).toContain("from './ClusterAgentDeployDialog'");- expect(infrastructureSourceManagerSource).toContain('<ClusterAgentDeployDialog');- expect(infrastructureSourceManagerSource).toContain(- 'onUseInstaller={handleInstallAgentShortcut}',- );- expect(infrastructureSourceManagerSource).toContain('<Show when={clusterDeploy()} keyed>');- expect(infrastructureSourceManagerSource).toContain('Add infrastructure');- expect(infrastructureSourceManagerSource).not.toContain('Monitor endpoint');- expect(infrastructureSourceManagerSource).toContain('getInfrastructureEmptyStateSummary');- expect(infrastructureSourceManagerSource).toContain('Connection posture');- expect(infrastructureSourceManagerSource).toContain("'system')} connected");- expect(infrastructureSourceManagerSource).toContain('All active');- expect(infrastructureSourceManagerSource).toContain(- "{fleetAttentionSystemCount() === 1 ? 'needs' : 'need'} attention",- );- expect(infrastructureSourceManagerSource).toContain(- "{uncoveredAgentTargetCount() === 1 ? 'has' : 'have'} limited coverage",- );- expect(infrastructureSourceManagerSource).toContain('setupConfidenceAction');- expect(infrastructureSourceManagerSource).not.toContain('Infrastructure coverage');- expect(infrastructureSourceManagerSource).not.toContain('Fleet governance');- expect(infrastructureSourceManagerSource).not.toContain('Connection types');- expect(infrastructureSourcePickerSource).toContain('Detect API platform');- expect(infrastructureSourcePickerSource).toContain('getInfrastructureSourcePickerItems');- expect(infrastructureSourcePickerSource).toContain('itemMatchesQuery');- expect(infrastructureSourcePickerSource).toContain('catalogDescription');- expect(infrastructureSourcePickerSource).not.toContain('Monitor network endpoint');- expect(infrastructureSourcePickerSource).not.toContain(- 'getInfrastructureSourceStrategyPresentation',- );- expect(availabilitySettingsPanelSource).toContain('AvailabilityTargetSlot');- expect(availabilitySettingsPanelSource).toContain('buildAvailabilityTargetAddPath');- expect(availabilitySettingsPanelSource).toContain('Availability checks');- expect(availabilitySettingsPanelSource).toContain('MQTT broker');- expect(settingsHeaderMetaSource).toContain(- "description: 'Configure the public URL, CORS, embedding, and webhook network boundaries.'",- );- expect(useConnectionsLedgerSource).toContain('createNonSuspendingQuery');- expect(useConnectionsLedgerSource).toContain('pollMs: POLL_INTERVAL_MS');- expect(useConnectionsLedgerSource).not.toContain('createResource');-- expect(connectionsTableModelSource).toContain(- "'inline-flex items-center rounded-full bg-surface-alt px-2 py-0.5 text-[11px] font-medium text-base-content'",- );- expect(connectionsTableModelSource).toContain(- "'inline-flex items-center rounded-full bg-emerald-100 px-2 py-0.5 text-[11px] font-medium text-emerald-800 dark:bg-emerald-950/40 dark:text-emerald-200'",- );- expect(connectionsTableModelSource).not.toContain(['bg', 'slate', '100'].join('-'));- expect(connectionsTableModelSource).not.toContain(['text', 'slate', '700'].join('-'));});it('keeps setup-handoff token cleanup from masking install failures', () => {@@ -1826,132 +358,7 @@ describe('settings architecture guardrails', () => {);});- it('keeps the detect-first editor and inline credential bodies on the shared editor model', () => {- expect(connectionEditorSource).toContain(- "import { AddressProbeStep } from './AddressProbeStep';",- );- expect(connectionEditorSource).toContain(- "from '@/utils/infrastructureOnboardingPresentation';",- );- expect(infrastructureSourceManagerSource).toContain(- "from '@/utils/infrastructureOnboardingPresentation';",- );- expect(connectionEditorSource).toContain('<AddressProbeStep');- expect(connectionEditorSource).toContain('API platform probe');- expect(connectionEditorSource).toContain('flex h-full min-h-0 flex-col');- expect(connectionEditorSource).toContain('Back to source types');- expect(connectionEditorSource).toContain('Back to API probe');- expect(connectionEditorSource).toContain('Install Pulse Agent');- expect(connectionEditorSource).not.toContain('buildConnectionEditorCatalogEntries');- expect(connectionEditorSource).not.toContain('selectedFamilyId');- expect(connectionEditorSource).not.toContain('Choose how Pulse should connect');- expect(connectionEditorSource).not.toContain('Connect a supported platform');- expect(connectionEditorSource).not.toContain('Choose a {family.label} product');- expect(connectionEditorSource).not.toContain('Back to platforms');- expect(connectionEditorSource).not.toContain('NodeModal');-- expect(addressProbeStepSource).toContain('Probe API endpoint');- expect(addressProbeStepSource).toContain('install Pulse Agent instead');- expect(addressProbeStepSource).toContain('Choose a source type instead');- expect(addressProbeStepSource).toContain('getInfrastructureAgentHostProfileSupportText');- expect(addressProbeStepSource).toContain('supported API-backed platform');-- expect(connectionEditorStateSource).toContain('ConnectionsAPI.probe(value)');- expect(connectionEditorStateSource).toContain('export const CONNECTION_TYPE_LABELS');- expect(connectionEditorStateSource).not.toContain('DEFAULT_CONNECTION_EDITOR_CATALOG_ENTRIES');- expect(connectionEditorStateSource).not.toContain('buildConnectionEditorCatalogEntries');- expect(connectionEditorStateSource).not.toContain('getSourcePlatformFamily');- expect(infrastructureOnboardingPresentationSource).toContain('getSourcePlatformManifestEntry');- expect(infrastructureOnboardingPresentationSource).toContain(- 'getInfrastructureSourcePickerItems',- );- expect(infrastructureOnboardingPresentationSource).toContain(- 'getInfrastructureSourceStrategyPresentation',- );- expect(infrastructureOnboardingPresentationSource).toContain('API first');- expect(infrastructureOnboardingPresentationSource).toContain(- 'getInfrastructureSupportSummaryBadges',- );- expect(infrastructureOnboardingPresentationSource).toContain(- 'VMware vCenter is available as a preview platform',- );-- expect(nodeCredentialSlotSource).toContain('useNodeModalState(modalProps)');- // The workspace deliberately remains mounted while its connection ledger- // polls. Preserve reactive inputs here so untouched forms adopt a newer- // server projection; useNodeModalState owns the dirty-edit guard.- expect(nodeCredentialSlotSource).toContain('get editingNode()');- expect(nodeCredentialSlotSource).toContain('get securityStatus()');- expect(nodeCredentialSlotSource).toContain('get temperatureMonitoringEnabled()');- expect(nodeCredentialSlotSource).toContain('get temperatureMonitoringLocked()');- expect(nodeCredentialSlotSource).toContain('get savingTemperatureSetting()');- expect(nodeCredentialSlotSource).not.toContain('editingNode: props.editingNode');- expect(nodeCredentialSlotSource).toContain('<NodeModalBasicInfoSection');- // The step summary follows the form's field order: endpoint, then name.- expect(nodeCredentialSlotSource).toContain('API address and name');- expect(nodeCredentialSlotSource).toContain('<NodeModalAuthenticationSection');- expect(nodeCredentialSlotSource).toContain('<NodeModalMonitoringSection');- expect(nodeCredentialSlotSource).toContain('<NodeModalStatusFooter');- expect(nodeModalMonitoringSectionSource).toContain('Excluded datastores (optional)');- expect(nodeModalMonitoringSectionSource).toContain("state.updateField('excludeDatastores'");- expect(nodeModalStateSource).toContain(- "excludeDatastores: pbsConfig?.excludeDatastores?.join(', ') ?? ''",- );- expect(nodeModalPresentationSource).toContain('excludeDatastores: formData.excludeDatastores');- expect(nodeCredentialSlotSource).not.toContain('<Dialog');- expect(nodeCredentialSlotSource).toContain('buildNodeImportPlan');- expect(nodeCredentialSlotSource).toContain('MonitoredSystemLedgerAPI.preview');- expect(nodeCredentialSlotSource).toContain('<NodeCandidateImportPlan');- expect(nodeCredentialSlotSource).toContain('setupHandoffDisabled');- expect(nodeCredentialSlotSource).toContain('saveDisabled={saveBlockedByImportPlan()}');- expect(infrastructureImportPlanModelSource).toContain('MonitoredSystemLedgerPreviewRequest');- expect(infrastructureImportPlanModelSource).toContain('nodeTypeToMonitoredSource');- expect(infrastructureImportPlanModelSource).toContain('previewRequest');- expect(infrastructureImportPlanModelSource).toContain('resource_id: name');- expect(nodeModalAuthenticationSectionSource).toContain(- "state.formData().setupMode === 'manual'",- );- expect(nodeModalAuthenticationSectionSource).toContain('Advanced manual token path');- expect(nodeModalSetupGuideSectionSource).toContain('Source strategy');- expect(nodeModalSetupGuideSectionSource).toContain('Host telemetry agent');- expect(nodeModalSetupGuideSectionSource).toContain('API inventory');- expect(nodeModalSetupGuideSectionSource).toContain('Manual API token');- expect(nodeModalSetupGuideSectionSource).toContain('Recommended least-privilege path');- expect(nodeModalSetupGuideSectionSource).toContain('Existing source repair');- expect(nodeModalSetupGuideSectionSource).toContain('Audit/Repair');- expect(nodeModalSetupGuideSectionSource).toContain('without rotating the current API token');- expect(nodeModalSetupGuideSectionSource).toContain('VM.GuestAgent.Audit/FileRead');- expect(nodeModalModelSource).toContain('HAS_GUEST_AGENT_AUDIT');- expect(nodeModalModelSource).toContain('VM.GuestAgent.FileRead');- expect(nodeModalModelSource).toContain('PulseTmpVMMonitor');- const guestAgentBranch = nodeModalModelSource.indexOf(- 'if [ "$HAS_GUEST_AGENT_AUDIT" = true ]; then',- );- const monitorFallback = nodeModalModelSource.indexOf(- 'pveum role add PulseTmpVMMonitor -privs VM.Monitor',- );- expect(guestAgentBranch).toBeGreaterThanOrEqual(0);- expect(monitorFallback).toBeGreaterThanOrEqual(0);- expect(guestAgentBranch).toBeLessThan(monitorFallback);- expect(nodeModalSetupGuideSectionSource).toContain('Docker inside Proxmox LXCs');- expect(nodeModalSetupGuideSectionSource).toContain(- 'PULSE_ENABLE_PROXMOX_GUEST_DOCKER_INVENTORY=true',- );- expect(nodeModalSetupGuideSectionSource).toContain('setupCommandButtonTitle');- expect(nodeModalSetupGuideSectionSource).toContain('disabled={setupHandoffDisabled()}');- expect(nodeModalSetupGuideSectionSource).toContain('Credential-free command ready');- expect(nodeModalSetupGuideSectionSource).toContain('one-time setup token is shown separately');- expect(nodeModalStateSource).toContain('copyToClipboard(data.command)');- expect(nodeModalStateSource).toContain('showSetupToken(data)');- expect(nodeModalStateSource).not.toContain('quickSetupPreviewCommand');- expect(nodeModalStatusFooterSource).toContain('guidedSetupOnlyMode');- expect(nodeModalStatusFooterSource).toContain('props.saveDisabled');- expect(nodeModalStateSource).toContain('enableCommands: false');- expect(nodeModalStateSource).toContain('data.setupMode !==');- // The typed connection name rides the setup bootstrap request so the- // one-time setup token can carry it into auto-registration naming.- expect(nodeModalStateSource).toContain('name: formData().name?.trim() || undefined');-+ it('keeps the TLS verification warning on the TrueNAS and vCenter credential slots', () => {expect(vmwareCredentialSlotSource).toContain('TlsVerificationWarningBanner');expect(vmwareCredentialSlotSource).toContain('subject="this vCenter connection"');expect(vmwareCredentialSlotSource).toContain(@@ -1965,244 +372,6 @@ describe('settings architecture guardrails', () => {);});- it('exposes external-agent setup from Pulse Intelligence while API Access stays token-only', () => {- // External agents are a Pulse Intelligence access path over the same- // governed Patrol policy, not a generic Security API feature. API Access- // remains the place to mint the scoped credential when setup needs one.- expect(settingsPanelRegistryContextSource).toContain(- "import { AgentIntegrationsPanel } from './AgentIntegrationsPanel';",- );- expect(settingsPanelRegistryContextSource).toContain(- 'const systemAiAgentsPanel: Component = () => <AgentIntegrationsPanel />;',- );- expect(aiSettingsSource).not.toContain('AgentIntegrationsPanel');- expect(apiAccessPanelSource).not.toContain('AgentIntegrationsPanel');- expect(apiAccessPanelSource).not.toContain('isExternalAgentSetupHash');- expect(apiAccessPanelSource).not.toContain('api-access-external-agent-section');- expect(apiAccessPanelSource).toContain('api-access-token-section');- expect(agentIntegrationsPanelSource).toContain('ExternalTextLink');- expect(agentIntegrationsPanelSource).not.toContain('rel="noreferrer"');- expect(agentIntegrationsPanelSource).toContain('External agents');- expect(agentIntegrationsPanelSource).toContain('Connect external tools');- expect(agentIntegrationsPanelSource).toContain('read Pulse context');- expect(agentIntegrationsPanelSource).toContain('request Patrol work');- expect(agentIntegrationsPanelSource).toContain('Patrol mode and scoped tokens control');- expect(agentIntegrationsPanelSource).not.toContain(- 'Optional connector access for Claude Desktop',- );- expect(agentIntegrationsPanelSource).not.toContain('Patrol remains the operator');- expect(agentIntegrationsPanelSource).not.toContain('Connected tools');- expect(agentIntegrationsPanelSource).toContain('setupOpen');- expect(agentIntegrationsPanelSource).toContain('Show connector setup');- expect(agentIntegrationsPanelSource).toContain('Hide connector setup');- expect(agentIntegrationsPanelSource).toContain('<Show when={!setupOpen()}>');- expect(agentIntegrationsPanelSource).not.toContain(- [- 'Choose',- 'what',- 'Patrol',- 'may',- 'handle',- 'automatically',- 'before',- 'any',- 'external',- 'agent',- 'can',- ].join(' '),- );- expect(agentIntegrationsPanelSource).toContain(- 'Required before agents can request Patrol work.',- );- expect(agentIntegrationsPanelSource).not.toContain(- 'Set the Patrol mode before connected agents can request work.',- );- expect(agentIntegrationsPanelSource).toContain('Choose Patrol mode');- expect(agentIntegrationsPanelSource).toContain('PATROL_CONTROL_PATH');- expect(agentIntegrationsPanelSource).not.toContain("settingsTabPath('system-ai')");- expect(agentIntegrationsPanelSource).toContain('EXTERNAL_AGENT_SETUP_ANCHOR');- expect(agentIntegrationsPanelSource).toContain('PULSE_MCP_SETUP_ANCHOR');- expect(agentIntegrationsPanelSource).toContain('focusPanelUntilLayoutSettles');- expect(agentIntegrationsPanelSource).toContain('findScrollableAncestor');- expect(agentIntegrationsPanelSource).toContain(- 'document.getElementById(EXTERNAL_AGENT_SETUP_ANCHOR)',- );- expect(agentIntegrationsPanelSource).toContain('window.history.replaceState');- expect(agentIntegrationsPanelSource).not.toContain('Use Pulse MCP only');- expect(agentIntegrationsPanelSource).not.toContain('outside client');- expect(agentIntegrationsPanelSource).not.toContain('Pulse Intelligence surfaces');- expect(agentIntegrationsPanelSource).toContain('Connector setup');- expect(agentIntegrationsPanelSource).toContain('Connect the agent');- expect(agentIntegrationsPanelSource).toContain('Developer details');- expect(agentIntegrationsPanelSource).toContain('advancedClientDetailsOpen');- expect(agentIntegrationsPanelSource).toContain(- 'Only open this when you are building or debugging a client',- );- expect(agentIntegrationsPanelSource).toContain('Patrol access model');- expect(agentIntegrationsPanelSource).toContain(- 'Built-in Pulse views and connected clients all sit behind',- );- expect(agentIntegrationsPanelSource).toContain('Live manifest details');- expect(agentIntegrationsPanelSource).not.toContain('Build a custom client');- expect(agentIntegrationsPanelSource).not.toContain('Instance manifest details');- expect(agentIntegrationsPanelSource).not.toContain('MCP client config');- expect(agentIntegrationsPanelSource).toContain('normalizeAgentMCPAdapter');- expect(agentIntegrationsPanelSource).not.toContain('getAgentMCPClientExamples');- expect(agentIntegrationsPanelSource).toContain('getAgentWorkflowPrompts');- expect(agentIntegrationsPanelSource).toContain('Agent starting points');- expect(agentIntegrationsPanelSource).toContain('Patrol');- expect(agentIntegrationsPanelSource).not.toContain('Operations loop');- expect(agentIntegrationsPanelSource).toContain('OpenCode');- expect(agentIntegrationsPanelSource).toContain(- "import { Button, ButtonLink } from '@/components/shared/Button';",- );- expect(agentIntegrationsPanelSource).toContain(- "import KeyRoundIcon from 'lucide-solid/icons/key-round';",- );- expect(agentIntegrationsPanelSource).toContain('API_TOKEN_PATROL_EXTERNAL_AGENT_PRESET_LABEL');- expect(agentIntegrationsPanelSource).toContain('PULSE_MCP_TOKEN_SETUP_PATH');- expect(agentIntegrationsPanelSource).toContain('hardNavigation');- expect(apiTokenManagerSource).toContain('API_TOKEN_CREATE_ANCHOR');- expect(agentIntegrationsPanelSource).toContain('formatAgentOpenCodeMCPConfig');- expect(agentIntegrationsPanelSource).toContain('formatAgentMCPServersConfig');- expect(agentIntegrationsPanelSource).toContain('Installer commands');- expect(agentIntegrationsPanelSource).toContain('installerCommandsOpen');- expect(agentIntegrationsPanelSource).toContain('mcpInstallShellCommand');- expect(agentIntegrationsPanelSource).toContain('mcpInstallPowerShellCommand');- expect(agentIntegrationsPanelSource).toContain('Client config');- expect(agentIntegrationsPanelSource).toContain('clientConfigOpen');- expect(agentIntegrationsPanelSource).toContain('Install the connector');- expect(agentIntegrationsPanelSource).toContain('paste the client config');- expect(agentIntegrationsPanelSource).not.toContain('The installer and');- expect(agentIntegrationsPanelSource).not.toContain(- 'on the machine that runs the external tool',- );- expect(agentIntegrationsPanelSource).not.toContain('Install the Pulse MCP bridge');- expect(agentIntegrationsPanelSource).not.toContain(- 'Use the OpenCode or Claude-style snippet below',- );- expect(agentIntegrationsPanelSource).toContain('opencode.json');- expect(agentCapabilitiesApiSource).toContain("type: 'local'");- expect(agentCapabilitiesApiSource).toContain('environment');- expect(agentIntegrationsPanelSource).toContain('mcpServersConfigFamily');- expect(agentCapabilitiesApiSource).toContain('custom clients');- expect(agentIntegrationsPanelSource).toContain('requiredScopes');- expect(agentIntegrationsPanelSource).toContain('Manifest scopes');- expect(agentIntegrationsPanelSource).not.toContain('published contract');- expect(agentIntegrationsPanelSource).toContain('External agents expose');- expect(agentCapabilitiesApiSource).toContain('surfaceLabel,');- expect(agentIntegrationsPanelSource).toContain('capability below shows its required scope');- expect(agentIntegrationsPanelSource).toContain('getAgentSurfaceContractEntries');- expect(agentIntegrationsPanelSource).toContain('surfaceContractEntries');- expect(agentIntegrationsPanelSource).toContain('Built-in Pulse views');- expect(agentCapabilitiesApiSource).toContain('AgentSurfaceAffordanceContract');- expect(agentCapabilitiesApiSource).toContain('AgentSurfaceToolContract');- expect(agentCapabilitiesApiSource).toContain('normalizeSurfaceAffordances');- expect(agentCapabilitiesApiSource).toContain('surfaceAffordanceLabels');- expect(agentCapabilitiesApiSource).toContain('AGENT_SURFACE_ID_PULSE_MCP');- expect(agentCapabilitiesApiSource).toContain('getAgentManifestSurfaceToolContract');- expect(agentCapabilitiesApiSource).toContain('getAgentManifestSurfaceToolContracts');- expect(agentIntegrationsPanelSource).toContain('AGENT_SURFACE_ID_PULSE_MCP');- expect(agentIntegrationsPanelSource).toContain('getAgentManifestSurfaceToolContract');- expect(agentIntegrationsPanelSource).toContain('getAgentSurfaceToolPosturePresentation');- expect(agentIntegrationsPanelSource).toContain('mcpSurfaceToolPosture');- expect(agentIntegrationsPanelSource).toContain('data-testid="agent-mcp-tool-posture"');- expect(agentIntegrationsPanelSource).toContain('External agents expose {posture().label}');- expect(agentCapabilitiesApiSource).toContain('capability availability');- expect(agentCapabilitiesApiSource).toContain("if (affordances.tools) labels.push('Actions')");- expect(agentCapabilitiesApiSource).not.toContain('runtime tool availability');- expect(agentIntegrationsPanelSource).toContain('getAgentCapabilityErrorCodeSummaries');- expect(agentIntegrationsPanelSource).toContain('errorCodeSummaries');- expect(agentIntegrationsPanelSource).toContain('Failure codes');- expect(agentIntegrationsPanelSource).toContain('from the live manifest');- expect(agentIntegrationsPanelSource).toContain('groupAgentCapabilitiesByManifestCategories');- expect(agentIntegrationsPanelSource).toContain("from '@/api/agentCapabilities'");- expect(agentIntegrationsPanelSource).not.toContain("fetch('/api/agent/capabilities'");- expect(agentCapabilitiesApiSource).toContain(- "export const AGENT_CAPABILITIES_PATH = '/api/agent/capabilities'",- );- expect(agentCapabilitiesApiSource).toContain("from './generated/agentCapabilities'");- expect(agentCapabilitiesApiSource).toContain('skipAuth: true');- expect(agentCapabilitiesApiSource).toContain('manifest.categories');- expect(agentCapabilitiesApiSource).toContain('AgentMCPAdapterContract');- expect(agentCapabilitiesApiSource).toContain('manifest?.surfaceToolContracts');- expect(agentCapabilitiesApiSource).toContain('manifest?.mcpAdapter');- expect(agentCapabilitiesApiSource).toContain('getAgentMCPClientExamples');- expect(agentCapabilitiesApiSource).toContain('formatAgentOpenCodeMCPConfig');- expect(agentCapabilitiesApiSource).toContain('formatAgentMCPServersConfig');- expect(agentCapabilitiesApiSource).toContain('getAgentCapabilityErrorCodeSummaries');- expect(agentCapabilitiesApiSource).not.toContain('export interface AgentCapability {');- expect(agentCapabilitiesApiSource).not.toContain(- 'export interface AgentCapabilitiesManifest {',- );- expect(agentCapabilitiesApiSource).not.toContain('getAgentMCPSurfaceToolContract');- expect(agentIntegrationsPanelSource).not.toContain('MCP_CLIENT_EXAMPLES');- expect(agentIntegrationsPanelSource).not.toContain('function formatClaudeMcpConfig');- expect(agentIntegrationsPanelSource).not.toContain('function formatOpenCodeMcpConfig');- expect(agentIntegrationsPanelSource).not.toContain('CATEGORY_ORDER');- expect(agentIntegrationsPanelSource).not.toContain('Claude Desktop / Claude Code config');- expect(agentIntegrationsPanelSource).not.toContain('any MCP client that accepts');- expect(agentIntegrationsPanelSource).not.toContain('getAgentMCPSurfaceToolContract');- expect(agentIntegrationsPanelSource).not.toContain('subscribe_events');- expect(agentIntegrationsPanelSource).not.toContain('capability.name');- expect(agentIntegrationsPanelSource).not.toContain('Interactive questions');- expect(agentIntegrationsPanelSource).not.toContain('Capability metadata');- expect(agentIntegrationsPanelSource).not.toContain(- 'monitoring:write for the operator-state write tools',- );- });-- it('keeps internal analytics off the user diagnostics boundary', () => {- expect(diagnosticsResultsPanelSource).not.toContain('Commercial Funnel');- expect(diagnosticsResultsPanelSource).not.toContain('Infrastructure Onboarding');- expect(diagnosticsResultsPanelSource).not.toContain('commercialFunnel');- expect(diagnosticsResultsPanelSource).not.toContain('infrastructureOnboarding');- expect(diagnosticsResultsPanelSource).not.toContain("apiFetchJSON('/api/diagnostics')");- expect(diagnosticsResultsPanelSource).toContain('Runtime connection');- expect(diagnosticsResultsPanelSource).toContain('assistantRuntimeConnected');- expect(diagnosticsResultsPanelSource).not.toContain('MCP Connection');- expect(diagnosticsResultsPanelSource).not.toContain('mcpConnected');-- expect(diagnosticsModelSource).toContain('stripInternalAnalyticsDiagnosticsFields');- expect(diagnosticsModelSource).toContain('assistantRuntimeConnected');- expect(diagnosticsModelSource).toContain('probe?: {');- expect(diagnosticsResultsPanelSource).toContain("probe().connected ? 'connected' : 'failed'");- expect(diagnosticsModelSource).not.toContain('mcpConnected');- expect(diagnosticsModelSource).not.toContain('mcpToolCount');- expect(diagnosticsModelSource).not.toContain('export interface CommercialFunnelDiagnostic');- expect(diagnosticsModelSource).not.toContain('export interface CommercialFunnelSummary');- expect(diagnosticsModelSource).not.toContain(- 'export interface InfrastructureOnboardingDiagnostic',- );- expect(diagnosticsModelSource).not.toContain(- 'export interface InfrastructureOnboardingSummary',- );- });-- it('keeps read-only settings status indicators on the shared badge primitive', () => {- expect(statusIndicatorBadgeSource).toContain('getSimpleStatusIndicator');- expect(statusIndicatorBadgeSource).toContain('getStatusIndicatorBadgeToneClasses');- expect(statusIndicatorBadgeSource).toContain('StatusDot');-- expect(agentProfilesPanelSource).toContain('StatusIndicatorBadge');- expect(agentProfilesPanelSource).not.toContain('getStatusIndicatorBadgeToneClasses');-- expect(diagnosticsResultsPanelSource).toContain('StatusIndicatorBadge');- expect(diagnosticsResultsPanelSource).not.toContain('const StatusBadge');- expect(diagnosticsResultsPanelSource).not.toContain('getStatusIndicatorBadgeToneClasses');- });-- it('keeps application branding in the canonical Appearance settings surface', () => {- expect(generalSettingsPanelSource).toContain(- "import { BrandingSettingsCard } from './BrandingSettingsCard';",- );- expect(generalSettingsPanelSource).toContain('<BrandingSettingsCard');- expect(brandingSettingsCardSource).toContain("when={hasFeature('white_label')}");- expect(brandingSettingsCardSource).toContain('<FeatureGateSection');- expect(brandingSettingsCardSource).toContain('maxlength={120}');- expect(brandingSettingsCardSource).toContain('BRAND_LOGO_MAX_BYTES = 36 * 1024');- });-it('keeps actual token usage names and IDs inside the same export privacy boundary', () => {const payload = {apiTokens: {@@ -2251,22 +420,6 @@ describe('settings architecture guardrails', () => {});});-// Principal selection belongs to the shared shell registry, not an individual-// organisation panel or a browser storage hint.-describe('organisation principal shell boundary', () => {- it('prefers authenticated identity with a nullish legacy fallback', () => {- expect(settingsPanelRegistryContextSource).toContain(- 'params.securityStatus()?.currentUsername ??',- );- expect(settingsPanelRegistryContextSource).not.toContain('sessionStorage');- for (const panel of ['Overview', 'Access', 'Sharing']) {- expect(settingsPanelRegistryContextSource).toContain(- `getOrganization${panel}PanelProps: () => ({\n currentUser: currentUser(),`,- );- }- });-});-describe('node import preview authority boundary', () => {it('keeps preview responses informational and setup approval explicit', () => {const previewHandler = nodeCredentialSlotSource.slice(diff --git a/frontend-modern/src/components/Settings/__tests__/settingsNavigation.integration.test.tsx b/frontend-modern/src/components/Settings/__tests__/settingsNavigation.integration.test.tsxindex 655eb40f43..df5cc641e2 100644--- a/frontend-modern/src/components/Settings/__tests__/settingsNavigation.integration.test.tsx+++ b/frontend-modern/src/components/Settings/__tests__/settingsNavigation.integration.test.tsx@@ -488,26 +488,4 @@ describe('settingsNavigation integration scaffold', () => {expect(getTabLockReason('infrastructure-systems', hasFeatures([]), () => true)).toBeNull();});});-- it('verifies Settings.tsx bootstrap calls only loadRuntimeCapabilities', async () => {- const settingsSource = (await import('../Settings.tsx?raw')).default;- const onMountMatch = settingsSource.match(/onMount\(\(\)\s*=>\s*\{([^}]+)\}/);- expect(onMountMatch).toBeTruthy();- const onMountBody = onMountMatch![1];- expect(onMountBody).toContain('loadRuntimeCapabilities');- expect(onMountBody).not.toContain('runDiagnostics');- expect(settingsSource).toContain('useSettingsAccess');- expect(settingsSource).toContain('useSettingsPanelRegistry');- expect(settingsSource).not.toContain('const tabGroups');- });-- it('panel registry covers all dispatchable tabs', async () => {- const registrySource = (await import('../settingsPanelRegistry.ts?raw')).default;- const allTabs = Object.keys(canonicalTabPaths) as SettingsTab[];- const dispatchableTabs = allTabs;- for (const tab of dispatchableTabs) {- const isCovered = registrySource.includes(`'${tab}'`) || registrySource.includes(`${tab}:`);- expect(isCovered, `panel registry should cover tab '${tab}'`).toBe(true);- }- });});diff --git a/frontend-modern/src/components/Settings/__tests__/useConnectionsLedger.test.ts b/frontend-modern/src/components/Settings/__tests__/useConnectionsLedger.test.tsindex f4f257fdcc..341fdbcd62 100644--- a/frontend-modern/src/components/Settings/__tests__/useConnectionsLedger.test.ts+++ b/frontend-modern/src/components/Settings/__tests__/useConnectionsLedger.test.ts@@ -1,9 +1,9 @@-import { renderHook, waitFor } from '@solidjs/testing-library';+import { render, renderHook, waitFor } from '@solidjs/testing-library';+import { createComponent, createRenderEffect, Suspense } from 'solid-js';import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';import { ConnectionsAPI, type Connection, type ConnectionSystem } from '@/api/connections';import { resetCreateNonSuspendingQueryCacheForTest } from '@/hooks/createNonSuspendingQuery';import { useConnectionsLedger } from '../useConnectionsLedger';-import useConnectionsLedgerSource from '../useConnectionsLedger.ts?raw';describe('useConnectionsLedger', () => {beforeEach(() => {@@ -15,10 +15,67 @@ describe('useConnectionsLedger', () => {vi.restoreAllMocks();});- it('keeps connection-ledger refreshes out of app-level Suspense', () => {- expect(useConnectionsLedgerSource).toContain('createNonSuspendingQuery');- expect(useConnectionsLedgerSource).toContain('pollMs: POLL_INTERVAL_MS');- expect(useConnectionsLedgerSource).not.toContain('createResource');+ it('keeps loads and reloads out of the app-level Suspense fallback', async () => {+ const agent = (id: string, name: string) =>+ ({+ id,+ type: 'agent',+ name,+ source: 'agent',+ address: name,+ state: 'pending',+ stateReason: '',+ enabled: true,+ surfaces: ['host'],+ scope: { host: true },+ lastSeen: null,+ lastError: null,+ capabilities: { supportsPause: false, supportsScope: false, supportsTest: false },+ }) as Connection;+ type LedgerRead = Awaited<ReturnType<typeof ConnectionsAPI.list>>;+ let finishFirst: (value: LedgerRead) => void = () => {};+ let finishSecond: (value: LedgerRead) => void = () => {};+ const list = vi+ .spyOn(ConnectionsAPI, 'list')+ .mockReturnValueOnce(new Promise<LedgerRead>((resolve) => (finishFirst = resolve)))+ .mockReturnValueOnce(new Promise<LedgerRead>((resolve) => (finishSecond = resolve)));++ let result!: ReturnType<typeof useConnectionsLedger>;+ const { container, unmount } = render(() =>+ createComponent(Suspense, {+ fallback: 'Loading view...',+ get children() {+ return createComponent(() => {+ result = useConnectionsLedger();+ const node = document.createTextNode('');+ createRenderEffect(() => {+ node.data = `rows:${result.rows().length}`;+ });+ return node;+ }, {});+ },+ }),+ );+ try {+ await waitFor(() => expect(list).toHaveBeenCalledTimes(1));+ expect(container.textContent).not.toContain('Loading view...');++ finishFirst({ connections: [agent('agent:one', 'One')], systems: [] });+ await waitFor(() => expect(container.textContent).toBe('rows:1'));++ result.reload();+ await waitFor(() => expect(list).toHaveBeenCalledTimes(2));+ // The reload is in flight: the last ledger stays on screen.+ expect(container.textContent).toBe('rows:1');++ finishSecond({+ connections: [agent('agent:one', 'One'), agent('agent:two', 'Two')],+ systems: [],+ });+ await waitFor(() => expect(container.textContent).toBe('rows:2'));+ } finally {+ unmount();+ }});it('names the first-report wait only for pending agents', async () => {diff --git a/frontend-modern/src/components/SetupWizard/__tests__/SecurityStep.guardrails.test.ts b/frontend-modern/src/components/SetupWizard/__tests__/SecurityStep.guardrails.test.tsindex eb7cb8541c..6e50150633 100644--- a/frontend-modern/src/components/SetupWizard/__tests__/SecurityStep.guardrails.test.ts+++ b/frontend-modern/src/components/SetupWizard/__tests__/SecurityStep.guardrails.test.ts@@ -1,7 +1,6 @@import { describe, expect, it } from 'vitest';import { EN_MESSAGES } from '@/i18n/messages';import securityStepSource from '../steps/SecurityStep.tsx?raw';-import welcomeStepSource from '../steps/WelcomeStep.tsx?raw';describe('SecurityStep guardrails', () => {it('generates first-run credentials with browser cryptographic randomness', () => {@@ -11,9 +10,6 @@ describe('SecurityStep guardrails', () => {});it('keeps security-step copy aligned with the source-choice setup model', () => {- expect(securityStepSource).toContain("t('setup.security.description')");- expect(securityStepSource).toContain("t('setup.security.generatedPasswordHelp')");-const securityStepMessages = [EN_MESSAGES['setup.security.description'],EN_MESSAGES['setup.security.generatedPasswordHelp'],@@ -24,9 +20,4 @@ describe('SecurityStep guardrails', () => {expect(securityStepMessages).not.toContain('install your first monitored host');expect(securityStepMessages).not.toContain('16-character password');});-- it('does not cover first-run handoff screens with success toasts during normal step transitions', () => {- expect(welcomeStepSource).not.toContain("showSuccess('Token verified!')");- expect(securityStepSource).not.toContain("showSuccess('Security configured!')");- });});diff --git a/frontend-modern/src/components/SetupWizard/__tests__/SetupCompletionPanel.guardrails.test.ts b/frontend-modern/src/components/SetupWizard/__tests__/SetupCompletionPanel.guardrails.test.tsindex 94e999a988..eba8b5fe47 100644--- a/frontend-modern/src/components/SetupWizard/__tests__/SetupCompletionPanel.guardrails.test.ts+++ b/frontend-modern/src/components/SetupWizard/__tests__/SetupCompletionPanel.guardrails.test.ts@@ -1,221 +1,8 @@import { describe, expect, it } from 'vitest';import setupCompletionPanelSource from '../SetupCompletionPanel.tsx?raw';-import setupCompletionModelSource from '../setupCompletionModel.ts?raw';-import runtimeHomeSource from '@/pages/RuntimeHome.tsx?raw';-import securityStepSource from '../steps/SecurityStep.tsx?raw';-import setupWizardSource from '../SetupWizard.tsx?raw';-import stepIndicatorSource from '../StepIndicator.tsx?raw';-import welcomeStepSource from '../steps/WelcomeStep.tsx?raw';--const migratedFirstSessionCopy = [- 'Opening workspace...',- 'Welcome to Pulse',- 'Unlock this Pulse server',- 'Create the admin account',- 'Choose the first source',- 'Unlock setup',- 'What this token does',- 'Paste your bootstrap token',- 'Verify bootstrap token',- 'Continue to Security',- 'Create Account & Continue',- 'On the next screen',- 'Connect your first system',- 'First monitored system connected',- 'Credentials you must save now',- 'Shown during setup',- 'Save the admin login and API token before leaving this screen',- 'Recommended next step',- 'Ways to connect',- 'Pulse reads VMs, storage, and health through the platform API.',- 'Run the installer on a Linux, Windows, or macOS host',- 'Open Add infrastructure and choose a platform API connection',- 'Activate Pulse Pro',- 'Enter the activation key from your purchase email',- 'Enter activation key',-];--const migratedSources = [- setupCompletionPanelSource,- setupCompletionModelSource,- runtimeHomeSource,- securityStepSource,- setupWizardSource,- stepIndicatorSource,- welcomeStepSource,-];describe('SetupCompletionPanel guardrails', () => {- it('keeps setup completion aligned with the canonical add-infrastructure picker', () => {- expect(setupCompletionPanelSource).toContain('buildInfrastructureOnboardingPath');- expect(setupCompletionPanelSource).toContain(- "const ADD_INFRASTRUCTURE_PATH = buildInfrastructureOnboardingPath('pick');",- );- expect(setupCompletionPanelSource).toContain(- "const AGENT_INSTALL_PATH = buildInfrastructureOnboardingPath('linux-host');",- );- expect(setupCompletionPanelSource).toContain(- 'const INFRASTRUCTURE_WORKSPACE_PATH = buildInfrastructureWorkspacePath();',- );- expect(setupCompletionPanelSource).toContain('setup.completion.action.addInfrastructure');- expect(setupCompletionPanelSource).toContain('setup.completion.action.installAgent');- expect(setupCompletionPanelSource).toContain('setup.completion.credentials.title');- expect(setupCompletionPanelSource).toContain('setup.completion.credentials.badge');- expect(setupCompletionPanelSource).toContain('props.onComplete(ADD_INFRASTRUCTURE_PATH);');- expect(setupCompletionPanelSource).toContain('props.onComplete(AGENT_INSTALL_PATH);');- expect(setupCompletionPanelSource).toContain(- 'props.onComplete(INFRASTRUCTURE_WORKSPACE_PATH);',- );- expect(setupCompletionPanelSource).toContain('setup.completion.download.content');- expect(setupCompletionModelSource).toContain('setup.completion.nextStep.summary.empty');- expect(setupCompletionPanelSource).not.toContain('Use Add connection to connect');- expect(setupCompletionPanelSource).not.toContain("from '@/stores/licenseCommercial';");- expect(setupCompletionPanelSource).not.toContain('runStartProTrialAction');- expect(setupCompletionPanelSource).not.toContain('loadCommercialPosture');- expect(setupCompletionPanelSource).not.toContain('isCommercialTrialActive');- expect(setupCompletionPanelSource).not.toContain('Monitor from Anywhere');- expect(setupCompletionPanelSource).not.toContain("trackPaywallViewed('relay'");- expect(setupCompletionPanelSource).not.toContain("trackUpgradeClicked('setup_wizard'");- expect(setupCompletionPanelSource).not.toContain('infrastructureOnboardingMetrics');- expect(setupCompletionPanelSource).not.toContain('trackAgentFirstConnected');- expect(setupCompletionPanelSource).not.toContain('getUpgradeActionUrlOrFallback');- });-- it('describes setup completion through one compact source-choice next-step surface', () => {- expect(setupCompletionPanelSource).toContain('sourceStrategyOptions');- expect(setupCompletionPanelSource).toContain('setup.completion.sourceOptions.title');- expect(setupCompletionPanelSource).toContain('<ul class="mt-2 space-y-1.5 text-left">');- expect(setupCompletionPanelSource).toContain(- 'setup.completion.sourceOptions.platformApi.title',- );- expect(setupCompletionPanelSource).toContain('setup.completion.sourceOptions.agent.title');- expect(setupCompletionPanelSource).toContain('setup.completion.sourceOptions.both.title');- expect(setupCompletionPanelSource).toContain(- 'setup.completion.sourceOptions.platformApi.description',- );- expect(setupCompletionModelSource).toContain('setup.completion.nextStep.detail.empty');- expect(setupCompletionPanelSource).not.toContain("title: 'What happens next'");- expect(setupCompletionPanelSource).not.toContain("title: 'Open Add infrastructure'");- expect(setupCompletionPanelSource).not.toContain(- "title: 'Save the source and confirm coverage'",- );- expect(setupCompletionPanelSource).not.toContain('What to expect');- expect(setupCompletionPanelSource).not.toContain('First system first');- expect(setupCompletionPanelSource).not.toContain('Smart Auto-Detection');- expect(setupCompletionPanelSource).not.toContain('Agent Metrics');- expect(setupCompletionPanelSource).not.toContain('ProxmoxIcon');- });-- it('does not present setup guidance as extra credentials or clickable-looking source cards', () => {- expect(setupCompletionPanelSource).not.toMatch(- /<code[^>]*>\s*\{ADD_INFRASTRUCTURE_PATH\}\s*<\/code>/,- );- expect(setupCompletionPanelSource).not.toContain('grid gap-2 sm:grid-cols-3');- expect(setupCompletionPanelSource).not.toContain(- 'rounded-md border border-border bg-surface px-3 py-2.5',- );- });-- it('keeps connected infrastructure classification on the canonical setup model', () => {- expect(setupCompletionPanelSource).toContain('buildSetupCompletionConnectedSystems');- expect(setupCompletionPanelSource).toContain('buildSetupCompletionViewModel');- expect(setupCompletionPanelSource).toContain('props.connectedResourcesOverride !== undefined');- expect(setupCompletionPanelSource).toContain(- 'setConnectedSystems(buildSetupCompletionConnectedSystems(props.connectedResourcesOverride));',- );- expect(setupCompletionModelSource).toContain('isAgentFacetInfrastructureResource');- expect(setupCompletionModelSource).toContain('getPreferredInfrastructureDisplayName');- expect(setupCompletionModelSource).toContain('getPreferredResourceHostname');- expect(setupCompletionModelSource).toContain('getSourcePlatformManifestEntry');- expect(setupCompletionModelSource).toContain('sourcePlatformSupportsOnboardingPath');- expect(setupCompletionModelSource).toContain('displayTokens[displayTokens.length - 1]');- expect(setupCompletionModelSource).not.toContain('PLATFORM_CONNECTION_PLATFORM_TYPES');- expect(setupCompletionModelSource).not.toContain("resource.type === 'truenas'");- expect(setupCompletionModelSource).not.toContain('getPreferredResourceDisplayName(resource)');- });-- it('does not reintroduce a separate setup-wizard install command surface', () => {- expect(setupCompletionPanelSource).not.toContain('buildUnixAgentInstallCommand');- expect(setupCompletionPanelSource).not.toContain('buildWindowsAgentInstallCommand');- expect(setupCompletionPanelSource).not.toContain('SecurityAPI');- expect(setupCompletionPanelSource).not.toContain('SecurityStatus');- expect(setupCompletionPanelSource).not.toContain('Connection URL (Agent → Pulse)');- expect(setupCompletionPanelSource).not.toContain('Custom CA certificate path (optional)');- expect(setupCompletionPanelSource).not.toContain('Windows (PowerShell as Administrator)');- expect(setupCompletionPanelSource).not.toContain('Confirm without token');- expect(setupCompletionPanelSource).not.toContain('Current Install Token');- expect(setupCompletionPanelSource).not.toContain('Refresh Token');- expect(setupCompletionPanelSource).not.toContain('Preview copied commands');- });-- it('keeps setup completion on one primary next-step surface instead of repeated CTA sections', () => {- expect(setupCompletionPanelSource).toContain(- 'const [showCredentials, setShowCredentials] = createSignal(true);',- );- expect(setupCompletionPanelSource).toContain('setup.completion.credentials.description');- expect(setupCompletionPanelSource).toContain('setup.completion.nextStep.badge');- expect(setupCompletionPanelSource).toContain('setup.completion.nextStep.ariaLabel');- expect(setupCompletionPanelSource).toContain('setup.completion.action.openInfrastructure');- expect(setupCompletionModelSource).toContain('setup.completion.hero.connected.title');- expect(setupCompletionModelSource).toContain('setup.completion.hero.empty.title');- expect(setupCompletionPanelSource).toContain(- "completionViewModel().primaryAction === 'infrastructure'",- );- expect(setupCompletionPanelSource).toContain(- 'completionViewModel().showAddInfrastructureAction',- );- expect(setupCompletionPanelSource).toContain('completionViewModel().showAgentInstallAction');- expect(setupCompletionPanelSource).toContain('handleOpenAddInfrastructure');- expect(setupCompletionPanelSource).not.toContain('hasConnectedAgents');- expect(setupCompletionPanelSource).not.toContain('connectedAgents().length');- expect(setupCompletionPanelSource).not.toContain(- 'You can return here later from Connections & Inventory if you skip install for now.',- );- expect(setupCompletionPanelSource).not.toContain(- 'Add infrastructure now owns the first source decision.',- );- expect(setupCompletionPanelSource).not.toContain(- 'then return to Add infrastructure when you want to connect the next API or Agent source.',- );- });-- it('prevents migrated first-session monitoring copy from reverting to hardcoded English', () => {- for (const source of migratedSources) {- for (const copy of migratedFirstSessionCopy) {- expect(source).not.toContain(copy);- }- }-- expect(welcomeStepSource).toContain('setup.welcome.hero.title');- expect(securityStepSource).toContain('setup.security.title');- expect(setupWizardSource).toContain('setup.wizard.ariaLabel');- expect(stepIndicatorSource).toContain('setup.progress.stepAriaLabel');- expect(runtimeHomeSource).toContain('runtimeHome.openingWorkspace');- });-it('keeps setup preview copy actions accessible at phone widths', () => {- expect(setupCompletionPanelSource).toContain('import { ActionIconButton }');- expect(setupCompletionPanelSource).toContain('setup.completion.action.copyPassword');- expect(setupCompletionPanelSource).toContain('setup.completion.action.copyAdminToken');expect(setupCompletionPanelSource).toContain('min-h-10 min-w-10');});-- it('keeps the Pro activation pointer on the direct billing route behind an explicit license gate', () => {- expect(setupCompletionPanelSource).toContain(- "import { SELF_HOSTED_PRO_BILLING_PLAN_ROUTE } from '@/utils/pricingHandoff';",- );- expect(setupCompletionPanelSource).toContain(- 'props.onComplete(SELF_HOSTED_PRO_BILLING_PLAN_ROUTE)',- );- expect(setupCompletionPanelSource).toContain("'/api/license/runtime-capabilities'");- expect(setupCompletionPanelSource).toContain("'/api/license/status'");- expect(setupCompletionPanelSource).toContain('shouldShowSetupProActivationPointer');- expect(setupCompletionPanelSource).toContain('props.proActivationOverride !== undefined');- expect(setupCompletionPanelSource).toContain('setup.completion.proActivation.title');- expect(setupCompletionPanelSource).toContain('setup.completion.proActivation.description');- expect(setupCompletionPanelSource).toContain('setup.completion.proActivation.action');- expect(setupCompletionModelSource).toContain(- "state.runtimeBuild === 'pro' && state.licenseValid === false",- );- });});diff --git a/frontend-modern/src/components/Storage/__tests__/Storage.test.tsx b/frontend-modern/src/components/Storage/__tests__/Storage.test.tsxindex 7af2b747bc..62801b858b 100644--- a/frontend-modern/src/components/Storage/__tests__/Storage.test.tsx+++ b/frontend-modern/src/components/Storage/__tests__/Storage.test.tsx@@ -2,8 +2,6 @@ import { cleanup, fireEvent, render, screen, waitFor, within } from '@solidjs/teimport { createSignal } from 'solid-js';import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';import { ChartsAPI } from '@/api/charts';-import storageSummarySource from '@/components/Storage/useStorageSummaryCharts.ts?raw';-import storageSummaryCacheSource from '@/utils/storageSummaryCache.ts?raw';import type { Alert } from '@/types/api';import type { Resource, ResourceType } from '@/types/resource';import Storage from '@/components/Storage/Storage';@@ -374,26 +372,6 @@ vi.mock('@/components/Storage/DiskList', () => ({),}));-describe('Storage platform-page embed contract', () => {- it('auto-suppresses the Source filter chip whenever forcedSourceFilter is set', async () => {- const storageSource = (await import('../Storage.tsx?raw')).default;- expect(storageSource).toContain(- 'suppressSourceFilter={props.suppressSourceFilter || Boolean(props.forcedSourceFilter)}',- );- const controlsSource = (await import('../StoragePageControls.tsx?raw')).default;- expect(controlsSource).toContain('suppressSourceFilter?: boolean;');- expect(controlsSource).toContain('if (!props.suppressSourceFilter) {');- });-- it('lets platform storage tabs suppress the explicit Node filter in favor of search', async () => {- const storageSource = (await import('../Storage.tsx?raw')).default;- expect(storageSource).toContain('suppressNodeFilter={props.suppressNodeFilter}');- const controlsSource = (await import('../StoragePageControls.tsx?raw')).default;- expect(controlsSource).toContain('suppressNodeFilter?: boolean;');- expect(controlsSource).toContain('if (!props.suppressNodeFilter) {');- });-});-describe('Storage', () => {beforeEach(() => {vi.stubGlobal('fetch', fetchMock);@@ -1648,15 +1626,4 @@ describe('Storage', () => {expect(params.get('source')).toBe('proxmox-pve');expect(params.get('status')).toBe('warning');});-- it('routes storage summary fetches through the shared storage summary cache owner', () => {- expect(storageSummarySource).toContain('readStorageSummaryCache(range, nodeId)');- expect(storageSummarySource).toContain('fetchStorageSummaryAndCache(requestedRange, {');- expect(storageSummarySource).toContain("caller: options.caller ?? 'useStorageSummaryCharts'");- expect(storageSummarySource).toContain('requestIdleCallback');- expect(storageSummaryCacheSource).toContain('const STORAGE_SUMMARY_CACHE_VERSION = 1;');- expect(storageSummaryCacheSource).toContain(- "return `${STORAGE_SUMMARY_CACHE_VERSION}::${orgScope}::${range}::${nodeId || '__all__'}`;",- );- });});diff --git a/frontend-modern/src/components/Storage/__tests__/useStorageModel.test.ts b/frontend-modern/src/components/Storage/__tests__/useStorageModel.test.tsnew file mode 100644index 0000000000..0c6a1b3b03--- /dev/null+++ b/frontend-modern/src/components/Storage/__tests__/useStorageModel.test.ts@@ -0,0 +1,79 @@+import { renderHook } from '@solidjs/testing-library';+import { describe, expect, it } from 'vitest';+import { useStorageModel } from '@/components/Storage/useStorageModel';+import type { StorageRecord } from '@/features/storageBackups/models';++const record = (overrides: Partial<StorageRecord>): StorageRecord => ({+ id: 'storage-1',+ name: 'storage',+ category: 'pool',+ health: 'healthy',+ location: { label: 'pve1', scope: 'node' },+ capacity: { totalBytes: 1_000, usedBytes: 400, freeBytes: 600, usagePercent: 40 },+ capabilities: ['capacity', 'replication'],+ source: {+ platform: 'proxmox-pve',+ family: 'virtualization',+ origin: 'resource',+ adapterId: 'resource-storage',+ },+ observedAt: 0,+ details: { type: 'rbd' },+ refs: {},+ ...overrides,+});++const model = (records: StorageRecord[], search = '') =>+ renderHook(() =>+ useStorageModel({+ records: () => records,+ search: () => search,+ sourceFilter: () => 'all',+ healthFilter: () => 'all',+ selectedNodeId: () => 'all',+ nodeOptions: () => [],+ sortKey: () => 'name',+ sortDirection: () => 'asc',+ groupBy: () => 'none',+ }),+ ).result;++describe('useStorageModel', () => {+ // Ceph telemetry adds a cluster-internal pool row for each pool PVE also+ // mounts as storage. Showing both lists the same Ceph pool twice.+ const cephPool = record({+ id: 'pool-1',+ name: 'cephfs-data',+ source: {+ platform: 'ceph-telemetry',+ family: 'virtualization',+ origin: 'resource',+ adapterId: 'resource-storage',+ },+ details: { type: 'ceph', node: 'cluster' },+ });+ const cephMount = record({+ id: 'mount-1',+ name: 'cephfs-data',+ details: { type: 'cephfs', node: 'shared' },+ });+ const local = record({+ id: 'local-1',+ name: 'local-zfs',+ capabilities: ['capacity'],+ details: { type: 'zfspool', node: 'pve1' },+ });++ it('lists one row per Ceph pool, with filters and source options built from that list', () => {+ const result = model([cephPool, cephMount, local]);++ expect(result.filteredRecords().map((row) => row.id)).toEqual(['mount-1', 'local-1']);+ expect(result.sortedRecords().map((row) => row.id)).toEqual(['mount-1', 'local-1']);+ expect(result.groupedRecords().flatMap((group) => group.items.map((row) => row.id))).toEqual([+ 'mount-1',+ 'local-1',+ ]);+ expect(result.sourceOptions()).not.toContain('ceph-telemetry');+ expect(model([cephPool, cephMount, local], 'cephfs-data').filteredRecords()).toHaveLength(1);+ });+});diff --git a/frontend-modern/src/components/Storage/code_standards.test.ts b/frontend-modern/src/components/Storage/code_standards.test.tsindex f7576b9d00..4c9b9b88c5 100644--- a/frontend-modern/src/components/Storage/code_standards.test.ts+++ b/frontend-modern/src/components/Storage/code_standards.test.ts@@ -46,15 +46,4 @@ describe('Storage code standards guardrails', () => {expect(violations).toEqual([]);});-- it('keeps the pools table on consolidated ceph records', () => {- const source = readFileSync(path.resolve(storageDir, 'useStorageModel.ts'), 'utf-8');-- expect(source).toContain(- "import { consolidateCephClusterPoolRecords } from '@/features/storageBackups/cephRecordPresentation';",- );- expect(source).toContain('consolidateCephClusterPoolRecords(options.records())');- expect(source).toContain('buildStorageSourceOptions(consolidatedRecords())');- expect(source).toContain('filterStorageRecords(consolidatedRecords()');- });});diff --git a/frontend-modern/src/components/Toast/__tests__/Toast.test.tsx b/frontend-modern/src/components/Toast/__tests__/Toast.test.tsxindex a70844555a..95f97e74e7 100644--- a/frontend-modern/src/components/Toast/__tests__/Toast.test.tsx+++ b/frontend-modern/src/components/Toast/__tests__/Toast.test.tsx@@ -3,7 +3,6 @@ import { batch, createSignal } from 'solid-js';import { Dialog } from '@/components/shared/Dialog';import { cleanup, fireEvent, render, screen } from '@solidjs/testing-library';import { Toast, ToastContainer } from '@/components/Toast/Toast';-import toastSource from '@/components/Toast/Toast.tsx?raw';describe('Toast', () => {afterEach(() => {@@ -238,18 +237,4 @@ describe('Toast', () => {// Message is directly visible as a subtitleexpect(screen.getByText('The node is currently offline')).toBeInTheDocument();});-- it('keeps toast status and dismiss chrome on shared primitives', () => {- expect(toastSource).toContain('ActionIconButton');- expect(toastSource).toContain('lucide-solid/icons/check-circle');- expect(toastSource).toContain('lucide-solid/icons/circle-alert');- expect(toastSource).toContain('lucide-solid/icons/alert-triangle');- expect(toastSource).toContain('lucide-solid/icons/info');- expect(toastSource).toContain('lucide-solid/icons/x');- expect(toastSource).not.toContain('<svg');- expect(toastSource).not.toContain('const icons = {');- expect(toastSource).not.toContain(- 'shrink-0 text-muted hover:text-base-content hover:bg-surface rounded-md p-1.5 transition-all duration-200',- );- });});diff --git a/frontend-modern/src/components/Workloads/GuestDrawer.test.tsx b/frontend-modern/src/components/Workloads/GuestDrawer.test.tsxindex 90e0bdd4c2..c106c59c45 100644--- a/frontend-modern/src/components/Workloads/GuestDrawer.test.tsx+++ b/frontend-modern/src/components/Workloads/GuestDrawer.test.tsx@@ -13,9 +13,6 @@ import type { Alert, Memory, Disk, GuestNetworkInterface } from '@/types/api';import { resetCreateNonSuspendingQueryCacheForTest } from '@/hooks/createNonSuspendingQuery';import { getWorkloadMetadataId } from '@/utils/workloads';import { resetAIRuntimeState } from '@/stores/aiRuntimeState';-import guestDrawerSource from './GuestDrawer.tsx?raw';-import guestDrawerManageSource from './GuestDrawerManage.tsx?raw';-import guestDrawerOverviewSource from './GuestDrawerOverview.tsx?raw';import { getGuestDrawerAlertAttention, getGuestDrawerHistoryRangeBounds } from './guestDrawerModel';// ── Mocks ──────────────────────────────────────────────────────────────@@ -491,11 +488,16 @@ describe('GuestDrawer', () => {);});- it('keeps canonical resource policy out of Overview and mounts it on demand in Manage', () => {- expect(guestDrawerOverviewSource).not.toContain('<ResourceOperatorStateSection');- expect(guestDrawerManageSource).toContain('<ResourceOperatorStateSection');- expect(guestDrawerSource).toContain("activeTab() === 'manage'");- expect(guestDrawerManageSource).toContain('data-testid="guest-manage-tab"');+ it('keeps operator overrides out of Overview and mounts them on demand in Manage', () => {+ solidRender(() => <GuestDrawer guest={makeGuest()} onClose={vi.fn()} />);++ expect(screen.queryByText('Operator overrides')).not.toBeInTheDocument();+ expect(screen.queryByTestId('guest-manage-tab')).not.toBeInTheDocument();++ fireEvent.click(screen.getByRole('tab', { name: 'Manage' }));++ const manage = screen.getByTestId('guest-manage-tab');+ expect(within(manage).getByRole('region', { name: 'Operator overrides' })).toBeInTheDocument();});it('opens with additive context and the active problem before technical inventory', () => {diff --git a/frontend-modern/src/components/Workloads/__tests__/WorkloadTableHeader.resize.test.tsx b/frontend-modern/src/components/Workloads/__tests__/WorkloadTableHeader.resize.test.tsxnew file mode 100644index 0000000000..05ae29da1a--- /dev/null+++ b/frontend-modern/src/components/Workloads/__tests__/WorkloadTableHeader.resize.test.tsx@@ -0,0 +1,208 @@+import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';+import { cleanup, fireEvent, render } from '@solidjs/testing-library';+import type { ComponentProps } from 'solid-js';++import { WORKLOAD_COLUMN_MIN_WIDTH } from '../workloadColumnWidths';+import { WorkloadTableHeader } from '../WorkloadTableHeader';++type HeaderProps = ComponentProps<typeof WorkloadTableHeader>;++const COLUMN_WIDTH = 120;+const POINTER_ID = 7;++const columns = [+ { id: 'name', label: 'Name', sortKey: 'name' },+ { id: 'cpu', label: 'CPU', sortKey: 'cpu' },+] as unknown as ReturnType<HeaderProps['workloadTableVisibleColumns']>;++// jsdom has no layout and no pointer capture; give each header cell a width and+// remember which element holds capture so release can be observed.+let captured: Set<number>;++beforeEach(() => {+ captured = new Set();+ vi.spyOn(HTMLElement.prototype, 'getBoundingClientRect').mockImplementation(+ () =>+ ({+ width: COLUMN_WIDTH,+ height: 20,+ top: 0,+ left: 0,+ right: COLUMN_WIDTH,+ bottom: 20,+ }) as DOMRect,+ );+ Object.defineProperty(HTMLElement.prototype, 'setPointerCapture', {+ configurable: true,+ value: (id: number) => captured.add(id),+ });+ Object.defineProperty(HTMLElement.prototype, 'hasPointerCapture', {+ configurable: true,+ value: (id: number) => captured.has(id),+ });+ Object.defineProperty(HTMLElement.prototype, 'releasePointerCapture', {+ configurable: true,+ value: (id: number) => captured.delete(id),+ });+});++afterEach(() => {+ cleanup();+ vi.restoreAllMocks();+});++const mountHeader = (overrides: Partial<HeaderProps> = {}) => {+ const callbacks = {+ beginWorkloadColumnResize: vi.fn(),+ previewWorkloadColumnWidth: vi.fn(),+ commitWorkloadColumnResize: vi.fn(),+ cancelWorkloadColumnResize: vi.fn(),+ clearWorkloadColumnWidth: vi.fn(),+ handleSort: vi.fn(),+ };+ const props = {+ isMobile: () => false,+ sortDirection: () => 'asc',+ sortKey: () => 'name',+ visibleColumns: () => columns,+ workloadMemoryDisplayBasis: () => 'guest',+ workloadTableLayoutMode: () => 'wide',+ workloadTableVisibleColumnIds: () => columns.map((column) => column.id),+ workloadTableVisibleColumns: () => columns,+ workloadColumnWidths: () => ({}),+ workloadManualColumnSizingSupported: () => true,+ ...callbacks,+ ...overrides,+ } as unknown as HeaderProps;+ const view = render(() => (+ <table>+ <WorkloadTableHeader {...props} />+ </table>+ ));+ const handle = (columnId: string) =>+ view.container.querySelector<HTMLElement>(`[data-workload-col-resizer="${columnId}"]`)!;+ return { ...view, ...callbacks, handle };+};++const pointer = (target: Element, type: string, fields: Record<string, unknown> = {}) => {+ const event = Object.assign(new Event(type, { bubbles: true, cancelable: true }), {+ pointerId: POINTER_ID,+ button: 0,+ clientX: 100,+ ...fields,+ });+ fireEvent(target, event);+ return event;+};++describe('WorkloadTableHeader column resize handle', () => {+ it('offers a drag handle on every column only where manual sizing is supported', () => {+ const supported = mountHeader();+ expect(supported.handle('name')).not.toBeNull();+ expect(supported.handle('cpu')).not.toBeNull();+ cleanup();++ const unsupported = mountHeader({ workloadManualColumnSizingSupported: () => false });+ expect(unsupported.container.querySelector('[data-workload-col-resizer]')).toBeNull();+ });++ it('resizes the dragged column from its measured width and commits on release', () => {+ const { handle, ...view } = mountHeader();+ const cpu = handle('cpu');++ const down = pointer(cpu, 'pointerdown', { clientX: 100 });+ expect(down.defaultPrevented).toBe(true);+ expect(captured.has(POINTER_ID)).toBe(true);+ expect(view.beginWorkloadColumnResize).not.toHaveBeenCalled();++ pointer(cpu, 'pointermove', { clientX: 160 });+ expect(view.beginWorkloadColumnResize).toHaveBeenCalledTimes(1);+ expect(view.beginWorkloadColumnResize).toHaveBeenCalledWith({+ name: COLUMN_WIDTH,+ cpu: COLUMN_WIDTH,+ });+ expect(view.previewWorkloadColumnWidth).toHaveBeenLastCalledWith('cpu', COLUMN_WIDTH + 60);++ pointer(cpu, 'pointermove', { clientX: 90 });+ expect(view.beginWorkloadColumnResize).toHaveBeenCalledTimes(1);+ expect(view.previewWorkloadColumnWidth).toHaveBeenLastCalledWith('cpu', COLUMN_WIDTH - 10);++ pointer(cpu, 'pointerup', { clientX: 90 });+ expect(view.commitWorkloadColumnResize).toHaveBeenCalledTimes(1);+ expect(view.cancelWorkloadColumnResize).not.toHaveBeenCalled();+ expect(captured.has(POINTER_ID)).toBe(false);+ });++ it('never shrinks a column below the minimum width', () => {+ const { handle, ...view } = mountHeader();+ const name = handle('name');++ pointer(name, 'pointerdown', { clientX: 500 });+ pointer(name, 'pointermove', { clientX: 0 });++ expect(view.previewWorkloadColumnWidth).toHaveBeenLastCalledWith(+ 'name',+ WORKLOAD_COLUMN_MIN_WIDTH,+ );+ });++ it('treats a plain click on the handle as a click, not a resize', () => {+ const { handle, ...view } = mountHeader();+ const cpu = handle('cpu');++ pointer(cpu, 'pointerdown', { clientX: 100 });+ pointer(cpu, 'pointermove', { clientX: 101 });+ pointer(cpu, 'pointerup', { clientX: 101 });++ expect(view.beginWorkloadColumnResize).not.toHaveBeenCalled();+ expect(view.previewWorkloadColumnWidth).not.toHaveBeenCalled();+ expect(view.commitWorkloadColumnResize).not.toHaveBeenCalled();+ expect(captured.has(POINTER_ID)).toBe(false);+ });++ it('abandons the drag when the browser cancels the pointer', () => {+ const { handle, ...view } = mountHeader();+ const cpu = handle('cpu');++ pointer(cpu, 'pointerdown', { clientX: 100 });+ pointer(cpu, 'pointermove', { clientX: 180 });+ expect(view.previewWorkloadColumnWidth).toHaveBeenCalledTimes(1);++ pointer(cpu, 'pointercancel');+ expect(view.cancelWorkloadColumnResize).toHaveBeenCalledTimes(1);+ expect(view.commitWorkloadColumnResize).not.toHaveBeenCalled();+ expect(captured.has(POINTER_ID)).toBe(false);++ // The drag is over: later moves and a stray release change nothing.+ pointer(cpu, 'pointermove', { clientX: 240 });+ pointer(cpu, 'pointerup', { clientX: 240 });+ expect(view.previewWorkloadColumnWidth).toHaveBeenCalledTimes(1);+ expect(view.commitWorkloadColumnResize).not.toHaveBeenCalled();+ });++ it('ignores a second pointer while one is dragging and non-primary buttons', () => {+ const { handle, ...view } = mountHeader();+ const cpu = handle('cpu');++ pointer(cpu, 'pointerdown', { button: 2 });+ pointer(cpu, 'pointermove', { clientX: 200 });+ expect(view.beginWorkloadColumnResize).not.toHaveBeenCalled();++ pointer(cpu, 'pointerdown', { clientX: 100 });+ pointer(cpu, 'pointermove', { clientX: 200, pointerId: 99 });+ expect(view.beginWorkloadColumnResize).not.toHaveBeenCalled();+ });++ it('resets one column on double-click and never sorts from the handle', () => {+ const { handle, ...view } = mountHeader();++ fireEvent.dblClick(handle('cpu'));+ expect(view.clearWorkloadColumnWidth).toHaveBeenCalledWith('cpu');++ fireEvent.click(handle('cpu'));+ expect(view.handleSort).not.toHaveBeenCalled();++ fireEvent.click(view.container.querySelector('[data-workload-col="cpu"]')!);+ expect(view.handleSort).toHaveBeenCalledWith('cpu');+ });+});diff --git a/frontend-modern/src/components/Workloads/__tests__/WorkloadsFilter.test.tsx b/frontend-modern/src/components/Workloads/__tests__/WorkloadsFilter.test.tsxindex 924850e2b2..3d952a7f70 100644--- a/frontend-modern/src/components/Workloads/__tests__/WorkloadsFilter.test.tsx+++ b/frontend-modern/src/components/Workloads/__tests__/WorkloadsFilter.test.tsx@@ -3,7 +3,6 @@ import { render, screen, cleanup, fireEvent, within } from '@solidjs/testing-libimport { createSignal } from 'solid-js';import { WorkloadsFilter } from '../WorkloadsFilter';import { setKioskMode } from '@/utils/url';-import workloadsFilterSource from '../WorkloadsFilter.tsx?raw';import {DEFAULT_WORKLOADS_SORT_DIRECTION,DEFAULT_WORKLOADS_SORT_KEY,@@ -101,12 +100,6 @@ describe('WorkloadsFilter', () => {});describe('rendering', () => {- it('uses the shared FilterBar status-dot presentation helper', () => {- expect(workloadsFilterSource).toContain('filterChipStatusDot');- expect(workloadsFilterSource).not.toContain('const statusDot = (className: string)');- expect(workloadsFilterSource).not.toContain('h-2 w-2 rounded-full ' + '${className}');- });-it('renders the search input', () => {render(() => <WorkloadsFilter {...makeProps()} />);expect(screen.getByTestId('search-input')).toBeInTheDocument();diff --git a/frontend-modern/src/components/Workloads/__tests__/WorkloadsSurface.performance.contract.test.tsx b/frontend-modern/src/components/Workloads/__tests__/WorkloadsSurface.performance.contract.test.tsxindex 6460082c49..6123ce0c1a 100644--- a/frontend-modern/src/components/Workloads/__tests__/WorkloadsSurface.performance.contract.test.tsx+++ b/frontend-modern/src/components/Workloads/__tests__/WorkloadsSurface.performance.contract.test.tsx@@ -9,76 +9,17 @@ import { syncSessionSettingsCapabilities } from '@/stores/sessionSettingsCapabilimport { WorkloadsSurface, type WorkloadsSurfaceProps } from '../WorkloadsSurface';import { useWorkloadsState, type WorkloadsStateOptions } from '../useWorkloadsState';import { WORKLOAD_TABLE_CONTAINER_TABLET_WIDTH, getGuestColumnStyle } from '../guestRowModel';-import workloadsSource from '../WorkloadsSurface.tsx?raw';-import proxmoxPageSurfaceSource from '@/features/proxmox/ProxmoxPageSurface.tsx?raw';-import vmwarePageSurfaceSource from '@/features/vmware/VmwarePageSurface.tsx?raw';-import workloadsFilterSource from '../WorkloadsFilter.tsx?raw';-import workloadsWorkloadTableSource from '../WorkloadsTable.tsx?raw';-import metricDisplayModeSegmentedControlSource from '../MetricDisplayModeSegmentedControl.tsx?raw';-import workloadPanelSource from '../WorkloadPanel.tsx?raw';import workloadWebLinksActionSource from '../WorkloadWebLinksAction.tsx?raw';-import workloadWebLinksStateSource from '../useWorkloadWebLinksState.ts?raw';-import workloadTableHeaderSource from '../WorkloadTableHeader.tsx?raw';-import workloadsFilterModelSource from '../workloadsFilterModel.ts?raw';-import workloadsControlsStateSource from '../useWorkloadsControlsState.ts?raw';-import workloadsGuestMetadataStateSource from '../useWorkloadGuestMetadataState.ts?raw';-import workloadSelectionModelSource from '../workloadSelectionModel.ts?raw';-import workloadsSelectionStateSource from '../useWorkloadSelectionState.ts?raw';-import workloadsWorkloadDerivedStateSource from '../useWorkloadsDerivedState.ts?raw';-import workloadsWorkloadFilterOptionsSource from '../useWorkloadFilterOptions.ts?raw';-import workloadFilterConfigModelSource from '../workloadFilterConfigModel.ts?raw';-import workloadRouteModelSource from '../workloadRouteModel.ts?raw';-import workloadRouteStateModelSource from '../workloadRouteStateModel.ts?raw';-import workloadUrlSyncModelSource from '../workloadUrlSyncModel.ts?raw';-import workloadColumnLayoutUrlSource from '../workloadColumnLayoutUrl.ts?raw';-import workloadColumnWidthsSource from '../workloadColumnWidths.ts?raw';-import workloadsWorkloadViewportSyncSource from '../useWorkloadViewportSync.ts?raw';-import workloadsWorkloadRouteStateSource from '../useWorkloadRouteState.ts?raw';-import workloadsWorkloadUrlSyncSource from '../useWorkloadUrlSync.ts?raw';import workloadsStateSource from '../useWorkloadsState.ts?raw';-import workloadTableMetricHistoryStateSource from '../useWorkloadTableMetricHistory.ts?raw';-import workloadInventorySourceIssuesSource from '../workloadInventorySourceIssues.ts?raw';-import groupedTableWindowingSource from '../useGroupedTableWindowing.ts?raw';-import thresholdSliderSource from '../ThresholdSlider.tsx?raw';-import thresholdSliderModelSource from '../thresholdSliderModel.ts?raw';-import thresholdSliderStateSource from '../useThresholdSliderState.ts?raw';-import enhancedCpuBarSource from '../EnhancedCPUBar.tsx?raw';-import enhancedCpuBarModelSource from '../enhancedCpuBarModel.ts?raw';-import enhancedCpuBarStateSource from '../useEnhancedCPUBarState.ts?raw';-import stackedDiskBarSource from '../StackedDiskBar.tsx?raw';-import stackedDiskBarModelSource from '../stackedDiskBarModel.ts?raw';-import stackedDiskBarStateSource from '../useStackedDiskBarState.ts?raw';-import stackedMemoryBarSource from '../StackedMemoryBar.tsx?raw';-import stackedMemoryBarModelSource from '../stackedMemoryBarModel.ts?raw';-import stackedMemoryBarStateSource from '../useStackedMemoryBarState.ts?raw';-import diskListSource from '../DiskList.tsx?raw';-import diskListModelSource from '../diskListModel.ts?raw';-import diskListStateSource from '../useDiskListState.ts?raw';-import metricBarSource from '../MetricBar.tsx?raw';-import metricBarModelSource from '../metricBarModel.ts?raw';-import metricBarStateSource from '../useMetricBarState.ts?raw';-import guestDrawerSource from '../GuestDrawer.tsx?raw';-import guestDrawerManageSource from '../GuestDrawerManage.tsx?raw';-import guestDrawerHistorySource from '../GuestDrawerHistory.tsx?raw';import guestDrawerOverviewSource from '../GuestDrawerOverview.tsx?raw';-import guestDrawerModelSource from '../guestDrawerModel.ts?raw';-import nodeDrawerSource from '../NodeDrawer.tsx?raw';import nodeDrawerOverviewSource from '../NodeDrawerOverview.tsx?raw';-import nodeDrawerModelSource from '../nodeDrawerModel.ts?raw';-import guestRowSource from '../GuestRow.tsx?raw';-import guestRowCellsSource from '../GuestRowCells.tsx?raw';-import guestDrawerStateSource from '../useGuestDrawerState.ts?raw';-import guestRowModelSource from '../guestRowModel.tsx?raw';-import guestRowStateSource from '../useGuestRowState.ts?raw';-import workloadSelectorsSource from '../workloadSelectors.ts?raw';-import workloadTopologySource from '../workloadTopology.ts?raw';import {filterWorkloads,createWorkloadSortComparator,groupWorkloads,computeWorkloadStats,} from '../workloadSelectors';-import { getKubernetesContextKey } from '../workloadTopology';+import { getKubernetesContextKey, workloadNodeScopeId } from '../workloadTopology';import { getCanonicalWorkloadId, normalizeWorkloadViewModeParam } from '@/utils/workloads';import { resetCreateNonSuspendingQueryCacheForTest } from '@/hooks/createNonSuspendingQuery';@@ -198,11 +139,16 @@ vi.mock('@/hooks/useUnifiedResources', () => ({},}));+const metricHistoryMocks = vi.hoisted(() => ({ options: [] as Array<{ series: string }> }));+vi.mock('../useWorkloadTableMetricHistory', () => ({- useWorkloadTableMetricHistory: () => ({- getGuestMetricSeries: () => [],- getNodeMetricSeries: () => [],- }),+ useWorkloadTableMetricHistory: (options: { series: string }) => {+ metricHistoryMocks.options.push(options);+ return {+ getGuestMetricSeries: () => [],+ getNodeMetricSeries: () => [],+ };+ },}));vi.mock('@/api/connections', () => ({@@ -405,75 +351,6 @@ function PageOwnedWorkloadsSurface();}-describe('Workloads platform-page embed contract', () => {- it('exposes metric-display-mode + history-range override hooks so platform pages can share the toggle across multiple tables', async () => {- const stateSource = (await import('../useWorkloadsState.ts?raw')).default;- expect(stateSource).toContain('metricDisplayMode?: Accessor<WorkloadsMetricDisplayMode>;');- expect(stateSource).toContain(- 'onMetricDisplayModeChange?: (value: WorkloadsMetricDisplayMode) => void;',- );- expect(stateSource).toContain(- 'metricHistoryRange?: Accessor<WorkloadTableMetricHistoryRange>;',- );- expect(stateSource).toContain(- 'onMetricHistoryRangeChange?: (value: WorkloadTableMetricHistoryRange) => void;',- );- expect(stateSource).toContain('metricDisplayMode: props.metricDisplayMode,');- expect(stateSource).toContain('onMetricDisplayModeChange: props.onMetricDisplayModeChange,');-- const controlsSource = (await import('../useWorkloadsControlsState.ts?raw')).default;- // The controls layer must short-circuit to the page-provided accessor +- // change handler when supplied; the internal persistent signal stays as- // the fallback so standalone usage keeps working.- expect(controlsSource).toContain('options.metricDisplayMode ?? internalMetricDisplayMode');- expect(controlsSource).toContain('options.onMetricDisplayModeChange');- expect(controlsSource).toContain('options.metricHistoryRange ?? internalMetricHistoryRange');-- const proxmoxSource = (await import('../../../features/proxmox/ProxmoxPageSurface.tsx?raw'))- .default;- expect(proxmoxSource).toContain('STORAGE_KEYS.WORKLOADS_METRIC_DISPLAY_MODE');- expect(proxmoxSource).toContain('STORAGE_KEYS.WORKLOADS_METRIC_HISTORY_RANGE');- expect(proxmoxSource).toContain('metricDisplayMode={metricDisplayMode}');- expect(proxmoxSource).toContain('{...getWorkloadsMetricFilterProps(workloadsState)}');- expect(proxmoxSource).toContain('onMetricDisplayModeChange: props.setMetricDisplayMode,');- expect(proxmoxSource).toContain('metricHistoryRange={metricHistoryRange}');- expect(proxmoxSource).not.toContain(- 'setMetricHistoryRange={workloadsState.setWorkloadMetricHistoryRange}',- );- expect(proxmoxSource).toContain('onMetricHistoryRangeChange: props.setMetricHistoryRange,');-- const nodesTableSource = (await import('../../../features/proxmox/ProxmoxNodesTable.tsx?raw'))- .default;- expect(nodesTableSource).toContain('useWorkloadTableMetricHistory');- expect(nodesTableSource).toContain('MetricMiniSparkline');- expect(nodesTableSource).toContain('isSparklineMode');- // The hosts table draws node rows only: it polls the infrastructure- // summary and leaves guest history to the embedded workloads reader.- expect(nodesTableSource).toContain("series: 'nodes',");- });-- it('keeps grouped host rows as dividers and host drawers on the platform hosts table', async () => {- const stateSource = (await import('../useWorkloadsState.ts?raw')).default;- expect(stateSource).not.toContain('groupNodeDrawerMode');- expect(stateSource).not.toContain('summaryGroupScopes');-- const selectionSource = (await import('../useWorkloadSelectionState.ts?raw')).default;- expect(selectionSource).not.toContain('hoveredGroupScope');- expect(selectionSource).not.toContain('focusedGroupScope');-- const panelSource = (await import('../WorkloadPanel.tsx?raw')).default;- expect(panelSource).not.toContain('NodeDrawer');- expect(panelSource).not.toContain('handleGroupFocusToggle');- expect(panelSource).not.toContain('createSummaryInteractiveRowPreviewHandlers');- expect(panelSource).toContain("trProps={{ 'data-summary-group-id': groupKey }}");-- const proxmoxNodesSource = (await import('../../../features/proxmox/ProxmoxNodesTable.tsx?raw'))- .default;- expect(proxmoxNodesSource).toContain('NodeDrawer');- expect(proxmoxNodesSource).toContain('data-inline-detail-for={node.id}');- });-});-describe('Workloads performance contract', () => {beforeEach(() => {vi.clearAllMocks();@@ -534,19 +411,59 @@ describe('Workloads performance contract', () => {});describe('Baseline structural contracts', () => {- it('binds every workload toolbar to the complete canonical metric-control contract', () => {- expect(workloadsFilterModelSource).toContain('getWorkloadsMetricFilterProps');- expect(workloadsFilterModelSource).toContain('metricHistoryHintVisible');- // The owning platform pages render the only workload toolbars; the- // embedded surface renders none.- expect(workloadsSource).not.toContain('<WorkloadsFilter');- expect(workloadsSource).not.toContain("from './WorkloadsFilter'");- for (const pageSource of [proxmoxPageSurfaceSource, vmwarePageSurfaceSource]) {- expect(pageSource).toContain('{...getWorkloadsMetricFilterProps(workloadsState)}');- expect(pageSource).not.toContain(- 'metricDisplayMode={workloadsState.workloadMetricDisplayMode}',- );- }+ // The Trends toggle on the Workloads surface draws guest rows only: grouped+ // node rows render no metric cells, so it must not poll the infrastructure+ // summary the hosts table owns.+ it('reads only guest metric history so Trends does not poll the infrastructure summary', () => {+ metricHistoryMocks.options.length = 0;+ const view = renderHook(() => useWorkloadsState({}));++ const requested = metricHistoryMocks.options.map((options) => options.series);+ expect(requested).toContain('guests');+ expect(requested).not.toContain('nodes');+ view.cleanup();+ });++ // useWorkloadViewportSync measures dividers and summaryTableFocus keeps a click+ // on one from clearing the open drawer, both through this attribute. A group+ // with a Proxmox host resource renders the host NodeGroupHeader row; a group+ // without one renders the plain group row. Both must carry it.+ it('tags every group divider row with its group id', async () => {+ mockLocationSearch = '?type=all';+ mockInfrastructureResources = [+ {+ id: 'agent-node-a',+ type: 'agent',+ name: 'node-a',+ platformType: 'proxmox-pve',+ status: 'online',+ proxmox: { instance: 'node-a', node: 'node-a' },+ } as Resource,+ ];+ mockWorkloads = [+ makeGuest(1, { name: 'on-node-a', node: 'node-a', instance: 'node-a' }),+ makeGuest(2, { name: 'on-node-b', node: 'node-b', instance: 'node-b' }),+ ];++ const { container } = render(() => (+ <PageOwnedWorkloadsSurface forcedGroupingMode="grouped" />+ ));++ await waitFor(() => {+ expect(container.querySelectorAll('tr[data-summary-group-id]')).toHaveLength(2);+ });+ const scopeFor = (name: string) => workloadNodeScopeId({ instance: name, node: name });+ const dividers = Array.from(container.querySelectorAll('tr[data-summary-group-id]'));+ expect(dividers.map((row) => row.getAttribute('data-summary-group-id'))).toEqual([+ scopeFor('node-a'),+ scopeFor('node-b'),+ ]);+ // Only the host header row carries the host status dot, so this proves the+ // first divider is the NodeGroupHeader path and the second the plain row.+ expect(dividers[0].textContent).toContain('node-a');+ expect(dividers[0].querySelector('[role="img"][aria-label]')).not.toBeNull();+ expect(dividers[1].textContent).toContain('node-b');+ expect(dividers[1].querySelector('[role="img"][aria-label]')).toBeNull();});it('keeps the workloads route visible when websocket connectivity degrades but REST workload data is healthy', async () => {@@ -892,31 +809,6 @@ describe('Workloads performance contract', () => {});describe('Workload windowing contracts', () => {- it('keeps grouped virtual height stable and owns the back-to-top control in viewport sync', () => {- expect(workloadsWorkloadDerivedStateSource).toContain('estimatedGroupHeaderHeight');- expect(workloadsWorkloadDerivedStateSource).toContain('countGroupStartsBefore');- expect(workloadsWorkloadDerivedStateSource).toContain('guestIndexAtVirtualOffset');- expect(workloadsWorkloadDerivedStateSource).toContain('WORKLOADS_TABLE_DIVIDER_HEIGHT');- expect(groupedTableWindowingSource).toContain('rowIndexAtOffset');- expect(groupedTableWindowingSource).toContain('targetRunway');- expect(groupedTableWindowingSource).toContain('trailingRunway');- expect(workloadPanelSource).toContain('groupGuests()[0] === fullGroupGuests()[0]');- expect(workloadPanelSource).toContain('class="h-0 p-0! border-0! leading-0"');- expect(workloadPanelSource).toContain('<For each={props.visibleGroupKeys()}');- expect(workloadPanelSource).toContain('<For each={groupGuestIds()}');- expect(workloadPanelSource).toContain('groupGuests().map(getCanonicalWorkloadId)');- expect(workloadsWorkloadViewportSyncSource).toContain(- 'SCROLL_TO_TOP_VISIBILITY_THRESHOLD_PX',- );- expect(workloadsWorkloadViewportSyncSource).toContain('bindWindowedPageScrollEvents');- expect(workloadsWorkloadViewportSyncSource).not.toContain("addEventListener('touch");- expect(workloadsWorkloadViewportSyncSource).toContain('wheelDeltaInPixels');- expect(workloadsWorkloadViewportSyncSource).toContain(- "scrollContainer.scrollTo({ top: 0, behavior: 'smooth' })",- );- expect(workloadsSource).toContain('data-testid="workloads-scroll-to-top"');- });-it('Profile M: caps mounted guest rows when windowing is active', async () => {mockLocationSearch = '?type=all';mockWorkloads = makeGuests(PROFILES.M);@@ -1198,543 +1090,20 @@ describe('Workloads performance contract', () => {expect(screen.getByTestId('drawer-nested-context')).toHaveTextContent('Docker 1');});- it('routes org scope normalization through the shared helper', () => {- expect(workloadsSource).toContain('useWorkloadsState');- expect(workloadsStateSource).toContain('useWorkloadGuestMetadataState');- expect(workloadsGuestMetadataStateSource).toContain('normalizeOrgScope(getOrgID())');- expect(workloadsStateSource).not.toContain("const DEFAULT_ORG_SCOPE = 'default'");- expect(workloadsStateSource).not.toContain('const normalizeOrgScope =');- });-- it('reads guests and Proxmox nodes only from the workloads query or page snapshot', () => {- // The state always runs its workloads query, so its options carry no- // enable flag and no caller-supplied guest or node arrays.- expect(workloadsStateSource).not.toMatch(/^ {2}(?:vms|containers|nodes|useWorkloads)\??:/m);- expect(workloadsStateSource).not.toContain('props.useWorkloads');- expect(workloadsStateSource).not.toContain('props.nodes');- });-- it('keeps hot-path workloads state in the shared workloads state owner', () => {- expect(workloadsSource).toContain('useWorkloadsState');- // The owning page builds the state and the surface requires it; the- // overview layout guardrails check the surface imports only its type.- expect(workloadsSource).toContain(' state: WorkloadsState;');- expect(workloadsSource).toContain('WorkloadsTable');- expect(workloadsSource).not.toContain('const [search, setSearch] = createSignal(');- expect(workloadsStateSource).toContain('useWorkloadsControlsState');- expect(workloadsStateSource).toContain('useWorkloadGuestMetadataState');- expect(workloadsStateSource).toContain('useWorkloadSelectionState');- expect(workloadsStateSource).toContain('useWorkloadsDerivedState');- expect(workloadsStateSource).toContain('useWorkloadRouteState');- expect(workloadsStateSource).toContain('buildWorkloadInventorySourceIssues');- expect(workloadsStateSource).toContain('RuntimeInventorySourcesAPI.list()');- expect(workloadsStateSource).toContain(- 'inventorySourcesSnapshot.refetch({ background: true })',- );- expect(workloadsStateSource).not.toContain('ConnectionsAPI');- expect(workloadsStateSource).not.toContain('ConnectionsListResponse');- expect(workloadsStateSource).not.toContain('workloads-connections:');- expect(workloadInventorySourceIssuesSource).toContain('WORKLOAD_CAPABLE_TYPES');- expect(workloadInventorySourceIssuesSource).not.toContain('formatConnectionErrorMessage');- expect(workloadsStateSource).toContain('createWorkloadSortComparator');- expect(workloadsStateSource).toContain('filterWorkloads(params)');- expect(workloadsStateSource).not.toContain('useBreakpoint');- expect(workloadsStateSource).not.toContain('useColumnVisibility');- expect(workloadsStateSource).not.toContain('blurFocusedTypeToSearch');- expect(workloadsStateSource).not.toContain("from './GuestRow'");- expect(workloadsStateSource).not.toContain('GuestMetadataAPI.getAllMetadata()');- expect(workloadsStateSource).not.toContain('buildWorkloadsPath({');- expect(workloadsStateSource).not.toContain('parseWorkloadsLinkSearch');- expect(workloadsStateSource).not.toContain('const [selectedGuestId, setSelectedGuestIdRaw]');- expect(workloadsStateSource).not.toContain('const [hoveredWorkloadId, setHoveredWorkloadId]');- expect(workloadsStateSource).not.toContain('groupWorkloads(');- expect(workloadsStateSource).not.toContain('computeWorkloadStats(');- expect(workloadsStateSource).not.toContain('computeWorkloadIOEmphasis(');- expect(workloadsStateSource).not.toContain('buildNodeByInstance(');- expect(workloadsStateSource).not.toContain('buildGuestParentNodeMap(');- expect(workloadsStateSource).not.toContain('useGroupedTableWindowing');- expect(workloadsGuestMetadataStateSource).toContain('GuestMetadataAPI.getAllMetadata()');- expect(workloadsGuestMetadataStateSource).toContain("eventBus.on('org_switched'");- expect(workloadsGuestMetadataStateSource).toContain(- 'window.addEventListener(RESOURCE_METADATA_CHANGED_EVENT',- );- expect(workloadsWorkloadRouteStateSource).toContain('useWorkloadUrlSync');- expect(workloadsWorkloadRouteStateSource).toContain('useWorkloadFilterOptions');- expect(workloadsWorkloadRouteStateSource).not.toContain('window.location.pathname');- expect(workloadsWorkloadRouteStateSource).not.toContain('window.location.search');- expect(workloadsControlsStateSource).not.toContain('window.location.pathname');- expect(workloadsControlsStateSource).not.toContain('window.location.search');- expect(workloadsWorkloadRouteStateSource).not.toContain('buildWorkloadsPath({');- expect(workloadsWorkloadRouteStateSource).not.toContain('normalizeWorkloadViewModeParam');- expect(workloadsWorkloadRouteStateSource).not.toContain(- 'const [handledTypeParam, setHandledTypeParam]',- );- expect(workloadsWorkloadRouteStateSource).not.toContain(- 'const [workloadsRouteActive, setWorkloadsRouteActive] = createSignal(false)',- );- expect(workloadsWorkloadRouteStateSource).not.toContain(- 'const workloadNodeOptions = createMemo',- );- expect(workloadsWorkloadRouteStateSource).not.toContain(- 'const containerRuntimeFilterConfig = createMemo',- );- expect(workloadsWorkloadRouteStateSource).toContain("from './workloadRouteStateModel'");- expect(workloadsWorkloadRouteStateSource).toContain(- 'resolveWorkloadsWorkloadNodeSelection({',- );- expect(workloadsWorkloadRouteStateSource).toContain('WORKLOADS_WORKLOAD_ROUTE_RESET_STATE');- expect(workloadsWorkloadRouteStateSource).toContain('isWorkloadsRoute,');- expect(workloadsWorkloadFilterOptionsSource).toContain("from './workloadFilterConfigModel'");- expect(workloadsWorkloadFilterOptionsSource).toMatch(- /const workloadNodeOptions = createMemo\(\(\) =>\s*buildWorkloadNodeOptions\(\s*platformScopedGuests\(\),/,- );- expect(workloadsWorkloadFilterOptionsSource).not.toContain(- 'const onContextChange = (value: string) =>',- );- expect(workloadsWorkloadFilterOptionsSource).toContain(- 'buildWorkloadsContainerRuntimeFilterConfig({',- );- expect(workloadsWorkloadFilterOptionsSource).toContain('buildWorkloadsHostFilterConfig({');- expect(workloadsWorkloadFilterOptionsSource).toContain(- 'buildWorkloadsNamespaceFilterConfig({',- );- expect(workloadFilterConfigModelSource).toContain(- 'export const buildWorkloadsContainerRuntimeFilterConfig',- );- expect(workloadFilterConfigModelSource).toContain(- 'export const buildWorkloadsHostFilterConfig',- );- expect(workloadFilterConfigModelSource).toContain(- "WORKLOADS_KUBERNETES_CONTEXT_FILTER_LABEL = 'K8s cluster'",- );- expect(workloadFilterConfigModelSource).toContain("getAllFilterOptionLabel('K8s clusters')");- expect(workloadFilterConfigModelSource).toContain('WORKLOAD_TYPE_OPTIONS');- expect(workloadFilterConfigModelSource).toContain(- 'export const buildWorkloadsNamespaceFilterConfig',- );- expect(workloadRouteModelSource).toContain('export const deserializeWorkloadViewMode');- expect(workloadRouteModelSource).toContain("normalizeWorkloadViewModeParam(raw) ?? 'all'");- expect(workloadRouteModelSource).not.toContain(- 'export const buildWorkloadsContainerRuntimeFilterConfig',- );- expect(workloadRouteModelSource).not.toContain('export const buildWorkloadsHostFilterConfig');- expect(workloadRouteModelSource).not.toContain(- 'export const buildWorkloadsNamespaceFilterConfig',- );- expect(workloadRouteStateModelSource).toContain(- 'export const WORKLOADS_WORKLOAD_ROUTE_RESET_STATE',- );- expect(workloadRouteStateModelSource).toContain(- 'export const resolveWorkloadsWorkloadNodeSelection',- );- expect(workloadRouteStateModelSource).toContain(- 'export const deserializeWorkloadsContainerRuntime',- );- expect(workloadsWorkloadUrlSyncSource).not.toContain('buildWorkloadsPath({');- expect(workloadsWorkloadUrlSyncSource).not.toContain('normalizeWorkloadViewModeParam');- expect(workloadsWorkloadUrlSyncSource).not.toContain('parseWorkloadsLinkSearch');- expect(workloadsWorkloadUrlSyncSource).toContain("from './workloadRouteModel'");- expect(workloadsWorkloadUrlSyncSource).toContain("from './workloadUrlSyncModel'");- expect(workloadsWorkloadUrlSyncSource).toContain(- 'const [handledTypeParam, setHandledTypeParam]',- );- expect(workloadsWorkloadUrlSyncSource).toContain(- 'if (normalized === handledPlatformParam()) return;',- );- expect(workloadsWorkloadUrlSyncSource).toContain(- 'const currentSelected = untrack(() => options.selectedPlatform());',- );- expect(workloadsWorkloadUrlSyncSource).toContain('parseWorkloadsWorkloadUrlParams');- expect(workloadsWorkloadUrlSyncSource).toContain(- 'resolveWorkloadsManagedWorkloadsNavigateTarget({',- );- expect(workloadUrlSyncModelSource).toContain('parseWorkloadsLinkSearch(search)');- expect(workloadUrlSyncModelSource).toContain('buildWorkloadsRouteSearch({');- expect(workloadUrlSyncModelSource).toContain(- 'resolveWorkloadsManagedWorkloadsNavigateTarget',- );- expect(workloadUrlSyncModelSource).toContain('resolveWorkloadsWorkloadRuntimeParam');- expect(workloadUrlSyncModelSource).toContain('normalizeWorkloadViewModeParam(params.type)');- expect(workloadsControlsStateSource).toContain('useBreakpoint');- expect(workloadsControlsStateSource).toContain('useColumnVisibility');- expect(workloadsControlsStateSource).toContain('usePersistentSignal');- expect(workloadsControlsStateSource).toContain('WORKLOADS_METRIC_HISTORY_RANGE');- expect(workloadsControlsStateSource).toContain('blurFocusedTypeToSearch');- expect(workloadsControlsStateSource).toContain('DEFAULT_WORKLOADS_SORT_KEY');- expect(workloadsWorkloadDerivedStateSource).toContain('groupWorkloads(');- expect(workloadsWorkloadDerivedStateSource).toContain('computeWorkloadStats(');- expect(workloadsWorkloadDerivedStateSource).toContain('computeWorkloadIOEmphasis(');- expect(workloadsWorkloadDerivedStateSource).toContain("from './workloadTopology'");- expect(workloadsWorkloadDerivedStateSource).toContain('buildNodeByInstance(');- expect(workloadsWorkloadDerivedStateSource).toContain('buildGuestParentNodeMap(');- expect(workloadsWorkloadDerivedStateSource).toContain('useGroupedTableWindowing');- expect(workloadsWorkloadDerivedStateSource).toContain('useWorkloadViewportSync');- expect(workloadsWorkloadDerivedStateSource).not.toContain('window.addEventListener');- expect(workloadsWorkloadDerivedStateSource).not.toContain('getBoundingClientRect');- expect(workloadsWorkloadViewportSyncSource).toContain('bindWindowedPageScrollEvents');- expect(workloadsWorkloadViewportSyncSource).toContain('getBoundingClientRect');- expect(workloadsWorkloadViewportSyncSource).toContain('groupedWindowing.onScroll');- expect(workloadsWorkloadRouteStateSource).not.toContain("from './workloadTopology'");- expect(workloadRouteModelSource).toContain("from './workloadTopology'");- expect(workloadRouteModelSource).toContain('workloadHostScopeId');- expect(workloadRouteModelSource).toContain('getKubernetesContextKey');- expect(workloadsSelectionStateSource).toContain(- 'const [selectedGuestId, setSelectedGuestIdRaw]',- );- expect(workloadsSelectionStateSource).toContain(- 'const [hoveredWorkloadId, setHoveredWorkloadId]',- );- expect(workloadsSelectionStateSource).toContain("from './workloadSelectionModel'");- expect(workloadsSelectionStateSource).not.toContain('useNavigate');- expect(workloadsSelectionStateSource).not.toContain('createRouteStateNavigateScheduler');- expect(workloadsSelectionStateSource).not.toContain(- 'resolveWorkloadsSelectionNavigateTarget',- );- expect(workloadsSelectionStateSource).not.toContain('parseWorkloadsLinkSearch');- expect(workloadSelectionModelSource).toContain('parseWorkloadsLinkSearch(search)');- expect(workloadSelectionModelSource).toContain('getCanonicalWorkloadId');- expect(workloadSelectionModelSource).toContain('resolveWorkloadResourceSelection');- expect(workloadSelectionModelSource).not.toContain('resolveWorkloadsSelectionNavigateTarget');- expect(workloadSelectionModelSource).toContain('workloadsHasHoveredWorkload');- expect(groupedTableWindowingSource).toContain('DEFAULT_WINDOW_SIZE');- expect(groupedTableWindowingSource).toContain('DEFAULT_ENABLE_THRESHOLD');- expect(groupedTableWindowingSource).toContain('targetRunway');- expect(groupedTableWindowingSource).toContain('getVisibleSlice');- expect(groupedTableWindowingSource).toContain('onScroll');- expect(groupedTableWindowingSource).toContain('revealIndex');- expect(workloadsStateSource).not.toContain('const DEFAULT_WINDOW_SIZE =');- expect(workloadsStateSource).not.toContain('const DEFAULT_ENABLE_THRESHOLD =');- expect(workloadsStateSource).not.toContain('targetRunway');- expect(workloadsSource).not.toContain('createMemo(() => getCanonicalWorkloadId(guest()))');- expect(workloadPanelSource).toContain('groupGuests().map(getCanonicalWorkloadId)');- expect(workloadPanelSource).toContain('groupGuestById().get(keyedGuestId)');- expect(workloadPanelSource).toContain('data-summary-group-id');- expect(workloadPanelSource).not.toContain('setHoveredWorkloadGroupScope');- expect(workloadPanelSource).toContain('getGroupedTableRowCellClass');- expect(workloadPanelSource).toContain('class={getGroupedTableRowClass()}');- expect(workloadPanelSource).not.toContain('getInteractiveGroupedTableRowClass');- expect(workloadPanelSource).not.toContain('cursor-pointer bg-surface-alt');- expect(workloadsWorkloadTableSource).not.toContain(- 'createMemo(() => getCanonicalWorkloadId(guest()))',- );- expect(workloadsStateSource).not.toContain('const guestId = () => {');- });-- it('keeps workloads filter state in canonical workloads filter owners', () => {- // WorkloadsFilter migrated to FilterBar — the filter component now- // composes the chip catalog directly and reads useBreakpoint locally,- // so the legacy useWorkloadsFilterState hook is no longer in the- // render path. Defaults/derivations stay in workloadsFilterModel.- expect(workloadsFilterSource).toContain('FilterBar');- expect(workloadsFilterSource).toContain('useBreakpoint');- expect(workloadsFilterSource).toContain('hasActiveWorkloadsFilters');- expect(workloadsFilterSource).toContain('DEFAULT_WORKLOADS_SORT_KEY');- expect(workloadsSource).not.toContain('SummaryScopeBar');- expect(workloadsSource).not.toContain('searchTrailing={pinnedScopeFallback()}');- expect(workloadsSource).not.toContain('mobileTrailing={pinnedScopeFallback()}');- expect(workloadsSource).toContain('setClearSurfaceRootRef');- expect(workloadsSource).toContain('setTableRootRef={state.setTableRootRef}');- expect(workloadsSource).toContain('data-testid="workloads-interaction-surface"');- for (const pageSource of [proxmoxPageSurfaceSource, vmwarePageSurfaceSource]) {- expect(pageSource).toContain(- 'onClearPinnedSelection={workloadsState.clearPinnedSummaryScope}',- );- }- expect(workloadsWorkloadTableSource).toContain('data-summary-clear-surface');- expect(workloadsWorkloadTableSource).toContain('data-testid="workloads-table-surface"');- expect(workloadsWorkloadTableSource).toContain('TableCard');- expect(workloadsWorkloadTableSource).toContain(- '<TableCardHeader title={props.title} actions={props.actions} />',- );- expect(workloadsSource).toContain('<WorkloadWebLinksAction');- expect(workloadsSource).toContain('guests: state.filteredGuests,');- expect(workloadsSource).toContain("kind: 'workloads',");- expect(workloadPanelSource).toContain(- 'getWorkloadGuestMetadataRecord(guest(), props.guestMetadata())',- );- // The bulk link panel and its row model load on first open, outside the- // WorkloadsSurface chunk, and only mount while the editor is open.+ // Bundle shape, not behaviour: nothing in jsdom notices a lazy chunk turning+ // eager, so these stay as source guards on the entry files.+ it('keeps the web-links dialog, physical disks and drawer history charts in lazy chunks', () => {expect(workloadWebLinksActionSource).toContain("lazy(() => import('./WorkloadWebLinksDialog'))",);expect(workloadWebLinksActionSource).toContain('<Show when={open()}>');- // Type-only imports are erased, so the row model stays in the lazy chunk.expect(workloadWebLinksActionSource).not.toMatch(/^import (?!type )[^;]*from '\.\/(workloadWebLinksModel|useWorkloadWebLinksState)';/m,);- expect(workloadWebLinksStateSource).toContain('keepStableWorkloadWebLinkRows(');- expect(workloadsSource).toContain('<TableCardHeader title={props.tableTitle} />');- expect(workloadsSource).toContain('title={props.tableTitle}');- expect(workloadsWorkloadTableSource).toContain(- 'workloadMemoryDisplayBasis={props.workloadMemoryDisplayBasis}',- );- expect(workloadsFilterSource).toContain('MetricDisplayModeSegmentedControl');- expect(workloadsFilterSource).toContain('MetricHoverModeSegmentedControl');- expect(workloadsFilterSource).toContain('Row hover');- expect(workloadsFilterSource).toContain('viewOptions={');- expect(workloadsFilterSource).not.toContain('ViewOptionsMenu');- expect(workloadsFilterSource).toContain('MetricHistoryRangeSegmentedControl');- expect(workloadsFilterSource).toContain('label="History"');- expect(workloadsFilterSource).toContain('<ColumnPicker');- expect(workloadsFilterSource).toContain('inline');- expect(workloadsFilterSource).toContain('showAddFilterLabel={false}');- expect(workloadsFilterSource).not.toContain('label="Memory %"');- expect(workloadsFilterSource).toContain('metricHistoryRange');- expect(metricDisplayModeSegmentedControlSource).toContain(- 'WORKLOAD_TABLE_HISTORY_RANGES.map',- );- expect(metricDisplayModeSegmentedControlSource).toContain('aria-label="Sparkline range"');- expect(metricDisplayModeSegmentedControlSource).toContain('aria-label="Row hover behavior"');- expect(metricDisplayModeSegmentedControlSource).toContain('justify-start');- expect(workloadTableHeaderSource).toContain('getWorkloadColumnHeaderLabel');- expect(workloadTableHeaderSource).toContain('`${defaultLabel} · Host`');- expect(workloadsFilterSource).toContain('pinnedSelectionActive');- expect(workloadsFilterSource).toContain('Clear selection');- expect(workloadsFilterSource).not.toContain('const [filtersOpen, setFiltersOpen] =');- expect(workloadsFilterSource).not.toContain("props.setSortKey('name')");- expect(workloadsFilterSource).toContain('searchTrailing={props.searchTrailing}');- // useWorkloadsFilterState hook retired in the cleanup commit; the- // canonical defaults / activity helpers now live in workloadsFilterModel.- expect(workloadsFilterModelSource).toContain('export const countActiveWorkloadsFilters');- expect(workloadsFilterModelSource).toContain('export const hasActiveWorkloadsFilters');- expect(workloadsFilterModelSource).toContain(- "DEFAULT_WORKLOADS_SORT_KEY: WorkloadsSortKey = 'type'",- );- expect(workloadsFilterModelSource).toContain('searchTrailing?: JSX.Element;');- expect(workloadsFilterModelSource).toContain('utilityActions?: JSX.Element;');- expect(workloadsFilterModelSource).toContain('mobileTrailing?: JSX.Element;');- expect(workloadsStateSource).toContain('useWorkloadRouteState');- expect(workloadsStateSource).toContain('range: workloadMetricHistoryRange');- // Grouped node rows render no metric cells, so Trends on the Workloads- // surface must not poll the infrastructure summary.- expect(workloadsStateSource).toContain("series: 'guests',");- expect(workloadTableMetricHistoryStateSource).toContain(- 'ChartsAPI.getWorkloadCharts(parsed.range, signal',- );- expect(workloadTableMetricHistoryStateSource).toContain(- 'ChartsAPI.getInfrastructureSummaryCharts(parsed.range, signal',- );- expect(workloadTableMetricHistoryStateSource).not.toContain('localStorage');- expect(workloadTableMetricHistoryStateSource).toContain(- "if (options.series !== 'guests' || !options.enabled()) return null;",- );- expect(workloadTableMetricHistoryStateSource).toContain(- "options.series === 'nodes' && options.enabled() ? buildHistoryScope(options.range()) : null",- );- expect(- workloadTableMetricHistoryStateSource.match(/retainPreviousValueOnSourceChange: false/g),- ).toHaveLength(2);- expect(workloadTableMetricHistoryStateSource).toContain('ChartsAPI.getMetricsHistory');- expect(workloadTableMetricHistoryStateSource).toContain('options.activeGuest?.()');- expect(workloadTableMetricHistoryStateSource).toContain('options.onDemand?.()');- expect(workloadTableMetricHistoryStateSource).toContain('ROW_HISTORY_PREFETCH_CONCURRENCY');- expect(workloadTableMetricHistoryStateSource).toContain('ROW_HISTORY_CACHE_MAX_ENTRIES');- expect(workloadTableMetricHistoryStateSource).toContain('pendingRowHistory.unshift');- expect(workloadTableMetricHistoryStateSource).toContain(- 'maxPoints: WORKLOAD_TABLE_HISTORY_MAX_POINTS',- );- expect(workloadsStateSource).toContain('filterWorkloads(params)');- expect(workloadsStateSource).not.toContain('const containerRuntimeFilterConfig = createMemo');- expect(workloadsStateSource).not.toContain('useGroupedTableWindowing');- expect(workloadsWorkloadRouteStateSource).toContain('useWorkloadUrlSync');- expect(workloadsWorkloadRouteStateSource).toContain('useWorkloadFilterOptions');- expect(workloadsWorkloadRouteStateSource).toContain('containerRuntimeFilterConfig');- expect(workloadsWorkloadRouteStateSource).toContain('hostFilterConfig');- expect(workloadsWorkloadRouteStateSource).toContain('namespaceFilterConfig');- expect(workloadsWorkloadDerivedStateSource).toContain('useGroupedTableWindowing');- expect(workloadsWorkloadDerivedStateSource).toContain('useWorkloadViewportSync');- });-- it('keeps threshold slider runtime and derivations in canonical slider owners', () => {- expect(thresholdSliderSource).toContain('useThresholdSliderState');- expect(thresholdSliderSource).not.toContain('const [thumbPosition, setThumbPosition] =');- expect(thresholdSliderSource).not.toContain('const handleMouseDown = () => {');- expect(thresholdSliderSource).not.toContain('formatTemperature(');- expect(thresholdSliderStateSource).toContain('window.addEventListener');- expect(thresholdSliderStateSource).toContain('document.addEventListener');- expect(thresholdSliderStateSource).toContain('onCleanup');- expect(thresholdSliderModelSource).toContain('export function getThresholdSliderPosition');- expect(thresholdSliderModelSource).toContain('export function getThresholdSliderTitle');- expect(thresholdSliderModelSource).toContain('export function getThresholdSliderLabel');- });-- it('keeps stacked disk bar runtime and derivations in canonical owners', () => {- expect(stackedDiskBarSource).toContain('useStackedDiskBarState');- expect(stackedDiskBarSource).toContain('metric-fill-geometry');- expect(stackedDiskBarSource).toContain('metric-fill-divider');- expect(stackedDiskBarSource).toContain('AnimatedNumber');- expect(stackedDiskBarModelSource).toContain('displayPercentValue');- expect(stackedDiskBarSource).not.toContain('style={{');- expect(stackedDiskBarSource).not.toContain('style={');- expect(stackedDiskBarSource).not.toContain('const [containerWidth, setContainerWidth] =');- expect(stackedDiskBarSource).not.toContain('const tooltipContent = createMemo(() => {');- expect(stackedDiskBarSource).not.toContain('const SEGMENT_COLORS =');- expect(stackedDiskBarStateSource).toContain('new ResizeObserver');- expect(stackedDiskBarStateSource).toContain('useTooltip');- expect(stackedDiskBarModelSource).toContain(- 'export function buildStackedDiskBarPresentation',- );- expect(stackedDiskBarModelSource).toContain('const SEGMENT_COLORS');- expect(stackedDiskBarModelSource).toContain('tooltipTitle');- });-- it('keeps stacked memory bar runtime and derivations in canonical owners', () => {- expect(stackedMemoryBarSource).toContain('useStackedMemoryBarState');- expect(stackedMemoryBarSource).toContain('metric-fill-geometry');- expect(stackedMemoryBarSource).toContain('metric-fill-divider');- expect(stackedMemoryBarSource).toContain('AnimatedNumber');- expect(stackedMemoryBarModelSource).toContain('displayPercentValue');- expect(stackedMemoryBarSource).not.toContain('style={{');- expect(stackedMemoryBarSource).not.toContain('style={');- expect(stackedMemoryBarSource).not.toContain('const [containerWidth, setContainerWidth] =');- expect(stackedMemoryBarSource).not.toContain('const segments = createMemo(() => {');- expect(stackedMemoryBarSource).not.toContain('const MEMORY_COLORS =');- expect(stackedMemoryBarStateSource).toContain('new ResizeObserver');- expect(stackedMemoryBarStateSource).toContain('useTooltip');- expect(stackedMemoryBarModelSource).toContain(- 'export function buildStackedMemoryBarPresentation',- );- expect(stackedMemoryBarModelSource).toContain('const MEMORY_COLORS');- expect(stackedMemoryBarModelSource).toContain('tooltipRows');- });-- it('keeps metric bar runtime and derivations in canonical owners', () => {- expect(metricBarSource).toContain('useMetricBarState');- expect(metricBarSource).toContain('AnimatedNumber');- expect(metricBarSource).not.toContain('const [containerWidth, setContainerWidth] =');- expect(metricBarSource).not.toContain('const progressColorClass = createMemo(() => {');- expect(metricBarSource).not.toContain('const showSublabel = createMemo(() => {');- expect(metricBarStateSource).toContain('new ResizeObserver');- expect(metricBarModelSource).toContain('export function buildMetricBarPresentation');- expect(metricBarModelSource).toContain('estimateTextWidth');- expect(metricBarModelSource).toContain('getMetricColorClass');- });-- it('keeps enhanced CPU bar runtime and derivations in canonical owners', () => {- expect(enhancedCpuBarSource).toContain('useEnhancedCPUBarState');- expect(enhancedCpuBarSource).toContain('metric-fill-geometry');- expect(enhancedCpuBarSource).toContain('AnimatedNumber');- expect(enhancedCpuBarSource).not.toContain('style={{');- expect(enhancedCpuBarSource).not.toContain('style={');- expect(enhancedCpuBarSource).not.toContain('const tip = useTooltip()');- expect(enhancedCpuBarSource).not.toContain('const barColor = createMemo(() =>');- expect(enhancedCpuBarSource).not.toContain('const anomalyRatio = createMemo(() =>');- expect(enhancedCpuBarStateSource).toContain('useTooltip');- expect(enhancedCpuBarModelSource).toContain(- 'export function buildEnhancedCPUBarPresentation',- );- expect(enhancedCpuBarModelSource).toContain('getMetricColorClass');- expect(enhancedCpuBarModelSource).toContain('tooltipUsageClass');- });-- it('keeps guest row contract and hot-path state in canonical row owners', () => {- expect(guestRowSource).toContain('useGuestRowState');- expect(guestRowSource).toContain("from './GuestRowCells'");- expect(guestRowSource).not.toContain('style={{');- expect(guestRowSource).toContain('style={getGuestColumnStyle(');- expect(guestRowSource).toContain('props.workloadTableLayoutMode');- expect(guestRowSource).toContain('props.visibleColumnIds');- expect(guestRowSource).toContain('ResourceNameWithWebInterfaceLink');- expect(guestRowSource).not.toContain('target="_blank"');- expect(guestRowSource).not.toContain('data-workload-col="link"');- expect(guestRowSource).not.toContain('Open related infrastructure');- expect(guestRowSource).not.toContain('export const GUEST_COLUMNS');- expect(guestRowSource).not.toContain('const guestId = createMemo(');- expect(guestRowSource).not.toContain('function NetworkInfoCell(');- expect(guestRowSource).not.toContain('function OSInfoCell(');- expect(guestRowSource).not.toContain('function BackupStatusCell(');- expect(guestRowSource).toContain('thresholds={cpuThresholds()}');- expect(guestRowSource).toContain('thresholds={memoryThresholds()}');- expect(guestRowSource).toContain('thresholds={diskThresholds()}');- expect(guestRowStateSource).toContain('getWorkloadAlertThresholdScope');- expect(guestRowStateSource).toContain('getMetricThresholds');- expect(guestRowModelSource).toContain('export const GUEST_COLUMNS');- expect(guestRowModelSource).toContain('export const VIEW_MODE_COLUMNS');- expect(guestRowStateSource).toContain('getCanonicalWorkloadId');- expect(guestRowStateSource).toContain('buildMetricKey');- // The legacy /infrastructure cross-jump was retired; guest row state no- // longer needs anything from resourceLinks.- expect(guestRowStateSource).not.toContain("from '@/routing/resourceLinks'");- expect(guestRowStateSource).toContain("from './workloadTopology'");- expect(guestRowStateSource).not.toContain('./infrastructureLink');- expect(guestRowModelSource).not.toContain("id: 'link'");- expect(guestRowModelSource).not.toContain("'link'");- expect(guestRowStateSource).not.toContain('rowStyle');- expect(guestRowStateSource).not.toContain('box-shadow');- expect(guestRowStateSource).toContain('getWorkloadTypeBadge');- // Wrapping-tolerant: prettier may break the export list across lines.- expect(guestRowCellsSource).toMatch(/export \{[^}]*\bAvailabilityProbeCell\b/);- expect(guestRowCellsSource).toContain('function NetworkInfoCell(');- expect(guestRowCellsSource).toContain('function OSInfoCell(');- expect(guestRowCellsSource).toContain('useTooltip');- });-- it('keeps guest drawer runtime and derivations in canonical drawer owners', () => {- expect(guestDrawerSource).toContain('useGuestDrawerState');- expect(guestDrawerSource).toContain('GuestDrawerOverview');- // The charts live on Overview; there is no History tab to carry a picker.- expect(guestDrawerSource).not.toContain('GuestDrawerHistoryRangeSelect');- expect(guestDrawerSource).not.toContain("label: 'History'");- expect(guestDrawerSource).toContain('ObjectDrawerHeader');- expect(guestDrawerSource).not.toContain('Open related infrastructure');- expect(guestDrawerHistorySource).toContain('data-testid="guest-history-hover-time"');- expect(guestDrawerHistorySource).toContain('data-testid="guest-history-range-control"');- expect(guestDrawerHistorySource).toContain('h-7 min-h-11 py-0 text-[11px] sm:min-h-0');- expect(guestDrawerHistorySource).toContain('onPointerMove={handleHoverMove}');- expect(guestDrawerHistorySource).toContain('currentMetrics');- expect(guestDrawerHistorySource).not.toContain('buildFallbackHistoryPoints');- expect(guestDrawerHistorySource).toContain('props.groups ?? GUEST_DRAWER_HISTORY_GROUPS');- expect(guestDrawerHistorySource).toContain('flex min-h-[154px] flex-col');- expect(guestDrawerHistorySource).toContain('relative min-h-24 flex-1');- expect(guestDrawerHistorySource).not.toContain('relative h-24');- expect(nodeDrawerSource).toContain('NodeDrawerOverview');- expect(nodeDrawerSource).not.toContain('GuestDrawerHistoryRangeSelect');- expect(nodeDrawerSource).not.toContain("label: 'History'");- expect(nodeDrawerSource).toContain('getNodeDrawerHistoryGroups');- expect(nodeDrawerOverviewSource).toContain('Hardware');- expect(nodeDrawerOverviewSource).toContain('Telemetry');- expect(nodeDrawerOverviewSource).toContain('Thermals');- expect(nodeDrawerModelSource).toContain('HOST_METRICS_HISTORY_GROUPS');- expect(nodeDrawerModelSource).toContain("group.id !== 'disk-io'");- expect(nodeDrawerModelSource).not.toContain("id: 'thermals'");- expect(workloadPanelSource).not.toContain('NodeDrawer');- expect(workloadPanelSource).not.toContain('data-inline-node-detail-for');- expect(workloadPanelSource).toContain('data-inline-detail-for={guestId()}');- expect(workloadPanelSource).toContain('onClose={() => props.setSelectedGuestId(null)}');- expect(guestDrawerSource).not.toContain('const guestId = () =>');- expect(guestDrawerSource).not.toContain('const infrastructureHref = () =>');- expect(guestDrawerSource).not.toContain('Filesystems');- expect(guestDrawerSource).not.toContain('WebInterfaceUrlField');- expect(guestDrawerStateSource).toContain('getCanonicalWorkloadId');- expect(guestDrawerStateSource).toContain('historyRange');- expect(guestDrawerStateSource).not.toContain('buildInfrastructureHrefForWorkload');- expect(guestDrawerStateSource).not.toContain("from '@/routing/resourceLinks'");- expect(guestDrawerStateSource).not.toContain('createResource');- expect(guestDrawerStateSource).toContain("from './workloadTopology'");- expect(guestDrawerStateSource).not.toContain('./infrastructureLink');- expect(guestDrawerStateSource).toContain('getWebInterfaceTargetLabelForWorkload');- expect(guestDrawerStateSource).toContain('guestOsSummary');- expect(guestDrawerModelSource).toContain('export const getGuestDrawerBackupPresentation');- expect(guestDrawerModelSource).toContain('export const normalizeGuestDrawerTags');- expect(guestDrawerOverviewSource).not.toContain('WebInterfaceUrlField');- expect(guestDrawerManageSource).toContain('WebInterfaceUrlField');- expect(guestDrawerManageSource).toContain('ResourceOperatorStateSection');- expect(guestDrawerOverviewSource).toContain('buildWorkloadsDiskPresentation');- expect(guestDrawerOverviewSource).toContain('Filesystems');- // Linked physical disks load with an open agent guest's drawer, so the- // disk presentation module stays out of the WorkloadsSurface chunk.expect(guestDrawerOverviewSource).toContain("import('./GuestPhysicalDisks')");expect(guestDrawerOverviewSource).not.toMatch(/^import (?!type )[^;]*from '\.\/GuestPhysicalDisks';/m,);- // Filesystems render as their own section in front of the collapsed- // Details, so mount points never share a card row with short sections.- // Tags render as facts-strip chips, not as a detail section.- const filesystemsSectionIndex = guestDrawerOverviewSource.indexOf("label: 'Filesystems'");- expect(filesystemsSectionIndex).toBeGreaterThan(-1);- expect(guestDrawerOverviewSource).not.toContain("label: 'Tags'");- expect(guestDrawerOverviewSource).toContain('dataTestId="guest-drawer-filesystems"');- // The Overview charts load with an open drawer, outside the table chunk.expect(guestDrawerOverviewSource).toContain("import('./GuestDrawerHistory')");expect(guestDrawerOverviewSource).not.toMatch(/^import (?!type )[^;]*from '\.\/GuestDrawerHistory';/m,@@ -1743,107 +1112,6 @@ describe('Workloads performance contract', () => {expect(nodeDrawerOverviewSource).not.toMatch(/^import (?!type )[^;]*from '\.\/GuestDrawerHistory';/m,);- // Filesystem rows delegate full-path presentation to the shared renderer.- const filesystemSectionSource = guestDrawerOverviewSource.slice(- filesystemsSectionIndex,- guestDrawerOverviewSource.indexOf('label:', filesystemsSectionIndex + 1),- );- expect(filesystemSectionSource).toContain("layout: 'stacked'");- expect(filesystemSectionSource).toContain('wrap: true');- // Both filesystem paths and their longer freshness explanation need- // the card's full width. Do not couple that layout to a global count.- expect(guestDrawerOverviewSource).toContain(- "makeDetailRow('Status', diskStatusMessage, { layout: 'stacked', wrap: true })",- );-- expect(guestDrawerOverviewSource).toContain('TechnicalDetailsSection');- expect(nodeDrawerOverviewSource).toContain('TechnicalDetailsSection');- const retiredInfoCardFrameClass = [- 'rounded-sm border border-border',- 'bg-surface p-3 shadow-xs',- ].join(' ');- expect(guestDrawerOverviewSource).not.toContain(retiredInfoCardFrameClass);- expect(nodeDrawerOverviewSource).not.toContain(retiredInfoCardFrameClass);- expect(workloadTopologySource).toContain('export const workloadNodeScopeId');- expect(workloadTopologySource).toContain('export const getKubernetesContextKey');- expect(workloadTopologySource).toContain('export const getWorkloadDockerHostId');- expect(workloadTopologySource).toContain('export const buildNodeByInstance');- expect(workloadTopologySource).toContain('export const buildGuestParentNodeMap');- });-- it('keeps workloads shell rendering in canonical section owners', () => {- expect(workloadsSource).toContain('WorkloadsTable');- expect(workloadsSource).not.toContain('TableHeader');- expect(workloadsSource).not.toContain('NodeGroupHeader');- expect(workloadsWorkloadTableSource).toContain('WorkloadTableHeader');- expect(workloadsWorkloadTableSource).toContain('WorkloadPanel');- expect(workloadsWorkloadTableSource).not.toContain('style={{');- expect(workloadsWorkloadTableSource).toContain('style={getGuestColumnWidthStyle(');- expect(workloadsWorkloadTableSource).toContain(- "WORKLOAD_TABLE_MOBILE_MIN_WIDTH_CLASS = 'min-w-0'",- );- expect(workloadsWorkloadTableSource).toContain('workload-table--mobile');- expect(workloadsWorkloadTableSource).toContain('WORKLOAD_TABLE_MOBILE_MIN_WIDTH_CLASS');- expect(workloadsWorkloadTableSource).toContain('props.workloadTableLayoutMode()');- expect(workloadsWorkloadTableSource).toContain('props.workloadTableVisibleColumnIds()');- expect(workloadsWorkloadTableSource).toContain('workload-table--manual-widths');- expect(workloadsWorkloadTableSource).toContain('props.workloadTableManualWidth()');- expect(workloadsWorkloadTableSource).toContain('<colgroup>');- expect(workloadsWorkloadTableSource).not.toContain('<TableHead');- expect(workloadsWorkloadTableSource).not.toContain('NodeGroupHeader');- expect(workloadsWorkloadTableSource).not.toMatch(/from\s+['"]\.\/GuestDrawer['"]/);- expect(workloadTableHeaderSource).toContain('TableHead');- expect(workloadTableHeaderSource).toContain('col.sortKey as WorkloadSortKey');- expect(workloadTableHeaderSource).toContain('getTableSortIndicator');- expect(guestRowModelSource).toContain(- "id: 'info', label: 'Info', width: '100px', sortKey: 'info'",- );- expect(workloadSelectorsSource).toContain("sortKey === 'info'");- expect(workloadSelectorsSource).toContain('getWorkloadInfoValue');- expect(workloadTableHeaderSource).toContain('style={getGuestColumnStyle(');- expect(workloadTableHeaderSource).toContain('props.workloadTableLayoutMode()');- expect(workloadTableHeaderSource).toContain('props.workloadTableVisibleColumnIds()');- expect(workloadTableHeaderSource).toContain('aria-hidden="true"');- expect(workloadTableHeaderSource).toContain('<span class="sr-only">{label()}</span>');- expect(workloadTableHeaderSource).toContain('data-workload-col-resizer={col.id}');- expect(workloadTableHeaderSource).toContain('event.currentTarget.setPointerCapture');- expect(workloadTableHeaderSource).toContain('onPointerCancel={onPointerCancel}');- expect(workloadColumnWidthsSource).toContain(- 'const MANUAL_SIZING_LAYOUT_MODES: ReadonlySet<WorkloadTableLayoutMode>',- );- expect(workloadColumnWidthsSource).toContain("'tablet'");- expect(workloadColumnWidthsSource).toContain("'compact'");- expect(workloadColumnWidthsSource).toContain("'wide'");- expect(workloadColumnWidthsSource).not.toContain("'phone'");- expect(workloadColumnWidthsSource).toContain('sumWorkloadColumnWidths');- expect(workloadColumnLayoutUrlSource).toContain(- "export const WORKLOAD_COLUMNS_URL_PARAM = 'cols'",- );- expect(workloadColumnLayoutUrlSource).toContain('resolveWorkloadColumnLayoutEntries');- expect(workloadTableHeaderSource).not.toContain('style={{');- expect(workloadTableHeaderSource).not.toContain('NodeGroupHeader');- expect(workloadPanelSource).toContain('NodeGroupHeader');- expect(workloadPanelSource).toContain('GuestDrawer');- expect(workloadPanelSource).toContain('groupGuests().map(getCanonicalWorkloadId)');- expect(workloadPanelSource).not.toContain('createSummaryInteractiveRowPreviewHandlers');- expect(workloadPanelSource).not.toContain('resolveSummaryGroupMemberInteractionState');- expect(workloadPanelSource).toContain('getGroupedTableRowCellClass');- expect(workloadPanelSource).not.toContain('style={{');- expect(workloadPanelSource).not.toContain('style={');- expect(workloadPanelSource).not.toContain('kind="scope"');- expect(workloadPanelSource).not.toContain('leadingAction={');- expect(workloadsSelectionStateSource).not.toContain('WorkloadGroupScope');- expect(workloadsWorkloadTableSource).not.toContain('SummaryWorkloadGroupScope');- expect(workloadPanelSource).not.toContain('TableHead');- });-- it('keeps disk-list runtime and derivations in canonical disk-list owners', () => {- expect(diskListSource).toContain('useDiskListState');- expect(diskListSource).not.toContain('const getUsagePercent =');- expect(diskListSource).not.toContain('const getDiskStatusTooltip =');- expect(diskListStateSource).toContain('getWorkloadGuestDiskStatusMessage');- expect(diskListModelSource).toContain('export const buildWorkloadsDiskPresentation');- expect(diskListModelSource).toContain('export const getWorkloadsDiskUsagePercent');});it('filterWorkloads returns all guests when no filters active', () => {diff --git a/frontend-modern/src/components/Workloads/__tests__/useWorkloadTableMetricHistory.test.tsx b/frontend-modern/src/components/Workloads/__tests__/useWorkloadTableMetricHistory.test.tsxindex 9054596340..9aca2262cc 100644--- a/frontend-modern/src/components/Workloads/__tests__/useWorkloadTableMetricHistory.test.tsx+++ b/frontend-modern/src/components/Workloads/__tests__/useWorkloadTableMetricHistory.test.tsx@@ -175,6 +175,79 @@ describe('useWorkloadTableMetricHistory', () => {expect(setItemSpy).not.toHaveBeenCalled();});+ // A sparkline under a new History range must never keep drawing the old+ // range's data while the new range loads, for either estate summary.+ it.each([+ ['guests', 'getWorkloadCharts', 'guest=11 node=none', 'guest=12 node=none'],+ ['nodes', 'getInfrastructureSummaryCharts', 'guest=none node=22', 'guest=none node=23'],+ ] as const)(+ 'clears the old range from the %s summary while the new range is pending',+ async (series, route, oneHourValues, twelveHourValues) => {+ const [range, setRange] = createSignal<WorkloadTableMetricHistoryRange>('1h');+ let release12h!: () => void;+ const pending12h = new Promise<void>((resolve) => {+ release12h = resolve;+ });+ const bump = (requested: string | undefined) => (requested === '12h' ? 1 : 0);+ const workloadSpy = vi+ .spyOn(ChartsAPI, 'getWorkloadCharts')+ .mockImplementation(async (requested) => {+ if (requested === '12h') await pending12h;+ return {+ data: { [guest.id]: { cpu: point(11 + bump(requested)) } },+ dockerData: {},+ guestTypes: {},+ timestamp: 2,+ stats: { oldestDataTimestamp: 1 },+ };+ });+ const infrastructureSpy = vi+ .spyOn(ChartsAPI, 'getInfrastructureSummaryCharts')+ .mockImplementation(async (requested) => {+ if (requested === '12h') await pending12h;+ return {+ nodeData: { [node.id]: { cpu: point(22 + bump(requested)) } },+ timestamp: 2,+ stats: { oldestDataTimestamp: 1 },+ };+ });+ const spy = route === 'getWorkloadCharts' ? workloadSpy : infrastructureSpy;++ function RangedSeriesProbe() {+ const reader = useWorkloadTableMetricHistory({+ enabled: () => true,+ range,+ series,+ });+ const latest = (values: ReturnType<typeof reader.getGuestMetricSeries>) =>+ values[0]?.points.at(-1)?.value ?? 'none';+ return (+ <div data-testid="series-values">+ {`guest=${latest(reader.getGuestMetricSeries(guest, 'cpu'))} node=${latest(+ reader.getNodeMetricSeries(node, 'cpu'),+ )}`}+ </div>+ );+ }++ render(() => <RangedSeriesProbe />);+ await waitFor(() => {+ expect(screen.getByTestId('series-values')).toHaveTextContent(oneHourValues);+ });++ setRange('12h');+ await waitFor(() => {+ expect(spy).toHaveBeenCalledWith('12h', expect.any(AbortSignal), expect.anything());+ });+ expect(screen.getByTestId('series-values')).toHaveTextContent('guest=none node=none');++ release12h();+ await waitFor(() => {+ expect(screen.getByTestId('series-values')).toHaveTextContent(twelveHourValues);+ });+ },+ );+it('bounds slow-estate warming and prioritizes a distant active guest', async () => {const guests = Array.from({ length: 500 }, (_, index) => ({...guest,diff --git a/frontend-modern/src/components/Workloads/__tests__/useWorkloadsControlsState.test.ts b/frontend-modern/src/components/Workloads/__tests__/useWorkloadsControlsState.test.tsindex 79737aa220..ab1092e438 100644--- a/frontend-modern/src/components/Workloads/__tests__/useWorkloadsControlsState.test.ts+++ b/frontend-modern/src/components/Workloads/__tests__/useWorkloadsControlsState.test.ts@@ -71,6 +71,42 @@ describe('useWorkloadsControlsState', () => {}});+ // Platform pages show several workload tables under one toggle, so the page owns+ // the choice: the table follows it and reports changes instead of saving its own.+ it('follows the page-owned display mode and history range and reports changes to the page', () => {+ const [mode, setMode] = createSignal<'bars' | 'sparklines'>('sparklines');+ const [range] = createSignal<'1h' | '12h' | '24h' | '7d'>('24h');+ const onMode = vi.fn();+ const onRange = vi.fn();++ createRoot((dispose) => {+ const [showFilters, setShowFilters] = createSignal(false);+ const state = useWorkloadsControlsState({+ viewMode: () => 'all' as ViewMode,+ showFilters,+ setShowFilters,+ metricDisplayMode: mode,+ onMetricDisplayModeChange: onMode,+ metricHistoryRange: range,+ onMetricHistoryRangeChange: onRange,+ });++ expect(state.workloadMetricDisplayMode()).toBe('sparklines');+ expect(state.workloadMetricHistoryRange()).toBe('24h');+ setMode('bars');+ expect(state.workloadMetricDisplayMode()).toBe('bars');++ state.setWorkloadMetricDisplayMode('sparklines');+ state.setWorkloadMetricHistoryRange('7d');+ expect(onMode).toHaveBeenCalledWith('sparklines');+ expect(onRange).toHaveBeenCalledWith('7d');+ // The page has not applied either change, so the table must not have either.+ expect(state.workloadMetricDisplayMode()).toBe('bars');+ expect(state.workloadMetricHistoryRange()).toBe('24h');+ dispose();+ });+ });+it('only offers columns the compact table can present without horizontal scrolling', () => {setCompactViewport();createRoot((dispose) => {diff --git a/frontend-modern/src/components/__tests__/CommercialMigrationBanner.test.tsx b/frontend-modern/src/components/__tests__/CommercialMigrationBanner.test.tsxindex ec89a44daf..0f2cc58602 100644--- a/frontend-modern/src/components/__tests__/CommercialMigrationBanner.test.tsx+++ b/frontend-modern/src/components/__tests__/CommercialMigrationBanner.test.tsx@@ -1,7 +1,6 @@import { cleanup, fireEvent, render, screen, waitFor } from '@solidjs/testing-library';import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';import type { CommercialMigrationStatus } from '@/api/license';-import commercialMigrationBannerSource from '@/components/CommercialMigrationBanner.tsx?raw';/* ------------------------------------------------------------------ *//* Mocks */@@ -63,26 +62,6 @@ describe('CommercialMigrationBanner', () => {afterEach(cleanup);- it('keeps commercial migration notice chrome on shared primitives', () => {- expect(commercialMigrationBannerSource).toContain('InlineNotice');- expect(commercialMigrationBannerSource).toContain('layout="banner"');- expect(commercialMigrationBannerSource).toContain('lucide-solid/icons/alert-triangle');- expect(commercialMigrationBannerSource).toContain('actionOnClick');- expect(commercialMigrationBannerSource).not.toContain('<svg');- expect(commercialMigrationBannerSource).not.toContain('<button');- expect(commercialMigrationBannerSource).not.toContain('toneClasses');- expect(commercialMigrationBannerSource).not.toContain('buttonClasses');- expect(commercialMigrationBannerSource).not.toContain(- 'bg-amber-50 dark:bg-amber-900/25 border-b border-amber-200',- );- expect(commercialMigrationBannerSource).not.toContain(- 'bg-red-50 dark:bg-red-900/25 border-b border-red-200',- );- expect(commercialMigrationBannerSource).not.toContain(- 'p-1 rounded-sm transition-colors opacity-70 hover:opacity-100',- );- });-/* ---------- Visibility ---------- */it('stays hidden when there is no migration state', async () => {diff --git a/frontend-modern/src/components/__tests__/DemoBanner.test.tsx b/frontend-modern/src/components/__tests__/DemoBanner.test.tsxindex 4f34b9a4b9..b80e4b8174 100644--- a/frontend-modern/src/components/__tests__/DemoBanner.test.tsx+++ b/frontend-modern/src/components/__tests__/DemoBanner.test.tsx@@ -1,6 +1,5 @@import { cleanup, fireEvent, render, screen, waitFor } from '@solidjs/testing-library';import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';-import demoBannerSource from '@/components/DemoBanner.tsx?raw';/* ------------------------------------------------------------------ *//* Mocks */@@ -34,19 +33,6 @@ describe('DemoBanner', () => {render(() => <DemoBanner />);}- it('keeps demo notice chrome on shared InlineNotice primitives', () => {- expect(demoBannerSource).toContain('InlineNotice');- expect(demoBannerSource).toContain('layout="banner"');- expect(demoBannerSource).toContain('lucide-solid/icons/info');- expect(demoBannerSource).not.toContain('<svg');- expect(demoBannerSource).not.toContain(- 'bg-blue-50 dark:bg-blue-900/25 border-b border-blue-200 dark:border-blue-800',- );- expect(demoBannerSource).not.toContain(- 'p-1 hover:bg-blue-100 dark:hover:bg-blue-800 rounded-sm text-blue-600',- );- });-/* ---------- Visibility ---------- */it('shows the banner when demo mode is enabled', async () => {diff --git a/frontend-modern/src/components/__tests__/ErrorBoundary.test.tsx b/frontend-modern/src/components/__tests__/ErrorBoundary.test.tsxindex e8d3a68ece..3221820ef4 100644--- a/frontend-modern/src/components/__tests__/ErrorBoundary.test.tsx+++ b/frontend-modern/src/components/__tests__/ErrorBoundary.test.tsx@@ -1,7 +1,6 @@import { cleanup, fireEvent, render, screen } from '@solidjs/testing-library';import type { JSX } from 'solid-js';import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';-import errorBoundarySource from '@/components/ErrorBoundary.tsx?raw';/* ------------------------------------------------------------------ *//* Mocks */@@ -91,17 +90,6 @@ describe('ErrorBoundary', () => {expect(screen.getByText(/Technical details are suppressed/)).toBeInTheDocument();});- it('keeps fallback chrome on shared primitives', () => {- expect(errorBoundarySource).toContain('CalloutCard');- expect(errorBoundarySource).toContain("import { Button } from '@/components/shared/Button';");- expect(errorBoundarySource).toContain('lucide-solid/icons/alert-triangle');- expect(errorBoundarySource).not.toContain('<svg');- expect(errorBoundarySource).not.toContain(- 'px-4 py-2 bg-blue-600 text-white rounded-sm hover:bg-blue-700',- );- expect(errorBoundarySource).not.toContain('bg-red-50 dark:bg-red-900/25 border border-red-200');- });-/* ---------- Logs error via logError ---------- */it('calls logError exactly once when a child throws', async () => {diff --git a/frontend-modern/src/components/__tests__/GitHubStarBanner.test.tsx b/frontend-modern/src/components/__tests__/GitHubStarBanner.test.tsxindex 49352309df..220194a5fd 100644--- a/frontend-modern/src/components/__tests__/GitHubStarBanner.test.tsx+++ b/frontend-modern/src/components/__tests__/GitHubStarBanner.test.tsx@@ -24,10 +24,6 @@ const PROMPT_SHOWN_KEY = 'pulse-github-star-prompt-shown';const ACTIVE_DAYS_KEY = 'pulse-github-star-active-days';const LAST_ACTIVE_DATE_KEY = 'pulse-github-star-last-active-date';const LOW_PRIORITY_NOTICE_OWNER_KEY = 'pulse-low-priority-notice-owner';-const LOCAL_DISMISS_BUTTON_CLASS =- 'inline-flex h-7 w-7 shrink-0 items-center justify-center rounded-md text-muted transition-colors hover:bg-surface-hover hover:text-base-content';-const LOCAL_PRIMARY_BUTTON_CLASS =- 'inline-flex min-h-9 items-center justify-center gap-2 rounded-md bg-blue-600 px-3 py-2 text-sm font-medium text-white transition-colors hover:bg-blue-700';async function renderBanner() {const mod = await import('../GitHubStarBanner');@@ -116,6 +112,11 @@ describe('GitHubStarBanner', () => {).toBeInTheDocument();expect(screen.getByText('Star on GitHub')).toBeInTheDocument();expect(screen.queryByText('Maybe later')).not.toBeInTheDocument();+ expect(screen.getByText('Enjoying Pulse?').closest('[aria-live]')).toHaveAttribute(+ 'aria-live',+ 'polite',+ );+ expect(screen.queryByRole('dialog')).not.toBeInTheDocument();expect(localStorage.getItem(ACTIVE_DAYS_KEY)).toBe('2');expect(localStorage.getItem(PROMPT_SHOWN_KEY)).toBe('true');});@@ -212,33 +213,10 @@ describe('GitHubStarBanner', () => {);expect(localStorage.getItem(DISMISSED_KEY)).toBe('true');});-- it('uses runtime state and remains a non-blocking app-shell prompt', () => {- expect(gitHubStarBannerSource).toContain('useWebSocket');- expect(gitHubStarBannerSource).toContain('initialDataReceived');- expect(gitHubStarBannerSource).not.toContain('useResources');- expect(gitHubStarBannerSource).not.toContain('<Dialog');- expect(gitHubStarBannerSource).toContain('dialogStackHasBlockingDialog');- expect(gitHubStarBannerSource).toContain('reserveLowPriorityNoticeSession');- expect(gitHubStarBannerSource).toContain('aria-live="polite"');- expect(gitHubStarBannerSource).toContain('z-30');- });-- it('routes prompt actions through shared Button primitives', () => {- expect(gitHubStarBannerSource).toContain('@/components/shared/Button');- expect(gitHubStarBannerSource).toContain('<ActionIconButton');- expect(gitHubStarBannerSource).toContain('<Button');- expect(gitHubStarBannerSource).not.toContain(LOCAL_DISMISS_BUTTON_CLASS);- expect(gitHubStarBannerSource).not.toContain(LOCAL_PRIMARY_BUTTON_CLASS);- });});describe('GitHubStarBanner mobile navigation clearance', () => {it('reads the published bottom navigation height', () => {expect(gitHubStarBannerSource).toContain('bottom-(--pulse-mobile-nav-height)');});-- it('does not keep its own copy of the bar height', () => {- expect(gitHubStarBannerSource).not.toMatch(/5rem\s*\+\s*env\(safe-area-inset-bottom/);- });});diff --git a/frontend-modern/src/components/__tests__/Login.test.tsx b/frontend-modern/src/components/__tests__/Login.test.tsxindex f3a181302a..996003a1ea 100644--- a/frontend-modern/src/components/__tests__/Login.test.tsx+++ b/frontend-modern/src/components/__tests__/Login.test.tsx@@ -4,7 +4,6 @@ import { Login } from '@/components/Login';// Compile the real lazy destination before timed assertions; do not mock setup// or make module transformation part of the read-recovery deadline.import '@/components/SetupWizard';-import loginSource from '@/components/Login.tsx?raw';import { SESSION_STORAGE_KEYS, STORAGE_KEYS } from '@/utils/localStorage';// Mock fetch globally@@ -604,14 +603,4 @@ describe('Login', () => {expect(mockFetch).toHaveBeenCalledTimes(2);});});-- it('routes login loading indicators through the shared LoadingSpinner primitive', () => {- expect(loginSource).toContain("from '@/components/shared/LoadingSpinner'");- expect(loginSource).toContain('<LoadingSpinner size="lg" tone="info"');- expect(loginSource).toContain('<LoadingSpinner size="button" tone="inverse"');- expect(loginSource).not.toContain(- 'animate-spin h-12 w-12 border-4 border-blue-500 border-t-transparent rounded-full mx-auto mb-4',- );- expect(loginSource).not.toContain('class="animate-spin -ml-1 mr-3 h-5 w-5 text-white"');- });});diff --git a/frontend-modern/src/components/__tests__/UpdateConfirmationModal.test.tsx b/frontend-modern/src/components/__tests__/UpdateConfirmationModal.test.tsxindex f638dae12a..ba49c5c2e1 100644--- a/frontend-modern/src/components/__tests__/UpdateConfirmationModal.test.tsx+++ b/frontend-modern/src/components/__tests__/UpdateConfirmationModal.test.tsx@@ -2,7 +2,6 @@ import { cleanup, fireEvent, render, screen } from '@solidjs/testing-library';import { createSignal } from 'solid-js';import { afterEach, describe, expect, it, vi } from 'vitest';import { UpdateConfirmationModal } from '@/components/UpdateConfirmationModal';-import updateConfirmationModalSource from '@/components/UpdateConfirmationModal.tsx?raw';describe('UpdateConfirmationModal', () => {afterEach(() => {@@ -45,20 +44,4 @@ describe('UpdateConfirmationModal', () => {expect((reopenedCheckbox as HTMLInputElement).checked).toBe(false);expect(await screen.findByRole('button', { name: 'Start Update' })).toBeDisabled();});-- it('keeps update confirmation chrome on shared primitives', () => {- expect(updateConfirmationModalSource).toContain('CalloutCard');- expect(updateConfirmationModalSource).toContain('ActionIconButton');- expect(updateConfirmationModalSource).toContain('lucide-solid/icons/arrow-right');- expect(updateConfirmationModalSource).not.toContain('<svg');- expect(updateConfirmationModalSource).not.toContain(- 'bg-blue-50 dark:bg-blue-900/25 border border-blue-200',- );- expect(updateConfirmationModalSource).not.toContain(- 'bg-yellow-50 dark:bg-yellow-900/25 border border-yellow-200',- );- expect(updateConfirmationModalSource).not.toContain(- 'px-4 py-2 text-sm font-medium text-white bg-blue-600 hover:bg-blue-700 rounded-md transition-colors',- );- });});diff --git a/frontend-modern/src/components/__tests__/whatsNewModel.test.ts b/frontend-modern/src/components/__tests__/whatsNewModel.test.tsindex 6c4c0bce36..830a8a6270 100644--- a/frontend-modern/src/components/__tests__/whatsNewModel.test.ts+++ b/frontend-modern/src/components/__tests__/whatsNewModel.test.ts@@ -9,7 +9,6 @@ import {extractReleaseVisuals,isReleaseVersion,} from '../whatsNewModel';-import whatsNewCardSource from '../WhatsNewCard.tsx?raw';describe('extractHighlights', () => {it('extracts the Highlights section from a release body', () => {@@ -399,25 +398,6 @@ describe('isReleaseVersion', () => {});});-describe('post-update telemetry disclosure', () => {- it('does not announce telemetry payload changes from the release boundary', () => {- // Payload changes are disclosed in release notes and the dated- // PRIVACY.md changelog. A banner that pairs "we now collect more" with a- // one-click disable button reads as an opt-out prompt, so it was retired.- expect(whatsNewCardSource).not.toContain('TELEMETRY_PAYLOAD_NOTICE_VERSION');- expect(whatsNewCardSource).not.toContain('telemetry-payload-update-notice');- expect(whatsNewCardSource).not.toContain('openTelemetrySettings');- });-- it('keeps release details opt-in and coordinates the automatic notice session', () => {- expect(whatsNewCardSource).toContain("reserveLowPriorityNoticeSession('release-update')");- expect(whatsNewCardSource).toContain('markVersionSeen(currentVersion);');- expect(whatsNewCardSource).toContain('actionLabel="See what\'s new"');- expect(whatsNewCardSource).toContain('setDialogVisible(true)');- expect(whatsNewCardSource).not.toContain('setDialogVisible(true);\n markVersionSeen');- });-});-describe('current candidate notification packet', () => {it('keeps manual workload column sizing in the customer-facing release packet', () => {const releaseNotes = readFileSync(diff --git a/frontend-modern/src/components/patrol/__tests__/ApprovalBanner.test.tsx b/frontend-modern/src/components/patrol/__tests__/ApprovalBanner.test.tsxindex 53cc07622e..a064d9f10d 100644--- a/frontend-modern/src/components/patrol/__tests__/ApprovalBanner.test.tsx+++ b/frontend-modern/src/components/patrol/__tests__/ApprovalBanner.test.tsx@@ -1,7 +1,6 @@import { cleanup, render, screen } from '@solidjs/testing-library';import { Route, Router } from '@solidjs/router';import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';-import approvalBannerSource from '../ApprovalBanner.tsx?raw';import ApprovalBanner from '../ApprovalBanner';import type { ApprovalRequest } from '@/api/ai';@@ -40,22 +39,6 @@ describe('ApprovalBanner', () => {</Router>));- it('keeps approval risk chips on the shared MetadataBadge primitive', () => {- expect(approvalBannerSource).toContain('MetadataBadge');- expect(approvalBannerSource).toContain('APPROVAL_BANNER_BADGE_PROPS');- expect(approvalBannerSource).toContain('firstApprovalRisk()!.badgeTone');- expect(approvalBannerSource).not.toContain('firstApprovalRisk()!.badgeClass');- expect(approvalBannerSource).not.toMatch(/px-1\.5 py-0\.5 text-\[10px\] font-medium rounded/);- });-- it('keeps the Actions handoff on the shared ButtonLink primitive', () => {- expect(approvalBannerSource).toContain('@/components/shared/Button');- expect(approvalBannerSource).toContain('<ButtonLink');- expect(approvalBannerSource).toContain('variant="warningSolid"');- expect(approvalBannerSource).not.toContain('approveInvestigationFix');- expect(approvalBannerSource).not.toContain('denyInvestigationFix');- });-it('deep-links a single approval to its exact governed action review', () => {state.pendingApprovals = [approvalRequest({ plan: { actionId: 'action-single' } })];diff --git a/frontend-modern/src/components/patrol/__tests__/ApprovalSection.test.tsx b/frontend-modern/src/components/patrol/__tests__/ApprovalSection.test.tsxindex 20921ff5f2..6e35083e26 100644--- a/frontend-modern/src/components/patrol/__tests__/ApprovalSection.test.tsx+++ b/frontend-modern/src/components/patrol/__tests__/ApprovalSection.test.tsx@@ -5,7 +5,6 @@ import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';import type { InvestigationSession } from '@/api/ai';import { resetCreateNonSuspendingQueryCacheForTest } from '@/hooks/createNonSuspendingQuery';import type { PatrolActionReference } from '@/types/actionAudit';-import approvalSectionSource from '../ApprovalSection.tsx?raw';import ApprovalSection from '../ApprovalSection';const getInvestigationMock = vi.hoisted(() => vi.fn());@@ -81,23 +80,6 @@ describe('ApprovalSection typed action handoff', () => {</Router>));- it('keeps Patrol contextual while routing mutations to the canonical Actions review', () => {- expect(approvalSectionSource).toContain('@/features/actions/actionRouting');- expect(approvalSectionSource).toContain('buildActionReviewPath');- expect(approvalSectionSource).not.toContain('@/api/resourceActions');- expect(approvalSectionSource).not.toContain('decideAction');- expect(approvalSectionSource).not.toContain('executeAction');- expect(approvalSectionSource).not.toContain('approveInvestigationFix');- expect(approvalSectionSource).not.toContain('proposed_fix.commands');- });-- it('reads the governed action through the non-suspending query', () => {- // The nearest Suspense boundary above a review is the app's route- // boundary, whose fallback replaces the page and loses the reader's place.- expect(approvalSectionSource).not.toContain('createResource');- expect(approvalSectionSource).toContain('createNonSuspendingQuery');- });-it('keeps the page around a finding review while the governed action loads', async () => {let finishRead: (value: InvestigationSession) => void = () => {};getInvestigationMock.mockReturnValue(diff --git a/frontend-modern/src/components/patrol/__tests__/InvestigationMessages.test.tsx b/frontend-modern/src/components/patrol/__tests__/InvestigationMessages.test.tsxindex 828deed2f7..58e5ccf407 100644--- a/frontend-modern/src/components/patrol/__tests__/InvestigationMessages.test.tsx+++ b/frontend-modern/src/components/patrol/__tests__/InvestigationMessages.test.tsx@@ -2,7 +2,6 @@ import { cleanup, fireEvent, render, screen } from '@solidjs/testing-library';import { createSignal, Suspense } from 'solid-js';import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';import { resetCreateNonSuspendingQueryCacheForTest } from '@/hooks/createNonSuspendingQuery';-import investigationMessagesSource from '../InvestigationMessages.tsx?raw';import InvestigationMessages from '../InvestigationMessages';const getMessages = vi.hoisted(() => vi.fn());@@ -18,13 +17,6 @@ beforeEach(() => {afterEach(cleanup);describe('InvestigationMessages', () => {- it('reads the thread through the non-suspending query', () => {- // The nearest Suspense boundary above a review is the app's route- // boundary, whose fallback replaces the page and loses the reader's place.- expect(investigationMessagesSource).not.toContain('createResource');- expect(investigationMessagesSource).toContain('createNonSuspendingQuery');- });-it('keeps the page around a finding review while the thread loads', async () => {let finishRead: (value: unknown) => void = () => {};getMessages.mockReturnValue(diff --git a/frontend-modern/src/components/patrol/__tests__/InvestigationSection.test.tsx b/frontend-modern/src/components/patrol/__tests__/InvestigationSection.test.tsxindex f6a7162d9c..210b3c9799 100644--- a/frontend-modern/src/components/patrol/__tests__/InvestigationSection.test.tsx+++ b/frontend-modern/src/components/patrol/__tests__/InvestigationSection.test.tsx@@ -9,7 +9,6 @@ import {getInvestigationOutcomeLabel,getInvestigationStatusBadgeTone,} from '@/utils/aiFindingPresentation';-import investigationSectionSource from '../InvestigationSection.tsx?raw';import InvestigationSection from '../InvestigationSection';const getInvestigationMock = vi.hoisted(() => vi.fn<() => Promise<Investigation>>());@@ -51,17 +50,6 @@ describe('InvestigationSection', () => {cleanup();});- it('keeps investigation loading indicators on the shared LoadingSpinner primitive', () => {- expect(investigationSectionSource).toContain('LoadingSpinner');- });-- it('reads the investigation without suspending the page around a finding review', () => {- // The nearest Suspense boundary above a review is the app's route- // boundary, whose fallback replaces the page and loses the reader's place.- expect(investigationSectionSource).not.toContain('createResource');- expect(investigationSectionSource).toContain('createNonSuspendingQuery');- });-it('does not offer another run before the first read says what the run is doing', async () => {let finishRead: (value: Investigation) => void = () => {};getInvestigationMock.mockReturnValueOnce(diff --git a/frontend-modern/src/components/patrol/__tests__/RunHistoryEntry.test.tsx b/frontend-modern/src/components/patrol/__tests__/RunHistoryEntry.test.tsxindex 02dc7d7487..a18f9211ad 100644--- a/frontend-modern/src/components/patrol/__tests__/RunHistoryEntry.test.tsx+++ b/frontend-modern/src/components/patrol/__tests__/RunHistoryEntry.test.tsx@@ -1,7 +1,6 @@import { cleanup, fireEvent, render, screen } from '@solidjs/testing-library';import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';import type { PatrolRunRecord } from '@/api/patrol';-import runHistoryEntrySource from '../RunHistoryEntry.tsx?raw';import { RunHistoryEntry } from '../RunHistoryEntry';const { findingsPanelState } = vi.hoisted(() => ({@@ -369,11 +368,6 @@ describe('RunHistoryEntry', () => {});it('keeps technical run trace behind an explicit details disclosure', () => {- expect(runHistoryEntrySource).toContain('const [showTechnicalDetails');- expect(runHistoryEntrySource).toContain('Technical details');- expect(runHistoryEntrySource).toContain('onToggle={(event) => setShowTechnicalDetails');- expect(runHistoryEntrySource).toContain('<Show when={showTechnicalDetails()}>');-render(() => (<RunHistoryEntryrun={{diff --git a/frontend-modern/src/components/patrol/__tests__/RunToolCallTrace.test.tsx b/frontend-modern/src/components/patrol/__tests__/RunToolCallTrace.test.tsxindex b3e4cd5ef0..3f9ab1d935 100644--- a/frontend-modern/src/components/patrol/__tests__/RunToolCallTrace.test.tsx+++ b/frontend-modern/src/components/patrol/__tests__/RunToolCallTrace.test.tsx@@ -3,7 +3,6 @@ import { Suspense } from 'solid-js';import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';import { resetCreateNonSuspendingQueryCacheForTest } from '@/hooks/createNonSuspendingQuery';import { getToolCallsLoadingState } from '@/utils/patrolRunPresentation';-import runToolCallTraceSource from '../RunToolCallTrace.tsx?raw';import { RunToolCallTrace } from '../RunToolCallTrace';const getPatrolRunWithToolCallsMock = vi.hoisted(() => vi.fn());@@ -18,13 +17,6 @@ describe('RunToolCallTrace', () => {getPatrolRunWithToolCallsMock.mockReset();});- it('reads tool calls through the non-suspending query', () => {- // The nearest Suspense boundary above Patrol history is the app's route- // boundary, whose fallback replaces the page and loses the reader's place.- expect(runToolCallTraceSource).not.toContain('createResource');- expect(runToolCallTraceSource).toContain('createNonSuspendingQuery');- });-it('keeps the page around the run history while tool calls load', async () => {let finishRead: (value: unknown) => void = () => {};getPatrolRunWithToolCallsMock.mockReturnValueOnce(@@ -64,15 +56,6 @@ describe('RunToolCallTrace', () => {cleanup();});- it('keeps tool-call result chips on the shared MetadataBadge primitive', () => {- expect(runToolCallTraceSource).toContain('MetadataBadge');- expect(runToolCallTraceSource).toContain('LoadingSpinner');- expect(runToolCallTraceSource).toContain('RUN_TOOL_CALL_BADGE_PROPS');- expect(runToolCallTraceSource).toContain('getToolCallResultBadgeTone');- expect(runToolCallTraceSource).not.toContain('getToolCallResultBadgeClass');- expect(runToolCallTraceSource).not.toMatch(/px-1\.5 py-0\.5 rounded text-\[10px\] font-medium/);- });-it('loads tool calls for the selected run directly by id', async () => {getPatrolRunWithToolCallsMock.mockResolvedValue({id: 'run-75',diff --git a/frontend-modern/src/components/patrol/__tests__/ToolExecutionBlock.test.tsx b/frontend-modern/src/components/patrol/__tests__/ToolExecutionBlock.test.tsxindex 1b528fbe71..51526baa94 100644--- a/frontend-modern/src/components/patrol/__tests__/ToolExecutionBlock.test.tsx+++ b/frontend-modern/src/components/patrol/__tests__/ToolExecutionBlock.test.tsx@@ -2,7 +2,6 @@ import { describe, expect, it, vi } from 'vitest';import { cleanup, render, screen, fireEvent, waitFor } from '@solidjs/testing-library';import { afterEach } from 'vitest';import { ToolExecutionBlock, type ToolExecution } from '../ToolExecutionBlock';-import toolExecutionBlockSource from '../ToolExecutionBlock.tsx?raw';import { Router, Route } from '@solidjs/router';afterEach(() => {@@ -53,16 +52,6 @@ describe('ToolExecutionBlock', () => {expect(link).toHaveAttribute('href', '/actions?action=act-proof');});- it('keeps tool copy controls on the shared CopyValueButton primitive', () => {- expect(toolExecutionBlockSource).toContain('@/components/shared/Button');- expect(toolExecutionBlockSource).toContain('CopyValueButton');- expect(toolExecutionBlockSource).not.toContain('lucide-solid/icons/copy');- expect(toolExecutionBlockSource).not.toContain("lucide-solid/icons/check';");- expect(toolExecutionBlockSource).not.toContain(- 'inline-flex h-6 w-6 shrink-0 items-center justify-center rounded-sm border border-border-subtle bg-surface text-muted transition-colors hover:bg-surface-hover hover:text-base-content focus:outline-hidden focus:ring-2 focus:ring-blue-500/30',- );- });-// --- Tool label mapping ---it.each([diff --git a/frontend-modern/src/components/shared/Button.test.tsx b/frontend-modern/src/components/shared/Button.test.tsxindex c771726d57..0bdc96de07 100644--- a/frontend-modern/src/components/shared/Button.test.tsx+++ b/frontend-modern/src/components/shared/Button.test.tsx@@ -11,8 +11,6 @@ import {DrawerHeaderActionGroup,DrawerHeaderIconButton,} from './Button';-import buttonSource from './Button.tsx?raw';-import buttonModelSource from './buttonModel.ts?raw';describe('Button', () => {afterEach(() => {@@ -20,48 +18,6 @@ describe('Button', () => {window.history.replaceState({}, '', '/');});- it('keeps shell styling in the shared model', () => {- expect(buttonSource).toContain('getButtonClass');- expect(buttonModelSource).toContain('export const BUTTON_VARIANT_CLASSES');- expect(buttonModelSource).toContain('export const COPY_VALUE_BUTTON_VARIANT_CLASSES');- expect(buttonModelSource).toContain('export const COPY_VALUE_BUTTON_SIZE_CLASSES');- expect(buttonModelSource).toContain('getCopyValueButtonClass');- expect(buttonModelSource).toContain('ACTION_ICON_BUTTON_TONE_CLASSES');- expect(buttonModelSource).toContain('ACTION_ICON_BUTTON_SIZE_CLASSES');- expect(buttonModelSource).toContain('getActionIconButtonClass');- expect(buttonSource).toContain('export function ActionIconButton');- expect(buttonModelSource).toContain(- "secondary: 'border border-border bg-surface text-base-content shadow-xs hover:bg-surface-hover'",- );- expect(buttonModelSource).toContain('primaryFlat:');- expect(buttonModelSource).toContain('success:');- expect(buttonModelSource).toContain('warningSolid:');- expect(buttonModelSource).toContain('successOutline:');- expect(buttonModelSource).toContain('successGhost:');- expect(buttonModelSource).toContain('dangerGhost:');- expect(buttonModelSource).toContain(- "'border border-border bg-surface text-muted hover:bg-surface-hover hover:text-base-content'",- );- expect(buttonModelSource).toContain(- "accent: 'text-blue-700 hover:bg-blue-100 dark:text-blue-200 dark:hover:bg-blue-950/25'",- );- expect(buttonModelSource).toContain('dangerOutline:');- expect(buttonModelSource).toContain('export const BUTTON_SIZE_CLASSES');- expect(buttonModelSource).toContain("xs: 'min-h-11 px-2.5 py-1 text-xs sm:min-h-0'");- expect(buttonModelSource).toContain("mdCompact: 'min-h-11 px-3 py-2 text-sm sm:min-h-0'");- expect(buttonModelSource).toContain("settingsAction: 'min-h-11 px-3 py-2 text-sm sm:min-h-9'");- expect(buttonModelSource).toContain(- "settingsActionXs: 'min-h-11 px-3 py-2 text-xs sm:min-h-9'",- );- expect(buttonModelSource).toContain("chip: 'gap-1 px-1.5 py-0.5 text-[10px]'");- expect(buttonModelSource).toContain(- "iconMd: 'h-9 w-9 min-h-11 min-w-11 p-0 sm:min-h-0 sm:min-w-0'",- );- expect(buttonModelSource).toContain('DRAWER_HEADER_ACTION_BUTTON_CLASS');- expect(buttonModelSource).toContain('DRAWER_HEADER_ICON_BUTTON_CLASS');- expect(buttonModelSource).toContain('getDrawerHeaderActionButtonClass');- });-it('renders command buttons with the shared secondary shell', () => {const onClick = vi.fn();@@ -91,9 +47,6 @@ describe('Button', () => {));expect(screen.getByRole('button', { name: 'Refresh' })).toBeDisabled();- expect(buttonSource).toContain("import { LoadingSpinner } from './LoadingSpinner'");- expect(buttonSource).toContain('<LoadingSpinner size="md" tone="current"');- expect(buttonSource).not.toContain('class="animate-spin -ml-1 mr-2 h-4 w-4 text-current"');});it('renders settings action buttons through named size and variants', () => {diff --git a/frontend-modern/src/components/shared/ColumnPicker.test.tsx b/frontend-modern/src/components/shared/ColumnPicker.test.tsxindex 986636a45f..2f2548160a 100644--- a/frontend-modern/src/components/shared/ColumnPicker.test.tsx+++ b/frontend-modern/src/components/shared/ColumnPicker.test.tsx@@ -1,38 +1,12 @@import { cleanup, fireEvent, render, screen, waitFor } from '@solidjs/testing-library';import { afterEach, describe, expect, it, vi } from 'vitest';import { ColumnPicker } from './ColumnPicker';-import columnPickerSource from './ColumnPicker.tsx?raw';-import columnPickerModelSource from './columnPickerModel.ts?raw';-import columnPickerStateSource from './useColumnPickerState.ts?raw';describe('ColumnPicker', () => {afterEach(() => {cleanup();});- it('keeps column picker on shell, runtime, and model owners', () => {- expect(columnPickerSource).toContain('useColumnPickerState');- expect(columnPickerSource).toContain('COLUMN_PICKER_PANEL_TITLE');- expect(columnPickerSource).toContain('widthClass="w-56 max-w-[calc(100vw-2rem)]"');- expect(columnPickerSource).not.toContain('createSignal');- expect(columnPickerSource).not.toContain('createEffect');- expect(columnPickerSource).not.toContain('document.addEventListener');- expect(columnPickerSource).not.toContain('getHiddenColumnCount');-- expect(columnPickerStateSource).toContain('export function useColumnPickerState');- expect(columnPickerStateSource).toContain('createSignal');- expect(columnPickerStateSource).toContain('createEffect');- expect(columnPickerStateSource).toContain('document.addEventListener');- expect(columnPickerStateSource).toContain('handleClickOutside');- expect(columnPickerStateSource).toContain('hiddenCount');-- expect(columnPickerModelSource).toContain('COLUMN_PICKER_BUTTON_LABEL');- expect(columnPickerModelSource).toContain('COLUMN_PICKER_PANEL_TITLE');- expect(columnPickerModelSource).toContain('getHiddenColumnCount');- expect(columnPickerModelSource).toContain('shouldShowColumnPickerReset');- expect(columnPickerModelSource).toContain('getColumnPickerOptionTextClass');- });-it('uses the canonical columns label and modal copy', async () => {const onToggle = vi.fn();const onReset = vi.fn();diff --git a/frontend-modern/src/components/shared/FilterButtonGroup.test.tsx b/frontend-modern/src/components/shared/FilterButtonGroup.test.tsxindex 3b9f5f8cc6..e16dbdf091 100644--- a/frontend-modern/src/components/shared/FilterButtonGroup.test.tsx+++ b/frontend-modern/src/components/shared/FilterButtonGroup.test.tsx@@ -4,9 +4,7 @@ import Sun from 'lucide-solid/icons/sun';import Moon from 'lucide-solid/icons/moon';import { createSignal } from 'solid-js';import { FilterButtonGroup, type FilterOption } from './FilterButtonGroup';-import filterButtonGroupSource from './FilterButtonGroup.tsx?raw';import filterButtonGroupModelSource from './filterButtonGroupModel.ts?raw';-import filterButtonGroupStateSource from './useFilterButtonGroupState.ts?raw';import { getFilterButtonGroupCompactLabel } from './filterButtonGroupModel';describe('FilterButtonGroup', () => {@@ -14,30 +12,6 @@ describe('FilterButtonGroup', () => {cleanup();});- it('keeps shell, runtime, and model owners split', () => {- expect(filterButtonGroupSource).toContain('useFilterButtonGroupState');- expect(filterButtonGroupSource).toContain('getFilterButtonGroupClass');- expect(filterButtonGroupSource).toContain('getFilterButtonGroupButtonClass');- expect(filterButtonGroupSource).toContain('getFilterButtonGroupCompactLabel');- expect(filterButtonGroupSource).not.toContain("label.split(' ').pop()");- expect(filterButtonGroupSource).not.toContain('props.onChange(option.value)');- expect(filterButtonGroupSource).not.toContain('groupClassByVariant');-- expect(filterButtonGroupStateSource).toContain('export function useFilterButtonGroupState');- expect(filterButtonGroupStateSource).toContain('createMemo');- expect(filterButtonGroupStateSource).toContain('props.onChange(option.value)');- expect(filterButtonGroupStateSource).toContain('props.disabled || option.disabled');-- expect(filterButtonGroupModelSource).toContain('resolveFilterButtonGroupVariant');- expect(filterButtonGroupModelSource).toContain('getFilterButtonGroupClass');- expect(filterButtonGroupModelSource).toContain('getFilterButtonGroupButtonClass');- expect(filterButtonGroupModelSource).toContain('getFilterButtonGroupCompactLabel');- expect(filterButtonGroupModelSource).toContain("prominent: 'grid grid-cols-1 gap-2'");- expect(filterButtonGroupModelSource).toContain('segmented:');- expect(filterButtonGroupModelSource).toContain('compact:');- expect(filterButtonGroupModelSource).toContain('inline-flex items-center gap-1');- });-it('keeps all-scope options meaningful in compact layouts', () => {expect(getFilterButtonGroupCompactLabel({ label: 'All time' })).toBe('All');expect(getFilterButtonGroupCompactLabel({ label: 'Last 24h' })).toBe('24h');diff --git a/frontend-modern/src/components/shared/FilterToolbar.test.tsx b/frontend-modern/src/components/shared/FilterToolbar.test.tsxindex 88fa9b68a5..954eb87351 100644--- a/frontend-modern/src/components/shared/FilterToolbar.test.tsx+++ b/frontend-modern/src/components/shared/FilterToolbar.test.tsx@@ -3,6 +3,7 @@ import { For, createSignal } from 'solid-js';import { afterEach, describe, expect, it, vi } from 'vitest';import {FilterHeader,+ FilterMobileToggleButton,FilterPopoverTrigger,FilterToolbarPanel,FilterSegmentedControl,@@ -13,11 +14,6 @@ import {filterPanelClass,resolveFilterSelectDomValue,} from './FilterToolbar';-import toggleSource from './Toggle.tsx?raw';-import toggleModelSource from './toggleModel.ts?raw';-import toggleStateSource from './useToggleState.ts?raw';-import filterToolbarSource from './FilterToolbar.tsx?raw';-import subtabsSource from './Subtabs.tsx?raw';describe('FilterHeader', () => {afterEach(() => {@@ -35,17 +31,6 @@ describe('FilterHeader', () => {expect(container.querySelector('.flex.w-full.items-center.gap-2')).not.toBeNull();});- it('keeps clipped in-page tab controls visibly scrollable on phones', () => {- expect(subtabsSource).toContain('overflow-x-auto');- expect(subtabsSource).toContain('canScrollLeft');- expect(subtabsSource).toContain('canScrollRight');- expect(subtabsSource).toContain('scrollTabs(-1)');- expect(subtabsSource).toContain('scrollTabs(1)');- expect(subtabsSource).toContain('sm:hidden');- expect(subtabsSource).toContain('useActiveHorizontalRailItemVisibility');- expect(subtabsSource).not.toContain('.scrollIntoView');- });-it('keeps segmented controls on value callbacks while forwarding div attributes', async () => {const onChange = vi.fn();render(() => (@@ -167,34 +152,6 @@ describe('FilterHeader', () => {).toBe(false);});- it('keeps shared toggle behavior on shell, runtime, and model owners', () => {- expect(toggleSource).toContain('useToggleState');- expect(toggleSource).toContain('getToggleTrackClass');- expect(toggleSource).toContain('getToggleKnobClass');- expect(toggleSource).not.toContain('defaultPrevented');- expect(toggleSource).not.toContain('toggleSizeConfig');- expect(toggleSource).not.toContain('handleClick =');-- expect(toggleStateSource).toContain('export function useToggleState');- expect(toggleStateSource).toContain('defaultPrevented');- expect(toggleStateSource).toContain('currentTarget: { checked: next }');- expect(toggleStateSource).toContain('props.onChange?.(event)');- expect(toggleStateSource).toContain('props.onToggle?.()');-- expect(toggleModelSource).toContain('toggleSizeConfig');- expect(toggleModelSource).toContain('resolveToggleSize');- expect(toggleModelSource).toContain('getToggleTrackClass');- expect(toggleModelSource).toContain('getToggleKnobClass');- expect(toggleModelSource).toContain('ToggleChangeEvent');- });-- it('keeps labelled filter selects on the shared FormSelect primitive', () => {- expect(filterToolbarSource).toContain("import { FormSelect } from './FormSelect';");- expect(filterToolbarSource).toContain('<FormSelect');- expect(filterToolbarSource).not.toContain('<select');- expect(filterToolbarSource).not.toContain('MutationObserver');- });-it('keeps controlled select state when options materialize asynchronously', async () => {const [options, setOptions] = createSignal<{ value: string; label: string }[]>([]);@@ -283,8 +240,15 @@ describe('FilterHeader', () => {expect(filterPanelClass).toContain('z-80');expect(filterPanelClass).not.toContain('w-[min(40rem,calc(100vw-2rem))]');expect(filterPanelDefaultWidthClass).toContain('w-[min(40rem,calc(100vw-2rem))]');- expect(filterToolbarSource).toContain("'flex min-h-11 items-center gap-1.5");- expect(filterToolbarSource).toContain('sm:h-7 sm:min-h-0');+ });++ it('keeps the mobile Filters button a phone-sized touch target with its active count', () => {+ render(() => <FilterMobileToggleButton count={2} />);++ const button = screen.getByRole('button', { name: /Filters/ });+ expect(button).toHaveClass('min-h-11');+ expect(button).toHaveClass('sm:min-h-10');+ expect(button).toHaveTextContent('2');});it('keeps peer popover triggers aligned and exposes their disclosure state', () => {@@ -326,9 +290,4 @@ describe('FilterHeader', () => {expect(panel).toHaveClass('max-w-[calc(100vw-2rem)]');expect(panel).not.toHaveClass('w-[min(40rem,calc(100vw-2rem))]');});-- it('keeps persistent view preferences out of viewport-docked toolbar panels', () => {- expect(filterToolbarSource).not.toContain('filterBottomNavAwarePanelClass');- expect(filterToolbarSource).not.toContain('filter-bottom-nav-aware-panel');- });});diff --git a/frontend-modern/src/components/shared/SelectablePillButton.test.tsx b/frontend-modern/src/components/shared/SelectablePillButton.test.tsxindex f614537892..e38b0d5a17 100644--- a/frontend-modern/src/components/shared/SelectablePillButton.test.tsx+++ b/frontend-modern/src/components/shared/SelectablePillButton.test.tsx@@ -1,26 +1,12 @@import { cleanup, fireEvent, render, screen } from '@solidjs/testing-library';import { afterEach, describe, expect, it, vi } from 'vitest';import { SelectablePillButton } from './SelectablePillButton';-import selectablePillButtonSource from './SelectablePillButton.tsx?raw';-import selectablePillModelSource from './selectablePillModel.ts?raw';describe('SelectablePillButton', () => {afterEach(() => {cleanup();});- it('keeps pressed semantics and class ownership in the shared primitive', () => {- expect(selectablePillButtonSource).toContain('getSelectablePillButtonClass');- expect(selectablePillButtonSource).toContain("aria-pressed={local.active ? 'true' : 'false'}");- expect(selectablePillButtonSource).not.toContain('border-blue-500 bg-blue-600');- expect(selectablePillButtonSource).not.toContain('hover:border-blue-400');-- expect(selectablePillModelSource).toContain('SELECTABLE_PILL_BUTTON_BASE_CLASS');- expect(selectablePillModelSource).toContain('SELECTABLE_PILL_BUTTON_ACTIVE_CLASS');- expect(selectablePillModelSource).toContain('SELECTABLE_PILL_BUTTON_INACTIVE_CLASS');- expect(selectablePillModelSource).toContain('getSelectablePillButtonClass');- });-it('renders active and inactive pill states consistently', () => {const onActiveClick = vi.fn();const onInactiveClick = vi.fn();diff --git a/frontend-modern/src/components/shared/SelectionCardGroup.test.tsx b/frontend-modern/src/components/shared/SelectionCardGroup.test.tsxindex 47a19402ad..42806a91a3 100644--- a/frontend-modern/src/components/shared/SelectionCardGroup.test.tsx+++ b/frontend-modern/src/components/shared/SelectionCardGroup.test.tsx@@ -1,37 +1,12 @@import { cleanup, fireEvent, render, screen } from '@solidjs/testing-library';import { afterEach, describe, expect, it, vi } from 'vitest';import { SelectionCardGroup } from './SelectionCardGroup';-import selectionCardGroupSource from './SelectionCardGroup.tsx?raw';-import selectionCardGroupModelSource from './selectionCardGroupModel.ts?raw';-import selectionCardGroupStateSource from './useSelectionCardGroupState.ts?raw';describe('SelectionCardGroup', () => {afterEach(() => {cleanup();});- it('keeps shell, runtime, and model owners split', () => {- expect(selectionCardGroupSource).toContain('useSelectionCardGroupState');- expect(selectionCardGroupSource).toContain('getSelectionCardGroupClass');- expect(selectionCardGroupSource).toContain('getSelectionCardButtonClass');- expect(selectionCardGroupSource).toContain('getSelectionCardTitleClass');- expect(selectionCardGroupSource).not.toContain('resolveSelectionCardTone');- expect(selectionCardGroupSource).not.toContain('props.onChange(option.value)');- expect(selectionCardGroupSource).not.toContain('groupClassByVariant');-- expect(selectionCardGroupStateSource).toContain('export function useSelectionCardGroupState');- expect(selectionCardGroupStateSource).toContain('createMemo');- expect(selectionCardGroupStateSource).toContain('resolveSelectionCardTone');- expect(selectionCardGroupStateSource).toContain('props.disabled || option.disabled');- expect(selectionCardGroupStateSource).toContain('props.onChange(option.value)');-- expect(selectionCardGroupModelSource).toContain('resolveSelectionCardGroupVariant');- expect(selectionCardGroupModelSource).toContain('resolveSelectionCardTone');- expect(selectionCardGroupModelSource).toContain('getSelectionCardButtonClass');- expect(selectionCardGroupModelSource).toContain('getSelectionCardTitleClass');- expect(selectionCardGroupModelSource).toContain("compact: 'grid grid-cols-2 gap-2'");- });-it('routes compact card selection changes through the shared primitive', () => {const onChange = vi.fn();diff --git a/frontend-modern/src/components/shared/StatusBadge.test.tsx b/frontend-modern/src/components/shared/StatusBadge.test.tsxindex 00a433b174..97a0f42120 100644--- a/frontend-modern/src/components/shared/StatusBadge.test.tsx+++ b/frontend-modern/src/components/shared/StatusBadge.test.tsx@@ -1,36 +1,12 @@import { cleanup, fireEvent, render, screen } from '@solidjs/testing-library';import { afterEach, describe, expect, it, vi } from 'vitest';import { StatusBadge } from './StatusBadge';-import statusBadgeSource from './StatusBadge.tsx?raw';-import statusBadgeModelSource from './statusBadgeModel.ts?raw';-import statusBadgeStateSource from './useStatusBadgeState.ts?raw';describe('StatusBadge', () => {afterEach(() => {cleanup();});- it('keeps status badge on shell, runtime, and model owners', () => {- expect(statusBadgeSource).toContain('useStatusBadgeState');- expect(statusBadgeSource).toContain('getStatusBadgeClass');- expect(statusBadgeSource).toContain('getStatusBadgeLabel');- expect(statusBadgeSource).toContain('getStatusBadgeTitle');- expect(statusBadgeSource).not.toContain('cursor-not-allowed');- expect(statusBadgeSource).not.toContain('props.onToggle?.()');- expect(statusBadgeSource).not.toContain('labelEnabled ??');-- expect(statusBadgeStateSource).toContain('export function useStatusBadgeState');- expect(statusBadgeStateSource).toContain('Boolean(props.disabled)');- expect(statusBadgeStateSource).toContain('props.onToggle?.()');- expect(statusBadgeStateSource).toContain('if (isDisabled())');-- expect(statusBadgeModelSource).toContain('STATUS_BADGE_PADDING_BY_SIZE');- expect(statusBadgeModelSource).toContain('getStatusBadgeClass');- expect(statusBadgeModelSource).toContain('getStatusBadgeLabel');- expect(statusBadgeModelSource).toContain('getStatusBadgeTitle');- expect(statusBadgeModelSource).toContain("labelEnabled ?? 'Enabled'");- });-it('renders label/title policy and blocks toggles when disabled', () => {const onToggle = vi.fn();diff --git a/frontend-modern/src/components/shared/TagInput.test.tsx b/frontend-modern/src/components/shared/TagInput.test.tsxindex 9ba0d9ae74..fef72e659d 100644--- a/frontend-modern/src/components/shared/TagInput.test.tsx+++ b/frontend-modern/src/components/shared/TagInput.test.tsx@@ -2,37 +2,12 @@ import { cleanup, fireEvent, render, screen } from '@solidjs/testing-library';import { createSignal } from 'solid-js';import { afterEach, describe, expect, it, vi } from 'vitest';import { TagInput } from './TagInput';-import tagInputSource from './TagInput.tsx?raw';-import tagInputModelSource from './tagInputModel.ts?raw';-import tagInputStateSource from './useTagInputState.ts?raw';describe('TagInput', () => {afterEach(() => {cleanup();});- it('keeps tag input on shell, runtime, and model owners', () => {- expect(tagInputSource).toContain('useTagInputState');- expect(tagInputSource).toContain('getTagInputPlaceholder');- expect(tagInputSource).not.toContain('createSignal');- expect(tagInputSource).not.toContain('querySelector');- expect(tagInputSource).not.toContain('Backspace');- expect(tagInputSource).not.toContain('addTag');-- expect(tagInputStateSource).toContain('export function useTagInputState');- expect(tagInputStateSource).toContain('createSignal');- expect(tagInputStateSource).toContain('createMemo');- expect(tagInputStateSource).toContain('inputRef?.focus');- expect(tagInputStateSource).toContain("event.key === 'Backspace'");- expect(tagInputStateSource).toContain('commitTag');-- expect(tagInputModelSource).toContain('TAG_INPUT_DELIMITER_KEYS');- expect(tagInputModelSource).toContain('isTagInputCommitKey');- expect(tagInputModelSource).toContain('getTagInputPlaceholder');- expect(tagInputModelSource).toContain('getNextTagsAfterRemove');- expect(tagInputModelSource).toContain('getTagInputRemoveTitle');- });-it('adds tags on enter and removes the last one on backspace when empty', () => {const onChange = vi.fn();diff --git a/frontend-modern/src/components/shared/Toggle.test.tsx b/frontend-modern/src/components/shared/Toggle.test.tsxindex 7dec6b85cb..a98d3eb988 100644--- a/frontend-modern/src/components/shared/Toggle.test.tsx+++ b/frontend-modern/src/components/shared/Toggle.test.tsx@@ -1,37 +1,12 @@import { cleanup, fireEvent, render, screen } from '@solidjs/testing-library';import { afterEach, describe, expect, it, vi } from 'vitest';import { Toggle, TogglePrimitive } from './Toggle';-import toggleSource from './Toggle.tsx?raw';-import toggleModelSource from './toggleModel.ts?raw';-import toggleStateSource from './useToggleState.ts?raw';describe('Toggle', () => {afterEach(() => {cleanup();});- it('keeps toggle on shell, runtime, and model owners', () => {- expect(toggleSource).toContain('useToggleState');- expect(toggleSource).toContain('getToggleTrackClass');- expect(toggleSource).toContain('getToggleKnobClass');- expect(toggleSource).not.toContain('defaultPrevented');- expect(toggleSource).not.toContain('toggleSizeConfig');- expect(toggleSource).not.toContain('handleClick =');-- expect(toggleStateSource).toContain('export function useToggleState');- expect(toggleStateSource).toContain('defaultPrevented');- expect(toggleStateSource).toContain('currentTarget: { checked: next }');- expect(toggleStateSource).toContain('props.onChange?.(event)');- expect(toggleStateSource).toContain('props.onToggle?.()');-- expect(toggleModelSource).toContain('toggleSizeConfig');- expect(toggleModelSource).toContain('resolveToggleSize');- expect(toggleModelSource).toContain('getToggleTrackClass');- expect(toggleModelSource).toContain("after:-inset-y-2.5 after:inset-x-0 after:content-['']");- expect(toggleModelSource).toContain('getToggleKnobClass');- expect(toggleModelSource).toContain('ToggleChangeEvent');- });-it('keeps a disabled toggle on its on or off colour, dimmed', () => {render(() => (<>diff --git a/frontend-modern/src/components/shared/TypeColumn.guardrails.test.ts b/frontend-modern/src/components/shared/TypeColumn.guardrails.test.tsindex 372dda5bb7..84d4b42cf6 100644--- a/frontend-modern/src/components/shared/TypeColumn.guardrails.test.ts+++ b/frontend-modern/src/components/shared/TypeColumn.guardrails.test.ts@@ -1,7 +1,4 @@import { describe, expect, it } from 'vitest';-import guestRowModelSource from '@/components/Workloads/guestRowModel.tsx?raw';-import typeColumnDefinitionSource from '@/utils/typeColumnDefinition.ts?raw';-import typeColumnContractSource from '@/utils/typeColumnContract.ts?raw';const sourceFiles = import.meta.glob(['../../**/*.ts', '../../**/*.tsx'], {query: '?raw',@@ -13,35 +10,6 @@ const INLINE_TYPE_COLUMN_PATTERN =/\{\s*id:\s*'type',\s*label:\s*'Type'[\s\S]*?toggleable:\s*true[\s\S]*?\}/g;describe('type column guardrails', () => {- it('keeps the canonical Type column definition in the shared helper', () => {- expect(typeColumnContractSource).toContain("TYPE_COLUMN_ID = 'type'");- expect(typeColumnContractSource).toContain("TYPE_COLUMN_LABEL = 'Type'");- expect(typeColumnContractSource).toContain("TYPE_COLUMN_SORT_KEY = 'type'");- expect(typeColumnContractSource).toContain('TYPE_COLUMN_SORTABLE = true');- expect(typeColumnContractSource).toContain("TYPE_COLUMN_PRIORITY = 'essential'");- expect(typeColumnContractSource).toContain("TYPE_COLUMN_WIDTH = '60px'");- expect(typeColumnContractSource).toContain("TYPE_COLUMN_MIN_WIDTH = '60px'");- expect(typeColumnContractSource).toContain("TYPE_COLUMN_MAX_WIDTH = '80px'");- expect(typeColumnContractSource).toContain("TYPE_COLUMN_ALIGN = 'center'");- expect(typeColumnDefinitionSource).toContain('TYPE_COLUMN_ID');- expect(typeColumnDefinitionSource).toContain('TYPE_COLUMN_LABEL');- expect(typeColumnDefinitionSource).toContain('TYPE_COLUMN_SORT_KEY');- expect(typeColumnDefinitionSource).toContain('TYPE_COLUMN_WIDTH');- expect(typeColumnDefinitionSource).toContain('toggleable: true');- expect(typeColumnDefinitionSource).not.toContain('export const createCanonicalTypeColumn');- expect(typeColumnDefinitionSource).not.toContain("id: 'type'");- expect(typeColumnDefinitionSource).not.toContain("label: 'Type'");- expect(typeColumnDefinitionSource).not.toContain("width: '60px'");- expect(typeColumnDefinitionSource).not.toContain("sortKey: 'type'");- });-- it('routes runtime Type columns through the shared helper', () => {- expect(guestRowModelSource).toContain('createVisibleCanonicalTypeColumn()');- expect(guestRowModelSource).not.toContain('createCanonicalTypeColumn');- expect(guestRowModelSource).not.toMatch(INLINE_TYPE_COLUMN_PATTERN);- expect(guestRowModelSource).not.toContain('defaultVisibility:');- });-it('limits runtime Type columns to the known allowlist', () => {const runtimeEntries = Object.entries(sourceFiles).filter(([path]) => !path.endsWith('.test.ts') && !path.endsWith('.test.tsx'),diff --git a/frontend-modern/src/components/shared/__tests__/CommandPaletteModal.test.tsx b/frontend-modern/src/components/shared/__tests__/CommandPaletteModal.test.tsxindex ebe41435a2..ce71df9495 100644--- a/frontend-modern/src/components/shared/__tests__/CommandPaletteModal.test.tsx+++ b/frontend-modern/src/components/shared/__tests__/CommandPaletteModal.test.tsx@@ -2,9 +2,6 @@ import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';import { cleanup, fireEvent, render, screen, waitFor } from '@solidjs/testing-library';import { createSignal, type JSX } from 'solid-js';import type { Resource } from '@/types/resource';-import commandPaletteModalSource from '@/components/shared/CommandPaletteModal.tsx?raw';-import commandPaletteModelSource from '@/components/shared/commandPaletteModel.ts?raw';-import commandPaletteStateSource from '@/components/shared/useCommandPaletteState.ts?raw';import { buildPrimaryPlatformNavigationVisibility } from '@/features/platformNavigation/platformNavigationModel';import { buildDockerPath } from '@/routing/resourceLinks';import { aiAvailabilityStore } from '@/stores/aiAvailability';@@ -59,44 +56,6 @@ describe('CommandPaletteModal', () => {aiAvailabilityStore.setEnabled(true);});- it('keeps the command palette on shell, runtime, and model owners', () => {- expect(commandPaletteModalSource).toContain('useCommandPaletteState');- expect(commandPaletteModalSource).not.toContain('useNavigate');- expect(commandPaletteModalSource).not.toContain('createSignal');- expect(commandPaletteModalSource).not.toContain('buildInfrastructurePath');-- expect(commandPaletteStateSource).toContain('useNavigate');- expect(commandPaletteStateSource).toContain('createSignal');- expect(commandPaletteStateSource).toContain('buildStandalonePath');- expect(commandPaletteStateSource).toContain('buildProxmoxPath');- expect(commandPaletteStateSource).toContain('export function useCommandPaletteState');- expect(commandPaletteStateSource).not.toContain('aiChatStore');-- // Infrastructure and aggregate workspaces are not command-palette routes;- // platform/runtime pages own those workflows.- expect(commandPaletteStateSource).not.toContain('buildInfrastructurePath');- expect(commandPaletteStateSource).not.toContain('buildWorkloadsPath');- expect(commandPaletteStateSource).not.toContain('buildStoragePath');- expect(commandPaletteStateSource).not.toContain('buildRecoveryPath');-- expect(commandPaletteModelSource).toContain('buildCommandPaletteCommands');- expect(commandPaletteModelSource).toContain('normalizeCommandPaletteQuery');- expect(commandPaletteModelSource).toContain('filterCommandPaletteCommands');- expect(commandPaletteModelSource).toContain("id: 'nav-standalone'");- expect(commandPaletteModelSource).toContain("id: 'nav-proxmox'");- expect(commandPaletteModelSource).toContain("id: 'nav-docker'");- expect(commandPaletteModelSource).toContain("id: 'nav-kubernetes'");- expect(commandPaletteModelSource).toContain("id: 'nav-kubernetes-workloads'");- expect(commandPaletteModelSource).toContain("id: 'nav-truenas'");- expect(commandPaletteModelSource).toContain("id: 'nav-vmware'");- expect(commandPaletteModelSource).toContain("id: 'nav-vmware-networks'");- expect(commandPaletteModelSource).not.toContain("id: 'assistant-");- expect(commandPaletteModelSource).not.toContain("id: 'nav-infrastructure'");- expect(commandPaletteModelSource).not.toContain("id: 'nav-workloads'");- expect(commandPaletteModelSource).not.toContain("id: 'nav-storage'");- expect(commandPaletteModelSource).not.toContain("id: 'nav-recovery'");- });-it('renders platform entries, runtime lens commands, and vSphere network inventory', () => {render(() => (<CommandPaletteModaldiff --git a/frontend-modern/src/components/shared/__tests__/ContainerUpdateBadge.test.tsx b/frontend-modern/src/components/shared/__tests__/ContainerUpdateBadge.test.tsxindex 77003e8df5..a847d5f3be 100644--- a/frontend-modern/src/components/shared/__tests__/ContainerUpdateBadge.test.tsx+++ b/frontend-modern/src/components/shared/__tests__/ContainerUpdateBadge.test.tsx@@ -1,8 +1,5 @@import { afterEach, describe, expect, it, vi } from 'vitest';import { cleanup, fireEvent, render, screen, waitFor } from '@solidjs/testing-library';-import containerUpdateBadgeSource from '@/components/shared/ContainerUpdateBadge.tsx?raw';-import containerUpdateBadgeModelSource from '@/components/shared/containerUpdateBadgeModel.ts?raw';-import containerUpdateButtonStateSource from '@/components/shared/useContainerUpdateButtonState.ts?raw';import { ContainerUpdateBadge, UpdateButton } from '@/components/shared/ContainerUpdateBadge';import { getUpdatePlanErrorMessage } from '@/components/shared/containerUpdateBadgeModel';import { ResourceActionsAPI } from '@/api/resourceActions';@@ -49,27 +46,6 @@ afterEach(() => {});describe('ContainerUpdateBadge', () => {- it('keeps the badge on shell, runtime, and model owners', () => {- expect(containerUpdateBadgeSource).toContain('useContainerUpdateButtonState');- expect(containerUpdateBadgeSource).toContain('getUpdateButtonClass');- expect(containerUpdateBadgeSource).not.toContain('MonitoringAPI.updateDockerContainer');- expect(containerUpdateBadgeSource).not.toContain('markContainerQueued');- expect(containerUpdateBadgeSource).not.toContain('createSignal');-- expect(containerUpdateButtonStateSource).toContain('ResourceActionsAPI.planAction');- expect(containerUpdateButtonStateSource).not.toContain('MonitoringAPI.updateDockerContainer');- expect(containerUpdateButtonStateSource).toContain('markContainerQueued');- expect(containerUpdateButtonStateSource).toContain('createSignal');- expect(containerUpdateButtonStateSource).toContain(- 'export function useContainerUpdateButtonState',- );-- expect(containerUpdateBadgeModelSource).toContain('getUpdateButtonClass');- expect(containerUpdateBadgeModelSource).toContain('getUpdateButtonTooltip');- expect(containerUpdateBadgeModelSource).toContain('hasContainerUpdate');- expect(containerUpdateBadgeModelSource).toContain('hasContainerUpdateCurrent');- });-it('renders the error badge fallback when update detection fails', () => {render(() => (<ContainerUpdateBadgediff --git a/frontend-modern/src/components/shared/__tests__/DetailSectionTable.test.tsx b/frontend-modern/src/components/shared/__tests__/DetailSectionTable.test.tsxindex 73af59cc02..e3bb7b0fe9 100644--- a/frontend-modern/src/components/shared/__tests__/DetailSectionTable.test.tsx+++ b/frontend-modern/src/components/shared/__tests__/DetailSectionTable.test.tsx@@ -10,19 +10,12 @@ import {formatDetailIntegerValue,makeDetailRow,} from '../DetailSectionTable';-import detailSectionTableSource from '../DetailSectionTable.tsx?raw';-import detailSectionModelSource from '../detailSectionModel.ts?raw';import { TechnicalDetailsDisclosure, TechnicalDetailsSection } from '../TechnicalDetailsDisclosure';describe('DetailSectionTable', () => {afterEach(() => cleanup());it('keeps detail section row shaping in the shared model', () => {- expect(detailSectionModelSource).toContain('export type DetailValueTone');- expect(detailSectionModelSource).toContain('makeDetailRow');- expect(detailSectionTableSource).toContain('DetailSectionTable');- expect(detailSectionTableSource).toContain('InlineDetailPanel');-expect(compactDetailRows([makeDetailRow('Host', ' tower '),diff --git a/frontend-modern/src/components/shared/__tests__/Dialog.test.tsx b/frontend-modern/src/components/shared/__tests__/Dialog.test.tsxindex 3f172a1d85..5d6d71cb46 100644--- a/frontend-modern/src/components/shared/__tests__/Dialog.test.tsx+++ b/frontend-modern/src/components/shared/__tests__/Dialog.test.tsx@@ -4,9 +4,6 @@ import { createSignal, Show } from 'solid-js';import type { ComponentProps, JSX } from 'solid-js';import { Dialog } from '@/components/shared/Dialog';import { dialogStackHasBlockingDialog } from '@/components/shared/useDialogState';-import dialogSource from '@/components/shared/Dialog.tsx?raw';-import dialogModelSource from '@/components/shared/dialogModel.ts?raw';-import dialogStateSource from '@/components/shared/useDialogState.ts?raw';function getBodyChild(element: HTMLElement): HTMLElement {let bodyChild = element;@@ -25,35 +22,6 @@ describe('Dialog', () => {document.body.style.overflow = '';});- it('keeps dialog on shell, runtime, and model owners', () => {- expect(dialogSource).toContain('useDialogState');- expect(dialogSource).toContain('getDialogViewportClass');- expect(dialogSource).toContain('getDialogAlignmentClass');- expect(dialogSource).toContain('getDialogPanelClass');- expect(dialogSource).not.toContain('createEffect');- expect(dialogSource).not.toContain('onCleanup');- expect(dialogSource).not.toContain('FOCUSABLE_SELECTOR');- expect(dialogSource).not.toContain('document.body.style.overflow');- expect(dialogSource).not.toContain('querySelectorAll<HTMLElement>');-- expect(dialogStateSource).toContain('export function useDialogState');- expect(dialogStateSource).toContain('createEffect');- expect(dialogStateSource).toContain('onCleanup');- expect(dialogStateSource).toContain('document.body.style.overflow');- expect(dialogStateSource).toContain('openDialogCount');- expect(dialogStateSource).toContain('dialogStackHasBlockingDialog');- expect(dialogStateSource).toContain('getDialogFocusableElements');- expect(dialogStateSource).toContain('syncBackgroundInertness');- expect(dialogStateSource).toContain('MutationObserver');-- expect(dialogModelSource).toContain('export function getDialogLayout');- expect(dialogModelSource).toContain('export function getDialogFocusableElements');- expect(dialogModelSource).toContain('export function getDialogViewportClass');- expect(dialogModelSource).toContain('export function getDialogAlignmentClass');- expect(dialogModelSource).toContain('export function getDialogPanelClass');- expect(dialogModelSource).toContain('FOCUSABLE_SELECTOR');- });-it('requires exactly one accessible-name strategy at the component boundary', () => {type UnnamedDialogProps = {isOpen: boolean;diff --git a/frontend-modern/src/components/shared/__tests__/HelpIcon.test.tsx b/frontend-modern/src/components/shared/__tests__/HelpIcon.test.tsxindex f32f40bca4..8db0687c72 100644--- a/frontend-modern/src/components/shared/__tests__/HelpIcon.test.tsx+++ b/frontend-modern/src/components/shared/__tests__/HelpIcon.test.tsx@@ -1,8 +1,5 @@import { fireEvent, render, screen } from '@solidjs/testing-library';import { afterEach, describe, expect, it, vi } from 'vitest';-import helpIconSource from '@/components/shared/HelpIcon.tsx?raw';-import helpIconModelSource from '@/components/shared/helpIconModel.ts?raw';-import helpIconStateSource from '@/components/shared/useHelpIconState.ts?raw';import { HelpIcon } from '@/components/shared/HelpIcon';vi.mock('@/content/help', () => ({@@ -25,22 +22,6 @@ describe('HelpIcon', () => {vi.unstubAllGlobals();});- it('keeps the help icon on shell, runtime, and model owners', () => {- expect(helpIconSource).toContain('useHelpIconState');- expect(helpIconSource).not.toContain('getHelpContent(');- expect(helpIconSource).not.toContain('requestAnimationFrame');- expect(helpIconSource).not.toContain('createSignal');-- expect(helpIconStateSource).toContain('requestAnimationFrame');- expect(helpIconStateSource).toContain('document.addEventListener');- expect(helpIconStateSource).toContain('export function useHelpIconState');- expect(helpIconStateSource).toContain('createSignal');-- expect(helpIconModelSource).toContain('resolveHelpContent');- expect(helpIconModelSource).toContain('calculateHelpPopoverPosition');- expect(helpIconModelSource).toContain('helpIconSizeClasses');- });-it('renders inline help content in the popover', async () => {render(() => (<HelpIcondiff --git a/frontend-modern/src/components/shared/__tests__/HistoryChart.test.tsx b/frontend-modern/src/components/shared/__tests__/HistoryChart.test.tsxindex 019a41c9e3..2682c05e81 100644--- a/frontend-modern/src/components/shared/__tests__/HistoryChart.test.tsx+++ b/frontend-modern/src/components/shared/__tests__/HistoryChart.test.tsx@@ -3,13 +3,6 @@ import { createSignal } from 'solid-js';import { ChartsAPI } from '@/api/charts';import { eventBus } from '@/stores/events';import { cleanup, fireEvent, render, screen, waitFor, within } from '@solidjs/testing-library';-import historyChartHeaderSource from '@/components/shared/HistoryChartHeader.tsx?raw';-import historyChartHoverGroupSource from '@/components/shared/HistoryChartHoverGroup.tsx?raw';-import historyChartOverlaySource from '@/components/shared/HistoryChartOverlay.tsx?raw';-import historyChartSource from '@/components/shared/HistoryChart.tsx?raw';-import historyChartModelSource from '@/components/shared/historyChartModel.ts?raw';-import historyChartStateSource from '@/components/shared/useHistoryChartState.ts?raw';-import historyChartTooltipSource from '@/components/shared/HistoryChartTooltip.tsx?raw';import { HistoryChartHeader } from '@/components/shared/HistoryChartHeader';import type { HistoryChartState } from '@/components/shared/useHistoryChartState';import { HistoryChart, HistoryChartHoverGroup } from '@/components/shared/HistoryChart';@@ -273,81 +266,6 @@ describe('History chart axis labels', () => {});describe('HistoryChart', () => {- it('keeps the history chart on shell, runtime, and model owners', () => {- expect(historyChartSource).toContain('useHistoryChartState');- expect(historyChartSource).toContain('HistoryChartHeader');- expect(historyChartSource).toContain('HistoryChartOverlay');- expect(historyChartSource).toContain('HistoryChartTooltip');- expect(historyChartSource).toContain('useHistoryChartHoverGroup');- expect(historyChartOverlaySource).toContain(- "import { LoadingSpinner } from './LoadingSpinner'",- );- expect(historyChartOverlaySource).toContain(- '<LoadingSpinner size="xl" tone="info" label="Loading history" />',- );- expect(historyChartOverlaySource).not.toContain(- 'w-6 h-6 border-2 border-blue-500 border-t-transparent rounded-full animate-spin',- );- expect(historyChartSource).not.toContain('ChartsAPI.getMetricsHistory');- expect(historyChartSource).not.toContain('calculateOptimalPoints');- expect(historyChartSource).not.toContain('setupCanvasDPR');- expect(historyChartSource).not.toContain('createSignal');- expect(historyChartSource).not.toContain('Collecting data... History will appear here.');- expect(historyChartSource).not.toContain('Unlock {chart.lockTierLabel()} Features');-- expect(historyChartStateSource).toContain('ChartsAPI.getMetricsHistory');- expect(historyChartStateSource).toContain('calculateOptimalPoints');- expect(historyChartStateSource).toContain('setupCanvasDPR');- expect(historyChartStateSource).toContain('export function useHistoryChartState');- expect(historyChartStateSource).toContain('HISTORY_CHART_RANGES');- expect(historyChartStateSource).toContain('hoveredTimestamp');- expect(historyChartStateSource).toContain("'mock_synthetic' | null");- expect(historyChartStateSource).not.toContain('canStartCommercialTrial');- expect(historyChartStateSource).not.toContain('runStartProTrialAction({');- expect(historyChartStateSource).not.toContain('startProTrial()');- expect(historyChartStateSource).not.toContain('getTrialAlreadyUsedMessage()');- expect(historyChartStateSource).not.toContain('getTrialTryAgainLaterMessage()');-- expect(historyChartHoverGroupSource).toContain('createContext');- expect(historyChartHoverGroupSource).toContain('HistoryChartHoverGroup');-- expect(historyChartModelSource).toContain('formatHistoryChartTooltipValue');- expect(historyChartModelSource).toContain('getHistoryChartTooltipLayout');- expect(historyChartModelSource).toContain('HISTORY_CHART_RANGES');- expect(historyChartModelSource).toContain('getHistoryChartScale');- expect(historyChartModelSource).toContain('findHistoryChartClosestPoint');-- expect(historyChartHeaderSource).toContain('formatHistoryChartTooltipValue');- expect(historyChartHeaderSource).not.toContain('ChartsAPI.getMetricsHistory');- expect(historyChartHeaderSource).not.toContain('setupCanvasDPR');-- expect(historyChartOverlaySource).toContain('No history samples in this time range.');- expect(historyChartOverlaySource).not.toContain('History will appear here.');- expect(historyChartOverlaySource).toContain(- 'Historical data beyond {props.chart.lockDays()} days requires a higher license plan.',- );- expect(historyChartOverlaySource).not.toContain(- 'Unlock {props.chart.lockTierLabel()} Features',- );- expect(historyChartOverlaySource).not.toContain('presentationPolicyHidesUpgradePrompts');- expect(historyChartOverlaySource).not.toContain('free 14-day trial');- expect(historyChartOverlaySource).toContain('requires a higher license plan');- expect(historyChartOverlaySource).not.toContain('ChartsAPI.getMetricsHistory');- expect(historyChartOverlaySource).not.toContain('setupCanvasDPR');-- expect(historyChartTooltipSource).toContain('formatHistoryChartTooltipValue');- expect(historyChartTooltipSource).toContain('getHistoryChartTooltipLayout');- expect(historyChartTooltipSource).toContain('foreignObject');- expect(historyChartTooltipSource).toContain('width={props.chartWidth}');- expect(historyChartTooltipSource).toContain('height={props.chartHeight}');- expect(historyChartTooltipSource).toContain('new Date(point().timestamp).toLocaleString()');- expect(historyChartTooltipSource).not.toContain('<Portal>');- expect(historyChartTooltipSource).not.toContain('absolute inset-0 h-full w-full');- expect(historyChartTooltipSource).not.toContain('preserveAspectRatio="none"');- expect(historyChartTooltipSource).not.toContain('style={');- expect(historyChartTooltipSource).not.toContain('ChartsAPI.getMetricsHistory');- });-it('inspects actual readings with the keyboard and clears on escape, blur and selection changes', () => {const [target, setTarget] = createSignal('a');const [points, setPoints] = createSignal([diff --git a/frontend-modern/src/components/shared/__tests__/MobileNavBar.test.tsx b/frontend-modern/src/components/shared/__tests__/MobileNavBar.test.tsxindex b67988b238..bc5c04253c 100644--- a/frontend-modern/src/components/shared/__tests__/MobileNavBar.test.tsx+++ b/frontend-modern/src/components/shared/__tests__/MobileNavBar.test.tsx@@ -3,8 +3,6 @@ import { describe, expect, it, vi } from 'vitest';import { createSignal, type Component } from 'solid-js';import { createStableTabList, utilityNavTabEquals } from '@/components/shared/stableNavTabs';import mobileNavBarSource from '@/components/shared/MobileNavBar.tsx?raw';-import mobileNavBarModelSource from '@/components/shared/mobileNavBarModel.ts?raw';-import mobileNavBarStateSource from '@/components/shared/useMobileNavBarState.ts?raw';import {MobileNavBar,type MobileNavBarPrimaryTab,@@ -57,34 +55,10 @@ function makeUtility(}describe('MobileNavBar', () => {- it('keeps the mobile nav on shell, runtime, and model owners', () => {- expect(mobileNavBarSource).toContain('useMobileNavBarState');- expect(mobileNavBarSource).toContain('getMobileNavTabButtonClass');- expect(mobileNavBarSource).toContain('role="menu"');- expect(mobileNavBarSource).toContain('<a');+ it('keeps the phone bottom nav above the safe area and hidden from the desktop breakpoint', () => {+ // jsdom cannot resolve breakpoints or env(safe-area-inset-bottom), so the+ // classes are the only place a regression shows.expect(mobileNavBarSource).toContain('pb-safe xl:hidden');- expect(mobileNavBarSource).not.toContain('createSignal');- expect(mobileNavBarSource).not.toContain('requestAnimationFrame');- expect(mobileNavBarSource).not.toContain('overflow-x-auto');-- expect(mobileNavBarStateSource).toContain('createSignal');- expect(mobileNavBarStateSource).toContain("document.addEventListener('pointerdown'");- expect(mobileNavBarStateSource).toContain("event.key === 'Escape'");- expect(mobileNavBarStateSource).toContain('export function useMobileNavBarState');- expect(mobileNavBarStateSource).not.toContain('scrollIntoView');-- expect(mobileNavBarModelSource).toContain('buildMobileNavBarLayout');- expect(mobileNavBarModelSource).toContain('buildOrderedMobileNavPrimaryTabs');- expect(mobileNavBarModelSource).toContain('buildOrderedMobileNavUtilityTabs');- expect(mobileNavBarModelSource).toContain('getMobileNavAlertBadgeCounts');- expect(mobileNavBarModelSource).toContain("'proxmox'");- expect(mobileNavBarModelSource).toContain("'docker'");- expect(mobileNavBarModelSource).toContain("'kubernetes'");- expect(mobileNavBarModelSource).toContain("'truenas'");- expect(mobileNavBarModelSource).toContain("'vmware'");- expect(mobileNavBarModelSource).not.toContain("'workloads'");- expect(mobileNavBarModelSource).not.toContain("'storage'");- expect(mobileNavBarModelSource).not.toContain("'recovery'");});it('renders a dedicated platform switcher and keeps More for secondary utilities', async () => {diff --git a/frontend-modern/src/components/shared/__tests__/PulseDataGrid.test.tsx b/frontend-modern/src/components/shared/__tests__/PulseDataGrid.test.tsxindex 3453aa1fe2..36da6d4957 100644--- a/frontend-modern/src/components/shared/__tests__/PulseDataGrid.test.tsx+++ b/frontend-modern/src/components/shared/__tests__/PulseDataGrid.test.tsx@@ -1,12 +1,8 @@import { cleanup, fireEvent, render, screen } from '@solidjs/testing-library';import { createSignal } from 'solid-js';import { afterEach, describe, expect, it, vi } from 'vitest';-import pulseDataGridSource from '@/components/shared/PulseDataGrid.tsx?raw';-import pulseDataGridModelSource from '@/components/shared/pulseDataGridModel.ts?raw';-import pulseDataGridStateSource from '@/components/shared/usePulseDataGridState.ts?raw';import { PulseDataGrid } from '@/components/shared/PulseDataGrid';import { TableCell, nativeRowClickTarget } from '@/components/shared/Table';-import tableSource from '@/components/shared/Table.tsx?raw';type TestRow = {id: string;@@ -18,58 +14,6 @@ describe('PulseDataGrid', () => {cleanup();});- it('keeps the shared pulse data grid on shell, runtime, and model owners', () => {- expect(pulseDataGridSource).toContain('usePulseDataGridState');- expect(pulseDataGridSource).toContain('getPulseDataGridAlignClass');- expect(pulseDataGridSource).toContain('getPulseDataGridFrameClass');- expect(pulseDataGridSource).toContain('getPulseDataGridWidthAttr');- expect(pulseDataGridSource).toContain('isPulseDataGridInteractiveTarget');- expect(pulseDataGridSource).toContain("from '@/components/shared/Table'");- expect(pulseDataGridSource).toContain("from '@/components/shared/LoadingSpinner'");- expect(pulseDataGridSource).toContain('<Table');- expect(pulseDataGridSource).toContain('<LoadingSpinner size="md" tone="info"');- expect(pulseDataGridSource).not.toContain(- 'w-4 h-4 rounded-full border-2 border-slate-300 border-t-blue-600 animate-spin',- );- expect(pulseDataGridSource).toContain('wrapperClass="scrollbar-hide"');- expect(pulseDataGridSource).toContain('scrollbar-hide');- expect(pulseDataGridSource).not.toContain('<div class="overflow-x-auto');- expect(pulseDataGridSource).not.toContain('overflow-x-auto touch-scroll scrollbar-hide');- expect(pulseDataGridSource).not.toContain('style={{');- expect(pulseDataGridSource).not.toContain('style={');- expect(pulseDataGridSource).not.toContain('useBreakpoint');- expect(pulseDataGridSource).not.toContain('createStore');- expect(pulseDataGridSource).not.toContain('target.closest(');-- expect(pulseDataGridStateSource).toContain('export function usePulseDataGridState');- expect(pulseDataGridStateSource).toContain('useBreakpoint');- expect(pulseDataGridStateSource).toContain('createStore');- expect(pulseDataGridStateSource).toContain('reconcile(');-- expect(pulseDataGridModelSource).toContain('export const getPulseDataGridAlignClass');- expect(pulseDataGridModelSource).toContain(- "export type PulseDataGridFrame = 'default' | 'flush'",- );- expect(pulseDataGridModelSource).toContain('export const getPulseDataGridFrameClass');- expect(pulseDataGridModelSource).toContain(- "flush: 'overflow-hidden rounded-none border-0 bg-surface'",- );- expect(pulseDataGridModelSource).toContain('export const getPulseDataGridWidthAttr');- expect(pulseDataGridModelSource).toContain('export const isPulseDataGridInteractiveTarget');- expect(pulseDataGridModelSource).toContain('target.closest(');- expect(tableSource).toContain('customDividePattern');- expect(tableSource).toContain('customBorderPattern');- expect(tableSource).toContain('touch-scroll');- expect(tableSource).toContain(- 'table-scroll-shell w-full min-w-0 max-w-full overflow-x-auto touch-scroll',- );- expect(tableSource).toContain("phoneVerticalScrollOwner?: 'page' | 'table'");- expect(tableSource).toContain('table-scroll-shell-phone-page');- expect(tableSource).toContain('height?: string | number;');- expect(tableSource).not.toContain('style={{');- expect(tableSource).not.toContain('style={');- });-it('preserves caller-owned table cell height attributes without inline styles', () => {render(() => (<table>diff --git a/frontend-modern/src/components/shared/__tests__/SearchField.test.tsx b/frontend-modern/src/components/shared/__tests__/SearchField.test.tsxindex b992f707ee..15dda876a6 100644--- a/frontend-modern/src/components/shared/__tests__/SearchField.test.tsx+++ b/frontend-modern/src/components/shared/__tests__/SearchField.test.tsx@@ -1,9 +1,6 @@import { cleanup, fireEvent, render, screen } from '@solidjs/testing-library';import { afterEach, describe, expect, it, vi } from 'vitest';import { createSignal } from 'solid-js';-import searchFieldSource from '@/components/shared/SearchField.tsx?raw';-import searchFieldModelSource from '@/components/shared/searchFieldModel.ts?raw';-import searchFieldStateSource from '@/components/shared/useSearchFieldState.ts?raw';import { SearchField } from '@/components/shared/SearchField';import { getSearchFieldInputPaddingRightClass } from '@/components/shared/searchFieldModel';@@ -12,26 +9,6 @@ describe('SearchField', () => {cleanup();});- it('keeps search field on shell, runtime, and model owners', () => {- expect(searchFieldSource).toContain('useSearchFieldState');- expect(searchFieldSource).not.toContain('let inputEl: HTMLInputElement');- expect(searchFieldSource).not.toContain(- "if (props.hasTrailingControls) return 'pr-14 sm:pr-20'",- );- expect(searchFieldSource).not.toContain("if (e.key === 'Escape'");-- expect(searchFieldStateSource).toContain('export function useSearchFieldState');- expect(searchFieldStateSource).toContain('let inputEl: HTMLInputElement');- expect(searchFieldStateSource).toContain("if (event.key === 'Escape'");- expect(searchFieldStateSource).toContain('inputEl?.blur()');- expect(searchFieldStateSource).toContain('getSearchFieldInputPaddingRightClass');-- expect(searchFieldModelSource).toContain('shouldShowSearchFieldShortcutHint');- expect(searchFieldModelSource).toContain('shouldShowSearchFieldClearButton');- expect(searchFieldModelSource).toContain('getSearchFieldInputPaddingRightClass');- expect(searchFieldModelSource).toContain("return 'pr-14 sm:pr-20'");- });-it('renders the shortcut hint when empty', () => {render(() => (<SearchField value="" onChange={vi.fn()} placeholder="Search field" shortcutHint="Cmd+K" />diff --git a/frontend-modern/src/components/shared/__tests__/SearchInput.test.tsx b/frontend-modern/src/components/shared/__tests__/SearchInput.test.tsxindex 6ea88150e0..c60a9cf511 100644--- a/frontend-modern/src/components/shared/__tests__/SearchInput.test.tsx+++ b/frontend-modern/src/components/shared/__tests__/SearchInput.test.tsx@@ -2,12 +2,6 @@ import { cleanup, fireEvent, render, screen, waitFor, within } from '@solidjs/teimport { afterEach, describe, expect, it, vi } from 'vitest';import { createSignal } from 'solid-js';import { SearchInput } from '@/components/shared/SearchInput';-import searchInputSource from '@/components/shared/SearchInput.tsx?raw';-import searchInputModelSource from '@/components/shared/searchInputModel.ts?raw';-import searchInputEnhancementsSource from '@/components/shared/SearchInputEnhancements.tsx?raw';-import searchInputEnhancementsModelSource from '@/components/shared/searchInputEnhancementsModel.ts?raw';-import searchInputEnhancementsStateSource from '@/components/shared/useSearchInputEnhancements.ts?raw';-import searchInputStateSource from '@/components/shared/useSearchInputState.ts?raw';const SearchHarness = (props: {typeToSearch?: boolean;@@ -40,52 +34,6 @@ describe('SearchInput', () => {window.localStorage.clear();});- it('keeps search input on shell, runtime, and model owners', () => {- expect(searchInputSource).toContain('useSearchInputState');- expect(searchInputSource).not.toContain('let searchInputEl: HTMLInputElement');- expect(searchInputSource).not.toContain('useTypeToSearch');- expect(searchInputSource).not.toContain('useSearchInputEnhancements');- expect(searchInputSource).not.toContain(- 'enhancements.isSimple() ? props.shortcutHint : undefined',- );-- expect(searchInputStateSource).toContain('export function useSearchInputState');- expect(searchInputStateSource).toContain('let searchInputEl: HTMLInputElement');- expect(searchInputStateSource).toContain('useTypeToSearch');- expect(searchInputStateSource).toContain('useSearchInputEnhancements');- expect(searchInputStateSource).toContain('getSearchInputShortcutHint');- expect(searchInputStateSource).toContain('shouldSearchInputShowTrailingControls');-- expect(searchInputModelSource).toContain('getSearchInputShortcutHint');- expect(searchInputModelSource).toContain('shouldSearchInputShowTrailingControls');- expect(searchInputModelSource).toContain('export interface SearchInputProps');-- expect(searchInputEnhancementsSource).toContain('getSearchHistoryToggleButtonClass');- expect(searchInputEnhancementsSource).toContain('getSearchHistoryToggleTitle');- expect(searchInputEnhancementsSource).toContain('SEARCH_HISTORY_CLEAR_LABEL');- expect(searchInputEnhancementsSource).not.toContain('Show recent searches');- expect(searchInputEnhancementsSource).not.toContain('No recent searches yet');- expect(searchInputEnhancementsSource).not.toContain('Clear history');- expect(searchInputEnhancementsSource).not.toContain('hover:bg-blue-50');-- expect(searchInputStateSource).toContain('useSearchInputEnhancements');-- expect(searchInputEnhancementsStateSource).toContain('createSearchHistoryManager');- expect(searchInputEnhancementsStateSource).toContain(- "options.history?.emptyMessage ?? 'Searches you run will appear here.'",- );- expect(searchInputEnhancementsStateSource).not.toContain('Show recent searches');-- expect(searchInputEnhancementsModelSource).toContain('getSearchHistoryToggleButtonClass');- expect(searchInputEnhancementsModelSource).toContain('getSearchHistoryToggleTitle');- expect(searchInputEnhancementsModelSource).toContain('SEARCH_HISTORY_CLEAR_LABEL');- expect(searchInputEnhancementsModelSource).toContain('SEARCH_HISTORY_MENU_CLASS');- expect(searchInputEnhancementsModelSource).toContain('w-full max-w-lg');- expect(searchInputEnhancementsModelSource).not.toContain('left-0 right-0 top-full');- expect(searchInputEnhancementsModelSource).toContain('h-11 w-11');- expect(searchInputEnhancementsModelSource).toContain('sm:h-7 sm:w-7');- });-it('caps the history menu on wide search surfaces without narrowing mobile layouts', () => {const HistoryHarness = () => {const [value, setValue] = createSignal('');diff --git a/frontend-modern/src/components/shared/__tests__/SearchTipsPopover.test.tsx b/frontend-modern/src/components/shared/__tests__/SearchTipsPopover.test.tsxindex 795009e0cb..5e0bd2154e 100644--- a/frontend-modern/src/components/shared/__tests__/SearchTipsPopover.test.tsx+++ b/frontend-modern/src/components/shared/__tests__/SearchTipsPopover.test.tsx@@ -1,9 +1,6 @@import { afterEach, describe, expect, it, vi } from 'vitest';import { cleanup, fireEvent, render, screen, waitFor } from '@solidjs/testing-library';import { SearchTipsPopover } from '@/components/shared/SearchTipsPopover';-import searchTipsPopoverSource from '@/components/shared/SearchTipsPopover.tsx?raw';-import searchTipsPopoverModelSource from '@/components/shared/searchTipsPopoverModel.ts?raw';-import searchTipsPopoverStateSource from '@/components/shared/useSearchTipsPopoverState.ts?raw';describe('SearchTipsPopover', () => {afterEach(() => {@@ -11,38 +8,6 @@ describe('SearchTipsPopover', () => {vi.restoreAllMocks();});- it('keeps search tips popover on shell, runtime, and model owners', () => {- expect(searchTipsPopoverSource).toContain('useSearchTipsPopoverState');- expect(searchTipsPopoverSource).toContain('getSearchTipsPopoverTriggerClass');- expect(searchTipsPopoverSource).not.toContain('createSignal');- expect(searchTipsPopoverSource).not.toContain('createEffect');- expect(searchTipsPopoverSource).not.toContain('window.addEventListener');- expect(searchTipsPopoverSource).not.toContain('triggerVariant ===');-- expect(searchTipsPopoverStateSource).toContain('export function useSearchTipsPopoverState');- expect(searchTipsPopoverStateSource).toContain('createSignal');- expect(searchTipsPopoverStateSource).toContain('createEffect');- expect(searchTipsPopoverStateSource).toContain('window.addEventListener');- expect(searchTipsPopoverStateSource).toContain('pointerInside');- expect(searchTipsPopoverStateSource).toContain('window.innerWidth >= 1280');- expect(searchTipsPopoverStateSource).toContain('window.innerHeight >= 768');- expect(searchTipsPopoverStateSource).toContain('window.innerWidth - viewportMargin - width');- expect(searchTipsPopoverStateSource).toContain('nav[aria-label="Mobile navigation"]');- expect(searchTipsPopoverStateSource).toContain(- "window.addEventListener('scroll', updatePopoverPosition, true)",- );- expect(searchTipsPopoverSource).toContain('style={state.popoverStyle()}');- expect(searchTipsPopoverSource).toContain('fixed! ${positionClass()}');- expect(searchTipsPopoverSource).toContain('xl:absolute! xl:mt-2 xl:w-72');-- expect(searchTipsPopoverModelSource).toContain('getSearchTipsPopoverTriggerClass');- expect(searchTipsPopoverModelSource).toContain('getSearchTipsPopoverPositionClass');- expect(searchTipsPopoverModelSource).toContain('getSearchTipsPopoverTriggerVariant');- expect(searchTipsPopoverModelSource).toContain('shouldSearchTipsPopoverOpenOnHover');- expect(searchTipsPopoverModelSource).toContain('h-11 w-11');- expect(searchTipsPopoverModelSource).toContain('sm:h-5 sm:w-5');- });-it('toggles the popover on click by default', async () => {render(() => (<SearchTipsPopover tips={[{ code: 'name:web', description: 'Filter by name' }]} />diff --git a/frontend-modern/src/components/shared/__tests__/Table.test.tsx b/frontend-modern/src/components/shared/__tests__/Table.test.tsxindex cfe02f17b9..fafba9d241 100644--- a/frontend-modern/src/components/shared/__tests__/Table.test.tsx+++ b/frontend-modern/src/components/shared/__tests__/Table.test.tsx@@ -226,13 +226,28 @@ describe('TableRow text selection', () => {describe('TableBody', () => {it('keeps the shared table wrapper CSP-safe', () => {- expect(tableSource).toContain('touch-scroll');- expect(tableSource).toContain('table-scroll-shell');- expect(tableSource).toContain('min-w-0 max-w-full');expect(tableSource).not.toContain('style={{');expect(tableSource).not.toContain('style={');});+ it('keeps the table wrapper touch-scrollable and inside its container', () => {+ render(() => (+ <Table>+ <tbody>+ <tr>+ <td>wrapped row</td>+ </tr>+ </tbody>+ </Table>+ ));++ expect(screen.getByText('wrapped row').closest('.table-scroll-shell')).toHaveClass(+ 'touch-scroll',+ 'min-w-0',+ 'max-w-full',+ );+ });+it('exposes an explicit phone page-scroll owner variant', () => {render(() => (<Table phoneVerticalScrollOwner="page">diff --git a/frontend-modern/src/components/shared/__tests__/Tooltip.test.tsx b/frontend-modern/src/components/shared/__tests__/Tooltip.test.tsxindex 15420f15a7..4c27401d66 100644--- a/frontend-modern/src/components/shared/__tests__/Tooltip.test.tsx+++ b/frontend-modern/src/components/shared/__tests__/Tooltip.test.tsx@@ -6,10 +6,6 @@ import {showTooltip,hideTooltip,} from '@/components/shared/Tooltip';-import tooltipSource from '@/components/shared/Tooltip.tsx?raw';-import tooltipPortalSource from '@/components/shared/TooltipPortal.tsx?raw';-import tooltipModelSource from '@/components/shared/tooltipModel.ts?raw';-import tooltipStateSource from '@/components/shared/useTooltipState.ts?raw';describe('Tooltip', () => {afterEach(() => {@@ -34,37 +30,6 @@ describe('Tooltip', () => {expect(screen.queryByText('touch detail')).toBeNull();});- it('keeps tooltip on shell, runtime, and model owners', () => {- expect(tooltipSource).toContain('useTooltipState');- expect(tooltipSource).toContain('createTooltipSystemState');- expect(tooltipSource).toContain('foreignObject');- expect(tooltipSource).not.toContain('createSignal');- expect(tooltipSource).not.toContain('requestAnimationFrame');- expect(tooltipSource).not.toContain('sanitizeTooltipContent');- expect(tooltipSource).not.toContain('resolveTooltipPosition');- expect(tooltipSource).not.toContain('style={');-- expect(tooltipPortalSource).toContain('useTooltipPortalState');- expect(tooltipPortalSource).toContain('foreignObject');- expect(tooltipPortalSource).not.toContain('createSignal');- expect(tooltipPortalSource).not.toContain('resolveTooltipPosition');- expect(tooltipPortalSource).not.toContain('style={');-- expect(tooltipStateSource).toContain('export function useTooltipState');- expect(tooltipStateSource).toContain('export function useTooltipPortalState');- expect(tooltipStateSource).toContain('export function createTooltipSystemState');- expect(tooltipStateSource).toContain('createSignal');- expect(tooltipStateSource).toContain('requestAnimationFrame');- expect(tooltipStateSource).toContain('tooltipInstance');- expect(tooltipStateSource).toContain('resolveTooltipPosition');- expect(tooltipStateSource).toContain('sanitizeTooltipContent');-- expect(tooltipModelSource).toContain('export function sanitizeTooltipContent');- expect(tooltipModelSource).toContain('export function resolveTooltipPosition');- expect(tooltipModelSource).toContain("export type TooltipAlignment = 'left' | 'center'");- expect(tooltipModelSource).toContain("export type TooltipDirection = 'up' | 'down'");- });-it('sanitizes tooltip content through the model owner', async () => {render(() => <Tooltip content={`<b>"unsafe"</b> & 'quoted'`} x={24} y={24} visible />);diff --git a/frontend-modern/src/components/shared/__tests__/TooltipPortal.test.tsx b/frontend-modern/src/components/shared/__tests__/TooltipPortal.test.tsxindex 3b039d8cff..99f310cb60 100644--- a/frontend-modern/src/components/shared/__tests__/TooltipPortal.test.tsx+++ b/frontend-modern/src/components/shared/__tests__/TooltipPortal.test.tsx@@ -2,8 +2,6 @@ import { For, createSignal } from 'solid-js';import { afterEach, describe, expect, it, vi } from 'vitest';import { cleanup, render, waitFor } from '@solidjs/testing-library';import { TooltipPortal } from '@/components/shared/TooltipPortal';-import tooltipPortalSource from '@/components/shared/TooltipPortal.tsx?raw';-import tooltipStateSource from '@/components/shared/useTooltipState.ts?raw';describe('TooltipPortal', () => {afterEach(() => {@@ -32,17 +30,6 @@ describe('TooltipPortal', () => {expect(addListener.mock.calls.filter(([type]) => type === 'resize')).toHaveLength(0);});- it('keeps tooltip portal on shell and runtime owners', () => {- expect(tooltipPortalSource).toContain('useTooltipPortalState');- expect(tooltipPortalSource).toContain('foreignObject');- expect(tooltipPortalSource).not.toContain('createSignal');- expect(tooltipPortalSource).not.toContain('resolveTooltipPosition');- expect(tooltipPortalSource).not.toContain('style={');-- expect(tooltipStateSource).toContain('export function useTooltipPortalState');- expect(tooltipStateSource).toContain('resolveTooltipPosition');- });-it('renders portal content without inline styles', async () => {const raf = vi.spyOn(window, 'requestAnimationFrame')diff --git a/frontend-modern/src/components/shared/__tests__/WebInterfaceUrlField.test.tsx b/frontend-modern/src/components/shared/__tests__/WebInterfaceUrlField.test.tsxindex f829983523..0ec773e764 100644--- a/frontend-modern/src/components/shared/__tests__/WebInterfaceUrlField.test.tsx+++ b/frontend-modern/src/components/shared/__tests__/WebInterfaceUrlField.test.tsx@@ -1,8 +1,5 @@import { cleanup, fireEvent, render, screen, waitFor } from '@solidjs/testing-library';import { afterEach, describe, expect, it, vi } from 'vitest';-import webInterfaceUrlFieldSource from '@/components/shared/WebInterfaceUrlField.tsx?raw';-import webInterfaceUrlFieldModelSource from '@/components/shared/webInterfaceUrlFieldModel.ts?raw';-import webInterfaceUrlFieldStateSource from '@/components/shared/useWebInterfaceUrlFieldState.ts?raw';vi.mock('@/api/guestMetadata', () => ({GuestMetadataAPI: {@@ -53,25 +50,6 @@ describe('WebInterfaceUrlField', () => {syncSessionCapabilities(null);});- it('keeps the URL field on shell, runtime, and model owners', () => {- expect(webInterfaceUrlFieldSource).toContain('useWebInterfaceUrlFieldState');- expect(webInterfaceUrlFieldSource).not.toContain('GuestMetadataAPI.getMetadata');- expect(webInterfaceUrlFieldSource).not.toContain('AgentMetadataAPI.updateMetadata');- expect(webInterfaceUrlFieldSource).not.toContain('validateWebInterfaceCustomUrl');- expect(webInterfaceUrlFieldSource).not.toContain('createSignal');-- expect(webInterfaceUrlFieldStateSource).toContain('GuestMetadataAPI.getMetadata');- expect(webInterfaceUrlFieldStateSource).toContain('AgentMetadataAPI.updateMetadata');- expect(webInterfaceUrlFieldStateSource).toContain('DockerMetadataAPI.updateMetadata');- expect(webInterfaceUrlFieldStateSource).toContain('createSignal');- expect(webInterfaceUrlFieldStateSource).toContain('copyToClipboard');- expect(webInterfaceUrlFieldStateSource).toContain(- 'export function useWebInterfaceUrlFieldState',- );-- expect(webInterfaceUrlFieldModelSource).toContain('validateWebInterfaceCustomUrl');- });-it('renders URL controls for a metadata target', async () => {render(() => (<WebInterfaceUrlField metadataKind="agent" metadataId="host-1" targetLabel="agent" />diff --git a/frontend-modern/src/features/actions/__tests__/Actions.metaLine.test.tsx b/frontend-modern/src/features/actions/__tests__/Actions.metaLine.test.tsxindex 1c717a3e4f..a7adf970ce 100644--- a/frontend-modern/src/features/actions/__tests__/Actions.metaLine.test.tsx+++ b/frontend-modern/src/features/actions/__tests__/Actions.metaLine.test.tsx@@ -1,8 +1,10 @@-import { cleanup, render, screen } from '@solidjs/testing-library';+import { cleanup, render, screen, waitFor } from '@solidjs/testing-library';import { Route, Router } from '@solidjs/router';import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';import { ResourceActionsAPI } from '@/api/resourceActions';+import { getPatrolAutonomySettings } from '@/api/patrol';import { SecurityAPI } from '@/api/security';+import { aiAvailabilityStore } from '@/stores/aiAvailability';import type { ActionAuditRecord } from '@/types/actionAudit';import { getActionResourcePresentation } from '../actionPresentation';import Actions from '../../../pages/Actions';@@ -59,6 +61,7 @@ beforeEach(() => {afterEach(() => {cleanup();vi.clearAllMocks();+ aiAvailabilityStore.clear();window.history.replaceState(null, '', '/');});@@ -87,3 +90,75 @@ describe('Actions card resource line', () => {expect(name.parentElement?.closest(`[title="${resourceId}"]`)).not.toBeNull();});});++describe('Actions empty Open inbox', () => {+ const renderEmptyInbox = () => {+ vi.mocked(ResourceActionsAPI.listActions).mockResolvedValue({+ actions: [],+ count: 0,+ view: 'pending',+ readOnly: false,+ });+ vi.mocked(getPatrolAutonomySettings).mockResolvedValueOnce({+ effective_autonomy_level: 'monitor',+ } as Awaited<ReturnType<typeof getPatrolAutonomySettings>>);+ render(() => (+ <Router>+ <Route path="*" component={Actions} />+ </Router>+ ));+ };++ it('names Watch only Patrol as the reason nothing is queued while AI is on', async () => {+ aiAvailabilityStore.setEnabled(true);+ renderEmptyInbox();++ expect(await screen.findByText(/Patrol runs in Watch only mode/)).toBeInTheDocument();+ });++ it('does not describe Patrol as running while AI is off (#905)', async () => {+ aiAvailabilityStore.setEnabled(false);+ renderEmptyInbox();++ const calmState = await screen.findByTestId('actions-calm-state');+ await waitFor(() => expect(getPatrolAutonomySettings).toHaveBeenCalled());+ // Let the Patrol settings answer land before judging the calm state.+ await new Promise((resolve) => setTimeout(resolve, 0));++ expect(calmState).toHaveTextContent(+ 'Pulse will place proposed or in-progress changes here for review.',+ );+ expect(calmState).not.toHaveTextContent('Watch only');+ });+});++describe('Actions queue size', () => {+ it('mounts a bounded window of a large action inventory', async () => {+ const actions = Array.from({ length: 150 }, (_, index) => ({+ ...audit,+ id: `restart-${index}`,+ request: {+ ...audit.request,+ requestId: `request-${index}`,+ resourceId: `docker:container:batch-${index}`,+ },+ }));+ vi.mocked(ResourceActionsAPI.listActions).mockResolvedValue({+ actions,+ count: actions.length,+ view: 'pending',+ readOnly: false,+ });++ render(() => (+ <Router>+ <Route path="*" component={Actions} />+ </Router>+ ));++ const list = await screen.findByRole('list', { name: 'Open actions' });+ expect(list.querySelectorAll('[role="listitem"]').length).toBeGreaterThan(0);+ expect(list.querySelectorAll('[role="listitem"]').length).toBeLessThan(actions.length);+ expect(list.querySelectorAll('[data-platform-window-spacer]')).toHaveLength(2);+ });+});diff --git a/frontend-modern/src/features/actions/__tests__/actionsWatchOnlyEmptyState.test.ts b/frontend-modern/src/features/actions/__tests__/actionsWatchOnlyEmptyState.test.tsindex 1c2753b264..314a674fdc 100644--- a/frontend-modern/src/features/actions/__tests__/actionsWatchOnlyEmptyState.test.ts+++ b/frontend-modern/src/features/actions/__tests__/actionsWatchOnlyEmptyState.test.ts@@ -1,6 +1,5 @@import { describe, expect, it } from 'vitest';-import actionsSource from '@/pages/Actions.tsx?raw';import { getActionsWatchOnlyEmptyState } from '../actionPresentation';const base = {@@ -13,17 +12,11 @@ const base = {};describe('getActionsWatchOnlyEmptyState', () => {- it('keeps large action inventories on the shared bounded list renderer', () => {- expect(actionsSource).toContain('PlatformWindowedList');- expect(actionsSource).toContain('estimatedItemHeight={92}');- });-it('returns nothing while AI is off, so Patrol is not described as running (#905)', () => {expect(getActionsWatchOnlyEmptyState({ ...base, aiEnabled: false })).toBeUndefined();expect(getActionsWatchOnlyEmptyState({ ...base, aiEnabled: false, patrolModesUnlocked: true }),).toBeUndefined();- expect(actionsSource).toContain('aiEnabled: aiAvailabilityStore.enabled === true');});it('returns nothing when Patrol is not in Watch only', () => {diff --git a/frontend-modern/src/features/actions/__tests__/aptActionPresentation.test.ts b/frontend-modern/src/features/actions/__tests__/aptActionPresentation.test.tsindex 66dd34be7b..5bb4793f77 100644--- a/frontend-modern/src/features/actions/__tests__/aptActionPresentation.test.ts+++ b/frontend-modern/src/features/actions/__tests__/aptActionPresentation.test.ts@@ -230,7 +230,5 @@ describe('APT action presentation', () => {expect(source).not.toMatch(/(?:type|enum)\s+APT(?:Execution|Verification|Evidence|Health|Recovery|Compensation)/,);- expect(source).toContain("import type { ActionAuditRecord } from '@/types/actionAudit'");- expect(source).toContain('actionResultV2?.verification');});});diff --git a/frontend-modern/src/features/alerts/AlertAppriseDestinationsSection.test.tsx b/frontend-modern/src/features/alerts/AlertAppriseDestinationsSection.test.tsxindex e92fc9a4a8..9f270dc81b 100644--- a/frontend-modern/src/features/alerts/AlertAppriseDestinationsSection.test.tsx+++ b/frontend-modern/src/features/alerts/AlertAppriseDestinationsSection.test.tsx@@ -81,4 +81,21 @@ describe('AlertAppriseDestinationsSection', () => {expect(screen.getByLabelText('API key')).toHaveAttribute('placeholder', 'Optional API key');});++ it('warns, with the fix, while self-signed certificates are allowed', () => {+ renderSection(makeConfig({ mode: 'http', skipTlsVerify: true }));++ const warning = screen.getByRole('alert');+ expect(warning).toHaveTextContent('TLS verification disabled.');+ expect(warning).toHaveTextContent('this Apprise API endpoint');+ expect(warning).toHaveTextContent(+ 'Install a trusted certificate on the Apprise server before using this in production.',+ );+ });++ it('shows no TLS warning while certificates are verified', () => {+ renderSection(makeConfig({ mode: 'http', skipTlsVerify: false }));++ expect(screen.queryByRole('alert')).not.toBeInTheDocument();+ });});diff --git a/frontend-modern/src/features/alerts/__tests__/AlertHistoryTableAlertRow.test.tsx b/frontend-modern/src/features/alerts/__tests__/AlertHistoryTableAlertRow.test.tsxindex 68536743b7..a3f8970e35 100644--- a/frontend-modern/src/features/alerts/__tests__/AlertHistoryTableAlertRow.test.tsx+++ b/frontend-modern/src/features/alerts/__tests__/AlertHistoryTableAlertRow.test.tsx@@ -14,11 +14,17 @@ vi.mock('@/components/Alerts/InvestigateAlertButton', () => ({InvestigateAlertButton: () => null,}));+vi.mock('../AlertResourceIncidentsPanel', () => ({+ AlertResourceIncidentsPanel: () => <div data-testid="resource-incidents-panel" />,+}));+const NOW = Date.parse('2026-10-06T19:00:00Z');-function createState() {+function createState(resourceIncidentRowKey: string | null = null) {const [expandedIncidents] = createSignal(new Set<string>());- const [resourceIncidentPanel] = createSignal(null);+ const [resourceIncidentPanel] = createSignal<{ rowKey: string } | null>(+ resourceIncidentRowKey ? { rowKey: resourceIncidentRowKey } : null,+ );return {getIncidentRowKey: (alert: HistoryItem) => `${alert.id}-row`,expandedIncidents,@@ -45,11 +51,11 @@ const historyItem = (overrides: Partial<HistoryItem>): HistoryItem => ({...overrides,});-const renderRow = (alert: HistoryItem) =>+const renderRow = (alert: HistoryItem, state: AlertHistoryState = createState()) =>render(() => (<table><tbody>- <AlertHistoryTableAlertRow alert={alert} state={createState()} />+ <AlertHistoryTableAlertRow alert={alert} state={state} /></tbody></table>));@@ -201,4 +207,31 @@ describe('AlertHistoryTableAlertRow', () => {renderRow(historyItem({ status: 'acknowledged' }));expect(screen.getByText('acknowledged')).toHaveClass('text-[11px]', 'px-1.5');});++ // The incidents panel opens under the row that asked for it. Rendered at page+ // level it sat thousands of pixels above a reader scrolled into the history, so+ // the row button read as inert (#1687).+ it('opens the resource incidents panel under only the row that asked for it', () => {+ const alert = historyItem({});+ const asked = renderRow(alert, createState(`${alert.id}-row`));+ expect(screen.getByTestId('resource-incidents-panel')).toBeInTheDocument();+ asked.unmount();++ renderRow(alert, createState('some-other-row'));+ expect(screen.queryByTestId('resource-incidents-panel')).not.toBeInTheDocument();+ });++ it('explains a moved alert in the status badge title', () => {+ const closeDetail =+ 'Moved to pve1 (Host Agent). This is not a recovery: check the agent for the current reading.';+ renderRow(historyItem({ status: 'moved', closeDetail }));++ expect(screen.getByTitle(closeDetail)).toBeInTheDocument();+ });++ it('marks the time cell so the density rules can hide it', () => {+ const { container } = renderRow(historyItem({}));++ expect(container.querySelector('td.alert-history-timestamp-column')).not.toBeNull();+ });});diff --git a/frontend-modern/src/features/alerts/__tests__/AlertHistoryTableSection.test.tsx b/frontend-modern/src/features/alerts/__tests__/AlertHistoryTableSection.test.tsxindex 9101f086a3..55d58bd27b 100644--- a/frontend-modern/src/features/alerts/__tests__/AlertHistoryTableSection.test.tsx+++ b/frontend-modern/src/features/alerts/__tests__/AlertHistoryTableSection.test.tsx@@ -72,4 +72,34 @@ describe('AlertHistoryTableSection layout', () => {setIsMobile(true);expect(layout()).toHaveAttribute('data-alert-history-layout', 'cards');});++ // "Timestamp" needed 93px and ended in an ellipsis in the time track, so the+ // first column is headed "Time", as on the phone card. Each track carries its+ // own width so message, the column that says what happened, is not held to the+ // same share as the time.+ it('heads the first column Time and gives every column its own width track', () => {+ const { container } = render(() => <AlertHistoryTableSection state={state} />);++ const headings = Array.from(container.querySelectorAll('thead th')).map((th) =>+ th.textContent?.trim(),+ );+ expect(headings[0]).toBe('Time');+ expect(headings).not.toContain('Timestamp');+ expect(container.querySelector('thead th')).toHaveClass('alert-history-timestamp-column');++ const tracks = Array.from(+ container.querySelectorAll('table.alert-history-responsive-table col'),+ ).map((col) => col.className.split(' ').pop());+ expect(tracks).toEqual([+ 'alert-history-timestamp-track',+ 'alert-history-resource-track',+ 'alert-history-type-track',+ 'alert-history-severity-track',+ 'alert-history-message-track',+ 'alert-history-duration-track',+ 'alert-history-status-track',+ 'alert-history-node-track',+ 'alert-history-actions-track',+ ]);+ });});diff --git a/frontend-modern/src/features/alerts/__tests__/ResourceMonitoringPolicyAction.test.tsx b/frontend-modern/src/features/alerts/__tests__/ResourceMonitoringPolicyAction.test.tsxindex 471058e469..f0f741f77b 100644--- a/frontend-modern/src/features/alerts/__tests__/ResourceMonitoringPolicyAction.test.tsx+++ b/frontend-modern/src/features/alerts/__tests__/ResourceMonitoringPolicyAction.test.tsx@@ -191,4 +191,46 @@ describe('ResourceMonitoringPolicyAction', () => {);});});++ it('keeps a recurring maintenance window and its descendant scope when the policy changes', async () => {+ const recurrence = {+ timezone: 'Europe/London',+ weekdays: ['sunday'],+ startMinute: 120,+ endMinute: 240,+ };+ operatorStateMock.get.mockResolvedValue({+ canonicalId: 'vm:101',+ monitoringMode: 'normal',+ lifecycleState: 'active',+ intentionallyOffline: false,+ neverAutoRemediate: false,+ autoRemediationPolicy: { enabled: false, capabilityNames: [] },+ maintenanceRecurrence: recurrence,+ maintenanceScope: 'resource_and_descendants',+ setAt: '2026-08-11T09:00:00Z',+ });+ operatorStateMock.set.mockResolvedValue({});+ render(() => (+ <ResourceMonitoringPolicyAction+ resourceId="vm:101"+ resourceName="legacy-lxc"+ resourceType="system-container"+ />+ ));++ fireEvent.click(screen.getByText('Monitoring'));+ fireEvent.click(screen.getByText('Mute all attention'));++ await waitFor(() => {+ expect(operatorStateMock.set).toHaveBeenCalledWith(+ 'vm:101',+ expect.objectContaining({+ monitoringMode: 'muted',+ maintenanceRecurrence: recurrence,+ maintenanceScope: 'resource_and_descendants',+ }),+ );+ });+ });});diff --git a/frontend-modern/src/features/alerts/__tests__/alertsLocalization.guardrails.test.ts b/frontend-modern/src/features/alerts/__tests__/alertsLocalization.guardrails.test.tsdeleted file mode 100644index 7304a55df6..0000000000--- a/frontend-modern/src/features/alerts/__tests__/alertsLocalization.guardrails.test.ts+++ /dev/null@@ -1,85 +0,0 @@-import { describe, expect, it } from 'vitest';-import alertsPageSource from '@/pages/Alerts.tsx?raw';-import activeAlertsSectionSource from '@/features/alerts/AlertOverviewActiveAlertsSection.tsx?raw';-import alertCardSource from '@/features/alerts/AlertOverviewAlertCard.tsx?raw';-import statsCardsSource from '@/features/alerts/AlertOverviewStatsCards.tsx?raw';-import acknowledgementStateSource from '@/features/alerts/useAlertAcknowledgementState.ts?raw';-import snoozeActionSource from '@/features/alerts/AlertSnoozeAction.tsx?raw';-import incidentFiltersSource from '@/components/Alerts/IncidentEventFilters.tsx?raw';-import incidentTimelineSource from '@/components/Alerts/IncidentTimelinePanel.tsx?raw';-import investigateButtonSource from '@/components/Alerts/InvestigateAlertButton.tsx?raw';--const migratedAlertsSurfaceSources = [- alertsPageSource,- activeAlertsSectionSource,- alertCardSource,- statsCardsSource,- acknowledgementStateSource,- snoozeActionSource,- incidentFiltersSource,- incidentTimelineSource,- investigateButtonSource,-] as const;--const migratedAlertsOverviewCopy = [- 'Notifications enabled',- 'Notifications paused',- 'Send notifications',- 'Alerts navigation',- 'Toggle external notifications',- 'Active Alerts',- 'Alerting is paused',- 'Toggle alerts on to resume monitoring and unlock configuration tabs',- 'No active alerts',- 'No unacknowledged alerts',- 'Acknowledge all',- 'Acknowledging',- 'Unacknowledge',- 'Hide Timeline',- 'Triggered (24h)',- 'Workload Overrides',- 'Alert acknowledged',- 'Alert restored',- 'Failed to acknowledge alerts',- 'Ask Pulse Assistant about this alert',- 'Ask Pulse Assistant',- 'Pro required to ask Pulse Assistant about alerts',- 'More AI actions for this alert',- 'More alert actions',- 'Explain with Assistant',- 'Use this alert as read-only context',- 'Have Patrol investigate',- 'Run a targeted Patrol check on this resource',- 'Have Patrol investigate this alert',- 'Alert investigation attached',- 'Diagnostics and remediation require operator approval',- 'No incident timeline available',- 'Filter events:',- 'Incident note',- 'Save Note',- 'Snooze this alert',- 'Pause notifications and escalation',- 'Until tomorrow at 9:00',-] as const;--describe('alerts overview localization guardrails', () => {- it('prevents migrated alerts overview copy from reverting to hardcoded English', () => {- for (const source of migratedAlertsSurfaceSources) {- for (const copy of migratedAlertsOverviewCopy) {- expect(source).not.toContain(copy);- }- }-- expect(alertsPageSource).toContain('alertActivationPresentation().label');- expect(activeAlertsSectionSource).toContain('getAlertOverviewActiveSectionTitle');- expect(activeAlertsSectionSource).toContain('getAlertOverviewGroupDisclosureLabel');- expect(alertCardSource).toContain('getAlertOverviewPrimaryActionLabel');- expect(statsCardsSource).toContain('getAlertOverviewStatsLabels');- expect(acknowledgementStateSource).toContain('getAlertOverviewAcknowledgedNotification');- expect(investigateButtonSource).toContain('alerts.investigate.label');- expect(investigateButtonSource).toContain('alerts.investigate.title');- expect(investigateButtonSource).toContain('alerts.investigate.triggered');- expect(incidentTimelineSource).toContain('getAlertTimelineNotePlaceholder');- expect(incidentFiltersSource).toContain('getAlertTimelineEventTypeLabel');- });-});diff --git a/frontend-modern/src/features/docker/DockerHostDrawer.test.tsx b/frontend-modern/src/features/docker/DockerHostDrawer.test.tsxindex ba9870e03a..2c7370ca21 100644--- a/frontend-modern/src/features/docker/DockerHostDrawer.test.tsx+++ b/frontend-modern/src/features/docker/DockerHostDrawer.test.tsx@@ -14,6 +14,29 @@ const listActionAudits = vi.hoisted(() =>})),);+const temperatureThresholds = vi.hoisted(() => ({+ value: undefined as { warning: number; critical: number } | undefined,+}));++// The real alerts store, except that a test can pin the node temperature+// thresholds the way a user's alert settings would.+vi.mock('@/stores/alertsActivation', async (importOriginal) => {+ const actual = await importOriginal<typeof import('@/stores/alertsActivation')>();+ return {+ ...actual,+ useAlertsActivation: () => {+ const store = actual.useAlertsActivation();+ return {+ ...store,+ getMetricThresholds: (...args: Parameters<typeof store.getMetricThresholds>) =>+ args[1] === 'temperature' && temperatureThresholds.value+ ? temperatureThresholds.value+ : store.getMetricThresholds(...args),+ };+ },+ };+});+vi.mock('@/api/actionAudit', () => ({ ActionAuditAPI: { listActionAudits } }));vi.mock('@/api/resourceOperatorState', () => ({getResourceOperatorState: vi.fn().mockResolvedValue(null),@@ -78,6 +101,7 @@ afterEach(() => {cleanup();resetAIRuntimeState();vi.clearAllMocks();+ temperatureThresholds.value = undefined;for (const id of Object.keys(wsActiveAlerts)) delete wsActiveAlerts[id];});@@ -327,6 +351,26 @@ describe('DockerHostDrawer inventory', () => {}});+ it('colors the CPU temperature from the alert thresholds that apply to the host', () => {+ const reading = { ...inventoryHost(), temperature: 55 } as Resource;++ render(() => <DockerHostDrawer host={reading} />);+ const details = screen.getByTestId('docker-host-technical-details');+ expect(+ within(details)+ .getByText(/^55\s*°C$/)+ .closest('td')?.className ?? '',+ ).not.toContain('text-rose-700');+ cleanup();++ // Above the host's critical threshold the reading is lifted out of Details.+ temperatureThresholds.value = { warning: 40, critical: 50 };+ render(() => <DockerHostDrawer host={reading} />);+ expect(+ within(screen.getByTestId('docker-host-drawer-exceptions')).getByText(/^55\s*°C$/),+ ).toHaveClass('text-rose-700');+ });+it('lifts an offline host and states sizes, not used amounts that would read as live', () => {render(() => (<DockerHostDrawerdiff --git a/frontend-modern/src/features/docker/__tests__/DockerNativeTables.test.tsx b/frontend-modern/src/features/docker/__tests__/DockerNativeTables.test.tsxindex c4e573daae..38c309891e 100644--- a/frontend-modern/src/features/docker/__tests__/DockerNativeTables.test.tsx+++ b/frontend-modern/src/features/docker/__tests__/DockerNativeTables.test.tsx@@ -23,6 +23,26 @@ vi.mock('@/contexts/appRuntime', async (importOriginal) => ({useWebSocket: () => ({ activeAlerts: {} }),}));+// Pass-through spy on the real threshold lookup, so a test can see which+// override ids a table asked for.+const getMetricThresholdsSpy = vi.hoisted(() => vi.fn());+vi.mock('@/stores/alertsActivation', async (importOriginal) => {+ const actual = await importOriginal<typeof import('@/stores/alertsActivation')>();+ return {+ ...actual,+ useAlertsActivation: () => {+ const store = actual.useAlertsActivation();+ return {+ ...store,+ getMetricThresholds: (...args: Parameters<typeof store.getMetricThresholds>) => {+ getMetricThresholdsSpy(...args);+ return store.getMetricThresholds(...args);+ },+ };+ },+ };+});+vi.mock('@/api/resourceActions', () => ({ResourceActionsAPI: {planAction: vi.fn().mockResolvedValue({@@ -124,11 +144,19 @@ vi.mock('@/stores/systemSettings', () => ({// jsdom has no ResizeObserver; stub the shared metric cells like the// DockerHostsTable tests do.vi.mock('@/components/shared/responsive', () => ({- ResponsiveMetricCell: (props: { type: string; isRunning?: boolean; resourceId?: string }) => (+ ResponsiveMetricCell: (props: {+ type: string;+ isRunning?: boolean;+ resourceId?: string;+ thresholds?: { warning: number; critical: number } | null;+ }) => (<divdata-testid={`responsive-${props.type}-metric`}data-resource-id={props.resourceId ?? ''}data-running={String(props.isRunning)}+ data-thresholds={+ props.thresholds ? `${props.thresholds.warning}/${props.thresholds.critical}` : ''+ }/>),}));@@ -1453,6 +1481,43 @@ describe('Docker native tables', () => {expect(screen.getByTitle('Healthy')).toHaveClass('bg-emerald-500');});+ it('keeps the repository and tag of a container image visible', () => {+ setViewportWidth(WORKLOAD_TABLE_WIDE_LAYOUT_WIDTH);++ const { container } = renderInRouter(() => (+ <DockerContainersTable+ resources={[+ makeResource({+ id: 'container-ghcr',+ type: 'app-container',+ name: 'backup-coordinator',+ status: 'running',+ docker: {+ hostname: 'edge-01',+ image: 'ghcr.io/pulse-demo/backup-coordinator:2026.04',+ containerState: 'running',+ },+ }),+ ]}+ emptyIcon={<span />}+ emptyTitle="No containers"+ emptyDescription="No containers"+ showToolbar={false}+ />+ ));++ // The container image cell shares the head/tail reference rendering with the+ // images and services tables: the shared registry head truncates, the+ // repository:tag tail stays visible, and the full reference is on the title.+ const reference = container.querySelector<HTMLElement>('[data-docker-image-reference]');+ expect(reference).not.toBeNull();+ expect(reference).toHaveAttribute('title', 'ghcr.io/pulse-demo/backup-coordinator:2026.04');+ expect(reference).toHaveTextContent('ghcr.io/pulse-demo/backup-coordinator:2026.04');+ expect(reference?.querySelector('[data-docker-image-reference-tail]')).toHaveTextContent(+ 'backup-coordinator:2026.04',+ );+ });+it('keeps the repository and tag of a registry-prefixed image name visible', () => {const { container } = render(() => (<DockerImagesTable@@ -2563,4 +2628,48 @@ describe('Docker native tables', () => {);expect(detail.getByText('Network ID')).toBeInTheDocument();});++ it('looks container alert thresholds up by name-first override ids, so a recreated container keeps its overrides (#1601)', () => {+ const host = makeResource({+ id: 'host-1',+ type: 'docker-host',+ name: 'edge-01',+ status: 'online',+ docker: { hostname: 'edge-01' },+ });++ for (const containerId of ['container-before', 'container-after-recreate']) {+ getMetricThresholdsSpy.mockClear();+ renderInRouter(() => (+ <DockerContainersTable+ resources={[+ makeResource({+ id: containerId,+ type: 'app-container',+ name: 'edge-web',+ status: 'running',+ docker: { hostname: 'edge-01', image: 'nginx:latest', containerState: 'running' },+ }),+ ]}+ hosts={[host]}+ emptyIcon={<span />}+ emptyTitle="No containers"+ emptyDescription="No containers"+ showToolbar={false}+ />+ ));++ const cpuLookups = getMetricThresholdsSpy.mock.calls.filter(+ ([scope, metric]) => scope === 'docker' && metric === 'cpu',+ );+ expect(cpuLookups.length).toBeGreaterThan(0);+ for (const [, , resourceIds] of cpuLookups) {+ // The durable key is host id + container name, whatever the runtime id+ // is now; the old id forms trail as lookup fallbacks.+ expect((resourceIds as string[])[0]).toBe('docker:host-1/edge-web');+ expect(resourceIds).toContain(`docker:host-1/${containerId}`);+ }+ cleanup();+ }+ });});diff --git a/frontend-modern/src/features/docker/__tests__/dockerContainerTableModel.test.ts b/frontend-modern/src/features/docker/__tests__/dockerContainerTableModel.test.tsindex 6f9dcb5016..f90b59eafc 100644--- a/frontend-modern/src/features/docker/__tests__/dockerContainerTableModel.test.ts+++ b/frontend-modern/src/features/docker/__tests__/dockerContainerTableModel.test.ts@@ -284,18 +284,3 @@ describe('dockerContainerTableModel', () => {}});});--describe('docker container alert override identity', () => {- it('resolves alert thresholds through the shared name-first override candidate chain', async () => {- // Overrides key on docker:{host}/{containerName} so they survive- // container recreates (#1601). The table must hand the full container- // resource to the shared candidate builder instead of parsing an id- // tail locally.- const source = (await import('../DockerContainersTable.tsx?raw')).default;- expect(source).toContain(- "import { dockerContainerOverrideIdCandidates } from '@/features/alerts/alertOverridesModel'",- );- expect(source).toContain('dockerContainerOverrideIdCandidates(hostResource, resource)');- expect(source).not.toContain("split('/')");- });-});diff --git a/frontend-modern/src/features/docs/__tests__/completedBackupCountsDocs.test.ts b/frontend-modern/src/features/docs/__tests__/completedBackupCountsDocs.test.tsindex 125fe1dc00..0ca0a56d4f 100644--- a/frontend-modern/src/features/docs/__tests__/completedBackupCountsDocs.test.ts+++ b/frontend-modern/src/features/docs/__tests__/completedBackupCountsDocs.test.ts@@ -47,9 +47,7 @@ describe('completed backup count guidance', () => {it('ships the current labels and separates inventory, job and list scope', () => {expect(read('frontend-modern/public/docs/RECOVERY.md')).toBe(read('docs/RECOVERY.md'));const copy = text();- const tableSource = read('frontend-modern/src/features/proxmox/ProxmoxBackupsTable.tsx');// The restore points carry no per-day chart; the guide must not describe one.- expect(tableSource).not.toContain('BackupActivityChart');for (const label of ['Completed restore points per day', 'Known restore volume per day']) {expect(copy).not.toContain(label);}diff --git a/frontend-modern/src/features/patrol/__tests__/PatrolIntelligenceHeader.render.test.tsx b/frontend-modern/src/features/patrol/__tests__/PatrolIntelligenceHeader.render.test.tsxindex 67cb135894..3d3934b256 100644--- a/frontend-modern/src/features/patrol/__tests__/PatrolIntelligenceHeader.render.test.tsx+++ b/frontend-modern/src/features/patrol/__tests__/PatrolIntelligenceHeader.render.test.tsx@@ -4,6 +4,7 @@ import { createSignal } from 'solid-js';import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';import type { PatrolAutonomyLevel } from '@/api/patrol';+import { settingsTabPath } from '@/components/Settings/settingsNavigationModel';import {PATROL_CONTROL_ANCHOR,PATROL_CONTROL_PATH,@@ -104,6 +105,17 @@ describe('PatrolIntelligenceHeader Patrol mode placement', () => {expect(handleAutonomyChange).toHaveBeenCalledWith('assisted');});+ it('offers one Patrol mode selector and routes configuration to Patrol settings', () => {+ const { state } = createState();+ renderHeader(state);++ expect(screen.getAllByRole('group', { name: 'Patrol mode' })).toHaveLength(1);+ expect(screen.getByRole('link', { name: 'Open Patrol settings' })).toHaveAttribute(+ 'href',+ settingsTabPath('system-ai-patrol'),+ );+ });+it('shows plan-locked installs one inline Patrol mode line instead of a selector', () => {const { state } = createState({ autonomyLevel: 'approval', autoFixLocked: true });renderHeader(state);diff --git a/frontend-modern/src/features/patrol/__tests__/PatrolIntelligenceHeader.test.ts b/frontend-modern/src/features/patrol/__tests__/PatrolIntelligenceHeader.test.tsindex fed7946a98..16a9b0832b 100644--- a/frontend-modern/src/features/patrol/__tests__/PatrolIntelligenceHeader.test.ts+++ b/frontend-modern/src/features/patrol/__tests__/PatrolIntelligenceHeader.test.ts@@ -16,16 +16,14 @@ const headerSource = readFileSync(resolve(__dirname, '..', 'PatrolIntelligenceHeader.tsx'),'utf-8',);-const workspaceSource = readFileSync(- resolve(__dirname, '..', 'PatrolIntelligenceWorkspace.tsx'),- 'utf-8',-);-const bannersSource = readFileSync(- resolve(__dirname, '..', 'PatrolIntelligenceBanners.tsx'),- 'utf-8',-);describe('PatrolIntelligenceHeader', () => {+ it('resolves the header setup action from the block cause before readiness (#1789)', () => {+ expect(headerSource).toContain(+ 'resolvePatrolBlockedActionCause(state.blockedCause(), state.patrolReadiness()?.cause)',+ );+ });+it('does not present the server zero-time sentinel as an Autopilot expiry', () => {expect(getPatrolAutopilotExpiry('0001-01-01T00:00:00Z')).toBeNull();expect(getPatrolAutopilotExpiry('not-a-date')).toBeNull();@@ -35,57 +33,8 @@ describe('PatrolIntelligenceHeader', () => {);});- it('keeps trigger runtime status in the header chrome after setup', () => {- expect(headerSource).toContain('getPatrolTriggerStatusSummary');- expect(headerSource).toContain('state.patrolStatus()?.trigger_status');- expect(headerSource).toContain('!state.shouldShowPatrolSetupOnly() && triggerStatusSummary()');- expect(headerSource).not.toContain('Automation:');- expect(headerSource).not.toContain('Trigger status:');- });-- it('keeps Patrol mode visible while setup blocks running and configuration', () => {- const setupOnlyGateCount = headerSource.match(/!state\.shouldShowPatrolSetupOnly\(\)/g)?.length;-- expect(setupOnlyGateCount).toBeGreaterThanOrEqual(3);- expect(headerSource).toContain('<Show when={!state.shouldShowPatrolSetupOnly()}>');- expect(headerSource).toContain('id={PATROL_CONTROL_ANCHOR}');- expect(headerSource).not.toContain(- '<Show when={!state.shouldShowPatrolSetupOnly()}>\n <div\n id={PATROL_CONTROL_ANCHOR}',- );- expect(headerSource).toContain('Open Patrol settings');- expect(headerSource).toContain("settingsTabPath('system-ai-patrol')");- expect(headerSource).not.toContain('Patrol schedule and model settings');- expect(headerSource).toContain('Check now');- });-- it('opens the collapsed Patrol mode disclosure only for its route anchors', () => {- // Rendered behaviour lives in PatrolIntelligenceHeader.render.test.tsx.- expect(headerSource).toContain('`#${PATROL_CONTROL_ANCHOR}`');- expect(headerSource).toContain('`#${PATROL_OPERATIONS_LOOP_ANCHOR}`');- expect(headerSource).toContain('<details ref={setModeDisclosure}');- expect(headerSource).toContain('PATROL_MODE_ANCHOR_HASHES.has(location.hash)');- expect(headerSource).not.toMatch(/<details[^>]*\sopen[\s=>]/);- });-it('turns provider-blocked manual run controls into setup actions', () => {- expect(headerSource).toContain('runBlockedByProviderSetup');- expect(headerSource).toContain("state.patrolReadiness()?.status === 'not_ready'");- expect(headerSource).toContain('getPatrolSetupAction');- expect(headerSource).toContain('providerSetupAction().href');expect(headerSource).toContain('Fix setup');- expect(headerSource).toContain(- 'resolvePatrolBlockedActionCause(state.blockedCause(), state.patrolReadiness()?.cause)',- );- expect(headerSource).toContain('runButtonDisabled');- expect(headerSource).not.toContain('!state.canTriggerPatrol() ||');- });-- it('keeps manual page sync out of the primary Patrol header actions', () => {- expect(headerSource).not.toContain('handleRefreshPatrol');- expect(headerSource).not.toContain('Sync page data');- expect(headerSource).not.toContain('RefreshCwIcon');- expect(headerSource).not.toContain('animate-spin');- expect(headerSource).not.toContain('Refresh Patrol');});it('keeps primary Patrol actions touch-sized on phones without inflating desktop chrome', () => {@@ -95,7 +44,6 @@ describe('PatrolIntelligenceHeader', () => {expect(headerSource).toContain('flex min-h-11 items-center justify-center gap-2 rounded-md border border-transparent',);- expect(headerSource).toContain('sm:min-h-0');});it('makes Patrol mode a simple four-level choice without rendering plan-locked paid modes', () => {@@ -123,73 +71,7 @@ describe('PatrolIntelligenceHeader', () => {compactLabel: 'Autopilot',},});- expect(headerSource).toContain("['monitor', 'approval', 'assisted', 'full']");- expect(headerSource).toContain("state.autoFixLocked() ? 'monitor' : state.autonomyLevel()");- expect(headerSource).toContain('value={effectiveAutonomyLevel()}');- expect(headerSource).toContain('canChooseAutonomyLevel');- expect(headerSource).toContain('shouldShowAutonomyOptions');- expect(headerSource).toContain('shouldShowAutonomyActionColumn');- expect(headerSource).toContain("autonomyAvailability().kind === 'runtime_locked'");- expect(headerSource).toContain('<Show when={shouldShowAutonomyOptions()}>');- expect(headerSource).toContain('<Show when={shouldShowAutonomyActionColumn()}>');- expect(headerSource).toContain(- "const lockedPaidMode = state.autoFixLocked() && level !== 'monitor'",- );- expect(headerSource).toContain('disabled: lockedPaidMode');- expect(headerSource).toContain('compactLabel: presentation.compactLabel');- expect(headerSource).not.toContain('showPlanLockedModeAction');expect(headerSource).toContain('Patrol mode');- expect(headerSource).not.toContain('getPatrolAutonomyContractPresentation');- expect(headerSource).not.toContain('selectedAutonomyContract');- expect(headerSource).not.toContain('showControlDetails');- expect(headerSource).not.toContain("'Limits'");- expect(headerSource).not.toContain('Hide limits');- expect(headerSource).not.toContain('Hard limits');- expect(headerSource).not.toContain('requires Pulse Pro');- expect(headerSource).not.toContain('const isProLocked = () =>');- expect(headerSource).not.toContain('visualLabel: proLocked');- expect(headerSource).not.toContain('Current mode:');- expect(headerSource).not.toContain('How much can Patrol do?');- expect(headerSource).not.toContain("level === 'full' ? 'assisted'");- expect(headerSource).not.toContain('Autonomous critical remediation');- expect(headerSource).not.toContain('Ask before changes');- expect(headerSource).not.toContain('Auto-fix safe issues');- expect(headerSource).not.toContain('Policy autopilot');- });-- it('keeps Patrol mode inline and routes configuration to settings', () => {- const autonomyControlCallCount =- headerSource.match(/renderAutonomyPolicyControl\(\{/g)?.length ?? 0;- const configurationAutonomyIndex = headerSource.indexOf("ariaLabel: 'Patrol mode'");-- expect(autonomyControlCallCount).toBe(1);- expect(configurationAutonomyIndex).toBeGreaterThan(-1);- expect(headerSource).toContain('Open Patrol settings');- expect(headerSource).toContain("settingsTabPath('system-ai-patrol')");- expect(headerSource).not.toContain('Schedule & model');- expect(headerSource).not.toContain('Patrol schedule and model settings');- expect(headerSource).not.toContain('label="Provider model"');- expect(headerSource).not.toContain('label="Run Every"');- expect(headerSource).not.toContain('FormSelect');- expect(headerSource).not.toContain('showAdvancedSettings');- expect(headerSource).not.toContain('Advanced settings');- expect(headerSource).not.toContain('Advanced Patrol settings');- expect(headerSource).not.toContain('Done');- expect(headerSource).not.toContain('Set Patrol mode');- expect(headerSource).not.toContain('Save Patrol mode');- expect(headerSource).not.toContain('Patrol policy');- expect(headerSource).not.toContain("variant: 'prominent'");- expect(headerSource).not.toContain('Patrol Configuration');- expect(headerSource).not.toContain('Apply Configuration');- });-- it('keeps the Patrol model catalog out of the operator page', () => {- expect(headerSource).not.toContain('showModelCatalog');- expect(headerSource).not.toContain('Provider model');- expect(headerSource).not.toContain('Change model');- expect(headerSource).not.toContain('Hide model list');- expect(headerSource).not.toContain('Choose available model');- expect(headerSource).not.toContain('formatPatrolModelOptionLabel(model)');});it('explains when Patrol mode is locked by plan or runtime', () => {@@ -227,13 +109,6 @@ describe('PatrolIntelligenceHeader', () => {external: false,},});- expect(headerSource).toContain(- 'commercialSurfacesHidden: presentationPolicyHidesCommercialSurfaces(),',- );- expect(headerSource).not.toContain('commercialSurfacesHidden: true');- expect(headerSource).not.toContain('showAutonomyPlanBillingAction');- expect(headerSource).not.toContain('CreditCardIcon');- expect(headerSource).not.toContain('Plans & Billing');const hiddenUpgradePresentation = getPatrolAutonomyAvailabilityPresentation({autoFixLocked: true,@@ -328,34 +203,4 @@ describe('PatrolIntelligenceHeader', () => {body: 'This install does not include container update risk.',});});-- it('keeps trust counters out of the page header chrome', () => {- // Needs Attention and deliberate history review own trust- // state. The header should stay focused on title, recency, and controls.- expect(headerSource).not.toContain('aria-label="Patrol trust summary header"');- expect(headerSource).not.toContain('state.patrolStatus()?.trust');- expect(headerSource).not.toContain('trust.currently_active');- expect(headerSource).not.toContain('trust.regressed_at_least_once');- expect(headerSource).not.toContain('trust.fix_verified');- });-- it('routes every Patrol setup action through the runtime block cause (#1789)', () => {- // A used-up cost budget blocks Patrol while readiness still reads- // "none"; the header, setup card, and paused banner must all resolve the- // action from the block cause first so the operator lands on the budget- // field instead of the model check.- for (const source of [headerSource, bannersSource]) {- expect(source).toContain(- 'resolvePatrolBlockedActionCause(state.blockedCause(), state.patrolReadiness()?.cause)',- );- }- for (const source of [headerSource, workspaceSource, bannersSource]) {- expect(source).not.toContain('getPatrolSetupAction(state.patrolReadiness()?.cause)');- }- // The setup card also reads the persisted runtime finding's cause, because- // the in-memory block state does not survive a restart.- expect(workspaceSource).toContain('state.blockedCause() || setupFindingCause(),');- expect(workspaceSource).toContain('setupFinding()?.failureCause');- expect(workspaceSource).toContain('getPatrolSetupHint(setupCause())');- });});diff --git a/frontend-modern/src/features/patrol/__tests__/PatrolIntelligenceWorkspace.resourceScope.test.tsx b/frontend-modern/src/features/patrol/__tests__/PatrolIntelligenceWorkspace.resourceScope.test.tsxindex 762662fea4..bb4770d31a 100644--- a/frontend-modern/src/features/patrol/__tests__/PatrolIntelligenceWorkspace.resourceScope.test.tsx+++ b/frontend-modern/src/features/patrol/__tests__/PatrolIntelligenceWorkspace.resourceScope.test.tsx@@ -132,7 +132,7 @@ const activeFindings = () => fixture.read().filter((finding) => finding.status =// The latest check failed and its evidence is stale, so the unscoped queue// shows both Patrol check groups.-const makeState = () =>+const makeState = (overrides: Record<string, unknown> = {}) =>({activeTab: () => 'findings',autoFixLocked: () => false,@@ -178,6 +178,7 @@ const makeState = () =>setSelectedRun: vi.fn(),shouldShowPatrolSetupOnly: () => false,triggerPatrolDisabledReason: () => '',+ ...overrides,}) as unknown as PatrolIntelligenceState;const workGroupLabels = () =>@@ -242,6 +243,40 @@ describe('PatrolIntelligenceWorkspace resource scope', () => {expect(screen.getByRole('button', { name: /^Approvals \(2\)$/ })).toBeInTheDocument();});+ it('shows the work groups only once there is open work or a group beyond stale coverage', () => {+ // The last check was clean but is overdue, so stale coverage is the only+ // group Patrol has. Alone it is not open work.+ const staleOnly = {+ patrolPendingApprovalCount: () => 0,+ patrolRunHistory: {+ value: () => [+ {+ completed_at: '2026-10-20T08:00:00Z',+ error_count: 0,+ resources_checked: 12,+ status: 'completed',+ },+ ],+ loading: () => false,+ },+ patrolStatus: () => ({+ error_count: 0,+ next_patrol_at: '2026-10-20T14:00:00Z',+ running: false,+ }),+ };++ fixture.read = () => [];+ render(() => <PatrolIntelligenceWorkspace state={makeState(staleOnly)} />);+ expect(screen.queryByRole('list', { name: 'Patrol work groups' })).not.toBeInTheDocument();+ cleanup();++ // With one open issue the same stale coverage joins the list.+ fixture.read = () => [fixture.findings[2]];+ render(() => <PatrolIntelligenceWorkspace state={makeState(staleOnly)} />);+ expect(workGroupLabels()).toEqual(['Coverage stale']);+ });+it('follows a findings refresh and the end of the scope', () => {const [findings, setFindings] = createSignal(fixture.findings);fixture.read = findings;diff --git a/frontend-modern/src/features/patrol/__tests__/PatrolIntelligenceWorkspace.test.ts b/frontend-modern/src/features/patrol/__tests__/PatrolIntelligenceWorkspace.test.tsindex a680b778ff..b466117d2d 100644--- a/frontend-modern/src/features/patrol/__tests__/PatrolIntelligenceWorkspace.test.ts+++ b/frontend-modern/src/features/patrol/__tests__/PatrolIntelligenceWorkspace.test.ts@@ -17,16 +17,6 @@ const workspaceSource = readFileSync();describe('PatrolIntelligenceWorkspace trust strip', () => {- it('does not render a standalone Trust strip above the workspace tabs', () => {- // Needs Attention and deliberate history review own operator-facing trust state.- // The workspace should not add another standalone counter strip.- expect(workspaceSource).not.toContain('state.patrolStatus()?.trust');- expect(workspaceSource).not.toContain('aria-label="Patrol trust summary"');- expect(workspaceSource).not.toContain('trust.fix_verified');- expect(workspaceSource).not.toContain('trust.auto_resolved');- expect(workspaceSource).not.toContain('trust.dismissed_as_noise');- });-it('connects a provider in place for config-level causes and keeps setup through polling', () => {expect(workspaceSource).toContain('when={setupPanelActive() || isPatrolConnectCause(setupCause())}',@@ -46,58 +36,16 @@ describe('PatrolIntelligenceWorkspace trust strip', () => {);});- it('does not invent trust signals not on FindingsTrustSummary', () => {- // No mention of arbitrary keys like "patrol_score" or "health_grade".- expect(workspaceSource).not.toMatch(/trust\.patrol_score/);- expect(workspaceSource).not.toMatch(/trust\.health_grade/);- });-it('frames findings and run records as Patrol operation records', () => {- expect(workspaceSource).toContain('state.shouldShowPatrolSetupOnly()');- expect(workspaceSource).not.toContain('PATROL_SUPPORTING_CONTEXT');- expect(workspaceSource).not.toContain('ResourceCorrelationSummary');- expect(workspaceSource).not.toContain('ResourcePolicySummary');- expect(workspaceSource).not.toContain('ResourceChangeSummary');- expect(workspaceSource).not.toContain('showInvestigationContext');- expect(workspaceSource).not.toContain('shouldSurfaceInvestigationContext');- expect(workspaceSource).toContain('PATROL_WORKSPACE_SETUP_TITLE');- expect(workspaceSource).toContain('getPatrolWorkspaceSetupDescription(setupCause())');- expect(workspaceSource).toContain('buildPatrolFindingDisplayGroups');- expect(workspaceSource).not.toContain('getPatrolQueueBadgeLabel');- expect(workspaceSource).toContain('queueIssueCount');- expect(workspaceSource).toContain('queueAffectedResourceCount');- expect(workspaceSource).toContain('affectedResourceCount: queueAffectedResourceCount()');- expect(workspaceSource).toContain('findingCount: queueIssueCount()');- expect(workspaceSource).toContain('getPatrolQueueWorkspaceDescription');- expect(workspaceSource).toContain('getPatrolWorkspaceWorkGroups');expect(workspaceSource).toContain('Patrol work groups');- expect(workspaceSource).toContain("group.id !== 'stale-protection'");- expect(workspaceSource).toContain('queueIssueCount() > 0');- expect(workspaceSource).not.toContain('getPatrolWorkspaceProtectionPosture');- expect(workspaceSource).not.toContain('Patrol protection posture');- expect(workspaceSource).not.toContain('protectionPostureSummaries');- expect(workspaceSource).toContain('autonomyLevel: state.autonomyLevel()');- expect(workspaceSource).toContain('autonomyLocked: state.autoFixLocked()');- expect(workspaceSource).not.toContain('queueBadgeLabel');- const removedAllModeCopy =- 'Open work Patrol can ' +- 'watch, investigate, ask you to approve, or record under your Patrol mode.';- expect(workspaceSource).not.toContain(removedAllModeCopy);expect(workspaceSource).toContain('Patrol cannot run yet');expect(workspaceSource).toContain('Once ready');- expect(workspaceSource).toContain('getPatrolSetupAction');- expect(workspaceSource).toContain('getPatrolSetupHint');- expect(workspaceSource).toContain('state.patrolRunHistory.value()?.length');- expect(workspaceSource).not.toContain('showControls={!state.selectedRun() && !isSetupOnly()}');+ expect(workspaceSource).toContain('Show open work');expect(PATROL_WORKSPACE_SETUP_TITLE).toBe('Patrol needs setup');expect(PATROL_WORKSPACE_SETUP_DESCRIPTION).toBe('Patrol cannot check infrastructure until its selected model passes the Patrol tool check.',);expect(PATROL_WORKSPACE_QUEUE_TITLE).toBe('Open work');- expect(workspaceSource).not.toContain('Current Patrol findings');- expect(workspaceSource).toContain('Show open work');- expect(workspaceSource).not.toContain('Show open issues');- expect(workspaceSource).toContain('!state.selectedRun()');expect(PATROL_WORKSPACE_RUN_RECORD_TITLE).toBe('Check details');expect(PATROL_WORKSPACE_RUN_RECORD_DESCRIPTION).toBe('What Patrol found during this run.');expect(PATROL_WORKSPACE_HISTORY_DESCRIPTION).toBe('Past checks and what Patrol recorded.');diff --git a/frontend-modern/src/features/patrol/__tests__/patrolCommercialBoundary.test.ts b/frontend-modern/src/features/patrol/__tests__/patrolCommercialBoundary.test.tsindex 3bf59b5561..699ce9c632 100644--- a/frontend-modern/src/features/patrol/__tests__/patrolCommercialBoundary.test.ts+++ b/frontend-modern/src/features/patrol/__tests__/patrolCommercialBoundary.test.ts@@ -1,75 +1,12 @@import { describe, expect, it } from 'vitest';-import patrolAutonomyAvailabilitySource from '../patrolAutonomyAvailability.ts?raw';-import patrolIntelligenceBannersSource from '../PatrolIntelligenceBanners.tsx?raw';import patrolIntelligenceHeaderSource from '../PatrolIntelligenceHeader.tsx?raw';describe('patrol commercial boundary', () => {- it('suppresses patrol upgrade surfaces when upgrade prompts are hidden', () => {- expect(patrolIntelligenceBannersSource).toContain('presentationPolicyHidesUpgradePrompts');- expect(patrolIntelligenceBannersSource).toContain('!presentationPolicyHidesUpgradePrompts()');- expect(patrolIntelligenceBannersSource).toContain('state.licenseRequired()');- expect(patrolIntelligenceBannersSource).toContain('!state.showBlockedBanner()');- expect(patrolIntelligenceBannersSource).toContain('!state.shouldShowPatrolSetupOnly()');- expect(patrolIntelligenceHeaderSource).toContain('presentationPolicyHidesUpgradePrompts');- expect(patrolIntelligenceHeaderSource).toContain('!presentationPolicyHidesUpgradePrompts()');- expect(patrolIntelligenceHeaderSource).toContain('state.autoFixLocked()');- expect(patrolIntelligenceHeaderSource).toContain(- "autonomyAvailability().kind === 'runtime_locked'",- );- expect(patrolIntelligenceHeaderSource).toContain(- 'commercialSurfacesHidden: presentationPolicyHidesCommercialSurfaces(),',- );- expect(patrolIntelligenceHeaderSource).not.toContain('commercialSurfacesHidden: true');- expect(patrolIntelligenceBannersSource).toContain(- 'commercialSurfacesHidden: presentationPolicyHidesCommercialSurfaces(),',- );- expect(patrolIntelligenceHeaderSource).not.toContain('showAutonomyPlanBillingAction');- expect(patrolAutonomyAvailabilitySource).toContain('Plans & Billing');- expect(patrolAutonomyAvailabilitySource).toContain('input.upgradePromptsHidden');- expect(patrolIntelligenceHeaderSource).toContain('getPatrolAutonomyAvailabilityPresentation');- expect(patrolIntelligenceHeaderSource).toContain('!presentationPolicyHidesUpgradePrompts()');- expect(patrolIntelligenceHeaderSource).toContain('canChooseAutonomyLevel');- expect(patrolIntelligenceHeaderSource).toContain('shouldShowAutonomyOptions');- expect(patrolIntelligenceHeaderSource).toContain('shouldShowAutonomyActionColumn');- expect(patrolIntelligenceHeaderSource).toContain(- "autonomyAvailability().kind === 'runtime_locked'",- );- expect(patrolIntelligenceHeaderSource).toContain('<Show when={shouldShowAutonomyOptions()}>');- expect(patrolIntelligenceHeaderSource).toContain(- '<Show when={shouldShowAutonomyActionColumn()}>',- );- expect(patrolIntelligenceHeaderSource).not.toContain('showProBadge');- expect(patrolIntelligenceHeaderSource).not.toContain('Plans & Billing');- expect(patrolIntelligenceHeaderSource).not.toContain('const isProLocked = () =>');- expect(patrolIntelligenceHeaderSource).not.toContain('requires Pulse Pro');- });-it('keeps patrol configuration out of the operator header', () => {expect(patrolIntelligenceHeaderSource).toContain('Open Patrol settings');- expect(patrolIntelligenceHeaderSource).toContain("settingsTabPath('system-ai-patrol')");- expect(patrolIntelligenceHeaderSource).not.toContain(- "import { FormSelect } from '@/components/shared/FormSelect';",- );- expect(patrolIntelligenceHeaderSource).not.toContain('label="Provider model"');- expect(patrolIntelligenceHeaderSource).not.toContain('label="Run Every"');- expect(patrolIntelligenceHeaderSource).not.toContain('<select');});it('keeps blocked provider readiness to one primary action', () => {- expect(patrolIntelligenceBannersSource).toContain('shouldShowReadinessAction');- expect(patrolIntelligenceBannersSource).toContain(- "state.patrolReadiness()?.status !== 'not_ready'",- );- expect(patrolIntelligenceBannersSource).toContain('<Show when={shouldShowReadinessAction()}>');expect(patrolIntelligenceHeaderSource).toContain('Fix setup');});-- it('does not carry the removed patrol configuration panel chrome', () => {- expect(patrolIntelligenceHeaderSource).not.toContain('fixed right-4 top-32 z-9999 isolate');- expect(patrolIntelligenceHeaderSource).not.toContain('max-h-[calc(100vh-10rem)]');- expect(patrolIntelligenceHeaderSource).not.toContain('sm:max-h-[calc(100vh-14rem)]');- expect(patrolIntelligenceHeaderSource).not.toContain('sm:top-52');- expect(patrolIntelligenceHeaderSource).not.toContain('bg-white p-5 shadow-xl');- expect(patrolIntelligenceHeaderSource).not.toContain('invisible pointer-events-none');- });});diff --git a/frontend-modern/src/features/patrol/__tests__/patrolInvestigationContextModel.test.ts b/frontend-modern/src/features/patrol/__tests__/patrolInvestigationContextModel.test.tsindex 31d9f3aaa5..9df84200e5 100644--- a/frontend-modern/src/features/patrol/__tests__/patrolInvestigationContextModel.test.ts+++ b/frontend-modern/src/features/patrol/__tests__/patrolInvestigationContextModel.test.ts@@ -1,5 +1,3 @@-import { readFileSync } from 'node:fs';-import { resolve } from 'node:path';import { describe, expect, it } from 'vitest';import { buildPatrolInvestigationRecordPresentation } from '../patrolInvestigationContextModel';@@ -167,44 +165,6 @@ describe('patrolInvestigationContextModel', () => {});describe('Patrol page header IA framing', () => {- it('surfaces presenter-owned coverage wording on the recency line in the page header', () => {- // Third wedge of the Patrol page IA reframe. The recency line tells the- // operator when Pulse last ran; the coverage signal tells them what it- // covered. Pin the wiring so the recency render reads- // resourcesCheckedLabel from getPatrolRecencyPresentation and gates on a- // truthy <Show> so zero-coverage runs do not render a coverage phrase,- // and failed or scoped runs do not get hardcoded "verified" wording.- const headerSource = readFileSync(- resolve(__dirname, '..', 'PatrolIntelligenceHeader.tsx'),- 'utf-8',- );- expect(headerSource).toContain('recency().resourcesCheckedLabel');- expect(headerSource).toContain('Show when={recency().resourcesCheckedLabel}');- expect(headerSource).not.toContain('verified {recency().resourcesChecked}');- });-- it('keeps trust counters out of default Patrol chrome', () => {- // Trust counters remain backend/state evidence. The default Patrol surface- // should not reintroduce a second current-work/history strip to explain them.- const surfaceSource = readFileSync(- resolve(__dirname, '..', 'PatrolIntelligenceSurface.tsx'),- 'utf-8',- );- const headerSource = readFileSync(- resolve(__dirname, '..', 'PatrolIntelligenceHeader.tsx'),- 'utf-8',- );- const workspaceSource = readFileSync(- resolve(__dirname, '..', 'PatrolIntelligenceWorkspace.tsx'),- 'utf-8',- );- expect(surfaceSource).not.toContain('PatrolIntelligenceSummary');- expect(surfaceSource).not.toContain('compactAssessmentSummary');- expect(surfaceSource).not.toContain('state.patrolStatus()?.trust?.regressed_at_least_once');- expect(headerSource).not.toContain('aria-label="Patrol trust summary header"');- expect(workspaceSource).not.toContain('aria-label="Patrol trust summary"');- });-it('names the operator job on the canonical Patrol surface when control is available', async () => {// The Patrol page header is the most visible piece of operator-facing// copy on the canonical Patrol surface. The IA framing must keep thediff --git a/frontend-modern/src/features/patrol/__tests__/usePatrolIntelligenceState.test.ts b/frontend-modern/src/features/patrol/__tests__/usePatrolIntelligenceState.test.tsindex 0856b17b85..7500b229a0 100644--- a/frontend-modern/src/features/patrol/__tests__/usePatrolIntelligenceState.test.ts+++ b/frontend-modern/src/features/patrol/__tests__/usePatrolIntelligenceState.test.ts@@ -49,31 +49,8 @@ describe('usePatrolIntelligenceState', () => {vi.clearAllMocks();});- it('bounds manual sync UI state with a generation-aware timeout', () => {- const manualRefreshStart = patrolIntelligenceStateSource.indexOf(- 'async function handleRefreshPatrol()',- );- const manualRefreshBody = patrolIntelligenceStateSource.slice(- manualRefreshStart,- patrolIntelligenceStateSource.indexOf(- 'async function consumeRoutePatrolControlStarterHandoff()',- manualRefreshStart,- ),- );-+ it('bounds manual sync UI state with a timeout', () => {expect(PATROL_MANUAL_SYNC_TIMEOUT_MS).toBe(5000);- expect(patrolIntelligenceStateSource).toContain('let manualRefreshRequestId = 0;');- expect(manualRefreshBody).toContain('const requestId = ++manualRefreshRequestId;');- expect(manualRefreshBody).toContain('}, PATROL_MANUAL_SYNC_TIMEOUT_MS);');- expect(manualRefreshBody).toContain('if (requestId === manualRefreshRequestId) {');- expect(manualRefreshBody).toContain('setIsManualRefreshRunning(false);');- expect(manualRefreshBody).toContain('clearManualRefreshTimeout();');- });-- it('ignores load results that a newer background load superseded', () => {- expect(patrolIntelligenceStateSource).toContain('let refreshRequestId = 0;');- expect(patrolIntelligenceStateSource).toContain('const requestId = ++refreshRequestId;');- expect(patrolIntelligenceStateSource).toContain('if (requestId === refreshRequestId) {');});it('refuses paid Patrol modes in the state owner while governed fixes are locked', () => {@@ -110,84 +87,6 @@ describe('usePatrolIntelligenceState', () => {).toBe('Patrol is already running.');});- it('fails soft when Patrol data refreshes reject', () => {- expect(patrolIntelligenceStateSource).toContain('const [patrolLoadError, setPatrolLoadError]');- expect(patrolIntelligenceStateSource).toContain('rememberPatrolLoadError');- expect(patrolIntelligenceStateSource).toContain('Promise.allSettled([');- expect(patrolIntelligenceStateSource).toContain(- "logger.debug('[Patrol] Failed to refresh Patrol data'",- );- expect(patrolIntelligenceStateSource).toContain('patrolLoadError,');- });-- it('keeps manual status sync bounded to visible Patrol reads', () => {- const loadAllDataStart = patrolIntelligenceStateSource.indexOf('async function loadAllData()');- const loadAllDataEnd = patrolIntelligenceStateSource.indexOf(- 'async function loadVisiblePatrolData()',- loadAllDataStart,- );- const loadAllDataBody = patrolIntelligenceStateSource.slice(loadAllDataStart, loadAllDataEnd);- const manualRefreshStart = patrolIntelligenceStateSource.indexOf(- 'async function handleRefreshPatrol()',- );- const manualRefreshEnd = patrolIntelligenceStateSource.indexOf(- 'async function consumeRoutePatrolControlStarterHandoff()',- manualRefreshStart,- );- const manualRefreshBody = patrolIntelligenceStateSource.slice(- manualRefreshStart,- manualRefreshEnd,- );-- expect(patrolIntelligenceStateSource).toContain('async function loadVisiblePatrolData()');- expect(patrolIntelligenceStateSource).toContain('refetchPatrolStatus()');- expect(patrolIntelligenceStateSource).toContain(- 'aiIntelligenceStore.loadPatrolFindings({ includeResolved: true })',- );- expect(patrolIntelligenceStateSource).toContain('aiIntelligenceStore.loadPendingApprovals()');- expect(patrolIntelligenceStateSource).toContain(- 'patrolRunHistory.refetch({ background: true })',- );- expect(patrolIntelligenceStateSource).toContain(- 'function loadSupportingPatrolDataInBackground()',- );- expect(loadAllDataBody).not.toContain('PATROL_MANUAL_SYNC_TIMEOUT_MS');- expect(manualRefreshBody).toContain('await loadVisiblePatrolData();');- expect(manualRefreshBody).toContain('loadSupportingPatrolDataInBackground();');- expect(manualRefreshBody).toContain('PATROL_MANUAL_SYNC_TIMEOUT_MS');- expect(manualRefreshBody).not.toContain('await loadAllData();');- });-- it('keeps MCP readiness out of first-party Patrol workflow state', () => {- expect(patrolIntelligenceStateSource).not.toContain('agentCapabilitiesManifest');- expect(patrolIntelligenceStateSource).not.toContain('fetchAgentCapabilitiesManifest');- expect(patrolIntelligenceStateSource).not.toContain('getAgentMCPOperationsLoopReadiness');- expect(patrolIntelligenceStateSource).not.toContain('mcpOperationsLoopReadiness');- });-- it('keeps legacy operations-loop status out of Patrol workspace state', () => {- expect(patrolIntelligenceStateSource).not.toContain('fetchAgentOperationsLoopStatus');- expect(patrolIntelligenceStateSource).not.toContain('AgentOperationsLoopStatus');- expect(patrolIntelligenceStateSource).not.toContain('const [patrolWorkStatus');- expect(patrolIntelligenceStateSource).not.toContain('const [patrolWorkStatusChecked');- expect(patrolIntelligenceStateSource).not.toContain('loadPatrolWorkStatus');- expect(patrolIntelligenceStateSource).not.toContain('patrolWorkStatus,');- expect(patrolIntelligenceStateSource).not.toContain('patrolWorkStatusChecked,');- });-- it('consumes route-backed Patrol mode starters before the initial status load', () => {- expect(patrolIntelligenceStateSource).toContain("typeof window === 'undefined'");- expect(patrolIntelligenceStateSource).toContain('window.location.search');- expect(patrolIntelligenceStateSource).toContain('window.history.replaceState');- expect(patrolIntelligenceStateSource).toContain('parsePatrolControlStarter');- expect(patrolIntelligenceStateSource).toContain('PATROL_CONTROL_STARTER');- expect(patrolIntelligenceStateSource).toContain('PATROL_CONTROL_STARTER_QUERY_PARAM');- expect(patrolIntelligenceStateSource).toContain('recordPatrolControlStarterActivity()');- expect(patrolIntelligenceStateSource).toContain(- 'await consumeRoutePatrolControlStarterHandoff();',- );- });-it('records route-backed Patrol mode starters with the shared content-free activity route', async () => {recordWorkflowPromptActivityMock.mockResolvedValueOnce(undefined);@@ -199,17 +98,6 @@ describe('usePatrolIntelligenceState', () => {});});- it('records successful direct Patrol mode changes as first-party starters', () => {- expect(patrolIntelligenceStateSource).toContain('const controlLocked = autoFixLocked();');- expect(patrolIntelligenceStateSource).toContain('const shouldRecordPatrolControlStarter');- expect(patrolIntelligenceStateSource).toContain('!controlLocked &&');- expect(patrolIntelligenceStateSource).toContain('await updatePatrolAutonomySettings({');- expect(patrolIntelligenceStateSource).toContain('if (shouldRecordPatrolControlStarter) {');- expect(patrolIntelligenceStateSource).toContain('await recordPatrolControlStarterActivity();');- expect(patrolIntelligenceStateSource).toContain('await loadVisiblePatrolData();');- expect(patrolIntelligenceStateSource).not.toContain('await loadPatrolWorkStatus();');- });-it('keeps Patrol mode starter recording non-blocking when the marker route fails', async () => {const error = new Error('offline');recordWorkflowPromptActivityMock.mockRejectedValueOnce(error);@@ -263,8 +151,5 @@ describe('usePatrolIntelligenceState', () => {'provider_not_configured',);expect(resolvePatrolBlockedActionCause('', '')).toBeUndefined();- expect(patrolIntelligenceStateSource).toContain(- 'const blockedCause = createMemo(() => patrolStatus()?.blocked_cause);',- );});});diff --git a/frontend-modern/src/features/platformPage/__tests__/PlatformResourceDetailTableRow.test.tsx b/frontend-modern/src/features/platformPage/__tests__/PlatformResourceDetailTableRow.test.tsxindex 6f19a9df77..8773f174f8 100644--- a/frontend-modern/src/features/platformPage/__tests__/PlatformResourceDetailTableRow.test.tsx+++ b/frontend-modern/src/features/platformPage/__tests__/PlatformResourceDetailTableRow.test.tsx@@ -44,6 +44,13 @@ describe('platform resource row context', () => {'Selected datastore',);expect(document.getElementById('selected-row')).toContainElement(screen.getByRole('region'));+ // Row evidence reads above the canonical inspector, never below it.+ expect(+ screen+ .getByRole('region')+ .compareDocumentPosition(screen.getByTestId('canonical-resource-inspector')) &+ Node.DOCUMENT_POSITION_FOLLOWING,+ ).toBeTruthy();expect(screen.getByTestId('canonical-resource-inspector')).toHaveTextContent('canonical-host');setOpen(false);expect(screen.queryByRole('region')).toBeNull();diff --git a/frontend-modern/src/features/platformPage/__tests__/platformOverviewLayout.guardrails.test.ts b/frontend-modern/src/features/platformPage/__tests__/platformOverviewLayout.guardrails.test.tsindex f96e8bd88c..6e292f0c8e 100644--- a/frontend-modern/src/features/platformPage/__tests__/platformOverviewLayout.guardrails.test.ts+++ b/frontend-modern/src/features/platformPage/__tests__/platformOverviewLayout.guardrails.test.ts@@ -3,13 +3,10 @@ import { existsSync, readFileSync } from 'node:fs';import * as ts from 'typescript';import agentsMachinesTableSource from '@/features/standalone/AgentsMachinesTable.tsx?raw';import agentMachineTableModelSource from '@/features/standalone/agentMachineTableModel.ts?raw';-import standalonePageModelSource from '@/features/standalone/standalonePageModel.ts?raw';import standalonePageSurfaceSource from '@/features/standalone/StandalonePageSurface.tsx?raw';import dockerAlertsTableSource from '@/features/docker/DockerAlertsTable.tsx?raw';import dockerConfigsTableSource from '@/features/docker/DockerConfigsTable.tsx?raw';-import dockerContainersTableSource from '@/features/docker/DockerContainersTable.tsx?raw';import dockerHostsTableSource from '@/features/docker/DockerHostsTable.tsx?raw';-import platformHostScopeSource from '@/features/platformPage/PlatformHostScope.tsx?raw';import dockerImagesTableSource from '@/features/docker/DockerImagesTable.tsx?raw';import dockerNetworksTableSource from '@/features/docker/DockerNetworksTable.tsx?raw';import dockerPageSurfaceSource from '@/features/docker/DockerPageSurface.tsx?raw';@@ -34,36 +31,22 @@ import kubernetesPodsTableSource from '@/features/kubernetes/KubernetesPodsTableimport kubernetesPolicyTableSource from '@/features/kubernetes/KubernetesPolicyTable.tsx?raw';import kubernetesServicesTableSource from '@/features/kubernetes/KubernetesServicesTable.tsx?raw';import kubernetesStorageTableSource from '@/features/kubernetes/KubernetesStorageTable.tsx?raw';-// The backups page owns the scope controls and delegates dense table rendering-// to current per-view components; the shared-primitive guardrail follows those-// current table owners.-import proxmoxBackupsTableSource from '@/features/proxmox/ProxmoxBackupsTable.tsx?raw';-import proxmoxBackupServersTableSource from '@/features/proxmox/ProxmoxBackupServersTable.tsx?raw';-import platformResourceDetailRowSource from '@/features/platformPage/PlatformResourceDetailTableRow.tsx?raw';import proxmoxCoverageTableSource from '@/features/proxmox/ProxmoxCoverageTable.tsx?raw';import proxmoxRecoverableTableSource from '@/features/proxmox/ProxmoxRecoverableTable.tsx?raw';-import proxmoxCephClusterDrawerSource from '@/features/proxmox/ProxmoxCephClusterDrawer.tsx?raw';-import proxmoxCephTableSource from '@/features/proxmox/ProxmoxCephTable.tsx?raw';import proxmoxMailGatewayDrawerSource from '@/features/proxmox/ProxmoxMailGatewayDrawer.tsx?raw';-import proxmoxMailGatewayTableSource from '@/features/proxmox/ProxmoxMailGatewayTable.tsx?raw';-import proxmoxNodesTableSource from '@/features/proxmox/ProxmoxNodesTable.tsx?raw';import proxmoxPageSurfaceSource from '@/features/proxmox/ProxmoxPageSurface.tsx?raw';import proxmoxReplicationTableSource from '@/features/proxmox/ProxmoxReplicationTable.tsx?raw';-import sharedPlatformPageSource from '@/features/platformPage/sharedPlatformPage.tsx?raw';-import platformSearchSuggestionsSource from '@/features/platformPage/platformSearchSuggestions.ts?raw';import truenasAlertsTableSource from '@/features/truenas/TrueNASAlertsTable.tsx?raw';import truenasAppsTableSource from '@/features/truenas/TrueNASAppsTable.tsx?raw';import truenasNetworkSharesTableSource from '@/features/truenas/TrueNASNetworkSharesTable.tsx?raw';import truenasPageSurfaceSource from '@/features/truenas/TrueNASPageSurface.tsx?raw';import truenasProtectionTableSource from '@/features/truenas/TrueNASProtectionTable.tsx?raw';-import truenasServicesTableSource from '@/features/truenas/TrueNASServicesTable.tsx?raw';import truenasStorageTopologyTableSource from '@/features/truenas/TrueNASStorageTopologyTable.tsx?raw';import truenasSystemsTableSource from '@/features/truenas/TrueNASSystemsTable.tsx?raw';import truenasVirtualMachinesTableSource from '@/features/truenas/TrueNASVirtualMachinesTable.tsx?raw';import vmwarePageSurfaceSource from '@/features/vmware/VmwarePageSurface.tsx?raw';import vsphereActivityTableSource from '@/features/vmware/VsphereActivityTable.tsx?raw';import vsphereAlertsTableSource from '@/features/vmware/VsphereAlertsTable.tsx?raw';-import vsphereDatastoresTableSource from '@/features/vmware/VsphereDatastoresTable.tsx?raw';import vsphereHostsTableSource from '@/features/vmware/VsphereHostsTable.tsx?raw';import vsphereNetworksTableSource from '@/features/vmware/VsphereNetworksTable.tsx?raw';import storageSurfaceSource from '@/components/Storage/Storage.tsx?raw';@@ -72,87 +55,6 @@ import workloadsSurfaceSource from '@/components/Workloads/WorkloadsSurface.tsx?const indexCssSource = readFileSync('src/index.css', 'utf8');-const platformTableSources = [- agentsMachinesTableSource,- dockerAlertsTableSource,- dockerContainersTableSource,- dockerHostsTableSource,- dockerImagesTableSource,- dockerVolumesTableSource,- dockerNetworksTableSource,- dockerStorageUsageTableSource,- dockerSwarmNodesTableSource,- dockerServicesTableSource,- dockerTasksTableSource,- dockerSecretsTableSource,- dockerConfigsTableSource,- kubernetesAlertsTableSource,- kubernetesAutoscalingTableSource,- kubernetesClustersTableSource,- kubernetesConfigTableSource,- kubernetesControllersTableSource,- kubernetesNodesTableSource,- kubernetesPodsTableSource,- kubernetesDeploymentsTableSource,- kubernetesEventsTableSource,- kubernetesNetworkingTableSource,- kubernetesPolicyTableSource,- kubernetesServicesTableSource,- kubernetesStorageTableSource,- truenasAlertsTableSource,- truenasAppsTableSource,- truenasNetworkSharesTableSource,- truenasProtectionTableSource,- truenasServicesTableSource,- truenasStorageTopologyTableSource,- truenasSystemsTableSource,- truenasVirtualMachinesTableSource,- vsphereActivityTableSource,- vsphereAlertsTableSource,- vsphereDatastoresTableSource,- vsphereHostsTableSource,- vsphereNetworksTableSource,-];--const platformShellTableSources = [- ...platformTableSources,- proxmoxNodesTableSource,- proxmoxBackupServersTableSource,- proxmoxCoverageTableSource,- proxmoxRecoverableTableSource,- proxmoxCephTableSource,- proxmoxMailGatewayTableSource,- proxmoxReplicationTableSource,-];--const platformToolbarTableSources = [- agentsMachinesTableSource,- dockerContainersTableSource,- dockerHostsTableSource,- dockerImagesTableSource,- dockerVolumesTableSource,- dockerNetworksTableSource,- dockerSwarmNodesTableSource,- dockerServicesTableSource,- dockerTasksTableSource,- dockerSecretsTableSource,- dockerConfigsTableSource,- kubernetesAutoscalingTableSource,- kubernetesClustersTableSource,- kubernetesConfigTableSource,- kubernetesControllersTableSource,- kubernetesNodesTableSource,- kubernetesPodsTableSource,- kubernetesDeploymentsTableSource,- kubernetesEventsTableSource,- kubernetesNetworkingTableSource,- kubernetesPolicyTableSource,- kubernetesServicesTableSource,- kubernetesStorageTableSource,- truenasSystemsTableSource,- vsphereHostsTableSource,-];-const overviewSurfaceSources = [standalonePageSurfaceSource,proxmoxPageSurfaceSource,@@ -162,25 +64,6 @@ const overviewSurfaceSources = [vmwarePageSurfaceSource,];-const proxmoxDetailTableSources = [- proxmoxCephTableSource,- proxmoxMailGatewayTableSource,- proxmoxReplicationTableSource,-];--const proxmoxBespokeTableSources = [- proxmoxCoverageTableSource,- proxmoxRecoverableTableSource,- proxmoxBackupServersTableSource,- proxmoxCephTableSource,- proxmoxMailGatewayTableSource,- proxmoxReplicationTableSource,-];--// The Ceph cluster drawer shows its pools and daemons as detail-section-// cards, so only the Mail Gateway's node and domain tables remain here.-const proxmoxInlineDetailTableSources = [proxmoxMailGatewayDrawerSource];-type JsxTag = ts.JsxOpeningElement | ts.JsxSelfClosingElement;function parseTsx(source: string): ts.SourceFile {@@ -257,139 +140,10 @@ function enclosingTab(tag: ts.Node): string | undefined {}describe('platform overview layout guardrails', () => {- it('keeps selected datastore context outside the canonical host inspector', () => {- const resourceRow = proxmoxBackupServersTableSource.match(- /<PlatformResourceDetailTableRow\b[\s\S]*?\n\s*\/>/,- )?.[0];- expect(resourceRow).toContain('resource={row.resource}');- expect(resourceRow).toContain('<BackupServerDatastoreContext');- expect(resourceRow).not.toMatch(/resource=\{\{[\s\S]*?datastore/);- const contextAt = platformResourceDetailRowSource.indexOf('{props.context}');- const inspectorAt = platformResourceDetailRowSource.indexOf('<ResourceDetailDrawer');- expect(contextAt).toBeGreaterThan(-1);- expect(inspectorAt).toBeGreaterThan(contextAt);- // A store is row evidence, never another canonical resource/History target.- expect(platformResourceDetailRowSource.slice(inspectorAt)).not.toContain('props.context');- expect(platformResourceDetailRowSource.slice(inspectorAt)).toContain(- 'resource={props.resource}',- );- });- it('keeps attention summaries canonical without a competing estate panel', () => {- for (const source of [truenasProtectionTableSource, vsphereAlertsTableSource]) {- expect(source).toContain('withPlatformStatusCounts');- expect(source).not.toContain('PlatformAttentionSummary');- }- for (const source of overviewSurfaceSources) {- expect(source).not.toContain('PlatformEstateOverview');- expect(source).not.toContain('PlatformAttentionSummary');- }- expect(proxmoxPageSurfaceSource).toContain('inventoryStats={workloadsState.inventoryStats}');- expect(vmwarePageSurfaceSource).toContain('inventoryStats={workloadsState.inventoryStats}');- });-- it('keeps platform inventory tables on the shared dense table styling contract', () => {- expect(sharedPlatformPageSource).toContain('PLATFORM_TABLE_CARD_CLASS');- expect(sharedPlatformPageSource).toContain('PLATFORM_TABLE_HEADER_ROW_CLASS');- expect(sharedPlatformPageSource).toContain('PLATFORM_TABLE_BODY_CLASS');- expect(sharedPlatformPageSource).toContain('getPlatformTableHeadClass');- expect(sharedPlatformPageSource).toContain('getPlatformTableCellClass');- expect(sharedPlatformPageSource).toContain('getPlatformTableResponsiveMinWidthClass');- expect(sharedPlatformPageSource).toContain('PLATFORM_TABLE_DEFAULT_RESPONSIVE_MIN_WIDTH_CLASS');- expect(sharedPlatformPageSource).toContain('PlatformTableToolbar');- expect(sharedPlatformPageSource).toContain('PlatformTableLoadingState');- expect(sharedPlatformPageSource).toContain('PlatformTableShell');- expect(sharedPlatformPageSource).toContain('createPlatformTableFilterState');- expect(sharedPlatformPageSource).toContain('PLATFORM_HEALTH_FILTER_OPTIONS');-- for (const source of platformShellTableSources) {- expect(source).toContain('PlatformTableShell');- // Headers resolve their canonical kind-based class either directly- // (getPlatformTableHeadClassForKind) or through the shared sortable- // header component, which applies the same helper internally.- expect(- source.includes('getPlatformTableHeadClass') ||- source.includes('PlatformSortableTableHead'),- 'table headers must use getPlatformTableHeadClassForKind or PlatformSortableTableHead',- ).toBe(true);- expect(source).toContain('getPlatformTableCellClass');- expect(source).not.toContain('TableCard class={PLATFORM_TABLE_CARD_CLASS}');- expect(source).not.toContain('TableCardHeader');- expect(source).not.toContain('TableRow class={PLATFORM_TABLE_HEADER_ROW_CLASS}');- expect(source).not.toContain('TableBody class={PLATFORM_TABLE_BODY_CLASS}');- }-- for (const source of platformToolbarTableSources) {- expect(source).toContain('PlatformTableToolbar');- expect(source).toContain('createPlatformTableFilterState');- expect(source).toContain('searchSuggestions=');- expect(source).toContain('PLATFORM_HEALTH_FILTER_OPTIONS');- expect(source).not.toContain('ViewOptionsMenu');- expect(source).not.toContain("from '@/components/shared/SearchInput'");- expect(source).not.toContain("from '@/components/shared/FilterButtonGroup'");- // Forbid a bespoke search signal (`const [search, setSearch] = createSignal`)- // — tables must read search from createPlatformTableFilterState. The comma- // keeps URL-backed scope state (`const [searchParams, ...] = useSearchParams`)- // out of the net, since that is shared-FilterBar plumbing, not a rogue box.- expect(source).not.toContain('const [search, ');- }-- expect(platformSearchSuggestionsSource).toContain('buildPlatformResourceSearchSuggestions');- expect(platformSearchSuggestionsSource).not.toContain('platformData');- });-- it('keeps Proxmox detail tables on the shared platform table primitives', () => {- for (const source of proxmoxBespokeTableSources) {- expect(source).toContain('PlatformTableShell');- expect(source).toContain('getPlatformTableHeadClassForKind');- expect(source).toContain('getPlatformTableCellClassForKind');- expect(source).not.toContain('TableCard class={PLATFORM_TABLE_CARD_CLASS}');- expect(source).not.toContain('TableRow class={PLATFORM_TABLE_HEADER_ROW_CLASS}');- expect(source).not.toContain('TableBody class={PLATFORM_TABLE_BODY_CLASS}');- expect(source).not.toContain('border-collapse text-xs');- expect(source).not.toContain('bg-surface-alt text-muted border-b border-border');- }-- for (const source of proxmoxDetailTableSources) {- expect(source).toContain('PlatformTableToolbar');- expect(source).not.toContain("from '@/components/shared/SearchInput'");- expect(source).not.toContain("from '@/components/shared/FilterButtonGroup'");- }- });-- it('keeps Proxmox inline detail tables on shared platform table primitives', () => {- for (const source of proxmoxInlineDetailTableSources) {- expect(source).toContain('PlatformDetailTable');- expect(source).toContain('PlatformDetailTableHeader');- expect(source).toContain('PlatformDetailTableBody');- expect(source).toContain('getPlatformTableHeadClassForKind');- expect(source).toContain('getPlatformTableCellClassForKind');- expect(source).not.toMatch(- /import \{[^}]*\bTable\b[^}]*\} from '@\/components\/shared\/Table'/,- );- expect(source).not.toMatch(- /import \{[^}]*\bTableHeader\b[^}]*\} from '@\/components\/shared\/Table'/,- );- expect(source).not.toMatch(- /import \{[^}]*\bTableBody\b[^}]*\} from '@\/components\/shared\/Table'/,- );- expect(source).not.toContain('PLATFORM_TABLE_HEADER_ROW_CLASS');- expect(source).not.toContain('PLATFORM_TABLE_BODY_CLASS');- expect(source).not.toContain('<table');- expect(source).not.toContain('<thead');- expect(source).not.toContain('<tbody');- expect(source).not.toContain('divide-y divide-border-subtle');- }- // Ceph pools and daemons are shared detail-section cards, not a hand list.- expect(proxmoxCephClusterDrawerSource).toContain('<TechnicalDetailsSection');- expect(proxmoxCephClusterDrawerSource).not.toContain('<dl');- expect(proxmoxCephClusterDrawerSource).not.toContain('<table');- });-it('keeps Mail Gateway drawer tables prioritized for narrow inline details', () => {expect(proxmoxMailGatewayDrawerSource).toContain('<PlatformDetailTable class="min-w-0 table-fixed text-xs">',);- expect(sharedPlatformPageSource).toContain('phoneVerticalScrollOwner="page"');expect(proxmoxMailGatewayDrawerSource).toContain('platform-table-mobile-w-10 platform-table-narrow-hidden md:w-[15%]',);@@ -512,17 +266,6 @@ describe('platform overview layout guardrails', () => {);});- it('keeps Docker image references readable by their repository and tag', () => {- // References that share a registry and namespace differ only at the end, so- // every image cell truncates the shared head and keeps name:tag visible.- expect(dockerImagesTableSource).toMatch(/<DockerResourceNameCell[\s\S]{0,80}?imageReference/);- for (const source of [dockerContainersTableSource, dockerServicesTableSource]) {- expect(source).toContain(- '<DockerImageReferenceText reference={image()} class="max-w-full" />',- );- }- });-it('keeps platform summary cells truncating inside their own column', () => {// A capped inline-block (max-w-52 truncate) ignored the column width, so a// long value spilled past a narrow cell without an ellipsis and sat above@@ -637,70 +380,19 @@ describe('platform overview layout guardrails', () => {);});- it('keeps provider overview pages in the parent-table plus child-inventory stack', () => {+ it('keeps provider overview tables on their tuned layout widths', () => {for (const source of overviewSurfaceSources) {expect(source).toMatch(/<div[^>]*class="[^"]*\bspace-y-4\b[^"]*"/);- expect(source).toContain('<PlatformSectionTabs');- expect(source).toContain('<PlatformTableLoadingState');- expect(source).toContain('PlatformTableEmptyState');- expect(source).toContain('PlatformErrorState');}- expect(proxmoxPageSurfaceSource).toContain('<ProxmoxNodesTable');- expect(proxmoxPageSurfaceSource).not.toContain('<ProxmoxBackupServersTable');- expect(proxmoxPageSurfaceSource).toContain('<WorkloadsSurface');- expect(proxmoxPageSurfaceSource).toContain(- "const PROXMOX_WORKLOAD_EXCLUDED_TYPES = ['app-container'] as const",- );- expect(proxmoxPageSurfaceSource).toContain(- 'excludedWorkloadTypes: PROXMOX_WORKLOAD_EXCLUDED_TYPES',- );- expect(proxmoxPageSurfaceSource).toContain('showNestedExcludedWorkloads: true');- expect(dockerPageSurfaceSource).toContain('<DockerHostsTable');- expect(dockerPageSurfaceSource).toContain('<DockerContainersTable');- expect(dockerPageSurfaceSource).toContain('<DockerImagesTable');- expect(dockerPageSurfaceSource).toContain('<DockerVolumesTable');- expect(dockerPageSurfaceSource).toContain('<DockerNetworksTable');- expect(dockerNetworksTableSource).toContain('DOCKER_NETWORK_COLUMN_WIDTH_CLASS');expect(dockerNetworksTableSource).toContain("attached: 'w-[25%]'");expect(dockerNetworksTableSource).toContain("driver: 'w-[15%]'");expect(dockerNetworksTableSource).toContain("attention: 'w-[15%]'");- expect(dockerPageSurfaceSource).not.toContain('<WorkloadsSurface');- expect(dockerPageSurfaceSource).toContain('<DockerSwarmNodesTable');- expect(dockerPageSurfaceSource).toContain('<DockerServicesTable');- expect(dockerPageSurfaceSource).toContain('<DockerTasksTable');- expect(dockerPageSurfaceSource).toContain('<DockerSecretsTable');- expect(dockerPageSurfaceSource).toContain('<DockerConfigsTable');- expect(kubernetesPageSurfaceSource).toContain('<KubernetesClustersTable');- expect(kubernetesPageSurfaceSource).toContain('<KubernetesNodesTable');- expect(kubernetesPageSurfaceSource).toContain('<KubernetesPodsTable');- expect(kubernetesPageSurfaceSource).toContain('<KubernetesDeploymentsTable');- expect(kubernetesPageSurfaceSource).toContain('<KubernetesControllersTable');- expect(kubernetesPageSurfaceSource).toContain('<KubernetesServicesTable');- expect(kubernetesPageSurfaceSource).toContain('<KubernetesStorageTable');- expect(kubernetesPageSurfaceSource).toContain('<KubernetesNetworkingTable');- expect(kubernetesPageSurfaceSource).toContain('<KubernetesConfigTable');- expect(kubernetesPageSurfaceSource).toContain('<KubernetesPolicyTable');- expect(kubernetesPageSurfaceSource).toContain('<KubernetesAutoscalingTable');- expect(kubernetesPageSurfaceSource).toContain('<KubernetesEventsTable');- expect(truenasPageSurfaceSource).toContain('<TrueNASSystemsTable');- expect(truenasPageSurfaceSource).toContain('<TrueNASAlertsTable');- expect(truenasPageSurfaceSource).toContain('<TrueNASVirtualMachinesTable');- expect(truenasPageSurfaceSource).toContain('<TrueNASAppsTable');- expect(truenasPageSurfaceSource).toContain('<TrueNASStorageTopologyTable');- expect(truenasPageSurfaceSource).toContain('<TrueNASProtection');- expect(truenasPageSurfaceSource).toContain('platform: TRUENAS_PLATFORM_FILTER');- expect(truenasPageSurfaceSource).toContain(- 'source=truenas&type=agent,vm,app-container,network-share,storage,physical_disk',- );- expect(truenasPageSurfaceSource).not.toContain('forcedView="pools"');- expect(truenasPageSurfaceSource).not.toContain('<RecoverySurface');- expect(truenasPageSurfaceSource).not.toContain('<StorageSurface');- expect(truenasPageSurfaceSource).not.toContain('<WorkloadsSurface');- expect(truenasPageSurfaceSource).not.toContain('<TrueNASDisksTable');expect(truenasAppsTableSource).toContain('md:min-w-[960px]');+ // These classes are the TSX half of the container-query rebalancing in+ // src/index.css (th.truenas-app-*-column); jsdom cannot render container+ // queries, so renaming one silently kills the CSS.expect(truenasAppsTableSource).toContain('truenas-app-name-column');- expect(truenasAppsTableSource).toContain('truenas-app-name-value');expect(truenasAppsTableSource).toContain('truenas-app-containers-column');expect(truenasAppsTableSource).toContain('truenas-app-updates-column');expect(truenasAppsTableSource).toContain(@@ -712,60 +404,18 @@ describe('platform overview layout guardrails', () => {expect(truenasAppsTableSource).toContain('<PlatformResponsiveTableLabel compact="I" full="Image" />',);- expect(kubernetesServicesTableSource).toContain('kubernetes-service-name-column');- expect(kubernetesServicesTableSource).toContain('kubernetes-service-name-value');- expect(kubernetesServicesTableSource).toContain('kubernetes-service-ports-column');- expect(kubernetesNetworkingTableSource).toContain('kubernetes-network-name-column');- expect(kubernetesNetworkingTableSource).toContain('kubernetes-network-name-value');- expect(kubernetesNetworkingTableSource).toContain('kubernetes-network-ports-column');- expect(truenasAppsTableSource).not.toContain('Volumes');expect(truenasNetworkSharesTableSource).toContain('md:min-w-[960px]');- expect(truenasNetworkSharesTableSource).not.toMatch(- /getPlatformTableHeadClassForKind\('text'\)[\s\S]{0,200}?Dataset/,- );- expect(truenasProtectionTableSource).not.toContain('Signal');expect(truenasProtectionTableSource).toContain('md:min-w-[960px]');expect(truenasStorageTopologyTableSource).toContain('md:min-w-[960px]');expect(truenasVirtualMachinesTableSource).toContain('md:min-w-[960px]');expect(truenasVirtualMachinesTableSource).toMatch(/class="hidden sm:table-cell md:w-\[26%\]"[\s\S]{0,120}?Flags/,);- expect(vmwarePageSurfaceSource).toContain('<VsphereHostsTable');- expect(vmwarePageSurfaceSource).toContain('<VsphereAlertsTable');- expect(vmwarePageSurfaceSource).toContain("activeTab() === 'health'");- expect(vmwarePageSurfaceSource).not.toContain('<VsphereVirtualMachinesTable');- expect(vmwarePageSurfaceSource).toContain('<WorkloadsSurface');- expect(vmwarePageSurfaceSource).toContain('forcedPlatform={VMWARE_PLATFORM_FILTER}');- expect(vmwarePageSurfaceSource).toContain('forcedViewMode="vm"');- expect(vmwarePageSurfaceSource).toContain('suppressTypeFilter');- expect(vmwarePageSurfaceSource).toContain('<VsphereDatastoresTable');- expect(vmwarePageSurfaceSource).toContain('<VsphereNetworksTable');expect(vsphereNetworksTableSource).toMatch(/sortKey="vms"[\s\S]{0,120}?class="platform-table-mobile-w-15 md:w-\[5%\]"/,);- expect(vmwarePageSurfaceSource).toContain('<VsphereActivityTable');- expect(vmwarePageSurfaceSource).not.toContain('<StorageSurface');- expect(vmwarePageSurfaceSource).not.toContain('forcedView="pools"');- expect(proxmoxPageSurfaceSource).toContain('suppressNodeFilter');- expect(proxmoxReplicationTableSource).toContain('REPLICATION_COLUMN_WIDTH_CLASS');expect(proxmoxReplicationTableSource).toContain("guest: 'w-[20%]'");expect(proxmoxReplicationTableSource).toContain("fails: 'w-[4%]'");- expect(standalonePageSurfaceSource).toContain('<AgentsMachinesTable');- expect(standalonePageSurfaceSource).not.toContain('InfrastructureSummary');- expect(standalonePageSurfaceSource).not.toContain('StickySummarySection');- expect(standalonePageSurfaceSource).not.toContain('ChartVisibilityToggleButton');- expect(standalonePageSurfaceSource).not.toContain('FilterBar');- expect(standalonePageSurfaceSource).not.toContain('UnifiedResourceTable');- expect(agentsMachinesTableSource).toContain('PlatformResourceDetailTableRow');- expect(agentsMachinesTableSource).not.toContain('ResourceDetailDrawer');- expect(standalonePageModelSource).not.toContain('buildAgentsPageFilterModel');- expect(standalonePageModelSource).not.toContain('buildStandalonePageFilterModel');- });-- it('keeps TrueNAS overview inventory in tables instead of summary cards', () => {- expect(truenasPageSurfaceSource).toContain('<TrueNASSystemsTable');- expect(truenasPageSurfaceSource).not.toContain('TrueNASInventorySummary');- expect(truenasPageSurfaceSource).not.toContain('data-truenas-summary-tile');});it('keeps secondary overview tables from rendering duplicate standalone toolbars', () => {@@ -791,16 +441,9 @@ describe('platform overview layout guardrails', () => {['ProxmoxPageSurface', proxmoxPageSurfaceSource],['VmwarePageSurface', vmwarePageSurfaceSource],];- expect(platformHostScopeSource, 'the shared title is an accessible heading').toContain('<h2');for (const [name, source] of surfacesWithSharedToolbar) {const filterCount = (source.match(/<WorkloadsFilter\b/g) ?? []).length;expect(filterCount, `${name} should render exactly one <WorkloadsFilter>`).toBe(1);- expect(source, `${name} names its workloads table even in kiosk`).toContain('tableTitle={');- // The shared host-scoped title renders the heading, so a scoped table- // names its host the same way on every platform.- expect(source, `${name} uses the shared table heading`).toContain(- '<PlatformHostScopedTableTitle',- );expect(source.indexOf('<WorkloadsFilter'),`${name} filter precedes the surface`,@@ -971,11 +614,9 @@ describe('platform overview layout guardrails', () => {expect(vsphereHostsTableSource).toMatch(/sortKey="vms"[\s\S]{0,180}?class="platform-table-mobile-w-10 w-\[12%\] md:w-\[4%\]"[\s\S]{0,80}?VMs/,);- expect(vsphereHostsTableSource).toContain('hidden md:table-cell');// AgentsMachinesTable uses a column-config pattern: kind helpers are// applied dynamically in the table render, with labels living in the// model. Assert against the model's column declarations.- expect(agentsMachinesTableSource).toMatch(/getPlatformTableHeadClassForKind\(kind\(\)\)/);expect(agentMachineTableModelSource).toMatch(/id:\s*'machine'[\s\S]{0,80}?label:\s*'Machine'[\s\S]{0,80}?kind:\s*'name'/,);@@ -989,27 +630,4 @@ describe('platform overview layout guardrails', () => {/id:\s*'disk'[\s\S]{0,80}?label:\s*'Disk'[\s\S]{0,80}?kind:\s*'metric-bar'/,);});-- it('keeps recovery view and filter state with the platform tab that owns the rows', () => {- // No aggregate Recovery page or shared recovery serializer exists, so each- // platform tab owns its recovery state (storage-recovery forbidden path 9).- // The Proxmox Backups view switch is navigation above the filter bar.- const sectionTabsAt = proxmoxBackupsTableSource.indexOf('<PlatformSectionTabs');- const filterBarAt = proxmoxBackupsTableSource.indexOf('<FilterBar');- expect(sectionTabsAt).toBeGreaterThan(-1);- expect(filterBarAt).toBeGreaterThan(sectionTabsAt);- // The restore points carry no activity chart, so no day or range state.- expect(proxmoxBackupsTableSource).not.toContain('BackupActivityChart');- expect(proxmoxBackupsTableSource).not.toMatch(/PROXMOX_BACKUPS_QUERY_PARAMS\.range\b/);- for (const call of proxmoxBackupsTableSource.match(/setSearchParams\([^;]*/g) ?? []) {- expect(call).not.toMatch(/\brange\b|chartRange/);- }- // The TrueNAS Protection table keeps search, status and sort out of the URL.- expect(truenasProtectionTableSource).not.toContain('useSearchParams');- expect(truenasProtectionTableSource).not.toContain('@/routing/resourceLinks');- expect(truenasProtectionTableSource).toContain('createPlatformTableFilterState({');- expect(truenasProtectionTableSource).toMatch(- /createPlatformTableSortState\(\{\s*storageKey: 'truenasProtection'/,- );- });});diff --git a/frontend-modern/src/features/proxmox/__tests__/ProxmoxBackupsTable.test.tsx b/frontend-modern/src/features/proxmox/__tests__/ProxmoxBackupsTable.test.tsxindex 47d603e063..2f1e9e96c0 100644--- a/frontend-modern/src/features/proxmox/__tests__/ProxmoxBackupsTable.test.tsx+++ b/frontend-modern/src/features/proxmox/__tests__/ProxmoxBackupsTable.test.tsx@@ -13,9 +13,6 @@ import {identityTask,} from '../__fixtures__/backupIdentity';import { buildBackupServerRows, ProxmoxBackupServersTable } from '../ProxmoxBackupServersTable';-import proxmoxBackupServersTableSource from '../ProxmoxBackupServersTable.tsx?raw';-import proxmoxBackupsTableSource from '../ProxmoxBackupsTable.tsx?raw';-import proxmoxPageSurfaceSource from '../ProxmoxPageSurface.tsx?raw';import {PLATFORM_TABLE_BODY_CLASS,PLATFORM_TABLE_HEADER_ROW_CLASS,@@ -632,16 +629,6 @@ describe('ProxmoxBackupsTable', () => {// the protected count and reason rows.expect(healthSummary.parentElement).toHaveClass('hidden', 'sm:inline');- expect(proxmoxBackupsTableSource).toContain('<PlatformSectionTabs');- expect(proxmoxBackupsTableSource).not.toContain('FilterSegmentedControl');- expect(proxmoxBackupsTableSource).toContain('buildProxmoxBackupsPath');- expect(proxmoxBackupsTableSource).toContain('trailingControls={');- expect(proxmoxBackupsTableSource).toContain('<PlatformResourceCounter');- expect(proxmoxBackupServersTableSource).toContain(- '<PlatformResponsiveTableLabel\n compact="Bkps"',- );- expect(proxmoxBackupServersTableSource).not.toContain('compact="#"');-// The two route-backed sections exist...expect(screen.getByRole('navigation', { name: /backup views/i })).toBeInTheDocument();expect(screen.getByRole('link', { name: /by date/i })).toHaveAttribute(@@ -1227,108 +1214,6 @@ describe('ProxmoxBackupsTable', () => {);expect(emptyStateHeading.closest('.border-dashed')).not.toBeNull();});-- it('routes top-level loading and error states through shared platform primitives', () => {- expect(proxmoxBackupsTableSource).toContain('PlatformErrorState');- expect(proxmoxBackupsTableSource).toContain('PlatformTableLoadingState');- expect(proxmoxBackupsTableSource).toContain('title="Could not load Proxmox backup inventory"');- expect(proxmoxBackupsTableSource).toContain('title="Loading Proxmox backup inventory"');- expect(proxmoxBackupsTableSource).not.toContain(- 'inline-flex min-h-10 items-center rounded-md border border-border px-3 py-2 text-sm font-medium hover:bg-surface-hover',- );- });-- it('keeps PBS backup count and capacity cells on shared platform primitives', () => {- const directLocaleCountCall = 'row.backupCount.' + 'toLocale' + 'String()';- const directDatastorePercentRound = 'Math.round(pct() ?? 0)}' + '%';-- expect(proxmoxBackupServersTableSource).toContain('PlatformTableNumberValue');- expect(proxmoxBackupServersTableSource).toContain('formatPlatformTableIntegerValue');- expect(proxmoxBackupServersTableSource).toContain('PlatformTablePercentValue');- expect(proxmoxBackupServersTableSource).toContain('formatPlatformTablePercentValue');- expect(proxmoxBackupServersTableSource).not.toContain(directLocaleCountCall);- expect(proxmoxBackupServersTableSource).not.toContain(directDatastorePercentRound);- });-- it('routes PBS server expansion through the canonical resource drawer', () => {- expect(proxmoxBackupServersTableSource).toContain('PlatformResourceDetailTableRow');- expect(proxmoxBackupServersTableSource).toContain('resource={row.resource}');- expect(proxmoxBackupServersTableSource).toContain('initialShowHostDetails');- expect(proxmoxBackupServersTableSource).toContain('uniquelyCorrelatedAgent');- // A single agent can surface as both a PVE guest and a standalone host row;- // collapse those by agent identity, and keep declining genuinely ambiguous- // matches.- expect(proxmoxBackupServersTableSource).toContain('correlatedAgentKey');- expect(proxmoxBackupServersTableSource).toContain(- 'if (byAgentKey.size !== 1) return undefined;',- );- expect(proxmoxBackupServersTableSource).toContain(- 'metricsTarget: agent.metricsTarget ?? server.metricsTarget',- );- // A refresh that briefly omits the correlated host row must not flip the- // drawer target to the PBS service key; retain the resolved host per server- // and reuse it only across the omission.- expect(proxmoxBackupServersTableSource).toContain('createPbsCorrelationRetention');- expect(proxmoxBackupServersTableSource).toContain('hasCorrelationCandidate');- expect(proxmoxBackupServersTableSource).toContain(- 'buildBackupServerRows(props.servers, props.backups ?? [], retention)',- );- expect(proxmoxBackupServersTableSource).not.toContain(- '<span class="font-medium text-base-content">Server:</span>',- );- });-- it('keeps backup coverage fed by Proxmox VM/LXC guests when Overview demotes app containers', () => {- expect(proxmoxPageSurfaceSource).toContain(- 'excludedWorkloadTypes: PROXMOX_WORKLOAD_EXCLUDED_TYPES',- );- expect(proxmoxPageSurfaceSource).toContain('showNestedExcludedWorkloads: true');- expect(proxmoxPageSurfaceSource).toContain('workloads={model().guests}');- expect(proxmoxPageSurfaceSource).not.toContain('workloads={workloadsState.allGuests');- });-- it('keeps Overview guest totals aligned with the filtered Workloads collection', () => {- // Guest totals now render as the shared toolbar inventory counts, fed by- // the workloads state whose collection already excludes demoted app- // containers. They must never come from the raw model summary counts.- expect(proxmoxPageSurfaceSource).toContain('inventoryStats={workloadsState.inventoryStats}');- expect(proxmoxPageSurfaceSource).not.toContain(- 'currentModel().summary.runningGuestCount} running',- );- expect(proxmoxPageSurfaceSource).not.toContain(- 'currentModel().summary.stoppedGuestCount} stopped',- );- });-- it('keeps the overview node and guest regions on one canonical resource snapshot', () => {- expect(proxmoxPageSurfaceSource).toContain('const overviewResources = useUnifiedResources({');- expect(proxmoxPageSurfaceSource).toContain("cacheKey: 'proxmox-overview'");- expect(proxmoxPageSurfaceSource).toContain('resourceSnapshot={() =>');- expect(proxmoxPageSurfaceSource).toContain(- 'resourceSnapshotRefetch={() => overviewResources.refetch()}',- );- expect(proxmoxPageSurfaceSource).toContain('useWorkloadsState({');- expect(proxmoxPageSurfaceSource).toContain('resourceSnapshot: props.resourceSnapshot');- expect(proxmoxPageSurfaceSource).not.toContain(- 'useWorkloads({ enabled: () => workloadsEnabled() })',- );- });-- it('keeps the shared storage surface scoped to the whole Proxmox product family', () => {- expect(proxmoxPageSurfaceSource).toContain("const PROXMOX_PLATFORM_FILTER = 'proxmox-all';");- expect(proxmoxPageSurfaceSource).toContain('forcedSourceFilter={PROXMOX_PLATFORM_FILTER}');- expect(proxmoxPageSurfaceSource).not.toContain(- "const PROXMOX_PLATFORM_FILTER = 'proxmox-pve';",- );- });-- it('keeps Patrol coverage out of Proxmox evidence surfaces', () => {- expect(proxmoxPageSurfaceSource).not.toContain('getMonitorContextPatrolProtectionPosture');- expect(proxmoxPageSurfaceSource).not.toContain('getPatrolRunHistory(1)');- expect(proxmoxPageSurfaceSource).not.toContain('aria-label="Proxmox Patrol coverage"');- expect(proxmoxPageSurfaceSource).not.toContain('aria-label="Patrol protection posture"');- expect(proxmoxBackupsTableSource).not.toContain('Proxmox Patrol coverage');- });});const emptyPVE = { data: { backupTasks: [], storageBackups: [], guestSnapshots: [] } };diff --git a/frontend-modern/src/features/proxmox/__tests__/ProxmoxCephTable.test.tsx b/frontend-modern/src/features/proxmox/__tests__/ProxmoxCephTable.test.tsxindex e14cd728d5..79b34b5f79 100644--- a/frontend-modern/src/features/proxmox/__tests__/ProxmoxCephTable.test.tsx+++ b/frontend-modern/src/features/proxmox/__tests__/ProxmoxCephTable.test.tsx@@ -8,7 +8,6 @@ import {CEPH_PHONE_COLUMN_WIDTHS,ProxmoxCephTable,} from '../ProxmoxCephTable';-import cephClusterDrawerSource from '../ProxmoxCephClusterDrawer.tsx?raw';const activeAlerts: Record<string, unknown> = {};@@ -235,7 +234,6 @@ describe('ProxmoxCephTable', () => {const heading = screen.getByRole('heading', { level: 2, name: 'ceph-main' });expect(heading.parentElement?.querySelector('[aria-label="Healthy"]')).not.toBeNull();- expect(cephClusterDrawerSource).not.toContain('function classifyHealth');expect(screen.getByRole('tab', { name: 'Overview' })).toBeInTheDocument();expect(screen.getByRole('tab', { name: 'Manage' })).toBeInTheDocument();expect(screen.getByTestId('drawer-no-attention')).toHaveTextContent('No active alerts');diff --git a/frontend-modern/src/features/proxmox/__tests__/ProxmoxMailGatewayTable.test.ts b/frontend-modern/src/features/proxmox/__tests__/ProxmoxMailGatewayTable.test.tsindex 6c1adff0a6..6ed2a5ca7c 100644--- a/frontend-modern/src/features/proxmox/__tests__/ProxmoxMailGatewayTable.test.ts+++ b/frontend-modern/src/features/proxmox/__tests__/ProxmoxMailGatewayTable.test.ts@@ -9,22 +9,8 @@ import {MAIL_GATEWAY_PHONE_COLUMNS,MAIL_GATEWAY_PHONE_COLUMN_WIDTHS,} from '../ProxmoxMailGatewayTable';-import mailGatewayDrawerSource from '../ProxmoxMailGatewayDrawer.tsx?raw';-import mailGatewayTableSource from '../ProxmoxMailGatewayTable.tsx?raw';describe('ProxmoxMailGatewayTable phone presentation', () => {- it('keeps mail-flow figures on shared detail rows and card chrome', () => {- expect(mailGatewayDrawerSource).toContain('makeDetailRow(');- expect(mailGatewayDrawerSource).toContain('<TechnicalDetailsSection');- expect(mailGatewayDrawerSource).toContain('<InfoCardFrame');- expect(mailGatewayDrawerSource).not.toContain('function InOutBar');- expect(mailGatewayDrawerSource).not.toContain('<Card');- expect(mailGatewayDrawerSource).not.toContain('<h4');- expect(mailGatewayDrawerSource).not.toMatch(- /class="flex items-baseline justify-between[^\"]*">\s*<span class="text-muted">/,- );- });-it('keeps gateway names distinguishable with five phone tracks', () => {// A sixth track (node count) truncated "mail-gateway-eu" and// "mail-gateway-us" to the same text; the count lives in the expansion.@@ -70,26 +56,4 @@ describe('ProxmoxMailGatewayTable phone presentation', () => {expect(Math.min(...widths)).toBeGreaterThan(7);expect(widths.reduce((total, width) => total + width, 0)).toBeCloseTo(100, 1);});-- it('matches gateway alerts across identity aliases and opens the one resource drawer', () => {- // Alerts are keyed by the PMG instance id, rows by the unified id.- expect(mailGatewayTableSource).toContain('getResourceIdentityAliases(resource)');- expect(mailGatewayTableSource).toContain(- 'filterPlatformResources(resources, search, status, effectiveStatus)',- );- // The row opens the canonical resource drawer headed by its own dot; the- // Mail tab body is headless and leaves status and alerts to that drawer.- expect(mailGatewayTableSource).toContain('<PlatformResourceDetailTableRow');- expect(mailGatewayTableSource).toContain('statusIndicator={indicator()}');- expect(mailGatewayDrawerSource).not.toContain('DrawerAttentionSection');- expect(mailGatewayDrawerSource).not.toContain('ObjectDrawerHeader');- expect(mailGatewayDrawerSource).not.toContain('function classifyHealth');- });-- it('keeps alerting rows single-line by marking the metric the alert is about', () => {- // Platform table rows stay on one line, so an alert colours its own number- // rather than stacking a reason under the gateway name.- expect(mailGatewayTableSource).toContain('<AlertedMetric alerts={columnAlerts(');- expect(mailGatewayTableSource).not.toContain('data-mail-gateway-alert-reason');- });});diff --git a/frontend-modern/src/features/proxmox/__tests__/ProxmoxPageSurface.contract.test.tsx b/frontend-modern/src/features/proxmox/__tests__/ProxmoxPageSurface.contract.test.tsxindex 7fd2767e7e..4f3381b682 100644--- a/frontend-modern/src/features/proxmox/__tests__/ProxmoxPageSurface.contract.test.tsx+++ b/frontend-modern/src/features/proxmox/__tests__/ProxmoxPageSurface.contract.test.tsx@@ -6,10 +6,6 @@ import type { UnifiedResourceFacets } from '@/hooks/useUnifiedResources';import type { Resource } from '@/types/resource';import { ProxmoxPageSurface } from '../ProxmoxPageSurface';import { ReplicationInventoryFormatError } from '../proxmoxReplicationInventory';-import proxmoxPageSurfaceSource from '../ProxmoxPageSurface.tsx?raw';-import proxmoxBackupServersTableSource from '../ProxmoxBackupServersTable.tsx?raw';-import proxmoxBackupsTableSource from '../ProxmoxBackupsTable.tsx?raw';-import proxmoxRecoverableTableSource from '../ProxmoxRecoverableTable.tsx?raw';const mockUseUnifiedResources = vi.fn();const mockPathname = vi.hoisted(() => vi.fn(() => '/proxmox/overview'));@@ -276,7 +272,6 @@ describe('ProxmoxPageSurface contract', () => {expect(screen.getByTestId('storage-surface')).toBeInTheDocument();const props = mockStorageProps.mock.lastCall?.[0] as { routeActive?: boolean };expect(props.routeActive).toBe(true);- expect(proxmoxPageSurfaceSource).toContain("routeActive={activeTab() === 'storage'}");});it('surfaces stale agent-backed Proxmox nodes', () => {@@ -375,7 +370,6 @@ describe('ProxmoxPageSurface contract', () => {search: mockWorkloadSearch,}),);- expect(proxmoxPageSurfaceSource).toContain('search={workloadsState.search}');});it('does not call a retained version from a stopped Proxmox agent currently running', () => {@@ -496,34 +490,6 @@ describe('ProxmoxPageSurface contract', () => {);});- it('keeps Proxmox workload and backup filters free of a saved-views affordance', () => {- // Saved views persisted the page's URL query string to localStorage. The- // browser's own bookmarks already do that and survive a cleared cache, so- // the control was removed; PROXMOX_BACKUPS_QUERY_PARAMS keeps the backup- // toolbar URL-owned and therefore still shareable.- expect(proxmoxPageSurfaceSource).not.toContain('savedViewsKey');- expect(proxmoxBackupsTableSource).not.toContain('savedViewsKey');- expect(proxmoxBackupsTableSource).not.toContain('SavedViews');- });-- it('keeps backup identity constrained and narrow restore scope readable', () => {- expect(proxmoxBackupServersTableSource).not.toContain(- 'font-mono text-[10px] font-normal text-muted',- );- expect(proxmoxBackupServersTableSource).toContain(- "title={[row.serverName, row.datastore?.name].filter(Boolean).join(' · ')}",- );- // Date-feed rows stay on one line at every width: the identity truncates- // and full scope lives in the drawer. Real inventory/width/focus cases live- // in recoverableIdentityAccess.test.tsx, not this source-wiring check.- expect(proxmoxRecoverableTableSource).toContain(- 'class="flex min-w-0 flex-1 items-baseline gap-1.5"',- );- expect(proxmoxRecoverableTableSource).toContain('data-backup-workload-connection');- expect(proxmoxRecoverableTableSource).not.toContain("whitespace-normal wrap-anywhere'");- expect(proxmoxRecoverableTableSource).not.toContain('data-backup-location');- });-it('hydrates only the active source-scoped resource family', () => {setResources([makeResource({@@ -564,9 +530,6 @@ describe('ProxmoxPageSurface contract', () => {expect(options[0].enabled).toBeUndefined();expect(options[1].enabled?.()).toBe(true);expect(options.slice(2).every((value) => value.enabled?.() === false)).toBe(true);- expect(proxmoxPageSurfaceSource).not.toContain('backgroundHydrationTabs');- expect(proxmoxPageSurfaceSource).not.toContain('requestIdleCallback');- expect(proxmoxPageSurfaceSource).toContain('resourceSource={storageResources}');});it('reuses guests and hydrates standalone PBS telemetry without duplicate candidates', () => {@@ -654,23 +617,6 @@ describe('ProxmoxPageSurface contract', () => {}});- it('places workload controls beside the workload table they affect', () => {- const nodesTableIndex = proxmoxPageSurfaceSource.indexOf('<ProxmoxNodesTable');- const workloadFilterIndex = proxmoxPageSurfaceSource.indexOf('<WorkloadsFilter');- const workloadsSurfaceIndex = proxmoxPageSurfaceSource.indexOf('<WorkloadsSurface');-- expect(nodesTableIndex).toBeGreaterThan(-1);- expect(workloadFilterIndex).toBeGreaterThan(nodesTableIndex);- expect(workloadsSurfaceIndex).toBeGreaterThan(workloadFilterIndex);- expect(proxmoxPageSurfaceSource).not.toContain('<ProxmoxBackupServersTable');- expect(proxmoxPageSurfaceSource).toContain(- '{...getWorkloadsMetricFilterProps(workloadsState)}',- );- expect(proxmoxPageSurfaceSource).not.toContain(- 'metricHoverMode={workloadsState.workloadMetricHoverMode}',- );- });-it('renders the one workload toolbar above the guests table once workload state is ready', () => {setResources([makeResource({ id: 'vm-1', type: 'vm' })]);@@ -712,17 +658,6 @@ describe('ProxmoxPageSurface contract', () => {);});- it('keeps the bounded node preview before guests at every viewport', () => {- expect(proxmoxPageSurfaceSource).toContain('<section>\n <ProxmoxNodesTable');- expect(proxmoxPageSurfaceSource).toContain('class="space-y-3 scroll-mt-4"');- expect(proxmoxPageSurfaceSource).not.toContain('order-2 lg:order-1');- expect(proxmoxPageSurfaceSource).not.toContain('order-1 space-y-3');- expect(proxmoxPageSurfaceSource).toContain('id="proxmox-guests-section"');- expect(proxmoxPageSurfaceSource).toContain('tableTitle={');- expect(proxmoxPageSurfaceSource).toContain('headingId="proxmox-guests-heading"');- expect(proxmoxPageSurfaceSource).not.toContain('class="flex items-center gap-2 px-1"');- });-it('keeps Patrol coverage off the Proxmox overview', () => {setResources([makeResource({diff --git a/frontend-modern/src/features/proxmox/__tests__/proxmoxBackupsTableShared.test.tsx b/frontend-modern/src/features/proxmox/__tests__/proxmoxBackupsTableShared.test.tsxindex 6e9e1929ed..4f75b032d1 100644--- a/frontend-modern/src/features/proxmox/__tests__/proxmoxBackupsTableShared.test.tsx+++ b/frontend-modern/src/features/proxmox/__tests__/proxmoxBackupsTableShared.test.tsx@@ -3,10 +3,6 @@ import { cleanup, render, screen, within } from '@solidjs/testing-library';import { createSignal } from 'solid-js';import { getMetadataBadgeClass } from '@/components/shared/MetadataBadge';import { WorkloadTypeBadge } from '@/components/shared/WorkloadTypeBadge';-import proxmoxBackupServersTableSource from '../ProxmoxBackupServersTable.tsx?raw';-import proxmoxCoverageTableSource from '../ProxmoxCoverageTable.tsx?raw';-import proxmoxRecoverableTableSource from '../ProxmoxRecoverableTable.tsx?raw';-import proxmoxBackupsTableSharedSource from '../proxmoxBackupsTableShared.tsx?raw';import {ArtifactSourceBadge,ArtifactStateBadge,@@ -47,13 +43,6 @@ describe('proxmoxBackupsTableShared', () => {expect(backupBadge).toHaveAttribute('title', 'Host backup');});- it('does not carry local VM/LXC/Host badge color branches', () => {- expect(proxmoxBackupsTableSharedSource).toContain('SharedWorkloadTypeBadge');- expect(proxmoxBackupsTableSharedSource).not.toContain('bg-indigo');- expect(proxmoxBackupsTableSharedSource).not.toContain('bg-teal');- expect(proxmoxBackupsTableSharedSource).not.toContain('bg-slate');- });-it('renders backup source and state chips through MetadataBadge', () => {render(() => (<>@@ -135,29 +124,6 @@ describe('proxmoxBackupsTableShared', () => {}});- it('keeps backup source and state chips on the shared MetadataBadge primitive', () => {- expect(proxmoxBackupsTableSharedSource).toContain('MetadataBadge');- expect(proxmoxBackupsTableSharedSource).toContain('PROXMOX_BACKUP_METADATA_BADGE_PROPS');- expect(proxmoxBackupsTableSharedSource).toContain('presentation().badgeTone');- expect(proxmoxBackupsTableSharedSource).not.toContain('presentation().badgeClassName');- expect(proxmoxBackupsTableSharedSource).not.toMatch(- /inline-flex items-center rounded-xs px-1\.5 py-0\.5 text-\[10px\] font-semibold/,- );- });-- it('keeps backup byte-size cells on the shared platform table formatter', () => {- const sources = [- proxmoxBackupServersTableSource,- proxmoxCoverageTableSource,- proxmoxRecoverableTableSource,- ];-- for (const source of sources) {- expect(source).toContain('formatPlatformTableBytesValue');- expect(source).not.toContain('formatBytes(');- }- });-it('drops the age suffix in the phone projection and keeps the timestamp on hover', () => {const createdAt = new Date(Date.now() - 18 * 60 * 60 * 1000).toISOString();expect(formatCompactBackupAge(createdAt)).toBe('18h');@@ -180,17 +146,6 @@ describe('proxmoxBackupsTableShared', () => {expect(age.closest('[title]')?.getAttribute('title')).toContain(createdAt);});- it('keeps backup age text on the shared relative-time primitive', () => {- expect(proxmoxBackupsTableSharedSource).toContain('PlatformTableRelativeTimeValue');- expect(proxmoxBackupsTableSharedSource).not.toContain('formatRelativeTime(');- });-- it('keeps backup sort headers on the shared active-only indicator', () => {- expect(proxmoxBackupsTableSharedSource).toContain('getTableSortIndicator');- expect(proxmoxBackupsTableSharedSource).not.toContain('ArrowUpDownIcon');- expect(proxmoxBackupsTableSharedSource).not.toContain('SORT_ICON_CLASS');- });-it('keeps sortable headers in the same uppercase as their plain neighbours', () => {render(() => (<table>diff --git a/frontend-modern/src/features/proxmox/__tests__/proxmoxDrawerPlacement.contract.test.ts b/frontend-modern/src/features/proxmox/__tests__/proxmoxDrawerPlacement.contract.test.tsdeleted file mode 100644index 288f347bc3..0000000000--- a/frontend-modern/src/features/proxmox/__tests__/proxmoxDrawerPlacement.contract.test.ts+++ /dev/null@@ -1,16 +0,0 @@-import { describe, expect, it } from 'vitest';--import workloadsStateSource from '@/components/Workloads/useWorkloadsState.ts?raw';-import workloadPanelSource from '@/components/Workloads/WorkloadPanel.tsx?raw';-import proxmoxNodesTableSource from '../ProxmoxNodesTable.tsx?raw';-import proxmoxPageSurfaceSource from '../ProxmoxPageSurface.tsx?raw';--describe('Proxmox drawer placement contract', () => {- it('keeps host details owned by the Proxmox host table instead of the embedded guest table', () => {- expect(workloadsStateSource).not.toContain('groupNodeDrawerMode');- expect(workloadPanelSource).not.toContain('NodeDrawer');- expect(proxmoxPageSurfaceSource).not.toContain('groupNodeDrawerMode');- expect(proxmoxNodesTableSource).toContain('NodeDrawer');- expect(proxmoxNodesTableSource).toContain('data-inline-detail-for={node.id}');- });-});diff --git a/frontend-modern/src/features/standalone/__tests__/AgentsMachinesTable.test.tsx b/frontend-modern/src/features/standalone/__tests__/AgentsMachinesTable.test.tsxindex 6fbf0669d7..6ba198027e 100644--- a/frontend-modern/src/features/standalone/__tests__/AgentsMachinesTable.test.tsx+++ b/frontend-modern/src/features/standalone/__tests__/AgentsMachinesTable.test.tsx@@ -38,6 +38,29 @@ vi.mock('@/api/monitoring', () => ({},}));+const temperatureThresholds = vi.hoisted(() => ({+ value: undefined as { warning: number; critical: number } | undefined,+}));++// The real alerts store, except that a test can pin the node temperature+// thresholds the way a user's alert settings would.+vi.mock('@/stores/alertsActivation', async (importOriginal) => {+ const actual = await importOriginal<typeof import('@/stores/alertsActivation')>();+ return {+ ...actual,+ useAlertsActivation: () => {+ const store = actual.useAlertsActivation();+ return {+ ...store,+ getMetricThresholds: (...args: Parameters<typeof store.getMetricThresholds>) =>+ args[1] === 'temperature' && temperatureThresholds.value+ ? temperatureThresholds.value+ : store.getMetricThresholds(...args),+ };+ },+ };+});+// The websocket's activeAlerts is a Solid store, so rows must follow it live.const activeAlertsRef = vi.hoisted(() => ({ current: {} as Record<string, Alert> }));@@ -154,6 +177,7 @@ beforeEach(() => {});afterEach(() => {+ temperatureThresholds.value = undefined;cleanup();setActiveAlerts(reconcile({}));window.localStorage.clear();@@ -1449,6 +1473,33 @@ describe('AgentsMachinesTable', () => {expect(screen.getByText('1400 RPM')).toBeInTheDocument();});+ it('colors the machine temperature from the alert thresholds that apply to it', async () => {+ temperatureThresholds.value = { warning: 50, critical: 60 };+ const { container } = render(() => (+ <AgentsMachinesTable+ resources={[+ resource({+ id: 'warm-host',+ name: 'Warm Host',+ agent: { sensors: { temperatureCelsius: { 'cpu.package': 61 } } },+ }),+ ]}+ emptyIcon={emptyIcon}+ emptyTitle="No machines"+ emptyDescription="Install Pulse Agent."+ />+ ));++ await openMachineColumnPicker();+ await fireEvent.click(screen.getByLabelText('Temp'));+ const trigger = container.querySelector(+ '[data-agents-machine-row="warm-host"] [data-agent-machine-temperature-trigger="true"]',+ ) as HTMLElement;+ // 61°C is below the default critical level, so the red text comes from+ // the configured thresholds.+ expect(within(trigger).getByText('61°C')).toHaveClass('text-red-600');+ });+it('shows a retained disk temperature as last known, never as a current reading', async () => {// A reporting agent whose SMART probe returned no temperature keeps the// last reading with a non-available collection state. (A host agent pastdiff --git a/frontend-modern/src/features/vmware/__tests__/VmwarePageSurface.contract.test.tsx b/frontend-modern/src/features/vmware/__tests__/VmwarePageSurface.contract.test.tsxindex e065d06118..e24bd76408 100644--- a/frontend-modern/src/features/vmware/__tests__/VmwarePageSurface.contract.test.tsx+++ b/frontend-modern/src/features/vmware/__tests__/VmwarePageSurface.contract.test.tsx@@ -4,7 +4,6 @@ import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';import type { Resource } from '@/types/resource';import { workloadNodeScopeId } from '@/components/Workloads/workloadTopology';import { VmwarePageSurface } from '../VmwarePageSurface';-import vmwarePageSurfaceSource from '../VmwarePageSurface.tsx?raw';const mockUseUnifiedResources = vi.fn();const mockPathname = vi.hoisted(() => vi.fn(() => '/vmware/overview'));@@ -172,13 +171,6 @@ describe('VmwarePageSurface contract', () => {vi.clearAllMocks();});- it('uses the complete canonical workload metric-control binding', () => {- expect(vmwarePageSurfaceSource).toContain('{...getWorkloadsMetricFilterProps(workloadsState)}');- expect(vmwarePageSurfaceSource).not.toContain(- 'metricDisplayMode={workloadsState.workloadMetricDisplayMode}',- );- });-it('renders the one workload toolbar above the VM table once workload state is ready', () => {setResources([makeResource({ id: 'vm-app-01', type: 'vm' })]);diff --git a/frontend-modern/src/hooks/__tests__/useUnifiedResources.test.ts b/frontend-modern/src/hooks/__tests__/useUnifiedResources.test.tsindex cb720d195d..a0850b921f 100644--- a/frontend-modern/src/hooks/__tests__/useUnifiedResources.test.ts+++ b/frontend-modern/src/hooks/__tests__/useUnifiedResources.test.ts@@ -6,7 +6,6 @@ import { getDockerContainerLifecycleDisabledReason } from '@/features/docker/docimport type { State } from '@/types/api';import type { Resource } from '@/types/resource';import useUnifiedResourcesSource from '../useUnifiedResources.ts?raw';-import stringUtilsSource from '@/utils/stringUtils.ts?raw';import { RESOURCE_METADATA_CHANGED_EVENT } from '@/utils/resourceMetadataEvents';type UseUnifiedResourcesModule = typeof import('@/hooks/useUnifiedResources');@@ -3666,16 +3665,6 @@ describe('useUnifiedResources', () => {it('uses the shared org scope helper for cache and fetch state', () => {expect(useUnifiedResourcesSource).toContain('normalizeOrgScope(getOrgID())');- expect(useUnifiedResourcesSource).toContain('supportsCanonicalWsHydration');- expect(useUnifiedResourcesSource).toContain("initialHydration === 'prefer-ws'");- expect(useUnifiedResourcesSource).toContain('wsStore.state.resources');expect(useUnifiedResourcesSource).not.toContain("const DEFAULT_ORG_SCOPE = 'default'");- expect(useUnifiedResourcesSource).not.toContain('const normalizeOrgScope =');- expect(useUnifiedResourcesSource).toContain('asTrimmedString');- expect(useUnifiedResourcesSource).not.toContain('UNIFIED_RESOURCES_MAX_PAGES');- expect(useUnifiedResourcesSource).not.toContain(- 'const asTrimmedString = (value: unknown): string | undefined => {',- );- expect(stringUtilsSource).toContain('export const asTrimmedString');});});diff --git a/frontend-modern/src/hooks/__tests__/useWorkloads.test.ts b/frontend-modern/src/hooks/__tests__/useWorkloads.test.tsindex 3e7aa66b6d..3cb79244c3 100644--- a/frontend-modern/src/hooks/__tests__/useWorkloads.test.ts+++ b/frontend-modern/src/hooks/__tests__/useWorkloads.test.ts@@ -1,4 +1,13 @@-import { batch, createEffect, createRoot, createSignal } from 'solid-js';+import { render } from '@solidjs/testing-library';+import {+ batch,+ createComponent,+ createEffect,+ createRenderEffect,+ createRoot,+ createSignal,+ Suspense,+} from 'solid-js';import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';import useWorkloadsSource from '../useWorkloads.ts?raw';import { guestDiskDeferrals } from '@/components/Workloads/__fixtures__/guestDiskDeferrals';@@ -610,9 +619,52 @@ describe('useWorkloads', () => {disposeSecond();});- it('keeps workload refreshes out of app-level Suspense', () => {- expect(useWorkloadsSource).not.toContain('createResource');- expect(useWorkloadsSource).toContain('createSignal<WorkloadGuest[]>');+ it('keeps loads and polls out of the app-level Suspense fallback', async () => {+ const firstRead = deferred<unknown>();+ apiFetchJSONMock.mockReturnValueOnce(firstRead.promise);+ let result!: ReturnType<UseWorkloadsModule['useWorkloads']>;+ const { container, unmount } = render(() =>+ createComponent(Suspense, {+ fallback: 'Loading view...',+ get children() {+ return createComponent(() => {+ result = useWorkloads(() => true);+ const node = document.createTextNode('');+ createRenderEffect(() => {+ node.data = `workloads:${result.workloads().length}`;+ });+ return node;+ }, {});+ },+ }),+ );+ try {+ await flushAsync();+ // The first read is in flight: the surface shows its own loading state+ // and the route keeps its page.+ expect(result.loading()).toBe(true);+ expect(container.textContent).not.toContain('Loading view...');++ firstRead.resolve({ data: [sampleResource], meta: { totalPages: 1 } });+ await waitForWorkloadCount(() => result.workloads().length);+ expect(container.textContent).toBe('workloads:1');++ const pollRead = deferred<unknown>();+ apiFetchJSONMock.mockReturnValueOnce(pollRead.promise);+ await advanceAndFlush(5_000);+ expect(apiFetchJSONMock).toHaveBeenCalledTimes(2);+ // The poll is in flight: the last table stays on screen.+ expect(container.textContent).toBe('workloads:1');++ pollRead.resolve({+ data: [sampleResource, { ...sampleResource, id: 'cluster-a-pve1-102', vmid: 102 }],+ meta: { totalPages: 1 },+ });+ await waitForWorkloadCount(() => result.workloads().length, 2);+ expect(container.textContent).toBe('workloads:2');+ } finally {+ unmount();+ }});it('projects authoritative LXC and QEMU CPU once regardless of agent sources or cores', async () => {diff --git a/frontend-modern/src/pages/__tests__/AIIntelligence.test.tsx b/frontend-modern/src/pages/__tests__/AIIntelligence.test.tsxindex 015567b0aa..7b0f741156 100644--- a/frontend-modern/src/pages/__tests__/AIIntelligence.test.tsx+++ b/frontend-modern/src/pages/__tests__/AIIntelligence.test.tsx@@ -13,11 +13,11 @@ import {getPublicPricingUrl,SELF_HOSTED_PRO_BILLING_PLAN_SELECTION_HREF,} from '@/utils/pricingHandoff';-import patrolIntelligenceHeaderSource from '@/features/patrol/PatrolIntelligenceHeader.tsx?raw';import patrolIntelligenceSurfaceSource from '@/features/patrol/PatrolIntelligenceSurface.tsx?raw';-import patrolIntelligenceStateSource from '@/features/patrol/usePatrolIntelligenceState.ts?raw';import { AGENT_PATROL_CONTROL_STATUS_PATH } from '@/api/agentCapabilities';import { aiIntelligenceStore } from '@/stores/aiIntelligence';+import { PATROL_MANUAL_SYNC_TIMEOUT_MS } from '@/features/patrol/usePatrolIntelligenceState';+import { getPatrolSetupAction } from '@/utils/patrolRuntimeActions';import { AIIntelligence } from '../AIIntelligence';@@ -559,19 +559,7 @@ async function openPatrolActivityMode() {describe('AIIntelligence entitlement gating', () => {it('keeps Patrol page data sync bounded without making it a primary action', () => {- expect(patrolIntelligenceStateSource).toContain('PATROL_MANUAL_SYNC_TIMEOUT_MS');- expect(patrolIntelligenceStateSource).toContain('requestId === manualRefreshRequestId');- expect(patrolIntelligenceStateSource).toContain('requestId === refreshRequestId');- expect(patrolIntelligenceStateSource).toContain('isManualRefreshRunning');- expect(patrolIntelligenceStateSource).toContain('handleRefreshPatrol');- expect(patrolIntelligenceStateSource).toContain('loadVisiblePatrolData');- expect(patrolIntelligenceStateSource).toContain('loadSupportingPatrolDataInBackground');- expect(patrolIntelligenceHeaderSource).not.toContain('state.handleRefreshPatrol()');- expect(patrolIntelligenceHeaderSource).not.toContain('Sync page data');- expect(patrolIntelligenceHeaderSource).not.toContain('animate-spin');- expect(patrolIntelligenceHeaderSource).not.toContain('Refresh Patrol');expect(patrolIntelligenceSurfaceSource).toContain('Review and history');- expect(patrolIntelligenceSurfaceSource).toContain('href="/actions"');expect(patrolIntelligenceSurfaceSource).toContain('Actions and approvals');});@@ -590,11 +578,6 @@ describe('AIIntelligence entitlement gating', () => {expect(weeklyDigestIndex).toBeLessThan(verifiedOutcomesIndex);});- it('keeps the advanced Patrol settings drawer out of the old save-spinner path', () => {- expect(patrolIntelligenceHeaderSource).not.toContain('LoadingSpinner');- expect(patrolIntelligenceHeaderSource).not.toContain('Save Patrol mode');- });-beforeEach(() => {routerLocation.setPath('/patrol');resetCreateNonSuspendingQueryCacheForTest();@@ -2696,4 +2679,173 @@ describe('AIIntelligence entitlement gating', () => {runSnapshotId: 'run-missing-snapshot',});});++ describe('Patrol runtime block cause (#1789)', () => {+ // A used-up cost budget blocks Patrol while readiness still reads "none":+ // every setup action must follow the block cause to the budget field+ // instead of sending the operator to the model check.+ const budgetReadiness = {+ status: 'not_ready',+ ready: false,+ cause: 'none',+ summary: 'Patrol is paused by the 30-day cost budget.',+ provider: 'ollama',+ model: 'ollama:llama3',+ checks: [],+ };++ it('points the paused banner and the setup card at the cost budget', async () => {+ getPatrolStatusMock.mockResolvedValue(+ defaultPatrolStatus({+ runtime_state: 'blocked',+ blocked_reason:+ 'Patrol is paused until the 30-day AI cost budget is raised or the 30-day window rolls on.',+ blocked_cause: 'budget_exhausted',+ readiness: budgetReadiness,+ }),+ );++ render(() => <AIIntelligence />);++ await waitFor(() => {+ expect(screen.getAllByText('Patrol paused').length).toBeGreaterThan(0);+ expect(screen.getByRole('heading', { name: 'Patrol cannot run yet' })).toBeInTheDocument();+ });+ const budget = getPatrolSetupAction('budget_exhausted');+ const links = screen.getAllByRole('link', { name: budget.label });+ // The paused banner and the setup card each offer the budget action.+ expect(links.length).toBeGreaterThanOrEqual(2);+ for (const link of links) {+ expect(link).toHaveAttribute('href', budget.href);+ }+ expect(screen.queryByRole('link', { name: 'Check Patrol model' })).not.toBeInTheDocument();+ });++ it('keeps the budget action after a restart from the persisted runtime finding', async () => {+ // The in-memory block state does not survive a restart; the saved Patrol+ // runtime finding carries the same cause until the next run.+ intelligenceState.findings = [+ {+ id: 'patrol-runtime-budget',+ source: 'ai-patrol',+ isThreshold: false,+ status: 'active',+ severity: 'critical',+ resourceId: 'ai-service',+ resourceName: 'Pulse Patrol Service',+ resourceType: 'service',+ title: 'Pulse Patrol: Cost budget exhausted',+ failureCause: 'budget_exhausted',+ detectedAt: '2026-03-12T09:57:00Z',+ },+ ];++ render(() => <AIIntelligence />);++ const budget = getPatrolSetupAction('budget_exhausted');+ await waitFor(() => {+ expect(screen.getByRole('heading', { name: 'Patrol cannot run yet' })).toBeInTheDocument();+ });+ const link = screen.getByRole('link', { name: budget.label });+ expect(link).toHaveAttribute('href', budget.href);+ });+ });++ describe('Patrol data refresh failures', () => {+ const loadPatrolFindings = () => vi.mocked(aiIntelligenceStore.loadPatrolFindings);++ it('keeps the page and offers Retry when a Patrol data load rejects, then clears the notice', async () => {+ loadPatrolFindings().mockRejectedValue(new Error('findings unavailable'));+ try {+ render(() => <AIIntelligence />);++ expect(await screen.findByText('Patrol could not refresh')).toBeInTheDocument();+ expect(screen.getByRole('heading', { name: 'Patrol' })).toBeInTheDocument();+ expect(screen.queryByText('findings unavailable')).not.toBeInTheDocument();++ loadPatrolFindings().mockResolvedValue(undefined);+ fireEvent.click(screen.getByRole('button', { name: 'Retry' }));++ await waitFor(() => {+ expect(screen.queryByText('Patrol could not refresh')).not.toBeInTheDocument();+ });+ } finally {+ loadPatrolFindings().mockResolvedValue(undefined);+ }+ });++ it('does not let a slow earlier refresh raise a notice after a newer one succeeded', async () => {+ let failEarlier!: (error: Error) => void;+ loadPatrolFindings().mockClear();+ loadPatrolFindings().mockImplementationOnce(+ () =>+ new Promise<undefined>((_resolve, reject) => {+ failEarlier = reject;+ }),+ );+ try {+ render(() => <AIIntelligence />);+ await waitFor(() => expect(loadPatrolFindings()).toHaveBeenCalledTimes(1));++ // The tab becoming visible again starts a newer refresh, which succeeds.+ document.dispatchEvent(new Event('visibilitychange'));+ await waitFor(() => expect(loadPatrolFindings()).toHaveBeenCalledTimes(2));++ failEarlier(new Error('stale refresh failed'));+ await new Promise((resolve) => setTimeout(resolve, 20));++ expect(screen.queryByText('Patrol could not refresh')).not.toBeInTheDocument();+ expect(screen.getByRole('heading', { name: 'Patrol' })).toBeInTheDocument();+ } finally {+ loadPatrolFindings().mockResolvedValue(undefined);+ }+ });++ it('frees Retry after the manual sync window and ignores an older retry finishing late', async () => {+ loadPatrolFindings().mockRejectedValue(new Error('findings unavailable'));+ let failFirst!: (error: Error) => void;+ let failSecond!: (error: Error) => void;+ try {+ render(() => <AIIntelligence />);+ const retry = await screen.findByRole('button', { name: 'Retry' });++ loadPatrolFindings().mockImplementationOnce(+ () =>+ new Promise<undefined>((_resolve, reject) => {+ failFirst = reject;+ }),+ );+ vi.useFakeTimers();++ fireEvent.click(retry);+ expect(retry).toBeDisabled();+ await vi.advanceTimersByTimeAsync(PATROL_MANUAL_SYNC_TIMEOUT_MS - 1);+ expect(retry).toBeDisabled();+ await vi.advanceTimersByTimeAsync(1);+ expect(retry).toBeEnabled();++ // A second retry starts while the first is still hanging.+ loadPatrolFindings().mockImplementationOnce(+ () =>+ new Promise<undefined>((_resolve, reject) => {+ failSecond = reject;+ }),+ );+ fireEvent.click(retry);+ expect(retry).toBeDisabled();++ // The older retry finishing late must not release the newer one.+ failFirst(new Error('first retry failed'));+ await vi.advanceTimersByTimeAsync(0);+ expect(retry).toBeDisabled();++ failSecond(new Error('second retry failed'));+ await vi.advanceTimersByTimeAsync(0);+ expect(retry).toBeEnabled();+ } finally {+ vi.useRealTimers();+ loadPatrolFindings().mockResolvedValue(undefined);+ }+ });+ });});diff --git a/frontend-modern/src/pages/__tests__/Alerts.helpers.test.ts b/frontend-modern/src/pages/__tests__/Alerts.helpers.test.tsindex 04ea9ad7a8..78bbd87450 100644--- a/frontend-modern/src/pages/__tests__/Alerts.helpers.test.ts+++ b/frontend-modern/src/pages/__tests__/Alerts.helpers.test.ts@@ -1,74 +1,4 @@import { describe, expect, it } from 'vitest';-import alertsPageSource from '@/pages/Alerts.tsx?raw';-import alertsConfigurationSurfaceSource from '@/features/alerts/AlertsConfigurationSurface.tsx?raw';-import alertsConfigurationStateSource from '@/features/alerts/useAlertsConfigurationState.ts?raw';-import alertsConfigurationSnapshotStateSource from '@/features/alerts/useAlertsConfigurationSnapshotState.ts?raw';-import alertsConfigurationModelSource from '@/features/alerts/alertsConfigurationModel.ts?raw';-import alertOverridesModelSource from '@/features/alerts/alertOverridesModel.ts?raw';-import alertOverridesStateSource from '@/features/alerts/useAlertOverridesState.ts?raw';-import alertDestinationsModelSource from '@/features/alerts/alertDestinationsModel.ts?raw';-import alertDestinationsStateSource from '@/features/alerts/useAlertDestinationsState.ts?raw';-import alertDestinationsTabStateSource from '@/features/alerts/useAlertDestinationsTabState.ts?raw';-import alertAppriseDestinationsSectionSource from '@/features/alerts/AlertAppriseDestinationsSection.tsx?raw';-import alertWebhookDestinationsStateSource from '@/features/alerts/useAlertWebhookDestinationsState.ts?raw';-import alertAcknowledgementStateSource from '@/features/alerts/useAlertAcknowledgementState.ts?raw';-import alertHistoryAdministrationCardSource from '@/features/alerts/AlertHistoryAdministrationCard.tsx?raw';-import alertHistoryFiltersCardSource from '@/features/alerts/AlertHistoryFiltersCard.tsx?raw';-import alertHistoryFrequencyCardSource from '@/features/alerts/AlertHistoryFrequencyCard.tsx?raw';-import alertHistoryItemActionsSource from '@/features/alerts/AlertHistoryItemActions.tsx?raw';-import alertHistoryTableAlertRowSource from '@/features/alerts/AlertHistoryTableAlertRow.tsx?raw';-import alertHistoryTableGroupRowSource from '@/features/alerts/AlertHistoryTableGroupRow.tsx?raw';-import alertHistoryTableSectionSource from '@/features/alerts/AlertHistoryTableSection.tsx?raw';-import alertResourceIncidentsPanelSource from '@/features/alerts/AlertResourceIncidentsPanel.tsx?raw';-import mobileAlertHistoryInvestigationDialogSource from '@/features/alerts/MobileAlertHistoryInvestigationDialog.tsx?raw';-import incidentTimelinePanelSource from '@/components/Alerts/IncidentTimelinePanel.tsx?raw';-import alertHistoryStateSource from '@/features/alerts/useAlertHistoryState.ts?raw';-import alertResourceIncidentsStateSource from '@/features/alerts/useAlertResourceIncidentsState.ts?raw';-import alertHistoryModelSource from '@/features/alerts/alertHistoryModel.ts?raw';-import alertIncidentTimelineStateSource from '@/features/alerts/useAlertIncidentTimelineState.ts?raw';-import alertOverviewActiveAlertsSectionSource from '@/features/alerts/AlertOverviewActiveAlertsSection.tsx?raw';-import alertOverviewAlertCardSource from '@/features/alerts/AlertOverviewAlertCard.tsx?raw';-import alertOverviewStatsCardsSource from '@/features/alerts/AlertOverviewStatsCards.tsx?raw';-import alertOverviewStateSource from '@/features/alerts/useAlertOverviewState.ts?raw';-import resourceMonitoringPolicyActionSource from '@/features/alerts/ResourceMonitoringPolicyAction.tsx?raw';-import alertScheduleStateSource from '@/features/alerts/useAlertScheduleState.ts?raw';-import alertDestinationsTabSource from '@/features/alerts/tabs/DestinationsTab.tsx?raw';-import alertHistoryTabSource from '@/features/alerts/tabs/HistoryTab.tsx?raw';-import alertOverviewTabSource from '@/features/alerts/OverviewTab.tsx?raw';-import alertScheduleTabSource from '@/features/alerts/tabs/ScheduleTab.tsx?raw';-import alertThresholdsTabSource from '@/features/alerts/tabs/ThresholdsTab.tsx?raw';-import thresholdsTabModelSource from '@/features/alerts/thresholds/thresholdsTabModel.ts?raw';-import alertResourceTableDesktopSource from '@/components/Alerts/AlertResourceTableDesktop.tsx?raw';-import thresholdsTableSource from '@/components/Alerts/ThresholdsTable.tsx?raw';-import thresholdsTableAgentDisksSectionSource from '@/components/Alerts/ThresholdsTableAgentDisksSection.tsx?raw';-import thresholdsTableAgentsTabSource from '@/components/Alerts/ThresholdsTableAgentsTab.tsx?raw';-import thresholdsTableAgentsResourcesSectionSource from '@/components/Alerts/ThresholdsTableAgentsResourcesSection.tsx?raw';-import thresholdsTableDockerContainersSectionSource from '@/components/Alerts/ThresholdsTableDockerContainersSection.tsx?raw';-import thresholdsTableDockerHostsSectionSource from '@/components/Alerts/ThresholdsTableDockerHostsSection.tsx?raw';-import thresholdsTableDockerIgnoredPrefixesSectionSource from '@/components/Alerts/ThresholdsTableDockerIgnoredPrefixesSection.tsx?raw';-import thresholdsTableDockerServiceGapSectionSource from '@/components/Alerts/ThresholdsTableDockerServiceGapSection.tsx?raw';-import thresholdsTableDockerTabSource from '@/components/Alerts/ThresholdsTableDockerTab.tsx?raw';-import thresholdsTableProxmoxPMGSectionSource from '@/components/Alerts/ThresholdsTableProxmoxPMGSection.tsx?raw';-import thresholdsTableProxmoxBackupsSectionSource from '@/components/Alerts/ThresholdsTableProxmoxBackupsSection.tsx?raw';-import thresholdsTableProxmoxGuestFilteringSectionSource from '@/components/Alerts/ThresholdsTableProxmoxGuestFilteringSection.tsx?raw';-import thresholdsTableProxmoxGuestsSectionSource from '@/components/Alerts/ThresholdsTableProxmoxGuestsSection.tsx?raw';-import thresholdsTableProxmoxNodesSectionSource from '@/components/Alerts/ThresholdsTableProxmoxNodesSection.tsx?raw';-import thresholdsTableProxmoxPBSSectionSource from '@/components/Alerts/ThresholdsTableProxmoxPBSSection.tsx?raw';-import thresholdsTableProxmoxSnapshotsSectionSource from '@/components/Alerts/ThresholdsTableProxmoxSnapshotsSection.tsx?raw';-import thresholdsTableProxmoxStorageSectionSource from '@/components/Alerts/ThresholdsTableProxmoxStorageSection.tsx?raw';-import thresholdsTableProxmoxTabSource from '@/components/Alerts/ThresholdsTableProxmoxTab.tsx?raw';-import thresholdsDataHookSource from '@/features/alerts/thresholds/hooks/useThresholdsData.ts?raw';-import thresholdsHostDataHookSource from '@/features/alerts/thresholds/hooks/useThresholdsHostData.ts?raw';-import thresholdsDockerDataHookSource from '@/features/alerts/thresholds/hooks/useThresholdsDockerData.ts?raw';-import thresholdsGuestDataHookSource from '@/features/alerts/thresholds/hooks/useThresholdsGuestData.ts?raw';-import thresholdsInfrastructureDataHookSource from '@/features/alerts/thresholds/hooks/useThresholdsInfrastructureData.ts?raw';-import thresholdsRecoveryDefaultsStateHookSource from '@/features/alerts/thresholds/hooks/useThresholdsRecoveryDefaultsState.ts?raw';-import thresholdsTableStateHookSource from '@/features/alerts/thresholds/hooks/useThresholdsTableState.ts?raw';-import thresholdsAvailabilityMutationsHookSource from '@/features/alerts/thresholds/hooks/useThresholdsAvailabilityMutations.ts?raw';-import thresholdsOverrideMutationsHookSource from '@/features/alerts/thresholds/hooks/useThresholdsOverrideMutations.ts?raw';-import thresholdsOverrideMutationModelSource from '@/features/alerts/thresholds/thresholdsOverrideMutationModel.ts?raw';-import thresholdsResourceModelSource from '@/features/alerts/thresholds/thresholdsResourceModel.ts?raw';-import thresholdsTableSectionPropsSource from '@/features/alerts/thresholds/thresholdsTableSectionProps.ts?raw';import {ALERT_TAB_SEGMENTS,@@ -304,533 +234,6 @@ describe('tab path helpers', () => {expect(pathForTab('overview', custom)).toBe('/alerts/summary');expect(tabFromPath('/alerts/summary', custom)).toBe('overview');});-- it('keeps alerts configuration owned by a feature surface instead of the page shell', () => {- expect(alertsPageSource).toContain(- "import { PageHeader } from '@/components/shared/PageHeader';",- );- expect(alertsPageSource).toContain('<PageHeader');- expect(alertsPageSource).toContain('description={headerMeta().description}');- expect(alertsPageSource).toContain(- "import { AlertsConfigurationSurface } from '@/features/alerts/AlertsConfigurationSurface';",- );- expect(alertsPageSource).toContain(- "import { presentationPolicyIsReadOnly } from '@/stores/sessionPresentationPolicy';",- );- expect(alertsPageSource).toContain(- "import { HistoryTab } from '@/features/alerts/tabs/HistoryTab';",- );- expect(alertsPageSource).toContain('getAlertsTabGroups({ readOnly: readOnlySession() })');- expect(alertsPageSource).toContain('touch-scroll');- expect(alertsPageSource).toContain(- 'shouldConfirmAlertsLeave(e.to, e.from.pathname, hasUnsavedChanges())',- );- expect(alertsPageSource).toContain('scrollbar-hide');- expect(alertsPageSource).not.toContain('style="-webkit-overflow-scrolling: touch;"');- expect(alertsPageSource).not.toContain('const loadAlertConfiguration = async');- expect(alertsPageSource).not.toContain('const FACTORY_GUEST_DEFAULTS =');- expect(alertsConfigurationSurfaceSource).toContain(- "import { DestinationsTab } from './tabs/DestinationsTab';",- );- expect(alertsConfigurationSurfaceSource).toContain(- "import { ScheduleTab } from './tabs/ScheduleTab';",- );- expect(alertsConfigurationSurfaceSource).toContain(- "import { ThresholdsTab } from './tabs/ThresholdsTab';",- );- expect(alertsConfigurationSurfaceSource).toContain('useAlertsConfigurationState');- expect(alertsConfigurationSurfaceSource).not.toContain('AlertsAPI.getConfig');- expect(alertsConfigurationSurfaceSource).not.toContain('NotificationsAPI.getEmailConfig');- expect(alertsConfigurationSurfaceSource).not.toContain('NotificationsAPI.updateEmailConfig');- expect(alertsConfigurationSurfaceSource).not.toContain("eventBus.on('org_switched'");- expect(alertsConfigurationStateSource).toContain('export function useAlertsConfigurationState');- expect(alertsConfigurationStateSource).toContain('AlertsAPI.getConfig');- expect(alertsConfigurationStateSource).toContain('createDefaultAlertsConfigurationSnapshot');- expect(alertsConfigurationStateSource).toContain('readAlertsConfigurationSnapshot');- expect(alertsConfigurationStateSource).toContain('buildAlertsConfigurationPayload');- expect(alertsConfigurationStateSource).toContain('useAlertDestinationsState');- expect(alertsConfigurationStateSource).toContain('useAlertsConfigurationSnapshotState');- expect(alertsConfigurationStateSource).toContain('useAlertOverridesState');- expect(alertsConfigurationStateSource).not.toContain('NotificationsAPI.getEmailConfig');- expect(alertsConfigurationStateSource).not.toContain('NotificationsAPI.updateEmailConfig');- expect(alertsConfigurationStateSource).toContain("eventBus.on('org_switched'");- expect(alertsConfigurationStateSource).not.toContain('const createHysteresisThreshold =');- expect(alertsConfigurationStateSource).not.toContain('const normalizeGap =');- expect(alertsConfigurationStateSource).not.toContain(- 'const [rawOverridesConfig, setRawOverridesConfig] = createSignal',- );- expect(alertsConfigurationStateSource).not.toContain(- 'const [scheduleQuietHours, setScheduleQuietHours] = createSignal',- );- expect(alertsConfigurationStateSource).not.toContain('const hostOverrideIdCandidates =');- expect(alertsConfigurationStateSource).not.toContain('const allGuests = createMemo');- expect(alertsConfigurationSnapshotStateSource).toContain(- 'export function useAlertsConfigurationSnapshotState',- );- expect(alertsConfigurationSnapshotStateSource).toContain(- 'const [scheduleQuietHours, setScheduleQuietHours] = createSignal',- );- expect(alertsConfigurationSnapshotStateSource).toContain('applyConfigurationSnapshot');- expect(alertsConfigurationSnapshotStateSource).toContain('captureConfigurationSnapshot');- expect(alertsConfigurationSnapshotStateSource).toContain('resetGuestDefaults');- expect(alertsConfigurationSnapshotStateSource).toContain('FACTORY_GUEST_DEFAULTS');- expect(alertsConfigurationModelSource).toContain(- 'export function createDefaultAlertsConfigurationSnapshot',- );- expect(alertsConfigurationModelSource).toContain(- 'export function readAlertsConfigurationSnapshot',- );- expect(alertsConfigurationModelSource).toContain(- 'export function buildAlertsConfigurationPayload',- );- expect(alertsConfigurationModelSource).toContain('const createHysteresisThreshold =');- expect(alertsConfigurationModelSource).toContain('const normalizeGap =');- expect(alertOverridesStateSource).toContain('export function useAlertOverridesState');- expect(alertOverridesStateSource).toContain('pbsInstanceFromResource');- expect(alertOverridesStateSource).toContain('buildProjectedOverrides');- expect(alertOverridesStateSource).not.toContain('getActionableAgentIdFromResource');- expect(alertOverridesStateSource).not.toContain('const hostOverrideIdCandidates =');- expect(alertOverridesStateSource).toContain('props.setOverviewOverrides(overrides())');- expect(alertOverridesModelSource).toContain('export const normalizeRawOverridesConfig =');- expect(alertOverridesModelSource).toContain('export const hostOverrideIdCandidates =');- expect(alertOverridesModelSource).toContain('export const dockerHostOverrideIdCandidates =');- expect(alertOverridesModelSource).toContain('export const buildProjectedOverrides =');- expect(alertOverridesModelSource).toContain('getActionableAgentIdFromResource');- expect(alertDestinationsStateSource).toContain('export function useAlertDestinationsState');- expect(alertDestinationsStateSource).toContain('NotificationsAPI.getEmailConfig');- expect(alertDestinationsStateSource).toContain('NotificationsAPI.updateEmailConfig');- expect(alertDestinationsStateSource).toContain('buildEmailConfigPayload');- expect(alertDestinationsStateSource).toContain('buildAppriseConfigPayload');- expect(alertDestinationsStateSource).toContain('normalizeAppriseConfig');- expect(alertDestinationsStateSource).not.toContain('formatAppriseTargets');- expect(alertDestinationsStateSource).not.toContain('parseAppriseTargets');- expect(alertDestinationsModelSource).toContain('export function normalizeAppriseConfig');- expect(alertDestinationsModelSource).toContain('export function buildEmailConfigPayload');- expect(alertDestinationsModelSource).toContain('export function buildAppriseConfigPayload');- expect(alertDestinationsModelSource).toContain('formatAppriseTargets');- expect(alertDestinationsModelSource).toContain('parseAppriseTargets');- expect(alertDestinationsTabStateSource).toContain(- 'export function useAlertDestinationsTabState',- );- expect(alertDestinationsTabStateSource).toContain('NotificationsAPI.testNotification');- expect(alertDestinationsTabStateSource).toContain('useAlertWebhookDestinationsState');- expect(alertDestinationsTabStateSource).not.toContain('NotificationsAPI.getWebhooks');- expect(alertDestinationsTabStateSource).not.toContain('NotificationsAPI.createWebhook');- expect(alertWebhookDestinationsStateSource).toContain(- 'export function useAlertWebhookDestinationsState',- );- expect(alertWebhookDestinationsStateSource).toContain('NotificationsAPI.getWebhooks');- expect(alertWebhookDestinationsStateSource).toContain('NotificationsAPI.createWebhook');- expect(alertWebhookDestinationsStateSource).toContain('NotificationsAPI.testNotification');- expect(alertsPageSource).toContain(- "import { HistoryTab } from '@/features/alerts/tabs/HistoryTab';",- );- expect(alertsPageSource).not.toContain('function HistoryTab(');- expect(alertHistoryTabSource).toContain('useAlertHistoryState');- expect(alertHistoryTabSource).toContain('AlertHistoryFrequencyCard');- expect(alertHistoryTabSource).toContain('AlertHistoryFiltersCard');- expect(alertHistoryTabSource).toContain('AlertHistoryTableSection');- expect(alertHistoryTabSource).toContain('AlertHistoryAdministrationCard');- expect(alertHistoryTabSource).toContain('historyState.alertData().length');- expect(alertHistoryTabSource).not.toContain('historyState.filteredAlerts().length');- // The resource incidents panel used to render as a page-level sibling here,- // which put it far above a reader scrolled into the history, so the per-row- // Resource button read as inert (#1687). It now mounts under the row that- // asked for it, gated on that row owning the open request.- expect(alertHistoryTabSource).not.toContain('AlertResourceIncidentsPanel');- expect(alertHistoryTableAlertRowSource).toContain(- '<AlertResourceIncidentsPanel state={props.state} />',- );- expect(alertHistoryTableAlertRowSource).toContain(- 'props.state.resourceIncidentPanel()?.rowKey === rowKey()',- );- expect(alertDestinationsTabSource).toContain('useAlertDestinationsTabState');- expect(alertDestinationsTabSource).toContain('AlertDestinationsLoadingState');- expect(alertDestinationsTabSource).toContain('AlertDestinationsLoadErrorCard');- expect(alertDestinationsTabSource).toContain('AlertEmailDestinationsSection');- expect(alertDestinationsTabSource).toContain('AlertAppriseDestinationsSection');- expect(alertDestinationsTabSource).toContain('AlertWebhookDestinationsSection');- expect(alertDestinationsTabSource).not.toContain('NotificationsAPI.getWebhooks');- expect(alertDestinationsTabSource).not.toContain('NotificationsAPI.testNotification');- expect(alertDestinationsTabSource).not.toContain('NotificationsAPI.createWebhook');- expect(alertDestinationsTabSource).not.toContain('ALERT_DESTINATIONS_EMAIL_PANEL_TITLE');- expect(alertDestinationsTabSource).not.toContain('ALERT_DESTINATIONS_APPRISE_PANEL_TITLE');- expect(alertDestinationsTabSource).not.toContain('getAlertWebhooksSectionTitle');- expect(alertAppriseDestinationsSectionSource).toContain('TlsVerificationWarningBanner');- expect(alertAppriseDestinationsSectionSource).toContain('subject="this Apprise API endpoint"');- expect(alertAppriseDestinationsSectionSource).toContain(- 'Install a trusted certificate on the Apprise server before using this in production.',- );- expect(alertHistoryTabSource).not.toContain('useAlertIncidentTimelineState');- expect(alertHistoryTabSource).not.toContain('AlertsAPI.getHistory');- expect(alertHistoryTabSource).not.toContain('AlertsAPI.getIncidentsForResource');- expect(alertHistoryTabSource).not.toContain('AlertsAPI.clearHistory');- expect(alertHistoryTabSource).not.toContain('AlertsAPI.getIncidentTimeline');- expect(alertHistoryTabSource).not.toContain('AlertsAPI.addIncidentNote');- expect(alertHistoryTabSource).not.toContain('const loadIncidentTimeline = async');- expect(alertHistoryTabSource).not.toContain('const saveIncidentNote = async');- expect(alertHistoryTabSource).not.toContain('usePersistentSignal(');- expect(alertHistoryTabSource).not.toContain('const [searchTerm, setSearchTerm] = createSignal');- expect(alertHistoryFrequencyCardSource).toContain('export function AlertHistoryFrequencyCard');- expect(alertHistoryFrequencyCardSource).toContain('getAlertFrequencySelectionPresentation');- expect(alertHistoryFrequencyCardSource).toContain('getAlertBucketCountLabel');- expect(alertHistoryFiltersCardSource).toContain('export function AlertHistoryFiltersCard');- expect(alertHistoryFiltersCardSource).toContain('getAlertHistorySearchPlaceholder');- expect(alertHistoryFiltersCardSource).toContain('filterChipStatusDot');- expect(alertHistoryFiltersCardSource).toContain('onClearAll={props.state.clearFilters}');- expect(alertHistoryFiltersCardSource).toContain(- 'showClearAll={() => props.state.activeFilterCount() > 0}',- );- expect(alertHistoryFiltersCardSource).not.toContain('severityDot');- expect(alertHistoryFiltersCardSource).not.toContain('h-2 w-2 rounded-full ${className}');- expect(alertResourceIncidentsPanelSource).toContain(- 'export function AlertResourceIncidentsPanel',- );- expect(alertResourceIncidentsPanelSource).toContain('IncidentEventFilters');- expect(alertResourceIncidentsPanelSource).toContain('IncidentTimelineEventCard');- expect(mobileAlertHistoryInvestigationDialogSource).toContain(- 'getAlertHistoryInvestigationDialogTitle',- );- expect(mobileAlertHistoryInvestigationDialogSource).toContain('showTitle={false}');- expect(alertResourceIncidentsPanelSource).toContain('showTitle?: boolean');- expect(alertResourceIncidentsPanelSource).toContain('props.showTitle ?? true');- // Broad cross-jump chips into Infrastructure or aggregate workspaces were- // retired with the platform-first migration; the incidents panel no- // longer renders surface-link chips.- expect(alertResourceIncidentsPanelSource).not.toContain('buildResolvedResourceSurfaceLinks');- expect(alertResourceIncidentsPanelSource).not.toContain('allowInfrastructureFallback');- expect(alertResourceIncidentsPanelSource).not.toContain('buildInfrastructureResourceLink');- expect(alertResourceIncidentsPanelSource).not.toContain('buildResourceSurfaceLinksForResource');- expect(alertResourceIncidentsPanelSource).not.toMatch(/from ['"][^'"]*resourceLinks['"]/);- expect(alertResourceIncidentsPanelSource).not.toContain('{link.compactLabel}');- expect(alertResourceIncidentsPanelSource).not.toContain('IncidentAssistantHandoffButton');- expect(incidentTimelinePanelSource).not.toContain('IncidentAssistantHandoffButton');- expect(alertHistoryTableSectionSource).toContain('export function AlertHistoryTableSection');- expect(alertHistoryTableSectionSource).toContain('AlertHistoryTableGroupRow');- expect(alertHistoryTableSectionSource).toContain('AlertHistoryTableAlertRow');- expect(alertHistoryTableSectionSource).toContain('<TableCard');- expect(alertHistoryTableSectionSource).toMatch(/<Table(?:\s|>)/);- expect(alertHistoryTableSectionSource).toContain('alert-history-responsive-table');- expect(alertHistoryTableSectionSource).toContain('<colgroup>');- // Each track carries its own width so message, the column that says what- // happened, is not held to the same share as the timestamp.- expect(alertHistoryTableSectionSource).toMatch(- /alert-history-timestamp-track[\s\S]*alert-history-resource-track[\s\S]*alert-history-type-track[\s\S]*alert-history-severity-track[\s\S]*alert-history-message-track[\s\S]*alert-history-duration-track[\s\S]*alert-history-status-track[\s\S]*alert-history-node-track[\s\S]*alert-history-actions-track/,- );- expect(alertHistoryTableSectionSource).toContain('alert-history-timestamp-column');- expect(alertHistoryTableSectionSource).toContain('alert-history-full-detail-column');- expect(alertHistoryTableAlertRowSource).toContain('alert-history-timestamp-column');- // The time column is headed "Time", as on the phone card, because- // "Timestamp" needed 93px and ended in an ellipsis in the time track.- expect(alertHistoryTableSectionSource).toMatch(/>\s*Time\s*<\/TableHead>/);- expect(alertHistoryTableSectionSource).not.toMatch(/>\s*Timestamp\s*<\/TableHead>/);- // A history row has no disclosure, so the cells that say which resource and- // what happened wrap instead of truncating. Only the node cell may still end- // in an ellipsis, and a cell-level max-width would cap a track the CSS sized.- expect(alertHistoryTableAlertRowSource).toContain('ALERT_HISTORY_MESSAGE_TEXT_CLASS');- expect(alertHistoryTableAlertRowSource).toContain('ALERT_HISTORY_RESOURCE_TEXT_CLASS');- // Message holds two lines on every row so the windowing hook's single- // measured row height stays true as a long history scrolls.- expect(alertHistoryTableAlertRowSource).toMatch(- /ALERT_HISTORY_MESSAGE_TEXT_CLASS =\s*'line-clamp-2 min-h-\[2lh\] @min-\[50rem\]:line-clamp-1 @min-\[50rem\]:min-h-0 whitespace-normal wrap-break-word /,- );- expect(alertHistoryTableAlertRowSource).toMatch(- /ALERT_HISTORY_RESOURCE_TEXT_CLASS =\s*'line-clamp-2 @min-\[50rem\]:line-clamp-1 whitespace-normal wrap-break-word /,- );- expect(alertHistoryTableAlertRowSource).not.toMatch(/max-w-\[\d+px\]/);- expect(alertHistoryTableAlertRowSource).not.toMatch(- /ALERT_HISTORY_(?:MESSAGE|RESOURCE)_TEXT_CLASS =\s*'[^']*\btruncate\b/,- );- expect(alertHistoryTableSectionSource).not.toContain(- 'overflow-hidden rounded-sm border border-border',- );- expect(alertHistoryTableSectionSource).not.toContain('<div class="overflow-x-auto">');- expect(alertHistoryTableSectionSource).not.toContain(- '<div class="overflow-x-auto bg-surface">',- );- expect(alertHistoryTableSectionSource).not.toContain('IncidentTimelinePanel');- expect(alertHistoryTableSectionSource).not.toContain('InvestigateAlertButton');- expect(alertHistoryTableGroupRowSource).toContain('export function AlertHistoryTableGroupRow');- expect(alertHistoryTableGroupRowSource).toContain('getGroupSummaryLabel');- expect(alertHistoryTableGroupRowSource).toContain('getGroupedTableRowClass');- expect(alertHistoryTableGroupRowSource).toContain('getGroupedTableRowCellClass');- expect(alertResourceTableDesktopSource).toContain('getGroupedTableRowClass');- expect(alertResourceTableDesktopSource).toContain('getGroupedTableRowCellClass');- expect(alertHistoryTableAlertRowSource).toContain('export function AlertHistoryTableAlertRow');- expect(alertHistoryTableAlertRowSource).toContain('IncidentTimelinePanel');- expect(alertHistoryTableAlertRowSource).toContain('AlertHistoryItemActions');- // An open threshold alert's row leads with its live reading, not the- // breach message it opened with (#2068); other rows lead with the alert's- // subject-free summary because the Resource cell already names it.- expect(alertHistoryTableAlertRowSource).toContain(- 'getAlertHistoryRowCopy(props.alert, now, { subjectFree: true })',- );- expect(alertHistoryTableAlertRowSource).not.toContain('{props.alert.description}');- expect(alertHistoryItemActionsSource).toContain('InvestigateAlertButton');- expect(alertHistoryAdministrationCardSource).toContain(- 'export function AlertHistoryAdministrationCard',- );- expect(alertHistoryAdministrationCardSource).toContain(- 'getAlertAdministrationClearHistoryLabel',- );- expect(alertHistoryStateSource).toContain('export function useAlertHistoryState');- expect(alertHistoryStateSource).toContain('export type AlertHistoryState');- expect(alertHistoryStateSource).toContain('const clearFilters = (): void =>');- expect(alertHistoryStateSource).toContain('AlertsAPI.getHistory');- expect(alertHistoryStateSource).toContain('AlertsAPI.clearHistory');- expect(alertHistoryStateSource).toContain('useAlertResourceIncidentsState');- expect(alertHistoryStateSource).toContain('useAlertIncidentTimelineState');- expect(alertHistoryStateSource).not.toContain('AlertsAPI.getIncidentsForResource');- expect(alertHistoryStateSource).toContain('buildAlertHistoryItems');- expect(alertHistoryStateSource).toContain('buildAlertTrends');- expect(alertHistoryStateSource).toContain('groupAlertHistoryItems');- expect(alertHistoryStateSource).not.toContain('const formatDuration =');- expect(alertHistoryStateSource).not.toContain('const formatBucketRange =');- expect(alertHistoryStateSource).not.toContain('const formatAxisTickLabel =');- expect(alertHistoryStateSource).not.toContain('const monthNames = [');- expect(alertHistoryModelSource).toContain('export function buildAlertHistoryItems');- expect(alertHistoryModelSource).toContain('export function buildAlertTrends');- expect(alertHistoryModelSource).toContain('export function groupAlertHistoryItems');- expect(alertHistoryModelSource).toContain('export const MS_PER_HOUR');- expect(alertResourceIncidentsStateSource).toContain(- 'export function useAlertResourceIncidentsState',- );- expect(alertResourceIncidentsStateSource).toContain('AlertsAPI.getIncidentsForResource');- expect(alertIncidentTimelineStateSource).toContain(- 'export function useAlertIncidentTimelineState',- );- expect(alertIncidentTimelineStateSource).toContain('AlertsAPI.getIncidentTimeline');- expect(alertIncidentTimelineStateSource).toContain('AlertsAPI.addIncidentNote');- expect(alertOverviewActiveAlertsSectionSource).toContain('AlertOverviewStatsCards');- expect(alertOverviewTabSource).toContain('AlertOverviewActiveAlertsSection');- expect(alertOverviewTabSource).toContain('useAlertOverviewState');- expect(alertOverviewTabSource).toContain('useAlertIncidentTimelineState');- expect(alertOverviewTabSource).not.toContain('AlertsAPI.bulkAcknowledge');- expect(alertOverviewTabSource).not.toContain('AlertsAPI.acknowledge');- expect(alertOverviewTabSource).not.toContain('AlertsAPI.unacknowledge');- expect(alertOverviewStateSource).toContain('export function useAlertOverviewState');- expect(alertOverviewStateSource).toContain('export type AlertOverviewState');- expect(alertOverviewStateSource).toContain('useAlertAcknowledgementState');- expect(alertOverviewStateSource).not.toContain('AlertsAPI.bulkAcknowledge');- expect(alertOverviewStateSource).not.toContain('AlertsAPI.acknowledge');- expect(alertOverviewStateSource).not.toContain('AlertsAPI.unacknowledge');- expect(alertOverviewStatsCardsSource).toContain('props.state.alertStats().acknowledged');- expect(alertOverviewStatsCardsSource).toContain('props.state.alertStats().total24h');- // Override count is configuration, not alert status; it left the overview.- expect(alertOverviewStatsCardsSource).not.toContain('alertStats().overrides');- expect(alertOverviewActiveAlertsSectionSource).toContain('AlertOverviewAlertCard');- expect(alertOverviewActiveAlertsSectionSource).toContain('getAlertListEmptyState');- expect(alertOverviewAlertCardSource).toContain('getAlertOverviewCardPresentation');- expect(alertOverviewAlertCardSource).toContain('getAlertOverviewAcknowledgedBadgeClass');- expect(alertOverviewAlertCardSource).toContain('getAlertOverviewStartedAtClass');- expect(alertOverviewAlertCardSource).toContain('getAlertOverviewPrimaryActionClass');- expect(alertOverviewAlertCardSource).toContain('getAlertOverviewSecondaryActionClass');- expect(alertAcknowledgementStateSource).toContain(- 'export function useAlertAcknowledgementState',- );- expect(alertAcknowledgementStateSource).toContain('AlertsAPI.bulkAcknowledge');- expect(alertAcknowledgementStateSource).toContain('AlertsAPI.acknowledge');- expect(alertAcknowledgementStateSource).toContain('AlertsAPI.unacknowledge');- expect(alertScheduleTabSource).toContain('useAlertScheduleState');- expect(alertScheduleTabSource).not.toContain('createDefaultQuietHours');- expect(alertScheduleTabSource).not.toContain('createDefaultCooldown');- expect(alertScheduleTabSource).not.toContain('createDefaultGrouping');- expect(alertScheduleTabSource).not.toContain('createDefaultEscalation');- expect(alertScheduleTabSource).not.toContain('const timezones = [');- expect(alertScheduleTabSource).not.toContain('const days = [');- expect(alertScheduleStateSource).toContain('export function useAlertScheduleState');- expect(alertScheduleStateSource).toContain('createDefaultQuietHours');- expect(alertScheduleStateSource).toContain('createDefaultCooldown');- expect(alertScheduleStateSource).toContain('createDefaultGrouping');- expect(alertScheduleStateSource).toContain('createDefaultEscalation');- expect(alertScheduleTabSource).toContain('getAlertConfigQuietHourSuppressOptions');- expect(alertScheduleTabSource).toContain('AlertQuietHoursSection');- expect(alertScheduleTabSource).toContain('AlertCooldownSection');- expect(alertScheduleTabSource).toContain('AlertGroupingSection');- expect(alertScheduleTabSource).toContain('AlertRecoverySection');- expect(alertScheduleTabSource).toContain('AlertEscalationSection');- expect(alertScheduleTabSource).toContain('AlertScheduleSummarySection');- expect(alertScheduleTabSource).not.toContain('ALERT_CONFIG_COOLDOWN_TITLE');- expect(alertScheduleTabSource).not.toContain('ALERT_CONFIG_QUIET_HOURS_TITLE');- expect(alertScheduleTabSource).not.toContain('ALERT_CONFIG_ESCALATION_TITLE');- expect(alertThresholdsTabSource).toContain('ThresholdsTable');- expect(alertThresholdsTabSource).toContain('pmgThresholds={props.pmgThresholds}');- expect(alertThresholdsTabSource).toContain('guestDefaults={props.guestDefaults()}');- expect(alertThresholdsTabSource).not.toContain('buildThresholdsTableProps');- expect(thresholdsTabModelSource).toContain('export interface ThresholdsTabProps');- expect(thresholdsTabModelSource).toContain('extends Omit<');- expect(thresholdsTabModelSource).toContain(- "guestDefaults: Accessor<ThresholdsTableProps['guestDefaults']>;",- );- expect(thresholdsTabModelSource).not.toContain('hasUnsavedChanges');- expect(thresholdsTableSource).toContain(- "import { useThresholdsTableState } from '@/features/alerts/thresholds/hooks/useThresholdsTableState';",- );- expect(thresholdsTableSource).toContain(- "import { ThresholdsTableProxmoxTab } from './ThresholdsTableProxmoxTab';",- );- expect(thresholdsTableSource).not.toContain('ThresholdsTablePMGTab');- expect(thresholdsTableSource).not.toContain('ThresholdsTablePBSTab');- expect(thresholdsTableSource).toContain(- "import { ThresholdsTableAgentsTab } from './ThresholdsTableAgentsTab';",- );- expect(thresholdsTableSource).toContain(- "import { ThresholdsTableDockerTab } from './ThresholdsTableDockerTab';",- );- expect(thresholdsTableSource).not.toContain('const [searchTerm, setSearchTerm] = createSignal');- expect(thresholdsTableSource).not.toContain('const handleTabClick =');- expect(thresholdsTableSource).not.toContain('groupedResources={state.guestsGroupedByNode()}');- expect(thresholdsTableSource).not.toContain('dockerIgnoredPrefixesPresentation.title');- expect(thresholdsTableProxmoxTabSource).toContain('export function ThresholdsTableProxmoxTab');- expect(thresholdsTableProxmoxTabSource).toContain('ThresholdsTableProxmoxNodesSection');- expect(thresholdsTableProxmoxTabSource).toContain('ThresholdsTableProxmoxPBSSection');- expect(thresholdsTableProxmoxTabSource).toContain('ThresholdsTableProxmoxGuestsSection');- expect(thresholdsTableProxmoxTabSource).toContain(- 'ThresholdsTableProxmoxGuestFilteringSection',- );- expect(thresholdsTableProxmoxTabSource).toContain('ThresholdsTableProxmoxBackupsSection');- expect(thresholdsTableProxmoxTabSource).toContain('ThresholdsTableProxmoxSnapshotsSection');- expect(thresholdsTableProxmoxTabSource).toContain('ThresholdsTableProxmoxStorageSection');- expect(thresholdsTableProxmoxTabSource).toContain('ThresholdsTableProxmoxPMGSection');- expect(thresholdsTableProxmoxTabSource).not.toContain('backupOrphanedPresentation');- expect(thresholdsTableProxmoxTabSource).not.toContain('sectionTitles.guestFiltering');- expect(thresholdsTableSectionPropsSource).toContain(- 'export interface ThresholdsTableSectionProps',- );- expect(thresholdsTableProxmoxNodesSectionSource).toContain(- 'export function ThresholdsTableProxmoxNodesSection',- );- expect(thresholdsTableProxmoxPBSSectionSource).toContain(- 'export function ThresholdsTableProxmoxPBSSection',- );- expect(thresholdsTableProxmoxGuestsSectionSource).toContain(- 'export function ThresholdsTableProxmoxGuestsSection',- );- expect(thresholdsTableProxmoxGuestFilteringSectionSource).toContain(- 'export function ThresholdsTableProxmoxGuestFilteringSection',- );- expect(thresholdsTableProxmoxBackupsSectionSource).toContain(- 'export function ThresholdsTableProxmoxBackupsSection',- );- expect(thresholdsTableProxmoxBackupsSectionSource).toContain('backupOrphanedPresentation');- expect(thresholdsTableProxmoxSnapshotsSectionSource).toContain(- 'export function ThresholdsTableProxmoxSnapshotsSection',- );- expect(thresholdsTableProxmoxStorageSectionSource).toContain(- 'export function ThresholdsTableProxmoxStorageSection',- );- expect(thresholdsTableProxmoxPMGSectionSource).toContain(- 'export function ThresholdsTableProxmoxPMGSection',- );- expect(thresholdsTableProxmoxPMGSectionSource).toContain('pmgGlobalDefaults()');- expect(thresholdsTableAgentsTabSource).toContain('export function ThresholdsTableAgentsTab');- expect(thresholdsTableAgentsTabSource).toContain('ThresholdsTableAgentsResourcesSection');- expect(thresholdsTableAgentsTabSource).toContain('ThresholdsTableAgentDisksSection');- expect(thresholdsTableAgentsTabSource).not.toContain('agentDisksGroupedByAgent()');- expect(thresholdsTableAgentsResourcesSectionSource).toContain(- 'export function ThresholdsTableAgentsResourcesSection',- );- expect(thresholdsTableAgentDisksSectionSource).toContain(- 'export function ThresholdsTableAgentDisksSection',- );- expect(thresholdsTableAgentDisksSectionSource).toContain('agentDisksGroupedByAgent()');- expect(thresholdsTableDockerTabSource).toContain('export function ThresholdsTableDockerTab');- expect(thresholdsTableDockerTabSource).toContain('ThresholdsTableDockerIgnoredPrefixesSection');- expect(thresholdsTableDockerTabSource).toContain('ThresholdsTableDockerServiceGapSection');- expect(thresholdsTableDockerTabSource).toContain('ThresholdsTableDockerHostsSection');- expect(thresholdsTableDockerTabSource).toContain('ThresholdsTableDockerContainersSection');- expect(thresholdsTableDockerTabSource).not.toContain('dockerIgnoredPrefixesPresentation.title');- expect(thresholdsTableDockerTabSource).not.toContain('serviceGapValidationMessage()');- expect(thresholdsTableDockerIgnoredPrefixesSectionSource).toContain(- 'export function ThresholdsTableDockerIgnoredPrefixesSection',- );- expect(thresholdsTableDockerIgnoredPrefixesSectionSource).toContain(- 'dockerIgnoredPrefixesPresentation.title',- );- expect(thresholdsTableDockerServiceGapSectionSource).toContain(- 'export function ThresholdsTableDockerServiceGapSection',- );- expect(thresholdsTableDockerServiceGapSectionSource).toContain('serviceGapValidationMessage()');- expect(thresholdsTableDockerHostsSectionSource).toContain(- 'export function ThresholdsTableDockerHostsSection',- );- expect(thresholdsTableDockerContainersSectionSource).toContain(- 'export function ThresholdsTableDockerContainersSection',- );- expect(thresholdsDataHookSource).toContain('export function useThresholdsData');- expect(thresholdsDataHookSource).toContain('useThresholdsHostData(inputs)');- expect(thresholdsDataHookSource).toContain('useThresholdsDockerData(inputs)');- expect(thresholdsDataHookSource).toContain('useThresholdsGuestData(inputs)');- expect(thresholdsDataHookSource).toContain('useThresholdsInfrastructureData(inputs)');- expect(thresholdsDataHookSource).not.toContain('const hostOverrideIdCandidates =');- expect(thresholdsDataHookSource).not.toContain(- 'const dockerContainersGroupedByHost = createMemo',- );- expect(thresholdsHostDataHookSource).toContain('export function useThresholdsHostData');- expect(thresholdsHostDataHookSource).toContain('hostOverrideIdCandidates(agentResource)');- expect(thresholdsDockerDataHookSource).toContain('export function useThresholdsDockerData');- expect(thresholdsDockerDataHookSource).toContain('dockerContainerOverrideIdCandidates');- expect(thresholdsGuestDataHookSource).toContain('export function useThresholdsGuestData');- expect(thresholdsInfrastructureDataHookSource).toContain(- 'export function useThresholdsInfrastructureData',- );- expect(thresholdsResourceModelSource).toContain('export function hostOverrideIdCandidates');- expect(thresholdsResourceModelSource).toContain('export function buildNodeHeaderMeta');- expect(thresholdsResourceModelSource).toContain('export const normalizeStorageStatus');- expect(thresholdsTableStateHookSource).toContain('export function useThresholdsTableState');- expect(thresholdsTableStateHookSource).toContain(- 'useThresholdsData(props, editingId, searchTerm)',- );- expect(thresholdsTableStateHookSource).toContain('useThresholdsRecoveryDefaultsState(props)');- expect(thresholdsTableStateHookSource).toContain('useThresholdsOverrideMutations');- expect(thresholdsTableStateHookSource).toContain('useThresholdsAvailabilityMutations');- expect(thresholdsTableStateHookSource).not.toContain(- 'const saveEdit = (resourceId: string) => {',- );- expect(thresholdsTableStateHookSource).not.toContain(- 'const toggleNodeConnectivity = (resourceId: string, forceState?: boolean) => {',- );- expect(thresholdsDataHookSource).not.toContain('const sanitizeSnapshotConfig =');- expect(thresholdsDataHookSource).not.toContain('const sanitizeBackupConfig =');- expect(thresholdsRecoveryDefaultsStateHookSource).toContain(- 'export function useThresholdsRecoveryDefaultsState',- );- expect(thresholdsRecoveryDefaultsStateHookSource).toContain('const sanitizeSnapshotConfig =');- expect(thresholdsRecoveryDefaultsStateHookSource).toContain('const sanitizeBackupConfig =');- expect(thresholdsOverrideMutationsHookSource).toContain(- 'export function useThresholdsOverrideMutations',- );- expect(thresholdsOverrideMutationsHookSource).toContain(- 'const saveEdit = (resourceId: string) => {',- );- expect(thresholdsOverrideMutationsHookSource).toContain(- 'const handleSaveBulkEdit = (thresholds: Record<string, number | undefined>) => {',- );- expect(thresholdsOverrideMutationsHookSource).not.toContain('matchesAlertIdentifier');- expect(thresholdsOverrideMutationsHookSource).not.toContain(- 'const toggleNodeConnectivity = (resourceId: string, forceState?: boolean) => {',- );- expect(thresholdsAvailabilityMutationsHookSource).toContain(- 'export function useThresholdsAvailabilityMutations',- );- expect(thresholdsAvailabilityMutationsHookSource).toContain('matchesAlertIdentifier');- expect(thresholdsAvailabilityMutationsHookSource).toContain(- 'const toggleNodeConnectivity = (resourceId: string, forceState?: boolean) => {',- );- expect(thresholdsAvailabilityMutationsHookSource).toContain(- 'const setOfflineState = (resourceId: string, state: OfflineState) => {',- );- expect(thresholdsOverrideMutationModelSource).toContain('export const upsertOverride =');- expect(thresholdsOverrideMutationModelSource).toContain('export const withThresholdEntries =');- expect(thresholdsOverrideMutationModelSource).toContain('export const stripStateKeys =');- });-- it('keeps alerts websocket access on the shared app runtime context', () => {- expect(alertsPageSource).toContain("from '@/contexts/appRuntime'");- expect(alertsPageSource).not.toContain("from '@/App'");- expect(alertHistoryTabSource).toContain("from '@/contexts/appRuntime'");- expect(alertHistoryTabSource).not.toContain("from '@/App'");- });});describe('default schedule helpers', () => {@@ -1206,15 +609,6 @@ describe('unifiedTypeToAlertDisplayType', () => {});describe('Unified selector parity', () => {- it('preserves recurring maintenance and descendant scope when an alert changes monitoring policy', () => {- expect(resourceMonitoringPolicyActionSource).toContain(- 'maintenanceRecurrence: current?.maintenanceRecurrence',- );- expect(resourceMonitoringPolicyActionSource).toContain(- "maintenanceScope: current?.maintenanceScope ?? 'resource'",- );- });-it('maps all unified resource types to display types', () => {const cases: Array<[ResourceType, string]> = [['agent', 'Agent'],@@ -1384,7 +778,5 @@ describe('alert history close outcome', () => {const recovered = items.find((item) => item.id === 'pve1-cpu');expect(recovered?.status).toBe('resolved');expect(recovered).not.toHaveProperty('closeDetail');-- expect(alertHistoryTableAlertRowSource).toContain('title={props.alert.closeDetail}');});});diff --git a/frontend-modern/src/pages/__tests__/Alerts.readOnly.test.tsx b/frontend-modern/src/pages/__tests__/Alerts.readOnly.test.tsxindex 69591c2c3c..9708c4c4ae 100644--- a/frontend-modern/src/pages/__tests__/Alerts.readOnly.test.tsx+++ b/frontend-modern/src/pages/__tests__/Alerts.readOnly.test.tsx@@ -7,10 +7,13 @@ import { createSignal, onCleanup } from 'solid-js';import type { SecurityStatus } from '@/types/config';import { eventBus } from '@/stores/events';import { setOrgID } from '@/utils/apiClient';-import alertsPageSource from '@/pages/Alerts.tsx?raw';-import alertHistoryFiltersCardSource from '@/features/alerts/AlertHistoryFiltersCard.tsx?raw';const navigateSpy = vi.hoisted(() => vi.fn());+const leaveGuards = vi.hoisted(() => ({+ handlers: [] as Array<+ (event: { to: string | number; from: { pathname: string }; preventDefault: () => void }) => void+ >,+}));const presentationPolicyIsReadOnlyMock = vi.hoisted(() => vi.fn(() => false));const activationStateMock = vi.hoisted(() => vi.fn(() => 'active'));const locationState = vi.hoisted(() => ({@@ -37,7 +40,9 @@ vi.mock('@solidjs/router', async () => {...actual,useLocation: () => locationState,useNavigate: () => navigateSpy,- useBeforeLeave: () => undefined,+ useBeforeLeave: (handler: (typeof leaveGuards.handlers)[number]) => {+ leaveGuards.handlers.push(handler);+ },};});@@ -126,6 +131,7 @@ describe('Alerts read-only presentation', () => {cleanup();setOrgID('default');navigateSpy.mockReset();+ leaveGuards.handlers.length = 0;presentationPolicyIsReadOnlyMock.mockReset();presentationPolicyIsReadOnlyMock.mockReturnValue(false);activationStateMock.mockReset();@@ -233,18 +239,12 @@ describe('Alerts read-only presentation', () => {);});- it('keeps alert history narrowing URL-owned with no saved-views affordance', () => {- // Saved views stored the page's URL query string in localStorage. Bookmarks- // already do that, and better, so the control was removed; history filters- // stay URL-owned and the filtered page remains a shareable link.- expect(alertHistoryFiltersCardSource).not.toContain('savedViewsKey');- expect(alertHistoryFiltersCardSource).not.toContain('SavedViews');- });+ it('hides the scrollbar on the touch-scrollable mobile tab rail', () => {+ render(() => <Alerts securityStatus={admittedStatus} />);- it('keeps the mobile tab shell on shared scroll classes instead of inline styles', () => {- expect(alertsPageSource).toContain('touch-scroll');- expect(alertsPageSource).toContain('scrollbar-hide');- expect(alertsPageSource).not.toContain('style="-webkit-overflow-scrolling: touch;"');+ const navigation = document.querySelector('nav.touch-scroll');+ expect(navigation).not.toBeNull();+ expect(navigation).toHaveClass('scrollbar-hide');});it('keeps the active mobile destination visible when the tab rail narrows', async () => {@@ -341,6 +341,48 @@ describe('Alerts read-only presentation', () => {expect(overviewTabSpy.mock.calls.at(-1)?.[0].alertsDisabled()).toBe(false);});+ it('asks before leaving the page with unsaved configuration, and only then', async () => {+ locationState.pathname = '/alerts/thresholds';+ const confirmSpy = vi.spyOn(window, 'confirm').mockReturnValue(false);+ try {+ render(() => <Alerts securityStatus={admittedStatus} />);+ await screen.findByTestId('alerts-config-surface');+ const surface = configurationSurfaceSpy.mock.calls.at(-1) as unknown as [+ { setHasUnsavedChanges: (unsaved: boolean) => void },+ ];+ const leave = (to: string | number) => {+ const preventDefault = vi.fn();+ leaveGuards.handlers.at(-1)!({+ to,+ from: { pathname: '/alerts/thresholds' },+ preventDefault,+ });+ return preventDefault;+ };++ // Nothing to lose: leaving is silent.+ expect(leave('/proxmox/overview')).not.toHaveBeenCalled();+ expect(confirmSpy).not.toHaveBeenCalled();++ surface[0].setHasUnsavedChanges(true);++ // Narrowing the same page keeps the edits, so it never asks.+ expect(leave('/alerts/thresholds?q=web')).not.toHaveBeenCalled();+ expect(confirmSpy).not.toHaveBeenCalled();++ // Leaving the page asks, and declining keeps the operator here.+ expect(leave('/proxmox/overview')).toHaveBeenCalledTimes(1);+ expect(confirmSpy).toHaveBeenCalledWith(+ 'You have unsaved changes that will be lost. Discard changes and leave?',+ );++ confirmSpy.mockReturnValue(true);+ expect(leave('/proxmox/overview')).not.toHaveBeenCalled();+ } finally {+ confirmSpy.mockRestore();+ }+ });+it('names the delivery switch the same way whether it is on or off', async () => {presentationPolicyIsReadOnlyMock.mockReturnValue(false);activationStateMock.mockReturnValue('active');diff --git a/frontend-modern/src/pages/__tests__/PricingHandoff.test.tsx b/frontend-modern/src/pages/__tests__/PricingHandoff.test.tsxindex 620b18a212..99e2ef4579 100644--- a/frontend-modern/src/pages/__tests__/PricingHandoff.test.tsx+++ b/frontend-modern/src/pages/__tests__/PricingHandoff.test.tsx@@ -2,7 +2,6 @@ import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';import { cleanup, render, screen, waitFor } from '@solidjs/testing-library';import { Route, Router } from '@solidjs/router';import PricingHandoff from '@/pages/PricingHandoff';-import pricingHandoffSource from '@/pages/PricingHandoff.tsx?raw';import { DEFAULT_LOCALE, loadLocaleCatalog, setActiveLocale } from '@/i18n';import {getSelfHostedPurchaseStartUrl,@@ -83,14 +82,22 @@ describe('PricingHandoff', () => {);});- it('uses PageHeader without hiding the manual-redirect link on mobile', () => {- expect(pricingHandoffSource).toContain(- "import { PageHeader } from '@/components/shared/PageHeader';",- );- expect(pricingHandoffSource).toContain('<PageHeader');- expect(pricingHandoffSource).toContain('descriptionVisibility="always"');- expect(pricingHandoffSource).toContain('updateDocumentTitle={false}');- expect(pricingHandoffSource).not.toContain('<h1');+ it('keeps the manual-redirect link visible on phones', () => {+ window.history.replaceState({}, '', '/pricing?feature=unknown_pro_feature');++ render(() => (+ <Router>+ <Route path="/pricing" component={PricingHandoff} />+ </Router>+ ));++ // PageHeader hides its description below the sm breakpoint unless the+ // caller asks for it always; this paragraph holds the only way to continue+ // when the automatic redirect does not happen.+ const link = screen.getByRole('link', { name: /continue to Pulse Account/i });+ const description = link.closest('p');+ expect(description).not.toBeNull();+ expect(description).not.toHaveClass('hidden');});// The earlier 'retired monitored-system pricing handoffs' case has beendiff --git a/frontend-modern/src/utils/__tests__/docsLinks.test.ts b/frontend-modern/src/utils/__tests__/docsLinks.test.tsindex 1b7ac5951a..63fa66bed8 100644--- a/frontend-modern/src/utils/__tests__/docsLinks.test.ts+++ b/frontend-modern/src/utils/__tests__/docsLinks.test.ts@@ -15,15 +15,8 @@ import {SHIPPED_DOCS_ROOT,getShippedDocUrl,} from '@/utils/docsLinks';-import apiAccessPanelSource from '@/components/Settings/APIAccessPanel.tsx?raw';-import aiRuntimeControlsSectionSource from '@/components/Settings/AIRuntimeControlsSection.tsx?raw';-import apiTokenManagerModelSource from '@/components/Settings/apiTokenManagerModel.ts?raw';-import securityOverviewPanelSource from '@/components/Settings/SecurityOverviewPanel.tsx?raw';-import selfHostedCommercialRecoverySectionSource from '@/components/Settings/SelfHostedCommercialRecoverySection.tsx?raw';-import securityWarningSource from '@/components/SecurityWarning.tsx?raw';import { DIAGNOSTICS_PANEL_COPY } from '@/utils/diagnosticsPresentation';import { renderDocMarkdown } from '@/features/docs/docMarkdown';-import { settingsDocumentationLinkViolations } from '@/components/shared/__tests__/settingsDocumentationLinkContract';const __filename = fileURLToPath(import.meta.url);const __dirname = path.dirname(__filename);@@ -213,28 +206,6 @@ describe('docsLinks', () => {expect(api).toContain('`agent:<host-agent-id>` for a connected agent');expect(api).toContain('omit `observationLocationIds`');expect(api).toContain('clear `probeAgentId` to `""`');- const editor = readFileSync(- path.join(- frontendRoot,- 'src',- 'components',- 'Settings',- 'ConnectionEditor',- 'CredentialSlots',- 'AvailabilityTargetSlot.tsx',- ),- 'utf8',- );- expect(editor).toContain('Observation locations</legend>');- expect(editor).toContain('observationLocationIds: [...form.observationLocationIds]');- const handler = readFileSync(- path.join(repoRoot, 'internal', 'api', 'availability_handlers.go'),- 'utf8',- );- expect(handler).toContain(- 'compatibility.ObservationLocationIDs == nil && compatibility.ProbeAgentID != nil',- );- expect(handler).toContain('agentID != "" && len(*compatibility.ObservationLocationIDs) == 1');});it('documents alert history entries carrying only the newest evidence envelope', () => {@@ -243,22 +214,12 @@ describe('docsLinks', () => {'`GET /api/alerts/history` — each entry carries at most one `evidence` envelope, the newest',);expect(api).toContain('`operationalRecord.evidenceIds` keeps the full list');- const projection = readFileSync(- path.join(repoRoot, 'internal', 'alerts', 'history_projection.go'),- 'utf8',- );- expect(projection).toContain('snapshot.Evidence = newestHistoryEvidence(snapshot.Evidence)');});it('documents alert configuration saves as replacing only the keys they send', () => {const api = readFileSync(path.join(repoRoot, 'docs', 'API.md'), 'utf8');expect(api).toContain('`PUT /api/alerts/config` — replaces only the top-level keys the body');expect(api).toContain('a key left out keeps its stored value');- const handler = readFileSync(- path.join(repoRoot, 'internal', 'api', 'alerting', 'alerts.go'),- 'utf8',- );- expect(handler).toContain('GetAlertManager().ApplyConfigUpdate(body)');});it('documents the Pulse Pro runtime switch routes and their scopes', () => {@@ -996,37 +957,6 @@ describe('docsLinks', () => {expect(apiReference).toContain('`409 patrol_objective_revision_conflict`');});- it('routes runtime docs links through shipped local docs instead of GitHub main', () => {- expect(apiAccessPanelSource).toContain('API_TOKEN_SCOPES_DOC_URL');- expect(apiAccessPanelSource).not.toContain(- 'https://github.com/rcourtman/Pulse/blob/main/docs/',- );- expect(apiTokenManagerModelSource).toContain("from '@/utils/docsLinks'");- expect(apiTokenManagerModelSource).toContain('SHIPPED_API_TOKEN_SCOPES_DOC_URL');- expect(apiTokenManagerModelSource).toContain('export const API_TOKEN_SCOPES_DOC_URL =');- expect(apiTokenManagerModelSource).not.toContain(- 'https://github.com/rcourtman/Pulse/blob/main/docs/',- );- expect(securityOverviewPanelSource).toContain('PROXY_AUTH_DOC_URL');- expect(securityOverviewPanelSource).not.toContain(- 'https://github.com/rcourtman/Pulse/blob/main/docs/',- );- expect(securityWarningSource).toContain('SECURITY_DOC_URL');- expect(securityWarningSource).not.toContain(- 'https://github.com/rcourtman/Pulse/blob/main/docs/',- );- // This section may remove its only Terms link with the control it explains.- // Any surviving link must still use the shared primitive and shipped route.- expect(settingsDocumentationLinkViolations(aiRuntimeControlsSectionSource)).toEqual([]);- expect(aiRuntimeControlsSectionSource).not.toContain(- 'https://github.com/rcourtman/Pulse/blob/main/TERMS.md',- );- expect(selfHostedCommercialRecoverySectionSource).toContain('TERMS_DOC_URL');- expect(selfHostedCommercialRecoverySectionSource).not.toContain(- 'https://github.com/rcourtman/Pulse/blob/main/TERMS.md',- );- });-it('keeps non-test frontend runtime files free of GitHub main doc links',() => {diff --git a/frontend-modern/src/utils/__tests__/frontendResourceTypeBoundaries.test.ts b/frontend-modern/src/utils/__tests__/frontendResourceTypeBoundaries.test.tsindex 74846187b4..1b632190bb 100644--- a/frontend-modern/src/utils/__tests__/frontendResourceTypeBoundaries.test.ts+++ b/frontend-modern/src/utils/__tests__/frontendResourceTypeBoundaries.test.ts@@ -1,4229 +1,17 @@import { describe, expect, it } from 'vitest';-import ts from 'typescript';-import appSource from '@/App.tsx?raw';-import resourceTypeCompatSource from '@/utils/resourceTypeCompat.ts?raw';-import resourceLinksSource from '@/routing/resourceLinks.ts?raw';-import reportingResourceTypesUtilSource from '@/utils/reportingResourceTypes.ts?raw';-import chartsApiSource from '@/api/charts.ts?raw';-import investigateAlertButtonSource from '@/components/Alerts/InvestigateAlertButton.tsx?raw';-import commandPaletteModalSource from '@/components/shared/CommandPaletteModal.tsx?raw';-import commandPaletteModelSource from '@/components/shared/commandPaletteModel.ts?raw';-import columnPickerSource from '@/components/shared/ColumnPicker.tsx?raw';-import columnPickerModelSource from '@/components/shared/columnPickerModel.ts?raw';-import tagInputSource from '@/components/shared/TagInput.tsx?raw';-import tagInputModelSource from '@/components/shared/tagInputModel.ts?raw';-import containerUpdateBadgeSource from '@/components/shared/ContainerUpdateBadge.tsx?raw';-import containerUpdateBadgeModelSource from '@/components/shared/containerUpdateBadgeModel.ts?raw';-import dialogSource from '@/components/shared/Dialog.tsx?raw';-import dialogModelSource from '@/components/shared/dialogModel.ts?raw';-import filterButtonGroupSource from '@/components/shared/FilterButtonGroup.tsx?raw';-import filterButtonGroupModelSource from '@/components/shared/filterButtonGroupModel.ts?raw';-import helpIconSource from '@/components/shared/HelpIcon.tsx?raw';-import helpIconModelSource from '@/components/shared/helpIconModel.ts?raw';-import historyChartHeaderSource from '@/components/shared/HistoryChartHeader.tsx?raw';-import historyChartOverlaySource from '@/components/shared/HistoryChartOverlay.tsx?raw';-import historyChartSource from '@/components/shared/HistoryChart.tsx?raw';-import historyChartModelSource from '@/components/shared/historyChartModel.ts?raw';-import historyChartTooltipSource from '@/components/shared/HistoryChartTooltip.tsx?raw';-import mobileNavBarSource from '@/components/shared/MobileNavBar.tsx?raw';-import mobileNavBarModelSource from '@/components/shared/mobileNavBarModel.ts?raw';-import pulseDataGridSource from '@/components/shared/PulseDataGrid.tsx?raw';-import pulseDataGridModelSource from '@/components/shared/pulseDataGridModel.ts?raw';-import searchFieldSource from '@/components/shared/SearchField.tsx?raw';-import searchFieldModelSource from '@/components/shared/searchFieldModel.ts?raw';-import searchInputSource from '@/components/shared/SearchInput.tsx?raw';-import searchInputEnhancementsSource from '@/components/shared/SearchInputEnhancements.tsx?raw';-import searchInputEnhancementsModelSource from '@/components/shared/searchInputEnhancementsModel.ts?raw';-import searchInputModelSource from '@/components/shared/searchInputModel.ts?raw';-import statusBadgeSource from '@/components/shared/StatusBadge.tsx?raw';-import statusBadgeModelSource from '@/components/shared/statusBadgeModel.ts?raw';-import toggleSource from '@/components/shared/Toggle.tsx?raw';-import toggleModelSource from '@/components/shared/toggleModel.ts?raw';-import searchTipsPopoverSource from '@/components/shared/SearchTipsPopover.tsx?raw';-import searchTipsPopoverModelSource from '@/components/shared/searchTipsPopoverModel.ts?raw';-import tooltipSource from '@/components/shared/Tooltip.tsx?raw';-import tooltipModelSource from '@/components/shared/tooltipModel.ts?raw';-import upgradeLinkSource from '@/components/shared/UpgradeLink.tsx?raw';-import selectionCardGroupSource from '@/components/shared/SelectionCardGroup.tsx?raw';-import selectionCardGroupModelSource from '@/components/shared/selectionCardGroupModel.ts?raw';-import commandPaletteStateSource from '@/components/shared/useCommandPaletteState.ts?raw';-import columnPickerStateSource from '@/components/shared/useColumnPickerState.ts?raw';-import tagInputStateSource from '@/components/shared/useTagInputState.ts?raw';-import containerUpdateButtonStateSource from '@/components/shared/useContainerUpdateButtonState.ts?raw';-import dialogStateSource from '@/components/shared/useDialogState.ts?raw';-import filterButtonGroupStateSource from '@/components/shared/useFilterButtonGroupState.ts?raw';-import helpIconStateSource from '@/components/shared/useHelpIconState.ts?raw';-import historyChartStateSource from '@/components/shared/useHistoryChartState.ts?raw';-import mobileNavBarStateSource from '@/components/shared/useMobileNavBarState.ts?raw';-import pulseDataGridStateSource from '@/components/shared/usePulseDataGridState.ts?raw';-import searchFieldStateSource from '@/components/shared/useSearchFieldState.ts?raw';-import searchInputStateSource from '@/components/shared/useSearchInputState.ts?raw';-import searchInputEnhancementsStateSource from '@/components/shared/useSearchInputEnhancements.ts?raw';-import statusBadgeStateSource from '@/components/shared/useStatusBadgeState.ts?raw';-import toggleStateSource from '@/components/shared/useToggleState.ts?raw';-import searchTipsPopoverStateSource from '@/components/shared/useSearchTipsPopoverState.ts?raw';-import tooltipStateSource from '@/components/shared/useTooltipState.ts?raw';-import selectionCardGroupStateSource from '@/components/shared/useSelectionCardGroupState.ts?raw';-import resourceBadgePresentationSource from '@/utils/resourceBadgePresentation.ts?raw';-import workloadTypeBadgesSource from '@/components/shared/workloadTypeBadges.ts?raw';-import tagBadgesSource from '@/components/shared/TagBadges.tsx?raw';-import emptyStateSource from '@/components/shared/EmptyState.tsx?raw';-import webInterfaceUrlFieldSource from '@/components/shared/WebInterfaceUrlField.tsx?raw';-import webInterfaceUrlFieldStateSource from '@/components/shared/useWebInterfaceUrlFieldState.ts?raw';-import workloadTypePresentationSource from '@/utils/workloadTypePresentation.ts?raw';-import sourcePlatformsSource from '@/utils/sourcePlatforms.ts?raw';-import storageSourcesSource from '@/utils/storageSources.ts?raw';-import rbacPermissionsSource from '@/utils/rbacPermissions.ts?raw';-import systemSettingsPresentationSource from '@/utils/systemSettingsPresentation.ts?raw';-import monitoredSystemPresentationSource from '@/utils/monitoredSystemPresentation.ts?raw';-import updatesSettingsPanelSource from '@/components/Settings/UpdatesSettingsPanel.tsx?raw';-import copyCommandBlockSource from '@/components/Settings/CopyCommandBlock.tsx?raw';-import updateInstallGuideSource from '@/components/Settings/UpdateInstallGuide.tsx?raw';-import reportingPanelModelSource from '@/components/Settings/reportingPanelModel.ts?raw';-import reportingPanelStateSource from '@/components/Settings/useReportingPanelState.ts?raw';-import updatesSettingsModelSource from '@/components/Settings/updatesSettingsModel.ts?raw';-import diagnosticsModelSource from '@/components/Settings/diagnosticsModel.ts?raw';-import upgradeNavigationSource from '@/utils/upgradeNavigation.ts?raw';-import diagnosticsResultsPanelSource from '@/components/Settings/DiagnosticsResultsPanel.tsx?raw';-import diagnosticsStateSource from '@/components/Settings/useDiagnosticsPanelState.ts?raw';-import settingsShellSource from '@/components/Settings/Settings.tsx?raw';-import settingsPageShellSource from '@/components/Settings/SettingsPageShell.tsx?raw';-import settingsDialogsSource from '@/components/Settings/SettingsDialogs.tsx?raw';-import settingsPanelRegistrySource from '@/components/Settings/useSettingsPanelRegistry.tsx?raw';-import settingsPanelRegistryContextSource from '@/components/Settings/settingsPanelRegistryContext.tsx?raw';-import settingsPanelRegistryLoadersSource from '@/components/Settings/settingsPanelRegistryLoaders.ts?raw';-import settingsNavigationModelSource from '@/components/Settings/settingsNavigationModel.ts?raw';-import settingsRoutingSource from '@/components/Settings/settingsRouting.ts?raw';-import settingsTypesSource from '@/components/Settings/settingsTypes.ts?raw';-import settingsNavigationHookSource from '@/components/Settings/useSettingsNavigation.ts?raw';-import settingsShellStateSource from '@/components/Settings/useSettingsShellState.ts?raw';-import settingsNavCatalogSource from '@/components/Settings/settingsNavCatalog.ts?raw';-import settingsNavVisibilitySource from '@/components/Settings/settingsNavVisibility.ts?raw';-import settingsTabSaveBehaviorSource from '@/components/Settings/settingsTabSaveBehavior.ts?raw';-import settingsSystemPanelsSource from '@/components/Settings/useSettingsSystemPanels.tsx?raw';-import settingsInfrastructurePanelPropsSource from '@/components/Settings/useSettingsInfrastructurePanelProps.ts?raw';-import discoverySettingsStateSource from '@/components/Settings/useDiscoverySettingsState.ts?raw';-import discoverySettingsFormSource from '@/components/Settings/DiscoverySettingsForm.tsx?raw';-import discoverySettingsModelSource from '@/components/Settings/discoverySettingsModel.ts?raw';-import infrastructureDiscoverySettingsDialogSource from '@/components/Settings/InfrastructureDiscoverySettingsDialog.tsx?raw';-import networkBoundarySettingsSectionSource from '@/components/Settings/NetworkBoundarySettingsSection.tsx?raw';-import networkSettingsPanelSource from '@/components/Settings/NetworkSettingsPanel.tsx?raw';-import networkSettingsModelSource from '@/components/Settings/networkSettingsModel.ts?raw';-import reportingPresentationSource from '@/utils/reportingPresentation.ts?raw';-import updatesPresentationSource from '@/utils/updatesPresentation.ts?raw';-import environmentLockBadgeSource from '@/components/shared/EnvironmentLockBadge.tsx?raw';-import environmentLockPresentationSource from '@/utils/environmentLockPresentation.ts?raw';-import dockerRuntimeSettingsCardSource from '@/components/Settings/DockerRuntimeSettingsCard.tsx?raw';-import discoveryTargetSource from '@/utils/discoveryTarget.ts?raw';-import recoveryOutcomePresentationSource from '@/utils/recoveryOutcomePresentation.ts?raw';-import recoveryDatePresentationSource from '@/utils/recoveryDatePresentation.ts?raw';-import recoveryTimelineChartPresentationSource from '@/utils/recoveryTimelineChartPresentation.ts?raw';-import recoveryTimelinePresentationSource from '@/utils/recoveryTimelinePresentation.ts?raw';-import workloadsSurfaceSource from '@/components/Workloads/WorkloadsSurface.tsx?raw';-import workloadsFilterSource from '@/components/Workloads/WorkloadsFilter.tsx?raw';-import workloadsWorkloadTableSource from '@/components/Workloads/WorkloadsTable.tsx?raw';-import workloadPanelSource from '@/components/Workloads/WorkloadPanel.tsx?raw';-import workloadTableHeaderSource from '@/components/Workloads/WorkloadTableHeader.tsx?raw';-import workloadsFilterModelSource from '@/components/Workloads/workloadsFilterModel.ts?raw';-import workloadsControlsStateSource from '@/components/Workloads/useWorkloadsControlsState.ts?raw';-import workloadsGuestMetadataStateSource from '@/components/Workloads/useWorkloadGuestMetadataState.ts?raw';-import workloadSelectionModelSource from '@/components/Workloads/workloadSelectionModel.ts?raw';-import workloadsSelectionStateSource from '@/components/Workloads/useWorkloadSelectionState.ts?raw';-import workloadsWorkloadDerivedStateSource from '@/components/Workloads/useWorkloadsDerivedState.ts?raw';-import workloadsWorkloadViewportSyncSource from '@/components/Workloads/useWorkloadViewportSync.ts?raw';-import windowedPageScrollSource from '@/components/shared/windowedPageScroll.ts?raw';-import workloadsWorkloadFilterOptionsSource from '@/components/Workloads/useWorkloadFilterOptions.ts?raw';-import workloadFilterConfigModelSource from '@/components/Workloads/workloadFilterConfigModel.ts?raw';-import workloadRouteModelSource from '@/components/Workloads/workloadRouteModel.ts?raw';-import workloadRouteStateModelSource from '@/components/Workloads/workloadRouteStateModel.ts?raw';-import workloadUrlSyncModelSource from '@/components/Workloads/workloadUrlSyncModel.ts?raw';-import workloadsWorkloadRouteStateSource from '@/components/Workloads/useWorkloadRouteState.ts?raw';-import workloadsWorkloadUrlSyncSource from '@/components/Workloads/useWorkloadUrlSync.ts?raw';-import workloadsStateSource from '@/components/Workloads/useWorkloadsState.ts?raw';-import workloadTopologySource from '@/components/Workloads/workloadTopology.ts?raw';-import groupedTableWindowingSource from '@/components/Workloads/useGroupedTableWindowing.ts?raw';-import thresholdSliderModelSource from '@/components/Workloads/thresholdSliderModel.ts?raw';-import thresholdSliderStateSource from '@/components/Workloads/useThresholdSliderState.ts?raw';-import enhancedCpuBarSource from '@/components/Workloads/EnhancedCPUBar.tsx?raw';-import enhancedCpuBarModelSource from '@/components/Workloads/enhancedCpuBarModel.ts?raw';-import enhancedCpuBarStateSource from '@/components/Workloads/useEnhancedCPUBarState.ts?raw';-import stackedDiskBarSource from '@/components/Workloads/StackedDiskBar.tsx?raw';-import stackedDiskBarModelSource from '@/components/Workloads/stackedDiskBarModel.ts?raw';-import stackedDiskBarStateSource from '@/components/Workloads/useStackedDiskBarState.ts?raw';-import stackedMemoryBarSource from '@/components/Workloads/StackedMemoryBar.tsx?raw';-import stackedMemoryBarModelSource from '@/components/Workloads/stackedMemoryBarModel.ts?raw';-import stackedMemoryBarStateSource from '@/components/Workloads/useStackedMemoryBarState.ts?raw';-import thresholdSliderSource from '@/components/Workloads/ThresholdSlider.tsx?raw';-import guestRowSource from '@/components/Workloads/GuestRow.tsx?raw';-import guestRowCellsSource from '@/components/Workloads/GuestRowCells.tsx?raw';-import guestRowModelSource from '@/components/Workloads/guestRowModel.tsx?raw';-import guestRowStateSource from '@/components/Workloads/useGuestRowState.ts?raw';-import workloadsDiskListSource from '@/components/Workloads/DiskList.tsx?raw';-import workloadsDiskListModelSource from '@/components/Workloads/diskListModel.ts?raw';-import workloadsDiskListStateSource from '@/components/Workloads/useDiskListState.ts?raw';-import metricBarSource from '@/components/Workloads/MetricBar.tsx?raw';-import metricBarModelSource from '@/components/Workloads/metricBarModel.ts?raw';-import metricBarStateSource from '@/components/Workloads/useMetricBarState.ts?raw';-import guestDrawerSource from '@/components/Workloads/GuestDrawer.tsx?raw';-import guestDrawerOverviewSource from '@/components/Workloads/GuestDrawerOverview.tsx?raw';-import guestDrawerModelSource from '@/components/Workloads/guestDrawerModel.ts?raw';-import guestDrawerStateSource from '@/components/Workloads/useGuestDrawerState.ts?raw';-import workloadGuestPresentationSource from '@/utils/workloadGuestPresentation.ts?raw';-import orgScopeSource from '@/utils/orgScope.ts?raw';-import workloadsUtilitySource from '@/utils/workloads.ts?raw';-import workloadEmptyStatePresentationSource from '@/utils/workloadEmptyStatePresentation.ts?raw';-import resourceChangeSummarySource from '@/components/Infrastructure/ResourceChangeSummary.tsx?raw';-import resourceChangePresentationSource from '@/utils/resourceChangePresentation.ts?raw';-import resourceCorrelationPresentationSource from '@/utils/resourceCorrelationPresentation.ts?raw';-import confidencePresentationSource from '@/utils/confidencePresentation.ts?raw';-import textPresentationSource from '@/utils/textPresentation.ts?raw';-import patrolFormatSource from '@/utils/patrolFormat.ts?raw';-import aiFindingPresentationSource from '@/utils/aiFindingPresentation.ts?raw';-import resourceIdentitySource from '@/utils/resourceIdentity.ts?raw';-import stringUtilsSource from '@/utils/stringUtils.ts?raw';-import diskListSource from '@/components/Storage/DiskList.tsx?raw';-import useDiskListModelSource from '@/components/Storage/useDiskListModel.ts?raw';-import storagePageControlsSource from '@/components/Storage/StoragePageControls.tsx?raw';-import storageContentCardSource from '@/components/Storage/StorageContentCard.tsx?raw';-import storagePageSource from '@/components/Storage/Storage.tsx?raw';-import storageSummaryCacheSource from '@/utils/storageSummaryCache.ts?raw';-import useStorageContentCardModelSource from '@/components/Storage/useStorageContentCardModel.ts?raw';-import storagePoolsTableSource from '@/components/Storage/StoragePoolsTable.tsx?raw';-import useStoragePoolsTableModelSource from '@/components/Storage/useStoragePoolsTableModel.ts?raw';-import storageGroupRowSource from '@/components/Storage/StorageGroupRow.tsx?raw';-import enhancedStorageBarSource from '@/components/Storage/EnhancedStorageBar.tsx?raw';-import useEnhancedStorageBarModelSource from '@/components/Storage/useEnhancedStorageBarModel.ts?raw';-import diskDrawerOverviewSource from '@/components/Storage/DiskDrawerOverview.tsx?raw';-import diskDrawerPresentationSource from '@/features/storageBackups/diskDrawerPresentation.ts?raw';-import storagePoolDetailSource from '@/components/Storage/StoragePoolDetail.tsx?raw';-import useStoragePoolDetailModelSource from '@/components/Storage/useStoragePoolDetailModel.ts?raw';-import storagePoolRowSource from '@/components/Storage/StoragePoolRow.tsx?raw';-import storageExpansionStateSource from '@/components/Storage/useStorageExpansionState.ts?raw';-import storageFilterStateSource from '@/components/Storage/useStorageFilterState.ts?raw';-import storagePageFiltersSource from '@/components/Storage/useStoragePageFilters.ts?raw';-import storagePageDataSource from '@/components/Storage/useStoragePageData.ts?raw';-import storagePageModelSource from '@/components/Storage/useStoragePageModel.ts?raw';-import storagePageResourcesSource from '@/components/Storage/useStoragePageResources.ts?raw';-import storagePageStatusHookSource from '@/components/Storage/useStoragePageStatus.ts?raw';-import storagePageStateSource from '@/components/Storage/storagePageState.ts?raw';-import storageResourceHighlightSource from '@/components/Storage/useStorageResourceHighlight.ts?raw';-import useStorageModelSource from '@/components/Storage/useStorageModel.ts?raw';-import useStorageCephModelSource from '@/components/Storage/useStorageCephModel.ts?raw';-import useStorageAlertStateSource from '@/components/Storage/useStorageAlertState.ts?raw';-import temperatureUtilSource from '@/utils/temperature.ts?raw';-import proxmoxMailGatewayDrawerSource from '@/features/proxmox/ProxmoxMailGatewayDrawer.tsx?raw';-import serviceHealthPresentationSource from '@/utils/serviceHealthPresentation.ts?raw';-import alertIncidentEventFiltersSource from '@/components/Alerts/IncidentEventFilters.tsx?raw';-import alertIncidentTimelinePanelSource from '@/components/Alerts/IncidentTimelinePanel.tsx?raw';-import alertIncidentTimelineEventCardSource from '@/components/Alerts/IncidentTimelineEventCard.tsx?raw';-import k8sNamespacesDrawerSource from '@/components/Kubernetes/K8sNamespacesDrawer.tsx?raw';-import k8sNamespacePresentationSource from '@/utils/k8sNamespacePresentation.ts?raw';-import k8sStatusPresentationSource from '@/utils/k8sStatusPresentation.ts?raw';-import raidCardSource from '@/components/shared/cards/RaidCard.tsx?raw';-import raidPresentationSource from '@/utils/raidPresentation.ts?raw';-import proLicensePanelSource from '@/components/Settings/ProLicensePanel.tsx?raw';-import proLicensePlanSectionSource from '@/components/Settings/ProLicensePlanSection.tsx?raw';-import securityPostureSummarySource from '@/components/Settings/SecurityPostureSummary.tsx?raw';-import securityAuthPanelSource from '@/components/Settings/SecurityAuthPanel.tsx?raw';-import securityWarningSource from '@/components/SecurityWarning.tsx?raw';-import licensePresentationSource from '@/utils/licensePresentation.ts?raw';-import securityScorePresentationSource from '@/utils/securityScorePresentation.ts?raw';-import securityAuthPresentationSource from '@/utils/securityAuthPresentation.ts?raw';-import resourceDetailDrawerShellSource from '@/components/Infrastructure/ResourceDetailDrawer.tsx?raw';-import resourceDetailDrawerOverviewSource from '@/components/Infrastructure/ResourceDetailDrawerOverviewTab.tsx?raw';-import resourceDetailDrawerDebugSource from '@/components/Infrastructure/ResourceDetailDrawerDebugTab.tsx?raw';-import resourceDetailSummarySource from '@/components/Infrastructure/ResourceDetailSummary.tsx?raw';-import resourceDetailDrawerDiscoveryModelSource from '@/components/Infrastructure/resourceDetailDiscoveryModel.ts?raw';-import resourceDetailMappersSource from '@/components/Infrastructure/resourceDetailMappers.ts?raw';-import resourceDetailDrawerHistoryStateSource from '@/components/Infrastructure/useResourceDetailDrawerHistoryState.ts?raw';-import resourceDetailDrawerDerivedStateSource from '@/components/Infrastructure/useResourceDetailDrawerDerivedState.ts?raw';-import resourceDetailDrawerIdentityModelSource from '@/components/Infrastructure/resourceDetailDrawerIdentityModel.ts?raw';-import resourceDetailDrawerOperationalModelSource from '@/components/Infrastructure/resourceDetailDrawerOperationalModel.ts?raw';-import resourceDetailDrawerServiceModelSource from '@/components/Infrastructure/resourceDetailDrawerServiceModel.ts?raw';-import resourceDetailDrawerDockerActionsStateSource from '@/components/Infrastructure/useResourceDetailDrawerDockerActionsState.ts?raw';-import resourceDetailDrawerStateSource from '@/components/Infrastructure/useResourceDetailDrawerState.ts?raw';-import useUnifiedResourcesSource from '@/hooks/useUnifiedResources.ts?raw';-import useWorkloadsSource from '@/hooks/useWorkloads.ts?raw';-import findingsPanelSource from '@/components/AI/FindingsPanel.tsx?raw';-import infrastructureSettingsPresentationSource from '@/utils/infrastructureSettingsPresentation.ts?raw';-import proxmoxSettingsModelSource from '@/components/Settings/proxmoxSettingsModel.ts?raw';-import infrastructureWorkspaceSource from '@/components/Settings/InfrastructureWorkspace.tsx?raw';-import infrastructureWorkspaceModelSource from '@/components/Settings/infrastructureWorkspaceModel.ts?raw';-import generalSettingsPanelSource from '@/components/Settings/GeneralSettingsPanel.tsx?raw';-import nodeModalAuthenticationSectionSource from '@/components/Settings/NodeModalAuthenticationSection.tsx?raw';-import nodeModalBasicInfoSectionSource from '@/components/Settings/NodeModalBasicInfoSection.tsx?raw';-import nodeModalModelSource from '@/components/Settings/nodeModalModel.ts?raw';-import nodeModalMonitoringSectionSource from '@/components/Settings/NodeModalMonitoringSection.tsx?raw';-import nodeModalSetupGuideSectionSource from '@/components/Settings/NodeModalSetupGuideSection.tsx?raw';-import nodeModalStatusFooterSource from '@/components/Settings/NodeModalStatusFooter.tsx?raw';-import nodeModalStateSource from '@/components/Settings/useNodeModalState.ts?raw';-import nodeModalPresentationSource from '@/utils/nodeModalPresentation.ts?raw';-import diskPresentationSource from '@/features/storageBackups/diskPresentation.ts?raw';-import diskDetailPresentationSource from '@/features/storageBackups/diskDetailPresentation.ts?raw';-import storageRecordPresentationSource from '@/features/storageBackups/recordPresentation.ts?raw';-import storageModelCoreSource from '@/features/storageBackups/storageModelCore.ts?raw';-import resourceStorageMappingSource from '@/features/storageBackups/resourceStorageMapping.ts?raw';-import resourceStoragePresentationSource from '@/features/storageBackups/resourceStoragePresentation.ts?raw';-import storageAdapterCoreSource from '@/features/storageBackups/storageAdapterCore.ts?raw';-import storageAlertStateSource from '@/features/storageBackups/storageAlertState.ts?raw';-import cephRecordPresentationSource from '@/features/storageBackups/cephRecordPresentation.ts?raw';-import cephSummaryPresentationSource from '@/features/storageBackups/cephSummaryPresentation.ts?raw';-import storageDomainSource from '@/features/storageBackups/storageDomain.ts?raw';-import storagePoolDetailPresentationSource from '@/features/storageBackups/storagePoolDetailPresentation.ts?raw';-import storageBarPresentationSource from '@/features/storageBackups/storageBarPresentation.ts?raw';-import storagePagePresentationSource from '@/features/storageBackups/storagePagePresentation.ts?raw';-import proLicensePanelStateSource from '@/components/Settings/useProLicensePanelState.ts?raw';-import storagePageStatusSource from '@/features/storageBackups/storagePageStatus.ts?raw';-import storageRowPresentationSource from '@/features/storageBackups/rowPresentation.ts?raw';-import storagePoolRowPresentationSource from '@/features/storageBackups/storagePoolRowPresentation.ts?raw';-import storageGroupPresentationSource from '@/features/storageBackups/groupPresentation.ts?raw';-import storageFilterPresentationSource from '@/features/storageBackups/storageFilterPresentation.ts?raw';-import storageRowAlertPresentationSource from '@/features/storageBackups/storageRowAlertPresentation.ts?raw';-import storagePoolsTablePresentationSource from '@/features/storageBackups/storagePoolsTablePresentation.ts?raw';-import proxmoxBackupSourcePresentationSource from '@/features/proxmox/proxmoxBackupSourcePresentation.ts?raw';-import proxmoxBackupsTableSharedSource from '@/features/proxmox/proxmoxBackupsTableShared.tsx?raw';-import zfsPresentationSource from '@/features/storageBackups/zfsPresentation.ts?raw';-import storageAdaptersSource from '@/features/storageBackups/storageAdapters.ts?raw';-import alertsPageSource from '@/pages/Alerts.tsx?raw';-import alertDestinationsPresentationSource from '@/utils/alertDestinationsPresentation.ts?raw';-import alertBulkEditPresentationSource from '@/utils/alertBulkEditPresentation.ts?raw';-import alertEmailPresentationSource from '@/utils/alertEmailPresentation.ts?raw';-import alertOverviewPresentationSource from '@/utils/alertOverviewPresentation.ts?raw';-import alertResourceTablePresentationSource from '@/utils/alertResourceTablePresentation.ts?raw';-import alertWebhookPresentationSource from '@/utils/alertWebhookPresentation.ts?raw';-import alertOverviewTabSource from '@/features/alerts/OverviewTab.tsx?raw';-import alertsConfigurationSurfaceSource from '@/features/alerts/AlertsConfigurationSurface.tsx?raw';-import alertsConfigurationStateSource from '@/features/alerts/useAlertsConfigurationState.ts?raw';-import alertsConfigurationSnapshotStateSource from '@/features/alerts/useAlertsConfigurationSnapshotState.ts?raw';-import alertsConfigurationModelSource from '@/features/alerts/alertsConfigurationModel.ts?raw';-import alertOverridesModelSource from '@/features/alerts/alertOverridesModel.ts?raw';-import alertOverridesStateSource from '@/features/alerts/useAlertOverridesState.ts?raw';-import alertDestinationsModelSource from '@/features/alerts/alertDestinationsModel.ts?raw';-import alertDestinationsStateSource from '@/features/alerts/useAlertDestinationsState.ts?raw';-import alertDestinationsTabStateSource from '@/features/alerts/useAlertDestinationsTabState.ts?raw';-import alertWebhookDestinationsStateSource from '@/features/alerts/useAlertWebhookDestinationsState.ts?raw';-import alertAcknowledgementStateSource from '@/features/alerts/useAlertAcknowledgementState.ts?raw';-import alertHistoryAdministrationCardSource from '@/features/alerts/AlertHistoryAdministrationCard.tsx?raw';-import alertHistoryFiltersCardSource from '@/features/alerts/AlertHistoryFiltersCard.tsx?raw';-import alertHistoryFrequencyCardSource from '@/features/alerts/AlertHistoryFrequencyCard.tsx?raw';-import alertHistoryItemActionsSource from '@/features/alerts/AlertHistoryItemActions.tsx?raw';-import alertHistoryTableAlertRowSource from '@/features/alerts/AlertHistoryTableAlertRow.tsx?raw';-import alertHistoryTableGroupRowSource from '@/features/alerts/AlertHistoryTableGroupRow.tsx?raw';-import alertHistoryTableSectionSource from '@/features/alerts/AlertHistoryTableSection.tsx?raw';-import alertResourceIncidentsPanelSource from '@/features/alerts/AlertResourceIncidentsPanel.tsx?raw';-import alertHistoryStateSource from '@/features/alerts/useAlertHistoryState.ts?raw';-import alertResourceIncidentsStateSource from '@/features/alerts/useAlertResourceIncidentsState.ts?raw';-import alertHistoryModelSource from '@/features/alerts/alertHistoryModel.ts?raw';-import alertIncidentTimelineStateSource from '@/features/alerts/useAlertIncidentTimelineState.ts?raw';-import alertOverviewActiveAlertsSectionSource from '@/features/alerts/AlertOverviewActiveAlertsSection.tsx?raw';-import alertOverviewAlertCardSource from '@/features/alerts/AlertOverviewAlertCard.tsx?raw';-import alertOverviewStatsCardsSource from '@/features/alerts/AlertOverviewStatsCards.tsx?raw';-import alertOverviewStateSource from '@/features/alerts/useAlertOverviewState.ts?raw';-import alertScheduleStateSource from '@/features/alerts/useAlertScheduleState.ts?raw';-import alertDestinationsTabSource from '@/features/alerts/tabs/DestinationsTab.tsx?raw';-import alertHistoryTabSource from '@/features/alerts/tabs/HistoryTab.tsx?raw';-import alertScheduleTabSource from '@/features/alerts/tabs/ScheduleTab.tsx?raw';-import alertThresholdsTabSource from '@/features/alerts/tabs/ThresholdsTab.tsx?raw';-import thresholdsTabModelSource from '@/features/alerts/thresholds/thresholdsTabModel.ts?raw';-import thresholdsTableSource from '@/components/Alerts/ThresholdsTable.tsx?raw';-import thresholdsTableAgentDisksSectionSource from '@/components/Alerts/ThresholdsTableAgentDisksSection.tsx?raw';-import thresholdsTableAgentsTabSource from '@/components/Alerts/ThresholdsTableAgentsTab.tsx?raw';-import thresholdsTableAgentsResourcesSectionSource from '@/components/Alerts/ThresholdsTableAgentsResourcesSection.tsx?raw';-import thresholdsTableDockerContainersSectionSource from '@/components/Alerts/ThresholdsTableDockerContainersSection.tsx?raw';-import thresholdsTableDockerHostsSectionSource from '@/components/Alerts/ThresholdsTableDockerHostsSection.tsx?raw';-import thresholdsTableDockerIgnoredPrefixesSectionSource from '@/components/Alerts/ThresholdsTableDockerIgnoredPrefixesSection.tsx?raw';-import thresholdsTableDockerServiceGapSectionSource from '@/components/Alerts/ThresholdsTableDockerServiceGapSection.tsx?raw';-import thresholdsTableDockerTabSource from '@/components/Alerts/ThresholdsTableDockerTab.tsx?raw';-import thresholdsTableProxmoxPMGSectionSource from '@/components/Alerts/ThresholdsTableProxmoxPMGSection.tsx?raw';-import thresholdsTableProxmoxBackupsSectionSource from '@/components/Alerts/ThresholdsTableProxmoxBackupsSection.tsx?raw';-import thresholdsTableProxmoxGuestFilteringSectionSource from '@/components/Alerts/ThresholdsTableProxmoxGuestFilteringSection.tsx?raw';-import thresholdsTableProxmoxGuestsSectionSource from '@/components/Alerts/ThresholdsTableProxmoxGuestsSection.tsx?raw';-import thresholdsTableProxmoxNodesSectionSource from '@/components/Alerts/ThresholdsTableProxmoxNodesSection.tsx?raw';-import thresholdsTableProxmoxPBSSectionSource from '@/components/Alerts/ThresholdsTableProxmoxPBSSection.tsx?raw';-import thresholdsTableProxmoxSnapshotsSectionSource from '@/components/Alerts/ThresholdsTableProxmoxSnapshotsSection.tsx?raw';-import thresholdsTableProxmoxStorageSectionSource from '@/components/Alerts/ThresholdsTableProxmoxStorageSection.tsx?raw';-import thresholdsTableProxmoxTabSource from '@/components/Alerts/ThresholdsTableProxmoxTab.tsx?raw';-import thresholdsDataHookSource from '@/features/alerts/thresholds/hooks/useThresholdsData.ts?raw';-import thresholdsHostDataHookSource from '@/features/alerts/thresholds/hooks/useThresholdsHostData.ts?raw';-import thresholdsDockerDataHookSource from '@/features/alerts/thresholds/hooks/useThresholdsDockerData.ts?raw';-import thresholdsGuestDataHookSource from '@/features/alerts/thresholds/hooks/useThresholdsGuestData.ts?raw';-import thresholdsInfrastructureDataHookSource from '@/features/alerts/thresholds/hooks/useThresholdsInfrastructureData.ts?raw';-import thresholdsRecoveryDefaultsStateHookSource from '@/features/alerts/thresholds/hooks/useThresholdsRecoveryDefaultsState.ts?raw';-import thresholdsTableStateHookSource from '@/features/alerts/thresholds/hooks/useThresholdsTableState.ts?raw';-import thresholdsAvailabilityMutationsHookSource from '@/features/alerts/thresholds/hooks/useThresholdsAvailabilityMutations.ts?raw';-import thresholdsOverrideMutationsHookSource from '@/features/alerts/thresholds/hooks/useThresholdsOverrideMutations.ts?raw';-import thresholdsOverrideMutationModelSource from '@/features/alerts/thresholds/thresholdsOverrideMutationModel.ts?raw';-import thresholdsResourceModelSource from '@/features/alerts/thresholds/thresholdsResourceModel.ts?raw';-import thresholdsTableSectionPropsSource from '@/features/alerts/thresholds/thresholdsTableSectionProps.ts?raw';-import alertIncidentPresentationSource from '@/utils/alertIncidentPresentation.ts?raw';-import alertHistoryPresentationSource from '@/utils/alertHistoryPresentation.ts?raw';-import bulkEditDialogSource from '@/components/Alerts/BulkEditDialog.tsx?raw';-import alertResourceTableModelSource from '@/components/Alerts/alertResourceTableModel.ts?raw';-import alertResourceGroupHeaderSource from '@/components/Alerts/AlertResourceGroupHeader.tsx?raw';-import alertResourceTableDesktopSource from '@/components/Alerts/AlertResourceTableDesktop.tsx?raw';-import alertResourceTableMobileSource from '@/components/Alerts/AlertResourceTableMobile.tsx?raw';-import alertResourceTableRowSource from '@/components/Alerts/AlertResourceTableRow.tsx?raw';-import alertResourceMetricEditorSource from '@/components/Alerts/AlertResourceMetricEditor.tsx?raw';-import alertResourceTableSource from '@/components/Alerts/ResourceTable.tsx?raw';-import alertResourceTableStateSource from '@/components/Alerts/useAlertResourceTableState.ts?raw';-import emailProviderSelectSource from '@/components/Alerts/EmailProviderSelect.tsx?raw';-import emailProviderSelectStateSource from '@/components/Alerts/useEmailProviderSelectState.ts?raw';-import webhookConfigSource from '@/components/Alerts/WebhookConfig.tsx?raw';-import webhookConfigFormSource from '@/components/Alerts/WebhookConfigForm.tsx?raw';-import webhookConfigListSource from '@/components/Alerts/WebhookConfigList.tsx?raw';-import webhookConfigStateSource from '@/components/Alerts/useWebhookConfigState.ts?raw';-import alertActivationPresentationSource from '@/utils/alertActivationPresentation.ts?raw';-import alertFrequencyPresentationSource from '@/utils/alertFrequencyPresentation.ts?raw';-import alertSeverityPresentationSource from '@/utils/alertSeverityPresentation.ts?raw';-import alertTabsPresentationSource from '@/utils/alertTabsPresentation.ts?raw';-import alertGroupingPresentationSource from '@/utils/alertGroupingPresentation.ts?raw';-import alertSchedulePresentationSource from '@/utils/alertSchedulePresentation.ts?raw';-import rbacPresentationSource from '@/utils/rbacPresentation.ts?raw';-import upgradePresentationSource from '@/utils/upgradePresentation.ts?raw';-import agentProfilesPanelSource from '@/components/Settings/AgentProfilesPanel.tsx?raw';-import agentProfilesPanelStateSource from '@/components/Settings/useAgentProfilesPanelState.ts?raw';-import agentProfilesPresentationSource from '@/utils/agentProfilesPresentation.ts?raw';-import agentProfileSuggestionPresentationSource from '@/utils/agentProfileSuggestionPresentation.ts?raw';-import organizationAccessPanelSource from '@/components/Settings/OrganizationAccessPanel.tsx?raw';-import organizationAccessLoadingStateSource from '@/components/Settings/OrganizationAccessLoadingState.tsx?raw';-import organizationAccessManagementSectionSource from '@/components/Settings/OrganizationAccessManagementSection.tsx?raw';-import organizationAccessMembersSectionSource from '@/components/Settings/OrganizationAccessMembersSection.tsx?raw';-import billingAdminOrganizationsTableSource from '@/components/Settings/BillingAdminOrganizationsTable.tsx?raw';-import billingAdminPanelSource from '@/components/Settings/BillingAdminPanel.tsx?raw';-import billingAdminPanelStateSource from '@/components/Settings/useBillingAdminPanelState.ts?raw';-import organizationBillingLoadingStateSource from '@/components/Settings/OrganizationBillingLoadingState.tsx?raw';-import organizationBillingPanelSource from '@/components/Settings/OrganizationBillingPanel.tsx?raw';-import organizationOverviewLoadingStateSource from '@/components/Settings/OrganizationOverviewLoadingState.tsx?raw';-import organizationOverviewMembersSectionSource from '@/components/Settings/OrganizationOverviewMembersSection.tsx?raw';-import organizationSharingCreateSectionSource from '@/components/Settings/OrganizationSharingCreateSection.tsx?raw';-import organizationOutgoingSharesSectionSource from '@/components/Settings/OrganizationOutgoingSharesSection.tsx?raw';-import organizationIncomingSharesSectionSource from '@/components/Settings/OrganizationIncomingSharesSection.tsx?raw';-import organizationAccessStateSource from '@/components/Settings/useOrganizationAccessPanelState.ts?raw';-import organizationBillingStateSource from '@/components/Settings/useOrganizationBillingPanelState.ts?raw';-import organizationOverviewStateSource from '@/components/Settings/useOrganizationOverviewPanelState.ts?raw';-import organizationSharingStateSource from '@/components/Settings/useOrganizationSharingPanelState.ts?raw';-import organizationRolePresentationSource from '@/utils/organizationRolePresentation.ts?raw';-import organizationSettingsPresentationSource from '@/utils/organizationSettingsPresentation.ts?raw';-import rbacFeatureGateSectionSource from '@/components/Settings/RBACFeatureGateSection.tsx?raw';-import rbacFeatureGateStateSource from '@/components/Settings/useRBACFeatureGateState.ts?raw';-import featureGateSectionSource from '@/components/shared/FeatureGateSection.tsx?raw';--import rolesPanelSource from '@/components/Settings/RolesPanel.tsx?raw';-import rolesPanelStateSource from '@/components/Settings/useRolesPanelState.ts?raw';-import auditWebhookPanelSource from '@/components/Settings/AuditWebhookPanel.tsx?raw';-import auditWebhookStateSource from '@/components/Settings/useAuditWebhookPanelState.ts?raw';-import auditWebhookPresentationSource from '@/utils/auditWebhookPresentation.ts?raw';-import auditLogPanelSource from '@/components/Settings/AuditLogPanel.tsx?raw';-import auditLogStateSource from '@/components/Settings/useAuditLogPanelState.ts?raw';-import auditLogPresentationSource from '@/utils/auditLogPresentation.ts?raw';-import ssoProvidersPanelSource from '@/components/Settings/SSOProvidersPanel.tsx?raw';-import ssoProvidersStateSource from '@/components/Settings/useSSOProvidersState.ts?raw';-import ssoProvidersModelSource from '@/components/Settings/ssoProvidersModel.ts?raw';-import ssoProviderPresentationSource from '@/utils/ssoProviderPresentation.ts?raw';-import userAssignmentsPanelSource from '@/components/Settings/UserAssignmentsPanel.tsx?raw';-import userAssignmentsPanelStateSource from '@/components/Settings/useUserAssignmentsPanelState.ts?raw';-import approvalBannerSource from '@/components/patrol/ApprovalBanner.tsx?raw';-import approvalSectionSource from '@/components/patrol/ApprovalSection.tsx?raw';-import investigationMessagesSource from '@/components/patrol/InvestigationMessages.tsx?raw';-import investigationSectionSource from '@/components/patrol/InvestigationSection.tsx?raw';-import runHistoryPanelSource from '@/components/patrol/RunHistoryPanel.tsx?raw';-import runToolCallTraceSource from '@/components/patrol/RunToolCallTrace.tsx?raw';-import diagnosticsPanelSource from '@/components/Settings/DiagnosticsPanel.tsx?raw';-import diagnosticsPresentationSource from '@/utils/diagnosticsPresentation.ts?raw';-import aiSettingsShellSource from '@/components/Settings/AISettings.tsx?raw';-import aiProviderConfigurationSectionSource from '@/components/Settings/AIProviderConfigurationSection.tsx?raw';-import aiSettingsDialogsSource from '@/components/Settings/AISettingsDialogs.tsx?raw';-import aiModelSelectionSectionSource from '@/components/Settings/AIModelSelectionSection.tsx?raw';-import aiSettingsModelSource from '@/components/Settings/aiSettingsModel.ts?raw';-import aiRuntimeControlsSectionSource from '@/components/Settings/AIRuntimeControlsSection.tsx?raw';-import aiSettingsStatusAndActionsSource from '@/components/Settings/AISettingsStatusAndActions.tsx?raw';-import aiSettingsStateSource from '@/components/Settings/useAISettingsState.ts?raw';-import aiIntelligenceSource from '@/pages/AIIntelligence.tsx?raw';-import aiIntelligenceStoreSource from '@/stores/aiIntelligence.ts?raw';-import aiIntelligenceSummaryModelSource from '@/stores/aiIntelligenceSummaryModel.ts?raw';-import patrolIntelligenceBannersSource from '@/features/patrol/PatrolIntelligenceBanners.tsx?raw';-import patrolIntelligenceHeaderSource from '@/features/patrol/PatrolIntelligenceHeader.tsx?raw';-import patrolIntelligenceSurfaceSource from '@/features/patrol/PatrolIntelligenceSurface.tsx?raw';-import patrolInvestigationContextModelSource from '@/features/patrol/patrolInvestigationContextModel.ts?raw';-import patrolIntelligenceStateSource from '@/features/patrol/usePatrolIntelligenceState.ts?raw';-import patrolIntelligenceWorkspaceSource from '@/features/patrol/PatrolIntelligenceWorkspace.tsx?raw';-import aiCostPresentationSource from '@/utils/aiCostPresentation.ts?raw';-import thresholdSliderPresentationSource from '@/utils/thresholdSliderPresentation.ts?raw';-import emptyStatePresentationSource from '@/utils/emptyStatePresentation.ts?raw';-import reportingPanelSource from '@/components/Settings/ReportingPanel.tsx?raw';-import systemLogsPanelSource from '@/components/Settings/SystemLogsPanel.tsx?raw';-import systemLogsPanelStateSource from '@/components/Settings/useSystemLogsPanelState.ts?raw';-import systemLogsPresentationSource from '@/utils/systemLogsPresentation.ts?raw';-import patrolEmptyStatePresentationSource from '@/utils/patrolEmptyStatePresentation.ts?raw';-import approvalRiskPresentationSource from '@/utils/approvalRiskPresentation.ts?raw';-import patrolRunPresentationSource from '@/utils/patrolRunPresentation.ts?raw';-import aiCostDashboardSource from '@/components/AI/AICostDashboard.tsx?raw';-import aiModelPickerSource from '@/components/shared/AIModelPicker.tsx?raw';-import remediationStatusSource from '@/components/patrol/RemediationStatus.tsx?raw';-import remediationPresentationSource from '@/utils/remediationPresentation.ts?raw';--const aiSettingsSource = [- aiSettingsShellSource,- aiModelSelectionSectionSource,- aiRuntimeControlsSectionSource,- aiSettingsStatusAndActionsSource,- aiProviderConfigurationSectionSource,- aiSettingsDialogsSource,- aiSettingsModelSource,- aiSettingsStateSource,-].join('\n');--const resourceDetailDrawerSource = [- resourceDetailDrawerShellSource,- resourceDetailDrawerOverviewSource,- resourceDetailDrawerDebugSource,- resourceDetailDrawerHistoryStateSource,- resourceDetailDrawerDerivedStateSource,- resourceDetailDrawerStateSource,-].join('\n');--// Assert the shared boundary, not a retired helper spelling. Once the adapter-// supports close metadata, timeline consumers must use it: kind-only labels can-// incorrectly describe a moved alert as recovered (PR #2607).-function usesSharedChangePresentation(consumer: string, adapter: string): boolean {- const parse = (source: string) =>- ts.createSourceFile('boundary.tsx', source, ts.ScriptTarget.Latest, true, ts.ScriptKind.TSX);- const metadataAware = parse(adapter).statements.some(- (node) =>- ts.isFunctionDeclaration(node) &&- node.name?.text === 'getResourceChangePresentation' &&- node.modifiers?.some((modifier) => modifier.kind === ts.SyntaxKind.ExportKeyword),- );- const required = metadataAware- ? 'getResourceChangePresentation'- : 'getResourceChangeKindPresentation';- const tree = parse(consumer);- const bindings = new Set<string>();- for (const node of tree.statements) {- if (- !ts.isImportDeclaration(node) ||- !ts.isStringLiteral(node.moduleSpecifier) ||- node.moduleSpecifier.text !== '@/utils/resourceChangePresentation' ||- node.importClause?.isTypeOnly- )- continue;- const imports = node.importClause?.namedBindings;- if (!imports || !ts.isNamedImports(imports)) continue;- for (const item of imports.elements) {- if (!item.isTypeOnly && (item.propertyName ?? item.name).text === required) {- bindings.add(item.name.text);- }- }- }- let called = false;- const visit = (node: ts.Node) => {- if (- ts.isCallExpression(node) &&- ts.isIdentifier(node.expression) &&- bindings.has(node.expression.text) &&- node.arguments.length > 0 &&- // The metadata-aware adapter needs the change, not just its kind.- !(- metadataAware &&- ts.isPropertyAccessExpression(node.arguments[0]) &&- node.arguments[0].name.text === 'kind'- )- )- called = true;- ts.forEachChild(node, visit);- };- visit(tree);- return called;-}+import { canonicalizeFrontendResourceType } from '@/utils/resourceTypeCompat';describe('frontend resource type boundaries', () => {it('keeps the shared compatibility adapter narrow and explicit', () => {- expect(resourceTypeCompatSource).toContain('export const canonicalizeFrontendResourceType');- expect(resourceTypeCompatSource).toContain("case 'host'");- expect(resourceTypeCompatSource).toContain("case 'docker'");- expect(resourceTypeCompatSource).toContain("case 'docker_host'");- expect(resourceTypeCompatSource).toContain("case 'k8s'");- expect(resourceTypeCompatSource).toContain("case 'kubernetes_cluster'");- expect(resourceTypeCompatSource).not.toContain("case 'qemu'");- expect(resourceTypeCompatSource).not.toContain("case 'lxc'");- expect(resourceTypeCompatSource).not.toContain("case 'container'");- });-- it('keeps compatibility handling centralized in shared adapters and edge translators', () => {- expect(resourceLinksSource).toContain('canonicalizeWorkloadFilterType');- expect(resourceLinksSource).toContain('normalizeSourcePlatformQueryValue');- // buildInfrastructureHrefForWorkload was retired with the legacy- // /infrastructure route; the workload row no longer cross-jumps to a- // separate top-level surface.- expect(resourceLinksSource).not.toContain('buildInfrastructureHrefForWorkload');- expect(resourceLinksSource).not.toContain("normalized === 'docker'");- expect(resourceLinksSource).not.toContain("normalized === 'k8s'");- expect(sourcePlatformsSource).toContain('export const normalizeSourcePlatformQueryValue');-- expect(reportingResourceTypesUtilSource).toContain('export function toReportingResourceType');- expect(reportingResourceTypesUtilSource).toContain("case 'k8s-cluster'");- expect(reportingResourceTypesUtilSource).toContain("return 'k8s';");-- expect(chartsApiSource).toContain('export function toMetricsHistoryAPIResourceType');- expect(chartsApiSource).toContain('export function asMetricsHistoryResourceType');- expect(chartsApiSource).toContain('export function mapUnifiedTypeToHistoryResourceType');- expect(chartsApiSource).toContain('export function canonicalizeMetricsHistoryTargetType');- expect(chartsApiSource).toContain("| 'k8s-cluster'");- expect(chartsApiSource).toContain("| 'k8s-node'");- expect(chartsApiSource).toContain("| 'pod'");- expect(chartsApiSource).toContain("case 'k8s-cluster'");- expect(chartsApiSource).toContain("return 'k8s';");- expect(chartsApiSource).not.toContain("case 'truenas'");- expect(chartsApiSource).toContain(- "guestTypes?: Record<string, 'vm' | 'system-container' | 'k8s'>",- );- expect(investigateAlertButtonSource).not.toContain('canonicalizeFrontendResourceType');- expect(resourceBadgePresentationSource).toContain('getResourceTypePresentation');- expect(workloadTypePresentationSource).toContain('canonicalizeFrontendResourceType');- expect(workloadTypePresentationSource).toContain('titleCaseDelimitedLabel');- expect(workloadTypeBadgesSource).not.toContain('canonicalizeFrontendResourceType');- expect(workloadTypeBadgesSource).toContain('getWorkloadTypePresentation');- expect(sourcePlatformsSource).toContain('titleCaseDelimitedLabel');- expect(sourcePlatformsSource).not.toContain('const titleize =');- expect(storageSourcesSource).toContain('titleCaseDelimitedLabel');- expect(storageSourcesSource).toContain('getAllFilterOptionLabel');- expect(storageSourcesSource).not.toContain('const titleCaseLabel =');- expect(workloadsUtilitySource).toContain('export const normalizeWorkloadViewModeParam');- expect(orgScopeSource).toContain("export const DEFAULT_ORG_SCOPE = 'default'");- expect(orgScopeSource).toContain('export const normalizeOrgScope');- expect(workloadsSurfaceSource).toContain('useWorkloadsState');- expect(workloadsSurfaceSource).toContain('WorkloadsTable');- expect(workloadsSurfaceSource).not.toContain('const [search, setSearch] = createSignal(');- expect(workloadsStateSource).toContain('useWorkloadsControlsState');- expect(workloadsStateSource).toContain('useWorkloadGuestMetadataState');- expect(workloadsStateSource).toContain('useWorkloadSelectionState');- expect(workloadsStateSource).toContain('useWorkloadsDerivedState');- expect(workloadsStateSource).toContain('useWorkloadRouteState');- expect(workloadsStateSource).toContain('filterWorkloads(params)');- expect(workloadsStateSource).not.toContain('useBreakpoint');- expect(workloadsStateSource).not.toContain('useColumnVisibility');- expect(workloadsStateSource).not.toContain('blurFocusedTypeToSearch');- expect(workloadsWorkloadRouteStateSource).toContain('useWorkloadUrlSync');- expect(workloadsWorkloadRouteStateSource).not.toContain('normalizeWorkloadViewModeParam');- expect(workloadsSurfaceSource).not.toContain('function normalizeViewModeParam');- expect(workloadsSurfaceSource).not.toContain('workloadSummaryGuestId');- expect(workloadsSurfaceSource).not.toContain(- 'createMemo(() => getCanonicalWorkloadId(guest()))',- );- expect(workloadPanelSource).toContain(- 'createMemo(() => groupGuests().map(getCanonicalWorkloadId))',- );- expect(workloadPanelSource).toContain('const guestId = () => keyedGuestId;');- expect(workloadsWorkloadTableSource).not.toContain(- 'createMemo(() => getCanonicalWorkloadId(guest()))',- );- expect(workloadsGuestMetadataStateSource).toContain('normalizeOrgScope(getOrgID())');- expect(workloadsStateSource).not.toContain("const DEFAULT_ORG_SCOPE = 'default'");- expect(workloadsStateSource).not.toContain('const normalizeOrgScope =');- expect(workloadsStateSource).not.toContain('GuestMetadataAPI.getAllMetadata()');- expect(workloadsGuestMetadataStateSource).toContain('GuestMetadataAPI.getAllMetadata()');- expect(workloadsGuestMetadataStateSource).toContain("eventBus.on('org_switched'");- expect(workloadsStateSource).not.toContain('buildWorkloadsPath({');- expect(workloadsStateSource).not.toContain('parseWorkloadsLinkSearch');- expect(workloadsStateSource).not.toContain('const [selectedGuestId, setSelectedGuestIdRaw]');- expect(workloadsStateSource).not.toContain('const [hoveredWorkloadId, setHoveredWorkloadId]');- expect(workloadsStateSource).not.toContain('groupWorkloads(');- expect(workloadsStateSource).not.toContain('computeWorkloadStats(');- expect(workloadsStateSource).not.toContain('computeWorkloadIOEmphasis(');- expect(workloadsStateSource).not.toContain('buildNodeByInstance(');- expect(workloadsStateSource).not.toContain('buildGuestParentNodeMap(');- expect(workloadsWorkloadRouteStateSource).not.toContain('buildWorkloadsPath({');- expect(workloadsWorkloadRouteStateSource).not.toContain(- 'const workloadNodeOptions = createMemo',- );- expect(workloadsWorkloadRouteStateSource).not.toContain(- 'const containerRuntimeFilterConfig = createMemo',- );- expect(workloadsWorkloadRouteStateSource).not.toContain(- 'const [handledTypeParam, setHandledTypeParam]',- );- expect(workloadsWorkloadRouteStateSource).not.toContain(- 'const [workloadsRouteActive, setWorkloadsRouteActive] = createSignal(false)',- );- expect(workloadsWorkloadRouteStateSource).toContain("from './workloadRouteStateModel'");- expect(workloadsWorkloadRouteStateSource).toContain('resolveWorkloadsWorkloadNodeSelection({');- expect(workloadsWorkloadRouteStateSource).toContain('WORKLOADS_WORKLOAD_ROUTE_RESET_STATE');- expect(workloadsWorkloadUrlSyncSource).not.toContain('buildWorkloadsPath({');- expect(workloadsWorkloadUrlSyncSource).not.toContain('normalizeWorkloadViewModeParam');- expect(workloadsWorkloadUrlSyncSource).not.toContain('parseWorkloadsLinkSearch');- expect(workloadsWorkloadUrlSyncSource).toContain("from './workloadRouteModel'");- expect(workloadsWorkloadUrlSyncSource).toContain("from './workloadUrlSyncModel'");- expect(workloadsWorkloadUrlSyncSource).toContain(- 'const [handledTypeParam, setHandledTypeParam]',- );- expect(workloadsWorkloadUrlSyncSource).toContain('parseWorkloadsWorkloadUrlParams');- expect(workloadsWorkloadUrlSyncSource).toContain(- 'resolveWorkloadsManagedWorkloadsNavigateTarget({',- );- expect(workloadUrlSyncModelSource).toContain('parseWorkloadsLinkSearch(search)');- expect(workloadUrlSyncModelSource).toContain('buildWorkloadsRouteSearch({');- expect(workloadUrlSyncModelSource).toContain('resolveWorkloadsManagedWorkloadsNavigateTarget');- expect(workloadUrlSyncModelSource).toContain('resolveWorkloadsWorkloadRuntimeParam');- expect(workloadUrlSyncModelSource).toContain('normalizeWorkloadViewModeParam(params.type)');- expect(workloadsControlsStateSource).toContain('useBreakpoint');- expect(workloadsControlsStateSource).toContain('useColumnVisibility');- expect(workloadsControlsStateSource).toContain('usePersistentSignal');- expect(workloadsControlsStateSource).toContain('blurFocusedTypeToSearch');- expect(workloadsControlsStateSource).toContain('DEFAULT_WORKLOADS_SORT_KEY');- expect(workloadsWorkloadRouteStateSource).toContain('useWorkloadFilterOptions');- expect(workloadsWorkloadFilterOptionsSource).toContain("from './workloadFilterConfigModel'");- expect(workloadsWorkloadFilterOptionsSource).toMatch(- /buildWorkloadNodeOptions\(\s*platformScopedGuests\(\),/,- );- expect(workloadsWorkloadFilterOptionsSource).toContain(- "sourcePlatformScopeMatchesFilter('proxmox-pve', options.platformScope?.())",- );- expect(workloadsWorkloadFilterOptionsSource).toContain('? (options.nodes?.() ?? [])');- expect(workloadsWorkloadFilterOptionsSource).not.toContain(- 'const onContextChange = (value: string) =>',- );- expect(workloadsWorkloadFilterOptionsSource).toContain(- 'buildWorkloadsContainerRuntimeFilterConfig({',- );- expect(workloadsWorkloadFilterOptionsSource).toContain('buildWorkloadsHostFilterConfig({');- expect(workloadsWorkloadFilterOptionsSource).toContain('buildWorkloadsNamespaceFilterConfig({');- expect(workloadFilterConfigModelSource).toContain(- 'export const buildWorkloadsContainerRuntimeFilterConfig',- );- expect(workloadFilterConfigModelSource).toContain(- 'export const buildWorkloadsHostFilterConfig',- );- expect(workloadFilterConfigModelSource).toContain('getAllFilterOptionLabel');- expect(workloadFilterConfigModelSource).toContain('WORKLOAD_TYPE_OPTIONS');- expect(workloadFilterConfigModelSource).toContain(- 'export const buildWorkloadsNamespaceFilterConfig',- );- expect(workloadRouteModelSource).toContain('export const deserializeWorkloadViewMode');- expect(workloadRouteModelSource).toContain("normalizeWorkloadViewModeParam(raw) ?? 'all'");- expect(workloadRouteModelSource).not.toContain(- 'export const buildWorkloadsContainerRuntimeFilterConfig',- );- expect(workloadRouteModelSource).not.toContain('export const buildWorkloadsHostFilterConfig');- expect(workloadRouteModelSource).not.toContain(- 'export const buildWorkloadsNamespaceFilterConfig',- );- expect(workloadRouteStateModelSource).toContain(- 'export const WORKLOADS_WORKLOAD_ROUTE_RESET_STATE',- );- expect(workloadRouteStateModelSource).toContain(- 'export const resolveWorkloadsWorkloadNodeSelection',- );- expect(workloadRouteStateModelSource).toContain(- 'export const deserializeWorkloadsContainerRuntime',- );- expect(workloadsWorkloadDerivedStateSource).toContain('groupWorkloads(');- expect(workloadsWorkloadDerivedStateSource).toContain('computeWorkloadStats(');- expect(workloadsWorkloadDerivedStateSource).toContain('computeWorkloadIOEmphasis(');- expect(workloadsWorkloadDerivedStateSource).toContain("from './workloadTopology'");- expect(workloadsWorkloadDerivedStateSource).toContain('buildNodeByInstance(');- expect(workloadsWorkloadDerivedStateSource).toContain('buildGuestParentNodeMap(');- expect(workloadsWorkloadRouteStateSource).not.toContain("from './workloadTopology'");- expect(workloadRouteModelSource).toContain("from './workloadTopology'");- expect(workloadRouteModelSource).toContain('workloadHostScopeId');- expect(workloadRouteModelSource).toContain('getKubernetesContextKey');- expect(workloadsWorkloadRouteStateSource).toContain('isWorkloadsRoute,');- expect(workloadsSelectionStateSource).toContain(- 'const [selectedGuestId, setSelectedGuestIdRaw]',- );- expect(workloadsSelectionStateSource).toContain(- 'const [hoveredWorkloadId, setHoveredWorkloadId]',- );- expect(workloadsSelectionStateSource).toContain("from './workloadSelectionModel'");- expect(workloadsSelectionStateSource).not.toContain('parseWorkloadsLinkSearch');- expect(workloadSelectionModelSource).toContain('parseWorkloadsLinkSearch(search)');- expect(workloadSelectionModelSource).toContain('getCanonicalWorkloadId');- expect(workloadSelectionModelSource).toContain('resolveWorkloadResourceSelection');- expect(workloadSelectionModelSource).toContain('workloadsHasHoveredWorkload');- expect(workloadsStateSource).not.toContain('const guestId = () => {');- expect(workloadsFilterSource).not.toContain('useWorkloadsFilterState');- expect(workloadsFilterSource).not.toContain('const [filtersOpen, setFiltersOpen] =');- expect(workloadsFilterSource).toContain('useBreakpoint');- expect(workloadsFilterSource).not.toContain("props.setSortKey('name')");- expect(workloadsFilterSource).toContain('hasActiveWorkloadsFilters');- expect(workloadsFilterSource).toContain('DEFAULT_WORKLOADS_SORT_KEY');- expect(workloadsFilterModelSource).toContain('export const countActiveWorkloadsFilters');- expect(workloadsFilterModelSource).toContain('export const hasActiveWorkloadsFilters');- expect(workloadsFilterModelSource).toContain(- "DEFAULT_WORKLOADS_SORT_KEY: WorkloadsSortKey = 'type'",- );- expect(workloadsStateSource).not.toContain('const containerRuntimeFilterConfig = createMemo');- expect(workloadsStateSource).not.toContain('useGroupedTableWindowing');- expect(workloadsWorkloadRouteStateSource).toContain('useWorkloadUrlSync');- expect(workloadsWorkloadRouteStateSource).toContain('containerRuntimeFilterConfig');- expect(workloadsWorkloadRouteStateSource).toContain('hostFilterConfig');- expect(workloadsWorkloadRouteStateSource).toContain('namespaceFilterConfig');- expect(workloadsWorkloadDerivedStateSource).toContain('useGroupedTableWindowing');- expect(workloadsWorkloadDerivedStateSource).toContain('useWorkloadViewportSync');- expect(workloadsWorkloadDerivedStateSource).not.toContain('window.addEventListener');- expect(workloadsWorkloadDerivedStateSource).not.toContain('getBoundingClientRect');- expect(workloadsStateSource).not.toContain('const DEFAULT_WINDOW_SIZE =');- expect(workloadsStateSource).not.toContain('const DEFAULT_ENABLE_THRESHOLD =');- expect(workloadsStateSource).not.toContain('const TOP_UP_DEADBAND_ROWS =');- expect(groupedTableWindowingSource).toContain('const DEFAULT_WINDOW_SIZE');- expect(groupedTableWindowingSource).toContain('const DEFAULT_ENABLE_THRESHOLD');- expect(groupedTableWindowingSource).toContain('const TOP_UP_DEADBAND_ROWS');- expect(groupedTableWindowingSource).toContain('getVisibleSlice');- expect(groupedTableWindowingSource).toContain('onScroll');- expect(groupedTableWindowingSource).toContain('revealIndex');- expect(workloadsWorkloadViewportSyncSource).toContain('bindWindowedPageScrollEvents');- expect(workloadsWorkloadViewportSyncSource).not.toContain('window.addEventListener');- expect(workloadsWorkloadViewportSyncSource).toContain('getBoundingClientRect');- expect(workloadsWorkloadViewportSyncSource).toContain('groupedWindowing.onScroll');- expect(windowedPageScrollSource).toContain('addEventListener');- expect(windowedPageScrollSource).toContain('removeEventListener');- expect(windowedPageScrollSource).toContain("window.addEventListener('resize'");- expect(workloadTopologySource).toContain('export const workloadNodeScopeId');- expect(workloadTopologySource).toContain('export const getKubernetesContextKey');- expect(workloadTopologySource).toContain('export const getWorkloadDockerHostId');- expect(workloadTopologySource).toContain('export const buildNodeByInstance');- expect(workloadTopologySource).toContain('export const buildGuestParentNodeMap');- expect(thresholdSliderSource).toContain('useThresholdSliderState');- expect(thresholdSliderSource).not.toContain('const [thumbPosition, setThumbPosition] =');- expect(thresholdSliderSource).not.toContain('const handleMouseDown = () => {');- expect(thresholdSliderSource).not.toContain('formatTemperature(');- expect(thresholdSliderStateSource).toContain('window.addEventListener');- expect(thresholdSliderStateSource).toContain('document.addEventListener');- expect(thresholdSliderStateSource).toContain('onCleanup');- expect(thresholdSliderModelSource).toContain('export function getThresholdSliderPosition');- expect(thresholdSliderModelSource).toContain(- 'export function getThresholdSliderThumbTransform',- );- expect(thresholdSliderModelSource).toContain('export function getThresholdSliderTitle');- expect(thresholdSliderModelSource).toContain('export function getThresholdSliderLabel');- expect(stackedDiskBarSource).toContain('useStackedDiskBarState');- expect(stackedDiskBarSource).not.toContain('const [containerWidth, setContainerWidth] =');- expect(stackedDiskBarSource).not.toContain('const tooltipContent = createMemo(() => {');- expect(stackedDiskBarSource).not.toContain('const SEGMENT_COLORS =');- expect(stackedDiskBarStateSource).toContain('new ResizeObserver');- expect(stackedDiskBarStateSource).toContain('useTooltip');- expect(stackedDiskBarModelSource).toContain('export function buildStackedDiskBarPresentation');- expect(stackedDiskBarModelSource).toContain('const SEGMENT_COLORS');- expect(stackedMemoryBarSource).toContain('useStackedMemoryBarState');- expect(stackedMemoryBarSource).not.toContain('const [containerWidth, setContainerWidth] =');- expect(stackedMemoryBarSource).not.toContain('const segments = createMemo(() => {');- expect(stackedMemoryBarSource).not.toContain('const MEMORY_COLORS =');- expect(stackedMemoryBarStateSource).toContain('new ResizeObserver');- expect(stackedMemoryBarStateSource).toContain('useTooltip');- expect(stackedMemoryBarModelSource).toContain(- 'export function buildStackedMemoryBarPresentation',- );- expect(stackedMemoryBarModelSource).toContain('const MEMORY_COLORS');- expect(metricBarSource).toContain('useMetricBarState');- expect(metricBarSource).not.toContain('const [containerWidth, setContainerWidth] =');- expect(metricBarSource).not.toContain('const progressColorClass = createMemo(() => {');- expect(metricBarSource).not.toContain('const showSublabel = createMemo(() => {');- expect(metricBarStateSource).toContain('new ResizeObserver');- expect(metricBarModelSource).toContain('export function buildMetricBarPresentation');- expect(metricBarModelSource).toContain('estimateTextWidth');- expect(enhancedCpuBarSource).toContain('useEnhancedCPUBarState');- expect(enhancedCpuBarSource).not.toContain('const tip = useTooltip()');- expect(enhancedCpuBarSource).not.toContain('const barColor = createMemo(() =>');- expect(enhancedCpuBarSource).not.toContain('const anomalyRatio = createMemo(() =>');- expect(enhancedCpuBarStateSource).toContain('useTooltip');- expect(enhancedCpuBarModelSource).toContain('export function buildEnhancedCPUBarPresentation');- expect(enhancedCpuBarModelSource).toContain('tooltipUsageClass');- expect(useWorkloadsSource).toContain('normalizeOrgScope(getOrgID())');- expect(useWorkloadsSource).not.toContain('const normalizeOrgScope =');- expect(useUnifiedResourcesSource).toContain('normalizeOrgScope(getOrgID())');- expect(useUnifiedResourcesSource).not.toContain('const normalizeOrgScope =');- expect(storageSummaryCacheSource).toContain('normalizeOrgScope(getOrgID())');- expect(guestRowSource).toContain('useGuestRowState');- expect(guestRowSource).toContain("from './GuestRowCells'");- expect(guestRowSource).toContain("from '@/components/shared/TagBadges'");- expect(guestRowSource).not.toContain("from './TagBadges'");- expect(guestRowSource).not.toContain('const guestId = createMemo(');- expect(guestRowSource).not.toContain('function NetworkInfoCell(');- expect(guestRowSource).not.toContain('function OSInfoCell(');- expect(guestRowStateSource).toContain('getCanonicalWorkloadId');- // The legacy cross-jump to /infrastructure?... was retired; guestRowState- // no longer needs anything from resourceLinks.- expect(guestRowStateSource).not.toContain("from '@/routing/resourceLinks'");- expect(guestRowStateSource).not.toContain('./infrastructureLink');- expect(guestRowModelSource).toContain('export const GUEST_COLUMNS');- expect(guestRowCellsSource).toContain('function NetworkInfoCell(');- expect(guestRowCellsSource).toContain('function OSInfoCell(');- expect(guestRowCellsSource).toContain('useTooltip');- expect(guestRowSource).not.toContain('buildGuestId');- expect(tagBadgesSource).toContain("from '@/components/shared/Tooltip'");- expect(resourceDetailSummarySource).toContain("from '@/components/shared/TagBadges'");- expect(resourceDetailDrawerOverviewSource).toContain('getAllFilterOptionLabel');- expect(resourceDetailSummarySource).not.toContain("from '@/components/Workloads/TagBadges'");- expect(resourceDetailDrawerShellSource).toContain("from './ResourceDetailDrawerOverviewTab'");- expect(resourceDetailDrawerShellSource).toContain("from './ResourceDetailDrawerDebugTab'");- expect(resourceDetailDrawerStateSource).toContain(- "from './useResourceDetailDrawerHistoryState'",- );- expect(resourceDetailDrawerStateSource).toContain(- "from './useResourceDetailDrawerDerivedState'",- );- expect(resourceDetailDrawerStateSource).toContain(- "from './useResourceDetailDrawerDockerActionsState'",- );- expect(resourceDetailDrawerStateSource).not.toContain('createResource(');- expect(resourceDetailDrawerStateSource).not.toContain('MonitoringAPI.');- expect(resourceDetailDrawerHistoryStateSource).toContain('createNonSuspendingQuery');- expect(resourceDetailDrawerDerivedStateSource).toContain(- "from '@/components/Infrastructure/resourceDetailDiscoveryModel'",- );- expect(resourceDetailDrawerDerivedStateSource).toContain(- "from './resourceDetailDrawerOperationalModel'",- );- expect(resourceDetailDrawerDerivedStateSource).toContain(- "from './resourceDetailDrawerServiceModel'",- );- expect(resourceDetailDrawerDerivedStateSource).toContain(- "from './resourceDetailDrawerIdentityModel'",- );- expect(resourceDetailDrawerDiscoveryModelSource).toContain('export const toDiscoveryConfig');- expect(resourceDetailDrawerIdentityModelSource).toContain('buildResourceIdentityView');- expect(resourceDetailDrawerIdentityModelSource).toContain('buildResourceDebugBundle');- expect(resourceDetailDrawerDerivedStateSource).not.toContain('buildWorkloadsHref');- expect(resourceDetailDrawerDerivedStateSource).not.toContain('buildServiceDetailLinks');- expect(resourceDetailDrawerDerivedStateSource).not.toContain('const supportedBadge =');- expect(resourceDetailDrawerDerivedStateSource).not.toContain(- 'const links: Array<{ href: string;',- );- expect(resourceDetailDrawerDerivedStateSource).not.toContain('ALIAS_COLLAPSE_THRESHOLD');- expect(resourceDetailDrawerDerivedStateSource).not.toContain('formatIdentifierLabel');- expect(resourceDetailDrawerOperationalModelSource).toContain('buildKubernetesCapabilityBadges');- expect(resourceDetailDrawerOperationalModelSource).toContain('buildHostDetailCards');- expect(resourceDetailDrawerOperationalModelSource).toContain('buildHostDetailSummary');- expect(resourceDetailDrawerOperationalModelSource).toContain('buildRelatedLinks');- expect(resourceDetailDrawerServiceModelSource).toContain('getServiceDetailsSummary');- expect(resourceDetailDrawerOverviewSource).not.toContain('MonitoringAPI.');- expect(resourceDetailDrawerOverviewSource).toContain('drawer.queueDockerUpdateCheck');- expect(resourceDetailDrawerOverviewSource).toContain('drawer.queueDockerUpdateAll');- expect(resourceDetailDrawerDockerActionsStateSource).toContain(- 'MonitoringAPI.checkDockerUpdates',- );- expect(resourceDetailDrawerDockerActionsStateSource).not.toContain(- 'MonitoringAPI.updateAllDockerContainers',- );- expect(guestDrawerSource).toContain('useGuestDrawerState');- expect(guestDrawerSource).toContain('GuestDrawerOverview');- expect(guestDrawerStateSource).toContain('getCanonicalWorkloadId');- expect(guestDrawerStateSource).not.toContain("from '@/routing/resourceLinks'");- expect(guestDrawerStateSource).not.toContain('./infrastructureLink');- expect(guestDrawerStateSource).toContain('guestOsSummary');- expect(guestDrawerSource).not.toContain('const guestId = () => {');- expect(guestDrawerSource).not.toContain('WebInterfaceUrlField');- expect(guestDrawerOverviewSource).toContain('TechnicalDetailsSection');- expect(guestDrawerOverviewSource).toContain('DrawerAttentionSection');- expect(guestDrawerOverviewSource).not.toContain('WebInterfaceUrlField');- expect(guestDrawerOverviewSource).not.toContain('DiskList');- expect(workloadsWorkloadTableSource).toContain('WorkloadTableHeader');- expect(workloadsWorkloadTableSource).toContain('WorkloadPanel');- expect(workloadsWorkloadTableSource).not.toContain('<TableHead');- expect(workloadsWorkloadTableSource).not.toContain('NodeGroupHeader');- expect(workloadsWorkloadTableSource).not.toMatch(/from\s+['"]\.\/GuestDrawer['"]/);- expect(workloadTableHeaderSource).toContain('TableHead');- expect(workloadTableHeaderSource).toContain('col.sortKey as WorkloadSortKey');- expect(workloadTableHeaderSource).not.toContain('NodeGroupHeader');- expect(workloadPanelSource).toContain('NodeGroupHeader');- expect(workloadPanelSource).toContain('GuestDrawer');- expect(workloadPanelSource).toContain(- 'createMemo(() => groupGuests().map(getCanonicalWorkloadId))',- );- expect(workloadPanelSource).not.toContain('TableHead');- expect(emptyStateSource).toContain('getEmptyStatePresentation');- expect(emptyStateSource).not.toContain('const iconBgClass: Record<EmptyStateTone, string> =');- expect(emptyStateSource).not.toContain(- 'const titleToneClass: Record<EmptyStateTone, string> =',- );- expect(emptyStateSource).not.toContain(- 'const descriptionToneClass: Record<EmptyStateTone, string> =',- );- expect(emptyStatePresentationSource).toContain('export function getEmptyStatePresentation');- expect(discoveryTargetSource).toContain('canonicalizeFrontendResourceType');- expect(recoveryOutcomePresentationSource).toContain('import type { RecoveryOutcome }');- expect(recoveryDatePresentationSource).toContain(- 'export function recoveryDateKeyFromTimestamp',- );- expect(recoveryDatePresentationSource).toContain('export function parseRecoveryDateKey');- expect(recoveryDatePresentationSource).toContain('export function getRecoveryPrettyDateLabel');- expect(recoveryDatePresentationSource).toContain('export function getRecoveryFullDateLabel');- expect(recoveryDatePresentationSource).toContain('export function getRecoveryFilterDateLabel');- expect(recoveryDatePresentationSource).toContain('export function getRecoveryCompactAxisLabel');- expect(recoveryDatePresentationSource).toContain('export function getRecoveryNiceAxisMax');- expect(recoveryTimelineChartPresentationSource).toContain(- 'export function getRecoveryTimelineAxisLabelClass',- );- expect(recoveryTimelineChartPresentationSource).toContain(- 'export function getRecoveryTimelineLabelEvery',- );- expect(recoveryTimelinePresentationSource).toContain(- 'export function getRecoveryTimelineColumnButtonClass',- );- expect(systemSettingsPresentationSource).toContain('export const PVE_POLLING_PRESETS');- expect(systemSettingsPresentationSource).toContain('export const BACKUP_INTERVAL_OPTIONS');- expect(systemSettingsPresentationSource).toContain(- 'export function getBackupIntervalSelectValue',- );- expect(systemSettingsPresentationSource).toContain('export function getBackupIntervalSummary');- expect(systemSettingsPresentationSource).toContain('export const COMMON_DISCOVERY_SUBNETS');- expect(networkSettingsPanelSource).toContain('./NetworkBoundarySettingsSection');- expect(networkSettingsPanelSource).not.toContain('./NetworkDiscoverySection');- expect(discoverySettingsFormSource).toContain('COMMON_DISCOVERY_SUBNETS');- expect(infrastructureDiscoverySettingsDialogSource).toContain('./DiscoverySettingsForm');- expect(networkBoundarySettingsSectionSource).toContain(- 'Allowed Private IP Ranges for Webhooks',- );- expect(networkSettingsModelSource).not.toContain('export type NetworkDiscoverySectionProps');- expect(networkSettingsModelSource).toContain('export type NetworkBoundarySettingsSectionProps');- expect(discoverySettingsModelSource).toContain('export interface DiscoverySettingsFormProps');- expect(settingsShellSource).toContain('./useDiscoverySettingsState');- expect(settingsShellSource).toContain('./useSettingsInfrastructurePanelProps');- expect(settingsShellSource).toContain('./useSettingsPanelRegistry');- expect(settingsShellSource).toContain('./settingsTabSaveBehavior');- expect(settingsShellSource).toContain('./useSettingsSystemPanels');- expect(settingsShellSource).toContain('const discoverySettings = useDiscoverySettingsState()');- expect(settingsShellSource).toContain('const systemPanels = useSettingsSystemPanels({');- expect(settingsShellSource).toContain(- 'const infrastructurePanelProps = useSettingsInfrastructurePanelProps({',- );- expect(settingsShellSource).toContain(- 'const settingsPanelRegistry = useSettingsPanelRegistry({',- );- expect(settingsPanelRegistrySource).toContain('buildSettingsPanelRegistryContext');- expect(settingsShellSource).not.toContain('getInfrastructurePanelProps: () => ({');- expect(settingsPageShellSource).toContain('getSettingsShellCopy');- expect(settingsPageShellSource).toContain('getSettingsUnsavedChangesBanner');- expect(settingsPageShellSource).not.toContain('Unsaved changes');- expect(settingsPageShellSource).not.toContain('Search settings...');- expect(settingsPageShellSource).not.toContain('Collapse sidebar');- expect(settingsPageShellSource).not.toContain('Expand sidebar');- expect(settingsPanelRegistryContextSource).toContain('systemPanels: SettingsSystemPanels');- expect(settingsPanelRegistryLoadersSource).toContain(- 'export const SETTINGS_PANEL_REGISTRY_LOADERS',- );- expect(settingsPanelRegistryLoadersSource).toContain("import('./InfrastructureWorkspace')");- expect(settingsPanelRegistryContextSource).toContain(- 'getNetworkPanelProps: params.systemPanels.getNetworkPanelProps',- );- expect(settingsPanelRegistryContextSource).toContain('const systemBillingPanel: Component');- expect(settingsPanelRegistryContextSource).toContain('getSecurityAuthPanelProps');- expect(settingsNavigationModelSource).toContain('export type SettingsTab =');- expect(settingsNavigationModelSource).toContain('export function resolveCanonicalSettingsPath');- expect(settingsNavigationModelSource).toContain('export function settingsTabPath');- expect(settingsNavigationHookSource).toContain('deriveTabFromPath');- expect(settingsNavigationHookSource).toContain('resolveCanonicalSettingsPath');- expect(settingsNavigationHookSource).toContain('settingsTabPath');- expect(settingsRoutingSource).toContain("from './settingsNavigationModel'");- expect(settingsTypesSource).toContain("from './settingsNavigationModel'");- expect(settingsDialogsSource).toContain('UpdateConfirmationModal');- expect(settingsDialogsSource).toContain('BackupTransferDialogs');- expect(settingsShellStateSource).toContain('getSettingsHeaderMeta');- expect(settingsShellStateSource).toContain('setSidebarCollapsed');- expect(settingsNavCatalogSource).toContain('export const SETTINGS_NAV_GROUPS');- expect(settingsNavVisibilitySource).toContain('shouldHideSettingsNavItem');- expect(settingsTabSaveBehaviorSource).toContain('getSettingsNavItem(tab)?.saveBehavior');- expect(settingsPanelRegistrySource).not.toContain('allowedOrigins: params.');- expect(settingsPanelRegistrySource).not.toContain('backupPollingEnabled: params.');- expect(settingsSystemPanelsSource).toContain('GeneralSettingsPanel');- expect(settingsSystemPanelsSource).toContain('getSettingsConfigurationLoadingState');- expect(settingsSystemPanelsSource).toContain('allowedOrigins:');- expect(settingsSystemPanelsSource).toContain('backupPollingEnabled:');- expect(settingsInfrastructurePanelPropsSource).toContain('pbsInstanceFromResource');- expect(settingsInfrastructurePanelPropsSource).toContain('pmgInstanceFromResource');- expect(settingsInfrastructurePanelPropsSource).toContain(- 'const agentStateResources = createMemo',- );- expect(settingsInfrastructurePanelPropsSource).toContain('getInfrastructurePanelProps');- expect(discoverySettingsStateSource).toContain('export function useDiscoverySettingsState');- expect(discoverySettingsStateSource).toContain('normalizeSubnetList');- expect(discoverySettingsStateSource).toContain('isValidCIDR');- // The canonical upgrade CTA contract is split between the shared action-link- // shell and the shared label constant; gated panels do not re-derive button- // classes locally.- expect(featureGateSectionSource).toContain('@/utils/upgradePresentation');- expect(featureGateSectionSource).toContain('UpgradeButtonLink');- expect(featureGateSectionSource).toContain('UPGRADE_ACTION_LABEL');- expect(featureGateSectionSource).toContain('@/components/shared/UpgradeLink');- expect(reportingPanelSource).toContain('@/components/shared/FeatureGateSection');- expect(reportingPanelSource).toContain('@/components/Settings/useReportingPanelState');- expect(reportingPanelSource).toContain('@/components/Settings/reportingPanelModel');- expect(reportingPanelSource).not.toContain('UPGRADE_TRIAL_LABEL');- expect(reportingPanelSource).not.toContain('>Upgrade to Pro<');- expect(reportingPanelSource).not.toContain('>Start free trial<');- expect(reportingPanelSource).not.toContain('window.URL.createObjectURL');- expect(rolesPanelSource).toContain('./RBACFeatureGateSection');- expect(rolesPanelSource).toContain('./useRolesPanelState');- expect(userAssignmentsPanelSource).toContain('./RBACFeatureGateSection');- expect(userAssignmentsPanelSource).toContain('./useUserAssignmentsPanelState');- expect(rbacFeatureGateSectionSource).toContain('@/components/shared/FeatureGateSection');- expect(rolesPanelStateSource).toContain('getRolesLoadErrorMessage');- expect(userAssignmentsPanelStateSource).toContain('getUserAssignmentsLoadErrorMessage');- expect(agentProfilesPanelSource).toContain('./useAgentProfilesPanelState');- expect(agentProfilesPanelStateSource).toContain('@/utils/upgradePresentation');- expect(agentProfilesPanelSource).toContain('UpgradeButtonLink');- expect(agentProfilesPanelSource).toContain('@/utils/agentProfilesPresentation');- expect(agentProfilesPanelSource).toContain('getAgentProfilesEmptyState');- expect(agentProfilesPanelSource).toContain('getAgentProfileAssignmentsEmptyState');- expect(agentProfilesPanelSource).not.toContain('No profiles yet. Create one to get started.');- expect(agentProfilesPanelSource).not.toContain(- 'No agents connected. Install an agent to assign profiles.',- );- expect(auditLogPanelSource).toContain('UpgradeButtonLink');- expect(auditLogPanelSource).not.toContain('@/utils/upgradePresentation');- expect(auditWebhookPanelSource).toContain('@/components/shared/FeatureGateSection');- expect(ssoProvidersPanelSource).not.toContain('@/utils/upgradePresentation');- expect(upgradePresentationSource).toContain('export const UPGRADE_ACTION_LABEL');- expect(upgradePresentationSource).not.toContain('UPGRADE_TRIAL_LABEL');- expect(upgradePresentationSource).not.toContain('UPGRADE_TRIAL_LINK_CLASS');- expect(upgradePresentationSource).not.toContain('getUpgradeActionButtonClass');- expect(organizationAccessManagementSectionSource).toContain(- '@/utils/organizationRolePresentation',- );- expect(organizationAccessMembersSectionSource).toContain(- '@/utils/organizationRolePresentation',- );- expect(organizationAccessManagementSectionSource).toContain('ORGANIZATION_MEMBER_ROLE_OPTIONS');- expect(organizationAccessPanelSource).not.toContain(- 'const roleOptions: Array<{ value: OrganizationRole; label: string }> = [',- );- expect(organizationSharingCreateSectionSource).toContain(- '@/utils/organizationRolePresentation',- );- expect(organizationSharingCreateSectionSource).toContain('ORGANIZATION_SHARE_ROLE_OPTIONS');- expect(organizationOutgoingSharesSectionSource).toContain('normalizeOrganizationShareRole');- expect(organizationIncomingSharesSectionSource).toContain('normalizeOrganizationShareRole');- expect(organizationSharingCreateSectionSource).not.toContain(- 'const accessRoleOptions: Array<{ value: ShareAccessRole; label: string }> = [',- );- expect(organizationOutgoingSharesSectionSource).not.toContain('const normalizeShareRole =');- expect(organizationRolePresentationSource).toContain(- 'export const ORGANIZATION_MEMBER_ROLE_OPTIONS',- );- expect(organizationRolePresentationSource).toContain(- 'export const ORGANIZATION_SHARE_ROLE_OPTIONS',- );- expect(organizationRolePresentationSource).toContain(- 'export function normalizeOrganizationShareRole',- );- expect(organizationAccessStateSource).toContain('normalizeOrgScope(getOrgID())');- expect(organizationOverviewStateSource).toContain('normalizeOrgScope(getOrgID())');- expect(organizationSharingStateSource).toContain('normalizeOrgScope(getOrgID())');- expect(organizationBillingPanelSource).toContain('./useOrganizationBillingPanelState');- expect(organizationBillingPanelSource).toContain('./OrganizationBillingLoadingState');- expect(organizationBillingStateSource).toContain('normalizeOrgScope(getOrgID())');- expect(organizationAccessStateSource).toContain('@/utils/organizationSettingsPresentation');- expect(billingAdminPanelStateSource).toContain('@/utils/organizationSettingsPresentation');- expect(billingAdminOrganizationsTableSource).toContain('@/utils/licensePresentation');- expect(organizationOverviewStateSource).toContain('@/utils/organizationSettingsPresentation');- expect(organizationSharingStateSource).toContain('@/utils/organizationSettingsPresentation');- expect(organizationBillingPanelSource).toContain('@/utils/organizationSettingsPresentation');- expect(organizationBillingStateSource).toContain('@/utils/licensePresentation');- expect(organizationBillingStateSource).toContain('@/utils/organizationSettingsPresentation');- expect(billingAdminPanelSource).toContain('./useBillingAdminPanelState');- expect(billingAdminPanelSource).toContain('./BillingAdminOrganizationsTable');- expect(organizationBillingPanelSource).not.toContain('normalizeOrgScope(getOrgID())');- expect(organizationBillingPanelSource).not.toContain('createSignal(');- expect(billingAdminPanelSource).not.toContain('createSignal(');- expect(organizationBillingPanelSource).not.toContain('Grace Period');- expect(organizationBillingPanelSource).not.toContain('No License');- expect(organizationAccessPanelSource).not.toContain(- 'Multi-tenant requires an Enterprise license',- );- expect(organizationOverviewStateSource).not.toContain(- 'Multi-tenant is not enabled on this server',- );- expect(organizationSharingStateSource).not.toContain(- 'Failed to load organization sharing details',- );- expect(organizationAccessMembersSectionSource).toContain('getOrganizationAccessEmptyState');- expect(organizationAccessLoadingStateSource).toContain('SettingsLoadingSkeleton');- expect(organizationAccessLoadingStateSource).not.toContain('animate-pulse');- expect(organizationOverviewMembersSectionSource).toContain(- 'getOrganizationOverviewMembersEmptyState',- );- expect(organizationOverviewLoadingStateSource).toContain('SettingsLoadingSkeleton');- expect(organizationOverviewLoadingStateSource).not.toContain('animate-pulse');- expect(organizationBillingLoadingStateSource).toContain('SettingsLoadingSkeleton');- expect(organizationBillingLoadingStateSource).not.toContain('animate-pulse');- expect(organizationOutgoingSharesSectionSource).toContain(- 'getOrganizationOutgoingSharesEmptyState',- );- expect(organizationIncomingSharesSectionSource).toContain(- 'getOrganizationIncomingSharesEmptyState',- );- expect(organizationSharingStateSource).toContain(- 'getOrganizationShareTargetOrgRequiredMessage',- );- expect(organizationSharingStateSource).toContain('getOrganizationShareCreateSuccessMessage');- expect(organizationAccessMembersSectionSource).not.toContain('No organization members found.');- expect(organizationOverviewMembersSectionSource).not.toContain('No members found.');- expect(organizationOutgoingSharesSectionSource).not.toContain('No outgoing shares configured.');- expect(organizationIncomingSharesSectionSource).not.toContain(- 'No incoming shares from other organizations.',- );- expect(organizationSharingStateSource).not.toContain(- "notificationStore.error('Target organization is required')",- );- expect(organizationSharingStateSource).not.toContain(- "notificationStore.success('Resource shared successfully')",- );- expect(organizationSharingStateSource).not.toContain(- "notificationStore.success('Share removed')",- );- expect(organizationBillingPanelSource).not.toContain('This feature is not available.');- expect(billingAdminPanelSource).not.toContain('This feature is not available.');- expect(billingAdminPanelSource).not.toContain('Failed to list organizations');- expect(billingAdminPanelSource).not.toContain('No trial');- expect(billingAdminPanelSource).not.toContain('soft-deleted');- expect(billingAdminPanelSource).not.toContain('Organization billing suspended');- expect(billingAdminPanelStateSource).toContain('getBillingAdminStateUpdateSuccessMessage');- expect(billingAdminPanelStateSource).toContain(- "getOrganizationSettingsLoadErrorMessage('', 'billing-admin')",- );- expect(billingAdminOrganizationsTableSource).toContain('getBillingAdminTrialStatus');- expect(organizationSettingsPresentationSource).toContain(- 'export function getOrganizationSettingsLoadErrorMessage',- );- expect(organizationSettingsPresentationSource).toContain(- 'export type OrganizationSettingsLoadContext =',- );- expect(organizationSettingsPresentationSource).toContain(- 'export const ORGANIZATION_SETTINGS_UNAVAILABLE_MESSAGE',- );- expect(organizationSettingsPresentationSource).toContain(- 'export const ORGANIZATION_SETTINGS_UNAVAILABLE_CLASS',- );- expect(organizationSettingsPresentationSource).toContain(- 'export function getOrganizationAccessEmptyState',- );- expect(organizationSettingsPresentationSource).toContain(- 'export function getOrganizationAccessManageRequiredMessage',- );- expect(organizationSettingsPresentationSource).toContain(- 'export function getOrganizationAccessRoleUpdatedMessage',- );- expect(organizationSettingsPresentationSource).toContain(- 'export function getOrganizationDisplayNameUpdatedMessage',- );- expect(organizationSettingsPresentationSource).toContain(- 'export function getOrganizationOverviewMembersEmptyState',- );- expect(organizationSettingsPresentationSource).toContain(- 'export function getOrganizationOverviewManageRequiredMessage',- );- expect(organizationSettingsPresentationSource).toContain(- 'export function getOrganizationOutgoingSharesEmptyState',- );- expect(organizationSettingsPresentationSource).toContain(- 'export function getOrganizationIncomingSharesEmptyState',- );- expect(rbacPermissionsSource).toContain('export const RBAC_PERMISSION_ACTIONS');- expect(rbacPermissionsSource).toContain('export const RBAC_PERMISSION_RESOURCES');- expect(rbacPermissionsSource).toContain('export function createDefaultRBACPermission');- expect(rolesPanelSource).toContain('@/utils/rbacPresentation');- expect(rolesPanelSource).toContain('getRolesEmptyState');- expect(rolesPanelSource).not.toContain('Custom Roles (Pro)');- expect(rolesPanelSource).not.toContain('No roles available.');- expect(rbacFeatureGateStateSource).toContain('getRBACFeatureGateCopy');- expect(userAssignmentsPanelSource).toContain('@/utils/rbacPresentation');- expect(userAssignmentsPanelSource).toContain('getUserAssignmentsEmptyStateCopy');- expect(userAssignmentsPanelSource).not.toContain('Centralized Access Control (Pro)');- expect(userAssignmentsPanelSource).not.toContain('No users yet');- expect(userAssignmentsPanelSource).not.toContain('Configure SSO in Security settings');- expect(userAssignmentsPanelSource).not.toContain('Users sync on first login');- expect(rbacFeatureGateStateSource).toContain('getRBACFeatureGateCopy');- expect(rbacPresentationSource).toContain('export function getRBACFeatureGateCopy');- expect(rbacPresentationSource).not.toContain('(Pro)');- expect(rbacPresentationSource).toContain('export function getRolesEmptyState');- expect(rbacPresentationSource).toContain('export function getUserAssignmentsEmptyStateCopy');- expect(agentProfilesPanelSource).not.toContain('Pro feature');- expect(agentProfilesPresentationSource).toContain(- 'export function getAgentProfilesFeatureGateCopy',- );- expect(agentProfilesPresentationSource).toContain('export function getAgentProfilesEmptyState');- expect(agentProfilesPresentationSource).toContain(- 'export function getAgentProfileAssignmentsEmptyState',- );- expect(agentProfileSuggestionPresentationSource).toContain('titleCaseDelimitedLabel');- expect(agentProfileSuggestionPresentationSource).not.toContain('const titleize =');- expect(diskListSource).toContain('getTemperatureTextClass');- expect(diskListSource).not.toContain('const getTemperatureTone =');- expect(diskListSource).toContain('getPhysicalDiskHealthStatus');- expect(diskListSource).toContain('getPhysicalDiskHealthSummary');- expect(diskListSource).toContain('getPhysicalDiskHostLabel');- expect(diskListSource).toContain('getPhysicalDiskEmptyStatePresentation');- expect(diskListSource).toContain('getPhysicalDiskRoleLabel');- expect(diskListSource).toContain('getPhysicalDiskParentLabel');- expect(diskListSource).toContain('getPhysicalDiskLifeLabel');- // The source badge renders in the disk drawer, not the table.- expect(diskListSource).not.toContain('getPhysicalDiskSourceBadgePresentation');- expect(diskDrawerPresentationSource).toContain('getPhysicalDiskSourceBadgePresentation');- expect(diskListSource).not.toContain('const titleize =');- expect(diskListSource).not.toContain('const platformLabel =');- expect(diskListSource).not.toContain('function hasSmartWarning(');- expect(diskListSource).not.toContain('const getDiskHealthStatus =');- expect(diskListSource).not.toContain('const getDiskRoleLabel =');- expect(diskListSource).not.toContain('const getDiskParentLabel =');- expect(diskListSource).not.toContain('const healthSummary = () => {');- expect(diskListSource).not.toContain('const hostLabel = () =>');- expect(diskListSource).not.toContain('No physical disks found');- expect(diskListSource).not.toContain('Physical disk monitoring requirements:');- expect(diskListSource).toContain('useDiskListModel');- expect(diskListSource).toContain('PHYSICAL_DISK_TABLE_CLASS');- expect(diskListSource).not.toContain("from '@/components/shared/Card'");- expect(diskListSource).not.toContain('PHYSICAL_DISK_TABLE_SCROLL_CLASS');- expect(diskListSource).not.toContain('cursor-pointer transition-colors');- expect(diskListSource).not.toContain('function extractDiskData(');- expect(diskListSource).not.toContain('const filteredDisks = createMemo(() => {');- expect(diskListSource).not.toContain('const diskDataById = createMemo(() => {');- expect(storagePoolDetailSource).toContain('StatusDot');- expect(storagePoolDetailSource).toContain('getLinkedDiskHealthDotVariant');- expect(storagePoolDetailSource).toContain('getLinkedDiskTemperatureTextClass');- // The pool Overview is built like the guest and node drawers: alerts,- // Worth checking, drawer charts, then one closed Details of sections.- expect(storagePoolDetailSource).toContain('useStoragePoolDetailModel');- expect(storagePoolDetailSource).toContain('DrawerAttentionSection');- expect(storagePoolDetailSource).toContain('DrawerExceptionList');- expect(storagePoolDetailSource).toContain('GuestDrawerHistory');- expect(storagePoolDetailSource).toContain('TechnicalDetailsDisclosure');- expect(storagePoolDetailSource).toContain('DetailSectionTable');- expect(storagePoolDetailSource).not.toContain('<select');- expect(storagePoolDetailSource).not.toContain('const ConfigRow: Component');- expect(storagePoolDetailSource).not.toContain('const chartResourceType = createMemo');- expect(storagePoolDetailSource).not.toContain('const chartResourceId = createMemo');- expect(storagePoolDetailSource).not.toContain('const poolDisks = createMemo(() => {');- expect(storagePoolDetailSource).not.toContain("'bg-yellow-500'");- expect(storagePoolDetailSource).not.toContain("'bg-green-500'");- expect(storagePoolDetailSource).not.toContain("'text-red-500'");- expect(storagePoolDetailSource).not.toContain("'text-yellow-500'");- expect(storagePoolDetailSource).not.toContain("'text-yellow-600 dark:text-yellow-400 italic'");- expect(storagePoolDetailSource).not.toContain("'text-red-600 dark:text-red-400 font-medium'");- // The disk drawer is built like the guest and node drawers: alerts,- // Worth checking, drawer charts, then one closed Details.- expect(diskDrawerOverviewSource).toContain('DrawerAttentionSection');- expect(diskDrawerOverviewSource).toContain('DrawerExceptionList');- expect(diskDrawerOverviewSource).toContain('GuestDrawerHistory');- expect(diskDrawerOverviewSource).toContain('TechnicalDetailsDisclosure');- expect(diskDrawerOverviewSource).not.toContain('<select');- expect(storagePoolRowSource).toContain('getStoragePoolProtectionTextClass');- expect(storagePoolRowSource).toContain('stateToneClass');- expect(storagePoolRowSource).toContain('buildStoragePoolRowModel');- expect(storagePoolRowSource).toContain('STORAGE_POOL_ROW_CLASS');- expect(storagePoolRowSource).not.toContain('getSourcePlatformBadge');- expect(storagePoolRowSource).not.toContain('const totalBytes = createMemo(');- expect(storagePoolRowSource).not.toContain('const usedBytes = createMemo(');- expect(storagePoolRowSource).not.toContain('const freeBytes = createMemo(');- expect(storagePoolRowSource).not.toContain('const platformLabel = createMemo(');- expect(storagePoolRowSource).not.toContain('const hostLabel = createMemo(');- expect(storagePoolRowSource).not.toContain('const topologyLabel = createMemo(');- expect(storagePoolRowPresentationSource).toContain('export const buildStoragePoolRowModel');- expect(storagePoolRowPresentationSource).toContain('getStorageRecordHostLabel');- expect(storagePoolRowPresentationSource).toContain('getStorageRecordTopologyLabel');- expect(storagePoolRowPresentationSource).toContain('getCompactStoragePoolProtectionLabel');- expect(storagePoolRowPresentationSource).toContain('getCompactStoragePoolProtectionTitle');- expect(storagePoolRowPresentationSource).toContain('getStoragePoolStateLabel');- expect(storagePoolRowPresentationSource).toContain('getStoragePoolStateTitle');- expect(storagePoolRowPresentationSource).toContain('getStoragePoolStateTextClass');- expect(storagePoolRowSource).not.toContain('const protectionTextClass =');- expect(storagePoolRowSource).not.toContain('const issueTextClass =');- expect(storagePoolRowSource).not.toContain('const compactProtection = createMemo(() => {');- expect(storagePoolRowSource).not.toContain('const compactImpact = createMemo(() => {');- expect(storagePoolRowSource).not.toContain('const compactIssue = createMemo(() => {');- expect(storagePoolRowSource).not.toContain('const compactIssueSummary = createMemo(() => {');- expect(storagePageSource).toContain("from './storagePageState'");- expect(storagePageSource).toContain('useStoragePageModel');- expect(storagePageSource).toContain('StoragePageControls');- expect(storagePageSource).not.toContain('const normalizeHealthFilter =');- expect(storagePageSource).not.toContain('const normalizeSortKey =');- expect(storagePageSource).not.toContain('const normalizeGroupKey =');- expect(storagePageSource).not.toContain('const normalizeView =');- expect(storagePageSource).not.toContain('const normalizeSortDirection =');- expect(storagePageSource).not.toContain('const getStorageMetaBoolean =');- expect(storagePageSource).not.toContain('const isRecordCeph =');- expect(storagePageSource).not.toContain('Reconnecting to backend data stream…');- expect(storagePageSource).not.toContain('Storage data stream disconnected. Data may be stale.');- expect(storagePageSource).not.toContain('Waiting for storage data from connected platforms.');- expect(useStorageCephModelSource).toContain(- "from '@/features/storageBackups/cephRecordPresentation'",- );- expect(useStorageCephModelSource).toContain('resolveCephClusterForStorageRecord');- expect(useStorageCephModelSource).toContain('getCephSummaryText');- expect(useStorageCephModelSource).toContain('getCephPoolsText');- expect(useStorageCephModelSource).toContain(- "from '@/features/storageBackups/cephSummaryPresentation'",- );- expect(useStorageCephModelSource).toContain('deriveCephClustersFromStorageRecords');- expect(useStorageCephModelSource).toContain('summarizeCephClusters');- expect(useStorageCephModelSource).toContain('buildExplicitCephClusters');- expect(useStorageCephModelSource).toContain('buildCephClusterLookup');- expect(useStorageCephModelSource).toContain('resolveCephClusterForStorageRecord');- expect(useStorageCephModelSource).not.toContain('export const isCephRecord =');- expect(useStorageCephModelSource).not.toContain('export const getCephClusterKeyFromRecord =');- expect(useStorageCephModelSource).not.toContain('return resources.map((r) => {');- expect(cephSummaryPresentationSource).toContain(- 'export const deriveCephClustersFromStorageRecords',- );- expect(cephSummaryPresentationSource).toContain('export const summarizeCephClusters');- expect(cephSummaryPresentationSource).toContain('export const buildExplicitCephClusters');- expect(cephSummaryPresentationSource).toContain('export const buildCephClusterLookup');- expect(cephSummaryPresentationSource).toContain(- 'export const resolveCephClusterForStorageRecord',- );- expect(storageRowPresentationSource).toContain(- 'export function getStoragePoolProtectionTextClass',- );- expect(storageRowPresentationSource).toContain('export function getStoragePoolIssueTextClass');- expect(storageRowPresentationSource).toContain('export function getStoragePoolStateLabel');- expect(storageRowPresentationSource).toContain('export function getStoragePoolStateTitle');- expect(storageRowPresentationSource).toContain('export function getStoragePoolStateTextClass');- expect(storageRowPresentationSource).toContain(- 'export function getCompactStoragePoolProtectionLabel',- );- expect(storageRowPresentationSource).toContain(- 'export function getCompactStoragePoolImpactLabel',- );- expect(storageRowPresentationSource).toContain(- 'export function getCompactStoragePoolIssueLabel',- );- expect(storageRowPresentationSource).toContain(- 'export function getCompactStoragePoolIssueSummary',- );- expect(storageRowPresentationSource).toContain(- 'export function getCompactStoragePoolProtectionTitle',- );- expect(proxmoxBackupSourcePresentationSource).toContain('badgeTone: MetadataBadgeTone');- expect(proxmoxBackupSourcePresentationSource).not.toContain('badgeClassName: string');- expect(proxmoxBackupsTableSharedSource).toContain('MetadataBadge');- expect(proxmoxBackupsTableSharedSource).toContain('PROXMOX_BACKUP_METADATA_BADGE_PROPS');- expect(proxmoxBackupsTableSharedSource).toContain('presentation().badgeTone');- expect(proxmoxBackupsTableSharedSource).not.toContain('presentation().badgeClassName');- expect(storageGroupRowSource).toContain("from '@/features/storageBackups/groupPresentation'");- expect(storageGroupRowSource).toContain('buildStorageGroupRowPresentation');- expect(storageGroupRowSource).toContain('STORAGE_GROUP_ROW_CLASS');- expect(storageGroupRowSource).not.toContain('cursor-pointer select-none bg-surface-alt');- expect(workloadPanelSource).toContain('getGroupedTableRowClass()');- expect(storageGroupPresentationSource).toContain(- 'export const getStorageGroupHealthCountPresentation',- );- expect(storageGroupPresentationSource).toContain('export const getStorageGroupPoolCountLabel');- expect(storageGroupPresentationSource).toContain(- 'export const getStorageGroupUsagePercentLabel',- );- expect(storageGroupPresentationSource).toContain(- 'export const buildStorageGroupRowPresentation',- );- expect(enhancedStorageBarSource).toContain('getZfsPoolStateTextClass');- expect(enhancedStorageBarSource).toContain('getZfsPoolErrorOverlayClass');- expect(enhancedStorageBarSource).toContain('getZfsScanTextClass');- expect(enhancedStorageBarSource).toContain('getZfsErrorTextClass');- expect(enhancedStorageBarSource).toContain('getStorageBarTooltipRowClass');- expect(enhancedStorageBarSource).toContain('getStorageBarZfsHeadingLabel');- expect(enhancedStorageBarSource).toContain('useEnhancedStorageBarModel');- expect(enhancedStorageBarSource).toContain('STORAGE_BAR_ROOT_CLASS');- expect(enhancedStorageBarSource).not.toContain('const usagePercent = createMemo(() => {');- expect(enhancedStorageBarSource).not.toContain('const isScrubbing = createMemo(() => {');- expect(enhancedStorageBarSource).not.toContain('const isResilvering = createMemo(() => {');- expect(enhancedStorageBarSource).not.toContain('const hasErrors = createMemo(() => {');- expect(enhancedStorageBarSource).not.toContain(- 'metric-text w-full h-5 flex items-center min-w-0',- );- expect(useEnhancedStorageBarModelSource).toContain('getStorageBarUsagePercent');- expect(useEnhancedStorageBarModelSource).toContain('getStorageBarLabel');- expect(useEnhancedStorageBarModelSource).toContain('getStorageBarTooltipRows');- expect(useEnhancedStorageBarModelSource).toContain('getStorageBarZfsSummary');- expect(storagePagePresentationSource).toContain('export const STORAGE_VIEW_OPTIONS');- expect(storagePagePresentationSource).toContain('export const getStoragePoolTableColumns');- expect(storagePagePresentationSource).toContain('export const getStorageTableHeading');- expect(storagePagePresentationSource).toContain('export const getStorageLoadingMessage');- expect(storagePageStatusSource).toContain('export const isStoragePoolLoading');- expect(storagePageStatusHookSource).toContain('export const useStoragePageStatus');- expect(storagePageStatusHookSource).toContain('isStoragePoolLoading');- expect(storagePageDataSource).toContain('export const useStoragePageData');- expect(storagePageDataSource).toContain('buildStorageRecords');- expect(storagePageDataSource).toContain('useStorageAlertState');- expect(storagePageDataSource).toContain('useStorageCephModel');- expect(storagePageDataSource).toContain('useStorageModel');- expect(storagePageResourcesSource).toContain('export const useStoragePageResources');- expect(storagePageResourcesSource).toContain('useWebSocket');- expect(storagePageResourcesSource).toContain('useUnifiedResources');- expect(storagePageResourcesSource).toContain(- "const STORAGE_PAGE_RESOURCES_QUERY = 'type=agent,pbs,storage,physical_disk,ceph'",- );- expect(storagePageResourcesSource).not.toContain("from '@/hooks/useResources'");- expect(storagePageResourcesSource).toContain('options.resourceSource ??');- expect(storagePageResourcesSource).toContain('useAlertsActivation');- expect(storagePageModelSource).toContain('export const useStoragePageModel');- expect(storagePageModelSource).toContain('useStoragePageResources');- expect(storagePageModelSource).toContain('useStoragePageFilters');- expect(storagePageModelSource).toContain('useStoragePageData');- expect(storagePageModelSource).toContain('useStorageExpansionState');- expect(storagePageModelSource).toContain('useStorageFilterState');- expect(storagePageModelSource).toContain('useStoragePageStatus');- expect(storagePageModelSource).toContain('useStorageResourceHighlight');- expect(storagePageFiltersSource).toContain('export const useStoragePageFilters');- expect(storagePageFiltersSource).toContain('useStorageRouteState');- expect(storagePageFiltersSource).toContain('buildStorageRouteFields');- expect(storagePageStateSource).toContain('export const buildStorageRouteFields');- expect(storageFilterStateSource).toContain('export const useStorageFilterState');- expect(storageFilterStateSource).toContain('getStorageFilterGroupBy');- expect(storageFilterStateSource).toContain('getStorageStatusFilterValue');- expect(storageFilterStateSource).toContain('toStorageHealthFilterValue');- expect(storageFilterStateSource).toContain('PHYSICAL_DISK_ALL_ROLES_FILTER_LABEL');- expect(storageFilterStateSource).toContain('PHYSICAL_DISK_ALL_GROUPS_FILTER_LABEL');- expect(storagePageSource).toContain('StorageContentCard');- expect(storagePageControlsSource).toContain('FilterBar');- expect(storagePageControlsSource).toContain('hasActiveStorageFilters');- expect(storagePageControlsSource).toContain('DEFAULT_STORAGE_SORT_OPTIONS');- expect(storagePageControlsSource).toContain('getNextStorageSortDirection');- expect(storagePageControlsSource).toContain('STORAGE_FILTER_SORT_SELECT_CLASS');- expect(storagePageControlsSource).toContain('STORAGE_FILTER_SORT_DIRECTION_BUTTON_CLASS');- expect(storagePageControlsSource).not.toContain('StorageControls');- expect(storagePageControlsSource).not.toContain('useStoragePageControlsModel');- expect(storagePageControlsSource).not.toContain('focus:ring-blue-500');- // StoragePageControls owns the single "Storage / Physical Disks" view- // switch as canonical Subtabs above the FilterBar. StorageContentCard does- // not host a duplicate segmented control.- expect(storagePageControlsSource).toContain('Subtabs');- expect(storagePageSource).not.toContain('StorageViewSegmentedControl');- expect(storagePageControlsSource).not.toContain('StorageViewSwitcher');- expect(storageFilterPresentationSource).toContain('export const getStorageSortDirectionTitle');- expect(storageFilterPresentationSource).toContain(- 'export const getStorageSortDirectionIconClass',- );- expect(storageFilterPresentationSource).toContain(- 'export const STORAGE_FILTER_SORT_SELECT_CLASS',- );- expect(storageFilterPresentationSource).toContain(- 'export const STORAGE_FILTER_SORT_DIRECTION_BUTTON_CLASS',- );- expect(storagePageControlsSource).toContain('export const StoragePageControls');- expect(storagePageControlsSource).toContain('normalizeStorageSortKey');- expect(storagePageControlsSource).not.toContain(- "props.view() === 'pools' ? props.storageFilterGroupBy : undefined",- );- expect(storagePageControlsSource).toContain('const sortDisabled = () => !isPoolsView()');- expect(storageContentCardSource).toContain('export const StorageContentCard');- expect(storageContentCardSource).toContain('useStorageContentCardModel');- expect(storageContentCardSource).toContain('DiskList');- expect(storageContentCardSource).toContain('StoragePoolsTable');- expect(storageContentCardSource).toContain('TableCard');- expect(storageContentCardSource).toContain('TableCardHeader');- expect(storageContentCardSource).toContain('STORAGE_CONTENT_CARD_BODY_CLASS');- expect(storagePoolsTableSource).toMatch(/<Table(?:\s|>)/);- expect(storagePoolsTableSource).not.toContain('STORAGE_POOLS_SCROLL_WRAP_CLASS');- expect(storagePoolsTableSource).not.toContain('<div class="overflow-x-auto">');- expect(storagePoolsTableSource).not.toContain('<div class="overflow-x-auto bg-surface">');- expect(storageContentCardSource).not.toContain(- "props.selectedNodeId() === 'all' ? null : props.selectedNodeId()",- );- expect(storageContentCardSource).not.toContain(- 'border-b border-border bg-surface-hover px-3 py-2',- );- expect(useStorageContentCardModelSource).toContain('getStorageTableHeading');- expect(useStorageContentCardModelSource).toContain("options.view() === 'disks'");- expect(storagePoolsTableSource).toContain('export const StoragePoolsTable');- expect(storagePoolsTableSource).toContain('getStoragePoolTableColumns');- expect(storagePoolsTableSource).toContain('getStorageLoadingMessage');- expect(storagePoolsTableSource).toContain('useStoragePoolsTableModel');- expect(storagePoolsTableSource).toContain('StoragePoolRow');- expect(storagePoolsTableSource).toContain('StorageGroupRow');- expect(storagePoolsTableSource).toContain('STORAGE_POOLS_EMPTY_STATE_CLASS');- expect(storagePoolsTableSource).not.toContain('const group = createMemo(');- expect(storagePoolsTableSource).not.toContain('const groupItems = createMemo(');- expect(storagePoolsTableSource).not.toContain('const rowAlertPresentation = createMemo(');- expect(storagePoolsTableSource).not.toContain('getStorageRecordNodeLabel');- expect(storagePoolsTablePresentationSource).toContain(- 'export const buildStoragePoolsTableGroups',- );- expect(storagePoolsTablePresentationSource).toContain(- 'export const buildStoragePoolsTableRowModel',- );- expect(storagePoolsTablePresentationSource).toContain('getStorageRowAlertPresentation');- expect(useStoragePoolsTableModelSource).toContain('buildStoragePoolsTableGroups');- expect(useStoragePoolsTableModelSource).toContain('buildStoragePoolsTableRowModel');- expect(useStoragePoolsTableModelSource).toContain('togglePool');- expect(storageResourceHighlightSource).toContain('export const useStorageResourceHighlight');- expect(storageResourceHighlightSource).toContain('findHighlightedStorageRecord');- expect(storageExpansionStateSource).toContain('export const useStorageExpansionState');- expect(storageExpansionStateSource).toContain('resolveExpandedStorageGroups');- expect(storageExpansionStateSource).toContain('toggleCollapsedStorageGroup');- expect(storagePageSource).not.toContain('const rowClass = createMemo(() => {');- expect(storagePageSource).not.toContain('const rowStyle = createMemo(() => {');- expect(storagePageSource).not.toContain('const isWaitingForData = createMemo(');- expect(storagePageSource).not.toContain('const isDisconnectedAfterLoad = createMemo(');- expect(storagePageSource).not.toContain('const [handledResourceId, setHandledResourceId]');- expect(storagePageSource).not.toContain('const [expandedGroups, setExpandedGroups]');- expect(storagePageSource).not.toContain('const activeAlertsAccessor = () => {');- expect(storagePageSource).not.toContain('const adapterResources = createMemo(() => {');- expect(storagePageSource).not.toContain('const [summaryTimeRange, setSummaryTimeRange]');- expect(storagePageSource).not.toContain('buildPath: buildStoragePath');- expect(storagePageSource).not.toContain('const storageFilterGroupBy =');- expect(storagePageSource).not.toContain('const storageFilterStatus =');- expect(storagePageSource).not.toContain('const setStorageFilterStatus =');- expect(storagePageSource).not.toContain('const records = createMemo(() => buildStorageRecords');- expect(storagePageSource).not.toContain('const { byType } = useResources()');- expect(storagePageSource).not.toContain(- 'const storageRecoveryResources = useStorageRecoveryResources()',- );- expect(storagePageSource).not.toContain('useStoragePageFilters({');- expect(storagePageSource).not.toContain('useStoragePageData({');- expect(storagePageSource).not.toContain('useStoragePageResources()');- expect(storagePageSource).not.toContain('fields: {');- expect(storagePageSource).not.toContain(- 'rounded-sm border border-amber-300 bg-amber-100 px-2 py-1',- );- expect(storagePageSource).not.toContain('flex flex-wrap items-center justify-between gap-3');- expect(storagePageSource).not.toContain('<Table class="w-full text-xs">');- expect(storagePageSource).not.toContain('<StorageCephSummaryCard summary=');- expect(storageRowAlertPresentationSource).toContain(- 'export const getStorageRowAlertPresentation',- );- expect(diskPresentationSource).toContain('export function extractPhysicalDiskPresentationData');- expect(diskPresentationSource).toContain('export function matchesPhysicalDiskSearch');- expect(diskPresentationSource).toContain('export function comparePhysicalDiskPresentation');- expect(diskPresentationSource).toContain(- 'export function buildPhysicalDiskPresentationDataMap',- );- expect(diskPresentationSource).toContain('export function filterAndSortPhysicalDisks');- expect(diskDetailPresentationSource).toContain('export function getDiskDetailAttributeCards');- expect(storagePoolDetailSource).not.toContain('<tr class=');- expect(storagePoolDetailSource).not.toContain('col-span-2');- expect(storagePoolDetailSource).not.toContain('text-base-content truncate flex-1');- expect(zfsPresentationSource).toContain('export const getZfsDeviceBlockClass');- expect(zfsPresentationSource).toContain('export const getZfsDeviceStateTextClass');- expect(zfsPresentationSource).toContain('export const getZfsPoolStateTextClass');- expect(diskPresentationSource).toContain('export function getPhysicalDiskHealthStatus');- expect(diskPresentationSource).toContain('export function getPhysicalDiskHealthSummary');- expect(diskPresentationSource).toContain('export function getPhysicalDiskHostLabel');- expect(diskPresentationSource).toContain(- 'export function getPhysicalDiskEmptyStatePresentation',- );- expect(diskPresentationSource).toContain('export const PHYSICAL_DISK_TABLE_CLASS');- expect(diskPresentationSource).toContain('PHYSICAL_DISK_ALL_ROLES_FILTER_LABEL');- expect(diskPresentationSource).toContain('PHYSICAL_DISK_ALL_GROUPS_FILTER_LABEL');- expect(diskPresentationSource).toContain("return 'NVMe disk'");- expect(diskPresentationSource).toContain('export function getPhysicalDiskRoleLabel');- expect(diskPresentationSource).toContain('export function getPhysicalDiskParentLabel');- expect(diskPresentationSource).toContain('export function getPhysicalDiskPlatformLabel');- expect(diskPresentationSource).toContain('export function hasPhysicalDiskSmartWarning');- expect(useDiskListModelSource).toContain('buildPhysicalDiskPresentationDataMap');- expect(useDiskListModelSource).toContain('filterAndSortPhysicalDisks');- expect(useDiskListModelSource).toContain('matchesPhysicalDiskNode');- expect(storageAdaptersSource).toContain("from './resourceStoragePresentation'");- expect(storageAdaptersSource).toContain("from './resourceStorageMapping'");- expect(storageAdaptersSource).toContain("from './storageAdapterCore'");- expect(storageAdaptersSource).toContain('asNumberOrNull');- expect(storageAdaptersSource).toContain('buildStorageCapacity');- expect(storageAdaptersSource).toContain('buildStorageSource');- expect(storageAdaptersSource).toContain('canonicalStorageIdentityKey');- expect(storageAdaptersSource).toContain('dedupe');- expect(storageAdaptersSource).toContain('getStringArray');- expect(storageAdaptersSource).toContain('metricsTargetForStorageResource');- expect(storageAdaptersSource).toContain('normalizeStorageResourceHealth');- expect(storageAdaptersSource).toContain('getCanonicalStoragePlatformKey');- expect(storageAdaptersSource).toContain('readResourceStorageMeta');- expect(storageAdaptersSource).toContain('resolveResourceStorageContent');- expect(storageAdaptersSource).toContain('getStorageCapabilitiesForResource');- expect(storageAdaptersSource).toContain('getStorageCategoryFromType');- expect(storageAdaptersSource).toContain('getResourceStoragePlatformLabel');- expect(storageAdaptersSource).toContain('getResourceStorageTopologyLabel');- expect(storageAdaptersSource).toContain('getResourceStorageIssueLabel');- expect(storageAdaptersSource).toContain('getResourceStorageIssueSummary');- expect(storageAdaptersSource).toContain('getResourceStorageImpactSummary');- expect(storageAdaptersSource).toContain('getResourceStorageActionSummary');- expect(storageAdaptersSource).toContain('getResourceStorageProtectionLabel');- expect(storageAdaptersSource).not.toContain('const platformLabelForResource =');- expect(storageAdaptersSource).not.toContain('const topologyLabelForResource =');- expect(storageAdaptersSource).not.toContain('const issueLabelForResource =');- expect(storageAdaptersSource).not.toContain('const issueSummaryForResource =');- expect(storageAdaptersSource).not.toContain('const impactSummaryForResource =');- expect(storageAdaptersSource).not.toContain('const actionSummaryForResource =');- expect(storageAdaptersSource).not.toContain('const protectionLabelForResource =');- expect(storageAdaptersSource).not.toContain('type ResourceStorageMeta =');- expect(storageAdaptersSource).not.toContain('const normalizeStorageMeta =');- expect(storageAdaptersSource).not.toContain('const readResourceStorageMeta =');- expect(storageAdaptersSource).not.toContain('const resolveStorageContent =');- expect(storageAdaptersSource).not.toContain('const capabilitiesForStorage =');- expect(storageAdaptersSource).not.toContain('const categoryFromStorageType =');- expect(storageAdaptersSource).not.toContain('const asNumberOrNull =');- expect(storageAdaptersSource).not.toContain('const dedupe =');- expect(storageAdaptersSource).not.toContain('const normalizeIdentityPart =');- expect(storageAdaptersSource).not.toContain('const getStringArray =');- expect(storageAdaptersSource).not.toContain('const canonicalStorageIdentityKey =');- expect(storageAdaptersSource).not.toContain('const resolvePlatformFamily =');- expect(storageAdaptersSource).not.toContain('const fromSource =');- expect(storageAdaptersSource).not.toContain('const capacity =');- expect(storageAdaptersSource).not.toContain('const metricsTargetForResource =');- expect(storageAdaptersSource).not.toContain('const extractHealthTag =');- expect(storageAdaptersSource).not.toContain('const normalizeHealthValue =');- expect(storageAdaptersSource).not.toContain('const normalizeResourceHealth =');- expect(useStorageModelSource).toContain('@/features/storageBackups/storageModelCore');- expect(useStorageModelSource).toContain('buildStorageSourceOptions');- expect(useStorageModelSource).toContain('filterStorageRecords');- expect(useStorageModelSource).toContain('sortStorageRecords');- expect(useStorageModelSource).toContain('groupStorageRecords');- expect(useStorageModelSource).toContain('summarizeStorageRecords');- expect(useStorageModelSource).not.toContain('const getRecordDetails =');- expect(useStorageModelSource).not.toContain('const getRecordStringDetail =');- expect(useStorageModelSource).not.toContain('const getRecordStringArrayDetail =');- expect(useStorageModelSource).not.toContain('export const getRecordNodeHints =');- expect(useStorageModelSource).not.toContain('export const getRecordType =');- expect(useStorageModelSource).not.toContain('export const getRecordContent =');- expect(useStorageModelSource).not.toContain('export const getRecordStatus =');- expect(useStorageModelSource).not.toContain('export const getRecordPlatformLabel =');- expect(useStorageModelSource).not.toContain('export const getRecordHostLabel =');- expect(useStorageModelSource).not.toContain('export const getRecordTopologyLabel =');- expect(useStorageModelSource).not.toContain('export const getRecordProtectionLabel =');- expect(useStorageModelSource).not.toContain('export const getRecordIssueLabel =');- expect(useStorageModelSource).not.toContain('export const getRecordIssueSummary =');- expect(useStorageModelSource).not.toContain('export const getRecordImpactSummary =');- expect(useStorageModelSource).not.toContain('export const getRecordActionSummary =');- expect(useStorageModelSource).not.toContain('export const getRecordShared =');- expect(useStorageModelSource).not.toContain('export const getRecordNodeLabel =');- expect(useStorageModelSource).not.toContain('export const getRecordUsagePercent =');- expect(useStorageModelSource).not.toContain('export const getRecordZfsPool =');- expect(useStorageModelSource).not.toContain('const computeGroupStats =');- expect(useStorageModelSource).not.toContain('const matchesSelectedNode =');- expect(useStorageModelSource).not.toContain('const sourceOptions = createMemo(() => {');- expect(storageModelCoreSource).toContain('export const findSelectedStorageNode');- expect(storageModelCoreSource).toContain('export const matchesStorageRecordNode');- expect(storageModelCoreSource).toContain('export const buildStorageSourceOptions');- expect(storageModelCoreSource).toContain('export const matchesStorageRecordSearch');- expect(storageModelCoreSource).toContain('export const filterStorageRecords');- expect(storageModelCoreSource).toContain('export const sortStorageRecords');- expect(storageModelCoreSource).toContain('export const groupStorageRecords');- expect(storageModelCoreSource).toContain('export const summarizeStorageRecords');- expect(useStorageAlertStateSource).toContain('@/features/storageBackups/storageAlertState');- expect(useStorageAlertStateSource).toContain('asStorageAlertRecord');- expect(useStorageAlertStateSource).toContain('mergeStorageAlertRowState');- expect(useStorageAlertStateSource).toContain('getStorageRecordAlertResourceIds');- expect(useStorageAlertStateSource).toContain('EMPTY_STORAGE_ALERT_STATE');- expect(useStorageAlertStateSource).not.toContain('const EMPTY_ALERT_STATE =');- expect(useStorageAlertStateSource).not.toContain('const asAlertRecord =');- expect(useStorageAlertStateSource).not.toContain('const severityWeight =');- expect(useStorageAlertStateSource).not.toContain('const mergeAlertState =');- expect(useStorageAlertStateSource).not.toContain('const getRecordAlertResourceIds =');- expect(diskDetailPresentationSource).toContain('export function getLinkedDiskHealthDotVariant');- expect(diskDetailPresentationSource).toContain(- 'export function getLinkedDiskTemperatureTextClass',- );- expect(storagePoolDetailPresentationSource).toContain('export function getZfsScanTextClass');- expect(storagePoolDetailPresentationSource).toContain('export function getZfsErrorTextClass');- expect(storagePoolDetailPresentationSource).toContain('export function getZfsErrorSummary');- expect(storagePoolDetailPresentationSource).toContain(- 'export const STORAGE_POOL_DETAIL_HISTORY_RANGE_OPTIONS',- );- expect(storagePoolDetailPresentationSource).toContain(- 'export function resolveStoragePoolDetailChartTarget',- );- expect(storagePoolDetailPresentationSource).toContain(- 'export function buildStoragePoolDetailConfigRows',- );- expect(storagePoolDetailPresentationSource).toContain(- 'export function buildStoragePoolDetailZfsSummary',- );- expect(storagePoolDetailPresentationSource).toContain(- 'export function getStoragePoolLinkedDisks',- );- expect(storageBarPresentationSource).toContain('export const getStorageBarUsagePercent');- expect(storageBarPresentationSource).toContain('export const getStorageBarLabel');- expect(storageBarPresentationSource).toContain('export const getStorageBarTooltipRows');- expect(storageBarPresentationSource).toContain('export const getStorageBarTooltipRowClass');- expect(storageBarPresentationSource).toContain('export const getStorageBarZfsHeadingLabel');- expect(storageBarPresentationSource).toContain('export const getStorageBarZfsSummary');- expect(storageBarPresentationSource).toContain('export const STORAGE_BAR_ROOT_CLASS');- expect(useStoragePoolDetailModelSource).toContain('resolveStoragePoolDetailChartTarget');- expect(useStoragePoolDetailModelSource).toContain('buildStoragePoolDetailConfigRows');- expect(useStoragePoolDetailModelSource).toContain('buildStoragePoolDetailZfsSummary');- expect(useStoragePoolDetailModelSource).toContain('getStoragePoolLinkedDisks');- expect(storageRecordPresentationSource).toContain('export const getStorageRecordNodeHints');- expect(storageRecordPresentationSource).toContain('export const getStorageRecordType');- expect(storageRecordPresentationSource).toContain('export const getStorageRecordContent');- expect(storageRecordPresentationSource).toContain('export const getStorageRecordStatus');- expect(storageRecordPresentationSource).toContain('export const getStorageRecordPlatformLabel');- expect(storageRecordPresentationSource).toContain('export const getStorageRecordHostLabel');- expect(storageRecordPresentationSource).toContain('export const getStorageRecordTopologyLabel');- expect(storageRecordPresentationSource).toContain(- 'export const getStorageRecordProtectionLabel',- );- expect(storageRecordPresentationSource).toContain('export const getStorageRecordIssueLabel');- expect(storageRecordPresentationSource).toContain('export const getStorageRecordIssueSummary');- expect(storageRecordPresentationSource).toContain('export const getStorageRecordImpactSummary');- expect(storageRecordPresentationSource).toContain('export const getStorageRecordActionSummary');- expect(storageRecordPresentationSource).toContain('export const getStorageRecordShared');- expect(storageRecordPresentationSource).toContain('export const getStorageRecordNodeLabel');- expect(storageRecordPresentationSource).toContain('export const getStorageRecordUsagePercent');- expect(storageRecordPresentationSource).toContain('export const getStorageRecordZfsPool');- expect(storageRecordPresentationSource).toContain('export const getStorageRecordStats');- expect(resourceStoragePresentationSource).toContain(- 'export const getCanonicalStoragePlatformKey',- );- expect(resourceStoragePresentationSource).toContain(- 'export const getResourceStoragePlatformLabel',- );- expect(resourceStoragePresentationSource).toContain(- 'export const getResourceStorageTopologyLabel',- );- expect(resourceStoragePresentationSource).toContain(- 'export const getResourceStorageIssueLabel',- );- expect(resourceStoragePresentationSource).toContain(- 'export const getResourceStorageIssueSummary',- );- expect(resourceStoragePresentationSource).toContain(- 'export const getResourceStorageImpactSummary',- );- expect(resourceStoragePresentationSource).toContain(- 'export const getResourceStorageActionSummary',- );- expect(resourceStoragePresentationSource).toContain(- 'export const getResourceStorageProtectionLabel',- );- expect(resourceStorageMappingSource).toContain('export type ResourceStorageMeta');- expect(resourceStorageMappingSource).toContain('export const readResourceStorageMeta');- expect(resourceStorageMappingSource).toContain('export const resolveResourceStorageContent');- expect(resourceStorageMappingSource).toContain(- 'export const getStorageCapabilitiesForResource',- );- expect(resourceStorageMappingSource).toContain('export const getStorageCategoryFromType');- expect(storageAdapterCoreSource).toContain('export const asNumberOrNull');- expect(storageAdapterCoreSource).toContain('export const dedupe');- expect(storageAdapterCoreSource).toContain('export const getStringArray');- expect(storageAdapterCoreSource).toContain('export const canonicalStorageIdentityKey');- expect(storageAdapterCoreSource).toContain('export const buildStorageSource');- expect(storageAdapterCoreSource).toContain('export const buildStorageCapacity');- expect(storageAdapterCoreSource).toContain('export const metricsTargetForStorageResource');- expect(storageAdapterCoreSource).toContain('export const normalizeStorageResourceHealth');- expect(storageAlertStateSource).toContain('export type StorageAlertRowState');- expect(storageAlertStateSource).toContain('export const EMPTY_STORAGE_ALERT_STATE');- expect(storageAlertStateSource).toContain('export const asStorageAlertRecord');- expect(storageAlertStateSource).toContain('export const mergeStorageAlertRowState');- expect(storageAlertStateSource).toContain('export const getStorageRecordAlertResourceIds');- expect(storagePageStateSource).toContain('export const normalizeStorageHealthFilter');- expect(storagePageStateSource).toContain('export const normalizeStorageSortKey');- expect(storagePageStateSource).toContain('export const normalizeStorageGroupKey');- expect(storagePageStateSource).toContain('export const normalizeStorageView');- expect(storagePageStateSource).toContain('export const normalizeStorageSortDirection');- expect(storagePageStateSource).toContain('export const getStorageFilterGroupBy');- expect(storagePageStateSource).toContain('export const getStorageStatusFilterValue');- expect(storagePageStateSource).toContain('export const toStorageHealthFilterValue');- expect(storagePageStateSource).toContain('export const isStorageRecordCeph');- expect(storagePageStateSource).toContain('export const buildStorageNodeOptions');- expect(storagePageStateSource).toContain('export const filterStorageDiskNodeOptions');- expect(storagePageStateSource).toContain('export const buildStorageNodeOnlineByLabel');- expect(storagePageStateSource).toContain('export const resolveExpandedStorageGroups');- expect(storagePageStateSource).toContain('export const toggleCollapsedStorageGroup');- expect(storagePageStateSource).toContain('export const DEFAULT_STORAGE_SELECTED_NODE_ID');- expect(storagePageStateSource).toContain('export const DEFAULT_STORAGE_SORT_OPTIONS');- expect(storagePageStateSource).toContain('export const STORAGE_STATUS_FILTER_OPTIONS');- expect(storagePageStateSource).toContain('export const STORAGE_GROUP_BY_OPTIONS');- expect(storagePageStateSource).toContain('export const countActiveStorageFilters');- expect(storagePageStateSource).toContain('export const hasActiveStorageFilters');- expect(storagePageStateSource).toContain('export const getStorageNodeFilterLabel');- expect(storagePageStateSource).toContain('getAllFilterOptionLabel');- expect(storagePageStateSource).toContain('export const readStorageRouteValue');- expect(storagePageStateSource).toContain('export const writeStorageRouteValue');- expect(storagePageStateSource).toContain('export const coerceSelectedStorageNodeId');- expect(storagePageStateSource).toContain('export const buildStorageNodeFilterOptions');- expect(storagePageStateSource).toContain('export const DEFAULT_STORAGE_VIEW');- expect(storagePageStateSource).toContain('export const DEFAULT_STORAGE_SOURCE_FILTER');- expect(storagePageStateSource).toContain('export const DEFAULT_STORAGE_SORT_KEY');- expect(storagePageStateSource).toContain('export const DEFAULT_STORAGE_SORT_DIRECTION');- expect(storagePageStateSource).toContain('export const DEFAULT_STORAGE_GROUP_KEY');- expect(storagePageStateSource).toContain('export const DEFAULT_STORAGE_STATUS_FILTER');- expect(cephRecordPresentationSource).toContain('export const isCephStorageRecord');- expect(cephRecordPresentationSource).toContain(- 'export const getCephClusterKeyFromStorageRecord',- );- expect(cephRecordPresentationSource).toContain('export const getCephSummaryText');- expect(cephRecordPresentationSource).toContain('export const getCephPoolsText');- expect(cephRecordPresentationSource).toContain('export const collectCephClusterNodes');- expect(temperatureUtilSource).toContain('export const getTemperatureTextClass');- expect(proxmoxMailGatewayDrawerSource).not.toContain('const statusTone =');- expect(serviceHealthPresentationSource).toContain(- 'export function getServiceHealthPresentation',- );- expect(k8sNamespacesDrawerSource).toContain('getNamespaceCountsIndicator');- expect(k8sNamespacesDrawerSource).toContain('getK8sNamespacesDrawerPresentation');- expect(k8sNamespacesDrawerSource).toContain('getK8sNamespacesEmptyState');- expect(k8sNamespacesDrawerSource).toContain('getK8sNamespacesLoadingState');- expect(k8sNamespacesDrawerSource).toContain('getK8sNamespacesFailureState');- expect(k8sNamespacesDrawerSource).toContain('<StatusDot');- expect(k8sNamespacesDrawerSource).toContain('<PlatformDetailTable');- expect(k8sNamespacesDrawerSource).not.toContain('<div class="overflow-x-auto">');- expect(k8sNamespacesDrawerSource).not.toContain('const statusTone =');- expect(k8sNamespacesDrawerSource).not.toContain('Scope Pods and Deployments by namespace');- expect(k8sNamespacesDrawerSource).not.toContain('Search namespaces...');- expect(k8sNamespacesDrawerSource).not.toContain('Open All Pods');- expect(k8sNamespacesDrawerSource).not.toContain('View Deployments');- expect(k8sNamespacesDrawerSource).not.toContain('Loading namespaces...');- expect(k8sNamespacesDrawerSource).not.toContain('Failed to load namespaces');- expect(k8sNamespacesDrawerSource).not.toContain('Aggregating Kubernetes namespaces.');- expect(k8sNamespacesDrawerSource).not.toContain('No namespaces match your filters');- expect(k8sNamespacesDrawerSource).not.toContain('Try clearing your search.');- expect(k8sNamespacePresentationSource).toContain(- 'export function getK8sNamespacesDrawerPresentation',- );- expect(k8sNamespacePresentationSource).toContain('export function getK8sNamespacesEmptyState');- expect(k8sNamespacePresentationSource).toContain(- 'export function getK8sNamespacesLoadingState',- );- expect(k8sNamespacePresentationSource).toContain(- 'export function getK8sNamespacesFailureState',- );- expect(k8sStatusPresentationSource).toContain('export function getNamespaceCountsIndicator');- expect(raidCardSource).toContain('getRaidStateVariant');- expect(raidCardSource).toContain('getRaidStateTextClass');- expect(raidCardSource).toContain('getRaidDeviceBadgeClass');- expect(raidCardSource).not.toContain('const raidStateVariant =');- expect(raidCardSource).not.toContain('const deviceToneClass =');- expect(raidPresentationSource).toContain('export function getRaidStateVariant');- expect(raidPresentationSource).toContain('export function getRaidDeviceBadgeClass');- expect(proLicensePanelSource).toContain('./useProLicensePanelState');- expect(proLicensePanelSource).toContain('./ProLicensePlanSection');- expect(proLicensePanelStateSource).toContain('getLicenseSubscriptionStatusPresentation');- expect(proLicensePanelStateSource).toContain('formatLicensePlanVersion');- expect(proLicensePanelStateSource).not.toContain('getTrialActivationNotice');- expect(proLicensePanelStateSource).toContain('getCommercialMigrationNotice');- expect(proLicensePlanSectionSource).toContain('getLicenseStatusLoadingState');- expect(proLicensePlanSectionSource).toContain('getNoActiveSelfHostedActivationState');- expect(proLicensePlanSectionSource).not.toContain('getTrialEndedProLicenseNotice');- expect(proLicensePlanSectionSource).not.toContain('getInactiveProUpsellNotice');- expect(proLicensePanelSource).not.toContain('Loading license status...');- expect(proLicensePanelSource).not.toContain('No Pro license is active.');- expect(proLicensePanelSource).not.toContain('No paid self-hosted activation is active');- expect(proLicensePanelSource).not.toContain('const statusLabel =');- expect(proLicensePanelStateSource).not.toContain('const statusTone =');- expect(proLicensePanelStateSource).not.toContain('const formatTitleCase =');- expect(proLicensePanelStateSource).not.toContain('const commercialMigrationActionText =');- expect(proLicensePanelStateSource).not.toContain('const commercialMigrationNoticeFor =');- expect(licensePresentationSource).toContain(- 'export const getLicenseSubscriptionStatusPresentation',- );- expect(licensePresentationSource).toContain('export const getLicenseStatusLoadingState');- expect(licensePresentationSource).toContain(- 'export const getNoActiveSelfHostedActivationState',- );- expect(licensePresentationSource).not.toContain('export const getTrialEndedProLicenseNotice');- expect(licensePresentationSource).not.toContain('export const getInactiveProUpsellNotice');- expect(licensePresentationSource).toContain(- 'export const getOrganizationBillingLicenseStatusLabel',- );- expect(licensePresentationSource).toContain('export const getBillingAdminTrialStatus');- expect(licensePresentationSource).toContain('export const getBillingAdminOrganizationBadges');- expect(licensePresentationSource).toContain(- 'export const getBillingAdminStateUpdateSuccessMessage',- );- expect(licensePresentationSource).toContain('export const BILLING_ADMIN_EMPTY_STATE');- expect(licensePresentationSource).toContain('export const formatLicensePlanVersion');- expect(licensePresentationSource).toContain('titleCaseDelimitedLabel');- expect(licensePresentationSource).toContain('export const getCommercialMigrationNotice');- expect(licensePresentationSource).not.toContain('export const getTrialActivationNotice');- expect(securityPostureSummarySource).toContain('getSecurityScorePresentation');- expect(securityPostureSummarySource).toContain('getSecurityScoreIconComponent');- expect(securityPostureSummarySource).toContain('getSecurityFeatureCardPresentation');- expect(securityPostureSummarySource).not.toContain('const scoreTone =');- expect(securityPostureSummarySource).not.toContain('const ScoreIcon =');- expect(securityPostureSummarySource).not.toContain(- "item.enabled\n ? 'border-emerald-200 dark:border-emerald-800 bg-emerald-50 dark:bg-emerald-950/25'",- );- expect(securityWarningSource).toContain('getSecurityWarningPresentation');- expect(securityWarningSource).toContain('getSecurityFeatureStatePresentation');- expect(securityWarningSource).toContain('getSecurityScorePresentation');- expect(securityWarningSource).toContain('warningPresentation().background');- expect(securityWarningSource).toContain('warningPresentation().border');- expect(securityWarningSource).not.toContain('bg-yellow-50 dark:bg-yellow-900/25');- expect(securityWarningSource).not.toContain(- "status()!.credentialsEncrypted ? 'text-green-600' : 'text-red-600'",- );- expect(findingsPanelSource).toContain('getFindingStatusBadgeTone');- expect(findingsPanelSource).toContain('getFindingStatusLabel');- expect(findingsPanelSource).toContain('getFindingSeveritySortOrder');- expect(findingsPanelSource).toContain('getInvestigationOutcomeSortOrder');- expect(findingsPanelSource).toContain('getInvestigationOutcomeBadgeTone');- expect(findingsPanelSource).toContain('getInvestigationOutcomeLabel');- expect(findingsPanelSource).toContain('getInvestigationStatusLabel');- expect(findingsPanelSource).toContain('hasFindingInvestigationDetails');- expect(findingsPanelSource).toContain('getFindingResolutionReason');- expect(findingsPanelSource).toContain('buildFindingFilterOptions');- expect(findingsPanelSource).toContain('getPatrolFindingsEmptyState');- expect(findingsPanelSource).not.toContain('finding.investigationSessionId');- expect(findingsPanelSource).not.toContain("finding.status === 'resolved' ? 'Resolved'");- expect(findingsPanelSource).not.toContain('const severityOrder');- expect(findingsPanelSource).not.toContain('const outcomeOrder');- expect(findingsPanelSource).not.toContain('switch (alertType) {');- expect(findingsPanelSource).not.toContain('switch (finding.investigationOutcome) {');- expect(findingsPanelSource).not.toContain(- "filter() === 'attention'\n ? 'bg-amber-50 dark:bg-amber-900/25 text-amber-700 dark:text-amber-300 border-amber-300 dark:border-amber-700 shadow-xs'",- );- expect(findingsPanelSource).not.toContain('No active findings');- expect(findingsPanelSource).not.toContain('No pending approvals.');- expect(aiFindingPresentationSource).toContain('export const getFindingStatusBadgeClasses');- expect(aiFindingPresentationSource).toContain('export const getFindingStatusBadgeTone');- expect(aiFindingPresentationSource).toContain('export const getFindingStatusLabel');- expect(aiFindingPresentationSource).toContain('export const getFindingSeveritySortOrder');- expect(aiFindingPresentationSource).toContain('export const getFindingSeverityCompactLabel');- expect(aiFindingPresentationSource).toContain(- 'export const getInvestigationOutcomeBadgeClasses',- );- expect(aiFindingPresentationSource).toContain('export const getInvestigationOutcomeBadgeTone');- expect(aiFindingPresentationSource).toContain('export const getInvestigationOutcomeLabel');- expect(aiFindingPresentationSource).toContain('export const getInvestigationStatusLabel');- expect(aiFindingPresentationSource).toContain('export const getInvestigationOutcomeSortOrder');- expect(aiFindingPresentationSource).toContain('export const hasFindingInvestigationDetails');- expect(aiFindingPresentationSource).toContain('export const getFindingResolutionReason');- expect(aiFindingPresentationSource).toContain('export const buildFindingFilterOptions');- expect(aiFindingPresentationSource).toContain('export const getFindingEmptyStateCopy');- expect(investigationSectionSource).toContain('getInvestigationOutcomeBadgeTone');- expect(investigationSectionSource).toContain('getInvestigationOutcomeLabel');- expect(investigationSectionSource).toContain('getInvestigationStatusLabel');- expect(investigationSectionSource).toContain('getInvestigationStatusBadgeTone');- expect(investigationSectionSource).toContain('MetadataBadge');- expect(investigationSectionSource).not.toContain('investigationStatusLabels');- expect(investigationSectionSource).not.toContain('investigationOutcomeLabels');- expect(investigationSectionSource).not.toContain('investigationOutcomeColors');- expect(approvalRiskPresentationSource).toContain('badgeTone: MetadataBadgeTone');- expect(approvalRiskPresentationSource).not.toContain('badgeClass: string');- expect(approvalBannerSource).toContain('MetadataBadge');- expect(approvalBannerSource).toContain('APPROVAL_BANNER_BADGE_PROPS');- expect(approvalBannerSource).not.toContain('firstApprovalRisk()!.badgeClass');- expect(approvalSectionSource).toContain('MetadataBadge');- expect(approvalSectionSource).toContain('BADGE_PROPS');- expect(approvalSectionSource).not.toContain('approvalRisk.badgeClass');- expect(approvalSectionSource).not.toContain('fixRisk.badgeClass');- expect(securityWarningSource).not.toContain('bg-red-50 dark:bg-red-900/25');- expect(securityScorePresentationSource).toContain(- 'export function getSecurityScorePresentation',- );- expect(securityScorePresentationSource).toContain(- 'export function getSecurityWarningPresentation',- );- expect(securityScorePresentationSource).toContain(- 'export function getSecurityFeatureStatePresentation',- );- expect(securityScorePresentationSource).toContain(- 'export function getSecurityScoreIconComponent',- );- expect(securityScorePresentationSource).toContain(- 'export function getSecurityFeatureCardPresentation',- );- expect(securityScorePresentationSource).toContain('export function getSecurityPostureItems');- expect(securityScorePresentationSource).toContain(- 'export function getSecurityNetworkAccessSubtitle',- );- expect(securityPostureSummarySource).toContain('getSecurityPostureItems');- expect(securityPostureSummarySource).toContain('getSecurityNetworkAccessSubtitle');- expect(securityPostureSummarySource).not.toContain("label: 'Password login'");- expect(securityPostureSummarySource).not.toContain('Public network access detected');- expect(securityAuthPanelSource).toContain('@/utils/securityAuthPresentation');- expect(securityAuthPanelSource).not.toContain('Authentication disabled');- expect(securityAuthPanelSource).not.toContain(- 'Authentication is currently disabled. Set up password authentication to protect your Pulse instance.',- );- expect(securityAuthPanelSource).not.toContain('Security Configured - Restart Required');- expect(securityAuthPresentationSource).toContain(- 'export const SECURITY_AUTH_DISABLED_PANEL_TITLE',- );- expect(securityAuthPresentationSource).toContain(- 'export function getSecurityAuthRestartInstruction',- );- expect(generalSettingsPanelSource).toContain('EnvironmentLockBadge');- expect(generalSettingsPanelSource).not.toContain(- 'bg-amber-100 text-amber-700 dark:bg-amber-900/25 dark:text-amber-300',- );- expect(dockerRuntimeSettingsCardSource).toContain('EnvironmentLockBadge');- expect(dockerRuntimeSettingsCardSource).toContain('ENVIRONMENT_LOCK_BUTTON_TITLE');- expect(dockerRuntimeSettingsCardSource).not.toContain('>ENV<');- expect(dockerRuntimeSettingsCardSource).not.toContain(- 'bg-amber-100 text-amber-700 dark:bg-amber-900/25 dark:text-amber-300',- );- expect(environmentLockBadgeSource).toContain('getEnvironmentLockTitle');- expect(environmentLockPresentationSource).toContain(- 'export const ENVIRONMENT_LOCK_BADGE_CLASS',- );- expect(environmentLockPresentationSource).toContain('export function getEnvironmentLockTitle');- expect(environmentLockPresentationSource).toContain(- 'export const ENVIRONMENT_LOCK_BUTTON_TITLE',- );- expect(resourceDetailDrawerSource).toContain('getServiceHealthPresentation');- expect(resourceDetailDrawerHistoryStateSource).toContain('ResourceAPI.getFacetBundle');- expect(resourceDetailDrawerSource).toContain('History');- expect(resourceDetailDrawerSource).toContain('RESOURCE_CHANGE_KIND_ORDER');- expect(resourceDetailDrawerSource).toContain('RESOURCE_CHANGE_SOURCE_TYPE_ORDER');- expect(resourceDetailDrawerSource).toContain('RESOURCE_CHANGE_SOURCE_ADAPTER_ORDER');- expect(- usesSharedChangePresentation(- resourceDetailDrawerOverviewSource,- resourceChangePresentationSource,- ),- ).toBe(true);- expect(resourceDetailDrawerSource).toContain('getResourceChangeSourceTypePresentation');- expect(resourceDetailDrawerSource).toContain('getResourceChangeSourceAdapterPresentation');- expect(- usesSharedChangePresentation(resourceChangeSummarySource, resourceChangePresentationSource),- ).toBe(true);- // Per-change rows read getResourceChangePresentation, which wraps the- // kind presentation so an alert close that was not a recovery reads as- // a move.- expect(resourceDetailDrawerSource).toContain('getResourceChangePresentation(change)');- expect(resourceChangeSummarySource).toContain('getResourceChangePresentation(change)');- expect(resourceChangeSummarySource).not.toContain(- 'getResourceChangeKindPresentation(change.kind)',- );- expect(resourceChangeSummarySource).toContain('getResourceChangeSourceTypePresentation');- expect(resourceChangeSummarySource).toContain('getResourceChangeSourceAdapterPresentation');- expect(resourceDetailDrawerSource).not.toContain('healthToneClass(');- expect(resourceDetailDrawerSource).not.toContain('normalizeHealthLabel(');- expect(resourceChangePresentationSource).toContain('getResourceChangeKindPresentation');- expect(resourceChangePresentationSource).toContain(- 'export function getResourceChangePresentation',- );- expect(resourceChangePresentationSource).toContain('getResourceChangeSourceTypePresentation');- expect(resourceChangePresentationSource).toContain(- 'getResourceChangeSourceAdapterPresentation',- );- expect(resourceCorrelationPresentationSource).toContain('formatConfidencePercentage');- expect(resourceCorrelationPresentationSource).toContain('humanizeArrowDelimitedLabel');- expect(resourceCorrelationPresentationSource).toContain('asTrimmedString');- expect(confidencePresentationSource).toContain('formatConfidencePercentage');- expect(confidencePresentationSource).toContain('formatConfidenceLabel');- expect(resourceDetailDrawerSource).toContain('formatIdentifierLabel');- expect(resourceDetailDrawerServiceModelSource).toContain('buildPbsVisibleJobBreakdown');- expect(resourceDetailDrawerServiceModelSource).toContain('buildPmgVisibleQueueBreakdown');- expect(resourceDetailDrawerServiceModelSource).toContain('buildPmgVisibleMailBreakdown');- expect(resourceChangePresentationSource).toContain('humanizeToken');- expect(textPresentationSource).toContain('humanizeArrowDelimitedLabel');- expect(resourceCorrelationPresentationSource).not.toContain(- 'formatResourceCorrelationEndpointLabel',- );- expect(resourceCorrelationPresentationSource).not.toContain("replace(/\\s*->\\s*/g, ' → ')");- expect(textPresentationSource).toContain('humanizeToken');- expect(textPresentationSource).toContain('formatIdentifierLabel');- expect(resourceCorrelationPresentationSource).not.toContain('formatTrimmedLabel');- expect(proxmoxMailGatewayDrawerSource).toContain('asTrimmedString');- expect(proxmoxMailGatewayDrawerSource).not.toContain(- "const normalize = (value?: string | null) => (value || '').trim();",- );- expect(k8sNamespacesDrawerSource).toContain('asTrimmedString');- expect(k8sNamespacesDrawerSource).not.toContain(- "const normalize = (value?: string | null) => (value || '').trim();",- );- expect(findingsPanelSource).toContain('formatIdentifierLabel');- expect(patrolFormatSource).toContain('formatIdentifierLabel');- expect(aiFindingPresentationSource).toContain('formatIdentifierLabel');- expect(findingsPanelSource).not.toContain("replace(/_/g, ' ')");- expect(patrolFormatSource).not.toContain("replace(/_/g, ' ') : 'Unknown'");- expect(aiFindingPresentationSource).not.toContain("replace(/_/g, ' ')");- expect(patrolRunPresentationSource).toContain('formatIdentifierLabel');- expect(patrolRunPresentationSource).not.toContain("normalized.replace(/_/g, ' ')");- expect(patrolRunPresentationSource).not.toContain(- "normalized ? normalized.replace(/_/g, ' ') : 'unknown'",- );- expect(stringUtilsSource).toContain('export const asTrimmedString');- expect(resourceIdentitySource).not.toContain(- 'const asTrimmedString = (value: unknown): string | undefined => {',- );- expect(commandPaletteModalSource).toContain('useCommandPaletteState');- expect(commandPaletteModalSource).not.toContain('useNavigate');- expect(commandPaletteModalSource).not.toContain('createSignal');- expect(commandPaletteModalSource).not.toContain('buildInfrastructurePath');- expect(commandPaletteStateSource).toContain('useNavigate');- expect(commandPaletteStateSource).toContain('createSignal');- expect(commandPaletteStateSource).not.toContain('buildInfrastructurePath');- expect(commandPaletteModelSource).toContain('buildCommandPaletteCommands');- expect(commandPaletteModelSource).toContain('normalizeCommandPaletteQuery');- expect(commandPaletteModelSource).toContain('filterCommandPaletteCommands');- expect(pulseDataGridSource).toContain('usePulseDataGridState');- expect(pulseDataGridSource).toContain('getPulseDataGridAlignClass');- expect(pulseDataGridSource).toContain('isPulseDataGridInteractiveTarget');- expect(pulseDataGridSource).toContain('wrapperClass="scrollbar-hide"');- expect(pulseDataGridSource).not.toContain(- '<div class="overflow-x-auto touch-scroll scrollbar-hide">',- );- expect(pulseDataGridSource).not.toContain('useBreakpoint');- expect(pulseDataGridSource).not.toContain('createStore');- expect(pulseDataGridSource).not.toContain('target.closest(');- expect(pulseDataGridStateSource).toContain('useBreakpoint');- expect(pulseDataGridStateSource).toContain('createStore');- expect(pulseDataGridStateSource).toContain('reconcile(');- expect(pulseDataGridModelSource).toContain('getPulseDataGridAlignClass');- expect(pulseDataGridModelSource).toContain('isPulseDataGridInteractiveTarget');- expect(pulseDataGridModelSource).toContain('target.closest(');- expect(searchFieldSource).toContain('useSearchFieldState');- expect(searchFieldSource).not.toContain('let inputEl: HTMLInputElement');- expect(searchFieldSource).not.toContain(- "if (props.hasTrailingControls) return 'pr-14 sm:pr-20'",- );- expect(searchFieldSource).not.toContain("if (e.key === 'Escape'");- expect(searchFieldStateSource).toContain('let inputEl: HTMLInputElement');- expect(searchFieldStateSource).toContain("if (event.key === 'Escape'");- expect(searchFieldStateSource).toContain('inputEl?.blur()');- expect(searchFieldModelSource).toContain('shouldShowSearchFieldShortcutHint');- expect(searchFieldModelSource).toContain('shouldShowSearchFieldClearButton');- expect(searchFieldModelSource).toContain('getSearchFieldInputPaddingRightClass');- expect(searchInputSource).toContain('useSearchInputState');- expect(searchInputSource).not.toContain('let searchInputEl: HTMLInputElement');- expect(searchInputSource).not.toContain('useTypeToSearch');- expect(searchInputSource).not.toContain('useSearchInputEnhancements');- expect(searchInputStateSource).toContain('let searchInputEl: HTMLInputElement');- expect(searchInputStateSource).toContain('useTypeToSearch');- expect(searchInputStateSource).toContain('useSearchInputEnhancements');- expect(searchInputStateSource).toContain('getSearchInputShortcutHint');- expect(searchInputModelSource).toContain('getSearchInputShortcutHint');- expect(searchInputModelSource).toContain('shouldSearchInputShowTrailingControls');- expect(searchInputEnhancementsSource).toContain('getSearchHistoryToggleButtonClass');- expect(searchInputEnhancementsSource).toContain('getSearchHistoryToggleTitle');- expect(searchInputEnhancementsSource).toContain('SEARCH_HISTORY_CLEAR_LABEL');- expect(searchInputEnhancementsSource).not.toContain('Show recent searches');- expect(searchInputEnhancementsSource).not.toContain('No recent searches yet');- expect(searchInputEnhancementsSource).not.toContain('Clear history');- expect(searchInputEnhancementsSource).not.toContain('hover:bg-blue-50');- expect(searchInputEnhancementsStateSource).toContain('createSearchHistoryManager');- expect(searchInputEnhancementsStateSource).not.toContain('Show recent searches');- expect(searchInputEnhancementsStateSource).toContain(- "options.history?.emptyMessage ?? 'Searches you run will appear here.'",- );- expect(searchInputEnhancementsModelSource).toContain('getSearchHistoryToggleButtonClass');- expect(searchInputEnhancementsModelSource).toContain('getSearchHistoryToggleTitle');- expect(searchInputEnhancementsModelSource).toContain('SEARCH_HISTORY_CLEAR_LABEL');- expect(searchInputEnhancementsModelSource).toContain('SEARCH_HISTORY_MENU_CLASS');- expect(searchTipsPopoverSource).toContain('useSearchTipsPopoverState');- expect(searchTipsPopoverSource).toContain('getSearchTipsPopoverTriggerClass');- expect(searchTipsPopoverSource).not.toContain('createSignal');- expect(searchTipsPopoverSource).not.toContain('createEffect');- expect(searchTipsPopoverSource).not.toContain('window.addEventListener');- expect(searchTipsPopoverStateSource).toContain('createSignal');- expect(searchTipsPopoverStateSource).toContain('createEffect');- expect(searchTipsPopoverStateSource).toContain('window.addEventListener');- expect(searchTipsPopoverStateSource).toContain('pointerInside');- expect(searchTipsPopoverModelSource).toContain('getSearchTipsPopoverTriggerClass');- expect(searchTipsPopoverModelSource).toContain('getSearchTipsPopoverPositionClass');- expect(searchTipsPopoverModelSource).toContain('getSearchTipsPopoverTriggerVariant');- expect(searchTipsPopoverModelSource).toContain('shouldSearchTipsPopoverOpenOnHover');- expect(upgradeLinkSource).toContain('destination.external');- expect(upgradeLinkSource).not.toContain('window.open');- expect(upgradeLinkSource).not.toContain('useNavigate(');- expect(upgradeNavigationSource).toContain('isExternalUpgradeHref');- expect(upgradeNavigationSource).toContain('resolveUpgradeDestination');- expect(upgradeNavigationSource).toContain('navigateToUpgradeDestination');- expect(upgradeNavigationSource).toContain("window.open(href, '_blank', 'noopener,noreferrer')");- expect(columnPickerSource).toContain('useColumnPickerState');- expect(columnPickerSource).toContain('COLUMN_PICKER_PANEL_TITLE');- expect(columnPickerSource).not.toContain('createSignal');- expect(columnPickerSource).not.toContain('createEffect');- expect(columnPickerSource).not.toContain('document.addEventListener');- expect(columnPickerSource).not.toContain('getHiddenColumnCount');- expect(columnPickerStateSource).toContain('createSignal');- expect(columnPickerStateSource).toContain('createEffect');- expect(columnPickerStateSource).toContain('document.addEventListener');- expect(columnPickerStateSource).toContain('handleClickOutside');- expect(columnPickerStateSource).toContain('hiddenCount');- expect(columnPickerModelSource).toContain('COLUMN_PICKER_BUTTON_LABEL');- expect(columnPickerModelSource).toContain('COLUMN_PICKER_PANEL_TITLE');- expect(columnPickerModelSource).toContain('getHiddenColumnCount');- expect(columnPickerModelSource).toContain('shouldShowColumnPickerReset');- expect(columnPickerModelSource).toContain('getColumnPickerOptionTextClass');- expect(tagInputSource).toContain('useTagInputState');- expect(tagInputSource).toContain('getTagInputPlaceholder');- expect(tagInputSource).not.toContain('createSignal');- expect(tagInputSource).not.toContain('querySelector');- expect(tagInputSource).not.toContain('Backspace');- expect(tagInputSource).not.toContain('addTag');- expect(tagInputStateSource).toContain('createSignal');- expect(tagInputStateSource).toContain('createMemo');- expect(tagInputStateSource).toContain('inputRef?.focus');- expect(tagInputStateSource).toContain("event.key === 'Backspace'");- expect(tagInputStateSource).toContain('commitTag');- expect(tagInputModelSource).toContain('TAG_INPUT_DELIMITER_KEYS');- expect(tagInputModelSource).toContain('isTagInputCommitKey');- expect(tagInputModelSource).toContain('getTagInputPlaceholder');- expect(tagInputModelSource).toContain('getNextTagsAfterRemove');- expect(tagInputModelSource).toContain('getTagInputRemoveTitle');- expect(filterButtonGroupSource).toContain('useFilterButtonGroupState');- expect(filterButtonGroupSource).toContain('getFilterButtonGroupClass');- expect(filterButtonGroupSource).toContain('getFilterButtonGroupButtonClass');- expect(filterButtonGroupSource).toContain('getFilterButtonGroupCompactLabel');- expect(filterButtonGroupSource).not.toContain("label.split(' ').pop()");- expect(filterButtonGroupSource).not.toContain('props.onChange(option.value)');- expect(filterButtonGroupStateSource).toContain('createMemo');- expect(filterButtonGroupStateSource).toContain('props.disabled || option.disabled');- expect(filterButtonGroupStateSource).toContain('props.onChange(option.value)');- expect(filterButtonGroupModelSource).toContain('resolveFilterButtonGroupVariant');- expect(filterButtonGroupModelSource).toContain('getFilterButtonGroupClass');- expect(filterButtonGroupModelSource).toContain('getFilterButtonGroupButtonClass');- expect(filterButtonGroupModelSource).toContain('getFilterButtonGroupCompactLabel');- expect(filterButtonGroupModelSource).toContain("prominent: 'grid grid-cols-1 gap-2'");- expect(toggleSource).toContain('useToggleState');- expect(toggleSource).toContain('getToggleTrackClass');- expect(toggleSource).toContain('getToggleKnobClass');- expect(toggleSource).not.toContain('defaultPrevented');- expect(toggleSource).not.toContain('toggleSizeConfig');- expect(toggleSource).not.toContain('handleClick =');- expect(toggleStateSource).toContain('defaultPrevented');- expect(toggleStateSource).toContain('currentTarget: { checked: next }');- expect(toggleStateSource).toContain('props.onChange?.(event)');- expect(toggleStateSource).toContain('props.onToggle?.()');- expect(toggleModelSource).toContain('toggleSizeConfig');- expect(toggleModelSource).toContain('resolveToggleSize');- expect(toggleModelSource).toContain('getToggleTrackClass');- expect(toggleModelSource).toContain('getToggleKnobClass');- expect(toggleModelSource).toContain('ToggleChangeEvent');- expect(statusBadgeSource).toContain('useStatusBadgeState');- expect(statusBadgeSource).toContain('getStatusBadgeClass');- expect(statusBadgeSource).toContain('getStatusBadgeLabel');- expect(statusBadgeSource).toContain('getStatusBadgeTitle');- expect(statusBadgeSource).not.toContain('cursor-not-allowed');- expect(statusBadgeSource).not.toContain('props.onToggle?.()');- expect(statusBadgeSource).not.toContain('labelEnabled ??');- expect(statusBadgeStateSource).toContain('Boolean(props.disabled)');- expect(statusBadgeStateSource).toContain('props.onToggle?.()');- expect(statusBadgeStateSource).toContain('if (isDisabled())');- expect(statusBadgeModelSource).toContain('STATUS_BADGE_PADDING_BY_SIZE');- expect(statusBadgeModelSource).toContain('getStatusBadgeClass');- expect(statusBadgeModelSource).toContain('getStatusBadgeLabel');- expect(statusBadgeModelSource).toContain('getStatusBadgeTitle');- expect(statusBadgeModelSource).toContain("labelEnabled ?? 'Enabled'");- expect(selectionCardGroupSource).toContain('useSelectionCardGroupState');- expect(selectionCardGroupSource).toContain('getSelectionCardGroupClass');- expect(selectionCardGroupSource).toContain('getSelectionCardButtonClass');- expect(selectionCardGroupSource).toContain('getSelectionCardTitleClass');- expect(selectionCardGroupSource).not.toContain('resolveSelectionCardTone');- expect(selectionCardGroupSource).not.toContain('props.onChange(option.value)');- expect(selectionCardGroupStateSource).toContain('createMemo');- expect(selectionCardGroupStateSource).toContain('resolveSelectionCardTone');- expect(selectionCardGroupStateSource).toContain('props.disabled || option.disabled');- expect(selectionCardGroupStateSource).toContain('props.onChange(option.value)');- expect(selectionCardGroupModelSource).toContain('resolveSelectionCardGroupVariant');- expect(selectionCardGroupModelSource).toContain('resolveSelectionCardTone');- expect(selectionCardGroupModelSource).toContain('getSelectionCardButtonClass');- expect(selectionCardGroupModelSource).toContain("compact: 'grid grid-cols-2 gap-2'");- expect(monitoredSystemPresentationSource).toContain(- 'export function getMonitoredSystemLedgerPresentation',- );- expect(monitoredSystemPresentationSource).toContain(- 'export function getMonitoredSystemCountingDetailsToggleLabel',- );- expect(monitoredSystemPresentationSource).toContain(- 'export function formatMonitoredSystemLatestIncludedSignalSentence',- );- expect(monitoredSystemPresentationSource).toContain(- 'export function getMonitoredSystemBriefSummary',- );- expect(monitoredSystemPresentationSource).toContain(- 'export function getMonitoredSystemDisclosureToggleLabel',- );- expect(tooltipSource).toContain('useTooltipState');- expect(tooltipSource).toContain('createTooltipSystemState');- expect(tooltipSource).not.toContain('createSignal');- expect(tooltipSource).not.toContain('requestAnimationFrame');- expect(tooltipSource).not.toContain('sanitizeTooltipContent');- expect(tooltipSource).not.toContain('resolveTooltipPosition');- expect(tooltipStateSource).toContain('createSignal');- expect(tooltipStateSource).toContain('requestAnimationFrame');- expect(tooltipStateSource).toContain('tooltipInstance');- expect(tooltipStateSource).toContain('resolveTooltipPosition');- expect(tooltipModelSource).toContain('sanitizeTooltipContent');- expect(tooltipModelSource).toContain('resolveTooltipPosition');- expect(dialogSource).toContain('useDialogState');- expect(dialogSource).toContain('getDialogViewportClass');- expect(dialogSource).toContain('getDialogAlignmentClass');- expect(dialogSource).toContain('getDialogPanelClass');- expect(dialogSource).not.toContain('createEffect');- expect(dialogSource).not.toContain('document.body.style.overflow');- expect(dialogSource).not.toContain('FOCUSABLE_SELECTOR');- expect(dialogStateSource).toContain('createEffect');- expect(dialogStateSource).toContain('onCleanup');- expect(dialogStateSource).toContain('document.body.style.overflow');- expect(dialogStateSource).toContain('getDialogFocusableElements');- expect(dialogModelSource).toContain('getDialogFocusableElements');- expect(dialogModelSource).toContain('getDialogViewportClass');- expect(dialogModelSource).toContain('getDialogAlignmentClass');- expect(dialogModelSource).toContain('getDialogPanelClass');- expect(historyChartSource).toContain('useHistoryChartState');- expect(historyChartSource).toContain('HistoryChartHeader');- expect(historyChartSource).toContain('HistoryChartOverlay');- expect(historyChartSource).toContain('HistoryChartTooltip');- expect(historyChartSource).not.toContain('ChartsAPI.getMetricsHistory');- expect(historyChartSource).not.toContain('calculateOptimalPoints');- expect(historyChartSource).not.toContain('setupCanvasDPR');- expect(historyChartSource).not.toContain('Collecting data... History will appear here.');- expect(historyChartSource).not.toContain('Unlock {chart.lockTierLabel()} Features');- expect(historyChartStateSource).toContain('ChartsAPI.getMetricsHistory');- expect(historyChartStateSource).toContain('calculateOptimalPoints');- expect(historyChartStateSource).toContain('setupCanvasDPR');- expect(historyChartStateSource).toContain('HISTORY_CHART_RANGES');- expect(historyChartModelSource).toContain('formatHistoryChartTooltipValue');- expect(historyChartModelSource).toContain('HISTORY_CHART_RANGES');- expect(historyChartModelSource).toContain('getHistoryChartScale');- expect(historyChartHeaderSource).toContain('formatHistoryChartTooltipValue');- expect(historyChartOverlaySource).toContain('No history samples in this time range.');- expect(historyChartOverlaySource).not.toContain('History will appear here.');- expect(historyChartOverlaySource).not.toContain('presentationPolicyHidesUpgradePrompts');- expect(historyChartOverlaySource).not.toContain(- 'Unlock {props.chart.lockTierLabel()} Features',- );- expect(historyChartOverlaySource).toContain('requires a higher license plan');- expect(historyChartTooltipSource).toContain('formatHistoryChartTooltipValue');- expect(containerUpdateBadgeSource).toContain('useContainerUpdateButtonState');- expect(containerUpdateBadgeSource).toContain('getUpdateButtonClass');- expect(containerUpdateBadgeSource).not.toContain('MonitoringAPI.updateDockerContainer');- expect(containerUpdateBadgeSource).not.toContain('markContainerQueued');- expect(containerUpdateButtonStateSource).toContain('ResourceActionsAPI.planAction');- expect(containerUpdateButtonStateSource).not.toContain('MonitoringAPI.updateDockerContainer');- expect(containerUpdateButtonStateSource).toContain('markContainerQueued');- expect(containerUpdateBadgeModelSource).toContain('getUpdateButtonClass');- expect(containerUpdateBadgeModelSource).toContain('getUpdateButtonTooltip');- expect(helpIconSource).toContain('useHelpIconState');- expect(helpIconSource).not.toContain('getHelpContent(');- expect(helpIconSource).not.toContain('requestAnimationFrame');- expect(helpIconStateSource).toContain('requestAnimationFrame');- expect(helpIconStateSource).toContain('document.addEventListener');- expect(helpIconModelSource).toContain('resolveHelpContent');- expect(helpIconModelSource).toContain('calculateHelpPopoverPosition');- expect(mobileNavBarSource).toContain('useMobileNavBarState');- expect(mobileNavBarSource).toContain('getMobileNavTabButtonClass');- expect(mobileNavBarSource).not.toContain('createSignal');- expect(mobileNavBarSource).not.toContain('requestAnimationFrame');- expect(mobileNavBarSource).not.toContain('new Set(priority)');- expect(mobileNavBarStateSource).toContain('createSignal');- expect(mobileNavBarStateSource).toContain('document.addEventListener');- expect(mobileNavBarStateSource).toContain('handleOverflowMenuKeyDown');- expect(mobileNavBarStateSource).not.toContain('scrollIntoView');- expect(mobileNavBarModelSource).toContain('buildMobileNavBarLayout');- expect(mobileNavBarModelSource).toContain('buildOrderedMobileNavPrimaryTabs');- expect(mobileNavBarModelSource).toContain('buildOrderedMobileNavUtilityTabs');- expect(mobileNavBarModelSource).toContain('getMobileNavAlertBadgeCounts');- expect(useUnifiedResourcesSource).not.toContain('normalizeResourcePolicyAISafeSummary(');- expect(useUnifiedResourcesSource).not.toContain('normalizeResourcePolicy(');- expect(useUnifiedResourcesSource).not.toContain('const resolvePolicySensitivity =');- expect(useUnifiedResourcesSource).not.toContain('const resolvePolicyRoutingScope =');- expect(useUnifiedResourcesSource).not.toContain('const resolvePolicyRedactionHints =');- expect(useUnifiedResourcesSource).not.toContain('const resolvePolicy =');- expect(resourceDetailMappersSource).toContain('titleCaseDelimitedLabel');- expect(resourceDetailMappersSource).not.toContain('export const toDiscoveryConfig');- expect(resourceDetailMappersSource).not.toContain('export const normalizeHealthLabel');- expect(resourceDetailMappersSource).not.toContain('export const healthToneClass');- expect(guestDrawerSource).toContain('useGuestDrawerState');- expect(guestDrawerStateSource).toContain('getWebInterfaceTargetLabelForWorkload');- expect(guestDrawerSource).not.toContain('const discoveryResourceType = () =>');- expect(guestDrawerSource).not.toContain('const urlTargetLabel = () =>');- expect(guestDrawerModelSource).toContain('export const getGuestDrawerBackupPresentation');- expect(workloadsUtilitySource).toContain('export const getWebInterfaceTargetLabelForWorkload');- expect(guestDrawerSource).not.toContain('Loading discovery...');- expect(resourceDetailDrawerSource).not.toContain('Loading discovery...');- expect(webInterfaceUrlFieldSource).toContain('useWebInterfaceUrlFieldState');- expect(webInterfaceUrlFieldSource).not.toContain('No suggested URL available');- expect(webInterfaceUrlFieldSource).not.toContain('GuestMetadataAPI.getMetadata');- expect(webInterfaceUrlFieldStateSource).toContain('GuestMetadataAPI.getMetadata');- expect(webInterfaceUrlFieldStateSource).toContain('AgentMetadataAPI.updateMetadata');- expect(infrastructureSettingsPresentationSource).toContain(- 'export function getNetworkDiscoveryPriorityNotice',- );- expect(infrastructureSettingsPresentationSource).toContain(- 'export function getNetworkDiscoverySectionPresentation',- );- expect(infrastructureSettingsPresentationSource).toContain(- 'export function getNetworkDiscoveryModePresentation',- );- expect(infrastructureSettingsPresentationSource).toContain(- 'export function getNetworkDiscoverySubnetPresentation',- );- expect(discoverySettingsFormSource).toContain('getNetworkDiscoveryPriorityNotice');- expect(discoverySettingsFormSource).toContain('getNetworkDiscoverySectionPresentation');- expect(discoverySettingsFormSource).toContain('getNetworkDiscoveryModePresentation');- expect(discoverySettingsFormSource).toContain('getNetworkDiscoverySubnetPresentation');- expect(discoverySettingsFormSource).toContain('getDiscoverySubnetRequiredMessage');- expect(discoverySettingsFormSource).toContain('getDiscoverySubnetInvalidFormatMessage');- expect(discoverySettingsFormSource).not.toContain('Configuration priority');- expect(discoverySettingsFormSource).not.toContain('Automatic scanning');- expect(discoverySettingsFormSource).not.toContain(- 'Discovery settings are locked by environment variables.',- );- expect(proxmoxMailGatewayDrawerSource).toContain('<PlatformDetailTable');- expect(proxmoxMailGatewayDrawerSource).toContain('<PlatformDetailTableHeader>');- expect(proxmoxMailGatewayDrawerSource).toContain('<PlatformDetailTableBody>');- expect(proxmoxMailGatewayDrawerSource).not.toMatch(/<Table(?:\s|>)/);- expect(proxmoxMailGatewayDrawerSource).not.toContain('PLATFORM_TABLE_HEADER_ROW_CLASS');- expect(proxmoxMailGatewayDrawerSource).not.toContain('PLATFORM_TABLE_BODY_CLASS');- expect(proxmoxMailGatewayDrawerSource).toContain('getPlatformTableHeadClassForKind');- expect(proxmoxMailGatewayDrawerSource).toContain('getPlatformTableCellClassForKind');- expect(proxmoxMailGatewayDrawerSource).not.toContain('divide-y divide-border-subtle');- expect(proxmoxMailGatewayDrawerSource).not.toContain('<div class="mt-2 overflow-x-auto">');- expect(proxmoxMailGatewayDrawerSource).not.toContain('Search domains...');- expect(proxmoxMailGatewayDrawerSource).not.toContain('Unknown host');- expect(proxmoxMailGatewayDrawerSource).not.toContain('Spam Distribution');- expect(proxmoxMailGatewayDrawerSource).not.toContain('No PMG details for this resource yet');- expect(proxmoxMailGatewayDrawerSource).not.toContain('Loading mail gateway details...');- expect(proxmoxMailGatewayDrawerSource).not.toContain('Failed to load PMG details');- expect(proxmoxSettingsModelSource).toContain(- 'export interface InfrastructurePlatformSettingsProps',- );- expect(infrastructureWorkspaceSource).toContain(- '@/components/Settings/infrastructureWorkspaceModel'.replace('@/components/Settings/', './'),- );- expect(infrastructureWorkspaceSource).not.toContain('inferViewFromPath');- expect(infrastructureWorkspaceModelSource).not.toContain(- 'export function deriveAddStepFromLegacyPath',- );- expect(infrastructureWorkspaceModelSource).toContain(- 'export function buildInfrastructureWorkspacePath',- );- expect(nodeModalModelSource).toContain('export const deriveNameFromHost =');- expect(nodeModalModelSource).toContain('export const PVE_MANUAL_PERMISSION_COMMAND = `');- expect(nodeModalStateSource).toContain('export const useNodeModalState =');- expect(nodeModalStateSource).toContain(- 'export type NodeModalState = ReturnType<typeof useNodeModalState>;',- );- expect(nodeModalStateSource).toContain('getNodeModalDefaultFormData');- expect(nodeModalStateSource).toContain('getNodeModalTestResultPresentation');- expect(nodeModalStateSource).toContain('buildNodeModalMonitoringPayload');- expect(nodeModalBasicInfoSectionSource).toContain('title="Basic information"');- expect(nodeModalBasicInfoSectionSource).toContain('getNodeEndpointPlaceholder');- expect(nodeModalBasicInfoSectionSource).toContain('getNodeGuestUrlPlaceholder');- expect(nodeModalAuthenticationSectionSource).toContain(- '@/components/Settings/NodeModalSetupGuideSection',- );- expect(nodeModalAuthenticationSectionSource).toContain('getNodeUsernamePlaceholder');- expect(nodeModalAuthenticationSectionSource).toContain('getNodeUsernameHelp');- expect(nodeModalAuthenticationSectionSource).toContain('getNodeTokenIdPlaceholder');- expect(nodeModalSetupGuideSectionSource).toContain('Connection Setup');- expect(nodeModalMonitoringSectionSource).toContain('title="Monitoring coverage"');- expect(nodeModalMonitoringSectionSource).toContain('getNodeMonitoringCoverageCopy');- expect(nodeModalMonitoringSectionSource).toContain('getTemperatureMonitoringLockedCopy');- expect(nodeModalStatusFooterSource).not.toContain('Start your free 14-day trial');- expect(nodeModalPresentationSource).toContain('export function getNodeModalDefaultFormData');- expect(nodeModalPresentationSource).toContain('export function getNodeProductName');- expect(nodeModalPresentationSource).toContain('export function getNodeEndpointPlaceholder');- expect(nodeModalPresentationSource).toContain('export function getNodeGuestUrlPlaceholder');- expect(nodeModalPresentationSource).toContain('export function getNodeUsernamePlaceholder');- expect(nodeModalPresentationSource).toContain('export function getNodeTokenIdPlaceholder');- expect(nodeModalPresentationSource).toContain('export function getNodeMonitoringCoverageCopy');- expect(nodeModalPresentationSource).toContain(- 'export function getTemperatureMonitoringLockedCopy',- );- expect(nodeModalPresentationSource).toContain(- 'export function getNodeModalTestResultPresentation',- );- expect(nodeModalPresentationSource).toContain(- 'export function buildNodeModalMonitoringPayload',- );- // Canonical Ceph presentation helpers still live in storageDomain and- // are consumed by ProxmoxCephTable / ProxmoxCephClusterDrawer now that- // the standalone /ceph page has been retired.- expect(storageDomainSource).toContain('export const getCephServiceStatusPresentation');- expect(storageDomainSource).toContain('export const getCephLoadingStatePresentation');- expect(storageDomainSource).toContain('export const getCephDisconnectedStatePresentation');- expect(storageDomainSource).toContain('export const getCephNoClustersStatePresentation');- expect(storageDomainSource).toContain('export const getCephPoolsSearchEmptyStatePresentation');- expect(alertHistoryTableSectionSource).toContain('AlertHistoryTableGroupRow');- expect(alertHistoryTableSectionSource).toContain('AlertHistoryTableAlertRow');- expect(alertHistoryTableAlertRowSource).toContain('getAlertHistoryStatusPresentation');- expect(alertHistoryTableAlertRowSource).toContain('getAlertIncidentLevelBadgeClass');- expect(alertsPageSource).toContain(- "import { AlertsConfigurationSurface } from '@/features/alerts/AlertsConfigurationSurface';",- );- expect(alertsPageSource).not.toContain('getAlertDestinationsConfigLoadError');- expect(alertsConfigurationSurfaceSource).toContain('useAlertsConfigurationState');- expect(alertsConfigurationSurfaceSource).not.toContain('AlertsAPI.getConfig');- expect(alertsConfigurationStateSource).toContain('AlertsAPI.getConfig');- expect(alertsConfigurationStateSource).toContain('createDefaultAlertsConfigurationSnapshot');- expect(alertsConfigurationStateSource).toContain('readAlertsConfigurationSnapshot');- expect(alertsConfigurationStateSource).toContain('buildAlertsConfigurationPayload');- expect(alertsConfigurationStateSource).toContain('useAlertDestinationsState');- expect(alertsConfigurationStateSource).toContain('useAlertsConfigurationSnapshotState');- expect(alertsConfigurationStateSource).toContain('useAlertOverridesState');- expect(alertsConfigurationStateSource).not.toContain('NotificationsAPI.getEmailConfig');- expect(alertsConfigurationStateSource).not.toContain('NotificationsAPI.updateEmailConfig');- expect(alertsConfigurationStateSource).toContain("eventBus.on('org_switched'");- expect(alertsConfigurationStateSource).not.toContain('const createHysteresisThreshold =');- expect(alertsConfigurationStateSource).not.toContain('const normalizeGap =');- expect(alertsConfigurationStateSource).not.toContain(- 'const [rawOverridesConfig, setRawOverridesConfig] = createSignal',- );- expect(alertsConfigurationStateSource).not.toContain(- 'const [scheduleQuietHours, setScheduleQuietHours] = createSignal',- );- expect(alertsConfigurationStateSource).not.toContain('const hostOverrideIdCandidates =');- expect(alertsConfigurationStateSource).not.toContain('const allGuests = createMemo');- expect(alertsConfigurationSnapshotStateSource).toContain(- 'export function useAlertsConfigurationSnapshotState',- );- expect(alertsConfigurationSnapshotStateSource).toContain(- 'const [scheduleQuietHours, setScheduleQuietHours] = createSignal',- );- expect(alertsConfigurationSnapshotStateSource).toContain('applyConfigurationSnapshot');- expect(alertsConfigurationSnapshotStateSource).toContain('captureConfigurationSnapshot');- expect(alertsConfigurationSnapshotStateSource).toContain('resetGuestDefaults');- expect(alertsConfigurationSnapshotStateSource).toContain('FACTORY_GUEST_DEFAULTS');- expect(alertsConfigurationModelSource).toContain(- 'export function createDefaultAlertsConfigurationSnapshot',- );- expect(alertsConfigurationModelSource).toContain(- 'export function readAlertsConfigurationSnapshot',- );- expect(alertsConfigurationModelSource).toContain(- 'export function buildAlertsConfigurationPayload',- );- expect(alertsConfigurationModelSource).toContain('const createHysteresisThreshold =');- expect(alertsConfigurationModelSource).toContain('const normalizeGap =');- expect(alertOverridesStateSource).toContain('export function useAlertOverridesState');- expect(alertOverridesStateSource).toContain('pbsInstanceFromResource');- expect(alertOverridesStateSource).toContain('buildProjectedOverrides');- expect(alertOverridesStateSource).not.toContain('getActionableAgentIdFromResource');- expect(alertOverridesStateSource).not.toContain('const hostOverrideIdCandidates =');- expect(alertOverridesStateSource).toContain('props.setOverviewOverrides(overrides())');- expect(alertOverridesModelSource).toContain('export const normalizeRawOverridesConfig =');- expect(alertOverridesModelSource).toContain('export const hostOverrideIdCandidates =');- expect(alertOverridesModelSource).toContain('export const dockerHostOverrideIdCandidates =');- expect(alertOverridesModelSource).toContain('export const buildProjectedOverrides =');- expect(alertOverridesModelSource).toContain('getActionableAgentIdFromResource');- expect(alertDestinationsStateSource).toContain('getAlertDestinationsConfigLoadError');- expect(alertDestinationsStateSource).toContain('NotificationsAPI.getEmailConfig');- expect(alertDestinationsStateSource).toContain('NotificationsAPI.updateEmailConfig');- expect(alertDestinationsStateSource).toContain('buildEmailConfigPayload');- expect(alertDestinationsStateSource).toContain('buildAppriseConfigPayload');- expect(alertDestinationsStateSource).toContain('normalizeAppriseConfig');- expect(alertDestinationsStateSource).not.toContain('formatAppriseTargets');- expect(alertDestinationsStateSource).not.toContain('parseAppriseTargets');- expect(alertDestinationsModelSource).toContain('export function normalizeAppriseConfig');- expect(alertDestinationsModelSource).toContain('export function buildEmailConfigPayload');- expect(alertDestinationsModelSource).toContain('export function buildAppriseConfigPayload');- expect(alertDestinationsModelSource).toContain('formatAppriseTargets');- expect(alertDestinationsModelSource).toContain('parseAppriseTargets');- expect(alertDestinationsTabStateSource).toContain(- 'export function useAlertDestinationsTabState',- );- expect(alertDestinationsTabStateSource).toContain('NotificationsAPI.testNotification');- expect(alertDestinationsTabStateSource).toContain('useAlertWebhookDestinationsState');- expect(alertDestinationsTabStateSource).not.toContain('NotificationsAPI.getWebhooks');- expect(alertDestinationsTabStateSource).not.toContain('NotificationsAPI.createWebhook');- expect(alertWebhookDestinationsStateSource).toContain(- 'export function useAlertWebhookDestinationsState',- );- expect(alertWebhookDestinationsStateSource).toContain('NotificationsAPI.getWebhooks');- expect(alertWebhookDestinationsStateSource).toContain('NotificationsAPI.createWebhook');- expect(alertWebhookDestinationsStateSource).toContain('getAlertDestinationsWebhookLoadError');- expect(alertDestinationsTabSource).toContain('useAlertDestinationsTabState');- expect(alertDestinationsTabSource).toContain('AlertDestinationsLoadingState');- expect(alertDestinationsTabSource).toContain('AlertDestinationsLoadErrorCard');- expect(alertDestinationsTabSource).toContain('AlertEmailDestinationsSection');- expect(alertDestinationsTabSource).toContain('AlertAppriseDestinationsSection');- expect(alertDestinationsTabSource).toContain('AlertWebhookDestinationsSection');- expect(alertDestinationsTabSource).not.toContain('NotificationsAPI.getWebhooks');- expect(alertDestinationsTabSource).not.toContain('NotificationsAPI.testNotification');- expect(alertDestinationsTabSource).not.toContain('NotificationsAPI.createWebhook');- expect(alertDestinationsTabSource).not.toContain('ALERT_DESTINATIONS_EMAIL_PANEL_TITLE');- expect(alertDestinationsTabSource).not.toContain('ALERT_DESTINATIONS_APPRISE_PANEL_TITLE');- expect(alertDestinationsTabSource).not.toContain('getAlertWebhooksSectionTitle');- expect(alertsPageSource).toContain(- "import { HistoryTab } from '@/features/alerts/tabs/HistoryTab';",- );- expect(alertsPageSource).not.toContain('function HistoryTab(');- expect(alertOverviewActiveAlertsSectionSource).toContain('AlertOverviewStatsCards');- expect(alertOverviewTabSource).toContain('AlertOverviewActiveAlertsSection');- expect(alertOverviewTabSource).toContain('useAlertIncidentTimelineState');- expect(alertHistoryTabSource).toContain('useAlertHistoryState');- expect(alertHistoryTabSource).toContain('AlertHistoryFrequencyCard');- expect(alertHistoryTabSource).toContain('AlertHistoryFiltersCard');- expect(alertHistoryTabSource).toContain('AlertHistoryTableSection');- expect(alertHistoryTabSource).toContain('AlertHistoryAdministrationCard');- expect(alertsPageSource).toContain('getAlertsPageHeaderMeta');- // The resource incidents panel mounts under the row that asked for it, not- // as a page-level sibling here: at page level it opened far above a reader- // scrolled into the history, so the row button read as inert (#1687).- expect(alertHistoryTabSource).not.toContain('AlertResourceIncidentsPanel');- expect(alertHistoryTabSource).not.toContain('useAlertIncidentTimelineState');- expect(alertHistoryTabSource).not.toContain('AlertsAPI.getHistory');- expect(alertHistoryTabSource).not.toContain('AlertsAPI.getIncidentsForResource');- expect(alertHistoryTabSource).not.toContain('AlertsAPI.clearHistory');- expect(alertHistoryTabSource).not.toContain('AlertsAPI.getIncidentTimeline');- expect(alertHistoryTabSource).not.toContain('AlertsAPI.addIncidentNote');- expect(alertHistoryTabSource).not.toContain('usePersistentSignal(');- expect(alertsPageSource).toContain('getAlertActivationPresentation');- expect(alertsPageSource).toContain('getAlertActivationSuccess');- expect(alertsPageSource).toContain('getAlertActivationFailure');- expect(alertsPageSource).toContain('getAlertDeactivationSuccess');- expect(alertsPageSource).toContain('getAlertDeactivationFailure');- expect(alertHistoryFrequencyCardSource).toContain('getAlertFrequencySelectionPresentation');- expect(alertHistoryFrequencyCardSource).toContain('getAlertFrequencyClearFilterButtonClass');- expect(alertHistoryFrequencyCardSource).toContain('getAlertSeverityDotClass');- expect(alertHistoryFrequencyCardSource).toContain('getAlertBucketCountLabel');- expect(alertHistoryFiltersCardSource).toContain('getAlertHistorySearchPlaceholder');- expect(alertResourceIncidentsPanelSource).toContain('IncidentEventFilters');- expect(alertResourceIncidentsPanelSource).toContain('IncidentTimelineEventCard');- expect(alertResourceIncidentsPanelSource).toContain('getAlertResourceIncidentCardClass');- expect(alertResourceIncidentsPanelSource).toContain('getAlertResourceIncidentSummaryRowClass');- expect(alertResourceIncidentsPanelSource).toContain(- 'getAlertResourceIncidentToggleButtonClass',- );- expect(alertResourceIncidentsPanelSource).toContain(- 'getAlertResourceIncidentTruncatedEventsLabel',- );- expect(alertResourceIncidentsPanelSource).not.toContain(- 'getAlertIncidentTimelineEventCardClass',- );- expect(alertResourceIncidentsPanelSource).not.toContain('getAlertIncidentTimelineDetailClass');- expect(alertResourceIncidentsPanelSource).not.toContain('getAlertIncidentTimelineCommandClass');- expect(alertHistoryTableSectionSource).toContain('AlertHistoryTableGroupRow');- expect(alertHistoryTableSectionSource).toContain('AlertHistoryTableAlertRow');- expect(alertHistoryTableSectionSource).toContain('getAlertHistoryEmptyState');- expect(alertHistoryTableSectionSource).toContain('getAlertHistoryLoadingState');- expect(alertHistoryTableSectionSource).not.toContain('IncidentTimelinePanel');- expect(alertHistoryTableSectionSource).not.toContain('InvestigateAlertButton');- expect(alertHistoryTableGroupRowSource).toContain('getGroupSummaryLabel');- expect(alertHistoryTableAlertRowSource).toContain('getAlertHistoryStatusPresentation');- expect(alertHistoryTableAlertRowSource).toContain('getAlertHistoryResourceTypeBadgeClass');- expect(alertHistoryTableAlertRowSource).toContain('IncidentTimelinePanel');- expect(alertHistoryTableAlertRowSource).toContain('AlertHistoryItemActions');- expect(alertHistoryTableAlertRowSource).toContain('AlertResourceIncidentsPanel');- // Several alerts can share one resource, so the row renders the panel only- // when it owns the open request. That keeps exactly one panel open.- expect(alertHistoryTableAlertRowSource).toContain(- 'props.state.resourceIncidentPanel()?.rowKey === rowKey()',- );- expect(alertHistoryItemActionsSource).toContain('InvestigateAlertButton');- expect(alertHistoryAdministrationCardSource).toContain('getAlertAdministrationSectionTitle');- expect(alertHistoryAdministrationCardSource).toContain(- 'getAlertAdministrationSectionDescription',- );- expect(alertHistoryAdministrationCardSource).toContain(- 'getAlertAdministrationClearHistoryLabel',- );- expect(alertHistoryStateSource).toContain('export function useAlertHistoryState');- expect(alertHistoryStateSource).toContain('export type AlertHistoryState');- expect(alertHistoryStateSource).toContain('AlertsAPI.getHistory');- expect(alertHistoryStateSource).toContain('AlertsAPI.clearHistory');- expect(alertHistoryStateSource).toContain('useAlertResourceIncidentsState');- expect(alertHistoryStateSource).toContain('useAlertIncidentTimelineState');- expect(alertHistoryStateSource).not.toContain('AlertsAPI.getIncidentsForResource');- expect(alertHistoryStateSource).toContain('buildAlertHistoryItems');- expect(alertHistoryStateSource).toContain('buildAlertTrends');- expect(alertHistoryStateSource).toContain('groupAlertHistoryItems');- expect(alertHistoryStateSource).not.toContain('const formatDuration =');- expect(alertHistoryStateSource).not.toContain('const formatBucketRange =');- expect(alertHistoryStateSource).not.toContain('const formatAxisTickLabel =');- expect(alertHistoryStateSource).not.toContain('const monthNames = [');- expect(alertHistoryModelSource).toContain('export function buildAlertHistoryItems');- expect(alertHistoryModelSource).toContain('export function buildAlertTrends');- expect(alertHistoryModelSource).toContain('export function groupAlertHistoryItems');- expect(alertHistoryModelSource).toContain('export const MS_PER_HOUR');- expect(alertResourceIncidentsStateSource).toContain(- 'export function useAlertResourceIncidentsState',- );- expect(alertResourceIncidentsStateSource).toContain('AlertsAPI.getIncidentsForResource');- expect(alertsPageSource).toContain('getAlertsSidebarTabClass');- expect(alertsPageSource).toContain('getAlertsMobileTabClass');- expect(alertsPageSource).toContain('getAlertsTabTitle');- expect(alertsPageSource).toContain('getAlertsTabGroups');- expect(alertsConfigurationSurfaceSource).toContain(- "import { ThresholdsTab } from './tabs/ThresholdsTab';",- );- expect(alertsPageSource).not.toContain(- "import { ThresholdsTab } from '@/features/alerts/tabs/ThresholdsTab';",- );- expect(alertsPageSource).not.toContain(- "import { ThresholdsTable } from '@/components/Alerts/ThresholdsTable';",- );- expect(alertsPageSource).not.toContain('function ThresholdsTab(');- expect(alertThresholdsTabSource).toContain(- "import { ThresholdsTable } from '@/components/Alerts/ThresholdsTable';",- );- expect(alertThresholdsTabSource).not.toContain('buildThresholdsTableProps');- expect(alertThresholdsTabSource).toContain('pmgThresholds={props.pmgThresholds}');- expect(alertThresholdsTabSource).toContain('guestDefaults={props.guestDefaults()}');- expect(thresholdsTabModelSource).toContain('export interface ThresholdsTabProps');- expect(thresholdsTabModelSource).not.toContain('export function buildThresholdsTableProps');- expect(thresholdsTabModelSource).toContain(- "guestDefaults: Accessor<ThresholdsTableProps['guestDefaults']>",- );- expect(thresholdsTabModelSource).not.toContain('hasUnsavedChanges');- expect(thresholdsTableSource).toContain(- "import { useThresholdsTableState } from '@/features/alerts/thresholds/hooks/useThresholdsTableState';",- );- expect(thresholdsTableSource).toContain(- "import { ThresholdsTableProxmoxTab } from './ThresholdsTableProxmoxTab';",- );- expect(thresholdsTableSource).not.toContain('ThresholdsTablePMGTab');- expect(thresholdsTableSource).not.toContain('ThresholdsTablePBSTab');- expect(thresholdsTableSource).toContain(- "import { ThresholdsTableAgentsTab } from './ThresholdsTableAgentsTab';",- );- expect(thresholdsTableSource).toContain(- "import { ThresholdsTableDockerTab } from './ThresholdsTableDockerTab';",- );- expect(thresholdsTableSource).not.toContain('const [searchTerm, setSearchTerm] = createSignal');- expect(thresholdsTableSource).not.toContain('const handleTabClick =');- expect(thresholdsTableSource).not.toContain('groupedResources={state.guestsGroupedByNode()}');- expect(thresholdsTableSource).not.toContain('dockerIgnoredPrefixesPresentation.title');- expect(thresholdsTableProxmoxTabSource).toContain('export function ThresholdsTableProxmoxTab');- expect(thresholdsTableProxmoxTabSource).toContain('ThresholdsTableProxmoxNodesSection');- expect(thresholdsTableProxmoxTabSource).toContain('ThresholdsTableProxmoxPBSSection');- expect(thresholdsTableProxmoxTabSource).toContain('ThresholdsTableProxmoxGuestsSection');- expect(thresholdsTableProxmoxTabSource).toContain(- 'ThresholdsTableProxmoxGuestFilteringSection',- );- expect(thresholdsTableProxmoxTabSource).toContain('ThresholdsTableProxmoxBackupsSection');- expect(thresholdsTableProxmoxTabSource).toContain('ThresholdsTableProxmoxSnapshotsSection');- expect(thresholdsTableProxmoxTabSource).toContain('ThresholdsTableProxmoxStorageSection');- expect(thresholdsTableProxmoxTabSource).toContain('ThresholdsTableProxmoxPMGSection');- expect(thresholdsTableProxmoxTabSource).not.toContain('backupOrphanedPresentation');- expect(thresholdsTableProxmoxPMGSectionSource).toContain(- 'export function ThresholdsTableProxmoxPMGSection',- );- expect(thresholdsTableProxmoxPMGSectionSource).toContain('pmgGlobalDefaults()');- expect(thresholdsTableAgentsTabSource).toContain('export function ThresholdsTableAgentsTab');- expect(thresholdsTableAgentsTabSource).toContain('ThresholdsTableAgentsResourcesSection');- expect(thresholdsTableAgentsTabSource).toContain('ThresholdsTableAgentDisksSection');- expect(thresholdsTableAgentsTabSource).not.toContain('agentDisksGroupedByAgent()');- expect(thresholdsTableAgentsResourcesSectionSource).toContain(- 'export function ThresholdsTableAgentsResourcesSection',- );- expect(thresholdsTableAgentDisksSectionSource).toContain(- 'export function ThresholdsTableAgentDisksSection',- );- expect(thresholdsTableAgentDisksSectionSource).toContain('agentDisksGroupedByAgent()');- expect(thresholdsTableDockerTabSource).toContain('export function ThresholdsTableDockerTab');- expect(thresholdsTableDockerTabSource).toContain('ThresholdsTableDockerIgnoredPrefixesSection');- expect(thresholdsTableDockerTabSource).toContain('ThresholdsTableDockerServiceGapSection');- expect(thresholdsTableDockerTabSource).toContain('ThresholdsTableDockerHostsSection');- expect(thresholdsTableDockerTabSource).toContain('ThresholdsTableDockerContainersSection');- expect(thresholdsTableDockerTabSource).not.toContain('dockerIgnoredPrefixesPresentation.title');- expect(thresholdsTableDockerTabSource).not.toContain('serviceGapValidationMessage()');- expect(thresholdsTableDockerIgnoredPrefixesSectionSource).toContain(- 'export function ThresholdsTableDockerIgnoredPrefixesSection',- );- expect(thresholdsTableDockerIgnoredPrefixesSectionSource).toContain(- 'dockerIgnoredPrefixesPresentation.title',- );- expect(thresholdsTableDockerServiceGapSectionSource).toContain(- 'export function ThresholdsTableDockerServiceGapSection',- );- expect(thresholdsTableDockerServiceGapSectionSource).toContain('serviceGapValidationMessage()');- expect(thresholdsTableDockerHostsSectionSource).toContain(- 'export function ThresholdsTableDockerHostsSection',- );- expect(thresholdsTableDockerContainersSectionSource).toContain(- 'export function ThresholdsTableDockerContainersSection',- );- expect(thresholdsTableSectionPropsSource).toContain(- 'export interface ThresholdsTableSectionProps',- );- expect(thresholdsTableProxmoxNodesSectionSource).toContain(- 'export function ThresholdsTableProxmoxNodesSection',- );- expect(thresholdsTableProxmoxPBSSectionSource).toContain(- 'export function ThresholdsTableProxmoxPBSSection',- );- expect(thresholdsTableProxmoxGuestsSectionSource).toContain(- 'export function ThresholdsTableProxmoxGuestsSection',- );- expect(thresholdsTableProxmoxGuestFilteringSectionSource).toContain(- 'export function ThresholdsTableProxmoxGuestFilteringSection',- );- expect(thresholdsTableProxmoxBackupsSectionSource).toContain(- 'export function ThresholdsTableProxmoxBackupsSection',- );- expect(thresholdsTableProxmoxBackupsSectionSource).toContain('backupOrphanedPresentation');- expect(thresholdsTableProxmoxSnapshotsSectionSource).toContain(- 'export function ThresholdsTableProxmoxSnapshotsSection',- );- expect(thresholdsTableProxmoxStorageSectionSource).toContain(- 'export function ThresholdsTableProxmoxStorageSection',- );- expect(thresholdsDataHookSource).toContain('export function useThresholdsData');- expect(thresholdsDataHookSource).toContain('useThresholdsHostData(inputs)');- expect(thresholdsDataHookSource).toContain('useThresholdsDockerData(inputs)');- expect(thresholdsDataHookSource).toContain('useThresholdsGuestData(inputs)');- expect(thresholdsDataHookSource).toContain('useThresholdsInfrastructureData(inputs)');- expect(thresholdsDataHookSource).not.toContain('const hostOverrideIdCandidates =');- expect(thresholdsDataHookSource).not.toContain(- 'const dockerContainersGroupedByHost = createMemo',- );- expect(thresholdsHostDataHookSource).toContain('export function useThresholdsHostData');- expect(thresholdsDockerDataHookSource).toContain('export function useThresholdsDockerData');- expect(thresholdsGuestDataHookSource).toContain('export function useThresholdsGuestData');- expect(thresholdsInfrastructureDataHookSource).toContain(- 'export function useThresholdsInfrastructureData',- );- expect(thresholdsResourceModelSource).toContain('export function hostOverrideIdCandidates');- expect(thresholdsResourceModelSource).toContain('export function buildNodeHeaderMeta');- expect(thresholdsResourceModelSource).toContain('export const normalizeStorageStatus');- expect(thresholdsTableStateHookSource).toContain('export function useThresholdsTableState');- expect(thresholdsTableStateHookSource).toContain('useCollapsedSections()');- expect(thresholdsTableStateHookSource).toContain(- 'useThresholdsData(props, editingId, searchTerm)',- );- expect(thresholdsTableStateHookSource).toContain('useThresholdsRecoveryDefaultsState(props)');- expect(thresholdsTableStateHookSource).toContain('useThresholdsOverrideMutations');- expect(thresholdsTableStateHookSource).toContain('useThresholdsAvailabilityMutations');- expect(thresholdsTableStateHookSource).not.toContain(- 'const saveEdit = (resourceId: string) => {',- );- expect(thresholdsTableStateHookSource).not.toContain(- 'const toggleNodeConnectivity = (resourceId: string, forceState?: boolean) => {',- );- expect(thresholdsDataHookSource).not.toContain('const sanitizeSnapshotConfig =');- expect(thresholdsDataHookSource).not.toContain('const sanitizeBackupConfig =');- expect(thresholdsRecoveryDefaultsStateHookSource).toContain(- 'export function useThresholdsRecoveryDefaultsState',- );- expect(thresholdsRecoveryDefaultsStateHookSource).toContain('const sanitizeSnapshotConfig =');- expect(thresholdsRecoveryDefaultsStateHookSource).toContain('const sanitizeBackupConfig =');- expect(thresholdsOverrideMutationsHookSource).toContain(- 'export function useThresholdsOverrideMutations',- );- expect(thresholdsOverrideMutationsHookSource).toContain(- 'const saveEdit = (resourceId: string) => {',- );- expect(thresholdsOverrideMutationsHookSource).toContain(- 'const handleSaveBulkEdit = (thresholds: Record<string, number | undefined>) => {',- );- expect(thresholdsOverrideMutationsHookSource).not.toContain('matchesAlertIdentifier');- expect(thresholdsOverrideMutationsHookSource).not.toContain(- 'const toggleNodeConnectivity = (resourceId: string, forceState?: boolean) => {',- );- expect(thresholdsAvailabilityMutationsHookSource).toContain(- 'export function useThresholdsAvailabilityMutations',- );- expect(thresholdsAvailabilityMutationsHookSource).toContain('matchesAlertIdentifier');- expect(thresholdsAvailabilityMutationsHookSource).toContain(- 'const toggleNodeConnectivity = (resourceId: string, forceState?: boolean) => {',- );- expect(thresholdsAvailabilityMutationsHookSource).toContain(- 'const setOfflineState = (resourceId: string, state: OfflineState) => {',- );- expect(thresholdsOverrideMutationModelSource).toContain('export const upsertOverride =');- expect(thresholdsOverrideMutationModelSource).toContain('export const withThresholdEntries =');- expect(thresholdsOverrideMutationModelSource).toContain('export const stripStateKeys =');- expect(alertsPageSource).not.toContain('getAlertConfigUnsavedChangesLabel');- expect(alertsConfigurationSurfaceSource).toContain('getAlertConfigUnsavedChangesLabel');- expect(alertsConfigurationSurfaceSource).toContain('getAlertConfigSaveChangesLabel');- expect(alertsConfigurationSurfaceSource).toContain('getAlertConfigDiscardLabel');- expect(alertsConfigurationStateSource).toContain('getAlertConfigDiscardedSuccess');- expect(alertsConfigurationStateSource).toContain('getAlertConfigReloadFailure');- expect(alertsPageSource).toContain('getAlertConfigLeaveConfirmation');- expect(alertScheduleTabSource).toContain('getAlertConfigResetDefaultsLabel');- expect(alertScheduleTabSource).toContain('getAlertConfigResetDefaultsTitle');- expect(alertScheduleTabSource).toContain('getAlertConfigQuietHourSuppressOptions');- expect(alertScheduleTabSource).toContain('AlertQuietHoursSection');- expect(alertScheduleTabSource).toContain('AlertCooldownSection');- expect(alertScheduleTabSource).toContain('AlertGroupingSection');- expect(alertScheduleTabSource).toContain('AlertRecoverySection');- expect(alertScheduleTabSource).toContain('AlertEscalationSection');- expect(alertScheduleTabSource).toContain('AlertScheduleSummarySection');- expect(alertScheduleTabSource).not.toContain('ALERT_CONFIG_COOLDOWN_PERIOD_LABEL');- expect(alertScheduleTabSource).not.toContain('ALERT_CONFIG_COOLDOWN_MAX_ALERTS_LABEL');- expect(alertScheduleTabSource).not.toContain('ALERT_CONFIG_GROUPING_WINDOW_LABEL');- expect(alertScheduleTabSource).not.toContain('ALERT_CONFIG_GROUPING_STRATEGY_LABEL');- expect(alertsPageSource).not.toContain('const statusClasses =');- expect(alertsPageSource).not.toContain('const levelClasses =');- expect(alertsPageSource).not.toContain("alert.source === 'ai' ? 'Patrol' : 'Alert'");- expect(alertsPageSource).not.toContain("alert.resourceType === 'VM'");- expect(alertsPageSource).not.toContain(- "isAlertsActive() ? 'text-green-600 dark:text-green-400' : 'text-muted'",- );- expect(alertsPageSource).not.toContain("isAlertsActive() ? 'bg-blue-600' : 'bg-surface-hover'");- expect(alertsPageSource).not.toContain(- 'Failed to load notification configuration. Your existing settings could not be retrieved.',- );- expect(alertsPageSource).not.toContain('Failed to load webhook configuration.');- expect(alertsPageSource).not.toContain(- 'Saving now may overwrite your existing settings with defaults.',- );- expect(alertsPageSource).not.toContain('Configure SMTP delivery for alert emails.');- expect(alertsPageSource).not.toContain(- 'Relay grouped alerts through Apprise via CLI or remote API.',- );- expect(alertsPageSource).not.toContain(- 'Choose how Pulse should execute Apprise notifications.',- );- expect(alertsPageSource).not.toContain(- 'Enter one Apprise URL per line. Commas are also supported. For Telegram forum topics, append :topic to the chat ID.',- );- expect(alertsPageSource).not.toContain(- 'Optional: override the URLs defined on your Apprise API instance. Leave blank to use the server defaults.',- );- expect(alertsPageSource).not.toContain('Enable Apprise notifications before sending a test.');- expect(alertsPageSource).not.toContain('Add at least one Apprise target to test CLI delivery.');- expect(alertsPageSource).not.toContain('Enter an Apprise API server URL to test API delivery.');- expect(alertsPageSource).not.toContain('Test email sent successfully! Check your inbox.');- expect(alertsPageSource).not.toContain('Failed to send test email');- expect(alertsPageSource).not.toContain('Test Apprise notification sent successfully!');- expect(alertsPageSource).not.toContain('Failed to send test notification');- expect(alertsPageSource).not.toContain('Test webhook sent successfully!');- expect(alertsPageSource).not.toContain('Failed to send test webhook');- expect(alertsPageSource).not.toContain(- 'Enable only when the Apprise API uses a self-signed certificate.',- );- expect(alertsPageSource).not.toContain("isAlertsActive() ? 'translate-x-5' : 'translate-x-0'");- expect(alertsPageSource).not.toContain(- 'inline-flex items-center gap-2 rounded-full border border-blue-200',- );- expect(alertsPageSource).not.toContain('class="px-2 py-0.5 text-xs bg-blue-100');- expect(alertsPageSource).not.toContain('class="h-2 w-2 rounded-full bg-yellow-500"');- expect(alertsPageSource).not.toContain('class="h-2 w-2 rounded-full bg-red-500"');- expect(alertsPageSource).not.toContain(- "areAlertsDisabled()\n ? 'cursor-not-allowed text-muted bg-surface-alt'",- );- expect(alertsPageSource).not.toContain(- "activeTab() === item.id\n ? 'bg-blue-50 text-blue-600 dark:bg-blue-900/25 dark:text-blue-200'",- );- expect(alertsPageSource).not.toContain(- "activeTab() === tab.id\n ? 'bg-surface text-base-content shadow-xs'",- );- expect(alertsPageSource).not.toContain(- "grouping().byNode\n ? 'border-blue-500 bg-blue-50 shadow-xs dark:bg-blue-900/25'",- );- expect(alertsPageSource).not.toContain(- "grouping().byGuest\n ? 'border-blue-500 bg-blue-50 shadow-xs dark:bg-blue-900/25'",- );- expect(alertsPageSource).not.toContain(- "grouping().byNode ? 'border-blue-500 bg-blue-500' : 'border-border'",- );- expect(alertsPageSource).not.toContain(- "grouping().byGuest ? 'border-blue-500 bg-blue-500' : 'border-border'",- );- expect(alertsPageSource).not.toContain(- "quietHours().days[day.id] ? 'rounded-md bg-blue-500 text-white shadow-xs' : 'rounded-md text-muted hover:bg-surface-hover '",- );- expect(alertsPageSource).not.toContain(- "quietHours().suppress[option.key]\n ? 'border-blue-500 bg-blue-50 dark:border-blue-400 dark:bg-blue-500'",- );- expect(alertsPageSource).not.toContain(- "quietHours().suppress[option.key]\n ? 'border-blue-500 bg-blue-500'",- );- expect(alertsPageSource).not.toContain('Search alerts...');- expect(alertsPageSource).not.toContain('No alerts found');- expect(alertsPageSource).not.toContain('No alerts');- expect(alertsPageSource).not.toContain('Try adjusting your filters or check back later');- expect(alertsPageSource).not.toContain('Resource incidents');- expect(alertsPageSource).not.toContain('Loading incidents...');- expect(alertsPageSource).not.toContain('No incidents recorded for this resource yet.');- expect(alertsPageSource).not.toContain('Refreshing...');- expect(alertsPageSource).not.toContain('Acknowledged by ');- expect(alertsPageSource).not.toContain('No events match the selected filters.');- expect(alertsPageSource).not.toContain('Showing last ');- expect(alertsPageSource).not.toContain(- 'You have unsaved changes that will be lost. Discard changes and leave?',- );- expect(alertsPageSource).not.toContain(- "Alerts activated! You'll now receive alerts when issues are detected.",- );- expect(alertsPageSource).not.toContain('Unable to activate alerts. Please try again.');- expect(alertsPageSource).not.toContain(- 'Alerts deactivated. Nothing will be sent until you activate them again.',- );- expect(alertsPageSource).not.toContain('Unable to deactivate alerts. Please try again.');- expect(alertsPageSource).not.toContain('Changes discarded');- expect(alertsPageSource).not.toContain('Failed to reload configuration');- expect(alertsPageSource).not.toContain('• Quiet hours active from ');- expect(alertsPageSource).not.toContain('• Suppressing ');- expect(alertsPageSource).not.toContain('• Recovery notifications enabled when alerts clear');- expect(alertsPageSource).not.toContain('CPU, memory, disk, and network thresholds stay quiet.');- expect(alertsPageSource).not.toContain('Silence storage usage, disk health, and ZFS events.');- expect(alertsPageSource).not.toContain(- 'Skip connectivity and powered-off alerts during backups.',- );- expect(alertsPageSource).not.toContain('Minimum time between alerts for the same issue');- expect(alertsPageSource).not.toContain('Per guest/metric combination');- expect(alertsPageSource).not.toContain(- 'Alerts within this window are grouped together. Set to 0 to send immediately.',- );- expect(alertsPageSource).not.toContain('Pause non-critical alerts during specific times.');- expect(alertsPageSource).not.toContain('Start time');- expect(alertsPageSource).not.toContain('End time');- expect(alertsPageSource).not.toContain('Timezone');- expect(alertsPageSource).not.toContain('Discarding...');- expect(alertsPageSource).not.toContain('Add a note for this incident...');- expect(alertsPageSource).not.toContain('Save Note');- expect(alertsPageSource).not.toContain('Loading alert history...');- expect(alertsPageSource).not.toContain("title: 'Alerts Overview'");- expect(alertsPageSource).not.toContain("title: 'Alert Thresholds'");- expect(alertsPageSource).not.toContain("title: 'Notification Destinations'");- expect(alertsPageSource).not.toContain("title: 'Maintenance Schedule'");- expect(alertsPageSource).not.toContain("title: 'Alert History'");- expect(alertsPageSource).not.toContain("title: 'Alerts'");- expect(alertsPageSource).not.toContain("description: 'Manage alerting configuration.'");- expect(alertsPageSource).not.toContain('Administrative Actions');- expect(alertsPageSource).not.toContain("label: 'Status'");- expect(alertsPageSource).not.toContain("label: 'Configuration'");- expect(alertsPageSource).not.toContain("label: 'Overview'");- expect(alertsPageSource).not.toContain("label: 'History'");- expect(alertsPageSource).not.toContain("label: 'Thresholds'");- expect(alertsPageSource).not.toContain("label: 'Notifications'");- expect(alertsPageSource).not.toContain("label: 'Schedule'");- expect(alertsPageSource).not.toContain(- 'Permanently clear all alert history. Use with caution - this action cannot be undone.',- );- expect(alertsPageSource).not.toContain(- 'Error clearing alert history: Please check your connection and try again.',- );- expect(alertIncidentPresentationSource).toContain(- 'export function getAlertIncidentStatusPresentation',- );- expect(alertIncidentPresentationSource).toContain(- 'export function getAlertIncidentLevelBadgeClass',- );- expect(alertIncidentPresentationSource).toContain(- 'export function getAlertHistoryStatusPresentation',- );- expect(alertHistoryPresentationSource).toContain(- 'export function getAlertHistoryResourceTypeBadgeClass',- );- expect(alertActivationPresentationSource).toContain(- 'export function getAlertActivationPresentation',- );- expect(alertFrequencyPresentationSource).toContain(- 'export function getAlertFrequencySelectionPresentation',- );- expect(alertFrequencyPresentationSource).toContain(- 'export function getAlertFrequencyClearFilterButtonClass',- );- expect(alertSeverityPresentationSource).toContain('export function getAlertSeverityDotClass');- expect(alertSeverityPresentationSource).toContain(- 'export function getAlertSeverityCompactLabel',- );- expect(alertTabsPresentationSource).toContain('export function getAlertsSidebarTabClass');- expect(alertTabsPresentationSource).toContain('export function getAlertsMobileTabClass');- expect(alertTabsPresentationSource).toContain('export function getAlertsTabTitle');- expect(alertTabsPresentationSource).toContain('export function getAlertsTabGroups');- expect(alertGroupingPresentationSource).toContain('export function getAlertGroupingCardClass');- expect(alertGroupingPresentationSource).toContain(- 'export function getAlertGroupingCheckboxClass',- );- expect(alertSchedulePresentationSource).toContain(- 'export function getAlertQuietDayButtonClass',- );- expect(alertSchedulePresentationSource).toContain(- 'export function getAlertQuietSuppressCardClass',- );- expect(alertSchedulePresentationSource).toContain(- 'export function getAlertQuietSuppressCheckboxClass',- );- expect(ssoProvidersPanelSource).toContain('@/utils/ssoProviderPresentation');- expect(ssoProvidersPanelSource).toContain('@/components/Settings/useSSOProvidersState');- expect(ssoProvidersPanelSource).toContain('getSSOProviderTypeLabel');- expect(ssoProvidersPanelSource).toContain('getSSOProviderSummary');- expect(ssoProvidersPanelSource).toContain('getSSOProviderCardClass');- expect(ssoProvidersPanelSource).toContain('getSSOCertificatePresentation');- expect(ssoProvidersPanelSource).toContain('getSSOProviderAddButtonLabel');- expect(ssoProvidersPanelSource).toContain('getSSOProviderModalTitle');- expect(ssoProvidersPanelSource).toContain('getSSOProviderEmptyStateTitle');- expect(ssoProvidersPanelSource).toContain('getSSOProviderEmptyStateDescription');- expect(ssoProvidersPanelSource).toContain('getSSOProvidersLoadingState');- expect(ssoProvidersPanelSource).toContain('SSOProviderTypeIcon');- expect(ssoProvidersPanelSource).not.toContain('No SSO providers configured');- expect(ssoProvidersPanelSource).not.toContain('Loading SSO providers...');- expect(ssoProvidersPanelSource).not.toContain(- "notificationStore.error('Failed to load SSO providers')",- );- expect(ssoProvidersPanelSource).not.toContain(- "notificationStore.error('Failed to load provider details')",- );- expect(ssoProvidersPanelSource).not.toContain("notificationStore.success('Provider deleted')");- expect(ssoProvidersPanelSource).not.toContain(- "notificationStore.error('Failed to delete provider')",- );- expect(ssoProvidersPanelSource).not.toContain(- "notificationStore.success('Connection test successful')",- );- expect(ssoProvidersPanelSource).not.toContain(- "notificationStore.error('Failed to test connection')",- );- expect(ssoProvidersPanelSource).not.toContain(- "notificationStore.error('Please enter an IdP Metadata URL')",- );- expect(ssoProvidersPanelSource).not.toContain('const loadProviders = async () =>');- expect(ssoProvidersPanelSource).not.toContain('const handleSave = async (');- expect(ssoProvidersPanelSource).not.toContain('const testConnection = async () =>');- expect(ssoProvidersPanelSource).not.toContain('Pro feature');- expect(ssoProvidersPanelSource).not.toContain('requires Pro');- expect(ssoProvidersPanelSource).not.toContain('provider.type.toUpperCase()');- expect(ssoProvidersPanelSource).not.toContain("provider.type === 'oidc' ? (");- expect(ssoProviderPresentationSource).toContain('export function getSSOProviderTypeLabel');- expect(ssoProviderPresentationSource).toContain('export function getSSOProviderSummary');- expect(ssoProviderPresentationSource).toContain('export function getSSOProviderCardClass');- expect(ssoProviderPresentationSource).toContain('export function getSSOProviderAddButtonLabel');- expect(ssoProviderPresentationSource).toContain('export function getSSOProviderModalTitle');- expect(ssoProviderPresentationSource).toContain(- 'export function getSSOProviderEmptyStateTitle',- );- expect(ssoProviderPresentationSource).toContain(- 'export function getSSOProviderEmptyStateDescription',- );- expect(ssoProviderPresentationSource).toContain('export function getSSOSamlFeatureGateCopy');- expect(ssoProviderPresentationSource).not.toContain('(Pro)');- expect(ssoProviderPresentationSource).toContain('export function getSSOProvidersLoadingState');- expect(ssoProviderPresentationSource).toContain('export function getSSOTestResultPresentation');- expect(ssoProviderPresentationSource).toContain(- 'export function getSSOCertificatePresentation',- );- expect(ssoProviderPresentationSource).toContain(- 'export function getSSOProvidersLoadErrorMessage',- );- expect(ssoProviderPresentationSource).toContain(- 'export function getSSOProviderDetailsLoadErrorMessage',- );- expect(ssoProviderPresentationSource).toContain(- 'export function getSSOProviderSaveSuccessMessage',- );- expect(ssoProviderPresentationSource).toContain(- 'export function getSSOProviderDeleteSuccessMessage',- );- expect(ssoProviderPresentationSource).toContain(- 'export function getSSOConnectionTestSuccessMessage',- );- expect(ssoProviderPresentationSource).toContain(- 'export function getSSOMetadataUrlRequiredMessage',- );- expect(ssoProvidersStateSource).toContain('@/components/Settings/ssoProvidersModel');- expect(ssoProvidersStateSource).toContain('getSSOTestResultPresentation');- // Inventory failure belongs to the panel's persistent unknown state,- // not a background toast emitted by the request owner.- expect(ssoProvidersPanelSource).toContain('getSSOProvidersLoadErrorMessage()');- expect(ssoProvidersStateSource).toContain('setLoadError(true)');- expect(ssoProvidersStateSource).not.toContain(- 'notificationStore.error(getSSOProvidersLoadErrorMessage()',- );- expect(ssoProvidersStateSource).toContain('getSSOProviderDetailsLoadErrorMessage');- expect(ssoProvidersStateSource).toContain('getSSOProviderSaveSuccessMessage');- expect(ssoProvidersStateSource).toContain('getSSOProviderDeleteSuccessMessage');- // Test results belong to the active editor, not its inert toast portal.- expect(ssoProvidersStateSource).toContain('setTestResult(result)');- expect(ssoProvidersStateSource).toContain('getSSOProviderSaveErrorMessage(error)');- expect(ssoProvidersStateSource).not.toContain(- 'notificationStore.success(getSSOConnectionTestSuccessMessage()',- );- expect(ssoProvidersModelSource).toContain('export const createEmptyProviderForm =');- expect(ssoProvidersModelSource).toContain('export const mapProviderDetailsToForm =');- expect(ssoProvidersModelSource).toContain('export const buildProviderPayload =');- expect(ssoProvidersModelSource).toContain('export const buildProviderTestPayload =');- expect(auditWebhookPanelSource).toContain('@/utils/auditWebhookPresentation');- expect(auditWebhookPanelSource).toContain('@/components/Settings/useAuditWebhookPanelState');- expect(auditWebhookPanelSource).toContain('getAuditWebhookFeatureGateCopy');- expect(auditWebhookPanelSource).toContain('getAuditWebhookEmptyStateCopy');- expect(auditWebhookPanelSource).toContain('getAuditWebhookLoadingState');- expect(auditWebhookPanelSource).toContain('AUDIT_WEBHOOK_READONLY_NOTICE_CLASS');- expect(auditWebhookPanelSource).toContain('AUDIT_WEBHOOK_ENDPOINT_CARD_CLASS');- expect(auditWebhookPanelSource).toContain('AUDIT_WEBHOOK_ENDPOINT_ICON_CLASS');- expect(auditWebhookPanelSource).not.toContain('No audit webhooks configured yet.');- expect(auditWebhookPanelSource).not.toContain('Loading audit webhooks…');- expect(auditWebhookPanelSource).not.toContain('Audit Webhooks (Pro)');- expect(auditWebhookPanelSource).not.toContain('loadRuntimeCapabilities();');- expect(auditWebhookPanelSource).not.toContain('const fetchWebhooks = async () =>');- expect(auditWebhookPanelSource).not.toContain('const saveWebhooks = async (urls: string[]) =>');- expect(auditWebhookPresentationSource).toContain(- 'export function getAuditWebhookFeatureGateCopy',- );- expect(auditWebhookPresentationSource).not.toContain('Audit Webhooks (Pro)');- expect(auditWebhookPresentationSource).not.toContain('require Pro');- expect(auditWebhookPresentationSource).toContain(- 'export function getAuditWebhookEmptyStateCopy',- );- expect(auditWebhookPresentationSource).toContain('export function getAuditWebhookLoadingState');- expect(auditWebhookPresentationSource).toContain(- 'export function getAuditWebhookInvalidUrlMessage',- );- expect(auditWebhookPresentationSource).toContain(- 'export function getAuditWebhookDuplicateUrlMessage',- );- expect(auditWebhookPresentationSource).toContain(- 'export function getAuditWebhookSaveSuccessMessage',- );- expect(auditWebhookPresentationSource).toContain(- 'export function getAuditWebhookSaveErrorMessage',- );- expect(auditWebhookPresentationSource).toContain('AUDIT_WEBHOOK_SECURITY_NOTE_TITLE');- expect(auditWebhookPresentationSource).toContain('AUDIT_WEBHOOK_SECURITY_NOTE_BODY');- expect(auditWebhookStateSource).toContain('export const useAuditWebhookPanelState =');- expect(auditWebhookStateSource).toContain('loadRuntimeCapabilities();');- expect(auditWebhookStateSource).not.toContain('trackPaywallViewed');- expect(auditWebhookStateSource).toContain('const fetchWebhooks = async () =>');- expect(auditWebhookStateSource).toContain('const saveWebhooks = async (urls: string[]) =>');- expect(auditLogPanelSource).toContain('getAuditLogLoadingState');- expect(auditLogPanelSource).toContain('getAuditLogEmptyState');- expect(auditLogPanelSource).toContain('@/components/Settings/useAuditLogPanelState');- expect(auditLogPanelSource).not.toContain('No audit events found');- expect(auditLogPanelSource).not.toContain('createLocalStorageStringSignal');- expect(auditLogPanelSource).not.toContain('const fetchAuditEvents = async (');- expect(auditLogPanelSource).not.toContain('const verifyAllEvents = async (');- expect(auditLogPanelSource).not.toContain('trackPaywallViewed');- expect(auditLogPresentationSource).toContain('export function getAuditLogLoadingState');- expect(auditLogPresentationSource).toContain('export function getAuditLogEmptyState');- expect(auditLogStateSource).toContain('export const useAuditLogPanelState =');- // Filter state lives in URL search params (live-apply + shareable); page- // state (offset, size, autoVerify prefs) stays in localStorage.- expect(auditLogStateSource).toContain("useLocation, useNavigate } from '@solidjs/router'");- expect(auditLogStateSource).toContain('createLocalStorageNumberSignal');- expect(auditLogStateSource).not.toContain('createLocalStorageStringSignal');- expect(auditLogStateSource).toContain('const fetchAuditEvents = async (');- expect(auditLogStateSource).toContain('const verifyAllEvents = async (');- expect(auditLogStateSource).not.toContain('trackPaywallViewed');- expect(auditLogPanelSource).toContain('getAuditEventTypeBadgeClass');- expect(auditLogPanelSource).toContain('getAuditVerificationBadgePresentation');- expect(auditLogPanelSource).toContain('getAuditEventStatusPresentation');- expect(auditLogPanelSource).toContain('AUDIT_REFRESH_BUTTON_CLASS');- expect(auditLogPanelSource).toContain('AUDIT_VERIFY_ALL_BUTTON_CLASS');- expect(auditLogPanelSource).toContain('AUDIT_VERIFY_ROW_BUTTON_CLASS');- expect(auditLogPanelSource).not.toContain('const getEventTypeBadge =');- expect(auditLogPanelSource).not.toContain('const getVerificationBadge =');- expect(auditLogPanelSource).not.toContain('const getEventIcon =');- expect(auditLogPresentationSource).toContain('export function getAuditEventTypeBadgeClass');- expect(auditLogPresentationSource).toContain(- 'export function getAuditVerificationBadgePresentation',- );- expect(auditLogPresentationSource).toContain('export function getAuditEventStatusPresentation');- expect(auditLogPresentationSource).toContain('export const AUDIT_REFRESH_BUTTON_CLASS');- expect(auditLogPresentationSource).toContain('export const AUDIT_VERIFY_ALL_BUTTON_CLASS');- expect(auditLogPresentationSource).toContain('export const AUDIT_VERIFY_ROW_BUTTON_CLASS');- expect(diagnosticsPanelSource).toContain('@/components/Settings/DiagnosticsResultsPanel');- expect(diagnosticsPanelSource).toContain('@/components/Settings/useDiagnosticsPanelState');- expect(diagnosticsPanelSource).toContain('DIAGNOSTICS_PANEL_COPY');- expect(diagnosticsPanelSource).toContain('formatUptime');- expect(diagnosticsPanelSource).not.toContain('No PBS configured');- expect(diagnosticsPanelSource).not.toContain('System Diagnostics');- expect(diagnosticsPanelSource).not.toContain('Run Diagnostics');- expect(diagnosticsPanelSource).not.toContain("apiFetchJSON('/api/diagnostics')");- expect(diagnosticsPanelSource).not.toContain('URL.createObjectURL');- expect(diagnosticsPanelSource).not.toContain(- "'bg-amber-100 text-amber-700 dark:bg-amber-900/25 dark:text-amber-300'",- );- expect(diagnosticsPanelSource).not.toContain(- "'bg-green-100 text-green-700 dark:bg-green-900/25 dark:text-green-300'",- );- expect(diagnosticsResultsPanelSource).toContain('StatusIndicatorBadge');- expect(diagnosticsResultsPanelSource).not.toContain('getStatusIndicatorBadgeToneClasses(');- expect(diagnosticsResultsPanelSource).toContain('DIAGNOSTICS_EMPTY_PBS_MESSAGE');- expect(diagnosticsResultsPanelSource).toContain('DIAGNOSTICS_EMPTY_STATE_COPY');- expect(diagnosticsStateSource).toContain('export const useDiagnosticsPanelState =');- expect(diagnosticsStateSource).toContain("apiFetchJSON('/api/diagnostics', {");- expect(diagnosticsStateSource).toContain('expectedOrgID: acceptedReader.org');- expect(diagnosticsStateSource).toContain('signal: request.signal');- expect(diagnosticsStateSource).toContain('retry: false');- expect(diagnosticsStateSource).toContain('URL.createObjectURL');- expect(diagnosticsModelSource).toContain('export function sanitizeDiagnosticsData');- expect(diagnosticsPresentationSource).toContain('export const DIAGNOSTICS_PANEL_COPY');- expect(diagnosticsPresentationSource).toContain('export const DIAGNOSTICS_EMPTY_STATE_COPY');- expect(diagnosticsPresentationSource).toContain('export const DIAGNOSTICS_EMPTY_PBS_MESSAGE');- expect(updatesSettingsPanelSource).toContain('getUpdateBuildBadges');- expect(updatesSettingsPanelSource).toContain('getUpdateAvailabilityHeading');- expect(updatesSettingsPanelSource).toContain('getUpdateCheckActionLabel');- expect(updatesSettingsPanelSource).toContain('getUpdatePrimaryStatusLabel');- expect(updatesSettingsPanelSource).toContain('getUpdateCheckModeLabel');- expect(updatesSettingsPanelSource).toContain('UPDATES_PANEL_COPY');- expect(updatesSettingsPanelSource).toContain('@/components/Settings/UpdateInstallGuide');- expect(updatesSettingsPanelSource).toContain('@/components/Settings/updatesSettingsModel');- expect(updatesSettingsPanelSource).not.toContain('Auto-check enabled');- expect(updatesSettingsPanelSource).not.toContain('Manual checks only');- expect(updatesSettingsPanelSource).not.toContain('Check Now');- expect(updatesSettingsPanelSource).not.toContain('Checking...');- expect(updatesSettingsPanelSource).not.toContain('Update Preferences');- expect(updatesSettingsPanelSource).not.toContain('Update Ready');- expect(updatesSettingsPanelSource).not.toContain('Up to date');- expect(updatesSettingsPanelSource).not.toContain("navigator.clipboard.writeText('update')");- expect(updateInstallGuideSource).toContain('@/components/Settings/CopyCommandBlock');- expect(updateInstallGuideSource).toContain('buildUpdateInstallGuide');- expect(copyCommandBlockSource).toContain('export function CopyCommandBlock');- expect(copyCommandBlockSource).toContain('CommandCopyButton');- expect(copyCommandBlockSource).toContain('@/utils/clipboard');- expect(copyCommandBlockSource).toContain('copyToClipboard(props.command)');- expect(copyCommandBlockSource).not.toContain('navigator.clipboard.writeText');- expect(copyCommandBlockSource).toContain('label="Copy to clipboard"');- expect(updatesSettingsModelSource).toContain('export function getUpdateChannelCardOptions');- expect(updatesSettingsModelSource).toContain('export function buildUpdateInstallGuide');- expect(reportingPanelStateSource).toContain('buildReportingRequest');- expect(reportingPanelStateSource).toContain('getReportingGenerateSuccessMessage');- expect(reportingPanelStateSource).toContain('getReportingGenerateErrorMessage');- expect(reportingPanelModelSource).toContain('export function getReportingRangeStart');- expect(reportingPanelModelSource).toContain('export function buildReportingRequest');- expect(reportingPresentationSource).toContain(- 'export function getReportingGenerateSelectionRequiredMessage',- );- expect(reportingPresentationSource).toContain(- 'export function getReportingGenerateSuccessMessage',- );- expect(reportingPresentationSource).toContain(- 'export function getReportingGenerateErrorMessage',- );- expect(updatesPresentationSource).toContain('export function getUpdateBuildBadges');- expect(updatesPresentationSource).toContain('export function getUpdateAvailabilityHeading');- expect(updatesPresentationSource).toContain('export function getUpdateCheckActionLabel');- expect(updatesPresentationSource).toContain('export function getUpdatePrimaryStatusLabel');- expect(updatesPresentationSource).toContain('export function getUpdateCheckModeLabel');- expect(updatesPresentationSource).toContain('export const UPDATES_PANEL_COPY');- expect(aiSettingsSource).toContain('getAIProviderTestResultTextClass');- expect(aiSettingsSource).toContain('getAISettingsLoadingState');- expect(aiSettingsSource).toContain('getAISettingsLoadErrorMessage');- expect(aiSettingsSource).toContain('getAISettingsRetryLabel');- expect(aiSettingsSource).toContain('getAIModelsLoadErrorMessage');- expect(aiSettingsSource).toContain('getAISettingsSaveErrorMessage');- expect(aiSettingsSource).toContain('getAICredentialsClearErrorMessage');- expect(aiSettingsSource).toContain('getAISettingsToggleErrorMessage');- expect(aiSettingsShellSource).toContain('@/components/Settings/useAISettingsState');- expect(aiSettingsShellSource).toContain('@/components/Settings/AIModelSelectionSection');- expect(aiSettingsShellSource).toContain('@/components/Settings/AIRuntimeControlsSection');- expect(aiSettingsShellSource).not.toContain('AIChatMaintenanceSection');- expect(aiSettingsShellSource).toContain('@/components/Settings/AISettingsStatusAndActions');- expect(aiSettingsSource).not.toContain('Loading Pulse Assistant settings...');- expect(aiSettingsSource).not.toContain('Loading chat sessions...');- expect(aiSettingsSource).not.toContain('No chat sessions yet. Start a chat to create one.');- expect(aiSettingsSource).not.toContain(- 'Failed to load Pulse Assistant settings. Your configuration could not be retrieved.',- );- expect(aiSettingsSource).not.toContain("'Failed to load models'");- expect(aiSettingsSource).not.toContain("'Failed to load chat sessions.'");- expect(aiSettingsSource).not.toContain("'Failed to summarize session.'");- expect(aiSettingsSource).not.toContain("'Failed to get session diff.'");- expect(aiSettingsSource).not.toContain("'Failed to revert session.'");- expect(aiSettingsSource).not.toContain("'Failed to save Pulse Assistant settings'");- expect(aiSettingsSource).not.toContain("'Failed to clear credentials'");- expect(aiSettingsSource).not.toContain("'Failed to update Pulse Assistant setting'");- expect(aiSettingsShellSource).not.toContain(- 'const [loading, setLoading] = createSignal(false);',- );- expect(aiSettingsShellSource).not.toContain('const handleSave = async (event?: Event) =>');- expect(aiSettingsShellSource).not.toContain('Chat Session Maintenance');- expect(aiSettingsShellSource).not.toContain('Discovery Settings');- expect(aiSettingsShellSource).not.toContain('Pulse Permission Level');- expect(aiSettingsSource).not.toContain(- "providerTestResult()?.success ? 'text-green-600' : 'text-red-600'",- );- expect(aiSettingsStateSource).toContain('export const useAISettingsState =');- expect(aiSettingsStateSource).toContain('export type AISettingsState =');- expect(aiSettingsStateSource).toContain('const [loading, setLoading] = createSignal(false);');- expect(aiSettingsStateSource).toContain('const handleSave = async (event?: Event) =>');- expect(aiSettingsStateSource).toContain(- 'const handleEnabledToggle = async (newValue: boolean) =>',- );- expect(aiIntelligenceSource).toContain(- "import { PatrolIntelligenceSurface } from '@/features/patrol/PatrolIntelligenceSurface';",- );- expect(aiIntelligenceSource).not.toContain('getPatrolSummaryPresentation');- expect(aiIntelligenceSource).not.toContain('getAIQuickstartCreditsPresentation');- expect(patrolIntelligenceSurfaceSource).toContain('./usePatrolIntelligenceState');- expect(patrolIntelligenceSurfaceSource).toContain('./PatrolIntelligenceHeader');- expect(patrolIntelligenceSurfaceSource).toContain('./PatrolIntelligenceBanners');- expect(patrolIntelligenceSurfaceSource).not.toContain('./PatrolIntelligenceSummary');- expect(patrolIntelligenceSurfaceSource).toContain('./PatrolIntelligenceWorkspace');- expect(patrolIntelligenceBannersSource).toContain('presentationPolicyHidesUpgradePrompts');- expect(patrolIntelligenceBannersSource).toContain('!presentationPolicyHidesUpgradePrompts()');- expect(patrolIntelligenceBannersSource).toContain('state.licenseRequired()');- expect(patrolIntelligenceHeaderSource).toContain('presentationPolicyHidesUpgradePrompts');- expect(patrolIntelligenceHeaderSource).toContain('!presentationPolicyHidesUpgradePrompts()');- expect(patrolIntelligenceHeaderSource).toContain(- 'commercialSurfacesHidden: presentationPolicyHidesCommercialSurfaces(),',- );- expect(patrolIntelligenceHeaderSource).not.toContain('commercialSurfacesHidden: true');- expect(patrolIntelligenceHeaderSource).not.toContain('Plans & Billing');- expect(patrolIntelligenceHeaderSource).toContain(- "from '@/components/shared/FilterButtonGroup'",- );- expect(patrolIntelligenceHeaderSource).toContain("options.variant ?? 'segmented'");- expect(patrolIntelligenceHeaderSource).not.toContain(- 'flex items-center bg-base rounded-md p-1 border shadow-inner',- );- expect(patrolIntelligenceHeaderSource).not.toContain(- 'flex-1 py-1.5 px-2 text-xs font-semibold rounded-md transition-all duration-200',- );- expect(patrolIntelligenceSurfaceSource).not.toContain('runtimeShellPresentation()');- expect(patrolIntelligenceSurfaceSource).not.toContain(- 'inline-flex items-center rounded-full border px-2.5 py-1 text-[11px] font-semibold uppercase tracking-[0.16em]',- );- expect(patrolIntelligenceWorkspaceSource).toContain('MetadataBadge');- // Work-group badge tones resolve in the patrolControlPresentation adapter- // (getPatrolWorkspaceWorkGroups), never inline in the workspace component.- expect(patrolIntelligenceWorkspaceSource).toContain('getPatrolWorkspaceWorkGroups');- expect(patrolIntelligenceWorkspaceSource).toContain('tone={group.tone}');- expect(patrolIntelligenceWorkspaceSource).not.toContain('findingsBadgePresentation');- expect(patrolIntelligenceWorkspaceSource).not.toContain(- 'ml-1.5 px-1.5 py-0.5 text-xs rounded-full',- );- expect(appSource).not.toContain("import('./pages/Operations')");- expect(appSource).not.toContain('<Route path="/operations/*"');- expect(settingsNavigationModelSource).not.toContain(- 'export function buildLegacyOperationsSettingsPath',- );- expect(reportingPanelSource).toContain('OperationsPanel');- expect(systemLogsPanelSource).toContain('OperationsPanel');- expect(systemLogsPanelSource).toContain('./useSystemLogsPanelState');- expect(patrolIntelligenceSurfaceSource).not.toContain('getPatrolSummaryPresentation');- expect(patrolIntelligenceSurfaceSource).not.toContain('getAIQuickstartCreditsPresentation');- expect(patrolIntelligenceStateSource).toContain('export function usePatrolIntelligenceState');- expect(patrolIntelligenceStateSource).toContain('export type PatrolIntelligenceState =');- expect(patrolIntelligenceStateSource).toContain('getPatrolStatus');- expect(patrolIntelligenceStateSource).toContain('usePatrolStream');- expect(patrolIntelligenceStateSource).not.toContain('trackPaywallViewed');- expect(aiIntelligenceStoreSource).toContain(- "import { normalizeIntelligenceSummary } from './aiIntelligenceSummaryModel';",- );- expect(aiIntelligenceStoreSource).toContain(- 'setIntelligenceSummary(normalizeIntelligenceSummary(summary));',- );- expect(aiIntelligenceStoreSource).not.toContain('setIntelligenceSummary(summary);');- expect(aiIntelligenceSummaryModelSource).toContain(- 'export function normalizeIntelligenceSummary',- );- // The Assistant chat window is retired, so no Patrol surface builds an- // Assistant finding handoff any more.- expect(patrolIntelligenceStateSource).not.toContain(- 'buildPatrolAssistantFindingHandoffFromUnifiedFinding',- );- expect(patrolIntelligenceStateSource).toContain('getPatrolSavedReadinessWarning');- expect(patrolIntelligenceStateSource).not.toContain('recent_changes?.length');- expect(patrolIntelligenceStateSource).not.toContain('governed resource${');- expect(patrolInvestigationContextModelSource).toContain(- 'export function buildPatrolInvestigationRecordPresentation',- );- expect(patrolInvestigationContextModelSource).not.toContain('buildPatrolAssistant');- // formatCommandSummary is the canonical helper for command-count copy;- // the legacy join path must not come back.- expect(patrolInvestigationContextModelSource).toContain('formatCommandSummary(');- expect(patrolInvestigationContextModelSource).not.toContain(- 'record.proposed_fix.commands.join',- );- // Patrol renders no supporting-context summary, so the model must not- // carry its policy-coverage count copy either.- expect(patrolInvestigationContextModelSource).not.toContain('policy-covered resource');- expect(patrolIntelligenceHeaderSource).not.toContain('buildPatrolScheduleOptions');- expect(patrolIntelligenceHeaderSource).not.toContain('getAIQuickstartCreditsPresentation');- expect(patrolIntelligenceHeaderSource).not.toContain('quickstart_credits');- expect(patrolIntelligenceHeaderSource).not.toContain('using_quickstart');- expect(patrolIntelligenceSurfaceSource).not.toContain('getPatrolAssessmentPresentation');- expect(patrolIntelligenceWorkspaceSource).toContain('ApprovalBanner');- expect(patrolIntelligenceWorkspaceSource).toContain('FindingsPanel');- expect(patrolIntelligenceStateSource).toContain('const historicalRegressionCount = createMemo');- expect(patrolIntelligenceStateSource).toContain('historicalRegressionCount,');- expect(patrolIntelligenceWorkspaceSource).toContain(- 'historicalRegressionCount={state.historicalRegressionCount()}',- );- expect(patrolIntelligenceBannersSource).not.toContain('trackUpgradeClicked');- expect(patrolIntelligenceSurfaceSource).not.toContain(- "(patrolStatus()?.quickstart_credits_remaining ?? 0) > 0\n ? 'bg-blue-50 dark:bg-blue-950/25 border-blue-200 dark:border-blue-800 text-blue-700 dark:text-blue-300'",- );- expect(investigationMessagesSource).toContain('getInvestigationMessagesState');- expect(investigationMessagesSource).not.toContain('Loading messages...');- expect(investigationMessagesSource).not.toContain('No investigation messages available.');- expect(investigationSectionSource).toContain('getInvestigationSectionState');- expect(investigationSectionSource).not.toContain('Loading investigation...');- expect(investigationSectionSource).not.toContain(- 'No investigation yet. Patrol adds notes after it runs in a mode that investigates.',- );- expect(runHistoryPanelSource).toContain('getRunHistoryEmptyState');- expect(runHistoryPanelSource).toContain('getRunHistoryLoadingState');- expect(runHistoryPanelSource).not.toContain(- 'No Patrol checks yet. Run Patrol to start history.',- );- expect(runHistoryPanelSource).not.toContain('Loading run history…');- expect(runToolCallTraceSource).toContain('getToolCallsLoadingState');- expect(runToolCallTraceSource).toContain('getToolCallsUnavailableState');- expect(runToolCallTraceSource).toContain('MetadataBadge');- expect(runToolCallTraceSource).toContain('getToolCallResultBadgeTone');- expect(runToolCallTraceSource).not.toContain('getToolCallResultBadgeClass');- expect(runToolCallTraceSource).not.toContain('Loading tool calls...');- expect(runToolCallTraceSource).not.toContain('Tool call details not available for this run.');- expect(patrolEmptyStatePresentationSource).toContain(- 'export function getInvestigationMessagesState',- );- expect(patrolEmptyStatePresentationSource).toContain(- 'export function getInvestigationSectionState',- );- expect(patrolEmptyStatePresentationSource).toContain('export function getRunHistoryEmptyState');- expect(patrolEmptyStatePresentationSource).toContain(- 'export function getPatrolFindingsEmptyState',- );- expect(patrolEmptyStatePresentationSource).toContain('historicalRegressionCount?: number');- expect(patrolEmptyStatePresentationSource).toContain('HISTORICAL_REGRESSION_EMPTY_STATE_BODY');- expect(patrolRunPresentationSource).toContain('export function getRunHistoryLoadingState');- expect(patrolRunPresentationSource).toContain('export function getToolCallsLoadingState');- expect(patrolRunPresentationSource).toContain('export function getToolCallsUnavailableState');- expect(patrolRunPresentationSource).toContain('export function getToolCallResultBadgeTone');- expect(patrolRunPresentationSource).not.toContain(- 'export function getToolCallResultBadgeClass',- );- expect(systemLogsPanelSource).toContain('getSystemLogLineClass');- expect(systemLogsPanelSource).toContain('getSystemLogBufferSummary');- expect(systemLogsPanelSource).toContain('getSystemLogStreamPresentation');- expect(systemLogsPanelSource).toContain('SYSTEM_LOGS_PANEL_COPY');- expect(systemLogsPanelSource).toContain('SYSTEM_LOG_LEVEL_OPTIONS');- expect(systemLogsPanelSource).not.toContain('notificationStore.success');- expect(systemLogsPanelSource).not.toContain('new EventSource(');- expect(systemLogsPanelSource).not.toContain("log.includes('ERR')");- expect(systemLogsPanelSource).not.toContain("isPaused() ? 'Resume Stream' : 'Pause Stream'");- expect(systemLogsPanelSource).not.toContain("isPaused() ? 'Stream Paused' : 'Live'");- expect(systemLogsPanelSource).not.toContain('Waiting for logs...');- expect(systemLogsPanelSource).not.toContain(- "'bg-amber-100 text-amber-600 dark:bg-amber-900/25 dark:text-amber-400'",- );- expect(systemLogsPanelStateSource).toContain("anchor.href = '/api/logs/download'");- expect(systemLogsPanelStateSource).toContain("anchor.download = ''");- expect(systemLogsPanelStateSource).not.toContain('window.location.href');- expect(systemLogsPanelStateSource).toContain('setNotice(`Log level set to ${newLevel}`)');- expect(systemLogsPanelStateSource).not.toContain('notificationStore');- expect(systemLogsPanelStateSource).toContain('expectedOrgID: acceptedReader.org');- expect(systemLogsPanelStateSource).toContain('retry: false');- expect(systemLogsPanelStateSource).toContain('new EventSource');- expect(systemLogsPresentationSource).toContain('export const SYSTEM_LOGS_PANEL_COPY');- expect(systemLogsPresentationSource).toContain('export const SYSTEM_LOG_LEVEL_OPTIONS');- expect(systemLogsPresentationSource).toContain('export function getSystemLogBufferSummary');- expect(systemLogsPresentationSource).toContain('export function getSystemLogLineClass');- expect(systemLogsPresentationSource).toContain(- 'export function getSystemLogStreamPresentation',- );- expect(thresholdSliderSource).toContain('getThresholdSliderTextClass');- expect(thresholdSliderSource).toContain('getThresholdSliderFillClass');- expect(thresholdSliderSource).not.toContain('const colorMap');- expect(thresholdSliderPresentationSource).toContain(- 'export function getThresholdSliderTextClass',- );- expect(thresholdSliderPresentationSource).toContain(- 'export function getThresholdSliderFillClass',- );- expect(aiCostDashboardSource).toContain('FilterSegmentedControl');- expect(aiCostDashboardSource).not.toContain('getAICostRangeButtonClass');- expect(aiCostDashboardSource).toContain('getAICostLoadingState');- expect(aiCostDashboardSource).toContain('AI_COST_PANEL_TITLE');- expect(aiCostDashboardSource).toContain('AI_COST_PANEL_DESCRIPTION');- expect(aiCostDashboardSource).toContain('AI_COST_EMPTY_STATE');- expect(aiCostDashboardSource).toContain('AI_COST_DAILY_USD_EMPTY_STATE');- expect(aiCostDashboardSource).toContain('AI_COST_DAILY_TOKEN_EMPTY_STATE');- expect(aiCostDashboardSource).toContain('getAICostRefreshErrorMessage');- expect(aiCostDashboardSource).toContain('getAICostResetHistoryConfirmationMessage');- expect(aiCostDashboardSource).toContain('getAICostResetHistorySuccessMessage');- expect(aiCostDashboardSource).toContain('getAICostResetHistoryErrorMessage');- expect(aiCostDashboardSource).toContain('getAICostExportHistoryErrorMessage');- expect(aiCostDashboardSource).not.toContain('No usage data yet.');- expect(aiCostDashboardSource).not.toContain('No daily USD trend yet.');- expect(aiCostDashboardSource).not.toContain('No daily token trend yet.');- expect(aiCostDashboardSource).not.toContain('Loading usage…');- expect(aiCostDashboardSource).not.toContain(- "'bg-blue-100 dark:bg-blue-900/25 text-blue-700 dark:text-blue-300 border-blue-300 dark:border-blue-700'",- );- expect(aiCostPresentationSource).toContain('export const AI_COST_EMPTY_STATE');- expect(aiCostPresentationSource).toContain('export function getAICostLoadingState');- expect(aiCostPresentationSource).toContain('export const AI_COST_DAILY_USD_EMPTY_STATE');- expect(aiCostPresentationSource).toContain('export const AI_COST_DAILY_TOKEN_EMPTY_STATE');- expect(aiCostPresentationSource).toContain('export const AI_COST_PANEL_TITLE');- expect(aiCostPresentationSource).toContain('export const AI_COST_PANEL_DESCRIPTION');- expect(aiCostPresentationSource).toContain('export function getAICostRefreshErrorMessage');- expect(aiCostPresentationSource).toContain(- 'export function getAICostResetHistoryConfirmationMessage',- );- expect(aiCostPresentationSource).toContain(- 'export function getAICostResetHistorySuccessMessage',- );- expect(aiCostPresentationSource).toContain('export function getAICostResetHistoryErrorMessage');- expect(aiCostPresentationSource).toContain(- 'export function getAICostExportHistoryErrorMessage',- );- expect(aiModelPickerSource).toContain('AI_MODEL_PICKER_EMPTY_STATE');- expect(aiModelPickerSource).not.toContain('No matching models.');- expect(remediationStatusSource).toContain('getRemediationPresentation');- expect(remediationStatusSource).not.toContain(- "'bg-green-50 dark:bg-green-900/25 border border-green-200 dark:border-green-800'",- );- expect(remediationStatusSource).not.toContain(- "'bg-red-50 dark:bg-red-900/25 border border-red-200 dark:border-red-800'",- );- expect(remediationStatusSource).not.toContain("'Fix executed successfully'");- expect(remediationStatusSource).not.toContain("'Fix failed'");- expect(remediationPresentationSource).toContain('export function getRemediationPresentation');- });-- it('keeps workloads empty-state copy in a shared presentation utility', () => {- expect(workloadsStateSource).toContain('getWorkloadsInfrastructureEmptyState');- expect(workloadsStateSource).toContain('getWorkloadsGuestsEmptyState');- expect(workloadsStateSource).toContain('getWorkloadsLoadingState');- expect(workloadsStateSource).toContain('getWorkloadsDisconnectedState');- expect(workloadsSurfaceSource).not.toContain('Loading workloads data...');- expect(workloadsSurfaceSource).not.toContain('Connection lost');- expect(workloadsSurfaceSource).not.toContain('Attempting to reconnect…');- expect(workloadsSurfaceSource).not.toContain('Unable to connect to the backend server');- expect(workloadsSurfaceSource).not.toContain('Reconnect now');- expect(workloadEmptyStatePresentationSource).toContain(- 'export function getWorkloadsInfrastructureEmptyState',- );- expect(workloadEmptyStatePresentationSource).toContain(- 'export function getWorkloadsGuestsEmptyState',- );- expect(workloadEmptyStatePresentationSource).toContain(- 'export function getWorkloadsLoadingState',- );- expect(workloadEmptyStatePresentationSource).toContain(- 'export function getWorkloadsDisconnectedState',- );- expect(workloadEmptyStatePresentationSource).toContain(- 'export function getWorkloadsDisconnectedBannerState',- );- expect(workloadEmptyStatePresentationSource).toContain(- 'export function getWorkloadsUnavailableState',- );- expect(workloadEmptyStatePresentationSource).toContain(- 'export function getWorkloadsNoResourcesState',- );- });-- it('keeps workloads guest fallback copy in a shared presentation utility', () => {- expect(guestRowCellsSource).toContain('getWorkloadsGuestBackupStatusPresentation');- expect(guestRowCellsSource).toContain('getWorkloadsGuestBackupTooltip');- expect(guestRowCellsSource).toContain('getWorkloadsGuestNetworkEmptyState');- expect(guestRowSource).toContain('getWorkloadGuestDiskStatusMessage');- expect(guestRowSource).not.toContain('No backup found');- expect(guestRowSource).not.toContain('No IP assigned');- expect(guestRowSource).not.toContain(- 'No filesystems found. VM may be booting or using a Live ISO.',- );- expect(workloadsDiskListSource).toContain('useDiskListState');- expect(workloadsDiskListSource).not.toContain('getWorkloadGuestDiskStatusMessage');- expect(workloadsDiskListSource).not.toContain('const getUsagePercent =');- expect(workloadsDiskListStateSource).toContain('getWorkloadGuestDiskStatusMessage');- expect(workloadsDiskListModelSource).toContain('export const buildWorkloadsDiskPresentation');- expect(workloadsDiskListModelSource).toContain('export const getWorkloadsDiskUsagePercent');- expect(workloadsDiskListSource).not.toContain(- 'No filesystems found. VM may be booting or using a Live ISO.',- );- expect(workloadGuestPresentationSource).toContain(- 'export function getWorkloadsGuestBackupStatusPresentation',- );- expect(workloadGuestPresentationSource).toContain(- 'export function getWorkloadsGuestBackupTooltip',- );- expect(workloadGuestPresentationSource).toContain(- 'export function getWorkloadsGuestNetworkEmptyState',- );- expect(workloadGuestPresentationSource).toContain(- 'export function getWorkloadGuestDiskStatusMessage',- );- });-- it('keeps alert incident timeline state copy in a shared presentation utility', () => {- expect(alertOverviewTabSource).toContain('useAlertIncidentTimelineState');- expect(alertOverviewTabSource).toContain('useAlertOverviewState');- expect(alertIncidentEventFiltersSource).toContain('getAlertIncidentEventFilterContainerClass');- expect(alertIncidentEventFiltersSource).toContain('getAlertIncidentEventFilterChipClass');- expect(alertIncidentEventFiltersSource).toContain(- 'getAlertIncidentEventFilterActionButtonClass',- );- expect(alertIncidentTimelineStateSource).toContain(- 'export function useAlertIncidentTimelineState',- );- expect(alertIncidentTimelineStateSource).toContain('AlertsAPI.getIncidentTimeline');- expect(alertIncidentTimelineStateSource).toContain('AlertsAPI.addIncidentNote');- expect(alertIncidentTimelineStateSource).toContain('getAlertResourceIncidentTimelineFailure');- expect(alertIncidentTimelineStateSource).toContain('getAlertResourceIncidentNoteSavedLabel');- expect(alertIncidentTimelinePanelSource).toContain('getAlertTimelineLoadingState');- expect(alertIncidentTimelinePanelSource).toContain('getAlertTimelineFilterEmptyState');- expect(alertIncidentTimelinePanelSource).toContain('getAlertTimelineEmptyState');- expect(alertIncidentTimelinePanelSource).toContain('getAlertTimelineUnavailableState');- expect(alertIncidentTimelinePanelSource).toContain('getAlertTimelineFailureState');- expect(alertIncidentTimelinePanelSource).toContain('getAlertIncidentAcknowledgedBadgeClass');- expect(alertIncidentTimelinePanelSource).toContain('getAlertIncidentNoteTextareaClass');- expect(alertIncidentTimelinePanelSource).toContain('getAlertIncidentNoteSaveButtonClass');- expect(alertIncidentTimelinePanelSource).toContain('getAlertIncidentTimelineMetaRowClass');- expect(alertIncidentTimelinePanelSource).toContain('getAlertIncidentTimelineHeadingClass');- expect(alertIncidentTimelinePanelSource).toContain('IncidentTimelineEventCard');- expect(alertOverviewTabSource).not.toContain('getAlertIncidentTimelineEventCardClass');- expect(alertOverviewTabSource).not.toContain('getAlertIncidentTimelineDetailClass');- expect(alertOverviewTabSource).not.toContain('getAlertIncidentTimelineCommandClass');- expect(alertOverviewTabSource).not.toContain('getAlertIncidentTimelineOutputClass');- expect(alertOverviewTabSource).not.toContain('IncidentTimelinePanel');- expect(alertOverviewTabSource).not.toContain('getAlertOverviewCardPresentation');- expect(alertOverviewTabSource).not.toContain('getAlertOverviewAcknowledgedBadgeClass');- expect(alertOverviewTabSource).not.toContain('getAlertOverviewStartedAtClass');- expect(alertOverviewTabSource).not.toContain('getAlertOverviewPrimaryActionClass');- expect(alertOverviewTabSource).not.toContain('getAlertOverviewSecondaryActionClass');- expect(alertOverviewTabSource).not.toContain('AlertsAPI.bulkAcknowledge');- expect(alertOverviewTabSource).not.toContain('AlertsAPI.acknowledge');- expect(alertOverviewTabSource).not.toContain('AlertsAPI.unacknowledge');- expect(alertOverviewTabSource).not.toContain('AlertsAPI.getIncidentTimeline');- expect(alertOverviewTabSource).not.toContain('AlertsAPI.addIncidentNote');- expect(alertOverviewTabSource).not.toContain('Loading timeline...');- expect(alertOverviewTabSource).not.toContain('No timeline events match the selected filters.');- expect(alertOverviewTabSource).not.toContain('No timeline events yet.');- expect(alertOverviewTabSource).not.toContain('No incident timeline available.');- expect(alertOverviewTabSource).not.toContain('Failed to load timeline.');- expect(alertOverviewStateSource).toContain('export function useAlertOverviewState');- expect(alertOverviewStateSource).toContain('export type AlertOverviewState');- expect(alertOverviewStateSource).toContain('useAlertAcknowledgementState');- expect(alertOverviewStateSource).not.toContain('AlertsAPI.bulkAcknowledge');- expect(alertOverviewStateSource).not.toContain('AlertsAPI.acknowledge');- expect(alertOverviewStateSource).not.toContain('AlertsAPI.unacknowledge');- expect(alertOverviewStatsCardsSource).toContain('props.state.alertStats().acknowledged');- expect(alertOverviewStatsCardsSource).toContain('props.state.alertStats().total24h');- // Override count is configuration, not alert status; it left the overview.- expect(alertOverviewStatsCardsSource).not.toContain('alertStats().overrides');- expect(alertOverviewActiveAlertsSectionSource).toContain('AlertOverviewAlertCard');- expect(alertOverviewActiveAlertsSectionSource).toContain('getAlertListEmptyState');- expect(alertOverviewAlertCardSource).toContain('IncidentTimelinePanel');- expect(alertOverviewAlertCardSource).toContain('getAlertOverviewCardPresentation');- expect(alertOverviewAlertCardSource).toContain('getAlertOverviewAcknowledgedBadgeClass');- expect(alertOverviewAlertCardSource).toContain('getAlertOverviewStartedAtClass');- expect(alertOverviewAlertCardSource).toContain('getAlertOverviewPrimaryActionClass');- expect(alertOverviewAlertCardSource).toContain('getAlertOverviewSecondaryActionClass');- expect(alertAcknowledgementStateSource).toContain(- 'export function useAlertAcknowledgementState',- );- expect(alertAcknowledgementStateSource).toContain('AlertsAPI.bulkAcknowledge');- expect(alertAcknowledgementStateSource).toContain('AlertsAPI.acknowledge');- expect(alertAcknowledgementStateSource).toContain('AlertsAPI.unacknowledge');- expect(alertScheduleTabSource).toContain('useAlertScheduleState');- expect(alertScheduleTabSource).not.toContain('createDefaultQuietHours');- expect(alertScheduleTabSource).not.toContain('createDefaultCooldown');- expect(alertScheduleTabSource).not.toContain('createDefaultGrouping');- expect(alertScheduleTabSource).not.toContain('createDefaultEscalation');- expect(alertScheduleTabSource).not.toContain('const timezones = [');- expect(alertScheduleTabSource).not.toContain('const days = [');- expect(alertScheduleStateSource).toContain('export function useAlertScheduleState');- expect(alertScheduleStateSource).toContain('createDefaultQuietHours');- expect(alertScheduleStateSource).toContain('createDefaultCooldown');- expect(alertScheduleStateSource).toContain('createDefaultGrouping');- expect(alertScheduleStateSource).toContain('createDefaultEscalation');- expect(alertOverviewPresentationSource).toContain(- 'export function getAlertTimelineLoadingState',- );- expect(alertOverviewPresentationSource).toContain(- 'export function getAlertTimelineFilterEmptyState',- );- expect(alertOverviewPresentationSource).toContain('export function getAlertTimelineEmptyState');- expect(alertOverviewPresentationSource).toContain(- 'export function getAlertTimelineUnavailableState',- );- expect(alertOverviewPresentationSource).toContain(- 'export function getAlertTimelineFailureState',- );- expect(alertOverviewPresentationSource).toContain(- 'export function getAlertHistorySearchPlaceholder',- );- expect(alertOverviewPresentationSource).toContain(- 'export function getAlertOverviewCardPresentation',- );- expect(alertOverviewPresentationSource).toContain(- 'export function getAlertOverviewAcknowledgedBadgeClass',- );- expect(alertOverviewPresentationSource).toContain(- 'export function getAlertOverviewStartedAtClass',- );- expect(alertOverviewPresentationSource).toContain(- 'export function getAlertOverviewPrimaryActionClass',- );- expect(alertOverviewPresentationSource).toContain(- 'export function getAlertOverviewSecondaryActionClass',- );- expect(alertIncidentPresentationSource).toContain(- 'export function getAlertIncidentEventFilterContainerClass',- );- expect(alertIncidentPresentationSource).toContain(- 'export function getAlertIncidentEventFilterActionButtonClass',- );- expect(alertIncidentPresentationSource).toContain(- 'export function getAlertIncidentEventFilterChipClass',- );- expect(alertIncidentPresentationSource).toContain(- 'export function getAlertIncidentAcknowledgedBadgeClass',- );- expect(alertIncidentPresentationSource).toContain(- 'export function getAlertIncidentTimelineEventCardClass',- );- expect(alertIncidentPresentationSource).toContain(- 'export function getAlertIncidentNoteTextareaClass',- );- expect(alertIncidentPresentationSource).toContain(- 'export function getAlertIncidentNoteSaveButtonClass',- );- expect(alertIncidentPresentationSource).toContain(- 'export function getAlertIncidentTimelineMetaRowClass',- );- expect(alertIncidentPresentationSource).toContain(- 'export function getAlertIncidentTimelineHeadingClass',- );- expect(alertIncidentPresentationSource).toContain(- 'export function getAlertIncidentTimelineDetailClass',- );- expect(alertIncidentPresentationSource).toContain(- 'export function getAlertIncidentTimelineCommandClass',- );- expect(alertIncidentPresentationSource).toContain(- 'export function getAlertIncidentTimelineOutputClass',- );- expect(alertIncidentPresentationSource).toContain(- 'export function getAlertResourceIncidentCardClass',- );- expect(alertIncidentPresentationSource).toContain(- 'export function getAlertResourceIncidentSummaryRowClass',- );- expect(alertIncidentPresentationSource).toContain(- 'export function getAlertResourceIncidentToggleButtonClass',- );- expect(alertIncidentPresentationSource).toContain(- 'export function getAlertResourceIncidentTruncatedEventsLabel',- );- expect(alertIncidentTimelineEventCardSource).toContain(- 'export function IncidentTimelineEventCard',- );- expect(alertIncidentEventFiltersSource).toContain('export function IncidentEventFilters');- expect(alertIncidentTimelinePanelSource).toContain('export function IncidentTimelinePanel');- expect(alertIncidentTimelineEventCardSource).toContain(- 'getAlertIncidentTimelineEventCardClass',- );- expect(alertIncidentTimelineEventCardSource).toContain('getAlertIncidentTimelineMetaRowClass');- expect(alertIncidentTimelineEventCardSource).toContain('getAlertIncidentTimelineHeadingClass');- expect(alertIncidentTimelineEventCardSource).toContain('getAlertIncidentTimelineDetailClass');- expect(alertIncidentTimelineEventCardSource).toContain('getAlertIncidentTimelineCommandClass');- expect(alertIncidentTimelineEventCardSource).toContain('getAlertIncidentTimelineOutputClass');- expect(alertOverviewPresentationSource).toContain('export function getAlertHistoryEmptyState');- expect(alertOverviewPresentationSource).toContain('export function getAlertsPageHeaderMeta');- expect(alertOverviewPresentationSource).toContain('export function getAlertBucketCountLabel');- expect(alertIncidentPresentationSource).toContain(- 'export function getAlertResourceIncidentLoadingState',- );- expect(alertIncidentPresentationSource).toContain(- 'export function getAlertResourceIncidentEmptyState',- );- expect(alertIncidentPresentationSource).toContain(- 'export function getAlertResourceIncidentPanelTitle',- );- expect(alertIncidentPresentationSource).toContain(- 'export function getAlertResourceIncidentRefreshLabel',- );- expect(alertIncidentPresentationSource).toContain(- 'export function getAlertResourceIncidentToggleLabel',- );- expect(alertDestinationsPresentationSource).toContain(- 'export function getAlertDestinationsConfigLoadError',- );- expect(alertDestinationsPresentationSource).toContain(- 'export function getAlertDestinationsLoadErrorBanner',- );- expect(alertDestinationsPresentationSource).toContain(- 'export function getAlertDestinationsRetryLabel',- );- expect(alertDestinationsPresentationSource).toContain(- 'export function getAlertDestinationsAppriseTargetsHelp',- );- expect(alertDestinationsPresentationSource).toContain(- 'export function getAlertDestinationsAppriseTestLabel',- );- expect(alertDestinationsPresentationSource).toContain(- 'export function getAlertDestinationsAppriseTestError',- );- expect(alertDestinationsPresentationSource).toContain(- 'export function getAlertDestinationsStatusLabel',- );- });-- it('keeps alerts configuration tabs feature-owned instead of page-local', () => {- expect(alertsPageSource).toContain(- "import { AlertsConfigurationSurface } from '@/features/alerts/AlertsConfigurationSurface';",- );- expect(alertsConfigurationSurfaceSource).toContain(- "import { DestinationsTab } from './tabs/DestinationsTab';",- );- expect(alertsConfigurationSurfaceSource).toContain(- "import { ScheduleTab } from './tabs/ScheduleTab';",- );- expect(alertsConfigurationSurfaceSource).toContain('useAlertsConfigurationState');- expect(alertsConfigurationStateSource).toContain('buildAlertsConfigurationPayload');- expect(alertsPageSource).not.toContain('function DestinationsTab(');- expect(alertsPageSource).not.toContain('function ScheduleTab(');- expect(alertDestinationsTabSource).toContain('useAlertDestinationsTabState');- expect(alertDestinationsTabSource).not.toContain('NotificationsAPI.getWebhooks');- expect(alertDestinationsTabSource).toContain('AlertEmailDestinationsSection');- expect(alertDestinationsTabSource).toContain('AlertWebhookDestinationsSection');- expect(alertScheduleTabSource).toContain('getAlertConfigQuietHourSuppressOptions');- expect(alertScheduleTabSource).toContain('AlertGroupingSection');- expect(alertScheduleTabSource).toContain('AlertQuietHoursSection');- });-- it('keeps alert resource table vocabulary in a shared presentation utility', () => {- expect(alertResourceTableSource).toContain('useAlertResourceTableState');- expect(alertResourceTableSource).toContain('AlertResourceTableDesktop');- expect(alertResourceTableSource).toContain('AlertResourceTableMobile');- expect(alertResourceTableSource).not.toContain('const flattenResources = (): Resource[] => {');- expect(alertResourceTableSource).not.toContain(- 'const normalizeMetricKey = (column: string): string => {',- );- expect(alertResourceTableSource).not.toContain(- 'const metricBounds = (metric: string): { min: number; max: number } => {',- );- expect(alertResourceTableSource).not.toContain('No resources available.');- expect(alertResourceTableSource).not.toContain('No {props.title.toLowerCase()} found');- expect(alertResourceTableSource).not.toContain('Add a note about this override (optional)');- expect(alertResourceTableSource).not.toContain('Add a note...');- expect(alertResourceTableSource).not.toContain('Reset to factory defaults');- expect(alertResourceTableSource).not.toContain('Alert Delay (s)');- expect(alertResourceTableSource).not.toContain('Click to edit this metric');- expect(alertResourceTableSource).not.toContain(- 'Set to -1 or use the Off toggle to disable alerts for this metric',- );- expect(alertResourceTableSource).not.toContain(- "if (resource.type === 'agent' && ['diskRead', 'diskWrite', 'networkIn', 'networkOut'].includes(",- );- expect(alertResourceTablePresentationSource).toContain(- 'export const ALERT_RESOURCE_TABLE_EMPTY_STATE',- );- expect(alertResourceTablePresentationSource).toContain(- 'export function getAlertResourceTableEmptyState',- );- expect(alertResourceTablePresentationSource).toContain(- 'export function getAlertResourceTableNoResultsState',- );- expect(alertResourceTablePresentationSource).toContain(- 'export function getAlertResourceTableCustomBadgeLabel',- );- expect(alertResourceTablePresentationSource).toContain(- 'export function getAlertResourceTableMetricPlaceholder',- );- expect(alertResourceTablePresentationSource).toContain(- 'export function getAlertResourceTableOverrideNotePlaceholder',- );- expect(alertResourceTablePresentationSource).toContain(- 'export function getAlertResourceTableResetFactoryDefaultsLabel',- );- expect(alertResourceTablePresentationSource).toContain(- 'export function getAlertResourceTableAlertDelayLabel',- );- expect(alertResourceTablePresentationSource).toContain(- 'export function getAlertResourceTableMetricInputTitle',- );- expect(alertResourceTablePresentationSource).toContain(- 'export function getAlertResourceTableEditMetricTitle',- );- expect(alertResourceTableStateSource).toContain('export function useAlertResourceTableState');- expect(alertResourceTableStateSource).toContain('toggleAll');- expect(alertResourceTableStateSource).toContain('clearSelectedIds');- expect(alertResourceGroupHeaderSource).toContain('export function AlertResourceGroupHeader');- expect(alertResourceGroupHeaderSource).toContain('meta?.clusterName');- expect(alertResourceTableDesktopSource).toContain('export function AlertResourceTableDesktop');- expect(alertResourceTableDesktopSource).toContain('AlertResourceTableRow');- expect(alertResourceTableDesktopSource).toContain('AlertResourceGroupHeader');- expect(alertResourceTableDesktopSource).toContain('getAlertResourceTableCustomBadgeLabel');- expect(alertResourceTableDesktopSource).toContain(- 'getAlertResourceTableResetFactoryDefaultsLabel',- );- expect(alertResourceTableDesktopSource).toContain('getAlertResourceTableAlertDelayLabel');- expect(alertResourceTableDesktopSource).toContain('AlertResourceMetricEditor');- expect(alertResourceTableDesktopSource).toContain('getAlertResourceTableEmptyState');- expect(alertResourceTableDesktopSource).toContain('getAlertResourceTableNoResultsState');- expect(alertResourceTableMobileSource).toContain('export function AlertResourceTableMobile');- expect(alertResourceTableMobileSource).toContain('AlertResourceGroupHeader');- expect(alertResourceTableMobileSource).toContain('buildAlertResourceEditPayload');- expect(alertResourceTableMobileSource).toContain('getAlertResourceTableCustomBadgeLabel');- expect(alertResourceTableMobileSource).toContain('AlertResourceMetricEditor');- expect(alertResourceTableMobileSource).toContain('getAlertResourceTableEmptyState');- expect(alertResourceTableRowSource).toContain('export function AlertResourceTableRow');- expect(alertResourceTableRowSource).toContain('alertResourceSupportsMetric');- expect(alertResourceTableRowSource).toContain('getAlertResourceTableOverrideNotePlaceholder');- expect(alertResourceTableRowSource).toContain('AlertResourceMetricEditor');- expect(alertResourceMetricEditorSource).toContain('getAlertResourceTableMetricInputTitle');- expect(alertResourceMetricEditorSource).toContain('getAlertResourceTableMetricPlaceholder');- expect(alertResourceMetricEditorSource).toContain('getAlertResourceTableMetricOffToggleProps');- expect(alertResourceTableRowSource).toContain('getAlertResourceTableEditMetricTitle');- expect(alertResourceTableModelSource).toContain(- 'export function normalizeAlertResourceMetricKey',- );- expect(alertResourceTableModelSource).toContain(- 'export function getAlertResourceMetricDisplayValue',- );- expect(alertResourceTableModelSource).toContain('export function alertResourceSupportsMetric');- expect(alertResourceTableModelSource).toContain(- 'export function buildAlertResourceEditPayload',- );- });-- it('keeps alert email provider vocabulary and placeholders in a shared presentation utility', () => {- expect(emailProviderSelectSource).toContain('useEmailProviderSelectState');- expect(emailProviderSelectSource).toContain('getAlertEmailProviderOptionLabel');- expect(emailProviderSelectSource).toContain('getAlertEmailSetupInstructionsToggleLabel');- expect(emailProviderSelectSource).toContain('getAlertEmailRecipientsPlaceholder');- expect(emailProviderSelectSource).toContain('getAlertEmailAdvancedToggleLabel');- expect(emailProviderSelectSource).toContain('getAlertEmailTestButtonLabel');- expect(emailProviderSelectSource).not.toContain('NotificationsAPI.getEmailProviders');- expect(emailProviderSelectSource).not.toContain('interface EmailProvider {');- expect(emailProviderSelectSource).not.toContain('interface EmailConfig {');- expect(emailProviderSelectSource).not.toContain('Manual configuration');- expect(emailProviderSelectSource).not.toContain('smtp.example.com');- expect(emailProviderSelectSource).not.toContain('[email protected]');- expect(emailProviderSelectSource).not.toContain('[email protected]');- expect(emailProviderSelectSource).not.toContain('Send test email');- expect(emailProviderSelectSource).not.toContain('Sending test email…');- expect(alertEmailPresentationSource).toContain(- 'export function getAlertEmailProviderOptionLabel',- );- expect(alertEmailPresentationSource).toContain(- 'export function getAlertEmailRecipientsPlaceholder',- );- expect(alertEmailPresentationSource).toContain('export function getAlertEmailTestButtonLabel');- expect(emailProviderSelectStateSource).toContain('export function useEmailProviderSelectState');- expect(emailProviderSelectStateSource).toContain('NotificationsAPI.getEmailProviders');- expect(emailProviderSelectStateSource).toContain("provider.name === 'SendGrid'");- });-- it('keeps alert bulk-edit dialog labels in a shared presentation utility', () => {- expect(bulkEditDialogSource).toContain('getAlertBulkEditDescription');- expect(bulkEditDialogSource).toContain('getAlertBulkEditApplyLabel');- expect(bulkEditDialogSource).toContain('getAlertBulkEditOpenLabel');- expect(alertResourceTableSource).toContain('getAlertBulkEditOpenLabel');- expect(bulkEditDialogSource).not.toContain('Bulk Edit Settings');- expect(bulkEditDialogSource).not.toContain('Unchanged');- expect(bulkEditDialogSource).not.toContain('Clear');- expect(bulkEditDialogSource).not.toContain('Apply to ');- expect(alertBulkEditPresentationSource).toContain('export const ALERT_BULK_EDIT_DIALOG_TITLE');- expect(alertBulkEditPresentationSource).toContain(- 'export function getAlertBulkEditDescription',- );- expect(alertBulkEditPresentationSource).toContain('export function getAlertBulkEditApplyLabel');- expect(alertBulkEditPresentationSource).toContain('export function getAlertBulkEditOpenLabel');- });-- it('keeps alert webhook service vocabulary and action copy in a shared presentation utility', () => {- expect(webhookConfigSource).toContain('useWebhookConfigState');- expect(webhookConfigSource).toContain('WebhookConfigList');- expect(webhookConfigSource).toContain('WebhookConfigForm');- expect(webhookConfigSource).not.toContain('NotificationsAPI.getWebhookTemplates');- expect(webhookConfigSource).not.toContain('const saveWebhook = () => {');- expect(webhookConfigSource).not.toContain('const editWebhook = (webhook: Webhook) => {');- expect(webhookConfigSource).not.toContain('const toggleAllWebhooks = (enabled: boolean) => {');- expect(webhookConfigSource).not.toContain('Custom webhook endpoint');- expect(webhookConfigSource).not.toContain('Discord server webhook');- expect(webhookConfigSource).not.toContain('My Webhook');- expect(webhookConfigSource).not.toContain('https://example.com/webhook');- expect(webhookConfigSource).not.toContain('Optional — tag users or groups');- expect(webhookConfigSource).not.toContain('getAlertWebhookMentionPlaceholder(');- expect(webhookConfigSource).not.toContain('getAlertWebhookMentionHelp(');- expect(webhookConfigSource).not.toContain('interface WebhookTemplate');- expect(webhookConfigSource).not.toContain('Your Pushover application token');- expect(webhookConfigSource).not.toContain('Primary user key or group key');- expect(webhookConfigSource).not.toContain('app_token');- expect(webhookConfigSource).not.toContain('user_token');- expect(webhookConfigSource).not.toContain('createCustomFieldInputs');- expect(webhookConfigSource).not.toContain('ensurePresetCustomFields');- expect(webhookConfigSource).not.toContain('Enable All');- expect(webhookConfigSource).not.toContain('Disable All');- expect(webhookConfigSource).not.toContain('Enable this webhook');- expect(webhookConfigListSource).toContain('getAlertWebhookServiceLabelFromTemplates');- expect(webhookConfigListSource).toContain('getAlertWebhookSummaryLabel');- expect(webhookConfigListSource).toContain('getAlertWebhookToggleAllLabel');- expect(webhookConfigListSource).toContain('getAlertWebhookToggleLabel');- expect(webhookConfigListSource).toContain('getAlertWebhookTestLabel');- expect(webhookConfigFormSource).toContain('getAlertWebhookServices');- expect(webhookConfigFormSource).toContain('getAlertWebhookNamePlaceholder');- expect(webhookConfigFormSource).toContain('getAlertWebhookUrlPlaceholder');- expect(webhookConfigFormSource).toContain('getAlertWebhookMentionPlaceholderFromTemplates');- expect(webhookConfigFormSource).toContain('getAlertWebhookMentionHelpFromTemplates');- expect(webhookConfigFormSource).toContain('hasAlertWebhookMentionSupportFromTemplates');- expect(webhookConfigFormSource).toContain('getAlertWebhookTestLabel');- expect(webhookConfigFormSource).toContain('getAlertWebhookSubmitLabel');- expect(webhookConfigStateSource).toContain('NotificationsAPI.getWebhookTemplates');- expect(webhookConfigStateSource).toContain('getAlertWebhookCustomFieldInputs');- expect(webhookConfigStateSource).toContain('normalizeAlertWebhookCustomFields');- expect(alertWebhookPresentationSource).toContain(- 'export function getAlertWebhookServiceLabelFromTemplates',- );- expect(alertWebhookPresentationSource).toContain('export function getAlertWebhookServices');- expect(alertWebhookPresentationSource).not.toContain('ALERT_WEBHOOK_SERVICES');- expect(alertWebhookPresentationSource).toContain(- 'export function getAlertWebhookMentionPlaceholderFromTemplates',- );- expect(alertWebhookPresentationSource).toContain(- 'export function getAlertWebhookMentionHelpFromTemplates',- );- expect(alertWebhookPresentationSource).toContain(- 'export function hasAlertWebhookMentionSupportFromTemplates',- );- expect(alertWebhookPresentationSource).toContain(- 'export function getAlertWebhookCustomFieldPresets',- );- expect(alertWebhookPresentationSource).toContain(- 'export function getAlertWebhookCustomFieldInputs',- );- expect(alertWebhookPresentationSource).toContain(- 'export function normalizeAlertWebhookCustomFields',- );- expect(alertWebhookPresentationSource).toContain('export function getAlertWebhookTestLabel');- expect(alertWebhookPresentationSource).toContain('export function getAlertWebhookSubmitLabel');- });-});--describe('shared resource change presentation boundary controls', () => {- const kindAdapter = 'export function getResourceChangeKindPresentation(kind) {}';- const metadataAdapter = `${kindAdapter}\nexport function getResourceChangePresentation(change) {}`;- const consumer = (name: string, argument = 'change') =>- `import { ${name} } from '@/utils/resourceChangePresentation'; ${name}(${argument});`;-- it('accepts the kind adapter before the metadata-aware API exists', () => {- expect(- usesSharedChangePresentation(- consumer('getResourceChangeKindPresentation', 'change.kind'),- kindAdapter,- ),- ).toBe(true);- });-- it('requires the whole-change adapter once available, even if the old helper still exists', () => {- expect(- usesSharedChangePresentation(consumer('getResourceChangePresentation'), metadataAdapter),- ).toBe(true);- expect(- usesSharedChangePresentation(- consumer('getResourceChangeKindPresentation', 'change.kind'),- metadataAdapter,- ),- ).toBe(false);- expect(- usesSharedChangePresentation(- consumer('getResourceChangePresentation', 'change.kind'),- metadataAdapter,- ),- ).toBe(false);- });-- it('resolves named import aliases without accepting an inline lookalike', () => {- expect(- usesSharedChangePresentation(- "import { getResourceChangePresentation as present } from '@/utils/resourceChangePresentation'; present(change);",- metadataAdapter,- ),- ).toBe(true);- expect(- usesSharedChangePresentation(- 'function getResourceChangePresentation(change) {} getResourceChangePresentation(change);',- metadataAdapter,- ),- ).toBe(false);- expect(- usesSharedChangePresentation(- consumer('getResourceChangePresentation').replace(- '@/utils/resourceChangePresentation',- '@/utils/localCopy',- ),- metadataAdapter,- ),- ).toBe(false);- });-- it('rejects comment-only, unused and type-only imports', () => {- expect(- usesSharedChangePresentation(- '// ' + consumer('getResourceChangePresentation'),- metadataAdapter,- ),- ).toBe(false);- expect(- usesSharedChangePresentation(- "import { getResourceChangePresentation } from '@/utils/resourceChangePresentation';",- metadataAdapter,- ),- ).toBe(false);- expect(- usesSharedChangePresentation(- consumer('getResourceChangePresentation').replace('import {', 'import type {'),- metadataAdapter,- ),- ).toBe(false);- expect(- usesSharedChangePresentation(- consumer('getResourceChangePresentation').replace('{ getResource', '{ type getResource'),- metadataAdapter,- ),- ).toBe(false);+ expect(canonicalizeFrontendResourceType('host')).toBe('agent');+ expect(canonicalizeFrontendResourceType('docker')).toBe('app-container');+ expect(canonicalizeFrontendResourceType('docker_host')).toBe('docker-host');+ expect(canonicalizeFrontendResourceType('k8s')).toBe('pod');+ expect(canonicalizeFrontendResourceType('kubernetes_cluster')).toBe('k8s-cluster');++ // Platform-native workload types are not frontend aliases.+ expect(canonicalizeFrontendResourceType('qemu')).toBeUndefined();+ expect(canonicalizeFrontendResourceType('lxc')).toBeUndefined();+ expect(canonicalizeFrontendResourceType('container')).toBeUndefined();});});diff --git a/frontend-modern/src/utils/__tests__/patrolEmptyStatePresentation.test.ts b/frontend-modern/src/utils/__tests__/patrolEmptyStatePresentation.test.tsindex e069ea4fa9..61ce9084d2 100644--- a/frontend-modern/src/utils/__tests__/patrolEmptyStatePresentation.test.ts+++ b/frontend-modern/src/utils/__tests__/patrolEmptyStatePresentation.test.ts@@ -1,6 +1,4 @@import { describe, expect, it } from 'vitest';-import runHistoryPanelSource from '@/components/patrol/RunHistoryPanel.tsx?raw';-import patrolEmptyStatePresentationSource from '@/utils/patrolEmptyStatePresentation.ts?raw';import type { PatrolRunRecord } from '@/api/patrol';import {getInvestigationMessagesState,@@ -25,9 +23,6 @@ describe('patrolEmptyStatePresentation', () => {expect(getRunHistoryEmptyState()).toEqual({text: 'No Patrol checks yet. Run Patrol to start history.',});- expect(runHistoryPanelSource).toContain('@/components/shared/EmptyState');- expect(runHistoryPanelSource).toContain('variant="panel"');- expect(runHistoryPanelSource).not.toContain('text-center py-8');});it('returns investigation section loading and empty states', () => {@@ -41,11 +36,6 @@ describe('patrolEmptyStatePresentation', () => {});});- it('keeps the active Patrol empty queue out of all-clear wording', () => {- expect(patrolEmptyStatePresentationSource).not.toContain('Nothing needs attention');- expect(patrolEmptyStatePresentationSource).not.toContain('all clear');- });-it('suppresses the healthy findings empty state when patrol health is not fully verified', () => {expect(getPatrolFindingsEmptyState({diff --git a/frontend-modern/src/utils/__tests__/relayPresentation.test.ts b/frontend-modern/src/utils/__tests__/relayPresentation.test.tsindex e71e67d92f..52a7cc38d3 100644--- a/frontend-modern/src/utils/__tests__/relayPresentation.test.ts+++ b/frontend-modern/src/utils/__tests__/relayPresentation.test.ts@@ -21,7 +21,6 @@ import {RELAY_SECONDARY_BUTTON_CLASS,RELAY_SETTINGS_DESCRIPTION,} from '@/utils/relayPresentation';-import relayPresentationSource from '@/utils/relayPresentation.ts?raw';describe('relayPresentation', () => {it('returns muted not-enabled presentation when relay is disabled', () => {@@ -118,14 +117,4 @@ describe('relayPresentation', () => {expect(RELAY_ACTIVATION_REQUIRED_MESSAGE).toContain('active Relay token');expect(RELAY_ACTIVATION_REQUIRED_MESSAGE).not.toContain('Relay-capable plan');});-- it('does not retain retired Relay price or trial-era onboarding copy', () => {- expect(relayPresentationSource).not.toContain('RELAY_ONBOARDING_UPGRADE_LABEL');- expect(relayPresentationSource).not.toContain('Get Relay');- expect(relayPresentationSource).not.toContain('$39');- expect(relayPresentationSource).not.toContain('$49');- expect(relayPresentationSource).not.toContain('$99');- expect(relayPresentationSource).not.toContain('Start free trial');- expect(relayPresentationSource).not.toContain('Pro feature gate');- });});diff --git a/frontend-modern/src/utils/__tests__/remediationPresentation.test.ts b/frontend-modern/src/utils/__tests__/remediationPresentation.test.tsindex 0e388ed375..2a632c47c6 100644--- a/frontend-modern/src/utils/__tests__/remediationPresentation.test.ts+++ b/frontend-modern/src/utils/__tests__/remediationPresentation.test.ts@@ -1,5 +1,4 @@import { describe, expect, it } from 'vitest';-import aiFindingPresentationSource from '@/utils/aiFindingPresentation.ts?raw';import { getRemediationPresentation } from '@/utils/remediationPresentation';describe('getRemediationPresentation', () => {@@ -22,9 +21,4 @@ describe('getRemediationPresentation', () => {panelClass: 'bg-red-50 dark:bg-red-900/25 border border-red-200 dark:border-red-800',});});-- it('keeps investigation outcome copy remediation-first', () => {- expect(aiFindingPresentationSource).toContain("cannot_fix: 'Cannot remediate'");- expect(aiFindingPresentationSource).not.toContain('Cannot auto-fix');- });});diff --git a/frontend-modern/src/utils/__tests__/temperatureDisplayGuardrails.test.ts b/frontend-modern/src/utils/__tests__/temperatureDisplayGuardrails.test.tsindex 974e67ce47..dd663d3931 100644--- a/frontend-modern/src/utils/__tests__/temperatureDisplayGuardrails.test.ts+++ b/frontend-modern/src/utils/__tests__/temperatureDisplayGuardrails.test.ts@@ -2,23 +2,15 @@ import { describe, expect, it } from 'vitest';import nodeDrawerOverviewSource from '@/components/Workloads/NodeDrawerOverview.tsx?raw';import temperatureGaugeSource from '@/components/shared/TemperatureGauge.tsx?raw';-import dockerHostDrawerOverviewSource from '@/features/docker/DockerHostDrawerOverview.tsx?raw';import proxmoxNodesTableSource from '@/features/proxmox/ProxmoxNodesTable.tsx?raw';-import agentsMachinesTableSource from '@/features/standalone/AgentsMachinesTable.tsx?raw';+// Docker host and agent machine temperatures have render tests that use the+// alert thresholds; these surfaces do not yet.describe('temperature display guardrails', () => {it('keeps colored temperature displays threshold-aware', () => {expect(proxmoxNodesTableSource).toContain('temperatureThresholds={temperatureThresholds()}');expect(nodeDrawerOverviewSource).toContain('getTemperatureTextClass(value, thresholds)');- expect(dockerHostDrawerOverviewSource).toContain('temperatureThresholds()');- expect(agentsMachinesTableSource).toContain('getAgentMachineTemperatureMetric');- expect(agentsMachinesTableSource).toContain('thresholds={temperatureThresholds()}');- expect(temperatureGaugeSource).toContain('props.metric');- });-- it('does not reintroduce the previous local temperature severity calls', () => {expect(nodeDrawerOverviewSource).not.toContain('getTemperatureTextClass(value)');- expect(dockerHostDrawerOverviewSource).not.toContain('getTemperatureTextClass(temperature)');- expect(agentsMachinesTableSource).not.toContain('<TemperatureGauge value={value()} />');+ expect(temperatureGaugeSource).toContain('props.metric');});});diff --git a/frontend-modern/src/utils/__tests__/typeColumnPresentation.test.ts b/frontend-modern/src/utils/__tests__/typeColumnPresentation.test.tsindex 9cf18f3dce..10733005d7 100644--- a/frontend-modern/src/utils/__tests__/typeColumnPresentation.test.ts+++ b/frontend-modern/src/utils/__tests__/typeColumnPresentation.test.ts@@ -1,5 +1,4 @@import { describe, expect, it } from 'vitest';-import alertHistoryTableSectionSource from '@/features/alerts/AlertHistoryTableSection.tsx?raw';import { TYPE_COLUMN_LABEL } from '@/utils/typeColumnContract';import { getTypeColumnLabel } from '@/utils/typeColumnPresentation';@@ -14,10 +13,6 @@ describe('typeColumnPresentation', () => {expect(getTypeColumnLabel()).toBe(TYPE_COLUMN_LABEL);});- it('keeps fixed runtime Type headers on the shared label utility', () => {- expect(alertHistoryTableSectionSource).toContain('getTypeColumnLabel()');- });-it('limits runtime Type header label helper imports to the known allowlist', () => {const runtimeEntries = Object.entries(sourceFiles).filter(([path]) => !path.endsWith('.test.ts') && !path.endsWith('.test.tsx'),