wacrm/src/app/(dashboard)
Arnas Donauskas 72a5e4cf70
feat(settings): user profile management
Adds a profile tab to /settings with the five things every B2B SaaS
user expects:

- Display name — edits profiles.full_name.
- Avatar — upload / replace / remove, stored in a new `avatars`
  Supabase Storage bucket with RLS scoped to the owner's folder.
  Migration 008_profile_avatars_storage.sql creates the bucket (public
  read, 2 MB cap, image mimes only) and the four storage.objects
  policies.
- Email — goes through supabase.auth.updateUser({ email }), which
  confirms to both the old and new addresses. UI surfaces a "check
  both inboxes" banner after save.
- Password — three-field form with a current-password gate implemented
  via a throwaway signInWithPassword() before calling updateUser.
- Active sessions — one-click "sign out of all devices" using
  supabase.auth.signOut({ scope: 'global' }), with a confirm dialog.

Plus read-only role, joined date, and user id for operator debugging.

The header avatar and sidebar user row are now both dropdown menus
linking to /settings?tab=profile and /settings?tab=whatsapp; the
settings page reads ?tab= to land on the right tab. useAuth gets a
refreshProfile() callback so the header/sidebar update immediately
after a save without a full reload.

Deferred (separate work): account deletion, 2FA, phone/timezone.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-20 17:40:39 +03:00
..
automations feat(automations): visual flow builder, engine, and logs viewer 2026-04-17 19:39:02 +03:00
broadcasts feat(mobile): tiered columns on the broadcasts table 2026-04-19 12:51:49 +03:00
contacts Initial scaffold: WhatsApp CRM with Next.js + Supabase 2026-04-16 18:17:31 +03:00
dashboard Merge pull request #44 from ArnasDon/fix/dashboard-activity-feed-pagination 2026-04-17 22:39:18 +03:00
inbox feat(mobile): inbox single-pane flow on phone, unchanged on desktop 2026-04-19 11:47:35 +03:00
pipelines fix(pipelines): dark-theme the board + cards, put analytics above, add metric tooltips 2026-04-16 22:50:52 +03:00
settings feat(settings): user profile management 2026-04-20 17:40:39 +03:00
dashboard-shell.tsx feat(mobile): app shell drawer + responsive header 2026-04-19 12:44:31 +03:00
layout.tsx feat(seo): full SEO pass (reapply with OG-image build fix) 2026-04-19 12:25:59 +03:00