← all branches

content/auto-draft

safeviewing older commit
0257d74 · incrementalPR #325reviewed 2026-07-20 23:00 UTC0H · 0M · 0L · 1I
The branch
Purpose
Autonomous content draft — new blog post comparing GDMTO vs GDMTH CFE tariffs for commercial users, with interactive cost and load-profile charts grounded in real CFE rates (VdM Centro, jun-2026).
Goal
Publish the GDMTO-vs-GDMTH informational article (target keyword: 'GDMTO vs GDMTH') with accurate tariff maths, two interactive D3 charts, and tests locking the peso figures shown in the post.
Sub-goals
  • SG-1: MDX blog post content (178 lines) — tariff explanations, load profiles, cost comparison narrative
  • SG-2: Interactive charts — cost-comparison bar chart + load-profile area chart (charts.tsx, ~290 lines)
  • SG-3: Pure tariff calculation core in charts.tariffs.ts — RATES, PROFILES, blockKWh, dfCap, dmaxMonth, billGdmth, billGdmto
  • SG-4: Test suite (charts.calculations.test.ts) locking all peso figures + tariff-flip invariant
  • SG-5: SEO surface — calendar.yml entry, llms.txt update, blog page metadata
  • SG-6 (this commit): Fix noUncheckedIndexedAccess CI failure in test setup
The changes (whole branch)
What
Single commit (0257d74c) — replaces PROFILES.map()+destructure with direct tuple-index access (PROFILES[0].curve / PROFILES[1].curve) to satisfy TypeScript's noUncheckedIndexedAccess check. No logic change.
Why
TypeScript strict mode (noUncheckedIndexedAccess) types the result of .map()+destructure as `readonly number[] | undefined`; direct access on an as-const tuple gives the concrete type. CI was failing on this type mismatch.
Areas
apps/web/content+1791apps/web/src/components/blog+4411apps/web/src/app/(marketing)/blog+22apps/web/public+60
Blast
7 files, +628/-4 lines, all within apps/web (content + components). No backend, no platform, no infra changes.
content-branch web-only ci-fix
ci· CI status unavailable via this tokencoderabbit· No .coderabbit.yaml found

Findings · 1

improvement1

info

Direct tuple access is the optimal noUncheckedIndexedAccess fix

apps/web/src/components/blog/charts.calculations.test.ts:7

PROFILES[0].curve / PROFILES[1].curve is the clearest fix on an as-const tuple. Alternatives (destructure syntax, type assertion) are more complex. The added comment explaining why is appropriate — the noUncheckedIndexedAccess constraint is non-obvious.

History · 14 commits

  1. c27ea57needs attentionincremental3H · 5M · 4L2026-08-04 17:46
  2. ff69645needs attentionincremental0H · 6M · 8L2026-07-28 18:21
  3. 0257d74safeincremental0H · 0M · 0L2026-07-20 23:00current
  4. 0795a9dsafeincremental0H · 0M · 2L2026-07-20 22:42
  5. 5c57414needs attentionincremental2H · 7M · 10L2026-07-20 22:29
  6. 5a57a8fneeds attentionincremental0H · 5M · 8L2026-07-20 17:14
  7. cc9056eneeds attentionfull1H · 3M · 9L2026-07-20 16:40
  8. 8b79d33needs attentionincremental5H · 7M · 11L2026-07-14 18:10
  9. f0c337cneeds attentionincremental1H · 1M · 5L2026-07-14 17:15
  10. 5c9de97needs attentionincremental0H · 5M · 7L2026-07-14 17:02
  11. 92cce08needs attentionincremental1H · 4M · 3L2026-07-14 02:00
  12. b7dd610needs attentionincremental0H · 6M · 7L2026-07-14 01:43
  13. 8c43554needs attentionfull0H · 2M · 1L2026-07-14 01:15
  14. 2149391blockedfull8H · 6M · 7L2026-07-10 17:30