From cfb8cc8bd81057e44ba291e6b629dec8e8e0a296 Mon Sep 17 00:00:00 2001 From: BoulderBadgeDad Date: Sat, 6 Jun 2026 09:11:20 -0700 Subject: [PATCH] Library Re-tag findings: show the physical filename under each track MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit User request: the re-tag diff card shows old→new metadata per track but not the file it applies to, so a wrong match is hard to spot before applying. The finding already carries each track's file_path (details.tracks[].file_path from the scan) — the renderer just wasn't showing it. Now each changed track displays its filename beneath the title, so you can eyeball that the metadata about to be written actually belongs to that file. Skipped when the label is already the filename (track had no title). Pure frontend display change. --- webui/static/enrichment.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/webui/static/enrichment.js b/webui/static/enrichment.js index bb0ea640..9df8ea6c 100644 --- a/webui/static/enrichment.js +++ b/webui/static/enrichment.js @@ -2931,13 +2931,19 @@ function _renderFindingDetail(f) { } // Per-track old → new diff (cap the rendered list so huge albums stay sane). changed.slice(0, 40).forEach(t => { - const label = t.title || (t.file_path || '').split(/[\\/]/).pop(); + const fname = (t.file_path || '').split(/[\\/]/).pop(); + const label = t.title || fname || 'Unknown'; const rows = Object.entries(t.changes).map(([field, c]) => [ field.replace(/_/g, ' '), `${(c.old === '' || c.old == null) ? '∅' : c.old} → ${c.new}`, 'highlight', ]); html += `
${_escFinding(label)}
`; + // Show the physical filename so a wrong match is easy to spot before + // applying (skip when the label already IS the filename, i.e. no title). + if (fname && fname !== label) { + html += `
📄 ${_escFinding(fname)}
`; + } html += _gridRows(rows); }); if (changed.length > 40) {