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
Rename infrastructureNavigation to platformNavigation and restore visual-crawl spec
rcourtman60432249978b
diff --git a/frontend-modern/src/App.tsx b/frontend-modern/src/App.tsxindex 70090bb919..9df4ab367e 100644--- a/frontend-modern/src/App.tsx+++ b/frontend-modern/src/App.tsx@@ -63,11 +63,11 @@ import {} from '@/utils/appShellScrollRestoration';import { DarkModeContext, WebSocketContext, useWebSocket } from '@/contexts/appRuntime';import {- buildPrimaryInfrastructureNavigationVisibility,- selectFirstVisiblePrimaryInfrastructureNavigationId,- type InfrastructureNavigationVisibility,- type PrimaryInfrastructureNavId,-} from '@/features/infrastructureNavigation/infrastructureNavigationModel';+ buildPrimaryPlatformNavigationVisibility,+ selectFirstVisiblePrimaryPlatformNavigationId,+ type PlatformNavigationVisibility,+ type PrimaryPlatformNavId,+} from '@/features/platformNavigation/platformNavigationModel';function isPublicRoutePath(pathname: string): boolean {// Public routes must be viewable without authentication.@@ -97,7 +97,7 @@ const SetupCompletionPreviewPage = lazy(() =>);const ROOT_PATROL_PATH = PATROL_PATH;-const PRIMARY_INFRASTRUCTURE_ROUTE_BY_ID: Record<PrimaryInfrastructureNavId, string> = {+const PRIMARY_INFRASTRUCTURE_ROUTE_BY_ID: Record<PrimaryPlatformNavId, string> = {proxmox: buildProxmoxPath(),docker: buildDockerPath(),kubernetes: buildKubernetesPath(),@@ -107,10 +107,10 @@ const PRIMARY_INFRASTRUCTURE_ROUTE_BY_ID: Record<PrimaryInfrastructureNavId, str};function getDefaultWorkspaceRoute(- visibility: InfrastructureNavigationVisibility,+ visibility: PlatformNavigationVisibility,hasSettingsAccess: boolean,): string {- const navId = selectFirstVisiblePrimaryInfrastructureNavigationId(visibility);+ const navId = selectFirstVisiblePrimaryPlatformNavigationId(visibility);if (navId) return PRIMARY_INFRASTRUCTURE_ROUTE_BY_ID[navId];return hasSettingsAccess ? '/settings/infrastructure' : '/alerts';}@@ -248,10 +248,10 @@ function App() {const navigate = useNavigate();const location = useLocation();const isPublicRoute = createMemo(() => isPublicRoutePath(location.pathname));- const infrastructureNavigationVisibility = createMemo(() =>- buildPrimaryInfrastructureNavigationVisibility(runtime.state().resources || []),+ const platformNavigationVisibility = createMemo(() =>+ buildPrimaryPlatformNavigationVisibility(runtime.state().resources || []),);- const infrastructureNavigationResolved = createMemo(() => {+ const platformNavigationResolved = createMemo(() => {const store = runtime.enhancedStore();return Boolean(store?.initialDataReceived?.());});@@ -277,9 +277,9 @@ function App() {if (runtime.isLoading() || runtime.needsAuth() || isPublicRoute()) return;const normalizedPath = location.pathname.replace(/\/+$/, '') || '/';if (normalizedPath !== '/' && normalizedPath !== '/login') return;- if (!infrastructureNavigationResolved()) return;+ if (!platformNavigationResolved()) return;navigate(- getDefaultWorkspaceRoute(infrastructureNavigationVisibility(), hasSettingsAccess()),+ getDefaultWorkspaceRoute(platformNavigationVisibility(), hasSettingsAccess()),{replace: true,},@@ -370,7 +370,7 @@ function App() {useKeyboardShortcuts({enabled: () => !runtime.needsAuth(),- infrastructureVisibility: infrastructureNavigationVisibility,+ platformVisibility: platformNavigationVisibility,isShortcutsOpen: shortcutsOpen,isCommandPaletteOpen: commandPaletteOpen,onToggleShortcuts: () => {@@ -487,14 +487,14 @@ function App() {<KeyboardShortcutsModalisOpen={shortcutsOpen()}onClose={() => setShortcutsOpen(false)}- infrastructureVisibility={infrastructureNavigationVisibility}+ platformVisibility={platformNavigationVisibility}/></Show><Show when={commandPaletteOpen()}><CommandPaletteModalisOpen={commandPaletteOpen()}onClose={() => setCommandPaletteOpen(false)}- infrastructureVisibility={infrastructureNavigationVisibility}+ platformVisibility={platformNavigationVisibility}/></Show><Show when={tokenRevealStore.state() !== null}>diff --git a/frontend-modern/src/AppLayout.tsx b/frontend-modern/src/AppLayout.tsxindex 8fbe7286ac..8897f765ce 100644--- a/frontend-modern/src/AppLayout.tsx+++ b/frontend-modern/src/AppLayout.tsx@@ -18,11 +18,11 @@ import {type MobileNavBarUtilityTab as UtilityTab,} from '@/components/shared/MobileNavBar';import {- buildPrimaryInfrastructureNavigationVisibility,- primaryInfrastructureNavigationIsVisible,- selectFirstVisiblePrimaryInfrastructureNavigationId,- type PrimaryInfrastructureNavId,-} from '@/features/infrastructureNavigation/infrastructureNavigationModel';+ buildPrimaryPlatformNavigationVisibility,+ primaryPlatformNavigationIsVisible,+ selectFirstVisiblePrimaryPlatformNavigationId,+ type PrimaryPlatformNavId,+} from '@/features/platformNavigation/platformNavigationModel';import { dialogStackHasBlockingDialog } from '@/components/shared/useDialogState';import { OrgSwitcher } from '@/components/OrgSwitcher';import { PulsePatrolLogo } from '@/components/Brand/PulsePatrolLogo';@@ -227,10 +227,10 @@ export function AppLayout(props: AppLayoutProps) {setKioskMode(!kioskMode());};- const infrastructureNavigationVisibility = createMemo(() =>- buildPrimaryInfrastructureNavigationVisibility(props.state().resources || []),+ const platformNavigationVisibility = createMemo(() =>+ buildPrimaryPlatformNavigationVisibility(props.state().resources || []),);- const primaryInfrastructureRouteById: Record<PrimaryInfrastructureNavId, string> = {+ const primaryInfrastructureRouteById: Record<PrimaryPlatformNavId, string> = {proxmox: ROOT_PROXMOX_PATH,docker: ROOT_DOCKER_PATH,kubernetes: ROOT_KUBERNETES_PATH,@@ -239,8 +239,8 @@ export function AppLayout(props: AppLayoutProps) {standalone: ROOT_STANDALONE_PATH,};const primaryWorkspacePath = createMemo(() => {- const navId = selectFirstVisiblePrimaryInfrastructureNavigationId(- infrastructureNavigationVisibility(),+ const navId = selectFirstVisiblePrimaryPlatformNavigationId(+ platformNavigationVisibility(),);return navId ? primaryInfrastructureRouteById[navId] : ROOT_ALERTS_PATH;});@@ -326,9 +326,9 @@ export function AppLayout(props: AppLayoutProps) {// appears when the support manifest says the surface is supported and the// current resource snapshot proves that surface is actually present.const primaryTabs = createMemo<PrimaryTab[]>(() => {- const visible = infrastructureNavigationVisibility();+ const visible = platformNavigationVisibility();const isVisible = (id: PrimaryTab['id']) =>- primaryInfrastructureNavigationIsVisible(visible, id as PrimaryInfrastructureNavId);+ primaryPlatformNavigationIsVisible(visible, id as PrimaryPlatformNavId);const allPrimaryTabs: PrimaryTab[] = [{id: 'proxmox',diff --git a/frontend-modern/src/__tests__/App.architecture.test.ts b/frontend-modern/src/__tests__/App.architecture.test.tsindex 62b84f25fe..47dfcae2c7 100644--- a/frontend-modern/src/__tests__/App.architecture.test.ts+++ b/frontend-modern/src/__tests__/App.architecture.test.ts@@ -106,10 +106,10 @@ describe('App architecture', () => {// 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('infrastructureNavigationResolved');- expect(appSource).toContain('buildPrimaryInfrastructureNavigationVisibility');- expect(appLayoutSource).toContain('buildPrimaryInfrastructureNavigationVisibility');- expect(appLayoutSource).toContain('primaryInfrastructureNavigationIsVisible');+ expect(appSource).toContain('platformNavigationResolved');+ expect(appSource).toContain('buildPrimaryPlatformNavigationVisibility');+ expect(appLayoutSource).toContain('buildPrimaryPlatformNavigationVisibility');+ expect(appLayoutSource).toContain('primaryPlatformNavigationIsVisible');expect(appLayoutSource).toContain("label: 'Containers'");expect(appLayoutSource).toContain("'Docker / Podman runtime lens");expect(appLayoutSource).not.toContain("id: 'infrastructure',");diff --git a/frontend-modern/src/components/shared/KeyboardShortcutsModal.tsx b/frontend-modern/src/components/shared/KeyboardShortcutsModal.tsxindex 5863378a8a..0225b18291 100644--- a/frontend-modern/src/components/shared/KeyboardShortcutsModal.tsx+++ b/frontend-modern/src/components/shared/KeyboardShortcutsModal.tsx@@ -1,9 +1,9 @@import { For, createMemo } from 'solid-js';import { Dialog } from '@/components/shared/Dialog';import {- primaryInfrastructureNavigationIsVisible,- type InfrastructureNavigationVisibility,-} from '@/features/infrastructureNavigation/infrastructureNavigationModel';+ primaryPlatformNavigationIsVisible,+ type PlatformNavigationVisibility,+} from '@/features/platformNavigation/platformNavigationModel';interface ShortcutGroup {title: string;@@ -13,7 +13,7 @@ interface ShortcutGroup {interface KeyboardShortcutsModalProps {isOpen: boolean;onClose: () => void;- infrastructureVisibility: () => InfrastructureNavigationVisibility;+ platformVisibility: () => PlatformNavigationVisibility;}const UNIFIED_NAV_SHORTCUTS: ShortcutGroup = {@@ -31,7 +31,7 @@ const UNIFIED_NAV_SHORTCUTS: ShortcutGroup = {],};-const NAV_PRIMARY_SHORTCUTS: Record<string, keyof InfrastructureNavigationVisibility> = {+const NAV_PRIMARY_SHORTCUTS: Record<string, keyof PlatformNavigationVisibility> = {'g then s': 'standalone','g then p': 'proxmox','g then d': 'docker',@@ -52,11 +52,11 @@ const SEARCH_SHORTCUTS: ShortcutGroup = {export function KeyboardShortcutsModal(props: KeyboardShortcutsModalProps) {const shortcutGroups = createMemo<ShortcutGroup[]>(() => {- const infrastructureVisibility = props.infrastructureVisibility();+ const platformVisibility = props.platformVisibility();const visibleNavigationItems = UNIFIED_NAV_SHORTCUTS.items.filter((item) => {const navId = NAV_PRIMARY_SHORTCUTS[item.keys];if (!navId) return true;- return primaryInfrastructureNavigationIsVisible(infrastructureVisibility, navId);+ return primaryPlatformNavigationIsVisible(platformVisibility, navId);});return [{ ...UNIFIED_NAV_SHORTCUTS, items: visibleNavigationItems }, SEARCH_SHORTCUTS];});diff --git a/frontend-modern/src/components/shared/__tests__/CommandPaletteModal.test.tsx b/frontend-modern/src/components/shared/__tests__/CommandPaletteModal.test.tsxindex 4e510077c7..eba26c4ba7 100644--- a/frontend-modern/src/components/shared/__tests__/CommandPaletteModal.test.tsx+++ b/frontend-modern/src/components/shared/__tests__/CommandPaletteModal.test.tsx@@ -5,7 +5,7 @@ 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 { buildPrimaryInfrastructureNavigationVisibility } from '@/features/infrastructureNavigation/infrastructureNavigationModel';+import { buildPrimaryPlatformNavigationVisibility } from '@/features/platformNavigation/platformNavigationModel';const navigateMock = vi.fn();@@ -34,8 +34,8 @@ const makeResource = (overrides: Partial<Resource>): Resource =>...overrides,}) as Resource;-const infrastructureVisibility = () =>- buildPrimaryInfrastructureNavigationVisibility([+const platformVisibility = () =>+ buildPrimaryPlatformNavigationVisibility([makeResource({ id: 'agent-1', type: 'agent', platformType: 'agent' }),makeResource({ id: 'pve-1', type: 'agent', platformType: 'proxmox-pve' }),makeResource({ id: 'docker-1', type: 'docker-host', platformType: 'docker' }),@@ -90,7 +90,7 @@ describe('CommandPaletteModal', () => {<CommandPaletteModalisOpen={true}onClose={vi.fn()}- infrastructureVisibility={infrastructureVisibility}+ platformVisibility={platformVisibility}/>));@@ -122,7 +122,7 @@ describe('CommandPaletteModal', () => {<CommandPaletteModalisOpen={true}onClose={onClose}- infrastructureVisibility={infrastructureVisibility}+ platformVisibility={platformVisibility}/>));@@ -138,7 +138,7 @@ describe('CommandPaletteModal', () => {<CommandPaletteModalisOpen={true}onClose={onClose}- infrastructureVisibility={infrastructureVisibility}+ platformVisibility={platformVisibility}/>));@@ -154,7 +154,7 @@ describe('CommandPaletteModal', () => {<CommandPaletteModalisOpen={true}onClose={onClose}- infrastructureVisibility={infrastructureVisibility}+ platformVisibility={platformVisibility}/>));@@ -171,8 +171,8 @@ describe('CommandPaletteModal', () => {<CommandPaletteModalisOpen={true}onClose={vi.fn()}- infrastructureVisibility={() =>- buildPrimaryInfrastructureNavigationVisibility([+ platformVisibility={() =>+ buildPrimaryPlatformNavigationVisibility([makeResource({ id: 'pve-1', type: 'agent', platformType: 'proxmox-pve' }),])}diff --git a/frontend-modern/src/components/shared/commandPaletteModel.ts b/frontend-modern/src/components/shared/commandPaletteModel.tsindex 6a97799a3b..db1496a697 100644--- a/frontend-modern/src/components/shared/commandPaletteModel.ts+++ b/frontend-modern/src/components/shared/commandPaletteModel.ts@@ -1,12 +1,12 @@import {- primaryInfrastructureNavigationIsVisible,- type InfrastructureNavigationVisibility,-} from '@/features/infrastructureNavigation/infrastructureNavigationModel';+ primaryPlatformNavigationIsVisible,+ type PlatformNavigationVisibility,+} from '@/features/platformNavigation/platformNavigationModel';export interface CommandPaletteModalProps {isOpen: boolean;onClose: () => void;- infrastructureVisibility: () => InfrastructureNavigationVisibility;+ platformVisibility: () => PlatformNavigationVisibility;}export type CommandPaletteModalCommand = {@@ -31,12 +31,12 @@ export type CommandPaletteCommandPaths = {export function buildCommandPaletteCommands(options: {paths: CommandPaletteCommandPaths;- infrastructureVisibility: InfrastructureNavigationVisibility;+ platformVisibility: PlatformNavigationVisibility;navigate: (path: string) => void;}): CommandPaletteModalCommand[] {const commands: CommandPaletteModalCommand[] = [];- if (primaryInfrastructureNavigationIsVisible(options.infrastructureVisibility, 'proxmox')) {+ if (primaryPlatformNavigationIsVisible(options.platformVisibility, 'proxmox')) {commands.push({id: 'nav-proxmox',label: 'Go to Proxmox',@@ -47,7 +47,7 @@ export function buildCommandPaletteCommands(options: {});}- if (primaryInfrastructureNavigationIsVisible(options.infrastructureVisibility, 'docker')) {+ if (primaryPlatformNavigationIsVisible(options.platformVisibility, 'docker')) {commands.push({id: 'nav-docker',label: 'Go to Containers',@@ -58,7 +58,7 @@ export function buildCommandPaletteCommands(options: {});}- if (primaryInfrastructureNavigationIsVisible(options.infrastructureVisibility, 'kubernetes')) {+ if (primaryPlatformNavigationIsVisible(options.platformVisibility, 'kubernetes')) {commands.push({id: 'nav-kubernetes',@@ -78,7 +78,7 @@ export function buildCommandPaletteCommands(options: {);}- if (primaryInfrastructureNavigationIsVisible(options.infrastructureVisibility, 'truenas')) {+ if (primaryPlatformNavigationIsVisible(options.platformVisibility, 'truenas')) {commands.push({id: 'nav-truenas',label: 'Go to TrueNAS',@@ -89,7 +89,7 @@ export function buildCommandPaletteCommands(options: {});}- if (primaryInfrastructureNavigationIsVisible(options.infrastructureVisibility, 'vmware')) {+ if (primaryPlatformNavigationIsVisible(options.platformVisibility, 'vmware')) {commands.push({id: 'nav-vmware',@@ -109,7 +109,7 @@ export function buildCommandPaletteCommands(options: {);}- if (primaryInfrastructureNavigationIsVisible(options.infrastructureVisibility, 'standalone')) {+ if (primaryPlatformNavigationIsVisible(options.platformVisibility, 'standalone')) {commands.push({id: 'nav-standalone',label: 'Go to Machines',diff --git a/frontend-modern/src/components/shared/useCommandPaletteState.ts b/frontend-modern/src/components/shared/useCommandPaletteState.tsindex b907f8e686..ba4536693e 100644--- a/frontend-modern/src/components/shared/useCommandPaletteState.ts+++ b/frontend-modern/src/components/shared/useCommandPaletteState.ts@@ -34,7 +34,7 @@ export function useCommandPaletteState(props: CommandPaletteModalProps) {vmwarePath: buildVmwarePath(),vmwareNetworksPath: buildVmwarePath('networks'),},- infrastructureVisibility: props.infrastructureVisibility(),+ platformVisibility: props.platformVisibility(),navigate,}),);diff --git a/frontend-modern/src/features/infrastructureNavigation/__tests__/infrastructureNavigationModel.test.ts b/frontend-modern/src/features/infrastructureNavigation/__tests__/infrastructureNavigationModel.test.tsdeleted file mode 100644index 3c35cffe1e..0000000000--- a/frontend-modern/src/features/infrastructureNavigation/__tests__/infrastructureNavigationModel.test.ts+++ /dev/null@@ -1,232 +0,0 @@-import { describe, expect, it } from 'vitest';-import type { Resource } from '@/types/resource';-import {- buildPrimaryInfrastructureNavigationVisibility,- collectResourcePlatformEvidence,- selectFirstVisiblePrimaryInfrastructureNavigationId,-} from '../infrastructureNavigationModel';--const resource = (overrides: Partial<Resource>): Resource =>- ({- id: overrides.id ?? 'resource-1',- name: overrides.name ?? overrides.id ?? 'resource-1',- displayName: overrides.displayName ?? overrides.name ?? overrides.id ?? 'resource-1',- type: overrides.type ?? 'agent',- platformId: overrides.platformId ?? 'platform-1',- platformType: overrides.platformType ?? 'agent',- sourceType: overrides.sourceType ?? 'api',- status: overrides.status ?? 'online',- lastSeen: overrides.lastSeen ?? 1_700_000_000_000,- ...overrides,- }) as Resource;--describe('infrastructureNavigationModel', () => {- it('shows primary infrastructure destinations only when supported or admitted resource evidence is present', () => {- expect(buildPrimaryInfrastructureNavigationVisibility([])).toEqual({- proxmox: false,- docker: false,- kubernetes: false,- truenas: false,- vmware: false,- standalone: false,- });-- expect(- buildPrimaryInfrastructureNavigationVisibility([- resource({ id: 'agent-1', platformType: 'agent', type: 'agent' }),- resource({ id: 'pve-1', platformType: 'proxmox-pve', type: 'agent' }),- resource({- id: 'pod-1',- platformType: 'agent',- type: 'pod',- platformData: { sources: ['kubernetes'] },- }),- resource({ id: 'truenas-1', platformType: 'truenas', type: 'agent' }),- resource({ id: 'vcenter-1', platformType: 'vmware-vsphere', type: 'vm' }),- ]),- ).toEqual({- proxmox: true,- docker: false,- kubernetes: true,- truenas: true,- vmware: true,- standalone: true,- });- });-- it('derives Proxmox suite evidence from canonical PBS and PMG resource types', () => {- expect(collectResourcePlatformEvidence(resource({ id: 'pbs-1', type: 'pbs' }))).toContain(- 'proxmox-pbs',- );- expect(collectResourcePlatformEvidence(resource({ id: 'pmg-1', type: 'pmg' }))).toContain(- 'proxmox-pmg',- );- expect(- buildPrimaryInfrastructureNavigationVisibility([resource({ id: 'pmg-1', type: 'pmg' })])- .proxmox,- ).toBe(true);- });-- it('uses canonical platform scopes before incidental runtime facets', () => {- expect(- collectResourcePlatformEvidence(- resource({- id: 'truenas-app-nextcloud',- type: 'app-container',- platformType: 'truenas',- platformScopes: ['truenas'],- docker: {- runtime: 'docker',- },- }),- ),- ).toEqual(['truenas']);-- expect(- buildPrimaryInfrastructureNavigationVisibility([- resource({- id: 'truenas-app-nextcloud',- type: 'app-container',- platformType: 'truenas',- platformScopes: ['truenas'],- docker: {- runtime: 'docker',- },- }),- ]),- ).toEqual({- proxmox: false,- docker: false,- kubernetes: false,- truenas: true,- vmware: false,- standalone: false,- });-- expect(- buildPrimaryInfrastructureNavigationVisibility([- resource({- id: 'docker-container-frigate-141',- type: 'app-container',- platformType: 'docker',- platformScopes: ['proxmox-pve', 'docker'],- docker: {- runtime: 'docker',- hostSourceId: 'proxmox-lxc-docker:pve-a:node-a:141',- },- }),- ]),- ).toMatchObject({- proxmox: true,- docker: true,- });- });-- it('does not show Standalone for incidental agent platform hints on non-agent resources', () => {- expect(- buildPrimaryInfrastructureNavigationVisibility([- resource({ id: 'pod-1', type: 'pod', platformType: 'agent' }),- resource({ id: 'pve-node-1', type: 'agent', platformType: 'proxmox-pve' }),- ]).standalone,- ).toBe(false);- });-- it('shows Standalone for agent-primary machine source evidence', () => {- expect(- buildPrimaryInfrastructureNavigationVisibility([- resource({- id: 'mac-mini-1',- type: 'agent',- platformType: 'agent',- sourceType: 'agent',- sources: ['agent'],- platformScopes: ['agent'],- }),- ]).standalone,- ).toBe(true);- });-- it('shows Standalone for agentless availability endpoints', () => {- expect(- buildPrimaryInfrastructureNavigationVisibility([- resource({- id: 'mqtt-meter',- type: 'network-endpoint',- platformType: 'availability',- sourceType: 'api',- sources: ['availability'],- }),- ]).standalone,- ).toBe(true);- });-- it('does not show Standalone for provider-owned host rows even when the agent source is present', () => {- expect(- buildPrimaryInfrastructureNavigationVisibility([- resource({- id: 'pve-node-1',- type: 'agent',- platformType: 'proxmox-pve',- sourceType: 'hybrid',- sources: ['proxmox', 'agent'],- platformScopes: ['agent', 'proxmox-pve'],- }),- resource({- id: 'esxi-host-1',- type: 'agent',- platformType: 'vmware-vsphere',- sourceType: 'api',- sources: ['vmware'],- platformScopes: ['agent', 'vmware-vsphere'],- agent: { agentId: 'vc-host-101', platform: 'vmware-vsphere' },- }),- ]).standalone,- ).toBe(false);- });-- it('selects provider platforms before Standalone using the canonical primary navigation order', () => {- expect(- selectFirstVisiblePrimaryInfrastructureNavigationId({- proxmox: true,- docker: false,- kubernetes: false,- truenas: false,- vmware: false,- standalone: true,- }),- ).toBe('proxmox');-- expect(- selectFirstVisiblePrimaryInfrastructureNavigationId({- proxmox: false,- docker: false,- kubernetes: true,- truenas: true,- vmware: false,- standalone: false,- }),- ).toBe('kubernetes');-- expect(- selectFirstVisiblePrimaryInfrastructureNavigationId({- proxmox: false,- docker: false,- kubernetes: false,- truenas: false,- vmware: false,- standalone: true,- }),- ).toBe('standalone');-- expect(- selectFirstVisiblePrimaryInfrastructureNavigationId({- proxmox: false,- docker: false,- kubernetes: false,- truenas: false,- vmware: false,- standalone: false,- }),- ).toBeNull();- });-});diff --git a/frontend-modern/src/features/platformNavigation/__tests__/platformNavigationModel.test.ts b/frontend-modern/src/features/platformNavigation/__tests__/platformNavigationModel.test.tsnew file mode 100644index 0000000000..932ad9ffef--- /dev/null+++ b/frontend-modern/src/features/platformNavigation/__tests__/platformNavigationModel.test.ts@@ -0,0 +1,66 @@+import { describe, expect, it } from 'vitest';+import type { Resource } from '@/types/resource';+import {+ buildPrimaryPlatformNavigationVisibility,+ collectResourcePlatformEvidence,+} from '../platformNavigationModel';++const resource = (overrides: Partial<Resource>): Resource =>+ ({+ id: overrides.id ?? 'resource-1',+ name: overrides.name ?? overrides.id ?? 'resource-1',+ displayName: overrides.displayName ?? overrides.name ?? overrides.id ?? 'resource-1',+ type: overrides.type ?? 'agent',+ platformId: overrides.platformId ?? 'platform-1',+ platformType: overrides.platformType ?? 'agent',+ sourceType: overrides.sourceType ?? 'api',+ status: overrides.status ?? 'online',+ lastSeen: overrides.lastSeen ?? 1_700_000_000_000,+ ...overrides,+ }) as Resource;++describe('platformNavigationModel', () => {+ it('shows primary platform destinations only when supported resource evidence is present', () => {+ expect(buildPrimaryPlatformNavigationVisibility([])).toEqual({+ proxmox: false,+ docker: false,+ kubernetes: false,+ truenas: false,+ vmware: false,+ standalone: false,+ });++ expect(+ buildPrimaryPlatformNavigationVisibility([+ resource({ id: 'pve-1', platformType: 'proxmox-pve', type: 'agent' }),+ resource({+ id: 'pod-1',+ platformType: 'agent',+ type: 'pod',+ platformData: { sources: ['kubernetes'] },+ }),+ resource({ id: 'truenas-1', platformType: 'truenas', type: 'agent' }),+ resource({ id: 'vcenter-1', platformType: 'vmware-vsphere', type: 'vm' }),+ ]),+ ).toEqual({+ proxmox: true,+ docker: false,+ kubernetes: true,+ truenas: true,+ vmware: true,+ standalone: false,+ });+ });++ it('derives Proxmox suite evidence from canonical PBS and PMG resource types', () => {+ expect(collectResourcePlatformEvidence(resource({ id: 'pbs-1', type: 'pbs' }))).toContain(+ 'proxmox-pbs',+ );+ expect(collectResourcePlatformEvidence(resource({ id: 'pmg-1', type: 'pmg' }))).toContain(+ 'proxmox-pmg',+ );+ expect(+ buildPrimaryPlatformNavigationVisibility([resource({ id: 'pmg-1', type: 'pmg' })]).proxmox,+ ).toBe(true);+ });+});diff --git a/frontend-modern/src/features/infrastructureNavigation/infrastructureNavigationModel.ts b/frontend-modern/src/features/platformNavigation/platformNavigationModel.tssimilarity index 74%rename from frontend-modern/src/features/infrastructureNavigation/infrastructureNavigationModel.tsrename to frontend-modern/src/features/platformNavigation/platformNavigationModel.tsindex ad7cbf3a81..c2a8a76558 100644--- a/frontend-modern/src/features/infrastructureNavigation/infrastructureNavigationModel.ts+++ b/frontend-modern/src/features/platformNavigation/platformNavigationModel.ts@@ -9,7 +9,7 @@ import {} from '@/utils/platformSupportManifest';import { normalizeSourcePlatformKey, resolveResourcePlatformType } from '@/utils/sourcePlatforms';-export type PrimaryInfrastructureNavId =+export type PrimaryPlatformNavId =| 'proxmox'| 'docker'| 'kubernetes'@@ -17,14 +17,14 @@ export type PrimaryInfrastructureNavId =| 'vmware'| 'standalone';-export type InfrastructureNavigationVisibility = Record<PrimaryInfrastructureNavId, boolean>;+export type PlatformNavigationVisibility = Record<PrimaryPlatformNavId, boolean>;-export type InfrastructureNavigationShortcut = {+export type PlatformNavigationShortcut = {key: string;route: string;};-export const PRIMARY_INFRASTRUCTURE_NAV_IDS: readonly PrimaryInfrastructureNavId[] = [+export const PRIMARY_PLATFORM_NAV_IDS: readonly PrimaryPlatformNavId[] = ['proxmox','docker','kubernetes',@@ -33,8 +33,8 @@ export const PRIMARY_INFRASTRUCTURE_NAV_IDS: readonly PrimaryInfrastructureNavId'standalone',] as const;-export const PRIMARY_INFRASTRUCTURE_NAV_SCOPE_IDS: Record<- PrimaryInfrastructureNavId,+export const PRIMARY_PLATFORM_NAV_SCOPE_IDS: Record<+ PrimaryPlatformNavId,readonly string[]> = {proxmox: ['proxmox-pve', 'proxmox-pbs', 'proxmox-pmg'],@@ -140,7 +140,7 @@ export function collectResourcePlatformEvidence(resource: Resource): string[] {return [...ids];}-export function buildNavigableResourceInfrastructureScopeSet(+export function buildNavigableResourcePlatformScopeSet(resources: readonly Resource[],): Set<string> {const present = new Set<string>();@@ -156,10 +156,10 @@ export function buildNavigableResourceInfrastructureScopeSet(return present;}-export function buildPrimaryInfrastructureNavigationVisibility(+export function buildPrimaryPlatformNavigationVisibility(resources: readonly Resource[],-): InfrastructureNavigationVisibility {- const presentNavigableScopes = buildNavigableResourceInfrastructureScopeSet(resources);+): PlatformNavigationVisibility {+ const presentNavigableScopes = buildNavigableResourcePlatformScopeSet(resources);const hasAvailabilityEndpoints = resources.some((resource) =>resource.type === 'network-endpoint' ||@@ -167,50 +167,50 @@ export function buildPrimaryInfrastructureNavigationVisibility(resource.sources?.includes('availability'),);return {- proxmox: PRIMARY_INFRASTRUCTURE_NAV_SCOPE_IDS.proxmox.some((id) =>+ proxmox: PRIMARY_PLATFORM_NAV_SCOPE_IDS.proxmox.some((id) =>presentNavigableScopes.has(id),),- docker: PRIMARY_INFRASTRUCTURE_NAV_SCOPE_IDS.docker.some((id) =>+ docker: PRIMARY_PLATFORM_NAV_SCOPE_IDS.docker.some((id) =>presentNavigableScopes.has(id),),- kubernetes: PRIMARY_INFRASTRUCTURE_NAV_SCOPE_IDS.kubernetes.some((id) =>+ kubernetes: PRIMARY_PLATFORM_NAV_SCOPE_IDS.kubernetes.some((id) =>presentNavigableScopes.has(id),),- truenas: PRIMARY_INFRASTRUCTURE_NAV_SCOPE_IDS.truenas.some((id) =>+ truenas: PRIMARY_PLATFORM_NAV_SCOPE_IDS.truenas.some((id) =>presentNavigableScopes.has(id),),- vmware: PRIMARY_INFRASTRUCTURE_NAV_SCOPE_IDS.vmware.some((id) =>+ vmware: PRIMARY_PLATFORM_NAV_SCOPE_IDS.vmware.some((id) =>presentNavigableScopes.has(id),),standalone: resources.some(isPulseAgentPlatformResource) || hasAvailabilityEndpoints,};}-export function primaryInfrastructureNavigationIsVisible(- visibility: InfrastructureNavigationVisibility,- navId: PrimaryInfrastructureNavId,+export function primaryPlatformNavigationIsVisible(+ visibility: PlatformNavigationVisibility,+ navId: PrimaryPlatformNavId,): boolean {return visibility[navId] === true;}-export function selectFirstVisiblePrimaryInfrastructureNavigationId(- visibility: InfrastructureNavigationVisibility,-): PrimaryInfrastructureNavId | null {+export function selectFirstVisiblePrimaryPlatformNavigationId(+ visibility: PlatformNavigationVisibility,+): PrimaryPlatformNavId | null {return (- PRIMARY_INFRASTRUCTURE_NAV_IDS.find((navId) =>- primaryInfrastructureNavigationIsVisible(visibility, navId),+ PRIMARY_PLATFORM_NAV_IDS.find((navId) =>+ primaryPlatformNavigationIsVisible(visibility, navId),) ?? null);}-export function filterInfrastructureNavigationShortcuts(- shortcuts: Record<string, InfrastructureNavigationShortcut>,- visibility: InfrastructureNavigationVisibility,+export function filterPlatformNavigationShortcuts(+ shortcuts: Record<string, PlatformNavigationShortcut>,+ visibility: PlatformNavigationVisibility,): Record<string, string> {const routes: Record<string, string> = {};for (const [navId, shortcut] of Object.entries(shortcuts)) {if (- !primaryInfrastructureNavigationIsVisible(visibility, navId as PrimaryInfrastructureNavId)+ !primaryPlatformNavigationIsVisible(visibility, navId as PrimaryPlatformNavId)) {continue;}@@ -219,7 +219,7 @@ export function filterInfrastructureNavigationShortcuts(return routes;}-export function createEmptyInfrastructureNavigationVisibility(): InfrastructureNavigationVisibility {+export function createEmptyPlatformNavigationVisibility(): PlatformNavigationVisibility {return {proxmox: false,docker: false,@@ -230,8 +230,8 @@ export function createEmptyInfrastructureNavigationVisibility(): InfrastructureN};}-export function infrastructureNavigationVisibilityFromResources(+export function platformNavigationVisibilityFromResources(resources: Accessor<readonly Resource[]>,-): InfrastructureNavigationVisibility {- return buildPrimaryInfrastructureNavigationVisibility(resources());+): PlatformNavigationVisibility {+ return buildPrimaryPlatformNavigationVisibility(resources());}diff --git a/frontend-modern/src/hooks/useKeyboardShortcuts.ts b/frontend-modern/src/hooks/useKeyboardShortcuts.tsindex d3ae58b833..6a90098157 100644--- a/frontend-modern/src/hooks/useKeyboardShortcuts.ts+++ b/frontend-modern/src/hooks/useKeyboardShortcuts.ts@@ -9,10 +9,10 @@ import {buildVmwarePath,} from '@/routing/resourceLinks';import {- createEmptyInfrastructureNavigationVisibility,- filterInfrastructureNavigationShortcuts,- type InfrastructureNavigationVisibility,-} from '@/features/infrastructureNavigation/infrastructureNavigationModel';+ createEmptyPlatformNavigationVisibility,+ filterPlatformNavigationShortcuts,+ type PlatformNavigationVisibility,+} from '@/features/platformNavigation/platformNavigationModel';import { focusActiveTypeToSearch } from '@/hooks/useTypeToSearch';type KeyboardShortcutsOptions = {@@ -26,7 +26,7 @@ type KeyboardShortcutsOptions = {onCloseCommandPalette?: () => void;onToggleCommandPalette?: () => void;onFocusSearch?: () => boolean | void;- infrastructureVisibility?: Accessor<InfrastructureNavigationVisibility>;+ platformVisibility?: Accessor<PlatformNavigationVisibility>;};const isEditableTarget = (target: EventTarget | null): boolean => {@@ -83,9 +83,9 @@ export function useKeyboardShortcuts(options: KeyboardShortcutsOptions = {}) {};const getRoutes = (): Record<string, string> => {- const infrastructureVisibility =- options.infrastructureVisibility?.() ?? createEmptyInfrastructureNavigationVisibility();- const infrastructureRoutes = filterInfrastructureNavigationShortcuts(+ const platformVisibility =+ options.platformVisibility?.() ?? createEmptyPlatformNavigationVisibility();+ const infrastructureRoutes = filterPlatformNavigationShortcuts({proxmox: { key: 'p', route: buildProxmoxPath() },docker: { key: 'd', route: buildDockerPath() },@@ -94,7 +94,7 @@ export function useKeyboardShortcuts(options: KeyboardShortcutsOptions = {}) {vmware: { key: 'v', route: buildVmwarePath() },standalone: { key: 's', route: buildStandalonePath() },},- infrastructureVisibility,+ platformVisibility,);return {...infrastructureRoutes,diff --git a/tests/integration/tests/99-visual-crawl.spec.ts b/tests/integration/tests/99-visual-crawl.spec.tsnew file mode 100644index 0000000000..fc9701a401--- /dev/null+++ b/tests/integration/tests/99-visual-crawl.spec.ts@@ -0,0 +1,185 @@+import fs from "node:fs";+import path from "node:path";+import { fileURLToPath } from "node:url";+import { test, expect } from "@playwright/test";+import { ensureAuthenticated, apiRequest } from "./helpers";++const __dirname = path.dirname(fileURLToPath(import.meta.url));++const CRAWL_PAGES = [+ // Platform-shaped top-level pages+ { name: "Proxmox", url: "/proxmox" },+ { name: "Proxmox PVE", url: "/proxmox/pve" },+ { name: "Proxmox PBS", url: "/proxmox/pbs" },+ { name: "Proxmox Mail Gateway", url: "/proxmox/mail" },+ { name: "Proxmox Backups", url: "/proxmox/backups" },+ { name: "Proxmox Storage", url: "/proxmox/storage" },+ { name: "Proxmox Replication", url: "/proxmox/replication" },+ { name: "Proxmox Ceph", url: "/proxmox/ceph" },+ { name: "Docker", url: "/docker" },+ { name: "Kubernetes", url: "/kubernetes" },+ { name: "Kubernetes Nodes", url: "/kubernetes/nodes" },+ { name: "Kubernetes Deployments", url: "/kubernetes/deployments" },+ { name: "Kubernetes Config", url: "/kubernetes/config" },+ { name: "TrueNAS", url: "/truenas" },+ { name: "VMware", url: "/vmware" },+ { name: "Standalone (Machines)", url: "/standalone" },++ // Alerts, Patrol+ { name: "Alerts Overview", url: "/alerts/overview" },+ { name: "Alerts History", url: "/alerts/history" },+ { name: "Alerts Rules", url: "/alerts/rules" },+ { name: "Patrol", url: "/patrol" },++ // Settings (Representative Tabs)+ { name: "Settings General", url: "/settings/system-general" },+ { name: "Settings Network", url: "/settings/system-network" },+ { name: "Settings Updates", url: "/settings/system-updates" },+ { name: "Settings Recovery", url: "/settings/system-recovery" },+ { name: "Settings AI", url: "/settings/system-ai" },+ { name: "Settings Infrastructure", url: "/settings/infrastructure" },+ { name: "Settings Security Overview", url: "/settings/security-overview" },+ { name: "Settings API Access", url: "/settings/api" },+ { name: "Settings Authentication", url: "/settings/security-auth" },+ { name: "Settings SSO", url: "/settings/security-sso" },+ { name: "Settings Roles", url: "/settings/security-roles" },+ { name: "Settings Users", url: "/settings/security-users" },+ { name: "Settings Audit Log", url: "/settings/security-audit" },+ { name: "Settings Webhooks", url: "/settings/security-webhooks" },+ { name: "Settings Remote Access", url: "/settings/system-relay" },+];++test.describe("Pulse Visual Crawl & Inspection", () => {+ test.setTimeout(300_000); // 5 minutes++ test("crawls all pages to inspect layout, headings, inputs, tables, and colors", async ({ page }, testInfo) => {+ // 1. Authenticate+ await ensureAuthenticated(page);++ const results: any[] = [];+ const screenshotDir = path.resolve(__dirname, "..", "..", "tmp", "visual-crawl-screenshots");+ fs.mkdirSync(screenshotDir, { recursive: true });++ // Set desktop screen size+ await page.setViewportSize({ width: 1440, height: 900 });++ for (const surface of CRAWL_PAGES) {+ console.log(`\n--- Inspecting Page: ${surface.name} (${surface.url}) ---`);++ // Navigate+ await page.goto(surface.url, { waitUntil: "domcontentloaded" });++ // Wait for page load indicators or give it a brief time to settle+ await page.waitForTimeout(1000);++ // Take a screenshot+ const safeName = surface.name.replace(/[^a-zA-Z0-9]/g, "_").toLowerCase();+ const screenshotPath = path.join(screenshotDir, `${safeName}.png`);+ await page.screenshot({ path: screenshotPath });+ console.log(`[Screenshot Saved] -> ${screenshotPath}`);++ // Extract DOM analysis+ const analysis = await page.evaluate((info) => {+ // A. Heading Analysis+ const h1Elements = Array.from(document.querySelectorAll("h1"));+ const headings = h1Elements.map(el => {+ const rect = el.getBoundingClientRect();+ return {+ text: el.textContent?.replace(/\s+/g, ' ').trim() || "",+ tag: el.tagName.toLowerCase(),+ class: el.getAttribute("class") || "",+ rect: { x: Math.round(rect.x), y: Math.round(rect.y), width: Math.round(rect.width), height: Math.round(rect.height) }+ };+ });++ // B. Search / Filters Analysis+ const inputs = Array.from(document.querySelectorAll("input, select, button")).map(el => {+ const tagName = el.tagName.toLowerCase();+ const type = el.getAttribute("type") || "";+ const placeholder = el.getAttribute("placeholder") || "";+ const ariaLabel = el.getAttribute("aria-label") || "";+ const text = el.textContent?.trim() || "";+ const className = el.getAttribute("class") || "";++ // Match inputs/selects/buttons that act as search or filters+ const isFilterSearch =+ tagName === "input" && (type === "search" || placeholder.toLowerCase().includes("search") || placeholder.toLowerCase().includes("filter") || ariaLabel.toLowerCase().includes("search") || ariaLabel.toLowerCase().includes("filter"))+ || tagName === "select"+ || (tagName === "button" && (ariaLabel.toLowerCase().includes("filter") || text.toLowerCase().includes("filter")));++ if (!isFilterSearch) return null;+ const rect = el.getBoundingClientRect();+ return {+ tag: tagName,+ type,+ placeholder,+ ariaLabel,+ text: text.slice(0, 60),+ class: className,+ rect: { x: Math.round(rect.x), y: Math.round(rect.y), width: Math.round(rect.width), height: Math.round(rect.height) }+ };+ }).filter(Boolean);++ // C. Table Analysis+ const tables = Array.from(document.querySelectorAll("table")).map(t => {+ const headerCells = Array.from(t.querySelectorAll("thead th, thead td")).map(c => c.textContent?.trim() || "");+ const bodyRowCount = t.querySelectorAll("tbody tr").length;+ const rect = t.getBoundingClientRect();+ return {+ headers: headerCells,+ rowCount: bodyRowCount,+ rect: { x: Math.round(rect.x), y: Math.round(rect.y), width: Math.round(rect.width), height: Math.round(rect.height) }+ };+ });++ // D. Color Class Violation Analysis+ // We look for elements having hardcoded raw color classes like "bg-gray-", "text-slate-", "border-zinc-", "bg-white", "bg-black" etc.+ const allElements = Array.from(document.querySelectorAll("*"));+ const rawColorViolations: string[] = [];++ allElements.forEach(el => {+ const classes = el.getAttribute("class") || "";+ // Look for raw Tailwind grey/slate/blue colors or hardcoded white/black background/text combinations+ const classList = classes.split(/\s+/);+ classList.forEach(cls => {+ const isRawColor = /^(bg|text|border)-(gray|slate|zinc|neutral|stone|slate|white|black|red|green|blue|yellow)-\d+$/.test(cls)+ || /^(bg|text|border)-(white|black)$/.test(cls);++ // Exclude common safe things or icons if necessary+ if (isRawColor) {+ const tag = el.tagName.toLowerCase();+ const textContent = el.textContent?.trim().slice(0, 30) || "";+ rawColorViolations.push(`${tag}[text="${textContent}"]: class="${cls}"`);+ }+ });+ });++ return {+ headings,+ inputs,+ tables,+ rawColorViolations: rawColorViolations.slice(0, 15) // Limit output+ };+ }, surface);++ console.log(`Headings detected:`, analysis.headings);+ console.log(`Search / filter elements:`, analysis.inputs);+ console.log(`Tables:`, analysis.tables);+ if (analysis.rawColorViolations.length > 0) {+ console.log(`⚠️ Raw Color Class Violations:`, analysis.rawColorViolations);+ }++ results.push({+ name: surface.name,+ url: surface.url,+ analysis,+ screenshotPath+ });+ }++ // Write final analysis summary report to workspace JSON for review+ const reportsPath = path.resolve(__dirname, "..", "..", "tmp", "visual-crawl-report.json");+ fs.writeFileSync(reportsPath, JSON.stringify(results, null, 2), "utf8");+ console.log(`\n✅ Visual Crawl completed. Detailed report written to ${reportsPath}`);+ });+});