diff --git a/ui/src/ui/app-channels.ts b/ui/src/ui/app-channels.ts index eb05e83e81b..18b522c9abd 100644 --- a/ui/src/ui/app-channels.ts +++ b/ui/src/ui/app-channels.ts @@ -25,12 +25,17 @@ 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; + } await loadConfig(host); await loadChannels(host, true); } export async function handleChannelConfigReload(host: OpenClawApp) { + host.channelsError = null; await loadConfig(host); await loadChannels(host, true); } diff --git a/ui/src/ui/app-render.ts b/ui/src/ui/app-render.ts index 786a85b0757..11bcacae1ee 100644 --- a/ui/src/ui/app-render.ts +++ b/ui/src/ui/app-render.ts @@ -680,7 +680,6 @@ export function renderApp(state: AppViewState) { configUiHints: state.configUiHints, configSaving: state.configSaving, configFormDirty: state.configFormDirty, - configSaveError: state.lastError, nostrProfileFormState: state.nostrProfileFormState, nostrProfileAccountId: state.nostrProfileAccountId, onRefresh: (probe) => loadChannels(state, probe), diff --git a/ui/src/ui/views/channels.config.ts b/ui/src/ui/views/channels.config.ts index 504ff93a3e8..421534bc976 100644 --- a/ui/src/ui/views/channels.config.ts +++ b/ui/src/ui/views/channels.config.ts @@ -118,7 +118,7 @@ export function renderChannelConfigForm(props: ChannelConfigFormProps) { export function renderChannelConfigSection(params: { channelId: string; props: ChannelsProps }) { const { channelId, props } = params; const disabled = props.configSaving || props.configSchemaLoading; - const hasError = Boolean(props.configSaveError); + const hasError = Boolean(props.lastError); return html`