Repository navigation
feat: family trees, drawn from typed relationships (slice 26) - #27
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Slice 26 of the P3 queue: family trees.
entity_relations.kinship, a nullable column cast to a four-caseKinshipenum: parent, child, sibling, spouse, read from the source's side.RelateEntitiestakes it as one more argument.Relations::family(): one query for every kinship row the viewer may see throughEntityRelation::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.kinshipon 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.Checks
docs/plans/2026-09-13-feat-family-trees-plan.md.