Files
headquarter/openspec/changes/archive/2025-05-17-user-profile/tasks.md
T
Fusion c722cab86c chore: archive completed user-profile change
Archive user-profile change to openspec/changes/archive/
All tasks complete, specs already synced to main specs directory.
2026-05-18 09:45:36 +02:00

1.7 KiB

1. Backend profile API

  • 1.1 Create apps/api/src/api/users.py with GET /users/me, PUT /users/me, and POST /users/me/avatar endpoints.
  • 1.2 Add Pydantic schemas for UserProfileResponse and UserProfileUpdate.
  • 1.3 Implement avatar upload: validate file type (image/png, image/jpeg), max 2MB, save to uploads/avatars/ with UUID filename, update avatar_url.
  • 1.4 Register users router in apps/api/src/main.py.
  • 1.5 Add backend tests for profile read, update, and avatar upload.

2. Frontend profile page

  • 2.1 Create apps/web/src/api/profile.ts with API methods for getProfile, updateProfile, and uploadAvatar.
  • 2.2 Create apps/web/src/pages/profile.tsx with profile display, edit form (name, email), and avatar upload.
  • 2.3 Add /profile route in apps/web/src/router.tsx.
  • 2.4 Update apps/web/src/components/app-shell.tsx to link to /profile from the user chip.
  • 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

  • 3.1 Run backend checks (pytest, ruff check src tests, mypy src) and fix findings.
  • 3.2 Run frontend checks (npm test, npm run typecheck, npm run lint, npm run build) and fix findings.
  • 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.