From 3d31afd0ec73d8f37fd76de2b7c1f9a3cd9c1d63 Mon Sep 17 00:00:00 2001 From: you Date: Sat, 21 Mar 2026 23:54:49 +0000 Subject: [PATCH] fix: resolve hops after sort changes header paths When sort updates header row path_json, new hop hashes may not be in hopNameCache. Now resolves unknown hops before re-rendering. --- public/index.html | 2 +- public/packets.js | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/public/index.html b/public/index.html index bf1b7e41..7c30fb55 100644 --- a/public/index.html +++ b/public/index.html @@ -84,7 +84,7 @@ - + diff --git a/public/packets.js b/public/packets.js index 0a4527e6..c9216b9e 100644 --- a/public/packets.js +++ b/public/packets.js @@ -492,6 +492,12 @@ for (const p of packets) { if (p._children) sortGroupChildren(p); } + // Resolve any new hops from updated header paths + const newHops = new Set(); + for (const p of packets) { + try { JSON.parse(p.path_json || '[]').forEach(h => { if (!(h in hopNameCache)) newHops.add(h); }); } catch {} + } + if (newHops.size) await resolveHops([...newHops]); renderTableRows(); });