Group Make targets (and other command types) with a consistent visual language
還沒有人認領這個 Issue。
評估
- 難度
- 5/5
- 預估耗時
- 一週以上
- 新手友好度
- 38/100
- Issue 類型
- 功能
- 描述清晰度
- 基本清楚
- 活躍度
- 冷清
- 技術堆疊
- typescript
研究方向
Start with src/CommandTreeProvider.ts and its buildRootCategories() entry point, then inspect the providers under src/discovery/. Review src/discovery/make.ts for the variable-filtering requirement and trace how each provider currently builds its command list. Done means a shared TaskGroup classifier and consistent grouping across the listed providers, with the specified Make, VS Code, Mise, and end-to-end fixture behavior.
由索引模型根據 Issue 內容生成。
描述
Problem
The tree currently shows a flat list of Make targets under Make Targets (13) — help, build, ci, clean, fmt, lint, package, setup, test, test-exclude-ci, plus variables like COVERAGE_THRESHOLDS_FILE and UNAME that leaked in as pseudo-targets. This doesn't scale: real Makefiles routinely have dozens of targets and users can't find what they need.
The same problem exists across every command-type we support (Mise tasks, VS Code tasks, npm scripts, Just recipes, etc.). Each provider currently shows a flat list, and there is no shared visual language for grouping.
Goal
A consistent grouping visual language across all command types — Make, Mise, VS Code tasks, npm, Just, Cargo, Gradle, Rake, Taskfile, etc. — so that a user who learns the grouping for one provider immediately understands the others.
GNU convention (source of truth for Make)
Per GNU Makefile Conventions — Standard Targets for Users, standard target names fall into natural groups:
| Group | Standard targets |
|---|---|
| Build | all (default) |
| Install | install, install-html, install-pdf, install-ps, install-strip, installdirs, installcheck, uninstall |
| Clean | clean, mostlyclean, distclean, maintainer-clean |
| Test | check |
| Docs | info, html, pdf, ps, TAGS |
| Dist | dist |
These are the canonical groups a user expects. Our grouping must at minimum recognise these.
Proposed groups (cross-provider)
A single taxonomy used by every discovery provider:
- Build — compile/package (Make
all/build, npmbuild, Cargobuild, VS Codebuildgroup, Misebuild:*) - Test — Make
check/test, npmtest,pytest, Cargotest, VS Codetestgroup - Lint / Format —
lint,fmt,format,check-format - Run / Dev —
start,dev,serve,watch, launch configs - Clean —
clean,distclean,mostlyclean,maintainer-clean - Install / Deps —
install,setup,bootstrap,uninstall,install-* - Release / Dist —
dist,package,release,publish - CI —
ci,ci-* - Docs —
docs,html,pdf,info,ps - Other — anything unmatched
Classification strategy
- Name-prefix / name-suffix rules —
test-*,*-test,docker-*,db-*group by prefix. - Known-target dictionary — exact matches to GNU standard names and common ecosystem names (npm's
start/test/build; Cargo'sbuild/test/check/doc; Misebuild:*/test:*). - Provider-native metadata where available:
- VS Code tasks:
groupfield (build,test) — see tasks.json reference. - npm: lifecycle scripts (
pre*/post*) are grouped under their parent. - Mise:
:namespace (build:web,build:api) — group by the prefix before:. - Just: doc comments above recipes.
- Make: parse
## group: <name>or## commentannotations when present (popularmake helpconvention).
- VS Code tasks:
- Fallback: ungrouped targets go to Other.
Visual language
- Each group shown as a collapsible tree node with a consistent icon + label across providers.
- e.g. "Build" always uses the same icon whether it comes from Make, npm, or VS Code tasks.
- Group order is fixed across providers (Build → Test → Lint → Run → Clean → Install → Release → CI → Docs → Other).
- Groups with zero matches are hidden.
- Single-item groups still render (consistency beats compactness).
- A setting
commandtree.groupingwith valuesauto(default) /flat/customlets users opt out.
Out of scope (follow-ups)
- User-configurable custom groups via
commandtree.json. - Per-workspace overrides of the default classification dictionary.
- Drag-to-regroup in the tree.
Acceptance
- Shared
TaskGroupenum + classifier module used by every discovery provider - GNU standard Make target names classify correctly (see table above)
- VS Code tasks honour their native
groupfield - Mise
:namespaces become groups - Variables like
COVERAGE_THRESHOLDS_FILEandUNAMEno longer appear as Make "targets" (separate filtering fix in src/discovery/make.ts) - E2E test asserts that, given a fixture Makefile with
all,clean,distclean,check,install, they land in Build / Clean / Clean / Test / Install respectively - E2E test asserts grouping is identical in structure for a fixture
package.json,Justfile, andmise.tomlwith equivalent tasks
References
- GNU Makefile Conventions
- GNU Standard Targets for Users
- VS Code task groups
- src/CommandTreeProvider.ts —
buildRootCategories() - src/discovery/ — 20+ providers that all need the shared classifier
- 主要語言
- TypeScript
- 星號
- 3
- 分支
- 2
- PR 合併指標
- 30 天內沒有已合併 PR
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
Nimblesite/CommandTree 的其他 Issue
-
enhancement priority: critical security
難度 5/5 一週以上 新手友好度 35/100
Nimblesite/CommandTree#24 ·
查看 Nimblesite/CommandTree 的全部 Issue
相似的 Issue
-
streams:add
難度 1/5 1 小時以內 新手友好度 62/100
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 78/100
walletbeat/walletbeat#1558 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 82/100
hawk-digital-environments/HAWKI#438 ·
維護者通常 1 天內回覆
-
Bug
難度 2/5 1-3 小時 新手友好度 72/100
GiganticMinecraft/seichi-portal-frontend#1165 ·
維護者通常 1 天內回覆
-
難度 1/5 1-3 小時 新手友好度 84/100
維護者通常 1 天內回覆