Skip to content

fix: complete sensing server API, WebSocket connectivity, and mobile tests#125

Merged
ruvnet merged 1 commit intomainfrom
fix/ui-404-errors-and-mobile-ws
Mar 3, 2026
Merged

fix: complete sensing server API, WebSocket connectivity, and mobile tests#125
ruvnet merged 1 commit intomainfrom
fix/ui-404-errors-and-mobile-ws

Conversation

@ruvnet
Copy link
Owner

@ruvnet ruvnet commented Mar 3, 2026

Summary

  • 14 new API endpoints in sensing server (main.rs): model management (7), CSI recording (4), training control (3) — eliminates all 404 console errors in the web UI
  • WebSocket "RECONNECTING" fix: sensingService.start() now called on app init in app.js so Dashboard and Live Demo tabs connect immediately instead of waiting for Sensing tab visit
  • Mobile WebSocket fix: ws.service.ts uses same-origin port instead of hardcoded port 3001
  • 25 real mobile tests: All it.todo() placeholder tests replaced with actual assertions covering components, services, stores, hooks, screens, and utils
  • Jest config fix: testPathIgnorePatterns no longer ignores the entire test directory

Test plan

  • Start sensing server: cargo run -p wifi-densepose-sensing-server -- --http-port 3000 --source auto
  • Open http://localhost:3000/ui/ — verify zero 404 errors in console
  • Dashboard tab shows "SIMULATED" (not "RECONNECTING") for data source
  • Verify model endpoints: curl http://localhost:3000/api/v1/models returns JSON
  • Verify recording lifecycle: start → stop → list → delete
  • Verify training status: curl http://localhost:3000/api/v1/train/status returns {"phase":"idle"}
  • Run cargo test --workspace --no-default-features (1,031+ tests pass)

🤖 Generated with claude-flow

…and replace 25 placeholder mobile tests

The web UI had persistent 404 errors on model, recording, and training
endpoints, and the sensing WebSocket never connected on Dashboard/Live
Demo tabs because sensingService.start() was only called lazily on
Sensing tab visit.

Server (main.rs):
- Add 14 fully-functional Axum handlers: model CRUD (7), recording
  lifecycle (4), training control (3)
- Scan data/models/ and data/recordings/ at startup
- Recording writes CSI frames to .jsonl via tokio background task
- Model load/unload lifecycle with state tracking

Web UI (app.js):
- Import and start sensingService early in initializeServices() so
  Dashboard and Live Demo tabs connect to /ws/sensing immediately

Mobile (ws.service.ts):
- Fix WebSocket URL builder to use same-origin port instead of
  hardcoded port 3001

Mobile (jest.config.js):
- Fix testPathIgnorePatterns that was ignoring the entire test directory

Mobile (25 test files):
- Replace all it.todo() placeholder tests with real implementations
  covering components, services, stores, hooks, screens, and utils

ADR-043 documents all changes.

Co-Authored-By: claude-flow <ruv@ruv.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant