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.

Tighten first-run destination handoff

rcourtmanb328ac297bb6
diff --git a/docs/release-control/v6/internal/subsystems/agent-lifecycle.md b/docs/release-control/v6/internal/subsystems/agent-lifecycle.md
index f438bfb249..084c8dd730 100644
--- a/docs/release-control/v6/internal/subsystems/agent-lifecycle.md
+++ b/docs/release-control/v6/internal/subsystems/agent-lifecycle.md
@@ -244,6 +244,7 @@ an add-only capacity posture.
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. That same workspace boundary now owns the add-flow entry split too: the landing guidance exposes `Detect from address`, `Install Pulse Agent`, and `Choose source type` as first-run actions above the source ledger, while header actions stay limited to ongoing discovery controls. The same landing boundary may surface setup confidence from the unified rows and discovered candidates, including connected-system count, API coverage, agent coverage, discovery review state, and the next setup action, without creating a second inventory model or provider-specific summary fetch.
+ Setup-completion handoff belongs to that same single add-flow boundary. The first-run completion screen must keep credentials as the first surfaced object, then present one compact next-step surface that sends operators to Add infrastructure or directly to the Agent handoff; source-choice explanation may live inside that surface, but lifecycle work must not reintroduce a separate setup-wizard tour, duplicate CTA section, or inline install-command owner before the canonical infrastructure workspace.
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 a generic Pulse Agent platform bucket. Standalone hosts with no owning platform source remain grouped under a standalone-host owner bucket, with `Pulse Agent` shown as the collection method rather than as the pseudo-platform label.
When that primary Proxmox source is cluster-backed, the same workspace boundary must render the row under the canonical cluster moniker carried by the backend grouping contract rather than under one sibling node's hostname. That same backend grouping contract must also carry the explicit member-node list for the cluster so the source manager can render child node composition such as `delly` and `minipc` beneath the owning cluster row with per-node coverage/status. Cluster-member node agents belong as augmentations on that owning Proxmox row and its child nodes, not as separate standalone-host peers.
That same lifecycle-owned workspace boundary also owns agent version
diff --git a/frontend-modern/src/components/SetupWizard/SetupCompletionPanel.tsx b/frontend-modern/src/components/SetupWizard/SetupCompletionPanel.tsx
index adeca4bc51..697b6b86e5 100644
--- a/frontend-modern/src/components/SetupWizard/SetupCompletionPanel.tsx
+++ b/frontend-modern/src/components/SetupWizard/SetupCompletionPanel.tsx
@@ -19,33 +19,20 @@ interface CompleteStepProps {
connectedResourcesOverride?: readonly Resource[];
}
-const UNIFIED_RESOURCE_GUIDANCE = {
- title: 'What happens next',
- description:
- 'Pulse is now secured. Next, choose how the first system should enter the unified infrastructure model: platform API inventory, Pulse Agent telemetry, or both.',
- steps: [
- {
- title: 'Open Add infrastructure',
- description:
- 'Review the supported source types in one place before choosing a platform API, Pulse Agent, or both.',
- },
- {
- title: 'Choose the source strategy',
- description:
- 'Connect a platform API for inventory and health, install Pulse Agent for node-local telemetry, or combine both where full coverage matters.',
- },
- {
- title: 'Save the source and confirm coverage',
- description:
- 'When the source connects, Pulse creates the first monitored system and the dashboard becomes the live estate overview.',
- },
- ],
- inventoryFacts: [
- 'Start with one source, then add more systems later from Settings → Infrastructure.',
- 'Platform APIs own inventory and health. Pulse Agent owns host telemetry, local services, Docker, and Kubernetes discovery.',
- 'VMware, TrueNAS, Proxmox, PBS, and PMG use API-backed source flows; standalone hosts use Pulse Agent.',
- ],
-} as const;
+const SOURCE_STRATEGY_OPTIONS = [
+ {
+ title: 'Platform API',
+ description: 'Inventory and health from Proxmox, TrueNAS, VMware, PBS, or PMG.',
+ },
+ {
+ title: 'Pulse Agent',
+ description: 'Node-local telemetry for standalone hosts, services, Docker, and Kubernetes.',
+ },
+ {
+ title: 'Use both',
+ description: 'Combine platform inventory with Agent telemetry when full coverage matters.',
+ },
+] as const;
const ADD_INFRASTRUCTURE_PATH = buildInfrastructureOnboardingPath('pick');
const AGENT_INSTALL_PATH = buildInfrastructureOnboardingPath('agent');
@@ -418,65 +405,10 @@ Keep these credentials secure!
</Show>
</div>
- <div class="bg-surface rounded-md border border-border p-6 text-left mb-6">
- <h3 class="text-sm font-semibold text-base-content mb-3 flex items-center gap-2">
- <svg
- class="w-4 h-4 text-blue-500"
- fill="none"
- viewBox="0 0 24 24"
- stroke="currentColor"
- >
- <path
- stroke-linecap="round"
- stroke-linejoin="round"
- stroke-width="2"
- d="M9.663 17h4.673M12 3v1m6.364 1.636l-.707.707M21 12h-1M4 12H3m3.343-5.657l-.707-.707m2.828 9.9a5 5 0 117.072 0l-.548.547A3.374 3.374 0 0014 18.469V19a2 2 0 11-4 0v-.531c0-.895-.356-1.754-.988-2.386l-.548-.547z"
- />
- </svg>
- {UNIFIED_RESOURCE_GUIDANCE.title}
- </h3>
-
- <p class="text-muted text-xs mb-4">{UNIFIED_RESOURCE_GUIDANCE.description}</p>
-
- <div class="grid gap-3 sm:grid-cols-3 mb-4">
- <For each={UNIFIED_RESOURCE_GUIDANCE.steps}>
- {(step, index) => (
- <div class="rounded-md border border-border bg-surface-alt p-4">
- <div class="mb-3 flex items-center gap-3">
- <div class="flex h-7 w-7 shrink-0 items-center justify-center rounded-md bg-slate-900 text-[11px] font-semibold text-white dark:bg-slate-100 dark:text-slate-900">
- {index() + 1}
- </div>
- <div class="text-sm font-semibold text-base-content">{step.title}</div>
- </div>
- <p class="text-xs leading-5 text-muted">{step.description}</p>
- </div>
- )}
- </For>
- </div>
-
- <div class="rounded-md border border-border bg-surface-alt p-4">
- <div class="mb-3 flex items-center justify-between gap-3">
- <div class="text-xs font-semibold uppercase tracking-[0.14em] text-muted">
- What to expect
- </div>
- <div class="rounded-sm bg-emerald-100 px-2 py-1 text-[10px] font-medium text-emerald-800 dark:bg-emerald-900 dark:text-emerald-300">
- First system first
- </div>
- </div>
- <div class="space-y-2">
- <For each={UNIFIED_RESOURCE_GUIDANCE.inventoryFacts}>
- {(fact) => (
- <div class="flex items-start gap-3">
- <div class="mt-1 h-1.5 w-1.5 shrink-0 rounded-full bg-emerald-500"></div>
- <p class="text-xs leading-5 text-muted">{fact}</p>
- </div>
- )}
- </For>
- </div>
- </div>
- </div>
-
- <div class="bg-surface rounded-md border border-border p-6 text-left mb-6">
+ <div
+ aria-label="Setup next step"
+ class="bg-surface rounded-md border border-border p-5 sm:p-6 text-left mb-6"
+ >
<div class="flex items-start justify-between gap-4">
<div>
<h3 class="text-sm font-semibold text-base-content flex items-center gap-2">
@@ -495,11 +427,6 @@ Keep these credentials secure!
</svg>
{completionViewModel().nextStepTitle}
</h3>
- <p class="mt-2 text-xs text-muted max-w-xl">
- {completionViewModel().hasConnectedSystems
- ? 'Pulse already has a live monitored system. Open the dashboard to confirm the first overview, then return to Add infrastructure when you want to connect the next API or Agent source.'
- : 'Add infrastructure now owns the first source decision. Open the picker to choose a platform API for inventory, Pulse Agent for host telemetry, or both when the first system needs full coverage.'}
- </p>
</div>
<div class="rounded-sm bg-blue-50 px-2 py-1 text-[10px] font-medium text-blue-700 dark:bg-blue-900 dark:text-blue-300">
Recommended next step
@@ -511,36 +438,51 @@ Keep these credentials secure!
{completionViewModel().nextStepSummary}
</div>
<div class="mt-2 text-xs text-muted">{completionViewModel().nextStepDetail}</div>
- </div>
- <div class="mt-4 flex flex-col gap-3 sm:flex-row">
- <button
- onClick={() =>
- completionViewModel().primaryAction === 'dashboard'
- ? handleGoToDashboard()
- : handleOpenAddInfrastructure()
- }
- class="inline-flex items-center justify-center gap-2 rounded-md bg-blue-600 px-4 py-3 text-sm font-semibold text-white transition-colors hover:bg-blue-700"
- >
- {completionViewModel().primaryAction === 'dashboard'
- ? 'Go to Dashboard'
- : 'Add infrastructure'}
- </button>
- <Show when={completionViewModel().showAddInfrastructureAction}>
+ <div class="mt-4 flex flex-col gap-3 sm:flex-row">
<button
- onClick={handleOpenAddInfrastructure}
- class="inline-flex items-center justify-center gap-2 rounded-md border border-border px-4 py-3 text-sm font-medium text-base-content transition-colors hover:bg-surface-hover"
+ onClick={() =>
+ completionViewModel().primaryAction === 'dashboard'
+ ? handleGoToDashboard()
+ : handleOpenAddInfrastructure()
+ }
+ class="inline-flex items-center justify-center gap-2 rounded-md bg-blue-600 px-4 py-3 text-sm font-semibold text-white transition-colors hover:bg-blue-700"
>
- Add infrastructure
+ {completionViewModel().primaryAction === 'dashboard'
+ ? 'Go to Dashboard'
+ : 'Add infrastructure'}
</button>
- </Show>
- <Show when={completionViewModel().showAgentInstallAction}>
- <button
- onClick={handleOpenAgentInstall}
- class="inline-flex items-center justify-center gap-2 rounded-md border border-border px-4 py-3 text-sm font-medium text-base-content transition-colors hover:bg-surface-hover"
- >
- Install Pulse Agent
- </button>
- </Show>
+ <Show when={completionViewModel().showAddInfrastructureAction}>
+ <button
+ onClick={handleOpenAddInfrastructure}
+ class="inline-flex items-center justify-center gap-2 rounded-md border border-border px-4 py-3 text-sm font-medium text-base-content transition-colors hover:bg-surface-hover"
+ >
+ Add infrastructure
+ </button>
+ </Show>
+ <Show when={completionViewModel().showAgentInstallAction}>
+ <button
+ onClick={handleOpenAgentInstall}
+ class="inline-flex items-center justify-center gap-2 rounded-md border border-border px-4 py-3 text-sm font-medium text-base-content transition-colors hover:bg-surface-hover"
+ >
+ Install Pulse Agent
+ </button>
+ </Show>
+ </div>
+ <div class="mt-4 border-t border-border-subtle pt-3">
+ <div class="text-[11px] font-medium uppercase tracking-wider text-muted">
+ Source choices
+ </div>
+ <div class="mt-2 grid gap-2 sm:grid-cols-3">
+ <For each={SOURCE_STRATEGY_OPTIONS}>
+ {(option) => (
+ <div class="rounded-md border border-border bg-surface px-3 py-2.5">
+ <div class="text-xs font-semibold text-base-content">{option.title}</div>
+ <p class="mt-1 text-[11px] leading-4 text-muted">{option.description}</p>
+ </div>
+ )}
+ </For>
+ </div>
+ </div>
</div>
</div>
</div>
diff --git a/frontend-modern/src/components/SetupWizard/__tests__/SecurityStep.test.tsx b/frontend-modern/src/components/SetupWizard/__tests__/SecurityStep.test.tsx
new file mode 100644
index 0000000000..2d3f723616
--- /dev/null
+++ b/frontend-modern/src/components/SetupWizard/__tests__/SecurityStep.test.tsx
@@ -0,0 +1,114 @@
+import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';
+import { cleanup, fireEvent, render, screen, waitFor } from '@solidjs/testing-library';
+import { STORAGE_KEYS } from '@/utils/localStorage';
+import { SecurityStep } from '../steps/SecurityStep';
+import type { WizardState } from '../SetupWizard';
+
+const apiFetchJSONMock = vi.fn();
+const setApiTokenMock = vi.fn();
+const showErrorMock = vi.fn();
+
+vi.mock('@/utils/apiClient', () => ({
+ apiFetchJSON: (...args: unknown[]) => apiFetchJSONMock(...args),
+ setApiToken: (...args: unknown[]) => setApiTokenMock(...args),
+}));
+
+vi.mock('@/utils/toast', () => ({
+ showError: (...args: unknown[]) => showErrorMock(...args),
+}));
+
+const baseState: WizardState = {
+ username: 'admin',
+ password: '',
+ apiToken: '',
+};
+
+const stubCryptoRandom = () => {
+ const getRandomValuesMock = vi.fn((array: Uint8Array) => {
+ for (let index = 0; index < array.length; index += 1) {
+ array[index] = index + 1;
+ }
+ return array;
+ });
+
+ vi.stubGlobal('crypto', {
+ getRandomValues: getRandomValuesMock,
+ });
+
+ return getRandomValuesMock;
+};
+
+describe('SecurityStep', () => {
+ beforeEach(() => {
+ vi.clearAllMocks();
+ sessionStorage.clear();
+ apiFetchJSONMock.mockResolvedValue({ success: true });
+ stubCryptoRandom();
+ });
+
+ afterEach(() => {
+ cleanup();
+ sessionStorage.clear();
+ vi.unstubAllGlobals();
+ });
+
+ it('generates and persists first-run credentials before entering the completion handoff', async () => {
+ const updateState = vi.fn();
+ const onComplete = vi.fn();
+
+ render(() => (
+ <SecurityStep
+ state={baseState}
+ updateState={updateState}
+ bootstrapToken="bootstrap-token"
+ onComplete={onComplete}
+ onBack={vi.fn()}
+ />
+ ));
+
+ fireEvent.click(screen.getByRole('button', { name: /Create Account & Continue/i }));
+
+ await waitFor(() => {
+ expect(apiFetchJSONMock).toHaveBeenCalledWith(
+ '/api/security/quick-setup',
+ expect.objectContaining({ method: 'POST' }),
+ );
+ });
+
+ const [, requestInit] = apiFetchJSONMock.mock.calls[0] as [string, RequestInit];
+ const body = JSON.parse(String(requestInit.body)) as {
+ username: string;
+ password: string;
+ apiToken: string;
+ setupToken: string;
+ };
+
+ expect(body.username).toBe('admin');
+ expect(body.password).toHaveLength(20);
+ expect(body.apiToken).toHaveLength(48);
+ expect(body.setupToken).toBe('bootstrap-token');
+ expect(setApiTokenMock).toHaveBeenCalledWith(body.apiToken);
+ expect(updateState).toHaveBeenCalledWith({
+ username: 'admin',
+ password: body.password,
+ apiToken: body.apiToken,
+ });
+
+ const storedHandoff = JSON.parse(
+ sessionStorage.getItem(STORAGE_KEYS.SETUP_HANDOFF) || '{}',
+ ) as {
+ username?: string;
+ password?: string;
+ apiToken?: string;
+ createdAt?: string;
+ };
+ expect(storedHandoff).toMatchObject({
+ username: 'admin',
+ password: body.password,
+ apiToken: body.apiToken,
+ });
+ expect(storedHandoff.createdAt).toEqual(expect.any(String));
+ expect(onComplete).toHaveBeenCalledOnce();
+ expect(showErrorMock).not.toHaveBeenCalled();
+ });
+});
diff --git a/frontend-modern/src/components/SetupWizard/__tests__/SetupCompletionPanel.guardrails.test.ts b/frontend-modern/src/components/SetupWizard/__tests__/SetupCompletionPanel.guardrails.test.ts
index 484c5ff8ab..eab1f0e3df 100644
--- a/frontend-modern/src/components/SetupWizard/__tests__/SetupCompletionPanel.guardrails.test.ts
+++ b/frontend-modern/src/components/SetupWizard/__tests__/SetupCompletionPanel.guardrails.test.ts
@@ -20,8 +20,8 @@ describe('SetupCompletionPanel guardrails', () => {
expect(setupCompletionPanelSource).toContain(
'Use Add infrastructure to choose a platform API, Pulse Agent, or both',
);
- expect(setupCompletionPanelSource).toContain(
- 'Open the picker to choose a platform API for inventory, Pulse Agent for host telemetry',
+ expect(setupCompletionModelSource).toContain(
+ 'Open Add infrastructure to choose a platform API, Pulse Agent, or both.',
);
expect(setupCompletionPanelSource).not.toContain('Use Add connection to connect');
expect(setupCompletionPanelSource).not.toContain("from '@/stores/licenseCommercial';");
@@ -34,23 +34,26 @@ describe('SetupCompletionPanel guardrails', () => {
expect(setupCompletionPanelSource).not.toContain('getUpgradeActionUrlOrFallback');
});
- it('describes setup completion through the unified resource model instead of legacy install-command copy', () => {
- expect(setupCompletionPanelSource).toContain("title: 'What happens next'");
- expect(setupCompletionPanelSource).toContain('Pulse is now secured.');
- expect(setupCompletionPanelSource).toContain("title: 'Open Add infrastructure'");
- expect(setupCompletionPanelSource).toContain('Review the supported source types in one place');
- expect(setupCompletionPanelSource).toContain("title: 'Save the source and confirm coverage'");
- expect(setupCompletionPanelSource).toContain('What to expect');
- expect(setupCompletionPanelSource).toContain('First system first');
+ it('describes setup completion through one compact source-choice next-step surface', () => {
+ expect(setupCompletionPanelSource).toContain('SOURCE_STRATEGY_OPTIONS');
+ expect(setupCompletionPanelSource).toContain('Source choices');
+ expect(setupCompletionPanelSource).toContain("title: 'Platform API'");
+ expect(setupCompletionPanelSource).toContain("title: 'Pulse Agent'");
+ expect(setupCompletionPanelSource).toContain("title: 'Use both'");
expect(setupCompletionPanelSource).toContain(
- 'Start with one source, then add more systems later from Settings',
+ 'Inventory and health from Proxmox, TrueNAS, VMware, PBS, or PMG.',
);
expect(setupCompletionPanelSource).toContain(
- 'Platform APIs own inventory and health. Pulse Agent owns host telemetry',
+ 'Node-local telemetry for standalone hosts, services, Docker, and Kubernetes.',
);
expect(setupCompletionModelSource).toContain(
'Start with a platform API when a platform manages the estate.',
);
+ 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');
@@ -96,6 +99,7 @@ describe('SetupCompletionPanel guardrails', () => {
'Save the admin login and API token before leaving this screen',
);
expect(setupCompletionPanelSource).toContain('Recommended next step');
+ expect(setupCompletionPanelSource).toContain('aria-label="Setup next step"');
expect(setupCompletionPanelSource).toContain('Go to Dashboard');
expect(setupCompletionModelSource).toContain("heroTitle: 'First monitored system connected'");
expect(setupCompletionModelSource).toContain(
@@ -114,10 +118,10 @@ describe('SetupCompletionPanel guardrails', () => {
expect(setupCompletionPanelSource).not.toContain(
'You can return here later from Connections & Inventory if you skip install for now.',
);
- expect(setupCompletionPanelSource).toContain(
+ expect(setupCompletionPanelSource).not.toContain(
'Add infrastructure now owns the first source decision.',
);
- expect(setupCompletionPanelSource).toContain(
+ expect(setupCompletionPanelSource).not.toContain(
'then return to Add infrastructure when you want to connect the next API or Agent source.',
);
});
diff --git a/frontend-modern/src/components/SetupWizard/__tests__/SetupCompletionPanel.test.tsx b/frontend-modern/src/components/SetupWizard/__tests__/SetupCompletionPanel.test.tsx
index 52d8ac2668..60960a5cee 100644
--- a/frontend-modern/src/components/SetupWizard/__tests__/SetupCompletionPanel.test.tsx
+++ b/frontend-modern/src/components/SetupWizard/__tests__/SetupCompletionPanel.test.tsx
@@ -81,31 +81,28 @@ describe('SetupCompletionPanel', () => {
render(() => <SetupCompletionPanel state={baseState} onComplete={vi.fn()} />);
expect(screen.getByText('Choose your first infrastructure source')).toBeInTheDocument();
- expect(screen.getByText('What happens next')).toBeInTheDocument();
- expect(screen.getAllByText('Open Add infrastructure').length).toBeGreaterThan(0);
expect(screen.getByRole('button', { name: 'Add infrastructure' })).toBeInTheDocument();
expect(screen.getByRole('button', { name: 'Install Pulse Agent' })).toBeInTheDocument();
expect(screen.getByText('Credentials you must save now')).toBeInTheDocument();
expect(screen.getByText('Shown during setup')).toBeInTheDocument();
expect(screen.getByText('admin')).toBeInTheDocument();
expect(screen.getByText('password')).toBeInTheDocument();
- expect(screen.getByText('What to expect')).toBeInTheDocument();
- expect(screen.getByText('First system first')).toBeInTheDocument();
+ expect(screen.getByText('Source choices')).toBeInTheDocument();
+ expect(screen.getByText('Platform API')).toBeInTheDocument();
+ expect(screen.getByText('Use both')).toBeInTheDocument();
expect(
screen.getByText(
- 'Platform APIs own inventory and health. Pulse Agent owns host telemetry, local services, Docker, and Kubernetes discovery.',
+ 'Inventory and health from Proxmox, TrueNAS, VMware, PBS, or PMG.',
),
).toBeInTheDocument();
expect(
screen.getByText(
- 'Review the supported source types in one place before choosing a platform API, Pulse Agent, or both.',
- ),
- ).toBeInTheDocument();
- expect(
- screen.getByText(
- 'VMware, TrueNAS, Proxmox, PBS, and PMG use API-backed source flows; standalone hosts use Pulse Agent.',
+ 'Node-local telemetry for standalone hosts, services, Docker, and Kubernetes.',
),
).toBeInTheDocument();
+ expect(screen.queryByText('What happens next')).not.toBeInTheDocument();
+ expect(screen.queryByText('What to expect')).not.toBeInTheDocument();
+ expect(screen.queryByText('First system first')).not.toBeInTheDocument();
expect(screen.queryByText('Connection URL (Agent → Pulse)')).not.toBeInTheDocument();
expect(screen.queryByText('Custom CA certificate path (optional)')).not.toBeInTheDocument();
@@ -222,9 +219,7 @@ describe('SetupCompletionPanel', () => {
);
const nextStepHeading = screen.getByRole('heading', { name: 'Open your first dashboard view' });
- const nextStepCard = nextStepHeading.closest(
- 'div.bg-surface.rounded-md.border.border-border.p-6.text-left.mb-6',
- );
+ const nextStepCard = nextStepHeading.closest('[aria-label="Setup next step"]');
expect(nextStepCard).not.toBeNull();
fireEvent.click(
@@ -279,9 +274,7 @@ describe('SetupCompletionPanel', () => {
expect(trackAgentFirstConnectedMock).not.toHaveBeenCalled();
const nextStepHeading = screen.getByRole('heading', { name: 'Open your first dashboard view' });
- const nextStepCard = nextStepHeading.closest(
- 'div.bg-surface.rounded-md.border.border-border.p-6.text-left.mb-6',
- );
+ const nextStepCard = nextStepHeading.closest('[aria-label="Setup next step"]');
expect(nextStepCard).not.toBeNull();
fireEvent.click(