From 823013226d9b5148125a1e7a10f48d212bf54ba2 Mon Sep 17 00:00:00 2001 From: Codeman maintainer Date: Wed, 4 Nov 2026 16:48:25 +0100 Subject: [PATCH] fix: record the settings baseline when a tunnel enable is abandoned (#736) Both _abandonTunnelEnable() returns come after saveAppSettingsToStorage() wrote the new values to this device but before _unsavedSettingsBaseline was set, so after cancelling the no-password prompt the next Save sent no showPlanUsageLimits flip and did not reload for a gesture-control change. Co-Authored-By: Claude Opus 5.5 --- src/web/public/settings-ui.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/web/public/settings-ui.js b/src/web/public/settings-ui.js index 3ef72447..5fec441f 100644 --- a/src/web/public/settings-ui.js +++ b/src/web/public/settings-ui.js @@ -3385,6 +3385,7 @@ Object.assign(CodemanApp.prototype, { ? await this._confirmTunnelEnable() : { proceed: true, acknowledge: false }; if (!tunnelGate.proceed) { + this._unsavedSettingsBaseline = _prevServer; this._abandonTunnelEnable(settings, keepOpen); return; } @@ -3416,6 +3417,7 @@ Object.assign(CodemanApp.prototype, { // not about the tunnel, and turning the switch off for it would be wrong too. const tunnelRefused = !refusedAsNonAdmin && settings.tunnelEnabled && res?.status === 403; if (tunnelRefused && (await this._handleTunnelEnableRefusal(res, body))) { + this._unsavedSettingsBaseline = _prevServer; this._abandonTunnelEnable(settings, keepOpen); return; }