From fff83884dae240ffda58ed51b9568f38afd4aa25 Mon Sep 17 00:00:00 2001 From: Andras Bacsai <5845193+andrasbacsai@users.noreply.github.com> Date: Fri, 7 Aug 2026 17:54:50 +0200 Subject: [PATCH] fix(ui): polish create flows and terminal navigation Open the global terminal outside Livewire navigation, clarify that image tag and SHA256 digest are mutually exclusive, inset the GitLab empty state, and show loading on Dockerfile create. Add regression tests. --- resources/views/components/navbar.blade.php | 2 +- .../project/new/docker-image.blade.php | 7 ++++++- .../new/gitlab-private-repository.blade.php | 20 ++++++++++--------- .../project/new/simple-dockerfile.blade.php | 2 +- tests/Feature/DockerImageCreateViewTest.php | 9 +++++++++ tests/Feature/GitlabAppAuthorizationTest.php | 6 ++++++ .../Feature/RealtimeTerminalPackagingTest.php | 12 +++++++++++ .../SimpleDockerfileCreateViewTest.php | 7 +++++++ tests/Feature/TerminalPageHeaderTest.php | 9 +++++++++ 9 files changed, 62 insertions(+), 12 deletions(-) create mode 100644 tests/Feature/DockerImageCreateViewTest.php create mode 100644 tests/Feature/SimpleDockerfileCreateViewTest.php diff --git a/resources/views/components/navbar.blade.php b/resources/views/components/navbar.blade.php index d5637f5be..ad2498dbe 100644 --- a/resources/views/components/navbar.blade.php +++ b/resources/views/components/navbar.blade.php @@ -89,7 +89,7 @@ @can('canAccessTerminal')
  • - diff --git a/resources/views/livewire/project/new/docker-image.blade.php b/resources/views/livewire/project/new/docker-image.blade.php index 849f65139..2daa7896c 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 /> -
    +
    +
    + OR +
    diff --git a/resources/views/livewire/project/new/gitlab-private-repository.blade.php b/resources/views/livewire/project/new/gitlab-private-repository.blade.php index 291792187..9678c14a3 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 @@

    Connect a GitLab App before selecting a private repository.

    - - - - - - - +
    + + + + + + + +
    @elseif ($current_step === 'gitlab_apps')
    diff --git a/resources/views/livewire/project/new/simple-dockerfile.blade.php b/resources/views/livewire/project/new/simple-dockerfile.blade.php index 6b4f13850..3c924996b 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 @@

    Dockerfile

    Create an application directly from a Dockerfile without connecting a Git repository.

    - Create application + Create application
    toContain('aria-label="Tag and SHA256 digest are mutually exclusive"') + ->toContain('>OR'); +}); diff --git a/tests/Feature/GitlabAppAuthorizationTest.php b/tests/Feature/GitlabAppAuthorizationTest.php index 860ef41c0..c6e8d381b 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("
    \n create(); $systemWideSource = GitlabApp::create([ diff --git a/tests/Feature/RealtimeTerminalPackagingTest.php b/tests/Feature/RealtimeTerminalPackagingTest.php index e4c14971c..5754ddc52 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(''); }); +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.php new file mode 100644 index 000000000..25c2b1f09 --- /dev/null +++ b/tests/Feature/SimpleDockerfileCreateViewTest.php @@ -0,0 +1,7 @@ +toContain(''); +}); diff --git a/tests/Feature/TerminalPageHeaderTest.php b/tests/Feature/TerminalPageHeaderTest.php index a058ee833..acc737875 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('toContain('href="{{ route(\'terminal\') }}"') + ->not->toMatch('/]*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'));