From d6e9639d8909dbd4260510dbbaa309745a150baf Mon Sep 17 00:00:00 2001 From: Tobias Gesellchen Date: Sun, 10 May 2026 21:39:48 +0200 Subject: [PATCH] fix(web): URL Configuration verdict respects DNS interception MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The URL Configuration cell flagged "Original (Bose cloud)" with a red ❌ even when the DNS hook (or /etc/hosts redirects, deprecated though it is) was actively intercepting those hostnames and routing them at AfterTouch — i.e. the expected migrated state for the DNS method. urlConfigVerdict now factors in resolv_migrated/hosts_migrated: - URL flip (xml or telnet) active → ✅ "AfterTouch URLs" - URL flip not active, DNS interception on → ✅ "Original (Bose cloud) — intercepted via DNS, device reaches AfterTouch" - URL flip not active, no DNS interception → ❌ "Original (Bose cloud) — not intercepted, device will reach the real Bose cloud" The third case is the only one that's actually broken; the first two are valid migrated states for different methods. Co-Authored-By: Claude Opus 4.7 (1M context) --- pkg/service/handlers/web/js/script.js | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/pkg/service/handlers/web/js/script.js b/pkg/service/handlers/web/js/script.js index f4483cb..c141ea2 100644 --- a/pkg/service/handlers/web/js/script.js +++ b/pkg/service/handlers/web/js/script.js @@ -2586,13 +2586,25 @@ function formatURLPair(xmlVal, telVal) { return `xml: ${xmlVal} • live: ${telVal}`; } +// urlConfigVerdict reports the URL-flip axis in the context of DNS +// interception, because "URLs still point at Bose" is only a problem +// if nothing else is redirecting them. When the DNS hook (or, less +// preferably, /etc/hosts) is intercepting the Bose hostnames, leaving +// the on-device URL config untouched is the *expected* migrated state +// for that method — flagging it red would be misleading. function urlConfigVerdict(summary) { const xml = !!summary.xml_migrated; const tel = !!summary.telnet_migrated; - if (!xml && !tel) return {icon: "❌", text: "Original (Bose cloud)", note: ""}; - if (xml && tel) return {icon: "✅", text: "Migrated to AfterTouch", note: "(XML + telnet runtime in sync)"}; - if (xml) return {icon: "✅", text: "Migrated to AfterTouch", note: "(XML only — telnet runtime may still hold the old URLs)"}; - return {icon: "✅", text: "Migrated to AfterTouch", note: "(telnet runtime — reboot to persist into the on-disk XML)"}; + const dns = !!summary.resolv_migrated || !!summary.hosts_migrated; + + if (xml && tel) return {icon: "✅", text: "AfterTouch URLs", note: "(XML + telnet runtime in sync)"}; + if (xml) return {icon: "✅", text: "AfterTouch URLs", note: "(XML only — telnet runtime may still hold the old URLs)"}; + if (tel) return {icon: "✅", text: "AfterTouch URLs", note: "(telnet runtime — reboot to persist into the on-disk XML)"}; + + // Neither URL-flip mechanism is active. Whether that's OK depends + // on whether DNS interception is doing the redirect. + if (dns) return {icon: "✅", text: "Original (Bose cloud)", note: "— intercepted via DNS, device reaches AfterTouch"}; + return {icon: "❌", text: "Original (Bose cloud)", note: "— not intercepted, device will reach the real Bose cloud"}; } function dnsInterceptionVerdict(summary) {