Repository navigation
feat(check): offer README badge in clean verdict and add plain-text share button - #225
Conversation
Pythons the lockfile leaves out aren't counted, so the clean line must not claim a wheel for them. Building the lists from the result's own targets also keeps a pending check's new selection out of the old result's line. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Thanks, @dev-burnern! This is a nice, careful piece of work: the badge block is reset on every path that hides the result, and the We've made this change so it can go in:
There's one open question, so Patrick will take a final look before merging. When some packages weren't checked (a private index, or (Review assisted by Claude.) |
The copied line travels without the page's alerts. With packages left off pypi.org as a private index's, it read "✓ all N dependencies have a wheel" although those weren't checked. It now says how many weren't checked and drops the ✓; a result with none reads as before. Co-Authored-By: Claude Opus 5.5 <[email protected]>
… went unchecked With packages left off pypi.org as a private index's, a result with no gaps and nothing unknown still offered "Keep it that way: add the check to your README" and the "Keep it green" heading, as if those packages had passed. Both now need r.private to be empty too. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Resolved as the second review set out. renderVerdict() sets isClean, toggles the card, hides the README badge offer unless the result is clean with no private-index packages, then uses wheelgap#223's verdict ternary (private pyproject, every Python left out, verdictText). renderNext() keeps wheelgap#225's Keep it green condition (r.private empty) with main's badge default from wheelgap#226/wheelgap#229 untouched. The copy-share handler, with the private count that drops the ✓, sits beside main's copy-prompt handler, which passes state.lab (wheelgap#231). Imports are the union, with shareText. Tests: both sides kept; wheelgap#225's renderVerdict/renderNext harness given autoPick and privatePyprojectReason. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Merged, thanks @dev-burnern! That is everything of yours on the tracker except #233, which goes in next, on top of a privacy fix to the same code (#235). We pushed a few fixes to the branches before merging; the commits say what and why. If you would like another: wheelgap/wheels#47 is a small one (tests for the check that a recipe linked its library statically), and nobody has it yet. (Posted with help from Claude.) |
Brings in #231 and #225. The import lists conflicted; #225's badge test now passes privateText to renderVerdict, which calls it. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Closes #207
What this changes
site/check/index.html&site/check/check.css:#verdict-badgeblock inside<section class="verdict-card">(hidden by default) with the line"Keep it that way: add the check to your README", the staticbadge.svgimage, and a"Copy badge Markdown"button (#copy-verdict-badge)."Copy result as text"button (#copy-share) next to"Copy link to this result", and keeps the existing#badgesection in<section class="cta">intact.site/check/check-logic.mjs:shareText(repoName, headline, pythons, platforms, url)to build a single-line plain-text summary (never HTML) ending with the share link, handling clean results (with✓), gaps, unknowns (no✓), single targets, empty checks, and verbatim special characters in repo names.site/check/check.mjs:#verdict-badgeinrenderVerdict()only when the result is clean (gaps === 0,unknown === 0,targets > 0,packages > 0), and hides it inhideResultSections(true).#next-title) from"Fix it"to"Keep it green"and hides the fix-prompt button (#copy-prompt) and its note (#prompt-note).#copy-verdict-badgeand#copy-sharethroughcopy()like the existing buttons (both are native<button type="button" class="action">elements, so keyboard activation and focus styles work out of the box).tests/site/check-logic.test.mjs&tests/site/check-page.test.mjs:shareText()across clean, gaps, unknowns (verifying no✓), single target/platform, empty check, and HTML special characters in repo names.#verdict-badgeis shown in the verdict card for clean results and hidden for gaps, unknowns, or 0 packages, that#next-titleswitches to"Keep it green"and hides the fix prompt on clean results, and that both new copy buttons usecopy().Screenshots
(Attach the 4 captured screenshots from local scratch when submitting or via GitHub drag-and-drop:
tracker-207-clean-light.png,tracker-207-clean-dark.png,tracker-207-gaps-light.png,tracker-207-gaps-dark.png.)AI tools used (if any): Antigravity (Gemini)
Checklist
node --checkpasses on all site scriptsnode --test tests/site/*.test.*passes (149/149)