2 months ago
525a2c7The silent lyrics auto-upgrade fired on song open could replace hand-entered manual lyrics (and user-provided sidecar files) with an online synced match — potentially a wrong match for a mistagged song — with no prompt and no undo. Frontend: exclude manual_* and sidecar_* sources from the store auto-upgrade so it never fires for user-authored/provided lyrics. Only embedded (and absent) origins are silently upgraded. Backend (belt-and-suspenders): thread a `user_initiated` flag through fetch_lyrics_online. During auto-upgrade (user_initiated = false) the cache upsert preserves any existing entry whose source is not embedded/absent, so a background upgrade can never clobber Manual*/Sidecar* content. The explicit "fetch lyrics online" action passes user_initiated = true and still replaces the entry. Tests: Rust tests assert apply_online_lyrics_result preserves Manual/Sidecar entries during auto-upgrade, upgrades embedded, and replaces on user-initiated fetch; a store test asserts fetchLyricsOnline is not called for any manual or sidecar source variant. Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Parent1881b6c