mirror of
https://github.com/Kpa-clawbot/meshcore-analyzer.git
synced 2026-09-29 10:58:31 +00:00
dborup wanted a single place to see all direct neighbors observed
across every observer, rather than clicking into each one individually.
Discussed placement -- landed on Tools, matching the existing Path
Inspector/Trace Viewer pattern.
Backend: GetAllObserverNeighbors flattens every observer_neighbors row
network-wide, joined with observer/neighbor display names, cross-referenced
against the packet-derived neighbor_edges graph exactly like the
per-observer endpoint (memoized per observer_id to avoid redundant
queries). Reads the full result set into memory before running any
packetGraphNeighbors lookups -- issuing a query per row while the main
cursor is still open is the single-connection-pool deadlock class from
earlier this session. New GET /api/observers/neighbors, registered
before /api/observers/{id} since both are 3-segment patterns and
gorilla/mux matches by registration order. Blacklisted observers excluded.
Frontend: new Tools > Observer Neighbors page (observer-neighbors-tool.js),
sortable by any column + a client-side observer/neighbor name filter,
reusing the col-scope-list wrap fix from the per-observer panel and the
same row semantics (unresolved pubkey truncated/unlinked, "no reply" for
scope-query timeouts, packet-evidence confirmed/not-seen-yet).
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>