From 0d3f6d5dbeec63d2053cb5ed28c9ec3769550063 Mon Sep 17 00:00:00 2001 From: Andras Bacsai <5845193+andrasbacsai@users.noreply.github.com> Date: Wed, 21 Oct 2026 13:04:11 +0200 Subject: [PATCH] fix(server): remove patch summary from server list header Co-Authored-By: Claude Opus 5.5 --- resources/views/livewire/server/index.blade.php | 13 ------------- tests/Feature/Server/ServerListPatchStatusTest.php | 14 ++++++-------- 2 files changed, 6 insertions(+), 21 deletions(-) diff --git a/resources/views/livewire/server/index.blade.php b/resources/views/livewire/server/index.blade.php index c6905cdde2..0b9469dc08 100644 --- a/resources/views/livewire/server/index.blade.php +++ b/resources/views/livewire/server/index.blade.php @@ -77,16 +77,6 @@ $patchStatuses = $serverRows->pluck('patchStatus')->filter(); $showPatches = $patchStatuses->isNotEmpty(); - $withUpdates = $patchStatuses->where('updates', '>', 0)->count(); - $withSecurityUpdates = $patchStatuses->where('security', '>', 0)->count(); - $needReboot = $patchStatuses->where('rebootRequired', true)->count(); - $failedChecks = $patchStatuses->where('failed', true)->count(); - $patchSummary = collect([ - $withUpdates > 0 ? $withUpdates.' '.str('server')->plural($withUpdates).' with updates' : null, - $withSecurityUpdates > 0 ? $withSecurityUpdates.' with security updates' : null, - $needReboot > 0 ? $needReboot.' '.($needReboot === 1 ? 'needs' : 'need').' a reboot' : null, - $failedChecks > 0 ? $failedChecks.' '.str('check')->plural($failedChecks).' failed' : null, - ])->filter()->join(' · '); @endphp
- @if (filled($patchSummary)) -

Patches: {{ $patchSummary }}

- @endif
diff --git a/tests/Feature/Server/ServerListPatchStatusTest.php b/tests/Feature/Server/ServerListPatchStatusTest.php index 02c6bf018d..50f1758a5d 100644 --- a/tests/Feature/Server/ServerListPatchStatusTest.php +++ b/tests/Feature/Server/ServerListPatchStatusTest.php @@ -112,7 +112,7 @@ describe('server list', function () { serverListPatchServer($this, 'unchecked-host'); }); - it('shows patch badges and the team summary to an admin', function () { + it('shows patch badges to an admin', function () { serverListPatchActingAs($this, 'admin'); Livewire::test(Index::class) @@ -120,21 +120,20 @@ describe('server list', function () { ->assertSee('2 updates') ->assertSee('Reboot required') ->assertSee('Patch check failed') - ->assertSee('Patches: 2 servers with updates · 1 with security updates · 1 needs a reboot · 1 check failed'); + ->assertDontSee('Patches:'); }); - it('hides patch badges and the summary from a member', function () { + it('hides patch badges from a member', function () { serverListPatchActingAs($this, 'member'); Livewire::test(Index::class) ->assertSee('secure-host') ->assertDontSee('security update') ->assertDontSee('Reboot required') - ->assertDontSee('Patch check failed') - ->assertDontSee('Patches:'); + ->assertDontSee('Patch check failed'); }); - it('hides the summary when every checked server is up to date', function () { + it('shows up to date when every checked server has no updates', function () { Server::query()->each(fn (Server $server) => $server->settings->forceFill([ 'patch_check_result' => serverListPatchResult(0, 0, false), 'patch_check_error' => null, @@ -143,7 +142,6 @@ describe('server list', function () { serverListPatchActingAs($this, 'admin'); Livewire::test(Index::class) - ->assertSee('Up to date') - ->assertDontSee('Patches:'); + ->assertSee('Up to date'); }); });