diff --git a/docs/user-guide.md b/docs/user-guide.md index 11e6695b..c52258b3 100644 --- a/docs/user-guide.md +++ b/docs/user-guide.md @@ -313,6 +313,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 ``` diff --git a/v2/crates/wifi-densepose-sensing-server/src/main.rs b/v2/crates/wifi-densepose-sensing-server/src/main.rs index 03e459ea..22bc377d 100644 --- a/v2/crates/wifi-densepose-sensing-server/src/main.rs +++ b/v2/crates/wifi-densepose-sensing-server/src/main.rs @@ -5300,17 +5300,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 }