From b7175289c22c303e7dc34420fef6785cf87aa19c Mon Sep 17 00:00:00 2001 From: Tobias Gesellchen Date: Sun, 10 May 2026 22:11:53 +0200 Subject: [PATCH] fix(web): clear DNS port warning when leaving the resolv method MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit toggleMigrationMethod()'s XML branch never reset #dns-port-warning, so switching from resolv back to xml left the "DNS Discovery is DISABLED" warning visible while the XML method was selected — where the warning is irrelevant. Reset the display to "none" in the default (XML) branch alongside the existing telnet/hosts branches that already do this. The next iteration's redesign of the Customize panel folds this state into per-method preconditions and removes the global warning entirely; this fix keeps the current UI honest until then. Co-Authored-By: Claude Opus 4.7 (1M context) --- pkg/service/handlers/web/js/script.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkg/service/handlers/web/js/script.js b/pkg/service/handlers/web/js/script.js index 1a36066..dc11a56 100644 --- a/pkg/service/handlers/web/js/script.js +++ b/pkg/service/handlers/web/js/script.js @@ -3076,6 +3076,12 @@ async function toggleMigrationMethod() { console.error("Failed to check DNS settings", e); } } else { + // XML branch (the default fallthrough). The DNS-port warning is + // owned by the resolv branch, but the previous code path forgot + // to reset it here — switching from resolv back to xml left a + // stale "DNS Discovery is DISABLED" warning attached to the XML + // method, where it's irrelevant. + if (dnsWarning) dnsWarning.style.display = "none"; xmlDiffPane.style.display = "block"; plannedXmlPane.style.display = "block"; plannedHostsPane.style.display = "none";