wifi-densepose/dashboard
ruv dfe1ce8084 feat(dashboard): WsClient transport + ADR-092/093 status updates
## WsClient — full REST + binary WebSocket transport

New `dashboard/src/transport/WsClient.ts` implementing the same
NvsimClient interface as WasmClient. Talks to `nvsim-server`:

- REST control plane: /api/health, /api/scene, /api/config, /api/seed,
  /api/run, /api/pause, /api/reset, /api/step, /api/witness/{generate,verify},
  /api/export-proof
- Binary WebSocket data plane: /ws/stream — parses 32-frame MagFrame
  batches and forwards to the same onFrames subscribers WasmClient uses
- Transport-flip awareness: connection events emit log lines, fps signal
  is computed from incoming batches at 1-second granularity

## main.ts — transport-aware boot

- Restores `transport` + `wsUrl` preferences from IndexedDB at startup
- Watches `transport.value` and `wsUrl.value` signals; on change, tears
  down the active client and re-boots into the selected mode
- Auto-reverifies witness whenever a fresh transport boot completes —
  prevents drift in Settings drawer transport switching
- onFrames closure extracted so wireClient() can subscribe it on every
  re-boot without re-allocating runtime state

## ADR-092 status header + §11 acceptance table

Status changed from Proposed to "Implemented (2026-04-27)". §11
acceptance table now an explicit pass/fail matrix:
  8  — UI fidelity, determinism (WASM), throughput, bundle size,
        offline PWA, REPL parity, shortcut parity, witness UI
  4 ⚠ — formal axe scan, multi-browser, mode-switch byte-equivalence
        across deployed nvsim-server, full keyboard-only flow

The 4 ⚠ items require external infrastructure (axe-core CI, FF/Safari
test runs, deployed nvsim-server) or auditor sign-off; none are
blocked by the dashboard codebase.

## ADR-093 §5 iteration plan

Status changed from Proposed to "Mostly Implemented (2026-04-27)".
Iterations A through I (the originally-planned alphabet) plus three
new iterations J/K/L/M (UX usability pass, Home view, WsClient,
App Store runtime) all closed. 19 of 21 P0/P1/P2 items resolved;
remaining 2 are P2.4 (light-theme contrast color-system pass) and
P2.6 (keyboard arrow-key scene nav).

Validated end-to-end on https://ruvnet.github.io/RuView/nvsim/ —
transport-aware boot logs `transport WASM · nvsim@0.3.0 · magic=0xC51A6E70`
followed by `witness verified · determinism gate ✓ · transport=wasm`.
Switching to WS in Settings would now connect to a user-supplied
nvsim-server; the same auto-reverify fires after the flip.

Co-Authored-By: claude-flow <ruv@ruv.net>
2026-04-27 12:02:35 -04:00
..
public feat(nvsim): server + onboarding + PWA + GH Pages workflow [ADR-092] 2026-04-26 20:09:27 -04:00
src feat(dashboard): WsClient transport + ADR-092/093 status updates 2026-04-27 12:02:35 -04:00
.gitignore feat(dashboard): nvsim Vite+Lit dashboard with WASM transport + App Store [ADR-092] 2026-04-26 19:22:04 -04:00
index.html feat(dashboard): nvsim Vite+Lit dashboard with WASM transport + App Store [ADR-092] 2026-04-26 19:22:04 -04:00
package-lock.json feat(nvsim): server + onboarding + PWA + GH Pages workflow [ADR-092] 2026-04-26 20:09:27 -04:00
package.json feat(nvsim): server + onboarding + PWA + GH Pages workflow [ADR-092] 2026-04-26 20:09:27 -04:00
tsconfig.json feat(dashboard): nvsim Vite+Lit dashboard with WASM transport + App Store [ADR-092] 2026-04-26 19:22:04 -04:00
vite.config.ts feat(nvsim): server + onboarding + PWA + GH Pages workflow [ADR-092] 2026-04-26 20:09:27 -04:00