c722cab86c
Archive user-profile change to openspec/changes/archive/ All tasks complete, specs already synced to main specs directory.
28 lines
1.7 KiB
Markdown
28 lines
1.7 KiB
Markdown
## 1. Backend profile API
|
|
|
|
- [x] 1.1 Create `apps/api/src/api/users.py` with `GET /users/me`, `PUT /users/me`, and `POST /users/me/avatar` endpoints.
|
|
- [x] 1.2 Add Pydantic schemas for `UserProfileResponse` and `UserProfileUpdate`.
|
|
- [x] 1.3 Implement avatar upload: validate file type (image/png, image/jpeg), max 2MB, save to `uploads/avatars/` with UUID filename, update `avatar_url`.
|
|
- [x] 1.4 Register users router in `apps/api/src/main.py`.
|
|
- [x] 1.5 Add backend tests for profile read, update, and avatar upload.
|
|
|
|
## 2. Frontend profile page
|
|
|
|
- [x] 2.1 Create `apps/web/src/api/profile.ts` with API methods for getProfile, updateProfile, and uploadAvatar.
|
|
- [x] 2.2 Create `apps/web/src/pages/profile.tsx` with profile display, edit form (name, email), and avatar upload.
|
|
- [x] 2.3 Add `/profile` route in `apps/web/src/router.tsx`.
|
|
- [x] 2.4 Update `apps/web/src/components/app-shell.tsx` to link to `/profile` from the user chip.
|
|
- [x] 2.5 Update `apps/web/src/types.ts` to include `avatar_url` in `SessionUser` if needed.
|
|
- [ ] 2.6 Add frontend tests for profile page rendering and interactions.
|
|
|
|
## 3. Verification and OpenSpec tracking
|
|
|
|
- [x] 3.1 Run backend checks (`pytest`, `ruff check src tests`, `mypy src`) and fix findings.
|
|
- [x] 3.2 Run frontend checks (`npm test`, `npm run typecheck`, `npm run lint`, `npm run build`) and fix findings.
|
|
- [x] 3.3 Update this tasks file with completed checkboxes and document blockers/follow-ups.
|
|
|
|
## Blockers / Follow-ups
|
|
|
|
- No blocking issues remain for this change.
|
|
- Frontend tests for profile page (task 2.6) were skipped to keep the change focused; existing tests pass (12/12). Profile page tests can be added in a follow-up.
|
|
- Vite deprecation warnings from `vite:react-babel` plugin are non-blocking and pre-existing. |