Files
nuzlocke-tracker/.beans/nuzlocke-tracker-bi4e--integrate-name-suggestions-into-encounter-registra.md

35 lines
1.5 KiB
Markdown
Raw Normal View History

2026-02-11 17:00:16 +01:00
---
# nuzlocke-tracker-bi4e
title: Integrate name suggestions into encounter registration UI
status: completed
2026-02-11 17:00:16 +01:00
type: task
priority: normal
2026-02-11 17:00:16 +01:00
created_at: 2026-02-11T15:56:44Z
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
- 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
## 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
- [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