From c4142ae115a5a0991d7fc59846840d48d0b6554e Mon Sep 17 00:00:00 2001 From: rcourtman Date: Mon, 20 Apr 2026 10:31:59 +0100 Subject: [PATCH] editor: drop redundant two-mode fork on Add connection MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The ledger's "How Pulse collects data" explainer already teaches the Platform API / Pulse Unified Agent split. Repeating that split as a choose-your-path screen when the user clicks Add connection was a dead decision step — the subtitle ("Paste an address. Pulse detects the product…") already commits to API-first, then the body below contradicted it with a 50/50 fork between API and Agent. Collapse the fallback to: one address probe (the primary path), the existing manual-type picker under "Enter credentials manually", and the agent install as a one-line contextual offramp beneath ("Setting up bare-metal Linux, Unraid, or FreeBSD…? Install the Unified Agent on a host."). The agent CTA is still there — it's just not presented as an equal-weight peer to the probe. Tests adjusted: the former "two cards mirroring the explainer" case is replaced with "leads with address probe; agent install is an offramp," which pins the same buttons but explicitly forbids a "Platform API" card header from reappearing. Architecture snapshot simplified to pin only the shape-level anchors (AddressProbeStep import, manual-type list, agent offramp CTA), not copy details. --- .../ConnectionEditor/ConnectionEditor.tsx | 79 ++++++++----------- .../__tests__/ConnectionEditor.test.tsx | 13 ++- .../__tests__/settingsArchitecture.test.ts | 4 +- 3 files changed, 42 insertions(+), 54 deletions(-) diff --git a/frontend-modern/src/components/Settings/ConnectionEditor/ConnectionEditor.tsx b/frontend-modern/src/components/Settings/ConnectionEditor/ConnectionEditor.tsx index c399fc384..f8d24ddb5 100644 --- a/frontend-modern/src/components/Settings/ConnectionEditor/ConnectionEditor.tsx +++ b/frontend-modern/src/components/Settings/ConnectionEditor/ConnectionEditor.tsx @@ -76,64 +76,47 @@ export const ConnectionEditor: Component = (props) => { -
-
+
+ setManualPickerOpen((v) => !v)} + /> + + +
- Platform API -
-
- Proxmox VE / PBS / PMG, VMware, TrueNAS + Choose Platform API type manually
+
    + {manualOptions().map((type) => ( +
  • + +
  • + ))} +
+
- setManualPickerOpen((v) => !v)} - /> - - -
-
- Choose Platform API type manually -
-
    - {manualOptions().map((type) => ( -
  • - -
  • - ))} -
-
-
-
- -
-
-
- Pulse Unified Agent -
-
- Host-level metrics on Proxmox / VMware / TrueNAS, or the only path on - bare-metal Linux, Unraid, FreeBSD. -
-
+
+ Setting up bare-metal Linux, Unraid, or FreeBSD, or adding host-level + metrics (CPU/disk temps, SMART, power) on Proxmox, VMware, or TrueNAS?{' '} -
+ . + } > diff --git a/frontend-modern/src/components/Settings/ConnectionEditor/__tests__/ConnectionEditor.test.tsx b/frontend-modern/src/components/Settings/ConnectionEditor/__tests__/ConnectionEditor.test.tsx index f71d3b666..c83eb4199 100644 --- a/frontend-modern/src/components/Settings/ConnectionEditor/__tests__/ConnectionEditor.test.tsx +++ b/frontend-modern/src/components/Settings/ConnectionEditor/__tests__/ConnectionEditor.test.tsx @@ -94,7 +94,7 @@ describe('ConnectionEditor', () => { expect(lastCall.candidate).toBeNull(); }); - it('surfaces Platform API and Pulse Unified Agent as the two add-paths, mirroring the explainer', () => { + it('leads with the address probe; agent install is an offramp, not a peer fork', () => { render(() => (
} @@ -102,8 +102,15 @@ describe('ConnectionEditor', () => { /> )); - expect(screen.getByText('Platform API')).toBeInTheDocument(); - expect(screen.getByText('Pulse Unified Agent')).toBeInTheDocument(); + // Primary path is probe-the-address. The explainer on the ledger already + // taught the user the two-mode split, so the editor must not restate it + // as a second decision screen — no "Platform API" card header here. + expect(screen.getByRole('button', { name: /probe address/i })).toBeInTheDocument(); + expect(screen.getByRole('button', { name: /enter credentials manually/i })).toBeInTheDocument(); + expect(screen.queryByText('Platform API')).toBeNull(); + + // Agent install is still reachable, but as a contextual offramp beneath + // the probe, not as an equal-weight card. expect( screen.getByRole('button', { name: /install the unified agent on a host/i }), ).toBeInTheDocument(); diff --git a/frontend-modern/src/components/Settings/__tests__/settingsArchitecture.test.ts b/frontend-modern/src/components/Settings/__tests__/settingsArchitecture.test.ts index 93bf5ac41..e149768ee 100644 --- a/frontend-modern/src/components/Settings/__tests__/settingsArchitecture.test.ts +++ b/frontend-modern/src/components/Settings/__tests__/settingsArchitecture.test.ts @@ -77,10 +77,8 @@ describe('settings architecture guardrails', () => { it('keeps probe-first connection setup and inline node credentials on the shared editor model', () => { expect(connectionEditorSource).toContain("import { AddressProbeStep } from './AddressProbeStep';"); expect(connectionEditorSource).toContain('const DEFAULT_MANUAL_TYPES: ConnectionType[] ='); - expect(connectionEditorSource).toContain('Platform API'); - expect(connectionEditorSource).toContain('Pulse Unified Agent'); - expect(connectionEditorSource).toContain('Install the Unified Agent on a host'); expect(connectionEditorSource).toContain('