Repository navigation
Site quality pass: pinned-commit chip on model pages, unique titles, contrast fixes and new site checks - #290
Draft
vahid-ahmadi wants to merge 6 commits into
Draft
vahid-ahmadi wants to merge 6 commits into
vahid-ahmadi wants to merge 6 commits into
Conversation
…nk-preview tags Four UK/US topic pairs shared one <title>. Each now reads as its heading does (UK growth, US growth). The 12 release digests and their index gain the Open Graph tags the rest of the site carries. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
tools/model_hero.py reads the [models] extra in integration/pyproject.toml and stamps a chip linking the model repository at that commit on the four tabs of the OBR emulator, BoE SVAR, FRB/US and US HANK. A new test fails when a page shows or links any other commit. Two SVAR validation links move from main to the pin, where the files are identical. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rast fixes Unique titles, link-preview metadata, unique ids, labelled form controls, table header cells and rel=noopener join tests/test_site_integrity.py. tools/check_external_links.py is a manual tool. Chart source lines and the No cells on /models move from the faint to the muted text colour (4.39:1 to about 7:1 on the grey surface). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rimary teal White on the dark-mode primary (#38B2AC) is 2.58:1. --primary-foreground is #0B0E14 there (7.6:1) and #FFFFFF in light mode, so light is unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
… contrast on the rule that wins FRB/US spending row: a 1% rise in federal purchases is 0.045% of GDP (egfe is 4.51% of xgdp in 2026Q3, October 2026 LONGBASE at 162cfe6), so the impact ratio is 0.83, not 0.81. BoE SVAR row: the response is on impact and roughly flat to h = 8, not building. No verdict or stored path changes. The No-pill colour fix moves to #compare .yn-no, the rule that sets it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch was successfully deployed
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
A quality pass over the macro site (OG-UK and microsimulation pages skipped). The site was served locally and every in-scope page checked for broken links, accessibility basics, console errors, phone layout at 375px, titles and descriptions, and consistency of model names, dates, units and pins. This PR fixes what was clear and adds checks so it stays fixed. No published number changes.
Stacked on #286 (
vahid/r6-site), so it is a draft. It touches the same model pages, and the base should be switched tomainonce #286 merges.What the audit found
overflow-xonhtmlorbody, so nothing is clipped out of the measurement); tables stack into labelled cards.pp,bpand£bnare used uniformly.integration/pyproject.toml. Older commits are named as history (0fe04c9,a822045,b56fe3bon/obr/validation,c827ab8on/svar/validation), and DEFINE-UK names its upstream commit846081a, which is not in that file. Five source links pointed atmain; two are moved here, three are left (below).data/vintage-refreshbranch with no PR. A notice for readers is proposed in #292.Changes
1. The pinned commit is visible on every model page. The hero strip on the four tabs of the OBR emulator, BoE SVAR, FRB/US and US HANK gains a chip with the short commit, linking the model repository at that commit.
tools/model_hero.pyreads it from the[models]extra inintegration/pyproject.toml, the one place a model commit is declared. The stylesheet already had an unused.mh-pinrule for it.tests/test_model_pins.pyties the two together:c827ab8is deliberate and is listed with its reason.The microsimulation (pinned by package version), OG-UK and DEFINE-UK (not installed from that file) get no chip. Papers and reports get none either: they are dated documents, and the chip states what the repository installs today.
2. Topic page titles.
/economy/topics/growthand/economy/us/topics/growthwere both "Growth — PolicyEngine Macro", and likewise inflation, jobs and reform.economy/topics.pynow builds the title from the same words as the heading: "UK growth", "US growth".3. Link previews on release digests. The 12 generated digests and the release-notes index had no Open Graph tags.
notes/generate_release_notes.pynow writes the set the rest of the site carries.4. Contrast.
.vc-source) and the "No" pills in the/modelscomparison table: faint text on a grey surface, 4.39:1. Now the muted text colour, about 7:1 (computed colours re-read in the browser after the change)./models): white on the dark-mode primary teal#38B2AC, 2.58:1. Now--primary-foreground, the token paired with that teal, about 7.5:1. Light mode is unchanged because the token is white there.5. Two source links move from
mainto the pin. On/svar/validation,results/unemployment_satellite_validation.jsonanddocs/band_decision.mdnow link at17f5d82. Both files have the same blob hash at the pin and onmaintoday.6. Two text corrections on
/models/compare, from the audit in #293. Edited inresults.jsonand rebuilt withbuild.py; no verdict changes and no stored path changes.162cfe6,egfeis 1,106.9 andxgdp24,537.6 in 2026Q3, so federal purchases are 4.51% of GDP and a 1% rise is 0.045%; the stored impact response 0.0373% divided by that is 0.83.7. Checks. Six structural tests join
tests/test_site_integrity.py: unique page titles, link-preview metadata, unique ids within a page, labelled form controls, header cells on every table,rel="noopener"on new-tab links.tools/check_external_links.pychecks external links at one request per host per second, HEAD first; it is a manual tool, not a CI gate, because its result depends on other servers.8. Docs.
CONTRIBUTING.mdandtests/README.mdgive the current page count (71, where they said 84 and 78) and describe the new script, test file and tool.Decisions to check
style.cssversion not bumped. BumpingSTYLE_VERSIONrewrites one line on all 71 pages and would conflict with any other open PR that does the same.vercel.jsonsets no long cache onstyle.css, so the three colour changes reach readers on the next revalidation.mainlinks left on/models/compare. They point atobr-macroeconomic-model/docs/monetary_conditioning.mdandus-frb-model/VALIDATION.md. Both files differ between the pin andmain. For the first, the page text draws on a section that exists only onmain("Why the result differs from the Bank of England's range"), so pinning it would point at a file without that section. For the second I did not check which version the page's figures follow, so I left it.integration/pyproject.tomlfor that reason.Follow-ups
Not verified
integration/tests/test_site_contract.pyagainst this branch's own source (PYTHONPATH=src): 13 passed.integration/src/policyengine_macro/core.pyline 590 still tells tool users thategfeis "~4.6% of GDP, so 0.01 is roughly 0.046% of GDP". That is backend text and is left for the adapter PR (Adapters: forward obr #90 labels, label the DEFINE parameter mismatch, deprecate recommend_model's horizon #289).Tests
python3 -m pytest tests -q: 3,679 passed, 87 skipped.site_nav.py,site_contract.pyand every generator--checkpass.🤖 Generated with Claude Code