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.

infra: lead the Add landing with the agent, not the probe

rcourtmaned58890471f2
diff --git a/frontend-modern/src/components/Settings/ConnectionEditor/ConnectionEditor.tsx b/frontend-modern/src/components/Settings/ConnectionEditor/ConnectionEditor.tsx
index 05041f067d..123ab7cd4a 100644
--- a/frontend-modern/src/components/Settings/ConnectionEditor/ConnectionEditor.tsx
+++ b/frontend-modern/src/components/Settings/ConnectionEditor/ConnectionEditor.tsx
@@ -93,19 +93,7 @@ export const ConnectionEditor: Component<ConnectionEditorProps> = (props) => {
when={showCredentialSlot()}
fallback={
<div class="space-y-8 p-4">
- <AddressProbeStep
- state={state}
- onSelectCandidate={chooseCandidate}
- onInstallAgent={() => chooseManualType('agent')}
- />
-
<section class="space-y-3">
- <div class="flex items-center gap-3 text-xs font-semibold uppercase tracking-wide text-muted">
- <span class="h-px flex-1 bg-border" aria-hidden="true" />
- Or install the agent on the host
- <span class="h-px flex-1 bg-border" aria-hidden="true" />
- </div>
-
<button
type="button"
onClick={() => chooseManualType('agent')}
@@ -148,7 +136,7 @@ export const ConnectionEditor: Component<ConnectionEditorProps> = (props) => {
</button>
</section>
- <section class="space-y-3">
+ <section class="space-y-4">
<div class="flex items-center gap-3 text-xs font-semibold uppercase tracking-wide text-muted">
<span class="h-px flex-1 bg-border" aria-hidden="true" />
Or connect a platform API directly
@@ -156,8 +144,15 @@ export const ConnectionEditor: Component<ConnectionEditorProps> = (props) => {
</div>
<p class="text-xs text-muted">
For VMware, TrueNAS, PMG, or a remote Proxmox you can't install the agent on.
+ Paste the address and Pulse will auto-detect the product, or pick it below.
</p>
+ <AddressProbeStep
+ state={state}
+ onSelectCandidate={chooseCandidate}
+ onInstallAgent={() => chooseManualType('agent')}
+ />
+
<div class="grid grid-cols-1 gap-3 sm:grid-cols-2 xl:grid-cols-3">
<For each={platformOptions()}>
{(type) => {
diff --git a/frontend-modern/src/components/Settings/__tests__/settingsArchitecture.test.ts b/frontend-modern/src/components/Settings/__tests__/settingsArchitecture.test.ts
index 7b004c2d84..a43feea145 100644
--- a/frontend-modern/src/components/Settings/__tests__/settingsArchitecture.test.ts
+++ b/frontend-modern/src/components/Settings/__tests__/settingsArchitecture.test.ts
@@ -81,18 +81,21 @@ describe('settings architecture guardrails', () => {
expect(connectionEditorSource).toContain('const DEFAULT_PLATFORM_TYPES: ConnectionType[] =');
expect(connectionEditorSource).not.toContain("'agent'] =");
expect(connectionEditorSource).toContain('<AddressProbeStep');
- expect(connectionEditorSource).toContain('Or install the agent on the host');
expect(connectionEditorSource).toContain('Or connect a platform API directly');
- // The agent card sits above the platform grid and is marked Recommended
- // because it auto-registers PVE/PBS and covers the host-telemetry path
- // the platform APIs can't reach. Guarding the ordering here prevents a
- // drift back to "agent as a fifth tile."
- const agentSectionIdx = connectionEditorSource.indexOf('Or install the agent on the host');
- const platformSectionIdx = connectionEditorSource.indexOf('Or connect a platform API directly');
- expect(agentSectionIdx).toBeGreaterThan(-1);
- expect(platformSectionIdx).toBeGreaterThan(-1);
- expect(agentSectionIdx).toBeLessThan(platformSectionIdx);
- expect(connectionEditorSource).toContain('On a Proxmox host, this is the');
+ // The agent card is the *primary* path on the Add landing — it sits above
+ // the probe input AND the platform grid so a user doesn't read the probe
+ // as the lead action. The probe + platforms collapse into one "connect
+ // via API instead" fallback block below the agent. Guarding ordering
+ // here prevents regression to "agent as an alternative to the probe."
+ const agentPrimaryIdx = connectionEditorSource.indexOf('On a Proxmox host, this is the');
+ const apiSectionIdx = connectionEditorSource.indexOf('Or connect a platform API directly');
+ const probeIdx = connectionEditorSource.indexOf('<AddressProbeStep');
+ expect(agentPrimaryIdx).toBeGreaterThan(-1);
+ expect(apiSectionIdx).toBeGreaterThan(-1);
+ expect(probeIdx).toBeGreaterThan(-1);
+ expect(agentPrimaryIdx).toBeLessThan(apiSectionIdx);
+ expect(apiSectionIdx).toBeLessThan(probeIdx);
+ expect(connectionEditorSource).not.toContain('Or install the agent on the host');
expect(connectionEditorSource).toContain('auto-registers the node');
expect(connectionEditorSource).toContain('Recommended');
// The agent install path is a first-class ledger-header action, not a