From ee843b723029c39fd2a19b45e592a407741fa891 Mon Sep 17 00:00:00 2001 From: Andras Bacsai <5845193+andrasbacsai@users.noreply.github.com> Date: Tue, 18 Aug 2026 14:51:40 +0200 Subject: [PATCH 1/2] fix(ui): show server warnings with alert icons --- resources/views/livewire/dashboard.blade.php | 22 +++++++----- .../views/livewire/server/index.blade.php | 34 ++++++++++++------- .../ServerStatusIndicatorDesignTest.php | 18 +++++----- 3 files changed, 44 insertions(+), 30 deletions(-) diff --git a/resources/views/livewire/dashboard.blade.php b/resources/views/livewire/dashboard.blade.php index e9f8b3273..175fdb39a 100644 --- a/resources/views/livewire/dashboard.blade.php +++ b/resources/views/livewire/dashboard.blade.php @@ -196,14 +196,9 @@ class="group relative flex min-h-28 min-w-0 flex-col rounded-xl border border-ne :key="'dashboard-server-metrics-'.$server->uuid" /> @endif -
-
$serverStatusType === 'success', - 'border-amber-500/70' => $serverStatusType === 'warning', - 'border-red-500/70' => $serverStatusType === 'error', - ])> +
+
@@ -215,6 +210,17 @@ class="truncate text-[13px]! leading-4! font-semibold! text-black dark:text-fg"> {{ $server->description ?: 'No description' }}

+ @if ($serverStatusType !== 'success') + $serverStatusType === 'warning', + 'text-red-500 dark:text-red-400' => $serverStatusType === 'error', + ])> + + + @endif
@endforeach diff --git a/resources/views/livewire/server/index.blade.php b/resources/views/livewire/server/index.blade.php index 2aa93aa7f..d89e8b891 100644 --- a/resources/views/livewire/server/index.blade.php +++ b/resources/views/livewire/server/index.blade.php @@ -139,15 +139,9 @@ class="group relative flex min-h-28 flex-col rounded-xl border border-neutral-20 :key="'server-index-metrics-'.$server->uuid" /> @endif -
-
$serverRow['statusType'] === 'success', - 'border-amber-500/70' => $serverRow['statusType'] === 'warning', - 'border-red-500/70' => $serverRow['statusType'] === 'error', - ])> +
+
@@ -158,6 +152,17 @@ class="group relative flex min-h-28 flex-col rounded-xl border border-neutral-20 {{ $serverRow['description'] }}

+ @if ($serverRow['statusType'] !== 'success') + $serverRow['statusType'] === 'warning', + 'text-red-500 dark:text-red-400' => $serverRow['statusType'] === 'error', + ])> + + + @endif
@endforeach @@ -174,9 +179,8 @@ class="grid min-w-[480px] grid-cols-[minmax(0,1fr)_9.5rem] border-b border-neutr
-
+
@@ -185,6 +189,12 @@ class="flex size-8 shrink-0 items-center justify-center rounded-lg border bg-neu

+ + +
diff --git a/tests/Feature/ServerStatusIndicatorDesignTest.php b/tests/Feature/ServerStatusIndicatorDesignTest.php index 34e0f4cbd..090d6d816 100644 --- a/tests/Feature/ServerStatusIndicatorDesignTest.php +++ b/tests/Feature/ServerStatusIndicatorDesignTest.php @@ -1,16 +1,15 @@ not->toContain('toContain("'border-emerald-500/70' => \$serverStatusType === 'success'") - ->toContain("'border-amber-500/70' => \$serverStatusType === 'warning'") - ->toContain("'border-red-500/70' => \$serverStatusType === 'error'") - ->toContain('title="{{ $serverStatus }}"') - ->toContain('aria-label="Server status: {{ $serverStatus }}"'); + ->not->toContain("'border-amber-500/70' => \$serverStatusType === 'warning'") + ->toContain('@if ($serverStatusType !== \'success\')') + ->toContain('data-tooltip="{{ $serverStatus }}"') + ->toContain('toBe(1) ->and($serverIndex) @@ -20,10 +19,9 @@ ->toContain("\$isReady => 'success'") ->toContain("\$isTransferredAway || \$server->settings->force_disabled => 'error'") ->toContain("default => 'error'") - ->toContain("server.statusType === 'success' ? 'border-emerald-500/70'") - ->toContain("server.statusType === 'warning' ? 'border-amber-500/70'") - ->toContain("'border-red-500/70'") - ->toContain(':title="server.status"') + ->not->toContain("server.statusType === 'warning' ? 'border-amber-500/70'") + ->toContain('x-show="server.statusType !== \'success\'"') + ->toContain(':data-tooltip="server.status"') ->toContain(':aria-label="`Server status: ${server.status}`"'); }); From 1073bbca83a6cda81f237b26ca43ef2b02c59c1d Mon Sep 17 00:00:00 2001 From: Andras Bacsai <5845193+andrasbacsai@users.noreply.github.com> Date: Tue, 18 Aug 2026 15:06:05 +0200 Subject: [PATCH 2/2] fix(sentinel): clarify restart after settings update Add a regression test for the updated success notification. --- app/Livewire/Server/Sentinel.php | 2 +- tests/Feature/Livewire/SentinelComponentTest.php | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/app/Livewire/Server/Sentinel.php b/app/Livewire/Server/Sentinel.php index cd05002aa..a69eb3f80 100644 --- a/app/Livewire/Server/Sentinel.php +++ b/app/Livewire/Server/Sentinel.php @@ -146,7 +146,7 @@ public function submit() { try { $this->syncData(true); - $this->dispatch('success', 'Sentinel settings updated.'); + $this->dispatch('success', 'Sentinel settings updated. Restarting Sentinel.'); } catch (\Throwable $e) { return handleError($e, $this); } diff --git a/tests/Feature/Livewire/SentinelComponentTest.php b/tests/Feature/Livewire/SentinelComponentTest.php index 41b3f2b49..01250910a 100644 --- a/tests/Feature/Livewire/SentinelComponentTest.php +++ b/tests/Feature/Livewire/SentinelComponentTest.php @@ -36,3 +36,12 @@ expect($view)->not->toContain("? 'Disabled'"); }); + +it('tells the user that saving sentinel settings initiates a restart', function () { + $componentSource = file_get_contents(app_path('Livewire/Server/Sentinel.php')); + + preg_match('/public function submit\([^)]*\).*?\{(?.*?)\n \}/s', $componentSource, $matches); + + expect($matches['body'] ?? '') + ->toContain("\$this->dispatch('success', 'Sentinel settings updated. Restarting Sentinel.');"); +});