fix(onboarding): auto-select first SSH key for better UX

- 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 <noreply@anthropic.com>
This commit is contained in:
Andras Bacsai
2025-10-12 18:54:12 +02:00
parent 04625591ea
commit de24489aa7
2 changed files with 4 additions and 2 deletions

View File

@@ -187,7 +187,10 @@ class Index extends Component
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';
}