Overview
When the API returns a 401 (missing API key) or 500 (inference error), the frontend currently fails silently or shows a generic browser error. We need user-friendly error messages.
Scope
Acceptance Criteria
- When a user submits a prediction without
cv_dev key, they see a red banner saying "API key required" instead of a blank screen
- Error banner can be dismissed via an X button
- Component renders correctly on mobile viewport
Resources
frontend/src/pages/NewAnalysis.tsx
frontend/src/pages/Upload.tsx
lucide-react — AlertCircle, X icons
Difficulty: Beginner-friendly
Labels: good first issue, frontend, ux
Overview
When the API returns a 401 (missing API key) or 500 (inference error), the frontend currently fails silently or shows a generic browser error. We need user-friendly error messages.
Scope
ApiErrorcomponent infrontend/src/components/ui/NewAnalysis.tsx— show error if prediction failsUpload.tsx— show error if upload failslucide-react, dismiss buttonAcceptance Criteria
cv_devkey, they see a red banner saying "API key required" instead of a blank screenResources
frontend/src/pages/NewAnalysis.tsxfrontend/src/pages/Upload.tsxlucide-react—AlertCircle,XiconsDifficulty: Beginner-friendly
Labels:
good first issue,frontend,ux