feat(web): Follow button + clickable artist in album modals

AlbumModal showed the artist name as static text — no way to follow the artist
or jump to them. Adds a Follow affordance (todo #13):

- AlbumInfo gains optional `artistMbid`. When present, the modal title links the
  artist name to /discover/artist/{mbid} and shows a Follow/Following button that
  reflects live follow state.
- Follow state fetched via a new lightweight GET /api/artists?mbid= check
  (avoids pulling the full watched list + discography); Follow reuses
  POST /api/artists. Non-ok POST surfaces a toast (also chips at todo #14).
- Wired artistMbid in the three discovery contexts where following is valuable:
  Discover, Discover artist preview, and Last.fm. Library/discography callers
  pass none (already-followed artists) so the button stays hidden — graceful.

web 152 tests (the ?mbid= follow-state check asserted), tsc + build clean.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Jonathan
2026-07-14 11:58:01 +02:00
parent 938b8f32f9
commit 17bed331a9
7 changed files with 86 additions and 6 deletions
+1
View File
@@ -338,6 +338,7 @@ export function LastfmClient() {
artist: albumTarget.match.artistName,
year: albumTarget.match.firstReleaseDate?.slice(0, 4) ?? null,
type: albumTarget.match.primaryType,
artistMbid: albumTarget.match.artistMbid,
}}
status={
owned ? (