diff --git a/static/app.js b/static/app.js index faaeb0c..83c0f09 100644 --- a/static/app.js +++ b/static/app.js @@ -995,6 +995,18 @@ async function updateFrequencyChart(term, channels, year, queryMode) { // Add reference count badges const refByCount = item.referenced_by_count || 0; const refToCount = item.internal_references_count || 0; + + // Debug: log reference counts for first item + if (badges.length === 0 || badges.length <= 2) { + console.log('Reference counts:', { + title: item.title, + referenced_by_count: refByCount, + internal_references_count: refToCount, + hasReferencedBy: 'referenced_by_count' in item, + hasInternalRefs: 'internal_references_count' in item + }); + } + if (refByCount > 0) badges.push(`${refByCount} backlink${refByCount !== 1 ? 's' : ''}`); if (refToCount > 0) badges.push(`${refToCount} reference${refToCount !== 1 ? 's' : ''}`); diff --git a/static/style.css b/static/style.css index a9bc10f..ba37bc3 100644 --- a/static/style.css +++ b/static/style.css @@ -168,18 +168,34 @@ body.dimmed { border-bottom: 1px solid ButtonShadow; padding: 12px 0; margin-bottom: 8px; + max-width: 100%; + overflow: hidden; + word-wrap: break-word; } #results .item:last-child { border-bottom: none; } +#results .item strong { + word-break: break-word; + max-width: 100%; + display: inline-block; +} + +.window-body { + max-width: 100%; + overflow-x: hidden; +} + /* Badges */ .badge-row { margin-top: 6px; display: flex; gap: 4px; flex-wrap: wrap; + max-width: 100%; + overflow: hidden; } .badge { @@ -189,6 +205,8 @@ body.dimmed { padding: 2px 6px; font-size: 10px; font-weight: bold; + white-space: nowrap; + word-break: keep-all; } /* Transcript and highlights */