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.
This commit is contained in:
you
2026-03-22 23:29:46 +00:00
parent bd2c978bba
commit 3a7fb77552
2 changed files with 8 additions and 1 deletions
+1 -1
View File
@@ -86,7 +86,7 @@
<script src="hop-display.js?v=1774221932"></script>
<script src="app.js?v=1774126708"></script>
<script src="home.js?v=1774042199"></script>
<script src="packets.js?v=1774221842"></script>
<script src="packets.js?v=1774222186"></script>
<script src="map.js?v=1774220756" onerror="console.error('Failed to load:', this.src)"></script>
<script src="channels.js?v=1774331200" onerror="console.error('Failed to load:', this.src)"></script>
<script src="nodes.js?v=1774221131" onerror="console.error('Failed to load:', this.src)"></script>
+7
View File
@@ -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);