From 3a7fb775527cbcd6348bf8ebc211538e8c7df09e Mon Sep 17 00:00:00 2001 From: you Date: Sun, 22 Mar 2026 23:29:46 +0000 Subject: [PATCH] Packet detail: re-resolve hops with observer for regional conflicts The general hop cache was populated without observer context, so all conflicts showed filterMethod=none. Now renderDetail() re-resolves hops with pkt.observer_id, getting proper regional filtering with distances and conflict flags. --- public/index.html | 2 +- public/packets.js | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/public/index.html b/public/index.html index 6a9ad316..e0d97a1f 100644 --- a/public/index.html +++ b/public/index.html @@ -86,7 +86,7 @@ - + diff --git a/public/packets.js b/public/packets.js index 394e31b0..1080cc32 100644 --- a/public/packets.js +++ b/public/packets.js @@ -1100,6 +1100,13 @@ let pathHops; try { pathHops = JSON.parse(pkt.path_json || '[]'); } catch { pathHops = []; } + // Re-resolve hops with observer context for regional filtering + if (pathHops.length && pkt.observer_id) { + await ensureHopResolver(); + const resolved = HopResolver.resolve(pathHops, null, null, null, null, pkt.observer_id); + Object.assign(hopNameCache, resolved || {}); + } + // Parse hash size from path byte const rawPathByte = pkt.raw_hex ? parseInt(pkt.raw_hex.slice(2, 4), 16) : NaN; const hashSize = isNaN(rawPathByte) ? null : ((rawPathByte >> 6) + 1);