fix(ui): DNS apply no longer blanks the page + WiFi/DNS modals cover the whole app
Demo images / Build & push demo images (push) Successful in 2m39s

Applying DNS assigned the RPC response's fields into networkData without
guarding the shape; the demo mock answered {success:true} with no
servers array, dnsServers became undefined, and the dnsDisplayLabel
computed crashed the whole page render on .length. Guard the assignment,
teach the mock to round-trip DNS state per session, and Teleport the
WiFi + DNS modals to body so they overlay the full app instead of just
the right panel (position:fixed is containing-block-relative inside the
dashboard).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
archipelago
2026-07-15 04:21:39 -04:00
co-authored by Claude Fable 5
parent 2fce4fb842
commit 2f78fb6907
3 changed files with 29 additions and 7 deletions
+20 -6
View File
@@ -2418,20 +2418,34 @@ app.post('/rpc/v1', (req, res) => {
}
case 'network.dns-status': {
const dns = mockState.dns || { provider: 'system', servers: ['1.1.1.1', '9.9.9.9'], doh_enabled: false }
return res.json({
result: {
provider: 'system',
servers: ['1.1.1.1', '9.9.9.9'],
doh_enabled: false,
provider: dns.provider,
servers: dns.servers,
doh_enabled: dns.doh_enabled,
doh_url: null,
resolv_conf_servers: ['1.1.1.1', '9.9.9.9'],
resolv_conf_servers: dns.servers,
},
})
}
case 'network.configure-dns': {
console.log(`[Network] DNS configured: ${params?.provider}`)
return res.json({ result: { success: true } })
const dnsProviders = {
system: ['192.168.4.1'],
cloudflare: ['1.1.1.1', '1.0.0.1'],
google: ['8.8.8.8', '8.8.4.4'],
quad9: ['9.9.9.9', '149.112.112.112'],
mullvad: ['194.242.2.2'],
}
const provider = params?.provider || 'system'
const servers = provider === 'custom'
? (Array.isArray(params?.servers) ? params.servers : [])
: (dnsProviders[provider] || dnsProviders.system)
const doh_enabled = ['cloudflare', 'google', 'quad9', 'mullvad'].includes(provider)
mockState.dns = { provider, servers, doh_enabled }
console.log(`[Network] DNS configured: ${provider}${servers.join(', ')}`)
return res.json({ result: { provider, servers, doh_enabled } })
}
case 'network.accept-request': {