From c11de7f7c3e9ebd1f66088b570a89a07c03860d0 Mon Sep 17 00:00:00 2001 From: Ethanfel Date: Fri, 3 Apr 2026 00:18:45 +0200 Subject: [PATCH] Show diff summary in sidebar hover tooltip --- js/snapshot_manager.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/js/snapshot_manager.js b/js/snapshot_manager.js index e52fc27..5ff525b 100644 --- a/js/snapshot_manager.js +++ b/js/snapshot_manager.js @@ -3640,6 +3640,14 @@ async function buildSidebar(el) { if (!svg) return; tooltip.appendChild(svg); } + // Diff summary lines + const diffLines = formatCaptureDiffLines(rec.captureDiff); + if (diffLines.length > 0) { + const diffEl = document.createElement("div"); + diffEl.style.cssText = "margin-top:6px;font-size:11px;line-height:1.5;color:#ccc;white-space:pre;"; + diffEl.textContent = diffLines.join("\n"); + tooltip.appendChild(diffEl); + } const rect = item.getBoundingClientRect(); let left = rect.right + 8; let top = rect.top;