From 9063e7ec323023d32860512070e484e48e28b13d Mon Sep 17 00:00:00 2001 From: rcourtman Date: Sun, 10 May 2026 23:37:18 +0100 Subject: [PATCH] Clarify cluster-member rows in the connected-systems table MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Two adjacent UX wrinkles on Settings → Infrastructure: 1. The primary cluster member's subtitle read "API contact" while the Source column rendered an "Agent" badge directly beside it. Two unrelated axes (role within cluster vs how Pulse reads this row) shared visually adjacent space and parsed as a contradiction. Rename the subtitle to "Primary node" so it no longer collides with the Source badge. 2. A clustered PVE member without an attached agent fell back to Source = 'unknown' (rendered as "— No source attached"). That row IS read via the cluster API, so 'unknown' is incorrect. Default the fallback to 'api'; agent-installed members keep 'agent'. Invisible in the current single-cluster homelab setup but accurate for mixed-agent clusters going forward. --- .../Settings/__tests__/InfrastructureWorkspace.test.tsx | 6 +++--- .../Settings/__tests__/infrastructureSettingsModel.test.ts | 2 +- .../Settings/__tests__/useConnectionsLedger.test.ts | 2 +- .../src/components/Settings/useConnectionsLedger.ts | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/frontend-modern/src/components/Settings/__tests__/InfrastructureWorkspace.test.tsx b/frontend-modern/src/components/Settings/__tests__/InfrastructureWorkspace.test.tsx index 37abb037fb..a30b443697 100644 --- a/frontend-modern/src/components/Settings/__tests__/InfrastructureWorkspace.test.tsx +++ b/frontend-modern/src/components/Settings/__tests__/InfrastructureWorkspace.test.tsx @@ -562,7 +562,7 @@ describe('InfrastructureWorkspace', () => { { id: 'node-pi', name: 'pi', - subtitle: 'API contact', + subtitle: 'Primary node', source: 'agent', host: 'https://pi:8006', hostAliases: ['pi', '192.168.0.2'], @@ -936,7 +936,7 @@ describe('InfrastructureWorkspace', () => { { id: 'node-delly', name: 'delly', - subtitle: 'API contact', + subtitle: 'Primary node', source: 'agent', host: 'https://delly:8006', coverageLabels: ['Host telemetry'], @@ -970,7 +970,7 @@ describe('InfrastructureWorkspace', () => { await waitFor(() => expect(screen.getByText('homelab')).toBeInTheDocument()); expect(screen.getByText('Cluster · 2 nodes')).toBeInTheDocument(); - expect(screen.getByText('API contact')).toBeInTheDocument(); + expect(screen.getByText('Primary node')).toBeInTheDocument(); expect(screen.getAllByText('Agent').length).toBeGreaterThan(0); expect(screen.getByText('delly')).toBeInTheDocument(); expect(screen.getByText('minipc')).toBeInTheDocument(); diff --git a/frontend-modern/src/components/Settings/__tests__/infrastructureSettingsModel.test.ts b/frontend-modern/src/components/Settings/__tests__/infrastructureSettingsModel.test.ts index 24b9b32d7e..bac89ea4f3 100644 --- a/frontend-modern/src/components/Settings/__tests__/infrastructureSettingsModel.test.ts +++ b/frontend-modern/src/components/Settings/__tests__/infrastructureSettingsModel.test.ts @@ -42,7 +42,7 @@ describe('filterRepresentedDiscoveredServers', () => { { id: 'node-pi', name: 'pi', - subtitle: 'API contact', + subtitle: 'Primary node', source: 'agent', host: 'https://pi:8006', hostAliases: ['pi', '192.168.0.2'], diff --git a/frontend-modern/src/components/Settings/__tests__/useConnectionsLedger.test.ts b/frontend-modern/src/components/Settings/__tests__/useConnectionsLedger.test.ts index 620ea75b79..4a7487e75f 100644 --- a/frontend-modern/src/components/Settings/__tests__/useConnectionsLedger.test.ts +++ b/frontend-modern/src/components/Settings/__tests__/useConnectionsLedger.test.ts @@ -175,7 +175,7 @@ describe('useConnectionsLedger', () => { { id: 'node-delly', name: 'delly', - subtitle: 'API contact', + subtitle: 'Primary node', source: 'agent', host: 'https://delly:8006', hostAliases: ['delly', '192.168.0.10'], diff --git a/frontend-modern/src/components/Settings/useConnectionsLedger.ts b/frontend-modern/src/components/Settings/useConnectionsLedger.ts index a3ddc5ad2e..81aed4082d 100644 --- a/frontend-modern/src/components/Settings/useConnectionsLedger.ts +++ b/frontend-modern/src/components/Settings/useConnectionsLedger.ts @@ -176,7 +176,7 @@ interface ClusterRollup { } const memberSubtitleFor = (member: ConnectionSystemMember): string => - member.primary ? 'API contact' : 'Cluster member'; + member.primary ? 'Primary node' : 'Cluster member'; const buildMemberRow = ( member: ConnectionSystemMember, @@ -188,7 +188,7 @@ const buildMemberRow = ( const agentConnection = member.agentConnectionId ? connectionsByID.get(member.agentConnectionId) : undefined; - const source: InfrastructureSourceKind = agentConnection ? 'agent' : 'unknown'; + const source: InfrastructureSourceKind = agentConnection ? 'agent' : 'api'; const state = moreSevereState(member.state, agentConnection?.state); const presentation = STATE_PRESENTATION[state] ?? STATE_PRESENTATION.pending; const lastSeen =