fix(modal): provenance chips use tag_id, not legacy tag=<name>

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=<int>. So clicking the artist or
post chip from the modal rendered an unfiltered gallery.

Tag objects from /image/<id>/tags already include 'id', so the fix
is one line: chip.href = '/gallery?tag_id=${t.id}'.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
2026-04-23 18:41:13 -04:00
parent 5b7e033d0c
commit 2c486b898c
+1 -1
View File
@@ -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;