feat(dashboard): schema-driven plugin config form#303
Merged
rmyndharis merged 1 commit intoJun 18, 2026
Conversation
Render an editable config form in the Plugins config modal for any plugin that exposes a configSchema (the backend already returns it). Each field maps to an input by type: string->text, secret->password (masked), number->number, boolean->toggle, enum->select; with title/description labels and defaults as placeholders. Saves via the existing PUT /plugins/:id/config. Reuses the existing modal/form styles and i18n keys (no new locale strings). Makes the libretranslate URL + API key (and any future plugin config) editable from the dashboard.
dallascyclist
added a commit
to dallascyclist/OpenWA
that referenced
this pull request
Jun 17, 2026
… live - Add the configSchema to the translation plugin's registered manifest so GET /plugins exposes it and the dashboard config form (rmyndharis#303) can render the LibreTranslate URL + API key (and other) fields. The schema was previously only in manifest.json, which built-in registration does not read. - Implement onConfigChange to rebuild the coordinator from the updated config, so a URL/key change saved from the dashboard takes effect immediately without a disable/enable cycle. Extracted buildCoordinator() shared by onEnable/onConfigChange.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Renders an editable config form in the Plugins config modal for any plugin that exposes a
configSchema. The backend already returnsconfigSchema(and currentconfig) fromGET /plugins, andPUT /plugins/:id/configalready persists changes — but the dashboard modal only had fields for the engine plugin; every other plugin showed "No configuration options available." This wires the existing schema through to a real form.What it does
For a plugin with a
configSchema, the ⚙️ modal renders one field per property, by type:string→ text inputstring+secret: true→ masked password inputnumber→ number inputboolean→ togglestring+enum→ select…using each field's
title/descriptionas the label/help text anddefaultas the placeholder. Saving calls the existingPUT /plugins/:id/config.Reuses the existing modal/form styles and i18n keys — no new locale strings (i18n parity unaffected).
Why
The plugin system already supports per-plugin
configSchema, but it could only be set via the API. This makes any plugin's settings editable from the dashboard. Concretely, it lets the Group Auto-Translation plugin (#300) be pointed at a local or hosted LibreTranslate — URL + optional (masked) API key — from the UI.Testing
tsc -b && vite build,eslint, andi18n:check(parity) all pass; no new locale keys.PUT /plugins/:id/configfor both a local URL and a hosted URL+key.Note
Built-in plugins register their manifest programmatically, so for the form to show a built-in plugin's fields, that plugin's registered manifest must include its
configSchema. (The translation plugin in #300 will expose its schema; this PR is the generic UI and is independent of it.)