Files
nuzlocke-tracker/.beans/nuzlocke-tracker-lsc2--genlocke-lineage-tracking.md
Julian Tabel f0307f0625 Guard genlocke data integrity edge cases
Block deletion of runs linked to a genlocke leg, prevent reactivating
completed/failed genlocke-linked runs, and guard encounter deletion
against genlocke transfer references with clear 400 errors.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 12:03:58 +01:00

43 lines
2.2 KiB
Markdown

---
# nuzlocke-tracker-lsc2
title: Genlocke lineage tracking
status: completed
type: feature
priority: normal
created_at: 2026-02-09T07:42:41Z
updated_at: 2026-02-09T10:58:46Z
parent: nuzlocke-tracker-25mh
---
Track and display a Pokemon's journey across multiple genlocke legs. When a Pokemon is transferred between legs, its lineage (history across legs) should be visible.
## Concept
A "lineage" is the chain of transfers for a Pokemon across legs. For example:
- Leg 1: Caught Charmander on Route 1 → evolved to Charizard → entered HoF → transferred
- Leg 2: Received Charmander egg → evolved to Charmeleon → died on Route 7
The lineage view connects these into one story, showing the Pokemon's journey through the entire genlocke.
## Display
- On the genlocke overview page, show a "Lineage" section or tab
- Each lineage entry shows:
- The Pokemon's name/nickname
- Which legs it appeared in
- Key events per leg (caught, evolved, entered HoF, transferred, died)
- Final status (still alive, died in leg X, retired via Gauntlet rule)
- Visual: a horizontal timeline per Pokemon showing its presence across legs
## Data
- Lineage is derived from `GenlockeTransfer` records — follow the chain of from_encounter → to_encounter across legs
- No additional database tables needed; this is a read-only view computed from existing transfer + encounter data
## Dependencies
- Requires Transfer UI to be implemented first (needs GenlockeTransfer records to exist)
## Checklist
- [ ] Implement `GET /api/v1/genlockes/{id}/lineages` — build lineage chains by walking GenlockeTransfer records from first leg to last, grouping encounters that share a transfer chain
- [ ] Each lineage entry should include: origin encounter, all subsequent transferred encounters, per-leg status (alive/fainted/transferred), current status (alive/dead/retired)
- [ ] Build the lineage display component: one row per lineage with a horizontal timeline across legs
- [ ] Show Pokemon sprite, nickname, and key events (caught, evolved, HoF, transferred, died) per leg
- [ ] Integrate the lineage view as a tab or section on the genlocke overview page
- [ ] Handle edge cases: Pokemon that were never transferred (single-leg only), broken chains if a leg was skipped