Add genlocke lineage tracking with aligned timeline view

Implement read-only lineage view that traces Pokemon across genlocke legs
via existing transfer records. Backend walks transfer chains to build
lineage entries; frontend renders them as cards with a column-aligned
timeline grid so leg dots line up vertically across all lineages.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Julian Tabel
2026-02-09 11:58:38 +01:00
parent 4e00e3cad8
commit d3b65e3c79
9 changed files with 541 additions and 8 deletions

View File

@@ -132,3 +132,35 @@ class GenlockeGraveyardResponse(CamelModel):
total_deaths: int
deaths_per_leg: list[GraveyardLegSummary]
deadliest_leg: GraveyardLegSummary | None = None
# --- Lineage schemas ---
class LineageLegEntry(CamelModel):
leg_order: int
game_name: str
encounter_id: int
pokemon: PokemonResponse
current_pokemon: PokemonResponse | None = None
nickname: str | None = None
catch_level: int | None = None
faint_level: int | None = None
death_cause: str | None = None
is_shiny: bool = False
route_name: str
is_alive: bool
entered_hof: bool
was_transferred: bool
class LineageEntry(CamelModel):
nickname: str | None
pokemon: PokemonResponse # base form from first leg
legs: list[LineageLegEntry]
status: str # "alive" | "dead"
class GenlockeLineageResponse(CamelModel):
lineages: list[LineageEntry]
total_lineages: int