Skip to content

feat(admin): show full User.Email + UserEmails on duplicate-account detail#691

Merged
peterdrier merged 1 commit into
mainfrom
fix/dupe-accounts-show-all-emails
May 20, 2026
Merged

feat(admin): show full User.Email + UserEmails on duplicate-account detail#691
peterdrier merged 1 commit into
mainfrom
fix/dupe-accounts-show-all-emails

Conversation

@peterdrier
Copy link
Copy Markdown
Owner

Problem

On /Admin/DuplicateAccounts/Detail, the per-account "Email sources" list only showed the emails that matched the conflictDuplicateAccountService builds EmailSources per shared email, so it's just the overlapping subset, not each account's full email footprint. An admin resolving a duplicate couldn't see all of an account's email rows.

Change

Surface the complete email picture for both Account A and Account B:

  • User.Email — the raw User.Email Identity column (UserInfo.IdentityEmailColumn).
  • UserEmails (N) — every UserEmails row, each tagged with badges: Primary / Verified|Unverified / Google / Provider.

The data was already loaded via UserInfo; the controller now reuses that fetch (no extra DB round-trip — BuildProfileCardAsync takes the already-fetched UserInfo) and maps it into the view model. The shared conflicting email remains in the top "Email Conflict" card, so dropping the redundant EmailSources subset loses no context.

Files

  • AdminDuplicateAccountsController.cs — fetch UserInfo once per account, reuse for the profile card, populate new fields via a MapEmails helper.
  • AdminViewModels.cs — replace Account1/2EmailSources with Account1/2IdentityEmail + Account1/2Emails; add DuplicateAccountEmailRowViewModel.
  • Detail.cshtml — render User.Email + the full UserEmails list with badges per account.

The Index page's EmailSources usage is untouched.

Verification

  • dotnet build src/Humans.Web — 0 errors (Razor view compiles).
  • Not yet exercised against a live DB — preview env will do that.

🤖 Generated with Claude Code

…etail

The duplicate-account Detail page only rendered the conflict-matched
EmailSources subset, so an admin couldn't see each account's complete
email footprint when deciding which to keep.

Surface the full picture per account: the raw User.Email Identity column
plus every UserEmails row (with Primary/Verified/Google/Provider badges).
The data was already loaded via UserInfo; the controller now reuses that
fetch and maps it into the view model. The shared conflicting email stays
in the top "Email Conflict" card, so the dropped EmailSources subset loses
no context.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@claude
Copy link
Copy Markdown

claude Bot commented May 20, 2026

Reviewed commit fb78006 — no issues found.

@peterdrier peterdrier merged commit fd53382 into main May 20, 2026
9 checks passed
@peterdrier peterdrier deleted the fix/dupe-accounts-show-all-emails branch May 20, 2026 10:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant