Skip to content

feat(site): show published gap wheels in the home lookup - #140

Merged
patrickballard merged 8 commits into
wheelgap:mainfrom
AdityaSreevatsaK:feat/129-lookup-gap-wheels
Nov 17, 2026
Merged

patrickballard merged 8 commits into
wheelgap:mainfrom
AdityaSreevatsaK:feat/129-lookup-gap-wheels

Conversation

@AdityaSreevatsaK

Copy link
Copy Markdown
Contributor

Closes #129

What this changes

  • Add a panel near the home-page lookup explaining the independently published gap wheels and linking to their website.
  • Read the published gap-wheel index and show installation instructions when a wheel matches the canonical package name, exact scanned version and target.
  • Only show hints for existing source or missing gaps, without changing PyPI coverage results.
  • Handle unavailable or malformed index data without breaking the lookup.

Tests

  • Added Node regression tests for name normalisation, version and target matching, invalid metadata and missing data.
  • [Successful CI run]

AdityaSreevatsaK and others added 8 commits November 17, 2026 13:43
- Same words as the package pages' Gap wheels section: an unofficial wheel
  built from the PyPI sdist, not from the maintainers, installed by its
  canonical name, with an "About the gap wheels" link. The section follows
  the bundled note, as on the package pages.
- The home panel says "unofficial" and only claims what the wheels README
  does: Windows on ARM with Python 3.14 and 3.14t so far.
- The re-render after the list arrives uses the bundled details cached by
  then, not the call's stale `extra`, and can't leave a rejection unhandled.
- Muted style on the cell note, like the bundled detail.
- Comment on the relative ../wheels/ path; tests for a body that isn't JSON
  and a failed request, and for the new wording.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Both the install section and the gap wheel section; the gap re-render reads wheelgap#141's lookupDetails. Also from wheelgap#141's
review: a lookup that finds a fetch in flight still re-renders when it lands, and no duplicate id when the card
shows twice.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@patrickballard
patrickballard merged commit 198ea88 into wheelgap:main Nov 17, 2026
1 check passed
@patrickballard

Copy link
Copy Markdown
Contributor

Merged, thanks @AdityaSreevatsaK! Before merging I pushed two commits:

  • the wording now matches the package pages (unofficial, built from the PyPI sdist, not from the maintainers, with the canonical name in the pip line);
  • the home panel says "unofficial" in visible text and names only the targets we actually publish;
  • a failed or malformed list never touches the lookup, with tests for both;
  • I merged feat(site): show whole-tree install results in home lookup #141 in, so the card shows the install section and then the gap wheels.

Thanks for all four of today's PRs!

(Reply assisted by Claude.)

@patrickballard

Copy link
Copy Markdown
Contributor

Thanks @AdityaSreevatsaK, this is careful work: the matching is strict (canonical name, exact version, exact target, only on a real source/missing gap), every value is escaped, the fetch stays same-origin under the existing CSP, and switching the install section to aria-label avoids a duplicate id when the card shows in the lookup and the drawer at once.

We tried to push a few small changes to your branch, but GitHub refused the push, so here they are so it can go in:

  1. Keep the existing details-fetch guard. In renderLookup, put !pendingDetails.has(q) back in the fetchLookupDetails condition. Without it, every re-render while the details are loading (including the new gap-wheel re-render) queues another re-render of the aria-live card, so screen readers can announce it several times.
  2. Retry after a failed list. If the gap-wheel fetch fails or the body is unusable, set gapWheelPromise = null so the next lookup tries again (the package-details fetch already works this way).
  3. Drawer consistency. The drawer uses the same card, but only shows the gap-wheel section if a lookup happened to load the list first. Move the fetch into a small loadGapWheels() helper, call it from openDrawer too when the package has a gap, and when the list arrives re-render the open drawer as well as the lookup.
  4. Tests that pin the behaviour. The ==0.0.1 case is stopped by the pin note before version matching runs, and /from source|can't install/ matches any cell. Add an unpinned lookup where the list has only another version of the scanned release (no section expected), and assert that the "Unofficial gap wheel available below" note sits in a cell whose badge is still s-source or s-missing.
Prompt for your AI assistant (if you use one)
In wheelgap/tracker PR #140 (site/app.js, tests/site/app.test.js):
1. In renderLookup, restore `!pendingDetails.has(q)` in the condition before fetchLookupDetails(q).
2. Replace the inline gap-wheel fetch with a helper `loadGapWheels()` that returns early if gapWheelPromise is set,
   otherwise fetches "../wheels/data/gap-wheels.json"; on null/failed data set gapWheelPromise = null (so it retries)
   and stop; on success set gapWheelDoc, re-render the lookup (renderLookup($("search").value.trim()) if the lookup
   has content) and, if the drawer is open, re-render $("drawer-content") for the package named in $("drawer-title")
   with its lookupDetails. Add `hasGapWheelGap(p)` (no error and some result is "source" or "missing").
   Call loadGapWheels() from renderLookup (when !pinNote, isPackageSpec(spec) and hasGapWheelGap(p)) and from
   openDrawer (when hasGapWheelGap(p)).
3. In the first #129 app test, replace the /from source|can't install/ assertion with one checking that the
   "Unofficial gap wheel available below" note is in a <td> whose badge is s-source or s-missing, and add an
   unpinned lookup whose gap-wheel list only has another version of the scanned release, asserting no
   "Gap wheels" section appears.

Once that's in, the next review run will take another look and merge it if everything's clean.

(Review assisted by Claude.)

@AdityaSreevatsaK
AdityaSreevatsaK deleted the feat/129-lookup-gap-wheels branch November 18, 2026 16:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Home page: point people at the gap wheels from the lookup

2 participants