mirror of
https://github.com/nomadkaraoke/karaoke-gen.git
synced 2026-12-06 09:57:39 +09:00
## Summary - Words edited by the user in lyrics review now show a **violet background** (`bg-violet-500/25`) so it's immediately obvious which words have been modified - Compares current word text against initial state (`history[0]`), so undo/redo correctly updates highlights - New words added by the user are also highlighted ## Changes - `Word.tsx` — accepts `isUserEdited` prop, renders violet highlight - `LyricsAnalyzer.tsx` — computes `editedWordIds` via `useMemo` comparing current vs initial data - `TranscriptionView.tsx` / `HighlightedText.tsx` — thread `editedWordIds` set through to Word component - `constants.ts` / `types.ts` — add `userEdited` highlight class and `isUserEdited` prop ## Color priority (highest → lowest) 1. Currently playing (blue solid) 2. Anchor (blue tint) 3. **User-edited (violet tint)** ← new 4. Corrected gap (green tint) 5. Uncorrected gap (orange tint) ## Test plan - [x] All 743 existing tests pass - [x] Frontend build succeeds - [ ] Manually verify: edit a word in lyrics review → violet background appears - [ ] Manually verify: undo the edit → violet background disappears - [ ] Manually verify: add a new word → violet background appears on new word <!-- @coderabbitai ignore --> 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>