Repository navigation
feat(rx-coverage): Uplink layer, did the mesh hear the companion - #21
Merged
Merged
Conversation
The ingestor stores CoreDrive RX uplink pings since b146a87 (#20). This serves and draws them. - GET /api/uplink-coverage (cmd/server/uplink_coverage.go), gated on clientUplink.enabled. Per ping the class is: both the companion heard a repeater re-broadcast it AND an observer received it (transmissions.hash = the ping's hash) observed an observer received it, no echo echo echo, no observer received it none neither The hash comes from the ping (echo) or from client_uplink_tx (the ingestor's own decryption). Per hex cell: counts per class, best class, first-hop repeaters (max 12), most observers reached, longest path, last ping. One arrivals query per 500 hashes; empty collection while the tables do not exist yet. Documented in openapi.go. - /api/config/client exposes clientUplink; roles.js sets MC_CLIENT_UPLINK. - rx-coverage.js: "Uplink" button in the layer bar (also without clientRfSamples), legend with the four classes and the caveat that "not received by an observer" can mean no observer in range, tooltip per cell, layer=uplink deep link. Colours as theme tokens (--nq-up-*, light and dark). Tests: Go (class mapping, per-cell aggregation, endpoint with echo-hash and tx-hash pings, days window, no-position pings left out, 404 when off, 400 on bad bbox, empty when tables absent), unit test for colour and tooltip, E2E test-rx-coverage-uplink-e2e.js (no button when off, cells and legend, deep link). Full server suite and all test-all.sh unit suites pass; XSS gate passes on rx-coverage.js and roles.js. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Map side of uplink pings (ingestor side: #20). The Mobile RX coverage page gets an Uplink layer that shows, per hex, whether the mesh heard the companions that pinged there.
GET /api/uplink-coverage(cmd/server/uplink_coverage.go), gated onclientUplink.enabled. Each ping gets a class:"Observer received it" means
transmissions.hashmatches the ping's hash. That hash comes from the echo, or from the ingestor's own decryption (client_uplink_tx). Per cell the endpoint returns the counts per class, the best class, the first-hop repeaters, the most observers reached, the longest path and the time of the last ping./api/config/clientexposesclientUplink;roles.jssetsMC_CLIENT_UPLINK.rx-coverage.js:clientRfSampleslayer=uplinkdeep link--nq-up-*), light and darkPerformance
One bbox query on
client_uplink_pings(indexed on lat/lon and sent_at), plus one arrivals query per 500 distinct hashes overtransmissions(hash)joined toobservations(transmission_id), both indexed. Pings are rare (paced to at most 50 per hour per companion), so the row counts are small. Not benchmarked.Test plan
test-all.sh: all unit suites pass. New:test-rx-coverage-uplink.js.test-rx-coverage-uplink-e2e.jsagainst a static server with a mocked API: 3/3.rx-coverage.jsandroles.js.cdrx ebd842fb(3 echoes, 17 observers) should show "both directions".🤖 Generated with Claude Code