fix(server): keep resources nav active and show tab loading

Use $activeMenu for Resources so Livewire updates do not clear
the sidebar highlight, and disable managed/unmanaged tabs with
spinners while containers load.
This commit is contained in:
Andras Bacsai committed 2026-08-07 15:24:41 +02:00
1 parent 8f7eb2d790
commit 28f57aafb8
4 files changed
+25 -5

No files matched your search

@@ -15,6 +15,14 @@ it('keeps server submenu state independent from the Livewire update route', func
->and($proxyLogs)->toContain('activeSubMenu="logs"');
});
it('keeps the server resources menu active during Livewire updates', function () {
$sidebar = file_get_contents(resource_path('views/components/server/sidebar.blade.php'));
expect($sidebar)
->toContain("'label' => 'Resources',\n 'route' => 'server.resources',\n 'active' => \$activeMenu === 'resources'")
->not->toContain("'active' => request()->routeIs('server.resources')");
});
it('initializes persisted sidebar state before enabling layout transitions', function () {
$layout = file_get_contents(resource_path('views/layouts/app.blade.php'));