From f5b0034b4d1f4d82531d67978a2652b5c8931698 Mon Sep 17 00:00:00 2001 From: Vladimir Zagainov Date: Mon, 20 Jul 2026 00:10:20 +0300 Subject: [PATCH] fix: link dashboard artist names to detail pages Task 8's ignore/restore/ignore-singles actions live on the artist detail page, but the dashboard rendered artist names as plain text with no link, making those actions unreachable through normal UI navigation. Wrap the name in an anchor to /artist/{id} and assert the link in the dashboard test. --- internal/web/server_test.go | 6 ++++++ internal/web/templates/dashboard.html | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/internal/web/server_test.go b/internal/web/server_test.go index 4dfcc14..4a43e1f 100644 --- a/internal/web/server_test.go +++ b/internal/web/server_test.go @@ -80,6 +80,12 @@ func TestDashboard_Authenticated200(t *testing.T) { if !strings.Contains(body, "mbid-1") { t.Errorf("expected MBID rendered, got:\n%s", body) } + // The dashboard must link each artist to its detail page, otherwise the + // ignore/restore/singles actions on that page are unreachable via normal UI + // navigation. + if !strings.Contains(body, `href="/artist/a1"`) { + t.Errorf("expected link to artist detail page, got:\n%s", body) + } } func TestDashboard_Unauthenticated401(t *testing.T) { diff --git a/internal/web/templates/dashboard.html b/internal/web/templates/dashboard.html index d8bcfe9..1a87ab5 100644 --- a/internal/web/templates/dashboard.html +++ b/internal/web/templates/dashboard.html @@ -33,7 +33,7 @@ {{ range .Artists }} - {{ .Name }} + {{ .Name }} {{ .MissingCount }}