2026-02-11 17:00:16 +01:00
|
|
|
---
|
|
|
|
|
# nuzlocke-tracker-bi4e
|
|
|
|
|
title: Integrate name suggestions into encounter registration UI
|
2026-02-11 21:48:29 +01:00
|
|
|
status: completed
|
2026-02-11 17:00:16 +01:00
|
|
|
type: task
|
2026-02-11 21:36:50 +01:00
|
|
|
priority: normal
|
2026-02-11 17:00:16 +01:00
|
|
|
created_at: 2026-02-11T15:56:44Z
|
2026-02-11 21:48:29 +01:00
|
|
|
updated_at: 2026-02-11T20:48:02Z
|
2026-02-11 17:00:16 +01:00
|
|
|
parent: nuzlocke-tracker-igl3
|
|
|
|
|
---
|
|
|
|
|
|
|
|
|
|
Show name suggestions in the encounter registration flow so users can pick a nickname with a single click.
|
|
|
|
|
|
|
|
|
|
## Requirements
|
|
|
|
|
|
2026-02-11 21:36:50 +01:00
|
|
|
- When a user registers a new Pokemon encounter, display 5-10 name suggestions below/near the nickname input
|
2026-02-11 17:00:16 +01:00
|
|
|
- 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
|
|
|
|
|
|
2026-02-11 21:36:50 +01:00
|
|
|
## 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.
|
|
|
|
|
|
2026-02-11 17:00:16 +01:00
|
|
|
## Checklist
|
|
|
|
|
|
2026-02-11 21:48:29 +01:00
|
|
|
- [x] Add a name suggestions component (chips/buttons with regenerate)
|
|
|
|
|
- [x] Integrate the component into the encounter registration modal/form
|
|
|
|
|
- [x] Wire up the backend API endpoint to the component via React Query
|
|
|
|
|
- [x] Ensure clicking a suggestion populates the nickname field
|
|
|
|
|
- [x] Ensure regenerate fetches a new batch from the API
|
|
|
|
|
- [x] Hide suggestions gracefully if no naming scheme is set on the run
|