Skip to content

feat: family trees, drawn from typed relationships (slice 26) - #27

Merged
dannyclarkdev merged 2 commits into
mainfrom
feat/family-trees-slice-26
Sep 13, 2026
Merged

dannyclarkdev merged 2 commits into
mainfrom
feat/family-trees-slice-26

Conversation

@dannyclarkdev

Copy link
Copy Markdown
Owner

What

Slice 26 of the P3 queue: family trees.

  • entity_relations.kinship, a nullable column cast to a four-case Kinship enum: parent, child, sibling, spouse, read from the source's side. RelateEntities takes it as one more argument.
  • The relations form gains a "Kinship" select. A blank label and a blank reverse label fill in from the kinship; typed words win; a plain relationship still requires a label.
  • A "Family" card on a character's page, drawn by Relations::family(): one query for every kinship row the viewer may see through EntityRelation::visibleTo(), both ends eager-loaded, then a walk two generations up and two down in memory. A row the scope refused is not in the graph, so the second hop is as safe as the first. The GM reads a "Hidden" mark on a relative the party would not see.
  • kinship on every relation row in the export; the reader accepts an older file and refuses a value it does not know; both API relation lists carry the key, the incoming one from the page's side.
  • The demo world gains Iselle Ashgrove, Wren's sister, as a GM-only page on a hidden sibling row, and Abbess Corvane as Mara's mother.

Checks

  • 8 new tests. Full suite: 1442 tests, 1441 passing, 1 skipped. Larastan and Pint clean.
  • Browser pass from both seats, recorded in docs/plans/2026-09-13-feat-family-trees-plan.md.

A relationship may carry a kinship: parent, child, sibling, or spouse, read
from the side it was written on, with Kinship::reverse() as the other side's
word. The labels fill in from it when the GM leaves them blank, and typed
ones win; a plain relationship still needs a label.

A character's page draws a Family card from the typed rows, two generations
up and two down. Relations::family() loads every kinship row the viewer may
see in one query through EntityRelation::visibleTo(), both ends eager-loaded,
and walks in memory, so a row the scope refused is never a hop: a GM-only
grandmother cannot be reached through a revealed mother. A GM reads a mark
on anyone the party would not see.

The kinship travels on every relation row in the export, the reader accepts
an older file and refuses a kinship it does not know, and both API relation
lists carry it. The demo world gains Wren's sister, a GM-only page on a
hidden sibling row, and the abbess as Mara's mother.
@dannyclarkdev
dannyclarkdev merged commit 6bac50e into main Sep 13, 2026
2 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