Skip to content

feat: person connections (non-family relationships)#541

Merged
pmilano1 merged 3 commits into
mainfrom
feat/person-connections
May 4, 2026
Merged

feat: person connections (non-family relationships)#541
pmilano1 merged 3 commits into
mainfrom
feat/person-connections

Conversation

@pmilano1

@pmilano1 pmilano1 commented May 4, 2026

Copy link
Copy Markdown
Owner

Summary

  • Adds a person_connections table (migration v40) to track non-family relationships between people: friend, colleague, neighbor, employer/employee, godparent/godchild, other
  • Canonical ordering constraint (person_id_1 < person_id_2) prevents duplicate pairs; unique index on (person_id_1, person_id_2, connection_type)
  • Full GraphQL API: connections field on Person, addPersonConnection / updatePersonConnection / removePersonConnection mutations
  • PersonConnectionsCard UI component on the person detail page — person picker, type dropdown, optional notes + year range

Test plan

  • Run migrations (runMigrations mutation) after deploy — verify person_connections table is created
  • On a person page, add a connection to another person via the Connections card
  • Verify the connection appears on both people's pages (DataLoader fans to both participants)
  • Edit connection type/notes and verify update saves
  • Remove a connection and verify it's gone
  • First real use: link Jonnie (Valdajean Van Sappe, ec17fbacd297) to Pete's dad (Peter Eugene Milanese, pnYxTBXi2HZP) as "friend"

🤖 Generated with Claude Code

pmilano1 and others added 3 commits May 4, 2026 14:32
Adds a formal mechanism to track non-family relationships between
people (friend, colleague, neighbor, employer/employee, godparent/
godchild, other) with optional notes and year range.

- Migration v40: person_connections table with canonical ordering
  constraint (person_id_1 < person_id_2) to prevent duplicate pairs
- GraphQL schema: PersonConnection type, PersonConnectionInput,
  connections field on Person, add/update/remove mutations
- DataLoader: batchConnections fans rows to both participants
- PersonConnection.person resolver uses _viewerId to return the
  other person in the connection
- PersonConnectionsCard UI component with person search, type select,
  notes and year range fields

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Moving connections out of GET_PERSON prevents the CI test DB (which
doesn't run migrations) from breaking the whole person page when the
person_connections table doesn't yet exist. The card now owns its own
GET_PERSON_CONNECTIONS query, mirroring how CommentsSection works.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
PageHeader already renders an h1 for the page title; having a second h1
in the hero card is invalid HTML and breaks the Playwright strict-mode
locator that expects a single h1.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@pmilano1 pmilano1 merged commit 98c20b2 into main May 4, 2026
9 of 10 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