Skip to content

Skills diagnostics, global master toggle, and ID-matching fix (step 5) - #146

Merged
yikkuro merged 5 commits into
sunt-microsoft-feat-dev-skills-panelfrom
sunt-microsoft-feat-skills-diagnostics-global-toggle
Jul 30, 2026
Merged

Skills diagnostics, global master toggle, and ID-matching fix (step 5)#146
yikkuro merged 5 commits into
sunt-microsoft-feat-dev-skills-panelfrom
sunt-microsoft-feat-skills-diagnostics-global-toggle

Conversation

@yikkuro

@yikkuro yikkuro commented Jul 30, 2026

Copy link
Copy Markdown
Collaborator

Summary

Step 5 of the stacked dev Skills feature. Depends on #144 — base branch is sunt-microsoft-feat-dev-skills-panel.

1. Fix agent-skill ID matching bug

OpenClaw filters config.agents.list[*].skills against each skill's frontmatter name, not its directory slug. Five catalog slugs have a display name that differs from the slug and were being silently excluded. Introduces SKILL_MATCH_NAMES + resolveSkillFilterNames() as the single source of truth, and writes resolved match-names to openclaw.json at both persona seeding and the skills:set-agent-skills handler. The renderer UI, IPC input, and validation stay slug-based; slug→name resolution happens only at write time. Round-trip reads recognize both slug- and name-form stored values via matchesSkill(). canvas is documented as resolving to no installed skill (kept in ALL_SKILL_IDS for sync).

2. Dev UI — per-skill requirement/gating status

New skills:get-status IPC spawns the same node + openclaw entry the gateway uses and runs skills list/check --agent <id> --json (CLI reads config from disk; gateway need not be up), strips the config banner, and merges into normalized per-skill records. SkillsDevPanel.vue shows a status badge, a reason when not model-visible (global allowlist / agent allowlist / disabled / missing requirements + specific bins/env/config/os), a Model-visible: X / N summary, and a Refresh button.

3. Dev UI — global master on/off toggle per skill

New skills:set-global-enabled IPC manages both gating layers: skills.entries[key].enabled and (for bundled skills) skills.allowBundled. Mirrors skills:set-agent-skills robustness — validates against discovered skills, atomic config write, single managed-gateway restart with rollback. Panel adds a per-row Global switch distinct from the per-agent This agent toggle and re-fetches status after a successful toggle. i18n added to both en-US and zh-CN.

SKILL_MATCH_NAMES

slug OpenClaw name
desktop-organizer Desktop Organizer
excel-xlsx Excel / XLSX
powerpoint-pptx Powerpoint / PPTX
security-practice Security Practice
word-docx Word / DOCX

Validation

  • main vitest: 685 passed · renderer vitest: 198 passed
  • tsc --noEmit ✓ · vue-tsc --noEmit ✓ · vite build
  • Confirmed import.meta.env.DEV folds to false in the release bundle (dev button + panel gated out of the DOM)
  • eslint clean on changed files (pre-existing main.ts preserve-caught-error left untouched)

Fix per-agent skill binding: OpenClaw filters agents.list[*].skills against each
skill's frontmatter name, not its slug. Add SKILL_MATCH_NAMES + resolveSkillFilterNames
and write resolved match-names to openclaw.json (seeding + set-agent-skills), while
keeping the UI/IPC input slug-based. Round-trip reads recognize both slug- and
name-form stored values via matchesSkill.

Add dev-only diagnostics: skills:get-status IPC runs the OpenClaw CLI directly
(skills list/check --json) to surface each skill's gating status and missing
requirements, rendered as badges + reasons in SkillsDevPanel with a Model-visible
summary and Refresh.

Add a per-skill global master toggle: skills:set-global-enabled IPC manages both
skills.entries[key].enabled and skills.allowBundled (bundled only), mirroring the
set-agent-skills atomic-write + single managed-gateway restart with rollback.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 1fe75171-fea2-45ef-9401-bf8a4ea0f2ba
yikkuro pushed a commit that referenced this pull request Jul 30, 2026
Clean auto-merge; i18n unioned #146 skills.dev.* status/global keys with existing #145/#144 keys.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 1fe75171-fea2-45ef-9401-bf8a4ea0f2ba
Raise SKILLS_STATUS_TIMEOUT_MS to 120s so the cold OpenClaw CLI
(52-81s to emit JSON) is not killed before producing output, and drop
the redundant 'skills check' spawn since 'skills list --json' already
carries every per-skill boolean and missing-requirement the panel uses.
Add a visible 'checking status' loading line during the ~1 minute wait.

Redesign SkillsDevPanel as a single-column vertical list: skill name +
status/reason/missing on the left, per-agent 'This agent' and 'Global'
toggles right-aligned, no horizontal overflow or clipped labels.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 1fe75171-fea2-45ef-9401-bf8a4ea0f2ba
yikkuro pushed a commit that referenced this pull request Jul 30, 2026
… branch

Clean auto-merge; took #146's constants.ts/main.ts/SkillsDevPanel.vue; i18n unioned.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 1fe75171-fea2-45ef-9401-bf8a4ea0f2ba
Show a muted 'Not installed' badge for catalog slugs (e.g. canvas) that
return no record once status has loaded successfully, instead of a bare
disabled Global switch.

Make the per-skill Global master toggle deferred like the per-agent
toggle: flipping it only stages a pending change, and a single
'Apply & reload' now persists BOTH the per-agent allowlist and every
global on/off change in ONE atomic config write + ONE gateway restart
via the new skills:apply-agent-config IPC. Factor the config mutations
into shared skill-config helpers (applyAgentSkillsToConfig /
applyGlobalSkillChange) reused by the existing set-agent-skills and
set-global-enabled handlers, and unit-test them.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 1fe75171-fea2-45ef-9401-bf8a4ea0f2ba
yikkuro pushed a commit that referenced this pull request Jul 30, 2026
…nto integration branch

Clean auto-merge; adds skill-config.ts/.test.ts; took #146 skills files; i18n unioned.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 1fe75171-fea2-45ef-9401-bf8a4ea0f2ba
The status check cold-starts the OpenClaw CLI (~60s), so stop auto-running
it on mount and on every agent switch. Agent switches are now instant: the
fast config read still populates the per-agent checkboxes, and status badges
come from a per-agent cache (populated by Refresh status / Apply) or show a
'Status not checked' hint when this agent hasn't been checked yet. The
deferred-global baseline is recomputed from the selected agent's cached
status. Only 'Refresh status' (and Apply) spawn the ~1 minute CLI.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 1fe75171-fea2-45ef-9401-bf8a4ea0f2ba
yikkuro pushed a commit that referenced this pull request Jul 30, 2026
…ntegration branch

Clean auto-merge; renderer-only SkillsDevPanel.vue + i18n; adds skills.dev.statusNotChecked.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 1fe75171-fea2-45ef-9401-bf8a4ea0f2ba
Hoist the SkillsDevPanel status cache to module scope so cached badges
survive the panel unmounting/remounting and agent switches. Replace the
per-agent Refresh with a Refresh-all that fetches every catalog agent
sequentially (current agent first) with a progress indicator, caching
each result. Store both ok and error outcomes.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 1fe75171-fea2-45ef-9401-bf8a4ea0f2ba
@yikkuro
yikkuro merged commit c9c167e into sunt-microsoft-feat-dev-skills-panel Jul 30, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants