← all branches

claude/vigorous-stonebraker-41cc2d

safeviewing older commit
37ce28a · incrementalpre-PRreviewed 2026-07-10 17:22 UTC0H · 2M · 3L · 6I
The branch
Purpose
Static browser-only solar energy atlas for Mexico (Sistema Eléctrico Nacional). Visualizes generation plants, transmission lines, CENACE control regions, and distributed generation (DG) evolution data.
Goal
Add interactive tooltips to DG evolution charts and a CENACE region click popup with live demand/generation data.
Sub-goals
  • Add floating #etip tooltip element with CSS + JS event delegation on echart
  • Add data-tip attributes to chart bars (stacked bars in size/region charts) and circle dots
  • Add CENACE region click handler aggregating plant count, capacity, and tech breakdown
  • Update atlas.json and dg_by_size.json with 2025 distributed-generation data
The changes (whole branch)
What
All 7 commits on this branch are atlas-only. The full branch adds a DG evolution panel with metrics, cumulative/annual toggle, size focus, region evolution, tooltips, and 2025 data.
Why
Atlas needs richer interactivity — hovering chart elements to see exact values is a baseline UX expectation for data visualizations.
Areas
apps/web/public/atlas/index.html+13739apps/web/public/atlas/data/atlas.json+11apps/web/public/atlas/data/dg_by_size.json+11
Blast
3 files total, +139/-41 across the whole branch. Static atlas only — no backend, no API, no TypeScript build.
static-html-only no-build-pipeline scope-md-stale
CI/typecheck· static HTML file — no build pipelinetests· no test suite for atlas (appropriate)CodeRabbit· no .coderabbit.yaml

Findings · 13

correctness4

medium

Tooltip viewport clipping when cursor near top edge

apps/web/public/atlas/index.html

position:fixed + transform:translate(-50%,-100%) + top=clientY-10 causes tooltip to disappear above viewport when mouse is within ~40px of top edge.

low

cursor:default on SVG dots is intentional — no issue

apps/web/public/atlas/index.html

dots show tooltips but don't handle clicks; cursor:default is correct.

info

D.REG[p[6]] region index access follows existing convention — safe

apps/web/public/atlas/index.html

p[6] is the established regionKey field, mirroring dgRegionVal.

info

DEM optional chaining is safe

apps/web/public/atlas/index.html

DEM&&DEM.regions&&DEM.regions[nm]&&DEM.regions[nm].latest chains safely.

security2

low

Region name interpolated into pop() innerHTML — controlled data source, pre-existing pattern

apps/web/public/atlas/index.html

nm from atlas.json feature properties; data from controlled GitHub. Same pattern used for other layers. Theoretical XSS only.

info

etip tooltip uses textContent — XSS-safe

apps/web/public/atlas/index.html

Data-tip values are Math.round()/toFixed() numerics + static strings. Clean.

conventions3

medium

scope.md describes feat/multi-gran (metrics pipeline), not atlas work

.branch/scope.md

All 7 branch commits are atlas-only. scope.md should be updated or removed if branch was repurposed.

low

dgDots optional 5th param is backwards-compatible

apps/web/public/atlas/index.html

All call sites pass tips; undefined path handled gracefully.

info

CSS and JS patterns consistent with existing file conventions

apps/web/public/atlas/index.html

tests1

info

No tests — appropriate for static HTML visualization

apps/web/public/atlas/index.html

No build pipeline. Manual browser test is adequate.

improvement3

low

Tooltip top-edge guard — one-liner fix available

apps/web/public/atlas/index.html

etip.style.top=(e.clientY>60?e.clientY-10:e.clientY+18)+'px' flips tooltip below cursor near top edge.

info

Dot radius bump (1.7→2.4) improves usability

apps/web/public/atlas/index.html

info

CENACE region aggregation is O(n) plants — fast enough

apps/web/public/atlas/index.html

History · 10 commits

  1. a081002safeincremental0H · 0M · 0L2026-07-14 01:23
  2. 64dc83dneeds attentionincremental0H · 1M · 7L2026-07-13 20:03
  3. ec4eea3needs attentionincremental1H · 3M · 7L2026-07-13 18:42
  4. f4b4129safeincremental0H · 0M · 3L2026-07-13 04:34
  5. 8ea0c8asafeincremental0H · 0M · 3L2026-07-13 04:21
  6. 37ce28asafeincremental0H · 2M · 3L2026-07-10 17:22current
  7. d28c6daneeds attentionincremental0H · 3M · 10L2026-07-10 16:59
  8. 754a65dneeds attentionincremental0H · 3M · 4L2026-07-10 16:39
  9. a9190b2safeincremental0H · 0M · 5L2026-07-10 16:14
  10. 0bf12a0blockedfull1H · 2M · 4L2026-07-10 16:06