From 4b8d1f2001985348c21419c5642b31cf8295401f Mon Sep 17 00:00:00 2001 From: Yahya Saqban Date: Fri, 22 May 2026 23:50:22 +0300 Subject: [PATCH 1/2] docs: add Windows Docker workaround for CLI args Windows Docker does not pass CLI args directly after the image name. Added explicit workaround instructions using '--' separator and entrypoint override. Fixes #676 --- docs/user-guide.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/user-guide.md b/docs/user-guide.md index 5f6743fa..c720ac6b 100644 --- a/docs/user-guide.md +++ b/docs/user-guide.md @@ -268,6 +268,12 @@ Uses `netsh wlan` to capture RSSI from nearby access points. No special hardware ./target/release/sensing-server --source wifi --http-port 3000 --ws-port 3001 --tick-ms 500 # Docker (requires --network host on Windows) +# Note: On Windows, Docker does not pass CLI args directly. +# Use either: +# docker run --network host ruvnet/wifi-densepose:latest -- --source wifi --tick-ms 500 +# Or set the entrypoint: +# docker run --network host --entrypoint /app/target/release/sensing-server ruvnet/wifi-densepose:latest --source wifi --tick-ms 500 +# See https://github.com/ruvnet/RuView/issues/676 for troubleshooting. docker run --network host ruvnet/wifi-densepose:latest --source wifi --tick-ms 500 ``` From de7917e29cf5299b5158cb01354289ffd5968edd Mon Sep 17 00:00:00 2001 From: Yahya Saqban Date: Fri, 22 May 2026 23:52:18 +0300 Subject: [PATCH 2/2] fix(sensing-server): resolve UI path relative to executable location The sensing-server uses a relative default --ui-path that breaks when not running from the repo root. This adds exe-relative fallback paths so the server finds the UI directory even when launched from an arbitrary CWD. Also adds a clearer warning when no fallback is found. Fixes #188 --- .../wifi-densepose-sensing-server/src/main.rs | 25 ++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/v2/crates/wifi-densepose-sensing-server/src/main.rs b/v2/crates/wifi-densepose-sensing-server/src/main.rs index 681ef6fb..ea9d7533 100644 --- a/v2/crates/wifi-densepose-sensing-server/src/main.rs +++ b/v2/crates/wifi-densepose-sensing-server/src/main.rs @@ -4578,17 +4578,36 @@ fn coalesce_ui_path(initial: std::path::PathBuf) -> std::path::PathBuf { if initial.is_dir() { return initial; } - for rel in &["../ui", "./ui", "../../ui"] { - let p = std::path::PathBuf::from(rel); + // Try relative to CWD + let mut candidates: Vec = vec![ + std::path::PathBuf::from("../ui"), + std::path::PathBuf::from("./ui"), + std::path::PathBuf::from("../../ui"), + ]; + + // Try relative to executable (handles cases where CWD != repo root) + if let Ok(exe) = std::env::current_exe() { + if let Some(exe_dir) = exe.parent() { + candidates.push(exe_dir.join("../ui")); + candidates.push(exe_dir.join("../../ui")); + } + } + + for p in &candidates { if p.is_dir() { warn!( "UI path {} not found; using {} (set --ui-path explicitly if wrong)", initial.display(), p.display() ); - return p; + return p.clone(); } } + + warn!( + "UI path {} not found. Try running from repo root or set --ui-path explicitly.", + initial.display() + ); initial }