Files
GearBox/.planning/phases/28-profile-and-logto-integration/28-02-SUMMARY.md

1.9 KiB

phase, plan, subsystem, tags, key-files, metrics
phase plan subsystem tags key-files metrics
28-profile-and-logto-integration 02 client
profile
account-management
ui
created modified
src/client/routes/profile.tsx
src/client/hooks/useAccount.ts
src/client/routes/settings.tsx
tasks commits files-changed
2/2 1 3

Plan 28-02 Summary: Profile Page & Settings Separation

What Was Built

  1. Profile page (src/client/routes/profile.tsx) — Dedicated /profile route with four sections:

    • Profile Info: Reuses existing ProfileSection component (displayName, bio, avatar)
    • Account Info: Shows email from auth session with inline change form, member-since date
    • Security: Password change form (3 fields if has password, 2 if social-only), client-side validation
    • Danger Zone: Account deletion with typed "DELETE" confirmation, red-bordered card
  2. Account hooks (src/client/hooks/useAccount.ts) — TanStack Query hooks: useHasPassword, useChangePassword, useChangeEmail, useDeleteAccount

  3. Settings separation — Removed ProfileSection from /settings. Settings now only has weight unit, currency, import/export, and API keys.

Commits

# Hash Description
1 2369251 feat(28-02): create profile page with account management, separate from settings

Deviations

None — implemented as planned per UI-SPEC.md.

Self-Check: PASSED

  • /profile route created with createFileRoute
  • ProfileSection reused without modifications
  • Email display with change button and inline form
  • Member-since date formatted with Intl.DateTimeFormat
  • Password form adapts to has-password/no-password state
  • Client-side validation: 8+ chars, uppercase, lowercase, number
  • Danger zone card uses border-red-200
  • Delete confirmation requires typed "DELETE"
  • Settings page no longer contains ProfileSection
  • Auth guard redirects unauthenticated users
  • Lint passes