From bf598ebf80088c102c3ff1907cd92de6296aeacd Mon Sep 17 00:00:00 2001 From: Ethanfel Date: Fri, 20 Mar 2026 21:01:03 +0100 Subject: [PATCH] fix: make key_name selection sticky, never auto-reset The key_name combo now only updates its dropdown options from the API but never changes the user's selected value. Only the output value refreshes on execution. Co-Authored-By: Claude Opus 4.6 --- web/project_key.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/web/project_key.js b/web/project_key.js index 360bf3e..b908fe2 100644 --- a/web/project_key.js +++ b/web/project_key.js @@ -161,14 +161,11 @@ app.registerExtension({ this._availableKeys = data.keys; this._availableTypes = data.types; - // Update key_name combo values + // Update key_name combo options only — never change the selection const keyWidget = this.widgets?.find(w => w.name === "key_name"); if (keyWidget) { keyWidget.options.values = data.keys; - // Keep current selection if still valid - if (!data.keys.includes(keyWidget.value)) { - keyWidget.value = data.keys[0] || ""; - } + // Selection is sticky: user must change it manually this._applyKeySelection(); } } catch (e) {