Add egg encounter logging with route-lock bypass

Egg hatches can now be logged at any location without consuming the
route's encounter slot. Adds an EggEncounterModal with pokemon search
and a "Log Egg" button on the run encounters page.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-08 22:25:47 +01:00
parent 8bd4ad1ecf
commit 35df9023f1
5 changed files with 300 additions and 7 deletions

View File

@@ -1,11 +1,11 @@
---
# nuzlocke-tracker-xa5k
title: Add egg encounter logging
status: todo
status: in-progress
type: feature
priority: normal
created_at: 2026-02-08T14:49:50Z
updated_at: 2026-02-08T20:55:33Z
updated_at: 2026-02-08T21:17:56Z
---
Allow players to log egg hatches at any location, similar to how shiny encounters work. A "Log Egg" button (next to "Log Shiny") opens a modal that shows all locations — including those without wild encounters — so the player can record where an egg hatched.
@@ -19,7 +19,7 @@ Egg encounters should:
## Checklist
- [ ] Data: Seed locations without wild encounters into the routes table via PokeAPI (so they appear in the route list)
- [ ] Backend: Bypass route-lock for egg encounters (extend `skip_route_lock` with an egg origin)
- [ ] Frontend: Add "Log Egg" button to the run encounters page header (next to "Log Shiny")
- [ ] Frontend: Create `EggEncounterModal` — similar to `ShinyEncounterModal` but shows all routes (including encounter-less ones) and uses `origin: "egg"`
- [ ] Frontend: Ensure egg encounters display normally in team view and route list
- [x] Backend: Bypass route-lock for egg encounters (extend `skip_route_lock` with an egg origin)
- [x] Frontend: Add "Log Egg" button to the run encounters page header (next to "Log Shiny")
- [x] Frontend: Create `EggEncounterModal` — similar to `ShinyEncounterModal` but shows all routes (including encounter-less ones) and uses `origin: "egg"`
- [x] Frontend: Ensure egg encounters display normally in team view and route list