Alternate names, self-person link, deletion integrity + dangling people #20

Merged
justin merged 1 commits from names-deletion-self into main 2026-06-07 10:41:03 -04:00
Owner

Stacked on #19.

  • Maiden/married typed names with full CRUD (maiden stays primary).
  • Account self-person link ("This is me").
  • Delete cleans up relationships (fixes broken tree view); optional cascade to descendants; family view surfaces unconnected people.

45 backend tests pass; migration up/down verified; frontend builds.

Stacked on #19. - Maiden/married typed names with full CRUD (maiden stays primary). - Account self-person link ("This is me"). - Delete cleans up relationships (fixes broken tree view); optional cascade to descendants; family view surfaces unconnected people. 45 backend tests pass; migration up/down verified; frontend builds.
justin changed target branch from tree-search-combobox to main 2026-06-07 10:40:38 -04:00
justin added 2 commits 2026-06-07 10:40:38 -04:00
- Tree page: add a "Find a person" search box that jumps the chart to a
  match and rebuilds the hourglass (parents/grandparents/partner/children)
  around them. Clicking any card recenters via family-chart's default
  behavior (setAncestryDepth 3 / setProgenyDepth 2), syncing focus through
  setAfterUpdate for the "Open profile" link.
- Person detail: replace the relationship "add" <select> with a
  type-to-filter PersonCombobox so long people lists are searchable.
- Person detail: gender is now a Male/Female dropdown, not free text.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Names (the genealogy standard: maiden name primary, married/alias as typed
alternates):
- Name model already supported multiple typed names; expose full CRUD —
  NameCreate/Read/Update schemas, name_service (one-primary invariant,
  promote-on-delete), nested /persons/{id}/names routes.
- Person page gains a Names card: add/edit/delete + "make primary", with a
  curated name_type dropdown (birth/maiden, married, alias, nickname, …).

Self-person ("who am I"):
- users.self_person_id FK (use_alter for the users<->persons<->trees cycle)
  + migration; PATCH /users/me/self-person; "This is me" / "This is you"
  on the person page. Soft-deleting the linked person clears it.

Deletion integrity (fixes the broken tree view):
- delete_person now soft-deletes the relationships touching the person, so no
  dangling edges remain; family-chart also filters links to missing people.
- Optional cascade=true recursively deletes descendants (GEDCOM cleanup);
  the person page asks "only this person" vs "with all descendants".
- DELETE returns {deleted: n}.

Family view surfaces "Not connected to anyone" so dangling people aren't lost.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
justin merged commit c4e9d69e00 into main 2026-06-07 10:41:03 -04:00
justin deleted branch names-deletion-self 2026-06-07 10:41:03 -04:00
Sign in to join this conversation.