Skip to content

feat: action output params — forEach templates, nested groups, before[]#19

Merged
Lefix2 merged 9 commits into
mainfrom
feat/action-output-params
Jun 18, 2026
Merged

feat: action output params — forEach templates, nested groups, before[]#19
Lefix2 merged 9 commits into
mainfrom
feat/action-output-params

Conversation

@Lefix2

@Lefix2 Lefix2 commented Jun 18, 2026

Copy link
Copy Markdown
Owner

Summary

Builds on the action system with several config-driven features for the Actions tab.

  • forEach action templates — one templated action expands over a directory glob (or value list) into concrete per-match actions, killing per-directory duplication. A then ref to the template id fans out to all children.
  • Nested, colour-coded groups — actions carry groups: string[] (/-separated paths, multi-membership). The Actions tab builds a tree and renders groups as containers with a "Run all" (runs every descendant action).
  • Collapse by default — groups start collapsed as action-shaped cards (name + description); expanding makes a full-width container. Colour/description come from a groupStyles config map.
  • before[] — actions can run other actions before their own command (mirror of then).
  • Sidebar reports list scrolls past ~6 rows.

Test plan

  • npm run compile clean
  • npm test — 56 passing (incl. new actionExpand tests)
  • testdata/.vscode/codeclimate-visualiser.json exercises forEach, nested groups, groupStyles, before/then

🤖 Generated with Claude Code

TREFOU Felix and others added 9 commits June 17, 2026 16:35
…d actions

- ActionManager streams shell stdout/stderr to the CodeClimate Visualiser output
  channel and logs start/success/error per action.
- Main webview always renders the dashboard (zeros when no report loaded) instead
  of the empty-state placeholder.
- Chained actions can forward parameters: `then` items accept { id, args }; args
  are passed to vsCodeCommand or substituted as $1/$2/${1} in shell commands.
- Update schema and testdata config with a param-forwarding example.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- Add "type":"commonjs" and drop the --disable-warning node flag from the test
  script (broke on node 18); silences MODULE_TYPELESS_PACKAGE_JSON at the source.
- Bump mocha 10→11; keep typescript 5.9.x (6.x breaks module resolution) and
  @types/node 20 (matches the VS Code 1.85 node-18 runtime).
- Override diff@^9 and serialize-javascript@^7 to clear transitive mocha vulns.
- Scope the undici@5 pin to @vscode/vsce only (node-18 packaging needs it);
  other consumers get patched undici. Audit: 6 → 2 (vsce dev-only).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
`npm run package` now stamps the version as <last-tag>[-g<hash>][-dirty]:
on a clean tag → 1.4.0, off-tag → 1.4.0-gabc1234, dirty tree → …-dirty.
scripts/package.js sets package.json version, runs vsce package, then restores
the original version.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
An action that triggers others via `then` now stays in a new 'waiting' state
until every chained (and nested) action finishes, instead of flipping straight
to success. The run button is disabled and spins while waiting; re-triggering a
running/waiting action is blocked (also breaks accidental chain cycles).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Cap #sources-list height at 132px with overflow scroll so a long
report list no longer pushes the rest of the sidebar off-screen.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Add a `forEach` field on action definitions to eliminate per-directory
action duplication. A template with `forEach: { dirs, as }` (glob of
directories) or `forEach: { values, as }` expands at config load into one
concrete action per match, substituting ${as} in every string field and
generating ids `${id}-${name}`. A `then` reference to a template id fans
out to all generated children, so one entry runs them all.

Expansion lives in src/actionExpand.ts (pure, takes a dir resolver);
extension.ts supplies a filesystem dir-glob resolver and expands actions
before both setActions callsites.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Actions now carry `groups: string[]` instead of a single group. Each entry
is a `/`-separated path, so groups nest (e.g. "Analyse/History"), and an
action can belong to several groups at once. A group exists only if some
action names it; names are globally unique.

The Actions tab builds a tree from these paths and renders each group as a
colour-coded, expandable container card holding its sub-groups and member
actions. Each card has a "Run all" button that runs every descendant action
(deduped) sequentially. Colours come from a new `groupColors` config map
(name -> colour), with a default for unlisted groups; collapse state and
colour inheritance to sub-groups are preserved across re-renders.

forEach children default their `groups` to [templateId], so a directory
template still clusters into one runnable group.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Groups now start collapsed. A collapsed group renders as an action-sized
card (name, count, run-all, plus a description) sitting in the grid next to
ordinary action cards; clicking it expands the group into the full-width
container that holds its sub-groups and member actions.

Group presentation moves from a colour-only `groupColors` map to a richer
`groupStyles` map keyed by group name, holding an optional `color` and
`description` (shown on the collapsed card). Expand/collapse state is
tracked per group path and persists across re-renders.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Add a `before` array on action definitions, mirroring `then`: its referenced
actions run sequentially before the action's own command (`then` still runs
after). Items are an action id or { id, args } to forward parameters, and the
existing re-entry guard prevents cycles.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@Lefix2 Lefix2 merged commit bd5b6be into main Jun 18, 2026
1 check passed
@Lefix2 Lefix2 deleted the feat/action-output-params branch June 18, 2026 14:35
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 1.5.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant