fix: block auto-save when DDNS availability check is unreachable
Unit Tests / test (push) Successful in 11m34s

'unreachable' should not be a terminal state that triggers auto-save —
it was causing a 503 when the availability check failed and auto-save
fired the backend registration attempt. Only 'available' allows
auto-save when the cell name has changed from the loaded value.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-27 14:29:10 -04:00
parent 01027c171e
commit 393d56d4ca
+3 -3
View File
@@ -691,10 +691,10 @@ function Settings() {
if (!identityDirty) return; if (!identityDirty) return;
if (ipRangeError || cellNameError || domainError) return; if (ipRangeError || cellNameError || domainError) return;
// In pic_ngo mode, if the cell name differs from what was last saved/loaded, // In pic_ngo mode, if the cell name differs from what was last saved/loaded,
// wait for the availability check to reach a terminal state before saving. // only auto-save once the check confirms the name is available.
// 'available' and 'unreachable' are terminal; null/'checking'/'taken' are not. // All other states (null, 'checking', 'taken', 'unreachable') block auto-save.
if (domainMode === 'pic_ngo' && identity.cell_name !== loadedCellName) { if (domainMode === 'pic_ngo' && identity.cell_name !== loadedCellName) {
if (picAvail !== 'available' && picAvail !== 'unreachable') return; if (picAvail !== 'available') return;
} }
const timer = setTimeout(() => saveIdentityRef.current(), 800); const timer = setTimeout(() => saveIdentityRef.current(), 800);
return () => clearTimeout(timer); return () => clearTimeout(timer);