feat: add SSH URL validation, inline radio buttons in repo creation dialog

RepositoryCreateDialog (already unified, used everywhere):
- Add isSshUrl() helper to detect git@ and ssh:// URLs
- Require SSH key selection when URL is SSH; show error otherwise
- Inline existing/new radio buttons with smaller styling (.repo-mode-radios)

Tests:
- Update repositories-settings-tab.test.tsx to select SSH key for owner/repo mode
- Mock listSSHKeys in tests

Quality gates: tsc --noEmit pass, npm run build pass, 80/80 tests pass
This commit is contained in:
Developer
2026-06-09 09:54:24 +00:00
parent 349066bcfa
commit 152f87a254
3 changed files with 55 additions and 7 deletions
+25
View File
@@ -137,3 +137,28 @@
display: flex;
justify-content: flex-start;
}
/* Inline radio buttons for repository creation mode */
.repo-mode-radios {
display: flex;
gap: var(--space-4);
flex-wrap: wrap;
padding: var(--space-2) 0;
}
.repo-mode-label {
display: inline-flex;
align-items: center;
gap: var(--space-2);
font-size: var(--font-size-sm);
font-weight: 500;
cursor: pointer;
color: var(--ink);
}
.repo-mode-label input[type="radio"] {
width: 18px;
height: 18px;
accent-color: var(--brand);
margin: 0;
}