Files
Fusion 6f41fa7cbe feat: implement universal icon system with Phosphor Icons
- Install @phosphor-icons/react package
- Create centralized Icon component with size/weight/color variants
- Create icon registry with 34 icons across 5 categories
- Replace all raw Unicode symbols with proper icon components
- Add icons to navigation, buttons, status indicators, git operations
- Add icon CSS with consistent sizing and spacing
- Fix type definitions for Phosphor icon compatibility

Quality gates: typecheck ✓, lint ✓, build ✓ (375KB bundle)
2026-05-19 19:33:06 +02:00

44 lines
1.9 KiB
Markdown

# Smart Git URL Parsing for Repository Creation
## Problem
When users add a new repository, they often paste a full browser URL that includes branch names, file paths, or query parameters instead of a clean repository URL. This causes the clone operation to fail with unclear error messages.
**Examples of problematic URLs:**
- `https://github.com/user/repo/tree/main` (includes branch path)
- `https://github.com/user/repo/blob/main/README.md` (includes file path)
- `https://github.com/user/repo?tab=readme-ov-file` (includes query params)
- `https://github.com/user/repo/pull/123` (includes PR path)
**Current behavior:** The backend attempts to clone the exact URL, which fails with "fatal: repository not found" or similar errors.
**User confusion:** Users don't understand why the clone failed since the URL works in their browser.
## Solution
Implement smart URL parsing that:
1. **Detects non-repo URLs**: Recognizes when a URL contains paths like `/tree/`, `/blob/`, `/pull/`, or query parameters
2. **Extracts base repo URL**: Strips away branch names, file paths, query parameters to get `https://host/owner/repo.git`
3. **Suggests correction**: Shows the user the extracted base URL and asks for confirmation
4. **Improves clone handling**: Handles edge cases and provides clear error messages
## Benefits
- **Better UX**: Users get helpful suggestions instead of cryptic errors
- **Fewer support issues**: Self-service correction reduces confusion
- **More robust**: Handles common copy-paste mistakes automatically
- **Educational**: Teaches users what a proper git URL looks like
## Scope
### Backend
- URL parsing utilities to detect and extract base repo URLs
- Enhanced validation in repository creation endpoint
- Clear error messages for unsupported URLs
### Frontend
- UI dialog to show URL correction suggestions
- Option to accept or edit the suggested URL
- Visual indicator for URL validation status