feat: smart git URL parsing for browser URLs

- Add git URL parsing utilities (extract_base_repo_url, parse_git_url)
- Support GitHub, GitLab, Bitbucket browser URL detection
- Add /projects/repositories/parse-url endpoint
- Enhance repository creation to detect browser URLs and suggest corrections
- Add real-time URL validation in frontend with debouncing
- Show visual indicators (green/yellow/red) for URL validity
- Display inline suggestions with 'Use Suggested' button
- Add comprehensive unit tests for URL parsing
- Quality gates: ruff ✓, mypy ✓, typecheck ✓, lint ✓, build ✓
This commit is contained in:
Fusion
2026-05-19 12:25:44 +02:00
parent ac6c97b6ce
commit 8b70daed53
11 changed files with 1150 additions and 73 deletions
+65
View File
@@ -372,3 +372,68 @@ a {
flex-direction: column;
}
}
/* URL Validation Styles */
.valid-url {
border-color: #16a34a !important;
background-color: #f0fdf4 !important;
}
.needs-parsing-url {
border-color: #ca8a04 !important;
background-color: #fefce8 !important;
}
.invalid-url {
border-color: #dc2626 !important;
background-color: #fef2f2 !important;
}
.validation-status {
font-size: 0.85rem;
margin-top: 0.25rem;
display: block;
}
.validation-status.valid {
color: #16a34a;
}
.validation-status.warning {
color: #ca8a04;
}
.validation-status.invalid {
color: #dc2626;
}
.validation-status.validating {
color: var(--muted);
}
.url-suggestion {
margin-top: 0.5rem;
padding: 0.5rem;
background: #fefce8;
border-radius: 8px;
border: 1px solid #fde047;
}
.suggestion-actions {
display: flex;
align-items: center;
gap: 0.75rem;
margin-top: 0.35rem;
}
.suggested-url {
font-size: 0.85rem;
color: #854d0e;
flex: 1;
word-break: break-all;
}
.secondary-button.small {
padding: 0.35rem 0.6rem;
font-size: 0.85rem;
}