Repo checker: a result with only unknown or unchecked packages shows "Fix it" and copies a fix prompt that lists nothing

未关闭 适合新手
#253 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
78/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
领域
frontend

调研方向

从 site/check/check.mjs 中的 renderNext() 开始,其中当 h.unknown > 0 时 isClean 变为 false;再看 site/check/check-logic.mjs 中的 fixPrompt(),其中没有缺口的行会落入 unchecked。在 check-logic.mjs 中新增一个导出的 nextSection(h, notChecked),返回标题以及是否显示提示词,然后在 renderNext() 中使用它。完成标准是:仅有 unknown 和仅有 not-checked 的情况都显示 "Check it locally" 且隐藏 copy-prompt,既有缺口又有 unknown 的情况仍显示 "Fix it",并且 node --test tests/site/check-logic.test.mjs tests/site/check-page.test.mjs 在离线状态下通过。

由索引模型根据 Issue 内容生成。

描述

bug good first issue

When the only problem in a result is packages that couldn't be checked (unknown, no gaps), the repo checker still shows the Fix it section with "Copy a fix prompt for your coding agent". The prompt it copies says gaps were found and then lists none:

Read from site/check/ on main, and fixPrompt() run in Node for a result with one unknown row and no gaps:

In o/r, wheelgap found dependencies in uv.lock with no prebuilt wheel for some of the platforms we target (Python 3.13 on linux-x86_64), so they'd be compiled from source or fail to install.

Check each bump against our version constraints (a new major version may need code changes), update the lockfile with the project's own tool, and confirm with:
  uvx wheelgap uv.lock -p 3.13 -t linux-x86_64
...

There is nothing to bump. The same happens for a result with no gaps where a private index's packages weren't checked (the page test pins "Fix it" for both cases today). The headline for the unknown-only result is right ("No package is missing a wheel, but 1 of 3 couldn't be checked …"); what's left to do is run the check locally, where it can see what the page couldn't.

Where

  • renderNext() in site/check/check.mjs: isClean is false when h.unknown > 0, so the title is "Fix it" and copy-prompt / prompt-note stay visible.
  • fixPrompt() in site/check/check-logic.mjs: rows with no gaps are skipped (fixFor() returns unchecked), so an unknown-only result gives the opening sentence and no list.

What to do

  • Add a small exported function in check-logic.mjs, e.g. nextSection(h, notChecked), that returns the title and whether to show the prompt: "Keep it green" (clean, as now), "Fix it" with the prompt (any gap, as now), and "Check it locally" without the prompt when there are no gaps but some unknowns or some packages not checked. Use it in renderNext().
  • The CLI command under it stays as it is (with --index-url YOUR_INDEX_URL when packages weren't checked).

Done when

  • Tests in tests/site/check-logic.test.mjs for the three cases, including gaps and unknowns together ("Fix it"). The unknown-only one fails on main (or, if you add the function, show in the PR that renderNext() gave "Fix it" for it before).
  • In tests/site/check-page.test.mjs, the withUnknowns and withPrivate cases (they assert "Fix it" today) now expect "Check it locally" with copy-prompt hidden; withGaps is unchanged.
  • node --test tests/site/check-logic.test.mjs tests/site/check-page.test.mjs passes. The tests need no network.
主要语言
JavaScript
星标
0
派生
0
平均合并
1 小时 37 分钟
30 天内合并 PR
134

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

wheelgap/tracker 的其他 Issue

查看 wheelgap/tracker 的全部 Issue

相似的 Issue

更多 JavaScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。