From 19c35f4a2bccd6057b86c1f8d84ae0f374e359a9 Mon Sep 17 00:00:00 2001 From: MarekWo Date: Mon, 20 Jul 2026 12:14:50 +0200 Subject: [PATCH] feat(pathanalyzer): combined 2/3-byte option in the HB filter The path-hash-size filter accepts a comma list of sizes; a new '2/3-byte' option matches messages with any routed echo using a 2- or 3-byte hash. Verified live: 2/3-byte returns exactly the union of the 2-byte and 3-byte sets (220 = 208 + 12 with zero overlap misses on live data). Co-Authored-By: Claude Fable 5 --- app/static/js/path-analyzer.js | 7 ++++--- app/templates/path-analyzer.html | 1 + 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/app/static/js/path-analyzer.js b/app/static/js/path-analyzer.js index a548610..824b5a1 100644 --- a/app/static/js/path-analyzer.js +++ b/app/static/js/path-analyzer.js @@ -143,9 +143,10 @@ function paMessageMatchesFilters(msg) { if (!ok) return false; } if (paFilters.hashSize !== 'any') { - const want = parseInt(paFilters.hashSize, 10); - // Only routed echoes carry a meaningful hash size - const ok = msg.echoView.some(e => e.hops > 0 && (e.hash_size || 1) === want); + // Value is a comma list of accepted sizes (e.g. "2" or "2,3"); + // only routed echoes carry a meaningful hash size + const wanted = paFilters.hashSize.split(',').map(Number); + const ok = msg.echoView.some(e => e.hops > 0 && wanted.includes(e.hash_size || 1)); if (!ok) return false; } if (paFilters.token) { diff --git a/app/templates/path-analyzer.html b/app/templates/path-analyzer.html index 01ed5db..17b6c05 100644 --- a/app/templates/path-analyzer.html +++ b/app/templates/path-analyzer.html @@ -500,6 +500,7 @@ +