From ffb25253b4c9714f80f55587d2ffa181778a5811 Mon Sep 17 00:00:00 2001 From: Glucksberg Date: Sun, 25 Jan 2026 01:38:28 +0000 Subject: [PATCH] fix(ui): improve config save UX Follow-up to #1609 fix: - Remove formUnsafe check from canSave (was blocking save even with valid changes) - Suppress disconnect message for code 1012 (service restart is expected during config save) Co-Authored-By: Claude Opus 4.5 --- ui/src/ui/app-gateway.ts | 5 ++++- ui/src/ui/views/config.ts | 3 ++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/ui/src/ui/app-gateway.ts b/ui/src/ui/app-gateway.ts index edabb574f..471fcbeba 100644 --- a/ui/src/ui/app-gateway.ts +++ b/ui/src/ui/app-gateway.ts @@ -134,7 +134,10 @@ export function connectGateway(host: GatewayHost) { }, onClose: ({ code, reason }) => { host.connected = false; - host.lastError = `disconnected (${code}): ${reason || "no reason"}`; + // Code 1012 = Service Restart (expected during config saves, don't show as error) + if (code !== 1012) { + host.lastError = `disconnected (${code}): ${reason || "no reason"}`; + } }, onEvent: (evt) => handleGatewayEvent(host, evt), onGap: ({ expected, received }) => { diff --git a/ui/src/ui/views/config.ts b/ui/src/ui/views/config.ts index dc4453fb8..e8e090bec 100644 --- a/ui/src/ui/views/config.ts +++ b/ui/src/ui/views/config.ts @@ -234,8 +234,9 @@ export function renderConfig(props: ConfigProps) { const hasChanges = props.formMode === "form" ? diff.length > 0 : hasRawChanges; // Save/apply buttons require actual changes to be enabled + // Note: formUnsafe warns about unsupported schema paths but shouldn't block saving const canSaveForm = - Boolean(props.formValue) && !props.loading && !formUnsafe; + Boolean(props.formValue) && !props.loading; const canSave = props.connected && !props.saving &&