wifi-densepose/docs/adr
rUv 113011e704
fix: WebSocket race condition, data source indicators, auto-start pose detection (#96)
* feat: RVF training pipeline & UI integration (ADR-036)

Implement full model training, management, and inference pipeline:

Backend (Rust):
- recording.rs: CSI recording API (start/stop/list/download/delete)
- model_manager.rs: RVF model loading, LoRA profile switching, model library
- training_api.rs: Training API with WebSocket progress streaming, simulated
  training mode with realistic loss curves, auto-RVF export on completion
- main.rs: Wire new modules, recording hooks in all CSI paths, data dirs

UI (new components):
- ModelPanel.js: Dark-mode model library with load/unload, LoRA dropdown
- TrainingPanel.js: Recording controls, training config, live Canvas charts
- model.service.js: Model REST API client with events
- training.service.js: Training + recording API client with WebSocket progress

UI (enhancements):
- LiveDemoTab: Model selector, LoRA profile switcher, A/B split view toggle,
  training quick-panel with 60s recording shortcut
- SettingsPanel: Full dark mode conversion (issue #92), model configuration
  (device, threads, auto-load), training configuration (epochs, LR, patience)
- PoseDetectionCanvas: 10-frame pose trail with ghost keypoints and motion
  trajectory lines, cyan trail toggle button
- pose.service.js: Model-inference confidence thresholds

UI (plumbing):
- index.html: Training tab (8th tab)
- app.js: Panel initialization and tab routing
- style.css: ~250 lines of training/model panel dark-mode styles

191 Rust tests pass, 0 failures. Closes #92.

Refs: ADR-036, #93

Co-Authored-By: claude-flow <ruv@ruv.net>

* fix: real RuVector training pipeline + UI service fixes

Training pipeline (training_api.rs):
- Replace simulated training with real signal-based training loop
- Load actual CSI data from .csi.jsonl recordings or live frame history
- Extract 180 features per frame: subcarrier amplitudes, temporal variance,
  Goertzel frequency analysis (9 bands), motion gradients, global stats
- Train calibrated linear CSI-to-pose mapping via mini-batch gradient descent
  with L2 regularization (ridge regression), Xavier init, cosine LR decay
- Self-supervised: teacher targets from derive_pose_from_sensing() heuristics
- Real validation metrics: MSE and PCK@0.2 on 80/20 train/val split
- Export trained .rvf with real weights, feature normalization stats, witness
- Add infer_pose_from_model() for live inference from trained model
- 16 new tests covering features, training, inference, serialization

UI fixes:
- Fix double-URL bug in model.service.js and training.service.js
  (buildApiUrl was called twice — once in service, once in apiService)
- Fix route paths to match Rust backend (/api/v1/train/*, /api/v1/recording/*)
- Fix request body formats (session_name, nested config object)
- Fix top-level await in LiveDemoTab.js blocking module graph
- Dynamic imports for ModelPanel/TrainingPanel in app.js
- Center nav tabs with flex-wrap for 8-tab layout

Co-Authored-By: claude-flow <ruv@ruv.net>

* fix: WebSocket onOpen race condition, data source indicators, auto-start pose detection

- Fix WebSocket onOpen race condition in websocket.service.js where
  setupEventHandlers replaced onopen after socket was already open,
  preventing pose service from receiving connection signal
- Add 4-state data source indicator (LIVE/SIMULATED/RECONNECTING/OFFLINE)
  across Dashboard, Sensing, and Live Demo tabs via sensing.service.js
- Add hot-plug ESP32 auto-detection in sensing server (auto mode runs
  both UDP listener and simulation, switches on ESP32_TIMEOUT)
- Auto-start pose detection when backend is reachable
- Hide duplicate PoseDetectionCanvas controls when enableControls=false
- Add standalone Demo button in LiveDemoTab for offline animated demo
- Add data source banner and status styling

Co-Authored-By: claude-flow <ruv@ruv.net>
2026-03-02 13:47:49 -05:00
..
ADR-001-wifi-mat-disaster-detection.md feat: Add wifi-densepose-mat disaster detection module 2026-01-13 17:24:50 +00:00
ADR-002-ruvector-rvf-integration-strategy.md docs: update README, CHANGELOG, and associated ADRs for MERIDIAN 2026-03-01 12:06:09 -05:00
ADR-003-rvf-cognitive-containers-csi.md feat: Add 12 ADRs for RuVector RVF integration and proof-of-reality 2026-02-28 06:13:04 +00:00
ADR-004-hnsw-vector-search-fingerprinting.md docs: update README, CHANGELOG, and associated ADRs for MERIDIAN 2026-03-01 12:06:09 -05:00
ADR-005-sona-self-learning-pose-estimation.md docs: update README, CHANGELOG, and associated ADRs for MERIDIAN 2026-03-01 12:06:09 -05:00
ADR-006-gnn-enhanced-csi-pattern-recognition.md docs: update README, CHANGELOG, and associated ADRs for MERIDIAN 2026-03-01 12:06:09 -05:00
ADR-007-post-quantum-cryptography-secure-sensing.md feat: Add 12 ADRs for RuVector RVF integration and proof-of-reality 2026-02-28 06:13:04 +00:00
ADR-008-distributed-consensus-multi-ap.md feat: Add 12 ADRs for RuVector RVF integration and proof-of-reality 2026-02-28 06:13:04 +00:00
ADR-009-rvf-wasm-runtime-edge-deployment.md feat: Add 12 ADRs for RuVector RVF integration and proof-of-reality 2026-02-28 06:13:04 +00:00
ADR-010-witness-chains-audit-trail-integrity.md feat: Add 12 ADRs for RuVector RVF integration and proof-of-reality 2026-02-28 06:13:04 +00:00
ADR-011-python-proof-of-reality-mock-elimination.md feat: Add 12 ADRs for RuVector RVF integration and proof-of-reality 2026-02-28 06:13:04 +00:00
ADR-012-esp32-csi-sensor-mesh.md docs(adr-012): Update ESP32 CSI sensor mesh ADR to reflect implementation 2026-02-28 13:48:06 -05:00
ADR-013-feature-level-sensing-commodity-gear.md feat: Sensing-only UI mode with Gaussian splat visualization and Rust migration ADR 2026-02-28 14:37:29 -05:00
ADR-014-sota-signal-processing.md feat: Implement ADR-014 SOTA signal processing (6 algorithms, 83 tests) 2026-02-28 14:34:16 +00:00
ADR-015-public-dataset-training-strategy.md docs: Update ADR-015 with verified dataset specs from research 2026-02-28 15:14:50 +00:00
ADR-016-ruvector-integration.md docs(adr): Mark ADR-016 as Accepted — all 5 integrations complete 2026-02-28 15:46:44 +00:00
ADR-017-ruvector-signal-mat-integration.md fix: Complete ADR-011 mock elimination and fix all test stubs 2026-02-28 16:59:34 +00:00
ADR-018-esp32-dev-implementation.md docs(adr-018): Add ESP32 development implementation ADR 2026-02-28 17:11:51 +00:00
ADR-019-sensing-only-ui-mode.md feat: Sensing-only UI mode with Gaussian splat visualization and Rust migration ADR 2026-02-28 14:37:29 -05:00
ADR-020-rust-ruvector-ai-model-migration.md feat: Sensing-only UI mode with Gaussian splat visualization and Rust migration ADR 2026-02-28 14:37:29 -05:00
ADR-021-vital-sign-detection-rvdna-pipeline.md feat: Training mode, ADR docs, vitals and wifiscan crates 2026-02-28 23:50:20 -05:00
ADR-022-windows-wifi-enhanced-fidelity-ruvector.md feat: Training mode, ADR docs, vitals and wifiscan crates 2026-02-28 23:50:20 -05:00
ADR-023-trained-densepose-model-ruvector-pipeline.md feat: Training mode, ADR docs, vitals and wifiscan crates 2026-02-28 23:50:20 -05:00
ADR-024-contrastive-csi-embedding-model.md feat: ADR-024 Contrastive CSI Embedding Model — all 7 phases (#52) 2026-03-01 01:44:38 -05:00
ADR-025-macos-corewlan-wifi-sensing.md feat: Add macOS CoreWLAN WiFi sensing adapter and user guide 2026-03-01 02:15:44 -05:00
ADR-026-survivor-track-lifecycle.md feat(mat): add ADR-026 + survivor track lifecycle module (WIP) 2026-03-01 07:53:28 +00:00
ADR-027-cross-environment-domain-generalization.md docs: add gap closure mapping for all proposed ADRs (002-011) to ADR-027 2026-03-01 11:51:32 -05:00
ADR-028-esp32-capability-audit.md feat: 100% validated witness bundle with proof hash + generator script 2026-03-01 15:51:38 -05:00
ADR-029-ruvsense-multistatic-sensing-mode.md docs: add RuvSense sensing-first RF mode architecture 2026-03-02 00:17:30 +00:00
ADR-030-ruvsense-persistent-field-model.md docs: add RuvSense persistent field model, exotic tiers, and appliance categories 2026-03-02 01:59:21 +00:00
ADR-031-ruview-sensing-first-rf-mode.md feat: combine ADR-029/030/031 + DDD domain model into implementation branch 2026-03-01 21:25:14 -05:00
ADR-032-multistatic-mesh-security-hardening.md feat: ADR-032a midstreamer QUIC transport + secure TDM + temporal gesture + attractor drift 2026-03-01 22:22:19 -05:00
ADR-033-crv-signal-line-sensing-integration.md feat: ADR-033 CRV signal-line integration + ruvector-crv 6-stage pipeline 2026-03-01 22:21:59 -05:00
ADR-034-expo-mobile-app.md feat: Implement RSSI service for iOS and Web platforms 2026-03-02 10:30:33 -05:00
ADR-035-live-sensing-ui-accuracy.md docs: update ADR-035 with dark mode, render modes, pose_source fix 2026-03-02 11:08:13 -05:00
ADR-036-rvf-training-pipeline-ui.md fix: WebSocket race condition, data source indicators, auto-start pose detection (#96) 2026-03-02 13:47:49 -05:00