From 155b07378c53fb12dd26022d375c51e0f292e5fa Mon Sep 17 00:00:00 2001
From: Andras Bacsai <5845193+andrasbacsai@users.noreply.github.com>
Date: Fri, 19 Jun 2026 13:53:10 +0200
Subject: [PATCH] refactor(v5): remove CLI-specific fields and labels from
clusters UI
Remove server count badge, last run status, and CLI summary from the
cluster detail panel. Rename "CLI state" to "Cluster state" and update
the add-server dialog to drop "CLI-generated" wording. Add test
assertions covering all removed and renamed elements.
---
resources/js/v5/Pages/Clusters.tsx | 20 ++------------------
tests/Feature/V5/DashboardTest.php | 8 ++++++++
2 files changed, 10 insertions(+), 18 deletions(-)
diff --git a/resources/js/v5/Pages/Clusters.tsx b/resources/js/v5/Pages/Clusters.tsx
index 0f784bdc6..21ffbeae4 100644
--- a/resources/js/v5/Pages/Clusters.tsx
+++ b/resources/js/v5/Pages/Clusters.tsx
@@ -1000,10 +1000,6 @@ export default function Clusters({
{isDeletingCluster ? 'Deleting...' : 'Delete cluster'}
) : null}
-
- {selectedCluster.serversCount}{' '}
- {selectedCluster.serversCount === 1 ? 'server' : 'servers'}
-
{deleteClusterError ? (
@@ -1067,7 +1063,7 @@ export default function Clusters({
- CLI state
+ Cluster state
@@ -1082,18 +1078,7 @@ export default function Clusters({
{selectedCluster.corrosionVersion}
-
-
- Last run
- -
- {selectedCluster.lastCliStatus ?? 'Never'}
-
-
- {selectedCluster.lastCliSummary ? (
-
- {selectedCluster.lastCliSummary}
-
- ) : null}
@@ -1493,8 +1478,7 @@ export default function Clusters({
Add server
- Add a remote server to this WireGuard cluster. CLI-generated mesh values are
- saved after bootstrap or extend runs.
+ Add a remote server to this WireGuard cluster. Generated mesh values are saved after bootstrap or extend runs.
diff --git a/tests/Feature/V5/DashboardTest.php b/tests/Feature/V5/DashboardTest.php
index 73e31d1cf..4b4a77f84 100644
--- a/tests/Feature/V5/DashboardTest.php
+++ b/tests/Feature/V5/DashboardTest.php
@@ -2043,6 +2043,13 @@ it('defines the v5 cluster management page and create cluster form', function ()
->toContain("import { csrfToken } from '@/lib/csrf';")
->toContain("fetch('/v5/clusters'")
->toContain('aria-label="Select a cluster"')
+ ->toContain('Cluster state')
+ ->not->toContain('Last run')
+ ->not->toContain('selectedCluster.lastCliStatus')
+ ->not->toContain('selectedCluster.lastCliSummary')
+ ->toContain('Generated mesh values are saved after bootstrap or extend runs.')
+ ->not->toContain('CLI state')
+ ->not->toContain('CLI-generated mesh values')
->toContain('Select a cluster')
->toContain('setSelectedClusterId(value)')
->toContain('aria-label="Create cluster"')
@@ -2163,6 +2170,7 @@ it('defines the v5 cluster management page and create cluster form', function ()
->toContain("method: 'DELETE'")
->toContain('Delete cluster')
->toContain('selectedCluster.serversCount === 0')
+ ->not->toContain("selectedCluster.serversCount === 1 ? 'server' : 'servers'")
->toContain('Only empty clusters can be deleted.')
->toContain('min-h-dvh overflow-y-auto bg-background text-foreground lg:h-dvh lg:overflow-hidden')
->toContain('flex min-h-dvh overflow-visible px-4 pt-16 lg:h-full lg:min-h-0 lg:overflow-hidden lg:px-6')