From 981fc127b5054c19ae3d71897e49d08f53cc6154 Mon Sep 17 00:00:00 2001 From: Andras Bacsai <5845193+andrasbacsai@users.noreply.github.com> Date: Mon, 1 Dec 2025 13:51:21 +0100 Subject: [PATCH] fix: move base directory path normalization to frontend MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change wire:model.blur to wire:model.defer to prevent backend requests during form navigation. Add Alpine.js path normalization functions that run on blur, fixing tab focus issues while keeping path validation purely on the frontend. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- .../Project/New/GithubPrivateRepository.php | 10 ------ .../Project/New/PublicGitRepository.php | 20 ------------ ...ub-private-repository-deploy-key.blade.php | 31 ++++++++++++++++--- .../new/github-private-repository.blade.php | 30 +++++++++++++++--- .../new/public-git-repository.blade.php | 31 ++++++++++++++++--- 5 files changed, 77 insertions(+), 45 deletions(-) diff --git a/app/Livewire/Project/New/GithubPrivateRepository.php b/app/Livewire/Project/New/GithubPrivateRepository.php index 27ecacb99..5dd508c29 100644 --- a/app/Livewire/Project/New/GithubPrivateRepository.php +++ b/app/Livewire/Project/New/GithubPrivateRepository.php @@ -75,16 +75,6 @@ public function mount() $this->github_apps = GithubApp::private(); } - public function updatedBaseDirectory() - { - if ($this->base_directory) { - $this->base_directory = rtrim($this->base_directory, '/'); - if (! str($this->base_directory)->startsWith('/')) { - $this->base_directory = '/'.$this->base_directory; - } - } - } - public function updatedBuildPack() { if ($this->build_pack === 'nixpacks') { diff --git a/app/Livewire/Project/New/PublicGitRepository.php b/app/Livewire/Project/New/PublicGitRepository.php index 89814ee7f..2fffff6b9 100644 --- a/app/Livewire/Project/New/PublicGitRepository.php +++ b/app/Livewire/Project/New/PublicGitRepository.php @@ -107,26 +107,6 @@ public function mount() $this->query = request()->query(); } - public function updatedBaseDirectory() - { - if ($this->base_directory) { - $this->base_directory = rtrim($this->base_directory, '/'); - if (! str($this->base_directory)->startsWith('/')) { - $this->base_directory = '/'.$this->base_directory; - } - } - } - - public function updatedDockerComposeLocation() - { - if ($this->docker_compose_location) { - $this->docker_compose_location = rtrim($this->docker_compose_location, '/'); - if (! str($this->docker_compose_location)->startsWith('/')) { - $this->docker_compose_location = '/'.$this->docker_compose_location; - } - } - } - public function updatedBuildPack() { if ($this->build_pack === 'nixpacks') { diff --git a/resources/views/livewire/project/new/github-private-repository-deploy-key.blade.php b/resources/views/livewire/project/new/github-private-repository-deploy-key.blade.php index 6d644ba2c..596559817 100644 --- a/resources/views/livewire/project/new/github-private-repository-deploy-key.blade.php +++ b/resources/views/livewire/project/new/github-private-repository-deploy-key.blade.php @@ -61,12 +61,33 @@ class="loading loading-xs dark:text-warning loading-spinner"> @endif @if ($build_pack === 'dockercompose') -
- - + + + x-model="composeLocation" @blur="normalizeComposeLocation()" />
Compose file location in your repository: @if ($build_pack === 'dockercompose') -
- + + x-model="baseDir" @blur="normalizeBaseDir()" /> + x-model="composeLocation" @blur="normalizeComposeLocation()" />
Compose file location in your repository: @if ($build_pack === 'dockercompose') -
- - + + + x-model="composeLocation" @blur="normalizeComposeLocation()" />
Compose file location in your repository: