LOW: No validation of AI-suggested icon values — silent failure if AI returns invalid icon name #8
Labels
No labels
blocked:lint-failed
blocked:needs-decision
blocked:needs-human
blocked:no-changes
blocked:pre-dispatch
bug
feature-request
in-progress
triage-approved
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Mark/tokengenerator#8
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Severity: LOW
Location
tokengenerator.html, lines 300-306:Description
When the "Suggest Details" feature returns an icon name from the Gemini API, the code directly assigns it to
iconSelect.valuewithout validating that the value exists in theiconsobject. If the AI returns an icon name that doesn't match any of the predefined options (e.g., "dragon", "star", "flame"), the icon selection silently falls back to blank/no icon without any feedback to the user.Similarly, the AI-suggested color hex codes are used directly without validating they are valid 6-character hex colors.
Recommended Fix
iconsbefore assigning it./^#[0-9A-Fa-f]{6}$/.Impact
AI "suggestions" may partially fail silently, leaving the user confused about why the icon didn't change.