Files
meshcore-analyzer/public
Kpa-clawbot 23d1e8d328 feat: add flood/direct packet filter to observer comparison page (#1000)
## Summary

Adds a **Flood / Direct packet filter** dropdown to the observer
comparison page. This addresses the issue that direct packets (heard by
only one observer) skew the comparison percentages.

## Changes

- **`public/compare.js`**: Added `filterPacketsByRoute(packets, mode)`
function and a "Packet Type" dropdown (All / Flood only / Direct only)
to the comparison controls. Changing the filter re-runs the comparison
with filtered packets.
- **`test-compare-flood-filter.js`**: Unit tests for the filter
function.

## Route type mapping (from firmware)

| Route Type | Value | Filter |
|---|---|---|
| TransportFlood | 0 | Flood |
| Flood | 1 | Flood |
| Direct | 2 | Direct |
| TransportDirect | 3 | Direct |

## TDD

- Red commit: `484fa72` (test only, fails)
- Green commit: `5661f71` (implementation, tests pass)

Fixes #928

---------

Co-authored-by: you <you@example.com>
2026-05-03 08:58:25 -07:00
..
2026-03-18 19:34:05 +00:00