Conversation
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Review Summary by QodoFix autocomplete exact match and expand artist alias data
WalkthroughsDescription• Fixed autocomplete alias substitution to only apply when label exactly matches input • Added new artists (Eve, 美波, ASIAN KUNG-FU GENERATION) with Korean aliases • Added Korean-to-Japanese artist mapping for new artists • Removed outdated artist entries and updated existing aliases Diagramflowchart LR
A["User Input"] --> B["Autocomplete Logic"]
B --> C{"Label === Input?"}
C -->|Yes & 1 Match| D["Substitute with Alias Value"]
C -->|No or Multiple| E["Use Original Input"]
D --> F["Search Results"]
E --> F
G["Artist Alias Data"] --> H["Add New Artists"]
H --> I["Korean-to-Japanese Mapping"]
I --> F
File Changes1. apps/web/src/constants/artistAlias.ts
|
Code Review by Qodo
1. Reversed artist mapping
|
| // A-Z | ||
| Ado: 'Ado', | ||
| Aimer: 'Aimer', | ||
| 'ASIAN KUNG-FU GENERATION': '아시안 쿵푸 제너레이션', |
There was a problem hiding this comment.
1. Reversed artist mapping 🐞 Bug ✓ Correctness
krToJpnArtistSort adds ASIAN KUNG-FU GENERATION in the wrong direction (official→Korean). In the J-POP artist modal, clicking that entry will search using the Korean string, likely returning no results when the DB stores the official artist name.
Agent Prompt
### Issue description
`krToJpnArtistSort` is used by `JpnArtistList` such that the **value** is what gets inserted into the search box and used for searching. The new ASIAN KUNG-FU GENERATION entry is inverted (value is Korean), so selecting it will search the wrong string.
### Issue Context
`JpnArtistList` does `Object.entries(krToJpnArtistSort).map(([kr, jpn]) => ...)` and onClick uses `handleSelect(jpn)`.
### Fix Focus Areas
- apps/web/src/constants/krToJpnArtist.ts[2-10]
### Suggested change
Change:
- `'ASIAN KUNG-FU GENERATION': '아시안 쿵푸 제너레이션'`
To:
- `'아시안 쿵푸 제너레이션': 'ASIAN KUNG-FU GENERATION'`
(Ensure the displayed key remains Korean and the searched value is the canonical artist string.)
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
| if (autoCompleteList.length === 1) { | ||
| // 자동완성 리스트가 하나(정확히 일치하면) 해당 alias의 value로 자동 치환 | ||
| parsedSearch = autoCompleteList[0].value; | ||
| if (autoCompleteList[0].label === trimSearch) { | ||
| // 자동완성 리스트가 하나(정확히 일치하면)고 label도 일치하면 해당 alias의 value로 자동 치환 | ||
| parsedSearch = autoCompleteList[0].value; | ||
| } |
There was a problem hiding this comment.
2. Case-sensitive alias match 🐞 Bug ✓ Correctness
The new label === trimSearch condition is case-sensitive, but autocomplete matching is case-insensitive. This prevents alias→official substitution for differently-cased roman aliases (e.g., user types "Minami" but alias stored as "minami"), causing searches to miss non-Latin canonical artist names (e.g., 美波).
Agent Prompt
### Issue description
Autocomplete suggestions are case-insensitive, but the new replacement condition in `handleSearch` is case-sensitive (`label === trimSearch`). This blocks alias→official substitution for romanized aliases when users type different casing (e.g., `Minami` vs stored `minami`), which is especially harmful when the canonical artist is non-Latin (e.g., `美波`).
### Issue Context
- `getAutoCompleteSuggestions()` lowercases the query and candidate labels.
- `handleSearch()` compares the raw input string to the candidate label with strict equality.
### Fix Focus Areas
- apps/web/src/hooks/useSearchSong.ts[56-73]
### Suggested change
Normalize both sides for the equality test, e.g.:
- `const normalizedTrim = trimSearch.toLowerCase();`
- `if (autoCompleteList[0].label.toLowerCase() === normalizedTrim) { parsedSearch = autoCompleteList[0].value; }`
Keep the existing `autoCompleteList.length === 1` guard to avoid unintended substitutions for partial matches.
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
📌 PR 제목
Fix : 자동완성 로직, alias 추가
Summary
변경 상세
Bug Fix — useSearchSong
기존 동작: 자동완성 후보가 1개로 좁혀지기만 하면 무조건 alias value로 치환
→ 예: "Eve" 입력 시 후보가 1개로 줄어도 검색어가 의도치 않게 치환되는 버그
수정 동작: 후보가 1개이면서 label === trimSearch(완전 일치)일 때만 치환
// 변경 전
if (autoCompleteList.length === 1) {
parsedSearch = autoCompleteList[0].value;
}
// 변경 후
if (autoCompleteList.length === 1) {
if (autoCompleteList[0].label === trimSearch) {
parsedSearch = autoCompleteList[0].value;
}
}
Chore — .gitignore
Claude Code 로컬 설정 디렉토리(.claude/*) gitignore 추가
Test plan