From de24489aa7289aa58f22edc9f7315c7e36f8cb15 Mon Sep 17 00:00:00 2001 From: Andras Bacsai <5845193+andrasbacsai@users.noreply.github.com> Date: Sun, 12 Oct 2025 18:54:12 +0200 Subject: [PATCH] fix(onboarding): auto-select first SSH key for better UX MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Auto-select first SSH key when available instead of requiring explicit selection - Remove disabled placeholder option from dropdown - Prevents confusing error when user clicks "Use Selected Key" without changing dropdown - Improves onboarding flow by having a sensible default selection 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- app/Livewire/Boarding/Index.php | 5 ++++- resources/views/livewire/boarding/index.blade.php | 1 - 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/app/Livewire/Boarding/Index.php b/app/Livewire/Boarding/Index.php index 15f0cab85..ac2b9213b 100644 --- a/app/Livewire/Boarding/Index.php +++ b/app/Livewire/Boarding/Index.php @@ -187,7 +187,10 @@ public function setServerType(string $type) return $this->validateServer('localhost'); } elseif ($this->selectedServerType === 'remote') { $this->privateKeys = PrivateKey::ownedByCurrentTeam(['name'])->where('id', '!=', 0)->get(); - // Don't auto-select - let user explicitly choose from dropdown + // Auto-select first key if available for better UX + if ($this->privateKeys->count() > 0) { + $this->selectedExistingPrivateKey = $this->privateKeys->first()->id; + } // Onboarding always creates new servers, skip existing server selection $this->currentState = 'private-key'; } diff --git a/resources/views/livewire/boarding/index.blade.php b/resources/views/livewire/boarding/index.blade.php index f5b31746c..faee9883b 100644 --- a/resources/views/livewire/boarding/index.blade.php +++ b/resources/views/livewire/boarding/index.blade.php @@ -264,7 +264,6 @@ class="bg-red-200 dark:bg-red-900 px-1 rounded-sm">~/.ssh/authorized_keys
- @foreach ($privateKeys as $privateKey)