From eef91ce3125b7da19aedb25562561648bcc93df1 Mon Sep 17 00:00:00 2001 From: Algis Dumbris Date: Mon, 15 Jun 2026 14:45:03 +0300 Subject: [PATCH] feat(ui): prefill MCP instructions default + Reset-to-default button (MCP-2484) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The Settings "MCP server instructions" textarea previously showed the built-in default only as a placeholder; its editable VALUE was the (empty on a fresh install) config `instructions` field, forcing users who just want to tweak the default to retype the whole thing. - Prefill the editable value with the live `default_instructions` (from /api/v1/status) when the saved `instructions` is empty. Handles either load order (config vs default) and a `watch` so a late default still prefills. Never overwrites a non-empty saved value. - Add a compact "Reset to default" button next to the instructions textarea (shown only once the default has loaded) that repopulates the field from the live default; it flows through the normal change path so Save persists it as `instructions`. Frontend-only — the backend already exposes the resolved default. Related #MCP-2484 --- .../src/components/settings/SettingField.vue | 8 ++++ frontend/src/views/Settings.vue | 36 ++++++++++++++-- frontend/src/views/settings/fields.ts | 5 +++ .../tests/unit/settings-instructions.spec.ts | 42 +++++++++++++++++++ 4 files changed, 87 insertions(+), 4 deletions(-) diff --git a/frontend/src/components/settings/SettingField.vue b/frontend/src/components/settings/SettingField.vue index dba8c89b..e0afe02f 100644 --- a/frontend/src/components/settings/SettingField.vue +++ b/frontend/src/components/settings/SettingField.vue @@ -137,6 +137,14 @@
+
+ +