Files
nuzlocke-tracker/.beans/nuzlocke-tracker-bi4e--integrate-name-suggestions-into-encounter-registra.md
Julian Tabel e324559476 Add naming scheme selection to run configuration
Add a nullable naming_scheme column to NuzlockeRun so users can pick a
themed word category for nickname suggestions. Includes Alembic migration,
updated Pydantic schemas, a GET /runs/naming-categories endpoint backed by
a cached dictionary loader, and frontend dropdowns in both the NewRun
creation flow and the RunDashboard for mid-run changes.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-11 21:36:50 +01:00

35 lines
1.5 KiB
Markdown

---
# nuzlocke-tracker-bi4e
title: Integrate name suggestions into encounter registration UI
status: todo
type: task
priority: normal
created_at: 2026-02-11T15:56:44Z
updated_at: 2026-02-11T20:23:40Z
parent: nuzlocke-tracker-igl3
---
Show name suggestions in the encounter registration flow so users can pick a nickname with a single click.
## Requirements
- When a user registers a new Pokemon encounter, display 5-10 name suggestions below/near the nickname input
- Each suggestion is a clickable chip/button that fills in the nickname field
- Include a "regenerate" button to get a fresh batch of suggestions
- Only show suggestions if the run has a naming scheme selected
- The nickname input should still be editable for manual entry
## Implementation Notes
- **Data fetching**: Call `GET /api/v1/runs/{run_id}/name-suggestions?count=10` to get suggestions from the backend.
- **Regeneration**: Each call to the endpoint returns a fresh random batch (backend handles exclusion of used names).
- **No dictionary data in frontend**: All suggestion logic lives in the backend.
## Checklist
- [ ] Add a name suggestions component (chips/buttons with regenerate)
- [ ] Integrate the component into the encounter registration modal/form
- [ ] Wire up the backend API endpoint to the component via React Query
- [ ] Ensure clicking a suggestion populates the nickname field
- [ ] Ensure regenerate fetches a new batch from the API
- [ ] Hide suggestions gracefully if no naming scheme is set on the run