Skip to content

feat: add profile delete account with confirmation dialog#87

Merged
johnshift merged 6 commits intodevfrom
feat/profile-delete-account
Feb 1, 2026
Merged

feat: add profile delete account with confirmation dialog#87
johnshift merged 6 commits intodevfrom
feat/profile-delete-account

Conversation

@johnshift
Copy link
Collaborator

Summary

  • Add delete account flow with confirmation dialog that freezes during deletion to prevent accidental interruption
  • Add POST /api/profile/delete server route with session validation, backend forwarding, and session destruction on success
  • Add messageResponseSchema for API response validation
  • Fix infinite spinner on /profile after OAuth navigation by decoupling session query from Privy readiness (cookie-first approach)

Test plan

  • Navigate to /profile and verify "Danger Zone" section appears with delete account button
  • Click "Delete account" and verify confirmation dialog opens with warning text
  • Verify dialog freezes (close button hidden, buttons disabled, "Deleting..." text) during deletion
  • Verify successful deletion destroys session and redirects to /
  • Verify error responses unfreeze dialog and display error message
  • Verify OAuth login → navigate to /profile no longer shows infinite spinner

…e dialog

Decouple useSession from Privy readiness so the iron-session cookie is
read immediately (Phase 1). Privy token exchange (Phase 2) only runs
when Privy is ready. Add useEffect to refetch when Privy authenticates.

Keep delete dialog frozen on success by resetting isDeleting only in
error paths, preventing a brief unfreeze before navigation.

Add profile delete flow doc and update test checklists with bugs found.
@github-actions github-actions bot added the feat New feature label Feb 1, 2026
@johnshift johnshift merged commit 85a2468 into dev Feb 1, 2026
7 checks passed
@johnshift johnshift deleted the feat/profile-delete-account branch February 1, 2026 04:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feat New feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant