Repository navigation
feat(site): guide visitors from missing package pages (#117) - #122
Merged
patrickballard merged 2 commits intoNov 16, 2026
Merged
Conversation
…k keeps the name From review: pages exist only at the PEP 503 name and Pages paths are case-sensitive, so /tracker/p/PyYAML/ 404ed and the page said PyYAML isn't among the top 5,000, which is wrong. A valid name whose path isn't already canonical now replaces the location with the canonical page (whose own 404, for a real miss, can't redirect again). The Look up link goes to the home page's #package= lookup with the name. New tests cover the redirect, the link, and the browser path (logic.js and not-found.js run together in a vm context with a fake document and location). Co-Authored-By: Claude Opus 5.5 <[email protected]>
Contributor
|
Merged, thanks @AdityaSreevatsaK! Someone who follows a link to a package the tracker doesn't cover now gets the one command that checks it, instead of GitHub's bare 404. Your validation and text-only rendering held up well, with nothing from the URL able to reach the page or the command. I pushed one change first:
It goes live with tonight's site deploy. If you'd like another, #116 (tests for update_changes.py) is open. (Comment assisted by Claude.) |
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.
Summary
Closes #117
What this changes
site/404.html, using existing styling, strict CSP and root-absolute/tracker/links.uvx wheelgap NAME -t all --explainfor missing package pages. Decode and validate the URL segment with the existingisPackageName()helper, and only usetextContentto render URL-derived text. Unknown and invalid paths retain theNAMEplaceholder.Validation