Skip to content

Feature: Profile Settings / Edit Profile #183

Description

@Benjtalkshow

Overview

The profile page at app/profile/[userId]/page.tsx is read-only. There is no way for users to edit their own profile, change avatar, update bio, or configure notification preferences. Add a /settings route where authenticated users can manage their own data.


Goals

  • Allow authenticated users to edit name, bio, avatar URL, and social links
  • Allow users to set notification preferences (in-app vs. email, frequency)
  • Allow users to disconnect their wallet (with a confirmation dialog)
  • Surface validation errors inline

Implementation Details

1. Settings route and tabs

Create: app/settings/page.tsx

  • Tabs: Profile, Notifications, Wallet, Danger Zone
  • Server-side guard: redirect to sign-in if unauthenticated
  • Pull current user via authClient.useSession() and a useMe() query

2. Profile tab

Create: components/settings/profile-tab.tsx

  • Avatar uploader (or URL input)
  • Display name, bio (rich text or markdown editor)
  • Social links (GitHub, Twitter, personal site)
  • Save via useUpdateUserMutation (add to hooks/use-user-mutations.ts)

3. Notifications tab

Create: components/settings/notifications-tab.tsx

  • Per-event-type toggles (in-app, email)
  • Email digest cadence (off, daily, weekly)
  • Persist to backend via mutation

4. Wallet tab

  • Show connected wallet address
  • "Disconnect Wallet" button with AlertDialog confirmation

5. Danger zone

  • "Delete account" button with double-confirm
  • Wired to a useDeleteAccountMutation (placeholder if backend not ready)

Files Affected

Created

  • app/settings/page.tsx
  • components/settings/profile-tab.tsx
  • components/settings/notifications-tab.tsx
  • components/settings/wallet-tab.tsx
  • components/settings/danger-zone-tab.tsx
  • hooks/use-user-mutations.ts

Acceptance Criteria

  • /settings is reachable only by authenticated users
  • User can update name, bio, avatar, and social links and changes persist
  • Notification preferences are saved per-user
  • Wallet disconnect requires confirmation
  • Form validation errors surface inline (not as toast)

Additional Notes

  • Optimistic update on save; rollback on error
  • Keep this consistent with the existing dialog/form patterns elsewhere in the app

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions