mirror of
https://github.com/Kpa-clawbot/meshcore-analyzer.git
synced 2026-05-14 14:25:05 +00:00
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:
+1
-1
@@ -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>
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user