scripts: path comparisons break on Windows (check-greys fails the pre-push hook, upgrade-opentui skips nothing)
Maintainer thường phản hồi trong vòng 1 ngày
@deosiree đang làm issue này rồi.
Từ ngày 24/11/2026.
Đá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
- 76/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ệ
- typescript
- Lĩnh vực
- developer-experience
Hướng nghiên cứu
Bắt đầu từ script/check-greys.ts tại lệnh gọi EXCEPTIONS.find gần dòng 74, và từ script/upgrade-opentui.ts tại bộ lọc file.split("/") gần dòng 41-43. Cả hai đều so sánh đường dẫn từ Bun.Glob, vốn dùng ký tự phân cách của nền tảng, với các chuỗi được viết bằng /. Cách sửa là chuẩn hóa ký tự phân cách trước khi so khớp, như script/oxlint/anti-slop/effect/rules/no-service-constructor-imports.ts:31 đã làm. Hoàn thành khi bun script/check-greys.ts kết thúc với mã thoát 0 trên Windows, với cùng các ngoại lệ như trên Linux, và script nâng cấp bỏ qua node_modules và dist ở đó.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Description
Two repository scripts compare paths from Bun.Glob against strings written with /. The glob returns the platform separator, so on Windows neither comparison works. The repo already normalises for this in one place (script/oxlint/anti-slop/effect/rules/no-service-constructor-imports.ts:31), so the convention exists and these two missed it.
script/check-greys.ts — fails the pre-push hook on Windows
EXCEPTIONS are written with / (/style\/token\/color\.css$/, /component\/video-editor\//, …) and matched with EXCEPTIONS.find(([re]) => re.test(file)) (:74). On Windows every scanned path is services\site\src\…, so no exception matches and the checker reports greys from the files the list exists to excuse — legacy tokens, the video editor, the font film, print.
Because bun run check is the pre-push hook, every Windows contributor is blocked until they push with --no-verify, which weakens the hook for everyone.
$ bun script/check-greys.ts
services\site\src\style\token\color.css:7 #f5f5f7 not on the scale
…
172 greys off the shared scale (script/check-greys.ts). # exit 1
script/upgrade-opentui.ts — the skip list silently does nothing
const skip = new Set([".git", ".opencode", ".turbo", "dist", "node_modules"])
…
(file) => !file.split("/").some((part) => skip.has(part))
On Windows file.split("/") yields one part (node_modules\foo\package.json), so skip never matches and the script would rewrite the version field of every package.json under node_modules and dist.
Environment
- opencode
devatb0cda20 - Windows 10 22H2, Bun 1.4.5, PowerShell 5.1
Steps to reproduce
- Clone on Windows without Developer Mode.
bun script/check-greys.ts→ 172 problems, exit 1. On Linux the same command exits 0.- Read
script/upgrade-opentui.ts:41-43: the filter keepsnode_modulesanddistentries on Windows.
Expected behavior
Both scripts match on a separator-normalised path, so the same files are exempted and the same directories are skipped on every platform.
Additional context
Fixes are ready on two branches (check-greys one expression; upgrade-opentui one expression). Verified on Windows: bun script/check-greys.ts exit 1 → 0, bun run lint exit 0, and bun run check 36/36 tasks exit 0 once the checkout's 29 symlinks are materialised (they land as text files without Developer Mode, which is a separate, environment-only obstacle).
- Ngôn ngữ chính
- TypeScript
- Star
- 228k
- Fork
- 31k
- Merge trung bình
- 5 giờ 19 phút
- Pull request đã merge (30 ngày)
- 457
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của anomalyco/opencode
-
tui: Mermaid renderer displays <b>/<strong> tags literally and ignores \n line breaksCó thể đã có người làm @argszero đã nhận hôm nay. Đang mởarea/tui platform/wsl status/repro-simulated type/bug version/v2
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
anomalyco/opencode#66773 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area/sdk-api platform/linux type/feature version/v2
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
anomalyco/opencode#66604 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area/tui platform/linux type/feature version/v2
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
anomalyco/opencode#66585 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
console: Go vs Go Plus comparison bars on /console/go understate 4x limits due to log scalingĐang mởarea/web inference/go reproduced type/bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
anomalyco/opencode#66475 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[FEATURE]: More colorful built-in Dracula theme for the desktop appCó thể làm lại được Pull request cho issue này đã bị đóng mà không được merge. Đang mởarea/desktop type/feature version/v2
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
anomalyco/opencode#66446 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của anomalyco/opencode
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 67/100
knaw-huc/textannoviz#742 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
cloudflare/realtimekit-ui#219 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
ui
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
mermaid-js/mermaid-v13#1370 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area:docs area:plugins bug documentation low-priority platform:windows
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 84/100
anthropics/claude-code#112676 ·