Repository navigation
fix(analytics): density counts active repeaters only, none for postnumre (#1002) - #1098
Conversation
…mre (#1002) Owner decision 2026-12-02 on the Areas (DAGI) density columns: - repeatersPer100Km2 counts only active repeaters (classifyNodeHealth); rows gain activeRepeaters (already counted in the same pass), and the UI shows the total with the inactive ones: "12 (3 inactive)". - Postnumre have no density: repeatersPer100Km2 and observersPer100Km2 are null for every postnummer row, the street-postcode groups too. The table hides the density column for that layer, the sort select and the map do not offer it (a density sort falls back to Repeaters), the overview drops the density card, and the note says why. - Kommuner, landsdele and regioner keep per 100 km²; Christiansø keeps no density. OpenAPI text and the user guide follow. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Rapport — CS-Minimax PR#1098 #1002 — head 33ed10bStatus: Done locally, all green. Every point has a red→green test and killed mutants. CI has not run: GitHub created no workflow run for this PR, and a manual dispatch was not allowed in this session, so CI still needs a trigger. Evidence key: [T] test run in this session, [A] API response checked with curl or in the E2E, [K] code read. Requirements
The mutants ran by script on a scratch snapshot, with the #1002 Go tests and the three UI unit suites: 17 of 17 killed [T]. Runs
Perf
CI per jobNot run. The API shows no workflow run for Remaining items
🤖 Generated with Claude Code |
Review — CS-MacBook PR#1098 — head 33ed10bDom: APPROVE med nits. The code is correct and does what the owner decided. One condition before merge: E2E shard 2/3 must be rerun and come back green. It is red on a perf flake that this PR does not cause, but fail-fast stopped the shard before the new density suite ran in CI. Evidence key: [T] test or script run by me in this review, [A] API response checked against a local Go server, [K] code or log read. Findings
No blocking code defect found. Answers to the points
Phone user flow (cold start, real taps) [T]375×560 and 360×640, touch, both from the cold home page
No console errors. No step was impossible. One note: when a control is scrolled to the bottom edge of the viewport, the fixed bottom nav covers it, so a tap lands on the nav. That is pre-existing layout and has nothing to do with this PR. A user scrolls the control into view first. The numbers in this flow are synthetic, routed in the server's shape as the PR's E2E does, because the fixture has no Danish nodes. Desktop at 1440×900 (PR suite screenshot): the postnummer table has no density column, the cells read Tests (head = merged tree)Head
Red before, green after [T]. The PR's tests, run against master's code:
All acceptance criteria are covered: active-only density, per 100 km² kept, postnummer nulls (groups included), no column/option/map metric/card, and the total with the inactive ones separately. My own mutants: 13 of 13 killed [T]
The tree was restored afterwards, and the density E2E is green again (5/5). CI per job (run 46946573390,
|
| Result | Jobs |
|---|---|
| Success | Go Build & Test, Go Server 1/3 to 3/3, Go Ingestor, Go Libraries & CLI, JS Unit & Lint, Script & Container Unit Checks, Verify Go Test Assignments, Validate Docker Image, E2E 1/3, E2E 3/3 (M1 and M2 pass, M2 perf in budget) |
| Failure | E2E 2/3: the M3 postnummer perf flake, finding 1 |
| Failure, follow-on | Verify E2E Shards & Coverage, Build & Publish Docker Image: both only require every E2E shard to succeed |
| Skipped | Release Artifacts, Publish Badges, Deploy Staging |
The workflow started late, at 19:02Z, about an hour after the PR was opened, probably because of the GitHub Actions delays. Neither known flaky test (#256, #267) is involved.
Not verified
- The density E2E in CI: it never ran (finding 1). Locally it is 5/5.
- Real Danish data: the fixture has no Danish nodes, so the API check was shape and nulls only. The numbers come from the Go tests and from synthetic UI data.
- Perf under CI: the M3 flake is judged from CI history plus a local A/B, not from a CI rerun.
- Real devices: no real iOS or Safari device. I used Chromium with touch emulation only.
- Staging and prod: not checked (out of scope).
🤖 Generated with Claude Code
Relates to #1002
Follow-up to the owner decision of 2026-12-02 on the density columns of the Areas (DAGI) comparison.
Plan
Server:
repeatersPer100Km2counts only active repeaters, usingactiveRepeaters, which the same background pass already counts for the area card. The pass and its cost are unchanged. Rows gainactiveRepeaters. Both densities arenullfor every postnummer row, the street-postcode groups included. Kommuner, landsdele and regioner keep per 100 km². Christiansø still has no density.UI: the Repeaters cell shows the total with the inactive ones, e.g.
12 (3 inactive). Sorting still uses the total. On the postnummer layer:data-layerattribute plus a CSS rule, so there is no per-row work;sort=repeatersPer100Km2link falls back to Repeaters;The tooltips say "active repeaters".
Docs: the OpenAPI text for
GET /api/analytics/dagi-area(s)anddocs/user-guide/area-filter.mdare updated.docs/api-spec.mddoes not describe these fields.Choices
sort=repeaters.classifyNodeHealth), the same buckets as the Quiet card.fillRow), and switching layers costs one attribute write.Tests
Go:
TestDagiAreaComparisonDensity(rewritten) checks:nullfor all 605 postnummer rows, the groups included, while the counts stay;nullandactiveRepeatersin the JSON body.TestDagiAreaNodeCountschecks Aarhus: 4 of 5 repeaters active, so the density is 4/area, and postnummer 8200 has no density.TestDagiAreaComparisonPostnummerGroupschecks that the 1050 group has no density.UI unit tests (
test-analytics-dagi-areas-compare.js,-map.js): the inactive cell and card, no density card for a postnummer, the column, option and note for the postnummer layer, the sort fallback, the map metric, the CSS rule, and the URL round-trip.New E2E
test-issue-1002-density-e2e.js(shard 2): the real API shape, then 1440×900 and 375×560 with real taps.M2 E2E: the tooltip text is updated. The perf step now re-sorts postnumre by Repeaters, because density no longer exists there. It is the same numeric re-sort over the same 605 rows, against the same budgets.
Perf
row()reads a different counter that already exists, plus one layer compare.🤖 Generated with Claude Code