From 2c486b898c8eb9e19247b169c330e93568374936 Mon Sep 17 00:00:00 2001 From: Bryan Van Deusen Date: Thu, 23 Apr 2026 18:41:13 -0400 Subject: [PATCH] fix(modal): provenance chips use tag_id, not legacy tag= The provenance section's chip hrefs (artist, post) still built '/gallery?tag=${name}', which the gallery route silently ignores since Task 10 switched to ?tag_id=. So clicking the artist or post chip from the modal rendered an unfiltered gallery. Tag objects from /image//tags already include 'id', so the fix is one line: chip.href = '/gallery?tag_id=${t.id}'. Co-Authored-By: Claude Opus 4.7 --- app/static/js/view-modal.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/static/js/view-modal.js b/app/static/js/view-modal.js index 979bd14..f293371 100644 --- a/app/static/js/view-modal.js +++ b/app/static/js/view-modal.js @@ -481,7 +481,7 @@ document.addEventListener('DOMContentLoaded', () => { tags.forEach(t => { const chip = document.createElement('a'); chip.className = 'provenance-chip'; - chip.href = `/gallery?tag=${encodeURIComponent(t.name)}`; + chip.href = `/gallery?tag_id=${t.id}`; chip.title = t.name; chip.dataset.tagName = t.name; chip.dataset.kind = t.kind;