From 86411dccb38aab5e5409be0a062290d69e0b28d8 Mon Sep 17 00:00:00 2001 From: w-sss <1598099293@qq.com> Date: Tue, 17 Mar 2026 23:15:52 +0800 Subject: [PATCH] fix(ui): preserve config save error after loadChannels refresh - Store save error before calling loadChannels - Apply error after refresh completes - Prevents loadChannels from clearing the error prematurely - Fixes Codex P1: save error now persists for user to see --- ui/src/ui/app-channels.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/ui/src/ui/app-channels.ts b/ui/src/ui/app-channels.ts index 18b522c9abd..6101ade8817 100644 --- a/ui/src/ui/app-channels.ts +++ b/ui/src/ui/app-channels.ts @@ -27,11 +27,12 @@ export async function handleWhatsAppLogout(host: OpenClawApp) { export async function handleChannelConfigSave(host: OpenClawApp) { host.channelsError = null; await saveConfig(host); - if (host.lastError) { - host.channelsError = host.lastError; - } + const saveError = host.lastError; await loadConfig(host); await loadChannels(host, true); + if (saveError) { + host.channelsError = saveError; + } } export async function handleChannelConfigReload(host: OpenClawApp) {