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

Đang mở Phù hợp với người mới
#253 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
78/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
javascript, node.js
Lĩnh vực
frontend

Hướng nghiên cứu

Bắt đầu từ renderNext() trong site/check/check.mjs, nơi isClean chuyển thành false khi h.unknown > 0, và từ fixPrompt() trong site/check/check-logic.mjs, nơi các hàng không có khoảng trống rơi xuống unchecked. Thêm trong check-logic.mjs một nextSection(h, notChecked) được export, trả về tiêu đề và cho biết có hiển thị prompt hay không, rồi dùng nó trong renderNext(). Hoàn thành khi các trường hợp chỉ có unknown và chỉ có not-checked hiển thị "Check it locally" với copy-prompt bị ẩn, trường hợp có khoảng trống cộng unknown vẫn hiển thị "Fix it", và node --test tests/site/check-logic.test.mjs tests/site/check-page.test.mjs chạy thành công khi offline.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.
Ngôn ngữ chính
JavaScript
Star
0
Fork
0
Merge trung bình
1 giờ 37 phút
Pull request đã merge (30 ngày)
134

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của wheelgap/tracker

Tất cả issue của wheelgap/tracker

Issue tương tự

Thêm issue về JavaScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.