An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.
PHP coolifydatabasesdeploymentdockerdocker-composeinertiajslaravelmariadbmysqlnextjsnodejsphppostgresredisself-hostedself-hostingserverstatic-sitesveltesvelte5
fix(ui): polish create flows and terminal navigation
Andras Bacsaifff83884dae2
diff --git a/resources/views/components/navbar.blade.php b/resources/views/components/navbar.blade.phpindex d5637f5bed..ad2498dbee 100644--- a/resources/views/components/navbar.blade.php+++ b/resources/views/components/navbar.blade.php@@ -89,7 +89,7 @@</li>@can('canAccessTerminal')<li>- <a title="Terminal" {{ wireNavigate() }}+ <a title="Terminal"class="{{ request()->is('terminal*') ? 'menu-item-active menu-item' : 'menu-item' }}":class="collapsed && 'lg:justify-center lg:px-0'" href="{{ route('terminal') }}"><x-reicon name="browser-terminal" class="menu-item-icon" />diff --git a/resources/views/livewire/project/new/docker-image.blade.php b/resources/views/livewire/project/new/docker-image.blade.phpindex 849f651398..2daa7896c3 100644--- a/resources/views/livewire/project/new/docker-image.blade.php+++ b/resources/views/livewire/project/new/docker-image.blade.php@@ -14,9 +14,14 @@placeholder="nginx, ghcr.io/user/app:v1.2.3, or nginx:stable@sha256:…"helper="Paste a complete image reference, or enter a name and use one of the optional fields below."required autofocus />- <div class="grid gap-4 sm:grid-cols-2">+ <div class="grid gap-3 sm:grid-cols-[minmax(0,1fr)_auto_minmax(0,1fr)] sm:items-end"+ aria-label="Tag and SHA256 digest are mutually exclusive"><x-forms.input id="imageTag" label="Tag" placeholder="latest"helper="Use a mutable tag such as latest or v1.2.3." />+ <div+ class="flex items-center justify-center text-xs font-semibold text-neutral-400 sm:h-9 dark:text-fg-faint">+ <span>OR</span>+ </div><x-forms.input id="imageSha256" label="SHA256 digest"placeholder="59e02939b1bf39f16c93138a28727aec…"helper="Use the 64-character digest without the sha256: prefix." />diff --git a/resources/views/livewire/project/new/gitlab-private-repository.blade.php b/resources/views/livewire/project/new/gitlab-private-repository.blade.phpindex 2917921878..9678c14a33 100644--- a/resources/views/livewire/project/new/gitlab-private-repository.blade.php+++ b/resources/views/livewire/project/new/gitlab-private-repository.blade.php@@ -7,15 +7,17 @@<p>Connect a GitLab App before selecting a private repository.</p></div></div>- <x-empty title="No GitLab Apps"- description="Create an app to grant Coolify access to selected repositories."- icon-name="sources">- <x-slot:contents>- <x-modal-input buttonTitle="+ Add GitLab App" title="New GitLab App" closeOutside="false">- <livewire:source.gitlab.create />- </x-modal-input>- </x-slot:contents>- </x-empty>+ <div class="application-settings-section-body">+ <x-empty title="No GitLab Apps"+ description="Create an app to grant Coolify access to selected repositories."+ icon-name="sources">+ <x-slot:contents>+ <x-modal-input buttonTitle="+ Add GitLab App" title="New GitLab App" closeOutside="false">+ <livewire:source.gitlab.create />+ </x-modal-input>+ </x-slot:contents>+ </x-empty>+ </div></section>@elseif ($current_step === 'gitlab_apps')<section class="application-settings-section">diff --git a/resources/views/livewire/project/new/simple-dockerfile.blade.php b/resources/views/livewire/project/new/simple-dockerfile.blade.phpindex 6b4f138506..3c924996be 100644--- a/resources/views/livewire/project/new/simple-dockerfile.blade.php+++ b/resources/views/livewire/project/new/simple-dockerfile.blade.php@@ -6,7 +6,7 @@<h2>Dockerfile</h2><p>Create an application directly from a Dockerfile without connecting a Git repository.</p></div>- <x-forms.button type="submit" isHighlighted>Create application</x-forms.button>+ <x-forms.button type="submit" wire:target="submit" isHighlighted>Create application</x-forms.button></div><div class="application-settings-section-body p-0!"><x-forms.textarea useMonacoEditor monacoEditorLanguage="dockerfile" rows="20"diff --git a/tests/Feature/DockerImageCreateViewTest.php b/tests/Feature/DockerImageCreateViewTest.phpnew file mode 100644index 0000000000..226f369acc--- /dev/null+++ b/tests/Feature/DockerImageCreateViewTest.php@@ -0,0 +1,9 @@+<?php++it('shows that image tag and digest are mutually exclusive', function () {+ $view = file_get_contents(resource_path('views/livewire/project/new/docker-image.blade.php'));++ expect($view)+ ->toContain('aria-label="Tag and SHA256 digest are mutually exclusive"')+ ->toContain('>OR</span>');+});diff --git a/tests/Feature/GitlabAppAuthorizationTest.php b/tests/Feature/GitlabAppAuthorizationTest.phpindex 860ef41c0b..c6e8d381bf 100644--- a/tests/Feature/GitlabAppAuthorizationTest.php+++ b/tests/Feature/GitlabAppAuthorizationTest.php@@ -46,6 +46,12 @@ beforeEach(function () {});describe('GitLab App authorization', function () {+ test('empty gitlab app state is inset from the section edges', function () {+ $view = file_get_contents(resource_path('views/livewire/project/new/gitlab-private-repository.blade.php'));++ expect($view)->toContain("<div class=\"application-settings-section-body\">\n <x-empty title=\"No GitLab Apps\"");+ });+test('unrelated users cannot inspect system-wide source secrets in the component payload', function () {$otherTeam = Team::factory()->create();$systemWideSource = GitlabApp::create([diff --git a/tests/Feature/RealtimeTerminalPackagingTest.php b/tests/Feature/RealtimeTerminalPackagingTest.phpindex e4c14971ca..5754ddc525 100644--- a/tests/Feature/RealtimeTerminalPackagingTest.php+++ b/tests/Feature/RealtimeTerminalPackagingTest.php@@ -15,6 +15,18 @@ it('renders the resource terminal shell while containers are discovered', functi->not->toContain('<x-loading text="Loading containers" />');});+it('provides opt-in diagnostics for connected terminal theme changes', function () {+ $terminalClient = file_get_contents(resource_path('js/terminal.js'));++ expect($terminalClient)+ ->toContain('terminal-debug')+ ->toContain("'[Terminal Theme] Applying theme'")+ ->toContain("'[Terminal Theme] Theme applied'")+ ->toContain('requestedTheme: themeName')+ ->toContain('shellTheme: shell?.dataset.consoleTheme')+ ->toContain("getComputedStyle(shell, '::before').background");+});+it('starts a single discovered resource container without waiting for a missed browser event', function () {$terminalComponent = file_get_contents(app_path('Livewire/Project/Shared/ExecuteContainerCommand.php'));$terminalView = file_get_contents(resource_path('views/livewire/project/shared/execute-container-command.blade.php'));diff --git a/tests/Feature/SimpleDockerfileCreateViewTest.php b/tests/Feature/SimpleDockerfileCreateViewTest.phpnew file mode 100644index 0000000000..25c2b1f091--- /dev/null+++ b/tests/Feature/SimpleDockerfileCreateViewTest.php@@ -0,0 +1,7 @@+<?php++it('shows a loading indicator while creating the application', function () {+ $view = file_get_contents(resource_path('views/livewire/project/new/simple-dockerfile.blade.php'));++ expect($view)->toContain('<x-forms.button type="submit" wire:target="submit" isHighlighted>');+});diff --git a/tests/Feature/TerminalPageHeaderTest.php b/tests/Feature/TerminalPageHeaderTest.phpindex a058ee8338..acc737875d 100644--- a/tests/Feature/TerminalPageHeaderTest.php+++ b/tests/Feature/TerminalPageHeaderTest.php@@ -54,6 +54,15 @@ it('uses the same padded themed canvas for the active terminal session', functio->toMatch('/\.terminal-session-panel\s*\{[^}]*box-shadow:\s*none;/s');});+it('opens the global terminal outside Livewire navigation like resource terminals', function () {+ $navbar = file_get_contents(resource_path('views/components/navbar.blade.php'));++ expect($navbar)+ ->toContain('<a title="Terminal"')+ ->toContain('href="{{ route(\'terminal\') }}"')+ ->not->toMatch('/<a title="Terminal"[^>]*wireNavigate\(\)/s');+});+it('uses floating rounded controls instead of the legacy terminal header bar', function () {$view = file_get_contents(resource_path('views/livewire/terminal/index.blade.php'));