Skip to content

armgit / Pulse

Public Imported from GitHub
0

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.

Move detect flow into add picker

rcourtman86aabe610397
diff --git a/docs/release-control/v6/internal/subsystems/agent-lifecycle.md b/docs/release-control/v6/internal/subsystems/agent-lifecycle.md
index 5bd409ce03..847dd34266 100644
--- a/docs/release-control/v6/internal/subsystems/agent-lifecycle.md
+++ b/docs/release-control/v6/internal/subsystems/agent-lifecycle.md
@@ -226,7 +226,7 @@ an add-only capacity posture.
Persistence-sensitive NAS targets must keep one canonical continuity model here: installer-owned bootstraps may use flash-backed or immutable-root launch hooks only as thin trampolines, while the durable wrapper, state, and reboot-surviving binary copy stay in the governed persistent state directory that updater continuity also refreshes.
9. Add or change profile management, the extracted agent profiles runtime owner, the infrastructure source-manager landing, the pure unified-agent inventory/install model, the connections-ledger workspace shell, the unified ConnectionEditor and its per-type credential slots, route model, shared install section owner, the shared direct-node/discovery infrastructure settings owners plus their model, shared frontend install-command assembly, Proxmox setup/install API transport, TrueNAS platform-connection management, VMware platform-connection management, the shared monitored-system admission preview shell for those platform connections, setup-completion install handoff transport, deploy-fallback manual install transport, and fleet-control presentation through `frontend-modern/src/api/agentProfiles.ts`, `frontend-modern/src/api/nodes.ts`, `frontend-modern/src/components/Settings/AgentProfilesPanel.tsx`, `frontend-modern/src/components/Settings/useAgentProfilesPanelState.ts`, `frontend-modern/src/components/Settings/ConnectionsTable.tsx`, `frontend-modern/src/components/Settings/connectionsTableModel.ts`, `frontend-modern/src/components/Settings/useConnectionsLedger.ts`, `frontend-modern/src/components/Settings/useConnectionRowActions.ts`, `frontend-modern/src/components/Settings/ConnectionEditor/ConnectionEditor.tsx`, `frontend-modern/src/components/Settings/ConnectionEditor/AddressProbeStep.tsx`, `frontend-modern/src/components/Settings/ConnectionEditor/useConnectionEditor.ts`, `frontend-modern/src/components/Settings/ConnectionEditor/CredentialSlots/NodeCredentialSlot.tsx`, `frontend-modern/src/components/Settings/ConnectionEditor/CredentialSlots/TrueNASCredentialSlot.tsx`, `frontend-modern/src/components/Settings/ConnectionEditor/CredentialSlots/VMwareCredentialSlot.tsx`, `frontend-modern/src/components/Settings/infrastructureOperationsModel.tsx`, `frontend-modern/src/components/Settings/InfrastructureInstallerSection.tsx`, `frontend-modern/src/components/Settings/InfrastructureWorkspace.tsx`, `frontend-modern/src/components/Settings/InfrastructureSourceManager.tsx`, `frontend-modern/src/components/Settings/infrastructureWorkspaceModel.ts`, `frontend-modern/src/components/Settings/MonitoredSystemAdmissionPreview.tsx`, `frontend-modern/src/components/Settings/platformConnectionsModel.ts`, `frontend-modern/src/components/Settings/useTrueNASSettingsPanelState.ts`, `frontend-modern/src/components/Settings/useVMwareSettingsPanelState.ts`, `frontend-modern/src/components/Settings/proxmoxSettingsModel.ts`, `frontend-modern/src/components/Settings/ConfiguredNodeTables.tsx`, `frontend-modern/src/components/Settings/SettingsSectionNav.tsx`, `frontend-modern/src/components/Settings/infrastructureSettingsModel.ts`, `frontend-modern/src/components/Settings/useInfrastructureConfiguredNodesState.ts`, `frontend-modern/src/components/Settings/useInfrastructureDiscoveryRuntimeState.ts`, `frontend-modern/src/components/Settings/useInfrastructureInstallState.tsx`, `frontend-modern/src/components/Settings/useInfrastructureOperationsState.tsx`, `frontend-modern/src/components/Settings/useInfrastructureSettingsState.ts`, `frontend-modern/src/components/Settings/nodeModalModel.ts`, `frontend-modern/src/components/Settings/useNodeModalState.ts`, `frontend-modern/src/components/SetupWizard/SetupCompletionPanel.tsx`, and `frontend-modern/src/utils/agentInstallCommand.ts`. Phase 9 retired the legacy reporting/inventory surface (InfrastructureOperationsController, InfrastructureInventorySection, InfrastructureActiveRowDetails, InfrastructureIgnoredRowDetails, InfrastructureStopMonitoringDialog, useInfrastructureReportingState) and the per-type shells (PlatformConnectionsWorkspace, ProxmoxSettingsPanel, ProxmoxDirectWorkspace, ProxmoxConfiguredNodesTable, ProxmoxDirectConnectionsCard, ProxmoxDiscoveryResultsCard, ProxmoxDeleteNodeDialog, ProxmoxNodeModalStack, NodeModal shell, TrueNASSettingsPanel, VMwareSettingsPanel, useProxmoxDirectWorkspaceState); lifecycle extensions must route through the unified aggregator ledger, source-manager cards, and ConnectionEditor credential slots rather than reintroducing those retired surfaces.
Those lifecycle-owned settings hooks may consume websocket state only through `frontend-modern/src/contexts/appRuntime.ts`; they must not import `frontend-modern/src/App.tsx` or recreate root-shell providers.
- Discovery configuration is part of that same lifecycle-owned workspace boundary. `InfrastructureSourceManager.tsx` must open one canonical discovery editor through `InfrastructureDiscoverySettingsDialog.tsx`, `DiscoverySettingsForm.tsx`, and `discoverySettingsModel.ts`, while the System/Network shell stays limited to network-boundary controls instead of reintroducing a second editable discovery surface.
+ Discovery configuration is part of that same lifecycle-owned workspace boundary. `InfrastructureSourceManager.tsx` must open one canonical discovery editor through `InfrastructureDiscoverySettingsDialog.tsx`, `DiscoverySettingsForm.tsx`, and `discoverySettingsModel.ts`, while the System/Network shell stays limited to network-boundary controls instead of reintroducing a second editable discovery surface. That same workspace boundary now owns the add-flow entry split too: the landing strip opens the grouped `Add infrastructure` picker, while `Detect from address` remains a picker-owned utility route instead of a competing top-level header action.
The same lifecycle-owned workspace boundary now also owns attached-agent composition. When a unified Pulse Agent augments a first-class platform source such as Proxmox VE, the source manager and edit dialog must present one primary platform row with explicit `API` plus `Pulse Agent` composition rather than duplicating that same machine as a second peer row under the generic Pulse Agent group. Standalone hosts with no owning platform source remain in the Pulse Agent group.
That same lifecycle-owned workspace boundary also owns agent version
posture on infrastructure settings. The landing table stays compact and
diff --git a/docs/release-control/v6/internal/subsystems/frontend-primitives.md b/docs/release-control/v6/internal/subsystems/frontend-primitives.md
index 522401eca8..e732dcd851 100644
--- a/docs/release-control/v6/internal/subsystems/frontend-primitives.md
+++ b/docs/release-control/v6/internal/subsystems/frontend-primitives.md
@@ -272,11 +272,14 @@ work extends shared components instead of creating new local variants.
page-level workspaces at once.
The source-manager landing now also owns the explicit discovery strip for
that destination. `InfrastructureSourceManager.tsx` may expose `Run
- discovery`, `Detect from address`, and `Discovery settings` actions from the
+ discovery`, `Add infrastructure`, and `Discovery settings` actions from the
shared landing shell, but it must not start a network scan just because the
- page rendered. Discovered API-backed candidates stay visible in the same
- platform-group table as configured sources, using the existing tree/table
- hierarchy instead of spawning a second discovery-only page or card stack.
+ page rendered. The direct address-probe utility is picker-owned rather than
+ landing-owned: `Detect from address` must stay inside the grouped add
+ dialog instead of competing with discovery actions on the page header.
+ Discovered API-backed candidates stay visible in the same platform-group
+ table as configured sources, using the existing tree/table hierarchy
+ instead of spawning a second discovery-only page or card stack.
`InfrastructureWorkspace.tsx` must still open a new connection through
`frontend-modern/src/components/Settings/ConnectionEditor/ConnectionEditor.tsx`,
but the editor now serves as governed dialog content under the source
diff --git a/frontend-modern/src/components/Settings/InfrastructureSourceManager.tsx b/frontend-modern/src/components/Settings/InfrastructureSourceManager.tsx
index 6ad8f1d846..fa11d609a8 100644
--- a/frontend-modern/src/components/Settings/InfrastructureSourceManager.tsx
+++ b/frontend-modern/src/components/Settings/InfrastructureSourceManager.tsx
@@ -1,5 +1,5 @@
import { For, Show, createMemo, type Accessor, type Component } from 'solid-js';
-import { Plus, RotateCw, Search, Server, SlidersHorizontal } from 'lucide-solid';
+import { Plus, RotateCw, Server, SlidersHorizontal } from 'lucide-solid';
import SettingsPanel from '@/components/shared/SettingsPanel';
import {
Table,
@@ -26,9 +26,9 @@ interface InfrastructureSourceManagerProps {
discoveryEnabled: boolean;
discoveryScanStatus: Accessor<DiscoveryScanStatus>;
readOnly: boolean;
+ onOpenAddInfrastructure?: () => void;
onAddSource?: (type: InfrastructureOnboardingConnectionType) => void;
onRunDiscovery?: () => void;
- onDetectFromAddress?: () => void;
onOpenDiscoverySettings?: () => void;
onOpenConnection?: (row: InfrastructureSystemRow) => void;
onReviewDiscoveredSource?: (server: DiscoveredServer) => void;
@@ -277,14 +277,14 @@ export const InfrastructureSourceManager: Component<InfrastructureSourceManagerP
</button>
</Show>
- <Show when={props.onDetectFromAddress}>
+ <Show when={props.onOpenAddInfrastructure}>
<button
type="button"
- onClick={props.onDetectFromAddress}
+ onClick={props.onOpenAddInfrastructure}
class={utilityToolbarButtonClass}
>
- <Search class="h-4 w-4" />
- Detect from address
+ <Plus class="h-4 w-4" />
+ Add infrastructure
</button>
</Show>
diff --git a/frontend-modern/src/components/Settings/InfrastructureWorkspace.tsx b/frontend-modern/src/components/Settings/InfrastructureWorkspace.tsx
index ce8776b24b..ebec8f720f 100644
--- a/frontend-modern/src/components/Settings/InfrastructureWorkspace.tsx
+++ b/frontend-modern/src/components/Settings/InfrastructureWorkspace.tsx
@@ -800,6 +800,7 @@ const InfrastructureWorkspaceContent: Component<InfrastructureWorkspaceProps> =
discoveryEnabled={props.discoveryEnabled()}
discoveryScanStatus={props.discoveryScanStatus}
readOnly={readOnly()}
+ onOpenAddInfrastructure={readOnly() ? undefined : () => openAddFlow('pick')}
onAddSource={
readOnly()
? undefined
@@ -812,7 +813,6 @@ const InfrastructureWorkspaceContent: Component<InfrastructureWorkspaceProps> =
void props.triggerDiscoveryScan();
}
}
- onDetectFromAddress={readOnly() ? undefined : () => openAddFlow('detect')}
onOpenDiscoverySettings={readOnly() ? undefined : () => setShowDiscoverySettings(true)}
onOpenConnection={readOnly() ? undefined : (row) => setEditingRow(row)}
onReviewDiscoveredSource={
diff --git a/frontend-modern/src/components/Settings/__tests__/InfrastructureWorkspace.test.tsx b/frontend-modern/src/components/Settings/__tests__/InfrastructureWorkspace.test.tsx
index 0f71256933..c6e4da6ca5 100644
--- a/frontend-modern/src/components/Settings/__tests__/InfrastructureWorkspace.test.tsx
+++ b/frontend-modern/src/components/Settings/__tests__/InfrastructureWorkspace.test.tsx
@@ -242,8 +242,9 @@ describe('InfrastructureWorkspace', () => {
await waitFor(() => expect(screen.getByText('Infrastructure sources')).toBeInTheDocument());
expect(screen.getByRole('button', { name: /Run discovery/i })).toBeInTheDocument();
+ expect(screen.getByRole('button', { name: /Add infrastructure/i })).toBeInTheDocument();
expect(screen.getByRole('button', { name: /Discovery settings/i })).toBeInTheDocument();
- expect(screen.getByRole('button', { name: /Detect from address/i })).toBeInTheDocument();
+ expect(screen.queryByRole('button', { name: /Detect from address/i })).toBeNull();
expect(screen.getByText('VMware vCenter')).toBeInTheDocument();
expect(screen.getByText('TrueNAS SCALE')).toBeInTheDocument();
expect(screen.getByText('Proxmox VE')).toBeInTheDocument();
@@ -289,12 +290,12 @@ describe('InfrastructureWorkspace', () => {
});
});
- it('opens the detect dialog from the source manager header action', () => {
+ it('opens the source picker from the source manager header action', () => {
renderWorkspace();
- fireEvent.click(screen.getByRole('button', { name: /Detect from address/i }));
+ fireEvent.click(screen.getByRole('button', { name: /Add infrastructure/i }));
- expect(navigateSpy).toHaveBeenCalledWith('/settings/infrastructure?add=detect', {
+ expect(navigateSpy).toHaveBeenCalledWith('/settings/infrastructure?add=pick', {
scroll: false,
});
});
diff --git a/frontend-modern/src/components/Settings/__tests__/settingsArchitecture.test.ts b/frontend-modern/src/components/Settings/__tests__/settingsArchitecture.test.ts
index 3480db9843..71c6200486 100644
--- a/frontend-modern/src/components/Settings/__tests__/settingsArchitecture.test.ts
+++ b/frontend-modern/src/components/Settings/__tests__/settingsArchitecture.test.ts
@@ -138,7 +138,7 @@ describe('settings architecture guardrails', () => {
);
expect(infrastructureWorkspaceSource).toContain('<InfrastructureDiscoverySettingsDialog');
expect(infrastructureWorkspaceSource).toContain(
- "onDetectFromAddress={readOnly() ? undefined : () => openAddFlow('detect')}",
+ "onOpenAddInfrastructure={readOnly() ? undefined : () => openAddFlow('pick')}",
);
expect(infrastructureWorkspaceSource).toContain('onReviewDiscoveredSource');
expect(infrastructureWorkspaceSource).toContain('void props.loadDiscoveredNodes();');
@@ -158,7 +158,7 @@ describe('settings architecture guardrails', () => {
expect(infrastructureWorkspaceSource).not.toContain('PlatformConnectionsWorkspace');
expect(infrastructureSourceManagerSource).toContain('Infrastructure sources');
expect(infrastructureSourceManagerSource).toContain('Run discovery');
- expect(infrastructureSourceManagerSource).toContain('Detect from address');
+ expect(infrastructureSourceManagerSource).toContain('Add infrastructure');
expect(infrastructureSourceManagerSource).toContain('Discovery settings');
expect(infrastructureSourceManagerSource).toContain('Configured and discovered candidates grouped by platform.');
expect(infrastructureSourceManagerSource).toContain('onReviewDiscoveredSource');
@@ -168,6 +168,7 @@ describe('settings architecture guardrails', () => {
expect(infrastructureSourceManagerSource).toContain('aria-label={`Add ${product.label}`}');
expect(infrastructureSourceManagerSource).toContain('Review');
expect(infrastructureSourceManagerSource).toContain('Edit');
+ expect(infrastructureSourceManagerSource).not.toContain('Detect from address');
expect(infrastructureSourceManagerSource).not.toContain('Connection types');
expect(infrastructureSourcePickerSource).toContain('Choose a source type');
expect(infrastructureSourcePickerSource).toContain('Detect from address');
diff --git a/tests/integration/tests/68-infrastructure-onboarding.spec.ts b/tests/integration/tests/68-infrastructure-onboarding.spec.ts
index 8cd3020efa..f8337cb1e5 100644
--- a/tests/integration/tests/68-infrastructure-onboarding.spec.ts
+++ b/tests/integration/tests/68-infrastructure-onboarding.spec.ts
@@ -183,12 +183,13 @@ test.describe('Infrastructure onboarding', () => {
await expect(page.getByText('Infrastructure sources', { exact: true })).toBeVisible();
await expect(page.getByRole('button', { name: /Run discovery/i })).toBeVisible();
+ await expect(page.getByRole('button', { name: /Add infrastructure/i })).toBeVisible();
await expect(page.getByRole('button', { name: /Discovery settings/i })).toBeVisible();
await expect(page.getByText('VMware vCenter', { exact: true })).toBeVisible();
await expect(page.getByText('TrueNAS SCALE', { exact: true })).toBeVisible();
await expect(page.getByText('Proxmox VE', { exact: true })).toBeVisible();
await expect(page.getByRole('button', { name: /Add TrueNAS SCALE/i })).toBeVisible();
- await expect(page.getByRole('button', { name: /Detect from address/i })).toBeVisible();
+ await expect(page.getByRole('button', { name: /Detect from address/i })).toHaveCount(0);
await expect(page.getByText('Monitored systems', { exact: true })).toHaveCount(0);
await expect(page.getByText('Connection types', { exact: true })).toHaveCount(0);
@@ -368,7 +369,7 @@ test.describe('Infrastructure onboarding', () => {
.toBe(0);
});
- test('desktop detect utility records no-match agent fallback from the landing header action', async ({
+ test('desktop detect utility records no-match agent fallback from the add-infrastructure picker', async ({
page,
}, testInfo) => {
test.skip(
@@ -398,6 +399,8 @@ test.describe('Infrastructure onboarding', () => {
await page.goto('/settings/infrastructure', { waitUntil: 'domcontentloaded' });
await page.waitForURL(/\/settings\/infrastructure(?:\?.*)?$/, { timeout: 15_000 });
+ await page.getByRole('button', { name: /Add infrastructure/i }).click();
+ await page.waitForURL(/\/settings\/infrastructure\?add=pick$/, { timeout: 15_000 });
await page.getByRole('button', { name: /Detect from address/i }).click();
await page.waitForURL(/\/settings\/infrastructure\?add=detect$/, { timeout: 15_000 });