Pokemon edit modal now shows three tabs (Details, Evolutions, Encounters)
instead of a single long form. Evolution chain entries are clickable to
open the EvolutionFormModal for direct editing. Encounter locations link
to admin route detail pages. Create mode shows only the form (no tabs).
Backend adds GET /pokemon/{id}/encounter-locations (grouped by game) and
GET /pokemon/{id}/evolution-chain (BFS family discovery). Extracts
formatEvolutionMethod to shared utility.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2.2 KiB
2.2 KiB
title, status, type, priority, created_at, updated_at, parent
| title | status | type | priority | created_at | updated_at | parent |
|---|---|---|---|---|---|---|
| Pokemon detail card with encounters and evolution chain | completed | feature | high | 2026-02-08T12:33:05Z | 2026-02-08T12:53:13Z | nuzlocke-tracker-iu5b |
When viewing/editing a Pokemon in the admin panel, show contextual information about where it can be encountered and its evolution chain.
Desired behavior
- The pokemon edit card (from click-to-edit) shows:
- Editable fields (name, types, dex number, sprite, etc.)
- Encounter locations: A list of routes/games where this pokemon appears as a route encounter. Grouped by game, showing route name + encounter method + levels.
- Evolution chain: Visual display of the pokemon's evolution family — predecessors and successors with triggers (level, item, trade, etc.)
- Encounter locations link to the route detail page in admin for quick navigation
- Evolution chain entries are clickable to open the EvolutionFormModal for direct editing
Implementation
Tabbed modal (edit mode)
In edit mode, the PokemonFormModal uses three tabs instead of a single scrolling view:
- Details — the form fields (PokeAPI ID, name, types, etc.) with Save/Delete/Cancel footer
- Evolutions — clickable evolution chain rows that open a stacked EvolutionFormModal for direct editing
- Encounters — encounter locations grouped by game, with route names linking to admin route detail pages
In create mode, no tabs are shown (just the form fields).
Backend endpoints
GET /pokemon/{id}/encounter-locations— returns encounters grouped by game with route/game names eagerly loadedGET /pokemon/{id}/evolution-chain— BFS to find full evolution family, returns all edges with from/to Pokemon
Frontend
- New types:
PokemonEncounterLocationItem,PokemonEncounterLocation - New API functions:
fetchPokemonEncounterLocations,fetchPokemonEvolutionChain - New hooks:
usePokemonEncounterLocations,usePokemonEvolutionChain - Extracted
formatEvolutionMethodto sharedutils/formatEvolution.ts
Notes
- This helps the admin quickly verify data completeness — 'is this pokemon assigned to the right routes?' and 'are its evolutions set up correctly?'