Show token badge for none english collection#628
Conversation
✅ Deploy Preview for fancy-gelato-7cdad5 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
🔎️ Preview Link for Commit:
|
- Remove manual collection selector (radio buttons) - Auto-detect language based on character input using allowedNameCharsToPattern - Add inline language chip indicator inside token name input (right side) - Show dropdown with chevron for multi-language edge cases - Display 'Unsupported' badge for characters not in any collection - Reject form submission for unsupported character sets - Improve UX with real-time language feedback The language is now detected automatically as users type. A small chip appears on the right side of the input showing the detected language: - Green chip: single language match (confident) - Purple chip with dropdown: multiple languages match (edge case) - Red badge: unsupported characters (submission blocked) This works seamlessly with the collection badges from this PR.
🎯 Enhancement: Auto-detect Language in Token CreationI've implemented automatic language detection for the What ChangedRemoved:
Added:
Visual ExampleBefore: After: Color Coding
Test Cases
|
The collectionNameChars.ts file doesn't exist in this branch yet (it's in PR #629). This commit inlines the utility function to make the build work independently.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Want higher recall? High effort reviews run extra passes and find more bugs. A team admin can switch effort levels in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit a99bad5. Configure here.
| if (detectedCollections.length === 0 && trimmed) { | ||
| setNameStatus('unsupported'); | ||
| return; | ||
| } |
There was a problem hiding this comment.
Debounced name vs detection
Medium Severity
The availability effect treats a name as unsupported when detectedCollections is empty, but it validates tokenNameDebounced while detectedCollections is derived from immediate tokenName. During the debounce window, a valid debounced prefix can be marked unsupported or skip checks inconsistent with what the user typed.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit a99bad5. Configure here.
| <th className="cell cell-collection text-xs opacity-50 text-left py-1 px-3 whitespace-nowrap"> | ||
| {t('tokenListTable.collection', { ns: 'trending' })} | ||
| </th> | ||
| )} |
There was a problem hiding this comment.
Skeleton missing collection column
Low Severity
With showCollectionColumn enabled, the table header and data rows include a collection column, but loading skeleton rows do not. While data is fetching, desktop columns shift so headers no longer align with skeleton cells.
Reviewed by Cursor Bugbot for commit a99bad5. Configure here.
|
@CedrikNikita please merge to prod after your dev review |


📸 Screenshots report — updated Thu, 16 Jul 2026 03:04:56 GMT
Note
Medium Risk
Changes token creation validation and which collection is selected at deploy time; list UI is additive. No auth or payment changes, but wrong collection detection could mis-route creates for non-Latin names.
Overview
Adds non-English collection visibility in the trending token list and auto-detects collection/language when creating a token, using new API
collection_infoonTokenDto.Token list: Optional Collection column (wide layouts) and compact badges next to the symbol for tokens outside the default WORDS/English collection, driven by
isNonEnglishToken/tokenCollectionLabelandcollection_info. English tokens show no badge.showCollectionColumncan hide the column (e.g. account “created tokens”).Create token: Replaces the manual collection radio grid with character-based detection against each collection’s
allowed_name_chars, an inline language chip (dropdown when multiple collections match), and an unsupported state that blocks submit. Name normalization is lighter (uppercase/hyphens, IME composition preserved) instead of stripping disallowed chars on every keystroke.Other: Regenerated OpenAPI types (
CollectionInfoDto), i18ntokenListTable.collection, and a pagination fix so empty filtered lists don’t show “Load More” whentotalPagesis 0.Reviewed by Cursor Bugbot for commit a99bad5. Bugbot is set up for automated code reviews on this repo. Configure here.