Skip to content

fix(dna): multi-hop family kits and autosomal tester picker (K10/K12)#22

Merged
simonellefsen merged 4 commits into
mainfrom
fix/k10-family-kits-multihop
Jul 5, 2026
Merged

fix(dna): multi-hop family kits and autosomal tester picker (K10/K12)#22
simonellefsen merged 4 commits into
mainfrom
fix/k10-family-kits-multihop

Conversation

@simonellefsen

Copy link
Copy Markdown
Owner

Summary

  • K10: Surface all in-tree raw Autosomal kits on the admin DNA panel (not just 1-hop parent/child relatives). Each family-kit row is labeled with relationshipCalculator (grandparent, sibling, cousin, etc.), shows a typical shared-cM band, and flags K6 raw-kit comparison when both focus and relative have encrypted SNP indexes.
  • K12: Scope the profile DNA tab and shared-segment import kit-owner dropdown to registered autosomal testers (listAutosomalPeopleInTree) instead of every person in the tree. Relabels "Kit owner" → "Autosomal tester" and warns when a stored owner is not a registered tester.
  • Adds migration 20260705259000_k10_list_all_family_autosomal_kits.sql and pure helpers in lib/dnaFamilyKits.ts (6 unit tests).

Test plan

  • Run supabase db push (or deploy migration) so list_family_autosomal_kits returns all Autosomal tests.
  • Open Pernille's admin DNA panel — Helle Andersen (grandmother) appears as a family kit with Grandparent label and ~1300–2300 cM typical range.
  • On a shared import profile card, kit-owner dropdown lists only autosomal testers (e.g. Pernille + Helle), not the full tree.
  • Shared-segment import modal shows Autosomal tester picker scoped to testers.
  • Amber warning when a shared import's stored owner is not a registered tester.
  • npm test (457 passing on branch)

Made with Cursor

simonellefsen and others added 2 commits July 5, 2026 22:40
List all tree Autosomal tests instead of 1-hop relatives, label each kit
with relationshipCalculator, show typical cM bands, and flag K6 compare
when both parties have encrypted raw indexes.

Co-authored-by: Cursor <cursoragent@cursor.com>
Load tester options from listAutosomalPeopleInTree instead of the full
tree, relabel Kit owner to Autosomal tester, and warn when a stored
owner is not a registered tester.

Co-authored-by: Cursor <cursoragent@cursor.com>
@vercel

vercel Bot commented Jul 5, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
linegra Ready Ready Preview, Comment Jul 5, 2026 8:51pm

The placeholder option reused the current kit-owner display name, so
Helle/Pernille appeared twice. Use a neutral prompt and only inject a
legacy owner option when they are not a registered tester.

Co-authored-by: Cursor <cursoragent@cursor.com>
Drop the empty "Select autosomal tester" option from the dropdown when
a kit owner is already linked so users cannot clear a required field.

Co-authored-by: Cursor <cursoragent@cursor.com>
@simonellefsen
simonellefsen marked this pull request as ready for review July 5, 2026 20:52
@simonellefsen
simonellefsen merged commit a94f45f into main Jul 5, 2026
4 checks passed
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