feat(ui): expand server sidebar and extract status summary

Move proxy, sentinel, resources, and terminal into the server sidebar
with nested routes and icons; extract navbar status into a shared
status-summary component; add full-width service links and compact
loading support.
This commit is contained in:
Andras Bacsai
2026-08-05 19:54:48 +02:00
parent d6db943453
commit 85613b01ba
25 changed files with 312 additions and 121 deletions
+19 -14
View File
@@ -1,23 +1,28 @@
<?php
it('uses left aligned single color status badges in the server header', function () {
it('collapses server subsystem badges into one status summary', function () {
$navbarView = file_get_contents(resource_path('views/livewire/server/navbar.blade.php'));
$summaryView = file_get_contents(resource_path('views/components/server/status-summary.blade.php'));
$badgeView = file_get_contents(resource_path('views/components/status-badge.blade.php'));
expect($navbarView)
->toContain('data-testid="server-status-summary"')
->toContain('<x-status-badge')
->toContain('label="Proxy"')
->toContain('label="Sentinel"')
->toContain('as="button"')
->toContain("wire:click='checkProxyStatus'")
->toContain('status="Refresh"')
->toContain('border-transparent')
->toContain('wire:loading.attr="disabled"')
->not->toContain('status="Refreshing..."')
->not->toContain('justify-between')
->not->toContain('<x-status.stopped status="Proxy Exited" noLoading />')
->not->toContain('<x-status.running status="Sentinel In Sync" noLoading />');
->toContain('<x-server.status-summary')
->not->toContain('label="Proxy" status="Running"')
->not->toContain('label="Sentinel"')
->and($summaryView)
->toContain("['Attention required', 'warning']")
->toContain("['Ready', 'success']")
->toContain('System status')
->toContain('Refresh status')
->toContain('<x-reicon name="chevron-down"')
->toContain(":class=\"open && 'rotate-180'\"")
->toContain('wire:click="checkProxyStatus"')
->toContain('wire:loading.remove wire:target="checkProxyStatus"')
->toContain('wire:loading.flex wire:target="checkProxyStatus"')
->toContain('Refreshing status')
->toContain('<x-loading compact />')
->toContain('name="refresh" class="size-3 opacity-70"')
->not->toContain('@click="open = false" role="menuitem"');
expect($badgeView)
->not->toContain('text-neutral-500')