Add genlocke cumulative graveyard with backend endpoint and UI

Aggregates all fainted encounters across every leg of a genlocke into a
unified graveyard view. Backend serves GET /genlockes/{id}/graveyard with
per-entry leg/game context and summary stats (total deaths, deaths per
leg, deadliest leg). Frontend adds a toggle button on the genlocke detail
page that reveals a filterable/sortable grid of grayscale Pokemon cards.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Julian Tabel
2026-02-09 11:00:37 +01:00
parent d39898a7a1
commit 3bd4250305
9 changed files with 382 additions and 16 deletions

View File

@@ -1,11 +1,11 @@
---
# nuzlocke-tracker-lsdy
title: Genlocke cumulative graveyard
status: todo
status: in-progress
type: feature
priority: normal
created_at: 2026-02-09T07:42:46Z
updated_at: 2026-02-09T07:46:22Z
updated_at: 2026-02-09T09:58:56Z
parent: nuzlocke-tracker-25mh
---
@@ -32,10 +32,10 @@ Display all deaths across all legs of a genlocke in a single unified graveyard v
- Reuse existing graveyard/encounter display components where possible
## Checklist
- [ ] Implement `GET /api/v1/genlockes/{id}/graveyard` — query all encounters with status "fainted" across all runs linked to the genlocke's legs, include leg/game context per entry
- [ ] Add summary stats to the response: total deaths, deaths per leg, deadliest leg
- [ ] Indicate whether each dead Pokemon was a transferred Pokemon or caught fresh (join with GenlockeTransfer)
- [ ] Build the cumulative graveyard component: list of dead Pokemon with sprite, nickname, species, leg/game, death cause, level
- [ ] Add sorting (by leg, level, species) and filtering (by leg/game)
- [ ] Integrate as a tab on the genlocke overview page or as a sub-route
- [ ] Reuse existing graveyard display components where applicable
- [x] Implement `GET /api/v1/genlockes/{id}/graveyard` — query all encounters with status "fainted" across all runs linked to the genlocke's legs, include leg/game context per entry
- [x] Add summary stats to the response: total deaths, deaths per leg, deadliest leg
- [ ] Indicate whether each dead Pokemon was a transferred Pokemon or caught fresh (join with GenlockeTransfer) — deferred until GenlockeTransfer model exists (nuzlocke-tracker-lsc2)
- [x] Build the cumulative graveyard component: list of dead Pokemon with sprite, nickname, species, leg/game, death cause, level
- [x] Add sorting (by leg, level, species) and filtering (by leg/game)
- [x] Integrate as a tab on the genlocke overview page or as a sub-route
- [x] Reuse existing graveyard display components where applicable