Commit 4c0172a
Demote private Make/Mise targets and fix xterm dimensions TypeError (#15)
# TLDR;
Closes #13. Make and Mise targets prefixed with `_` are now sorted below
public targets, separated by a divider, and rendered with a muted
icon/label plus a "private" description marker. Also fixes an
intermittent xterm `dimensions` TypeError by waiting for the shell
process to spawn before `sendText`.
# Details
## What Was Added
- **`src/tree/PrivateTaskDecorationProvider.ts`** — new
`FileDecorationProvider` registered on the `commandtree-private` URI
scheme that paints private-task labels with `descriptionForeground`.
Exports `buildPrivateTaskUri(taskId)`.
- **`src/models/TaskItem.ts`** — `isPrivateTask`, `isPhonyTask` helpers,
an optional `isPhony` flag on `CommandItem`/`MutableCommandItem`, and
`resourceUri` support on `CommandTreeItem` (extracted into
`applyOptionalProps` to keep the constructor lean).
- **`src/discovery/make.ts`** — `.PHONY:` parser (`parsePhonyTargets`,
with line-continuation support) that tags targets with `isPhony: true`.
- **`src/tree/nodeFactory.ts`** — `createTaskNodes(tasks)` groups tasks
and injects a `createDividerNode` between the last public task and the
first private one. Private tasks get a muted `ThemeIcon`, a private
`resourceUri`, and a ` private` marker appended to their description.
- **`src/CommandTreeProvider.ts`** — comparators `comparePrivateTasks`,
`compareHelpTasks`, `comparePhonyTasks`, `compareMakeTaskPriority`
layered into all three sort modes (folder, type, name). Private tasks
sort last; `help` pins to the top of Make targets; phony targets come
before non-phony ones.
- **E2E tests** in `src/test/e2e/treeview.e2e.test.ts`:
- `Private Make And Mise Tasks` — writes fixture `Makefile` and
`mise.toml` with mixed public/private targets, asserts divider position,
ordering, `description` contains `private`, icon color
`descriptionForeground`, and `resourceUri.scheme ===
"commandtree-private"`.
- `Make Target Conventions` — asserts `help` is pinned first, phony
public targets outrank non-phony ones, and pattern rules (`%.o`) /
dot-prefixed special targets (`.DEFAULT`) stay hidden.
## What Was Changed
- **`src/runners/TaskRunner.ts`** — `SHELL_INTEGRATION_TIMEOUT_MS`
raised from 50 ms to 500 ms and the fallback path now awaits
`terminal.processId` before calling `sendText`, avoiding the xterm
`dimensions` TypeError when the viewport hasn't been laid out yet. Added
exhaustive `never`-typed `default` branch in `formatParamValue`.
- **`src/extension.ts`** — registers `PrivateTaskDecorationProvider` via
`vscode.window.registerFileDecorationProvider`; returns `undefined`
explicitly when there's no workspace root.
- **`src/discovery/docker.ts`** — destructuring cleanup in
`parseDockerComposeServices`.
- **`src/test/e2e/execution.e2e.test.ts`** — `runInCurrentTerminal`
tests now (a) write a marker file via the shell and assert the file
exists + contains the echoed text (proves the command actually ran, not
just that a terminal appeared), (b) watch VS Code's `renderer.log` and
assert no `dimensions`/`TypeError` lines are written during the command,
(c) assert the active terminal name and exit status. Timeouts bumped to
20 s to match the longer shell-integration wait.
- **Skill docs** (`.claude/skills/*/SKILL.md`),
`.github/workflows/ci.yml`, `Makefile`, `coverage-thresholds.json`,
`eslint.config.mjs`, `Agents.md`, `Claude.md`,
`.vscode/extensions.json`, `tools/check-coverage.mjs` — repo-standards
polish bundled in.
## What Was Deleted
Nothing of substance deleted from runtime code — some destructuring
simplifications and one `allowed-tools` line removed from `submit-pr`
SKILL frontmatter.
## How Tests Prove It Works
- `src/test/e2e/treeview.e2e.test.ts::Private Make And Mise Tasks::make
private targets sort after public ones and render muted` — asserts
folder children are `[alpha_public, zeta_public, ─────, _beta_private,
_omega_private]`, each private item has `description` containing
`private`, icon `ThemeColor.id === "descriptionForeground"`, and
`resourceUri.scheme === "commandtree-private"`.
- `...::mise private tasks sort after public ones and render muted` —
same assertions for `mise.toml`.
- `...::Make Target Conventions::make help is pinned to the top, phony
targets sort before non-phony ones, and special targets stay hidden` —
asserts folder children are `[help, build, aaa_file, ─────, _private]`
and `%.o` / `.DEFAULT` are absent.
- `src/test/e2e/execution.e2e.test.ts::runInCurrentTerminal creates
terminal when none exists` and `...reuses existing active terminal` —
assert the marker file is written and `renderer.log` contains zero
`dimensions`/`TypeError` lines during the run, proving `sendText` no
longer hits the xterm layout race.
## Spec/Doc Changes
- `.claude/skills/*/SKILL.md` updated to reference `make test`
(fail-fast + coverage threshold) and the repo's actual Make targets — no
behaviour spec changes.
## Breaking Changes
None. New data (`isPhony`, `resourceUri`, divider node,
`commandtree-private` URI scheme) is additive. Sort order changes are a
UX improvement within existing sort modes and do not alter any public
API.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
---------
Co-authored-by: abdushakoor12 <abdushakoor009@gmail.com>
Co-authored-by: Abdul Shakoor <60779242+abdushakoor12@users.noreply.github.com>1 parent b42ea8c commit 4c0172a
31 files changed
Lines changed: 1159 additions & 268 deletions
File tree
- .claude/skills
- ci-prep
- code-dedup
- spec-check
- submit-pr
- upgrade-packages
- .github/workflows
- .vscode
- src
- discovery
- models
- runners
- test
- e2e
- helpers
- unit
- tree
- tools
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | | - | |
| 45 | + | |
46 | 46 | | |
47 | | - | |
48 | | - | |
| 47 | + | |
| 48 | + | |
49 | 49 | | |
50 | | - | |
| 50 | + | |
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
63 | | - | |
| 63 | + | |
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
71 | | - | |
| 71 | + | |
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
| |||
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
100 | | - | |
| 100 | + | |
101 | 101 | | |
102 | 102 | | |
103 | 103 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
17 | | - | |
| 16 | + | |
| 17 | + | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
38 | | - | |
| 37 | + | |
| 38 | + | |
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | | - | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
47 | 50 | | |
48 | 51 | | |
49 | 52 | | |
| |||
54 | 57 | | |
55 | 58 | | |
56 | 59 | | |
57 | | - | |
| 60 | + | |
58 | 61 | | |
59 | 62 | | |
60 | 63 | | |
| |||
63 | 66 | | |
64 | 67 | | |
65 | 68 | | |
66 | | - | |
67 | | - | |
| 69 | + | |
| 70 | + | |
68 | 71 | | |
69 | 72 | | |
70 | 73 | | |
| |||
73 | 76 | | |
74 | 77 | | |
75 | 78 | | |
76 | | - | |
77 | | - | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
78 | 82 | | |
79 | 83 | | |
80 | 84 | | |
81 | 85 | | |
82 | | - | |
83 | | - | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
84 | 89 | | |
85 | 90 | | |
86 | 91 | | |
87 | | - | |
88 | | - | |
| 92 | + | |
| 93 | + | |
89 | 94 | | |
90 | 95 | | |
91 | 96 | | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
96 | 100 | | |
97 | 101 | | |
98 | 102 | | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
72 | 87 | | |
73 | 88 | | |
74 | 89 | | |
| |||
101 | 116 | | |
102 | 117 | | |
103 | 118 | | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
104 | 147 | | |
105 | 148 | | |
106 | 149 | | |
| |||
118 | 161 | | |
119 | 162 | | |
120 | 163 | | |
121 | | - | |
| 164 | + | |
| 165 | + | |
122 | 166 | | |
123 | 167 | | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
124 | 172 | | |
125 | 173 | | |
126 | 174 | | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
127 | 230 | | |
128 | 231 | | |
129 | 232 | | |
| |||
153 | 256 | | |
154 | 257 | | |
155 | 258 | | |
156 | | - | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
157 | 279 | | |
158 | 280 | | |
159 | 281 | | |
| |||
180 | 302 | | |
181 | 303 | | |
182 | 304 | | |
| 305 | + | |
| 306 | + | |
183 | 307 | | |
184 | 308 | | |
185 | 309 | | |
| |||
199 | 323 | | |
200 | 324 | | |
201 | 325 | | |
202 | | - | |
| 326 | + | |
203 | 327 | | |
204 | | - | |
205 | | - | |
| 328 | + | |
| 329 | + | |
0 commit comments