fix(settings): persist latencyPing settings through native host round-trip
CI / Build & Test (push) Successful in 2m54s

Add latencyPingEnabled and latencyPingIntervalMs to the native host
SETTINGS_DEFAULTS and updateSettings handler so they are persisted to
state.json and returned in the save response. Previously these fields
were extension-only and were silently dropped, causing the UI to revert
to defaults after every save.
This commit is contained in:
Raven Scott
2026-03-01 01:02:47 -05:00
parent b9a4e39e78
commit 10ac56438f
2 changed files with 5 additions and 1 deletions
+2
View File
@@ -42,6 +42,8 @@ function updateSettings(patch) {
if (typeof patch.backupRetention === 'number') currentSettings.backupRetention = patch.backupRetention;
if (typeof patch.backupIntervalHours === 'number') currentSettings.backupIntervalHours = patch.backupIntervalHours;
if (typeof patch.tunnelAutoReconnect === 'boolean') currentSettings.tunnelAutoReconnect = patch.tunnelAutoReconnect;
if (typeof patch.latencyPingEnabled === 'boolean') currentSettings.latencyPingEnabled = patch.latencyPingEnabled;
if (typeof patch.latencyPingIntervalMs === 'number' && patch.latencyPingIntervalMs > 0) currentSettings.latencyPingIntervalMs = patch.latencyPingIntervalMs;
if (_saveState) _saveState();
return { requiresRestart };
}
+3 -1
View File
@@ -20,7 +20,9 @@ const SETTINGS_DEFAULTS = {
disableOnFileUrls: false,
backupRetention: 5,
backupIntervalHours: 0,
tunnelAutoReconnect: false
tunnelAutoReconnect: false,
latencyPingEnabled: true,
latencyPingIntervalMs: 5000
};
const DEBUG = process.env.HOLESAIL_DEBUG === '1' || process.env.HOLESAIL_DEBUG === 'true';