mirror of
https://github.com/Kpa-clawbot/meshcore-analyzer.git
synced 2026-03-30 18:15:47 +00:00
## Summary Adds `distributionByRepeaters` to the `/api/analytics/hash-sizes` endpoint in the **Go server**. ### Problem PR #263 implemented this feature in the deprecated Node.js server (server.js). All backend changes should go in the Go server at `cmd/server/`. ### Solution - For each hash size (1, 2, 3), count how many unique repeaters (nodes) advertise packets with that hash size - Uses the existing `byNode` map already computed in `computeAnalyticsHashSizes()` - Added to both the live response and the empty/fallback response in routes.go - Frontend changes from PR #263 (`public/analytics.js`) already render this field — no frontend changes needed ### Response shape ```json { "distributionByRepeaters": { "1": 42, "2": 7, "3": 2 }, ...existing fields... } ``` ### Testing - All Go server tests pass - Replaces PR #263 (which modified the wrong server) Closes #263 --------- Co-authored-by: you <you@example.com>