mirror of
https://github.com/MarekWo/mc-webui.git
synced 2026-07-28 04:23:26 +02:00
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:
@@ -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) {
|
||||
|
||||
@@ -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)"
|
||||
|
||||
Reference in New Issue
Block a user