fix integration config UI persistence for Telegram + WhatsApp

Align integration config UX/saving behavior and project binding. - Telegram integration: keep Save available when appropriate in the wizard footer so config changes (including deleting bots) can be persisted reliably. - WhatsApp integration: fix project dropdown binding by using normalized key/value helpers (supports both `key/label` and `name/title` payloads) and showing project labels correctly. - Mirror both fixes into the runtime plugin copy under agentdocker so the running container gets the update immediately. This resolves user-reported integration setup issues and restores expected save/delete behavior.

Alessandro committed Apr 21, 2026 at 06:01 UTC e2c5f59754d5cd192b952d0c95702e7239440598
3 files changed +25 -5
plugins/_telegram_integration/webui/telegram-config-store.js
+1 -1
@@ -339,7 +339,7 @@ export const store = createStore("telegramConfig", {
339 showNext: () => this.showFooterNav && !this.isLastStep,
340 nextLabel: () => this.nextButtonLabel,
341 nextDisabled: () => this.nextDisabled,
342 - showSave: () => this.showFooterNav && this.isLastStep,
342 + showSave: () => !this.showFooterNav || this.isLastStep,
343 onBack: () => this.previousStep(),
344 onNext: () => this.nextStep(),
345 };
plugins/_whatsapp_integration/webui/config.html
+5 -3
@@ -209,9 +209,11 @@
209 <div class="field-control">
210 <select :value="config.project" @change="config.project = $event.target.value">
211 <option value="">No project</option>
212 - <template x-for="proj in $store.whatsappConfig.projects" :key="proj.name">
213 - <option :value="proj.name" x-text="proj.title || proj.name"
214 - :selected="config.project === proj.name"></option>
212 + <template x-for="proj in $store.whatsappConfig.projects" :key="$store.whatsappConfig.projectOptionValue(proj)">
213 + <option :value="$store.whatsappConfig.projectOptionValue(proj)"
214 + x-text="$store.whatsappConfig.projectOptionLabel(proj)"
215 + :selected="config.project === $store.whatsappConfig.projectOptionValue(proj)">
216 + </option>
217 </template>
218 </select>
219 </div>
plugins/_whatsapp_integration/webui/whatsapp-config-store.js
+19 -1
@@ -181,7 +181,25 @@ export const store = createStore("whatsappConfig", {
181 },
182
183 projectSummary() {
184 - return this.config?.project ? `Project: ${this.config.project}` : "No project";
184 + return this.config?.project ? `Project: ${this.projectLabel(this.config.project)}` : "No project";
185 + },
186 +
187 + projectOptionValue(project) {
188 + return String(project?.key || project?.name || "");
189 + },
190 +
191 + projectOptionLabel(project) {
192 + return project?.label || project?.title || project?.name || project?.key || "";
193 + },
194 +
195 + projectLabel(projectKey) {
196 + const normalizedProjectKey = String(projectKey || "").trim();
197 + if (!normalizedProjectKey) return "";
198 + const project = (this.projects || []).find((item) =>
199 + String(item?.key || "") === normalizedProjectKey || String(item?.name || "") === normalizedProjectKey
200 + );
201 + if (project) return this.projectOptionLabel(project);
202 + return normalizedProjectKey;
203 },
204
205 async testConnection() {