From 22402cb4fd6a218fc02e0ac671f0cd8f21c9edb5 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 24 Jun 2026 19:06:12 +0000 Subject: [PATCH] Align router setup wording and local port statuses --- app/sovran_systemsos_web/server.py | 16 ++++++----- .../static/js/service-detail.js | 27 ++++++++++--------- app/sovran_systemsos_web/static/onboarding.js | 26 ++++++++++-------- .../templates/onboarding.html | 8 +++--- 4 files changed, 44 insertions(+), 33 deletions(-) diff --git a/app/sovran_systemsos_web/server.py b/app/sovran_systemsos_web/server.py index 7535467..5a6a97c 100644 --- a/app/sovran_systemsos_web/server.py +++ b/app/sovran_systemsos_web/server.py @@ -2986,18 +2986,22 @@ async def api_service_detail(unit: str, icon: str | None = None): if has_domain_issues: domain_check_steps.append({ "step": 4, - "label": "Additional Ports Required", + "label": "Router Setup Needed", "status": "skipped", - "detail": "Skipped until Steps 1-3 are complete", + "detail": "Finish the domain steps first, then forward the Element Call ports in your router.", }) else: - extra_open = all(p["status"] != "closed" for p in extra_ports) + # These checks are local-only (listening/firewall state on this computer), + # not an outside-in verification of router/NAT forwarding. + all_local_ready = all(p["status"] != "closed" for p in extra_ports) domain_check_steps.append({ "step": 4, - "label": "Additional Ports Required", - "status": "ok" if extra_open else "error", + "label": "Router Setup Needed" if all_local_ready else "Sovran_SystemsOS Port Setup Needed", + "status": "warning" if all_local_ready else "error", "detail": ( - "Element-Call/LiveKit requires additional forwarded ports for WebRTC and TURN traffic." + "Sovran_SystemsOS is ready to use these ports on this computer. Now forward them in your router so Element Call can work from outside your home network." + if all_local_ready + else "Sovran_SystemsOS is not ready to use all required Element Call ports on this computer yet. Fix the ports marked “Not ready” below, then forward them in your router." ), }) diff --git a/app/sovran_systemsos_web/static/js/service-detail.js b/app/sovran_systemsos_web/static/js/service-detail.js index a86a6c6..2437c8c 100644 --- a/app/sovran_systemsos_web/static/js/service-detail.js +++ b/app/sovran_systemsos_web/static/js/service-detail.js @@ -158,16 +158,16 @@ async function openServiceDetailModal(unit, name, icon) { data.extra_ports.forEach(function(p) { var statusIcon, statusClass2; if (p.status === "listening") { - statusIcon = "✅ Open"; + statusIcon = "✅ Ready"; statusClass2 = "port-status-listening"; } else if (p.status === "firewall_open") { - statusIcon = "🟡 Firewall open"; + statusIcon = "✅ Ready"; statusClass2 = "port-status-open"; } else if (p.status === "closed") { - statusIcon = "❌ Closed"; + statusIcon = "❌ Not ready"; statusClass2 = "port-status-closed"; } else { - statusIcon = "— Unknown"; + statusIcon = "— Could not check"; statusClass2 = "port-status-unknown"; } extraRows += '' + @@ -178,11 +178,13 @@ async function openServiceDetailModal(unit, name, icon) { ''; }); html += '
' + - '
Step 4: Additional Ports
' + + '
Ports to Forward in Your Router
' + + '
These checks only confirm that Sovran_SystemsOS is prepared on this computer. Your router still needs to forward these ports from the public internet to this computer.
' + '' + - '' + + '' + '' + extraRows + '' + '
PortProtocolDescriptionStatus
PortProtocolUsed ForSovran_SystemsOS Status
' + + '
Next step: Log in to your router and forward the ports above to this Sovran_SystemsOS computer.
Full public port verification requires an outside internet check, so the Hub cannot fully confirm router forwarding from inside your home network.
' + '
'; } } else if (data.port_statuses && data.port_statuses.length > 0) { @@ -191,16 +193,16 @@ async function openServiceDetailModal(unit, name, icon) { data.port_statuses.forEach(function(p) { var statusIcon, statusClass2; if (p.status === "listening") { - statusIcon = "✅ Open"; + statusIcon = "✅ Ready"; statusClass2 = "port-status-listening"; } else if (p.status === "firewall_open") { - statusIcon = "🟡 Firewall open"; + statusIcon = "✅ Ready"; statusClass2 = "port-status-open"; } else if (p.status === "closed") { - statusIcon = "🔴 Closed"; + statusIcon = "❌ Not ready"; statusClass2 = "port-status-closed"; } else { - statusIcon = "— Unknown"; + statusIcon = "— Could not check"; statusClass2 = "port-status-unknown"; } portTableRows += '' + @@ -211,9 +213,10 @@ async function openServiceDetailModal(unit, name, icon) { ''; }); html += '
' + - '
Port Status
' + + '
Port Requirements
' + + '
This shows whether Sovran_SystemsOS is ready to use this port on this computer. If you need access from outside your home network, forward this port in your router.
' + '' + - '' + + '' + '' + portTableRows + '' + '
PortProtocolDescriptionStatus
PortProtocolUsed ForSovran_SystemsOS Status
' + '
'; diff --git a/app/sovran_systemsos_web/static/onboarding.js b/app/sovran_systemsos_web/static/onboarding.js index 2a23aa2..91d97a5 100644 --- a/app/sovran_systemsos_web/static/onboarding.js +++ b/app/sovran_systemsos_web/static/onboarding.js @@ -516,7 +516,7 @@ async function saveStep3() { async function loadStep4() { var body = document.getElementById("step-4-body"); if (!body) return; - body.innerHTML = '

Checking ports…

'; + body.innerHTML = '

Loading router setup…

'; var networkData = null; @@ -536,36 +536,36 @@ async function loadStep4() { + '

'; html += '
'; - html += ' Forward ports to this machine\'s internal IP:'; + html += ' Forward router traffic to this Sovran_SystemsOS computer:'; html += ' ' + ip + ''; html += '
'; // Required ports table html += '
'; - html += '
Required Ports — open these on your router:
'; + html += '
Required Router Rules
'; html += ''; - html += ''; + html += ''; html += ''; - html += ''; + html += ''; html += ''; - html += ''; + html += ''; html += '
PortProtocolForward toPurpose
PortProtocolForward ToUsed For
80TCP' + ip + 'HTTP
80TCP' + ip + 'HTTP / SSL setup
443TCP' + ip + 'HTTPS
22TCP' + ip + 'SSH Remote Access
22TCP' + ip + 'Remote SSH access
'; html += '
'; // Optional ports table html += '
'; - html += '
Optional — Only needed if you enable Element Calling:
'; - html += '
These 5 additional port openings are required on top of the 3 required ports above.
'; + html += '
Element Call Router Rules
'; + html += '
Only add these if you enable Element Call. These ports help video and audio calls connect reliably.
'; html += ''; - html += ''; + html += ''; html += ''; html += ''; html += ''; html += ''; html += ''; - html += ''; + html += ''; html += '
PortProtocolForward toPurpose
PortProtocolForward ToUsed For
7881TCP' + ip + 'LiveKit WebRTC signalling
7882UDP' + ip + 'LiveKit media (UDP mux)
5349TCP' + ip + 'TURN over TLS
3478UDP' + ip + 'TURN (STUN/relay)
30000–40000TCP & UDP' + ip + 'TURN relay (WebRTC)
30000-40000TCP & UDP' + ip + 'TURN relay (WebRTC)
'; - html += '
ℹ The 30000–40000 range is a single forwarding rule — just set its protocol to both TCP and UDP (often shown as "Both" or "TCP/UDP" on your router).
'; + html += '
ℹ The 30000-40000 range is a single forwarding rule — just set its protocol to both TCP and UDP (often shown as "Both" or "TCP/UDP" on your router).
'; html += '
'; // Totals @@ -592,6 +592,10 @@ async function loadStep4() { + '' + ''; + html += '
' + + 'Important: The Hub can show which ports Sovran_SystemsOS needs, but it cannot fully confirm router forwarding from inside your home network. Full public port verification requires an outside internet check.' + + '
'; + body.innerHTML = html; } diff --git a/app/sovran_systemsos_web/templates/onboarding.html b/app/sovran_systemsos_web/templates/onboarding.html index 699a8ee..c810cab 100644 --- a/app/sovran_systemsos_web/templates/onboarding.html +++ b/app/sovran_systemsos_web/templates/onboarding.html @@ -148,14 +148,14 @@