Build Log
Member Management Round 2 — Shared Family Data Foundation
August 14, 2026
Extended Round 1's manual-add flow with spouse, birthday, and children so Leadership can create one real test family and invite it into an already-populated My Family.
Timeline
What shipped
products/medinaCHF/lib/db/schema.ts — families.spouseFirstName/spouseLastName, adults.birthMonth/birthDay (month/day only, no year), new emailChangeRequests table
products/medinaCHF/lib/actions/member-management.ts — extended createMemberManually/updateMemberBasicInfo with spouse/birthday/children; added adminUpsertChild/adminDeleteChild; added resolveEmailChangeRequest/dismissEmailChangeRequest using a Clerk-safe email-replace composed from createEmailAddress+updateUser+deleteEmailAddress (installed @clerk/backend SDK predates Clerk's single-call ReplaceUserEmailAddress endpoint)
products/medinaCHF/lib/actions/family-profile.ts — added updateMyPhone (member self-service) and requestEmailChange (creates an emailChangeRequests row)
products/medinaCHF/lib/queries/attention-needed.ts — new email_change category, same fingerprint/dismissal pattern as existing categories but status-driven since a request is terminal, not a recurring condition
products/medinaCHF/lib/queries/family-profile.ts — FamilyCard now carries primaryAdultPhone/primaryAdultEmail/spouseName; birthMonth/birthDay deliberately never added to this type at all
products/medinaCHF/components/coordinator/AddMemberButton.tsx, MemberDetailPanel.tsx — spouse fields, month/day birthday picker, repeatable children editor (+ Add Another Child, no fixed slot count)
products/medinaCHF/components/MyAdultProfileForm.tsx, RequestEmailChangeModal.tsx — member phone editing, read-only login email with Request Email Change modal
products/medinaCHF/components/coordinator/ResolveEmailChangeButton.tsx — inline Attention Needed resolution for email-change requests
products/medinaCHF/components/FamilyCardPreview.tsx — directory now shows phone/email/spouse name on the full (non-compact) profile view only
BUGFIX: products/medinaCHF/lib/actions/member-management.ts — getPrimaryAdult() helper, fixing an unordered adults-by-familyId query at 3 call sites that could non-deterministically pick either adult row in a 2+-adult family
BUGFIX: products/medinaCHF/app/member/layout.tsx — added missing Connect/directory link to the desktop member nav
“no, store the spouse on families and if they have an adults row, then email is required. why does this not work?”