Repository navigation
Versioned CSS and JS URLs; the fixes boards fit at 1280px - #294
Merged
Merged
Conversation
GitHub Pages lets browsers reuse a file for 10 minutes, so after a deploy a returning visitor could get the new HTML with the old brand.css (the new popover menu then showed as a full-screen box on phones). Every page now links the site's own CSS and JS as name?v=<first 10 hex of its sha256>: - scripts/assets.py: url() and stylesheets() for the generators, which now all write their <link> tags through build_campaigns.stylesheets(); and `python3 scripts/assets.py _site`, which the deploy runs right after copying site/, stamping the hand-written index.html, 404.html and check/ pages and the checker's module imports (check-logic.mjs, worker.mjs, driver.py), dependencies first. - tests/test_assets.py: the stamped hashes match the files, stamping is idempotent, a module change reaches the page, no generator writes an unversioned link, and the deploy runs it. Windows on ARM and free-threaded boards: at 1280px the columns needed about 1060px in an 888px column, so "The change" was cut off. Long paths in the change's text can now break, the proof column has no minimum, the change column's is 16em, and an open diff scrolls inside its own box. Phones keep the old widths (the table scrolls sideways there anyway). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Nov 29, 2026
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.
Two fixes.
Stale CSS after a deploy
GitHub Pages lets a browser reuse a file for 10 minutes. After today's deploy a returning visitor got the new HTML with the old
brand.css, and the new<nav popover>showed as a full-screen box on a phone, because the old.wg-nav { display: flex }beat the browser's hiding of a closed popover.Every page now links the site's own CSS and JS as
name?v=<first 10 hex of its sha256>, so a changed file has a URL no browser has cached:build_campaigns.stylesheets(root)(scripts/assets.py), which hashessite/brand.cssandsite/style.cssas it writes the page.site/stays plain in the repo. The deploy runspython3 scripts/assets.py _siteright after copyingsite/, which stampsindex.html,404.html(its/tracker/URLs) andcheck/index.html, plus the checker's module URLs (check-logic.mjs,worker.mjsand the worker'sdriver.py). It stamps dependencies first, so a change tocheck-logic.mjsalso givesworker.mjs,check.mjsand the page new URLs. The README's local build has the same step.tests/test_assets.py) check that every stamped hash matches its file, that stamping twice changes nothing, that a module change reaches the page, that a link to a missing file stops the build, that no generator writes an unversionedhref="….css", and that the deploy runs the stamp straight after the copy.I looked at making
brand.cssitself harmless when old CSS meets new HTML. It isn't simple: the bar shows the closed popover as a row on purpose, so the rule that overrides the browser's hiding has to stay, and nothing in a new stylesheet can fix an old cached one. The other way round (old HTML with new CSS) is already fine, because the popover rules only match[popover]. With versioned URLs the two can't be mismatched any more.Windows on ARM and free-threaded boards at 1280px
The columns' minimum widths added up to about 1060px in the 888px column, so "The change" was cut off. Unbreakable paths in the change's text (
.github/workflows/pypi-build-artifacts.yml) were what kept that column at 312px. Now:overflow-wrap: anywhere(only long paths actually break at that width) and a 16em minimum;At 1280px both boards are now exactly 888px, with every
<details>closed or open. On phones (below 720px) the old widths still apply, so rows aren't taller there; the table scrolls sideways inside its box as before.Checked
pytest(776 passed) and the node tests (267 passed)._sitefrom the committed data: all 5,024 pages link?v=URLs, and none link an unversioned one. The home page, 404 page and checker load every versioned asset (200), and the checker ran a full check of pallets/flask..fixestable moved.🤖 Generated with Claude Code