Regenerate api.ts for the LocalDate+DatePrecision RelationshipDTO /
RelationshipUpsertRequest and the new PUT, then migrate every caller:
- RelationshipDateField (mirrors PersonLifeDateField: DAY/MONTH/YEAR, 44px
targets, labelled, semantic dark-mode tokens, relation_* i18n keys).
- AddRelationshipForm is now upsert-capable: an optional `relationship` prop
pre-fills type, person, both dates+precision and notes; posts to
?/updateRelationship (else ?/addRelationship); the submit control disables and
shows a progress spinner while a request is in flight (REQ-019); notes textarea
(<=2000).
- RelationshipChip gains an accessible Edit affordance (canWrite + onEdit);
StammbaumCard wires it, formats the date range via formatRelationshipDateRange,
and sorts by fromDate. PersonRelationshipsCard (read view) shows the date range
and notes; no dates -> no date line.
- persons/[id]/edit/+page.server.ts: updateRelationship action (PUT) + the
addRelationship action reshaped to date+precision+notes (empty date omits
precision for coherence).
- Genealogy callers fixed for the dropped year fields: familyForest spouse-order
and StammbaumConnectors ended-edge dashing now key off fromDate/toDate.
- i18n relation_* form keys in de/en/es.
REQ-004, REQ-014, REQ-015, REQ-016, REQ-019
Refs #837
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Net-new ordering coverage: roots and every unit's children sort by birthYear
ASC (undated last), then displayName, then stable id — so horizontal x never
depends on Map iteration order.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Assigns every person to one unit: a primary, or a spouse absorbed into the
primary's run (marriage-year order, #361 preserved). Wires the parent/child
hierarchy from each primary's structural-owner parent and records displaced
parent edges as cross-links (classified same-level vs cross-level for later
distinct rendering). Unknown-id guard covers PARENT_OF and SPOUSE_OF.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Structural-owner rule for couples: earlier birth year wins, missing year sorts
last, ties break on stable id. The single definition reused by the cross-link,
cycle and intra-family paths.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>