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 <noreply@anthropic.com>
This commit is contained in:
MarekWo
2026-07-20 12:14:50 +02:00
parent 91b959aae4
commit 19c35f4a2b
2 changed files with 5 additions and 3 deletions
+4 -3
View File
@@ -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) {
+1
View File
@@ -500,6 +500,7 @@
<option value="1">1-byte</option>
<option value="2">2-byte</option>
<option value="3">3-byte</option>
<option value="2,3">2/3-byte</option>
</select>
<input id="paTokenFilter" type="text" class="form-control form-control-sm" style="width: 10.5rem;"
placeholder="Repeater (3B or name)"