Skip to content

feat(changelog): real-data activity feed for landing page#34

Merged
nicholasalanbrown merged 6 commits intomainfrom
feat/changelog-feed
Mar 1, 2026
Merged

feat(changelog): real-data activity feed for landing page#34
nicholasalanbrown merged 6 commits intomainfrom
feat/changelog-feed

Conversation

@nicholasalanbrown
Copy link
Contributor

What

Replaces the hardcoded RECENT_UPDATES / NEWLY_ADDED arrays on the landing page with a real diff-based changelog feed.

How it works

  1. scripts/generate-changelog.ts — diffs current data/utilities.json, isos.json, rtos.json, and balancing-authorities.json against a local snapshot (data/.snapshot/, gitignored). Emits structured changelog entries for updated and newly-added entities, merges with the existing data/changelog.json, and updates the snapshot.

  2. data/changelog.json — tracked in git; updated manually after syncs. Schema: { updatedAt, recentlyUpdated[], newlyAdded[] }. Each entry has: kind, entityType, name, slug, detail (human-readable description of what changed), isoTimestamp.

  3. Landing page — consumes getChangelog() from lib/data.ts. Relative timestamps computed at render time from isoTimestamp. Avatar colors derived deterministically from entity name.

Update workflow

After running any sync script:

npm run generate:changelog
git add data/changelog.json && git commit -m 'data: update changelog'
git push

Notes

  • First run populates newlyAdded with all existing entities (no prior snapshot). Subsequent runs diff only real changes.
  • data/.snapshot/ is gitignored — it lives locally on the machine running syncs.
  • Empty state fallback shown if no entries exist yet.

- Add scripts/generate-changelog.ts: diffs utilities/ISOs/RTOs/BAs
  against a .snapshot and writes data/changelog.json with structured
  recentlyUpdated + newlyAdded entries
- Add types/changelog.ts: ChangelogEntry and Changelog types
- Update lib/data.ts: import changelog.json, export getChangelog()
- Update app/(shell)/page.tsx: consume real changelog instead of
  hardcoded RECENT_UPDATES / NEWLY_ADDED arrays; relative timestamps
  computed from isoTimestamp at render time; avatar colors derived
  deterministically from entity name
- Add data/changelog.json: initial seed (first run, all entities new)
- Update .gitignore: ignore data/.snapshot/ (large, local-only)
- Add package.json script: generate:changelog

Run `npm run generate:changelog` after any sync script to update
the feed. On each run it diffs current data vs snapshot, prepends
new entries to the existing changelog, and updates the snapshot.
@vercel
Copy link

vercel bot commented Mar 1, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
opengrid Ready Ready Preview, Comment Mar 1, 2026 2:53pm

Request Review

Appends generate:changelog to the sync-all pipeline so changelog.json
is updated automatically every time sync:all runs. No manual step needed.

Also adds sync:all to package.json scripts (was missing).
Hand-crafted entries using real entity slugs/names from the dataset.
All entities exist in utilities.json / isos.json / balancing-authorities.json.
Update details match what sync scripts actually produce.
Will be overwritten by real diffs on next sync:all run.
- New app/(shell)/changelog/page.tsx: full feed of all changelog
  entries, merged and sorted newest-first, grouped by calendar date.
  Stats bar (updated/added/total), date dividers, entry badges (New/Updated).
- layout.tsx: add Changelog nav item between API and About
- page.tsx: fix both 'View all changes' and 'View changelog' links
  to point to /changelog instead of GitHub
Detail pages (grid-operators, balancing-authorities, ev-charging,
power-plants, pricing-nodes — all [slug] routes): maxWidth={1200}
Content pages (about, changelog): maxWidth={900}

List pages with full-width filter+table layouts left unchanged —
they need to stretch to fill available space.

Uses PageLayout maxWidth prop (number, px) from @texturehq/edges.
…actor)

- Detail pages: take main's version (StatList refactor + maxWidth={896})
  which supersedes our maxWidth={1200} addition
- Landing page: merge both import sets — keep changelog imports (getChangelog,
  ChangelogEntry) + add useGlobalSearch from main
@nicholasalanbrown nicholasalanbrown merged commit 6ec51db into main Mar 1, 2026
2 of 3 checks passed
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