Add Hall of Fame team selection for completed runs

After marking a run as completed, a modal prompts the player to select
which Pokemon (up to 6) entered the Hall of Fame. The selection is stored
as hof_encounter_ids on the run, displayed in the victory banner, and
can be edited later. This lays the foundation for scoping genlocke
retireHoF to only the actual HoF team.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Julian Tabel
2026-02-09 10:19:56 +01:00
parent 89f46e2b12
commit 08a5e5c621
9 changed files with 266 additions and 10 deletions

View File

@@ -1,11 +1,11 @@
---
# nuzlocke-tracker-xbxv
title: Hall of Fame team selection
status: todo
status: in-progress
type: feature
priority: normal
created_at: 2026-02-09T09:14:44Z
updated_at: 2026-02-09T09:15:08Z
updated_at: 2026-02-09T09:16:34Z
blocking:
- nuzlocke-tracker-25mh
- nuzlocke-tracker-h3fw
@@ -37,10 +37,10 @@ This is a general nuzlocke feature (not genlocke-specific) and provides value on
- Allow editing the HoF team after the fact (in case the player forgot or made a mistake)
## Checklist
- [ ] Add `hof_encounter_ids` JSONB column to `nuzlocke_runs` (nullable array of ints)
- [ ] Migration for the new column
- [ ] Update `RunResponse` / `RunDetailResponse` schemas to include `hofEncounterIds`
- [ ] Extend `PATCH /runs/{id}` to accept `hofEncounterIds` (validate they belong to the run and are alive)
- [ ] Build HoF team selection modal (shown after completing a run)
- [ ] Display HoF team in the victory banner on completed run pages
- [ ] Allow editing HoF team selection on completed runs
- [x] Add `hof_encounter_ids` JSONB column to `nuzlocke_runs` (nullable array of ints)
- [x] Migration for the new column
- [x] Update `RunResponse` / `RunDetailResponse` schemas to include `hofEncounterIds`
- [x] Extend `PATCH /runs/{id}` to accept `hofEncounterIds` (validate they belong to the run and are alive)
- [x] Build HoF team selection modal (shown after completing a run)
- [x] Display HoF team in the victory banner on completed run pages
- [x] Allow editing HoF team selection on completed runs