fix(site): show full dataset history, not just the last 7 commits#85
Merged
Conversation
The homepage History section called the GitHub commits API live (per_page=8, sliced to 7) and re-fetched the dump at each SHA, so older syncs were invisible and the unauthenticated rate limit (60/h) made it flaky. Precompute the whole timeline at deploy time instead: build-history.mjs walks the full git history of site/public/v1/index.json and writes site/public/v1/history.json (a build-only, gitignored artifact). The page reads that one static file and only falls back to the GitHub API for local `astro dev`. deploy-pages now checks out at fetch-depth: 0 so the generator can see old commits. Refs #1
Member
TechEngine change review: PASS
Changed data
Changed record examples
Heuristic review
Changed site
Modified site files
|
Member
TechEngine validation stats: PASS
Data summary
Warning Tracked verified coverage is below 50% for watch 2.9% (11/378), brand 5.3% (10/189), tablet 5.7% (174/3048), soc 5.8% (123/2104), smartphone 9.4% (8453/90118), all 9.8% (10028/101954), gpu 12.0% (244/2030), pda 24.5% (27/110), and 1 more. Validation notes
Key output:
Homepage build: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The homepage History section showed only the last 7 commits — older syncs were invisible. It called the GitHub commits API live (
per_page=8→slice(7)) and re-fetched the dump at every SHA, which also risked the unauthenticated rate limit (60/h).Fix
Precompute the whole timeline at deploy time:
site/scripts/build-history.mjswalks the full git history ofsite/public/v1/index.jsonand writessite/public/v1/history.json(build-only, gitignored — regenerated every Pages deploy, never churns data PRs).astro dev.deploy-pageschecks out atfetch-depth: 0so the generator can see old commits.Verified locally: generator emits 27 points (1,870 records on 2026-06-01 → 101,879 on 2026-06-21) and the file ships to
dist/v1/history.json. Fullnpm run buildpasses.Refs #1
Closes #19