Repository navigation
feat(nodes): the public Station block shows every approved station value (#1017) - #1096
Conversation
…, red on master (#1017) - test-issue-1017-station-block.js (vm, in test-all.sh): units and wording, the compass point from degrees, missing values omitted, rounding without "-0.0", the EIRP sum, owner-only fields never shown, the admin row unchanged. - test-issue-1017-station-block-e2e.js (shard 2): an approved claim with every field shows each value; pending, hidden, stale show nothing; leaked owner-only fields nowhere; 375x560 light/dark from a cold start with real taps and desktop dark, no sideways scroll. - TestStationBlock1017_OnlyApprovedServesEveryField: /station serves the full field set only for an approved claim, never the admin contact. Relates to #1017 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…lue (#1017) The node page's Station block now shows the #1017 M3 values next to the existing ones: a Direction row ("135° (SE) · 40° beam"), a Radio row (TX power at the antenna port, cable loss and the EIRP they give, with a missing gain counted as 0 dBi and said so) and the battery Wh and solar panel W in the Power row. Missing or malformed values give no row. The values come from the existing GET /api/nodes/{pk}/station (approved, in-force, non-stale details only); no new endpoint, no Go change. detailValues takes a `full` flag so the admin row keeps listing the M3 values once through keptValues. Relates to #1017 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Relates to #1017 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Rapport — CS-MacBook PR#1096 #1017 — head 08b714bStatus: Implemented and verified locally (unit, Go, E2E, mutants). The draft is open. CI has not run: GitHub Actions is in a major outage ("Incident with Webhooks and Actions"), and no run has been created repo-wide since 16:37Z. An empty commit ( Evidence labels:
Requirements1. Every approved public station value in the Station block, with unitsThe block shows Hardware, Antenna, Gain, Direction ("135° (SE) · 40° beam"), Radio ("27.5 dBm at the antenna port · cable loss 1.5 dB · ≈ 35.0 dBm EIRP"), Power with the battery Wh and solar panel W, Installation and Owner contact.
2. Formatting: compass, rounding, EIRP, omit missing
3. Approval state: pending, unapproved, hidden and stale never public
Note: the Go test and the 4 "no block" E2E cases are green on master too. That behaviour already existed, so the red evidence for this point is the mutants. 4. Owner-only fields stay owner-only
5. The admin row is unchanged (no duplicated M3 values)
6. Layout: 375×560 with real taps and desktop, light and dark
7. No API or Go change, no new endpoint, read-only server, no
|
| Suite | Result |
|---|---|
test-issue-1017-station-block.js |
10/10 |
test-issue-1017-station-block-e2e.js |
10/10 (about 8 s) against a local Go server with e2e-fixture.db, prepared as in CI: freshen, migrate and the 4 seeds |
test-issue-1017-m2-e2e.js |
12/12 |
test-issue-898-m2-e2e.js |
22/22 |
test-antenna-claims-e2e.js |
11/11 |
sh test-all.sh |
409/409 files |
node test-frontend-helpers.js |
746 passed |
cd cmd/server && go test ./... |
ok |
node scripts/run-e2e-shard.js --validate |
319 suites across three non-empty shards; the new suite is in shard 2, the lightest |
CI per job
Not run. GitHub Actions is in a major outage, so no run was created for the PR event or for the re-run commit. The jobs need checking once Actions recovers; the known flaky test is #271.
Choices and remaining items
- I kept the existing row labels: Antenna and Gain stay separate, and Direction and Radio are new rows. The plan's sketch (§9.2) merges some of these into one Antenna line. Keeping the rows changes no existing output.
- I used an 8-point compass.
- The antenna height stays in the existing "This site's height" line.
- The side pane is unchanged, because the plan puts the block on the node page only.
- PR feat(coverage): use the owner's station values in predicted reach and the terrain profile (#1017 M4) #1093 (M4) touches only the form pre-fill in
antenna-claims.js, notstationView/detailValues, so I expect no conflict [K]. - History: one red test commit, one feature commit, and one empty commit to re-run CI.
🤖 Generated with Claude Code
Review — CS-Minimax PR#1096 — head 08b714bDom: APPROVE with nits This is an independent, read-only review. I tested the merged tree Evidence labels:
Findings
Answers to the review points
Tests (merged tree
|
| Suite | Result |
|---|---|
node test-issue-1017-station-block.js |
10/10. On master: 4/10, the 6 new-behaviour cases are red |
node test-frontend-helpers.js |
746 passed, 0 failed |
test-antenna-claims.js, test-hardware.js |
55 passed, 17/17 |
cd cmd/server && go test ./... |
ok (161.8 s) |
TestStationBlock1017_* on master |
ok, because it pins existing behaviour |
sh test-all.sh |
407/409. Both failures are environmental, because my git archive export has no .git: test-issue-628-vendor-gitattributes.js and test-issue-715-og-denmark.js fail with "fatal: not a git repository". They fail identically on a git archive of master. |
node scripts/run-e2e-shard.js --validate |
319 suites across three non-empty shards |
test-issue-1017-station-block-e2e.js |
10/10. Against the master frontend: 4 passed, 6 failed (red before) |
test-issue-1017-m2-e2e.js |
12/12 |
test-issue-898-m2-e2e.js |
22/22 |
test-antenna-claims-e2e.js |
11/11 |
| Real-stack walkthrough (my own script) | 16/16 |
The E2E suites ran against a local Go server with e2e-fixture.db, prepared as in CI: freshen, the seed SQL from deploy.yml, corescope-migrate, then the seeds 2073, 199, 245 and 122. Go here is 1.26 locally; CI uses 1.27.1.
Mutants (my own) [T]
| # | Mutant | Result |
|---|---|---|
| M1 | COMPASS[Math.round(deg/45) % 8] → no % 8 (338–359° lose the row) |
killed (unit 9/10) |
| M2 | gain subtracted in the EIRP | killed (unit 7/10) |
| M3 | if (full) around Direction/Radio → if (true) (the admin row duplicates the values) |
killed (unit 9/10) |
| M4 | beam check isNum → != null |
killed (unit 9/10) |
| M5 | EIRP shown with a cable loss but no TX power | killed (unit 9/10) |
| M6 | stale guard removed in stationView |
killed (unit 9/10) |
| M7 | Math.round(x) → Math.floor(x + 0.49) |
survived, but it is equivalent: the two differ only for a fraction in [0.5, 0.51), and that never happens for whole degrees |
| E1 | cable-loss part dropped from radioText, served to the browser |
killed (E2E 7/10: the full, 375 light and 375 dark cases) |
| G1 | /station snapshot WHERE status = 'approved' → IN ('approved','proven') |
killed (TestStationBlock1017_OnlyApprovedServesEveryField/proven) |
That is 8 non-equivalent mutants, all killed. The files were restored and byte-compared afterwards.
CI per job
Not run. gh pr checks 1096 reports no checks for 08b714b1, and gh run list --commit 08b714b1 is empty. The author's re-run commit came during the Actions outage. Actions is creating runs again for other PRs, so this head needs a new trigger, for example a push or a close and reopen. Merge only after every job is green, allowing for the known flakes #256 and #267.
What I did not verify
- CI (see above).
- A real iPhone or Safari. I used Chromium with touch emulation, at 375×560 and 360×640.
- A node hidden through config on the real stack. I checked the unknown-node 404 and the E2E's 404 mock, and the server code returns the same 404 for hidden nodes [K].
- feat(coverage): use the owner's station values in predicted reach and the terrain profile (#1017 M4) #1093's and feat(account): station data through owner links, with a change log (#1018 M2d) #1095's runtime behaviour together with this PR. I checked only that they merge cleanly and how they call the functions [K].
cd cmd/ingestor && go test: this PR does not touch the ingestor.
🤖 Generated with Claude Code
Relates to #1017
What
Owners can enter the #1017 M3 station values (TX power, cable loss, direction, beamwidth, battery, solar panel).
/stationalready serves them for an approved claim, but the public Station block on the node page only showed hardware, antenna type, gain, power sources, installation and the public contact. This PR shows the rest:Plan (small, one milestone)
detailValues(d, full)inpublic/antenna-claims.jsgets the Direction and Radio rows and the battery/panel sizes in the Power row. Only the public Station block passesfull. The admin row keeps listing the M3 values once, throughkeptValues.NodeStationResponse.detailsisantennaclaim.StationDetails, which already carries every M3 field. It has nocontactAdmin, and it is served only for approved, in-force, non-stale claims on a visible node. No Go code changes, no new endpoint and no newmap[string]interface{}.cmd/serverstays read-only.Display rules (from the revised M0 plan §9.2 and the owner decisions)
9.0 dBi).-0.0is never shown. Units are dBi, dBm, dB, Wh and W.<deg>° (<8-point compass>), plus· <beam>° beamwhen given. A beamwidth without a direction says nothing, so it gets no row. Due north (0°) is a value./stationreturns. Pending, proven, rejected, revoked, expired and superseded claims are never served (new Go test). Stale claims and hidden or unknown nodes show no block.contactAdminis never shown, even if an answer leaked it (unit + E2E).Choices I made (no one to ask)
Tests
test-issue-1017-station-block.js, 10 cases (vm, real file), added totest-all.shtest-issue-1017-station-block-e2e.js, 10 cases, shard 2 inscripts/e2e-shards.json/stationserves the full field set only for an approved claim; 6 other statuses serve nothing; never the admin contactTestStationBlock1017_OnlyApprovedServesEveryFieldMutants: 17 unit mutants, 3 E2E mutants and 1 Go mutant. All killed; the list is in the report comment.
Perf
The work is O(1) per node page: a few string joins over one
/stationanswer that is already fetched. It adds no request and no DOM rebuild. The rows are built withcreateElement+textContent, as before.Customizer
None. There are no new colours or settings; the block uses the existing
--text-muted/ text variables.🤖 Generated with Claude Code