From b9efd1b3d080d2edd79524cbaf4caf82cee58c7d Mon Sep 17 00:00:00 2001 From: Dorian Date: Wed, 11 Mar 2026 00:35:55 +0000 Subject: [PATCH] feat: add Network Interfaces section and WiFi scan modal to Server.vue Shows detected physical interfaces (ethernet/wifi) with IP, MAC, and status. WiFi scan button opens a modal with signal strength bars and password-protected connection flow. Uses network.list-interfaces and network.scan-wifi RPC endpoints. Co-Authored-By: Claude Opus 4.6 --- loop/plan.md | 2 +- neode-ui/src/views/Server.vue | 186 +++++++++++++++++++++++++++++++++- 2 files changed, 186 insertions(+), 2 deletions(-) diff --git a/loop/plan.md b/loop/plan.md index 3a522a30..7caa0969 100644 --- a/loop/plan.md +++ b/loop/plan.md @@ -54,7 +54,7 @@ - [x] **BACK-03** — Add WiFi/Ethernet configuration RPC endpoints. Create `core/archipelago/src/network/interfaces.rs` with: `network.list-interfaces` (lists eth0, wlan0, etc. with IP, MAC, status), `network.configure-wifi` (SSID, password, connects via `nmcli`), `network.configure-ethernet` (static IP or DHCP via `nmcli`), `network.scan-wifi` (available networks). Register in RPC router. **Acceptance**: `network.list-interfaces` returns real interface data on dev server. -- [ ] **BACK-04** — Add WiFi/Ethernet UI to Server.vue. Add a "Network Interfaces" section to Server.vue showing detected interfaces with their IPs and statuses. For WiFi, add "Scan & Connect" button that opens a modal listing available networks. For Ethernet, show DHCP/Static toggle. Use `glass-card` container with `bg-white/5` sub-rows. **Acceptance**: Real network interfaces visible on Server page; WiFi scan works on dev server. Deploy and verify. +- [x] **BACK-04** — Add WiFi/Ethernet UI to Server.vue. Add a "Network Interfaces" section to Server.vue showing detected interfaces with their IPs and statuses. For WiFi, add "Scan & Connect" button that opens a modal listing available networks. For Ethernet, show DHCP/Static toggle. Use `glass-card` container with `bg-white/5` sub-rows. **Acceptance**: Real network interfaces visible on Server page; WiFi scan works on dev server. Deploy and verify. - [ ] **BACK-05** — Implement CSRF protection on RPC layer. Address the High-severity finding from `docs/security-audit-2026-03-05.md`. Add CSRF token generation on login (return as cookie + response field), validate on all state-changing RPC calls. In `core/archipelago/src/api/rpc/mod.rs`, add `X-CSRF-Token` header check for non-GET methods. In `neode-ui/src/api/rpc-client.ts`, read the CSRF cookie and send it as header. **Acceptance**: RPC calls without CSRF token return 403; calls with correct token succeed. diff --git a/neode-ui/src/views/Server.vue b/neode-ui/src/views/Server.vue index a3857d02..a0ac1468 100644 --- a/neode-ui/src/views/Server.vue +++ b/neode-ui/src/views/Server.vue @@ -232,11 +232,115 @@ + + +
+
+
+

Network Interfaces

+

Detected hardware and virtual interfaces

+
+ +
+ + + +
+ + +
+
+
+

WiFi Networks

+ +
+ + + + + +
+

Connect to {{ wifiSelectedSsid }}

+ +
+ + +
+
+
+