Repository navigation
fix(site): count every collection in the growth chart - #379
Merged
Merged
Conversation
build-history.mjs summed only the 8 collections the dump had in June, so the chart's latest point said 108,509 records while the API serves 213,487. It now counts all 13 manifest collections, including laptops, monitors, software, websites and the device catalog, and no longer prints git's "fatal:" for the commit that stopped tracking the manifest. The homepage also had no label for websites or device-catalog, so their history rows read "undefined". Both are labelled now, and any future collection falls back to its key. Refs #19
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.
What & why
The homepage's growth chart has been counting only the 8 collections the dump had in June: smartphones, tablets, watches, PDAs, SoCs, GPUs, CPUs and brands. Its latest point says 108,509 records, but the API serves 213,487. The page then appends a "Current published snapshot" point to close the gap, which draws a +105k jump that never happened.
site/scripts/build-history.mjsnow counts all 13 collections inv1/index.json: laptops, monitors, software, websites and the device catalog as well. Old manifests that predate a collection simply don't have it.site/src/scripts/techapi.jshad no label forwebsitesordevice-catalog, so their rows in the History panel read "undefined". Both now have labels, and any future key falls back to its own name.fatal: path 'site/public/v1/index.json' does not exist in 'ee5deaa'no longer appears in the deploy log. That commit is the one that stopped tracking the manifest, and the script already skipped it.Closes #19
Source
No data change.
Checks
node site/scripts/build-history.mjslocally on developb3f438a. It wrote 40 points. The last point isb3f438awith 213,487 records across 13 collections, which matches the engine's Tier 0 count for develop. The June baseline is still 1,870.node --checkpasses on both scripts.Checklist
develop(mainonly moves through release PRs)projectscope on the gh token. Copilot's quota is used up, so I reviewed it by hand.