Integrate name suggestions into encounter registration UI

Add clickable suggestion chips below the nickname input in the encounter
modal. Chips are fetched from GET /runs/{id}/name-suggestions via React
Query, shown only when a naming scheme is set. Clicking a chip fills in
the nickname; a regenerate button fetches a fresh random batch. Completes
the Name Generation epic.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-11 21:48:29 +01:00
parent 2ac6c23577
commit 39d18c241e
6 changed files with 69 additions and 13 deletions

View File

@@ -1,11 +1,11 @@
---
# nuzlocke-tracker-bi4e
title: Integrate name suggestions into encounter registration UI
status: todo
status: completed
type: task
priority: normal
created_at: 2026-02-11T15:56:44Z
updated_at: 2026-02-11T20:23:40Z
updated_at: 2026-02-11T20:48:02Z
parent: nuzlocke-tracker-igl3
---
@@ -27,9 +27,9 @@ Show name suggestions in the encounter registration flow so users can pick a nic
## 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
- [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

View File

@@ -1,11 +1,11 @@
---
# nuzlocke-tracker-igl3
title: Name Generation
status: todo
status: completed
type: epic
priority: normal
created_at: 2026-02-05T13:45:15Z
updated_at: 2026-02-11T20:44:23Z
updated_at: 2026-02-11T20:48:02Z
---
Implement a dictionary-based nickname generation system for Nuzlocke runs. Instead of using an LLM API to generate names on the fly, provide a static dictionary of words categorised by theme. A word can belong to multiple categories, making it usable across different naming schemes.
@@ -29,6 +29,6 @@ Implement a dictionary-based nickname generation system for Nuzlocke runs. Inste
- [x] Word dictionary data file exists with multiple categories, each containing 150-200 words
- [x] Name suggestion engine picks random names from the selected category, avoiding duplicates already used in the run
- [ ] Encounter registration UI shows 5-10 clickable name suggestions
- [ ] User can regenerate suggestions if none fit
- [x] Encounter registration UI shows 5-10 clickable name suggestions
- [x] User can regenerate suggestions if none fit
- [x] User can select a naming scheme per run