From fbb569a4b3d9c5d873dfc584df50af0e9ab4e10b Mon Sep 17 00:00:00 2001
From: Andras Bacsai <5845193+andrasbacsai@users.noreply.github.com>
Date: Thu, 10 Sep 2026 08:36:15 +0200
Subject: [PATCH] fix(ui): respect sidebar toggle and show application domains
Honor an explicit sidebarCollapsed preference instead of always auto-collapsing with a second nav. Show the primary domain on the application access card, use a persisted GitLab name in the page title after delete, and shrink the compose view switcher.
---
resources/views/layouts/app.blade.php | 4 +-
.../project/application/general.blade.php | 49 ++++++++++++++-----
.../project/service/configuration.blade.php | 2 +-
.../livewire/source/gitlab/change.blade.php | 2 +-
.../ApplicationInternalAccessSectionTest.php | 19 ++++---
tests/Feature/GitlabSourceChangeViewTest.php | 17 +++++++
...erviceComposeResourcesViewSwitcherTest.php | 2 +
tests/Feature/SidebarNavigationMarkupTest.php | 4 +-
8 files changed, 75 insertions(+), 24 deletions(-)
diff --git a/resources/views/layouts/app.blade.php b/resources/views/layouts/app.blade.php
index 43efef4b50..5acd2d1887 100644
--- a/resources/views/layouts/app.blade.php
+++ b/resources/views/layouts/app.blade.php
@@ -9,6 +9,7 @@
@auth
Public access
@php
$domainCount = 0;
+ $primaryDomain = null;
if ($buildPack === 'dockercompose') {
$composeDomains = $application->docker_compose_domains
? json_decode($application->docker_compose_domains, true)
@@ -41,35 +42,57 @@
$domainString = data_get($serviceDomain, 'domain');
if (filled($domainString)) {
$domainCount += countDomains($domainString);
+ $primaryDomain ??= collect(explode(',', $domainString))
+ ->map(fn ($domain) => trim($domain))
+ ->first(fn ($domain) => filled($domain));
}
}
}
} elseif (filled($fqdn)) {
$domainCount = countDomains($fqdn);
+ $primaryDomain = collect(explode(',', $fqdn))
+ ->map(fn ($domain) => trim($domain))
+ ->first(fn ($domain) => filled($domain));
}
+ $additionalDomainCount = max(0, $domainCount - 1);
@endphp
-
-
+ @php
+ $applicationDomainsUrl = route('project.application.domains', [
+ 'project_uuid' => $application->environment->project->uuid,
+ 'environment_uuid' => $application->environment->uuid,
+ 'application_uuid' => $application->uuid,
+ ]);
+ @endphp
+
-
-
+
+
+ {{ $domainCount > 0 ? 'Manage domains' : 'Add domain' }}
+
diff --git a/resources/views/livewire/project/service/configuration.blade.php b/resources/views/livewire/project/service/configuration.blade.php
index 5d2f5336bf..79cc5f437f 100644
--- a/resources/views/livewire/project/service/configuration.blade.php
+++ b/resources/views/livewire/project/service/configuration.blade.php
@@ -117,7 +117,7 @@
+ class="flex h-8 items-center rounded-lg border border-neutral-200 bg-white dark:border-white/[0.08] dark:bg-white/[0.06]">
')
->and($resourceCard)
diff --git a/tests/Feature/SidebarNavigationMarkupTest.php b/tests/Feature/SidebarNavigationMarkupTest.php
index c385ab72dc..eafb93bb00 100644
--- a/tests/Feature/SidebarNavigationMarkupTest.php
+++ b/tests/Feature/SidebarNavigationMarkupTest.php
@@ -27,8 +27,10 @@ it('initializes persisted sidebar state before enabling layout transitions', fun
$layout = file_get_contents(resource_path('views/layouts/app.blade.php'));
expect($layout)
+ ->toContain("hasSidebarPreference: localStorage.getItem('sidebarCollapsed') !== null")
->toContain("userCollapsed: localStorage.getItem('sidebarCollapsed') === 'true'")
- ->toContain('return this.userCollapsed || (this.autoCollapse && this.hasSecondBar);')
+ ->toContain('return this.hasSidebarPreference ? this.userCollapsed : (this.autoCollapse && this.hasSecondBar);')
+ ->toContain('this.hasSidebarPreference = true;')
->toContain('this.userCollapsed = this.collapsed;')
->toContain("localStorage.setItem('sidebarCollapsed', this.userCollapsed);")
->toContain('sidebarReady: false')