feat: plugin registry — unified view of installed plugins (closes #692)#847
feat: plugin registry — unified view of installed plugins (closes #692)#847vivekchand wants to merge 1 commit intomainfrom
Conversation
4c3afd1 to
de6b270
Compare
vivekchand
left a comment
There was a problem hiding this comment.
Test plan & review notes
What changed
- Adds
routes/plugins.py(bp_plugins,GET /api/plugins) that readsopenclaw.json→plugins.entries, classifies each plugin into connector/provider/tool/observability via static frozenset lookup, and returns a JSON list + summary;dashboard.pygains a new "Plugins" nav tab and a JSloadPlugins()/renderPluginsList()/filterPlugins()section that renders cards with per-type colour coding and enable/disable status.
Smoke commands
make testormake test-apipython3 dashboard.py --port 8900then click the Plugins tab in the nav bar
What to look at visually
- Navigate to
http://localhost:8900→ "Plugins" tab — verify summary cards show correct totals, filter buttons work, and plugin cards render with the right icon/colour curl -sS http://localhost:8900/api/plugins | python3 -m json.tool— expected shape:{"plugins": [{"name": "...", "type": "connector|provider|tool|observability", "enabled": true|false, "hasConfig": true|false}, ...], "summary": {"total": N, "enabled": N, "byType": {...}}}
Likely failure modes from the diff
- Unknown plugin names fall through to
"tool"silently — any plugin not in the four frozensets (e.g. a community plugin or a newly added first-party one) will be mis-classified as"tool"with no warning. Consider adding an"unknown"type or logging unrecognised names. data.get("plugins") or {}hides a non-dictpluginskey — ifopenclaw.jsonhas"plugins": nullor"plugins": [], the double-fallback silently returns no plugins instead of surfacing a parse error.filterPluginsreadseventas an implicit global — thefilterPlugins(type)JS function referenceseventwithout it being passed as a parameter; this relies on the deprecated implicitwindow.eventand will beundefinedin Firefox and strict-mode environments, so the active-button highlight won't update. Fix: passthisfrom theonclickand toggle class on the passed element instead.- Nav tab added twice in
dashboard.py— the diff shows the<div class="nav-tab" onclick="switchTab('plugins')">hunk applied to two separate template string blocks (around lines 3297 and 8651). Confirm at runtime that only one tab appears in the rendered HTML (double-registration would show duplicate tabs).
Issue link
- Closes #692 ✓ (already in title)
Generated by Claude Code
vivekchand
left a comment
There was a problem hiding this comment.
Test plan & review notes
Repo: vivekchand/clawmetry
What changed
- New
routes/plugins.pyblueprint:GET /api/pluginsreadingopenclaw.jsonplugin entries, categorized by type via keyword matching - New "Plugins" tab with summary cards (total, per-type counts) + filterable grid (All / Connectors / Providers / Tools / Observability / Disabled)
Smoke commands
python3 -c 'import ast; ast.parse(open("routes/plugins.py").read())'— syntax clean- Without
openclaw.json:curl -sS http://localhost:8900/api/plugins— should return{"plugins": []}, not 500 - With plugins installed: verify each plugin appears with correct
type,enabled, andconfiguredfields make test
What to look at visually
http://localhost:8900→ "Plugins" tab → summary cards → filter buttons → grid of plugins with enabled/disabled status badges
Likely failure modes from the diff
- Keyword-based categorization: a plugin with a generic name (e.g.
"my-tool") may land in the wrong bucket or fall through to a catch-all — confirm there's a default category - Blueprint registration:
routes/plugins.pymust be imported and registered indashboard.py
Issue link
- Closes #692
Generated by Claude Code
vivekchand
left a comment
There was a problem hiding this comment.
Test plan & review notes
Repo: vivekchand/clawmetry
What changed
- Adds a new
Pluginstab:routes/plugins.pyexposesGET /api/plugins(readsopenclaw.jsonplugins entries, classifies by type, returns summary counts);dashboard.pywires in the blueprint, nav tab, HTML panel, and ~70 lines of JS for rendering/filtering.
Heads-up — branch is DIRTY (
mergeable_state: dirty). There are merge conflicts againstmainthat need resolving before this can land.
Smoke commands
# Resolve conflicts first, then:
make lint
python3 dashboard.py --port 8900What to look at visually
http://localhost:8900→ click the new Plugins tab- Verify summary cards render (Total / Connectors / Providers / Tools / Observability)
- Click each filter button and confirm the grid filters correctly
- Test with an
openclaw.jsonthat has nopluginskey — should show "No plugins found" gracefully - Test with an
openclaw.jsonthat has unknown plugin names — they will silently fall through totype: "tool"(see concern below)
Likely failure modes from the diff
- Unknown plugin names silently become "tool" —
_classify()falls back to"tool"for anything not in the four hardcoded frozensets. A plugin like"custom-analytics-exporter"will appear under Tools rather than Observability. Consider logging a warning or adding an"other"bucket instead. filterPluginsreads impliciteventglobal —function filterPlugins(type)callsevent.target.classList.add('active')withouteventin the function signature. This works in most browsers but is non-standard; passingeventexplicitly from theonclickhandlers (onclick="filterPlugins('all', event)") is safer.- Nav tab duplicated in dashboard.py — the tab is added in two places (OSS template ~line 3297 and cloud template ~line 8651). This matches the existing pattern in the file, so it's expected — just worth a quick sanity check that both variants render the tab.
openclaw.jsonpath — relies on_d._get_openclaw_dir()fromdashboard.py; if that helper is unavailable in a future refactor tohelpers/, this will break silently (returns empty list, not an error).
Issue link
- Closes #692 ✓ (already linked in PR body)
10 days old with no activity — the feature itself is additive (new tab, new route file, no mutations to existing endpoints) so there's low conflict risk beyond the dirty merge state. Worth a rebase to unblock.
Generated by Claude Code
Test plan & review notesRepo: vivekchand/clawmetry What changed
Smoke commands
What to look at visually
Likely failure modes from the diff
Branch note
Issue link Generated by Claude Code |
…692) New Plugins tab in the ClawMetry dashboard showing all installed OpenClaw plugins in one unified view, categorized by type (connector, provider, tool, observability). Reads from openclaw.json plugins.entries, with summary cards, filter buttons, and a responsive card grid. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
de6b270 to
2f46a39
Compare
|
Auto-rebase pushed; CI now running. If still not green in 10min, may need manual attention. Generated by Claude Code |
Closes #692
What
New Plugins tab that shows all installed OpenClaw plugins in one unified view, categorized by type (connector, provider, tool, observability).
How
routes/plugins.pyblueprint withGET /api/pluginsendpointopenclaw.jsonplugins.entriesScreenshots
New Plugins tab with: