A like is on the song: the server likes every copy sharing its song_key,
but the web's optimistic update marked only the tapped track, so the
same song on another album or a compilation showed an empty heart until
the liked ids were fetched again. A track like or unlike now answers 200
with the ids of every copy it changed, the asked one first, and the web
marks them all. Clients that ignore the body (Android) are unaffected.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A like or unlike that failed restored the whole liked list from before it
started, undoing any like made while it was in flight. Now only its own id
goes back to how it was.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
createLikedIdsQuery is the single source for heart-button state across
the app (track_ids/album_ids/artist_ids Sets). likeEntity / unlikeEntity
do optimistic setQueryData updates with rollback on error. Per-entity
infinite queries back the /library/liked sections.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>