feat(map): Important Links overlay — B-weighted top routes - #1771
feat(map): Important Links overlay — B-weighted top routes#1771ArcanConsulting wants to merge 3 commits into
Conversation
Polish review — Important Links overlayVerdict: APPROVE-WITH-CONCERNS (0 BLOCKER · 0 MAJOR · 4 MINOR · 2 NIT) Solid net-new UI surface. Pure ranking core is well factored out and behaviorally tested, CSS-var theming is respected, persistence works, and the visual encoding (weight + opacity ∝ importance) reads cleanly. Net-new-UI TDD exemption applies cleanly (test lands in same PR, asserts behavior, not just structure). Notes below are polish, not blockers. MINOR
NIT
Positive notes
TDD gate (kent-beck)Branch has a single commit ( Scope: 237-line frontend-only diff ( |
ada541d to
158cc34
Compare
Re-review (round 2) — Important Links overlayVerdict: merge-ready (0 BLOCKER · 0 MAJOR · 0 MINOR remaining) All 6 polish items from the prior review (4 MINOR + 2 NIT) landed in Findings closed
Verification
Three-axis
Nothing further from this round. Ready when you are. |
Status check — round 3 (merge-from-master)Head moved Auto-merge blocked: Go CI is RED on Recommendation: wait for the master-side flake fix to land + rerun, or rerun CI now since it's a known race (the test name itself says "concurrent requests during build"). I'm not flipping the auto-merge gate on this run — — mc cron v2 |
Status check — merge-from-master only (round 4)Head moved Auto-merge blocked: Playwright now red on a different test than last cycle — This is the map-controls accordion E2E (#1329), not anything this PR touches. 3 of 26 controls aren't visible at 1280px — likely a CSS regression from one of the master-side commits inherited via the merge, NOT from this branch. Master is reporting "success" on its own CI runs, so this may be a layout race that's deterministic only when the Important-Links overlay code from this branch interacts with the accordion panel sizing. Worth a CDP repro before declaring upstream-cause. Action: community branch, leaving as-is. Operator: if you want a debug-repro spawn against staging to confirm overlay-vs-accordion interaction, say the word. — mc cron v2 |
…desktop count (Kpa-clawbot#1771 overlay)
Delta review —
|
…wbot#672 / D) Add a public, toggleable map overlay that draws the most IMPORTANT affinity links between nodes, weighted by the Kpa-clawbot#672 repeater-usefulness axes — so terrain-level chokepoints (the sole link across a valley) stand out geographically. Distinct from the API-key-gated Affinity Debug overlay, which it is modeled on but leaves untouched. Frontend-only, no server change. It joins the already-loaded `nodes` array (coords + usefulness/bridge/redundancy/traffic scores from /api/nodes) with the public /api/analytics/neighbor-graph edges: importance(edge, axis) = edge.affinity × mean(endpoint axis scores) (axis = "affinity" → the raw edge affinity) Ranks edges descending, draws the top-N (slider, default 50) as polylines whose width/opacity scale with importance; endpoints without GPS or zero importance are dropped. Controls (in the map controls panel): a toggle, a "Rank by" select (Usefulness composite / Bridge / Redundancy / Traffic / Affinity), and a Top-N slider; axis + N persist to localStorage. The B weighting "lights up" once the Kpa-clawbot#672 scores are deployed; before that the Affinity axis still shows links. test-top-routes-overlay.js executes the pure ranking core (computeTopRouteEdges) against fixtures — importance math, axis-dependent reordering, top-N, GPS/zero-score skips — plus grep pins for the DOM wiring. Wired into test-all.sh.
…desktop count (Kpa-clawbot#1771 overlay)
cd71c7f to
bfa677e
Compare
Delta Review — commits since cd71c7fVerdict: merge-ready | 0 BLOCKER | 0 MAJOR | 1 MINOR AdversarialNew code in Tufte (frontend/UI)Overlay controls follow established map.js fieldset pattern ( Kent Beck (TDD gate)
MINOR
|
Automated review (parallel personas, consolidated)Verdict: needs-visual-verify carmack: Ranking math ( tufte: Overlay uses a single kent-beck: MAJOR:
MINOR:
|
Polish review — round 1 (parallel personas)Verdict: MAJOR (one race bug; rest is nits). [carmack] Race: fetch-vs-toggle can render an unchecked overlay. [carmack] Per-frame allocs on slider drag are avoidable. [tufte] Doc-vs-code drift on the importance formula. Header comment (map.js:~2155) says "edge.affinity × mean(endpoint axis scores)"; code reads [tufte] Hardcoded color fallback [kent-beck] Coverage gaps in test-top-routes-overlay.js. No case for: empty [kent-beck] Nit. Grep pins with 3-axis: mergeable=MERGEABLE · CI=SUCCESS (Go+E2E; Docker cancelled on fork, expected) · reviews=none. Address the race + doc drift and this is merge-ready. |
Public map overlay drawing the most important affinity links, weighted by the #672 usefulness axes (rank-by selector + top-N slider). Frontend-only. Pairs with #1762.