From f9a08a98d275d0725758938f7430806ac9b3323a Mon Sep 17 00:00:00 2001 From: boban Date: Mon, 6 Jul 2026 20:42:09 +0200 Subject: [PATCH] fix(ui): uniform action-element height + live fleet status / alerts MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Two things the badge/live-update fixes missed: Height — the enable/disable TOGGLES (Alerts, Servers, Commands, Settings) were custom buttons at min-h-9 (36px) while x-btn / x-modal-trigger / status-pill are h-8 (32px), so a status toggle never lined up with the Delete/Create buttons next to it. Normalise those toggles to h-8. Verified: Enabled/Delete/Create all render at 32px now. Live — the topbar "X/Y online" pill and the sidebar server-switcher were static Blade, so a server going up/down (shown live on the dashboard via Reverb) didn't reach them until a navigate/refresh. Make the topbar pill a small polled Livewire island (Shell\FleetStatus) and add wire:poll to the server-switcher + the Alerts page, so fleet status and firing/ resolved incidents update live without a refresh. (The alert e-mail is confirmed sending over SMTP — queued mail no longer hits the log mailer, and a synchronous send to the admin returned SEND_OK from mail.thinkidoo.com:587. Non-delivery is downstream: spam filtering or missing SPF/DKIM for hello@clusev.com via that relay — a DNS/mail- server config, not a panel code issue.) 750 tests; R12-verified (uniform heights, topbar is a live island, zero console errors). Co-Authored-By: Claude Fable 5 --- app/Livewire/Shell/FleetStatus.php | 21 +++++++++++++++++++ resources/views/components/topbar.blade.php | 7 ++----- .../views/livewire/alerts/index.blade.php | 5 +++-- .../views/livewire/commands/index.blade.php | 2 +- .../views/livewire/server-switcher.blade.php | 4 +++- .../views/livewire/servers/index.blade.php | 4 ++-- .../views/livewire/settings/index.blade.php | 2 +- .../livewire/shell/fleet-status.blade.php | 3 +++ 8 files changed, 36 insertions(+), 12 deletions(-) create mode 100644 app/Livewire/Shell/FleetStatus.php create mode 100644 resources/views/livewire/shell/fleet-status.blade.php diff --git a/app/Livewire/Shell/FleetStatus.php b/app/Livewire/Shell/FleetStatus.php new file mode 100644 index 0000000..9441337 --- /dev/null +++ b/app/Livewire/Shell/FleetStatus.php @@ -0,0 +1,21 @@ + Server::where('status', 'online')->count(), + 'total' => Server::count(), + ]); + } +} diff --git a/resources/views/components/topbar.blade.php b/resources/views/components/topbar.blade.php index 87898ef..6ef71d4 100644 --- a/resources/views/components/topbar.blade.php +++ b/resources/views/components/topbar.blade.php @@ -22,10 +22,7 @@ {{ __('shell.shortcut_ctrl_k') }} - @php - $fleetTotal = \App\Models\Server::count(); - $fleetOnline = \App\Models\Server::where('status', 'online')->count(); - @endphp - {{ __('shell.fleet_online', ['online' => $fleetOnline, 'total' => $fleetTotal]) }} + {{-- Live-polled island so the online count updates when a server goes up/down (not just on nav). --}} + diff --git a/resources/views/livewire/alerts/index.blade.php b/resources/views/livewire/alerts/index.blade.php index 4a0e4cb..568a7c3 100644 --- a/resources/views/livewire/alerts/index.blade.php +++ b/resources/views/livewire/alerts/index.blade.php @@ -10,7 +10,8 @@ }; @endphp -
+{{-- Poll so firing/resolved incidents appear live, matching the dashboard, without a manual refresh. --}} +
{{-- Header --}}

{{ __('alerts.eyebrow') }}

@@ -140,7 +141,7 @@
diff --git a/resources/views/livewire/server-switcher.blade.php b/resources/views/livewire/server-switcher.blade.php index 32820fd..756dc47 100644 --- a/resources/views/livewire/server-switcher.blade.php +++ b/resources/views/livewire/server-switcher.blade.php @@ -1,4 +1,6 @@ -
+{{-- Poll so the active + fleet status dots reflect a server going up/down live (Livewire morph keeps + the Alpine `open` dropdown state across re-renders). --}} +
@foreach ($groups as $g)
{{ $u->role?->label() ?? __('settings.role_admin') }} diff --git a/resources/views/livewire/shell/fleet-status.blade.php b/resources/views/livewire/shell/fleet-status.blade.php new file mode 100644 index 0000000..e7fc990 --- /dev/null +++ b/resources/views/livewire/shell/fleet-status.blade.php @@ -0,0 +1,3 @@ +
+ {{ __('shell.fleet_online', ['online' => $online, 'total' => $total]) }} +