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
Surface discovery scan status in infrastructure settings
rcourtmane7c091b63f66
diff --git a/docs/release-control/v6/internal/status.json b/docs/release-control/v6/internal/status.jsonindex c1ec4d204f..90a15b3815 100644--- a/docs/release-control/v6/internal/status.json+++ b/docs/release-control/v6/internal/status.json@@ -6740,7 +6740,7 @@},{"id": "agent-native-continuous-discovery-findings",- "summary": "Track the agent-native reconciliation loop beyond one-shot LAN discovery: continuous discovery should surface newly detected, unconfigured infrastructure candidates as durable findings that agents can investigate, plan, approve, and resolve by validating credentials and adding the source through the canonical provisioning capabilities.",+ "summary": "Track the agent-native reconciliation loop beyond one-shot LAN discovery: manual and continuous discovery should keep scan state, scope, results, and candidate review visible from Connected systems, and newly detected unconfigured infrastructure candidates should become durable findings that agents can investigate, plan, approve, and resolve by validating credentials and adding the source through the canonical provisioning capabilities.","owner": "project-owner","status": "planned","recorded_at": "2026-05-28",diff --git a/docs/release-control/v6/internal/subsystems/agent-lifecycle.md b/docs/release-control/v6/internal/subsystems/agent-lifecycle.mdindex 1a236c3305..7db0d65dd7 100644--- a/docs/release-control/v6/internal/subsystems/agent-lifecycle.md+++ b/docs/release-control/v6/internal/subsystems/agent-lifecycle.md@@ -413,6 +413,15 @@ compact: `Add infrastructure` remains the obvious action, the setup summary isone short status strip, and detailed governance/fleet state stays in thesystems table rows or deeper fleet surfaces instead of expanding into duplicateexplanatory bands above the table.+Network discovery is the exception because manual scans are an operator command+whose progress must be observable in the source manager. `InfrastructureSourceManager.tsx`+must keep one explicit Network discovery band above the setup summary that+shows the current enabled/scanning/error/result state, scan scope, last scan+metadata, and review action for discovered candidates before anything is added.+Its copy must describe only the platform APIs represented by the LAN discovery+candidate model, and it must not imply TrueNAS, VMware, Docker, Kubernetes, or+agent command discovery when this source-manager path cannot surface those+candidates.Reported agent-backed host profiles must be visible at the source-managergrouping level without changing the canonical connection type: an Unraid agentrow stays `agent` internally, but the connected-systems table groups it underdiff --git a/docs/release-control/v6/internal/subsystems/frontend-primitives.md b/docs/release-control/v6/internal/subsystems/frontend-primitives.mdindex eaa8fffe06..6e8de15c0d 100644--- a/docs/release-control/v6/internal/subsystems/frontend-primitives.md+++ b/docs/release-control/v6/internal/subsystems/frontend-primitives.md@@ -663,14 +663,15 @@ not a replacement status card, CTA band, or page-local nested card.and local edit flows stay single-purpose instead of stacking multiplepage-level workspaces at once.The source-manager landing now also owns the explicit discovery strip for- that destination. `InfrastructureSourceManager.tsx` may expose a compact- discovery status line plus `Run discovery` and `Discovery settings`- actions from the shared landing shell, but it must not start a network scan- just because the page rendered. New-source admission belongs on the table's- per-platform `Add` actions or the compact first-run/readiness actions rather- than in the discovery strip, and the direct address-probe utility may appear- as first-run setup guidance while header discovery actions remain dedicated- to saved network scanning.+ that destination. `InfrastructureSourceManager.tsx` exposes one Network+ discovery status/action band from the shared landing shell with scan state,+ saved scope, last result metadata, errors, `Run discovery`, `Discovery+ settings`, and candidate review when discovered sources are waiting. It must+ not start a network scan just because the page rendered. New-source+ admission belongs on the table's per-platform `Add` actions, the compact+ first-run/readiness actions, or the discovery band's explicit review action,+ and the direct address-probe utility may appear as first-run setup guidance+ instead of a second saved-network-scan command.Discovered API-backed candidates stay visible in the same platform-grouptable as configured sources, using the existing tree/table hierarchyinstead of spawning a second discovery-only page or card stack.diff --git a/frontend-modern/src/components/Settings/InfrastructureSourceManager.tsx b/frontend-modern/src/components/Settings/InfrastructureSourceManager.tsxindex 53071af997..89225ed6ba 100644--- a/frontend-modern/src/components/Settings/InfrastructureSourceManager.tsx+++ b/frontend-modern/src/components/Settings/InfrastructureSourceManager.tsx@@ -8,7 +8,7 @@ import {type Accessor,type Component,} from 'solid-js';-import { Cpu, Plus, RotateCw, Search, SlidersHorizontal } from 'lucide-solid';+import { AlertTriangle, Cpu, Plus, RotateCw, Search, SlidersHorizontal } from 'lucide-solid';import SettingsPanel from '@/components/shared/SettingsPanel';import {Table,@@ -65,14 +65,18 @@ const inlineButtonClass =// to an existing platform without competing with the primary CTA.const addSectionButtonClass ='inline-flex items-center justify-center gap-1 rounded px-2 py-0.5 text-xs font-medium text-blue-700 transition-colors hover:bg-blue-50 dark:text-blue-300 dark:hover:bg-blue-950/30';-const utilityToolbarButtonClass =- 'inline-flex min-h-9 items-center justify-center gap-1.5 rounded-md border border-transparent px-2.5 py-2 text-sm font-medium text-muted transition-colors hover:border-border hover:bg-surface hover:text-base-content disabled:cursor-not-allowed disabled:opacity-60';const workspacePrimaryButtonClass ='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 disabled:cursor-not-allowed disabled:opacity-60';const workspaceSecondaryButtonClass ='inline-flex min-h-9 items-center justify-center gap-2 rounded-md border border-border bg-surface px-3 py-2 text-sm font-medium text-base-content transition-colors hover:bg-surface-hover disabled:cursor-not-allowed disabled:opacity-60';+const discoveryPrimaryButtonClass =+ '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 disabled:cursor-not-allowed disabled:opacity-60';+const discoverySecondaryButtonClass =+ 'inline-flex min-h-9 items-center justify-center gap-2 rounded-md border border-border bg-surface px-3 py-2 text-sm font-medium text-base-content transition-colors hover:bg-surface-hover disabled:cursor-not-allowed disabled:opacity-60';const discoveryRowClass ='border-b border-border-subtle bg-blue-50/30 hover:bg-blue-50/40 dark:bg-blue-950/10 dark:hover:bg-blue-950/20';+const discoveryScanTargetLabel =+ 'Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway APIs';// The system column shows just the name on a single line. The OS / version// (standalone) or cluster identity (cluster) descriptor that used to sit on a// second line moves into the name's hover title, so every row stays one line@@ -123,6 +127,21 @@ const formatRelativeTimestamp = (value?: number): string | undefined => {return `${days}d ago`;};+const discoverySubnetLabel = (status: DiscoveryScanStatus): string => {+ const subnet = status.subnet?.trim();+ if (!subnet || subnet.toLowerCase() === 'auto') {+ return 'auto-detected networks';+ }+ return subnet;+};++const discoveryErrorSummary = (errors?: readonly string[]): string | undefined => {+ const normalized = (errors ?? []).map((error) => error.trim()).filter(Boolean);+ if (normalized.length === 0) return undefined;+ if (normalized.length === 1) return normalized[0];+ return `${normalized.length} scan issues reported`;+};+const discoveredServerName = (server: DiscoveredServer): string =>server.hostname?.trim() || server.ip;@@ -417,17 +436,47 @@ export const InfrastructureSourceManager: Component<InfrastructureSourceManagerPif (lastResult) return `Last scan ${lastResult}`;return props.discoveryEnabled ? 'Ready to scan' : 'Discovery off';});- const setupConfidenceAction = createMemo<SetupConfidenceAction>(() => {- const discoveredCandidates = props.discoveredNodes();- if (discoveredCandidates.length > 0 && props.onReviewDiscoveredSource) {- return {- kind: 'review',- label: discoveredCandidates.length === 1 ? 'Review candidate' : 'Review first candidate',- detail: `${formatCount(discoveredCandidates.length, 'candidate')} discovered and waiting to be attached to the infrastructure model.`,- onClick: () => props.onReviewDiscoveredSource?.(discoveredCandidates[0]),- };+ const discoveryMonitorTitle = createMemo(() => {+ const status = props.discoveryScanStatus();+ if (status.scanning) return 'Scanning configured networks';+ if (discoveredCandidateCount() > 0) {+ return `${formatCount(discoveredCandidateCount(), 'candidate')} ready to review`;}-+ if (!props.discoveryEnabled) return 'Discovery is off';+ if (discoveryErrorSummary(status.errors)) return 'Last discovery scan needs attention';+ if (lastDiscoveryResultText()) return 'No new candidates from the last scan';+ return 'Ready to scan configured networks';+ });+ const discoveryMonitorDetail = createMemo(() => {+ const status = props.discoveryScanStatus();+ const subnet = discoverySubnetLabel(status);+ const errors = discoveryErrorSummary(status.errors);+ if (status.scanning) {+ return `Pulse is scanning ${subnet} for ${discoveryScanTargetLabel}. Candidates appear below for review before anything is added.`;+ }+ if (discoveredCandidateCount() > 0) {+ return `${formatCount(discoveredCandidateCount(), 'candidate')} found on ${subnet}. Review and add credentials before Pulse starts monitoring it.`;+ }+ if (!props.discoveryEnabled) {+ return `Enable discovery to scan configured networks for ${discoveryScanTargetLabel}.`;+ }+ if (errors) {+ return errors;+ }+ if (lastDiscoveryResultText()) {+ return `Last scan checked ${subnet} ${lastDiscoveryResultText()} and found no unattached platform APIs.`;+ }+ return `Run discovery to look for unattached ${discoveryScanTargetLabel} on the configured networks.`;+ });+ const discoveryMonitorMeta = createMemo(() => {+ const status = props.discoveryScanStatus();+ if (status.scanning && status.lastScanStartedAt) {+ return `Started ${formatRelativeTimestamp(status.lastScanStartedAt) ?? 'just now'}`;+ }+ if (lastDiscoveryResultText()) return `Last scan ${lastDiscoveryResultText()}`;+ return props.discoveryEnabled ? 'No scan has run yet' : 'Disabled';+ });+ const setupConfidenceAction = createMemo<SetupConfidenceAction>(() => {if (connectedSystemCount() === 0) {return {kind: 'add',@@ -452,8 +501,7 @@ export const InfrastructureSourceManager: Component<InfrastructureSourceManagerPreturn {kind: 'scan',label: props.discoveryScanStatus().scanning ? 'Scanning networks' : 'Scan networks',- detail:- 'Run discovery to check whether more platform APIs are waiting on the configured networks.',+ detail: `Run discovery to check whether more ${discoveryScanTargetLabel} are waiting on the configured networks.`,onClick: props.onRunDiscovery,disabled: props.discoveryScanStatus().scanning,};@@ -542,38 +590,6 @@ export const InfrastructureSourceManager: Component<InfrastructureSourceManagerPAdd infrastructure</button></Show>- {/* Discovery actions stay utility-tier but must remain explicit:- manual scans are an operator command, not an icon-hunt. */}- <div class="ml-auto flex flex-wrap items-center gap-1">- <Show when={props.onRunDiscovery}>- <button- type="button"- onClick={props.onRunDiscovery}- disabled={props.discoveryScanStatus().scanning}- class={utilityToolbarButtonClass}- title="Scan configured networks for reachable Proxmox VE, TrueNAS, PBS, PMG, and VMware vCenter endpoints. Discovered candidates appear here for review before they are added."- >- <RotateCw- class={`h-4 w-4 ${props.discoveryScanStatus().scanning ? 'animate-spin' : ''}`}- />- <span>- {props.discoveryScanStatus().scanning ? 'Scanning...' : 'Run discovery'}- </span>- </button>- </Show>-- <Show when={props.onOpenDiscoverySettings}>- <button- type="button"- onClick={props.onOpenDiscoverySettings}- class={utilityToolbarButtonClass}- title="Configure which networks and ports Pulse scans for platform APIs, and how often."- >- <SlidersHorizontal class="h-4 w-4" />- <span>Discovery settings</span>- </button>- </Show>- </div></div></div></Show>@@ -596,6 +612,89 @@ export const InfrastructureSourceManager: Component<InfrastructureSourceManagerP</>);+ const discoveryMonitorBand = () => (+ <section+ aria-label="Network discovery"+ aria-live="polite"+ class="border-b border-border bg-surface px-4 py-3"+ >+ <div class="flex flex-col gap-3 lg:flex-row lg:items-center lg:justify-between">+ <div class="min-w-0 flex-1">+ <div class="flex flex-wrap items-center gap-2">+ <div class="flex items-center gap-2 text-sm font-semibold text-base-content">+ <Search class="h-4 w-4 text-blue-600 dark:text-blue-300" aria-hidden="true" />+ Network discovery+ </div>+ <span+ class={`inline-flex items-center rounded-full px-2 py-0.5 text-[11px] font-medium ${+ props.discoveryScanStatus().scanning+ ? 'bg-blue-100 text-blue-800 dark:bg-blue-950/40 dark:text-blue-200'+ : discoveryErrorSummary(props.discoveryScanStatus().errors)+ ? 'bg-amber-100 text-amber-800 dark:bg-amber-950/40 dark:text-amber-200'+ : props.discoveryEnabled+ ? 'bg-emerald-100 text-emerald-800 dark:bg-emerald-950/40 dark:text-emerald-200'+ : 'bg-surface-alt text-muted'+ }`}+ >+ {discoveryMonitorTitle()}+ </span>+ <span class="text-xs text-muted">{discoveryMonitorMeta()}</span>+ </div>+ <p class="mt-1 max-w-4xl text-xs leading-5 text-muted">{discoveryMonitorDetail()}</p>+ <Show when={discoveryErrorSummary(props.discoveryScanStatus().errors)}>+ {(summary) => (+ <div class="mt-2 flex items-start gap-2 text-xs text-amber-800 dark:text-amber-200">+ <AlertTriangle class="mt-0.5 h-3.5 w-3.5 flex-shrink-0" aria-hidden="true" />+ <span>{summary()}</span>+ </div>+ )}+ </Show>+ </div>++ <Show when={!props.readOnly}>+ <div class="flex flex-wrap gap-2 lg:justify-end">+ <Show when={props.onRunDiscovery}>+ <button+ type="button"+ onClick={props.onRunDiscovery}+ disabled={props.discoveryScanStatus().scanning || !props.discoveryEnabled}+ class={discoveryPrimaryButtonClass}+ title={`Scan configured networks for reachable ${discoveryScanTargetLabel}. Discovered candidates appear here for review before they are added.`}+ >+ <RotateCw+ class={`h-4 w-4 ${props.discoveryScanStatus().scanning ? 'animate-spin' : ''}`}+ aria-hidden="true"+ />+ {props.discoveryScanStatus().scanning ? 'Scanning...' : 'Run discovery'}+ </button>+ </Show>+ <Show when={props.onOpenDiscoverySettings}>+ <button+ type="button"+ onClick={props.onOpenDiscoverySettings}+ class={discoverySecondaryButtonClass}+ title={`Configure which networks Pulse scans for ${discoveryScanTargetLabel}.`}+ >+ <SlidersHorizontal class="h-4 w-4" aria-hidden="true" />+ Discovery settings+ </button>+ </Show>+ <Show when={discoveredCandidateCount() > 0 && props.onReviewDiscoveredSource}>+ <button+ type="button"+ onClick={() => props.onReviewDiscoveredSource?.(props.discoveredNodes()[0])}+ class={discoverySecondaryButtonClass}+ >+ <Search class="h-4 w-4" aria-hidden="true" />+ {discoveredCandidateCount() === 1 ? 'Review candidate' : 'Review first candidate'}+ </button>+ </Show>+ </div>+ </Show>+ </div>+ </section>+ );+const setupSummaryBand = () => (<sectionaria-label="Infrastructure setup summary"@@ -666,6 +765,7 @@ export const InfrastructureSourceManager: Component<InfrastructureSourceManagerP<div ref={layoutContainerRef} class="min-w-0"><SettingsPanel title="Connected systems" noPadding>{headerActions()}+ {discoveryMonitorBand()}{setupSummaryBand()}<Show when={!useCardLayout()}>diff --git a/frontend-modern/src/components/Settings/__tests__/InfrastructureSourceManager.test.tsx b/frontend-modern/src/components/Settings/__tests__/InfrastructureSourceManager.test.tsxindex 59eb87db43..3458e1b675 100644--- a/frontend-modern/src/components/Settings/__tests__/InfrastructureSourceManager.test.tsx+++ b/frontend-modern/src/components/Settings/__tests__/InfrastructureSourceManager.test.tsx@@ -1,4 +1,4 @@-import { cleanup, fireEvent, render, screen } from '@solidjs/testing-library';+import { cleanup, fireEvent, render, screen, within } from '@solidjs/testing-library';import { afterEach, describe, expect, it, vi } from 'vitest';import { InfrastructureSourceManager } from '../InfrastructureSourceManager';import {@@ -113,14 +113,81 @@ describe('InfrastructureSourceManager setup summary', () => {expect(screen.queryByRole('button', { name: /^Monitor endpoint$/i })).toBeNull();expect(onAddSourceStep).not.toHaveBeenCalled();+ const discovery = screen.getByRole('region', { name: /^Network discovery$/i });+ expect(within(discovery).getByText('Ready to scan configured networks')).toBeInTheDocument();+ expect(+ within(discovery).getByText(+ /Run discovery to look for unattached Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway APIs/i,+ ),+ ).toBeInTheDocument();- fireEvent.click(screen.getByRole('button', { name: /^Run discovery$/i }));+ fireEvent.click(within(discovery).getByRole('button', { name: /^Run discovery$/i }));expect(onRunDiscovery).toHaveBeenCalledTimes(1);- fireEvent.click(screen.getByRole('button', { name: /^Discovery settings$/i }));+ fireEvent.click(within(discovery).getByRole('button', { name: /^Discovery settings$/i }));expect(onOpenDiscoverySettings).toHaveBeenCalledTimes(1);});+ it('keeps manual discovery observable while a scan is running', () => {+ const onRunDiscovery = vi.fn();++ render(() => (+ <InfrastructureSourceManager+ rows={() => []}+ discoveredNodes={() => []}+ discoveryEnabled+ discoveryScanStatus={() => ({+ scanning: true,+ subnet: '10.0.0.0/24',+ lastScanStartedAt: Date.now(),+ })}+ readOnly={false}+ onRunDiscovery={onRunDiscovery}+ />+ ));++ const discovery = screen.getByRole('region', { name: /^Network discovery$/i });+ expect(within(discovery).getByText('Scanning configured networks')).toBeInTheDocument();+ expect(+ within(discovery).getByText(+ /Pulse is scanning 10\.0\.0\.0\/24 for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway APIs/i,+ ),+ ).toBeInTheDocument();+ expect(within(discovery).getByRole('button', { name: /^Scanning\.\.\.$/i })).toBeDisabled();+ });++ it('keeps discovered candidates in the discovery monitor instead of hiding them in the table', () => {+ const onReviewDiscoveredSource = vi.fn();+ const candidate = {+ ip: '10.0.0.55',+ port: 8006,+ type: 'pve' as const,+ version: '8.2.2',+ hostname: 'discovered-pve.lab',+ };++ render(() => (+ <InfrastructureSourceManager+ rows={() => []}+ discoveredNodes={() => [candidate]}+ discoveryEnabled+ discoveryScanStatus={() => ({ scanning: false, lastResultAt: Date.now() })}+ readOnly={false}+ onReviewDiscoveredSource={onReviewDiscoveredSource}+ />+ ));++ const discovery = screen.getByRole('region', { name: /^Network discovery$/i });+ expect(within(discovery).getByText('1 candidate ready to review')).toBeInTheDocument();+ expect(+ within(discovery).getByText(/Review and add credentials before Pulse starts monitoring it/i),+ ).toBeInTheDocument();++ fireEvent.click(within(discovery).getByRole('button', { name: /^Review candidate$/i }));+ expect(onReviewDiscoveredSource).toHaveBeenCalledWith(candidate);+ expect(screen.getByText('discovered-pve.lab')).toBeInTheDocument();+ });+it('keeps setup status compact while preserving row-level attention signals', () => {render(() => (<InfrastructureSourceManagerdiff --git a/frontend-modern/src/components/Settings/__tests__/InfrastructureWorkspace.test.tsx b/frontend-modern/src/components/Settings/__tests__/InfrastructureWorkspace.test.tsxindex e5edb78cc0..673f599a22 100644--- a/frontend-modern/src/components/Settings/__tests__/InfrastructureWorkspace.test.tsx+++ b/frontend-modern/src/components/Settings/__tests__/InfrastructureWorkspace.test.tsx@@ -644,6 +644,7 @@ describe('InfrastructureWorkspace', () => {it('routes discovery actions from the manager and shows discovered candidates in the matching platform group', async () => {const triggerDiscoveryScan = vi.fn();renderWorkspace({+ discoveryEnabled: () => true,discoveredNodes: () => [{ip: '10.0.0.55',@@ -663,8 +664,12 @@ describe('InfrastructureWorkspace', () => {name: /Infrastructure setup summary/i,});expect(within(readiness).getByText('1 to review')).toBeInTheDocument();- expect(within(readiness).getByText(/1 candidate discovered and waiting/i)).toBeInTheDocument();- fireEvent.click(within(readiness).getByRole('button', { name: /Review candidate/i }));+ const discovery = screen.getByRole('region', { name: /Network discovery/i });+ expect(within(discovery).getByText('1 candidate ready to review')).toBeInTheDocument();+ expect(+ within(discovery).getByText(/Review and add credentials before Pulse starts monitoring it/i),+ ).toBeInTheDocument();+ fireEvent.click(within(discovery).getByRole('button', { name: /Review candidate/i }));expect(navigateSpy).toHaveBeenCalledWith('/settings/infrastructure?add=pve', {scroll: false,});diff --git a/frontend-modern/src/components/Settings/__tests__/settingsArchitecture.test.ts b/frontend-modern/src/components/Settings/__tests__/settingsArchitecture.test.tsindex 24c12c0835..2c7ef04e09 100644--- a/frontend-modern/src/components/Settings/__tests__/settingsArchitecture.test.ts+++ b/frontend-modern/src/components/Settings/__tests__/settingsArchitecture.test.ts@@ -655,8 +655,8 @@ describe('settings architecture guardrails', () => {// the page header) to 'Connected systems' which describes the card// content distinctly.expect(infrastructureSourceManagerSource).toContain('Connected systems');- // Discovery actions are now icon-only ghost buttons; the human copy- // still lives in their title and aria-label attributes.+ // 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');expect(infrastructureSourceManagerSource).toContain('Discovery settings');expect(monitoredSystemImpactPreviewSource).toContain('getMonitoredSystemImpactPreviewTitle');