←
CDEV-36
Created: 2025-12-26
•
Updated: 2025-12-26
Relationships
Loading...
Attachments
Loading...
Comments (1)
agent
·
2025-12-26
## Implementation Complete
### What was done
Created a container create form page at `/containers/new` with:
1. **Form Fields**:
- Container name (required, validated)
- Image type selector (desktop/cuda/headless) with visual cards
- Profile selector (desktop/minimal/development)
- Hostname (optional, RFC 1123 validated)
- Git repository URL (optional)
- Git branch (optional, only shows when repo is provided)
2. **Validation**:
- Name: required, 1-255 characters
- Hostname: RFC 1123 compliant (alphanumeric + hyphens, can't start/end with hyphen, max 63 chars)
- Image type: must be one of desktop/cuda/headless
- Real-time validation with error messages
3. **API Integration**:
- Calls POST /api/containers on submit
- Tracks job progress via WebSocket (with polling fallback)
- Shows progress bar and stage messages
- Auto-redirects to /containers on success
4. **Files Changed**:
- `frontend/src/app/containers/new/page.tsx` - Main form page (555 lines)
- `frontend/src/components/ui/label.tsx` - Label component for forms (21 lines)
### Verification
- Frontend build passes
- ESLint passes
- Backend tests pass (2 pre-existing failures in headscale tests unrelated to this work)