Skip to content

My Grid: state grid news, so every state has something on the page - #38

Draft
aurph wants to merge 1 commit into
mainfrom
worktree-my-grid-local-news
Draft

aurph wants to merge 1 commit into
mainfrom
worktree-my-grid-local-news

Conversation

@aurph

@aurph aurph commented Sep 22, 2026

Copy link
Copy Markdown
Owner

Why

My Grid is built on the facility registry, and the registry floor is 400 MW. Around forty states have no tracked campus. Here is the live page for Maryland, full height:

Block State
Map Real, ~45% of the fold
Your grid Real: PJM, 17.5% reserve margin, 258 GW queue
Being built in Maryland "No tracked facilities in Maryland."
What electricity costs in Maryland "Rate data connects soon."
Below that Nothing. ~1,300px of empty page.

Two of four cards are empty states and then the page stops. It reads blank because almost nothing on it is about the reader's state.

What this adds

A keyless per-state news card between "Your grid" and "Being built". Google News RSS, one query per state. No API key, no scheduled job, no writes to server/data.

It also covers the legislature half of the ask. Grid legislation is reported as news, so one source does both. Real results from live feeds on 2026-09-22:

  • Maryland: "Baltimore County Council To Vote On Extending Data Center Moratorium"
  • Texas: "Tarrant lawmaker plans Texas data center transparency legislation"
  • Wyoming: "Facing Electricity Shortages, Wyoming Legislators Say Make Utilities Compete"
  • Vermont: "Vermont regulators finalize 5.5% rate increase for Green Mountain Power customers"

Legislature and PUC both land, in the week they happen, including in small states.

Two filters, both earned from real feeds

  1. Relevance. Virginia's feed returned "September Releases - Governor of Virginia", a press index with no grid content.
  2. Locality. Vermont's feed returned "...Increasing Utility Bills in Arizona". A headline naming a different state and not this one is dropped. One naming no state is kept, because the genuinely local ones read "Baltimore County Council ..." or "City of Torrington ..." and never say the state. State-named headlines rank first so thin states lead with real local coverage.

State matching is longest-name-first with matched spans blanked, so "West Virginia" is not read as "Virginia". "Washington, D.C." is not read as Washington state.

Why not structured bill records

Recorded so it is not re-litigated:

  • OpenStates v3 is the right shape for all 50 states but needs an API key, which is out of scope under keyless-only.
  • OpenStates bulk data is not a keyless substitute: CSV and JSON are behind a login, and the public Postgres dump is 10.0 GB, last written 2026-08-01, needing a Postgres instance this project does not have.
  • Per-state legislature RSS exists but nowhere near all 50 states.

Worth revisiting now that you can see how much of the gap news already closes.

Verification

Typecheck clean, 518/518 tests pass (28 new), production build clean. Fixtures are real titles from live feeds, including every case that must be dropped. No test touches the network.

Not verified: the card has not been seen rendered in a browser. The background dev server was reaped for memory pressure mid-session with an instruction not to restart it unasked, so I verified the data path, filters and route instead of the pixels. Worth a look before merge.

Separately, and worth more than this PR

EIA_API_KEY is not set in Replit. gridtilt.com/api/physical/retail-rates returns {"configured":false}, so the rates card is empty for every state in production right now. Setting that one secret fixes a second dead card with no code.

Still open

  • Map takes ~45% of the fold and shows mostly empty land for a state with no facilities. Taste call, deferred until you can react to a screenshot.
  • "Being built" still dead-ends at "No tracked facilities." The map already computes the nearest facilities across the state line; rendering those as a list would kill the last empty card.

🤖 Generated with Claude Code

https://claude.ai/code/session_016kmPCuF8Fs4byBLXK7CaKM

My Grid is built on the facility registry and the registry floor is 400 MW,
so around forty states have no tracked campus. For Maryland the live page
shows two empty cards ("No tracked facilities", "Rate data connects soon")
and then roughly 1,300px of nothing. The page is blank for most readers
because almost nothing on it is about their state.

Adds a keyless per-state news card between "Your grid" and "Being built".
Google News RSS, one query per state, no key and no scheduled job.

This also covers the legislative half of the ask. Grid legislation is
reported as news, so one source does both. Live feeds returned "Baltimore
County Council To Vote On Extending Data Center Moratorium", "Tarrant
lawmaker plans Texas data center transparency legislation", and "Vermont
regulators finalize 5.5% rate increase for Green Mountain Power customers".
Structured bill records are deferred: OpenStates v3 needs a key, and its
bulk dump is 10 GB of Postgres a month stale.

Two filters, both earned from real feeds rather than guessed:

- Relevance. Virginia returned "September Releases - Governor of Virginia",
  a press index with no grid content.
- Locality. Vermont returned a story about utility bills in Arizona. A
  headline naming a different state and not this one is dropped; one naming
  no state is kept, because the genuinely local ones read "Baltimore County
  Council ..." and never say the state. State matching is longest-name-first
  so "West Virginia" is not read as "Virginia", and Washington DC is not
  read as Washington state.

The module writes nothing to server/data, so unlike the news scanner a bad
match costs one wrong headline for an hour, not a corrupted file.

28 new tests, fixtures taken from live feeds including every case that must
be dropped. Design note in docs/superpowers/specs/.

Not verified: the card has not been seen rendered in a browser. The data
path, filters and route are covered by tests and checked against live feeds.

Claude-Session: https://claude.ai/code/session_016kmPCuF8Fs4byBLXK7CaKM
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant