diff --git a/app/templates/index.html b/app/templates/index.html
index d67a221..988eece 100644
--- a/app/templates/index.html
+++ b/app/templates/index.html
@@ -328,8 +328,8 @@
});
});
- // Sort by IP on initial load
- document.querySelector('[data-sort="ip"]')?.click();
+ // Sort by Name on initial load
+ document.querySelector('[data-sort="name"]')?.click();
// ── IP range filter button ─────────────────────────────────────────────────
const btnIpFilter = document.getElementById('btn-ip-filter');
@@ -610,6 +610,8 @@
clientsSubtitle.textContent = `${clients.length} device${clients.length !== 1 ? 's' : ''} connected`;
+ clients.sort((a, b) => ipToNum(a.ip) - ipToNum(b.ip));
+
const rows = clients.map(c => {
const displayName = esc(c.name || c.hostName || c.hostname || '');
const mac = esc(c.mac || '—');