From b307b11440d21f0cb1b930d3422406d13ecb6227 Mon Sep 17 00:00:00 2001 From: Matthew Daubney Date: Mon, 28 Sep 2026 11:19:53 +0100 Subject: [PATCH] Add an Albums column to the dashboard's Most played pane Top albums were already available from the API (/me/top/albums, same shape as artists/tracks) but never surfaced in the UI. Reuses the existing renderRanking() helper; the charts grid is auto-fit, so the third column drops in with no CSS changes. Co-Authored-By: Claude Sonnet 5 Claude-Session: https://claude.ai/code/session_01MK52BGoJbPhZ1vSFuKcGUW --- frontend/index.html | 1 + frontend/js/dashboard.js | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/frontend/index.html b/frontend/index.html index 7a8820c..3372a7d 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -23,6 +23,7 @@

Artists

    +

    Albums

      Tracks

        diff --git a/frontend/js/dashboard.js b/frontend/js/dashboard.js index 22f06d0..9b0555e 100644 --- a/frontend/js/dashboard.js +++ b/frontend/js/dashboard.js @@ -199,11 +199,13 @@ function renderPeriodSelector() { } async function loadTop(period) { - const [artists, tracks] = await Promise.all([ + const [artists, albums, tracks] = await Promise.all([ api(`/me/top/artists?period=${period}&limit=10`), + api(`/me/top/albums?period=${period}&limit=10`), api(`/me/top/tracks?period=${period}&limit=10`), ]); renderRanking(document.getElementById("top-artists"), artists.items, false); + renderRanking(document.getElementById("top-albums"), albums.items, true); renderRanking(document.getElementById("top-tracks"), tracks.items, true); }