Files
nuzlocke-tracker/.beans/nuzlocke-tracker-8b25--ux-allow-editing-caught-pokemon-details-on-run-pag.md
2026-03-22 08:56:06 +01:00

1.7 KiB

title, status, type, priority, created_at, updated_at
title status type priority created_at updated_at
UX: Allow editing caught pokemon details on run page draft feature normal 2026-03-21T22:00:55Z 2026-03-21T22:04:08Z

Problem

Users can mistype catch level, nickname, or other details when recording an encounter, but there's no way to correct mistakes from the run page. The only option is to go through admin — which doesn't even support editing encounters for a specific run.

Current State

  • Backend EncounterUpdate schema (backend/src/app/schemas/encounter.py:18-23): Supports nickname, status, faint_level, death_cause, current_pokemon_id — but NOT catch_level
  • Frontend UpdateEncounterInput (frontend/src/types/game.ts:169-175): Same fields as backend, missing catch_level
  • Run page encounter modal: Clicking a route with an existing encounter opens the modal in "edit" mode, but only allows changing pokemon/nickname/status — no catch_level editing
  • The encounter modal is the create/edit modal — editing is done by re-opening it on an existing encounter

Approach

Backend

  • Add catch_level: int | None = None to EncounterUpdate schema
  • Verify the PATCH /encounters/{id} endpoint applies catch_level updates (check encounters.py update handler)

Frontend

  • Add catchLevel?: number to UpdateEncounterInput type
  • Ensure the encounter modal shows catch_level as editable when editing an existing encounter
  • Add catch_level field to the encounter edit modal (shown when editing existing encounters)

Testing

  • Test updating catch_level via API
  • Test that the frontend sends catch_level in update requests
  • Verify existing create/update flows still work