Commit graph

10 commits

Author SHA1 Message Date
monkey-w1n5t0n
b9e330beb4 feat(solidjs): implement fullscreen Canvas2D flow-field particle system driven by ML outputs
Transplant FlowFieldVisualizer from playground/js/ui/visualizer.js with TypeScript
types. Create SolidJS FlowField component with own rAF render loop, reactive to
output mode changes. Canvas resizes via ResizeObserver. Add 8 e2e tests covering
VAL-VIS-001 (particles render), VAL-VIS-002 (joystick changes flow), VAL-VIS-003
(canvas resizes with window).

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
2026-04-07 18:15:49 +02:00
monkey-w1n5t0n
3c4e45aa5d feat(solidjs): implement joystick component with pointer events, input store, and follow mode
Build touch/mouse joystick component that tracks drag position as [0,1]
coordinates. Implements:
- Input store (src/stores/input-store.ts) with joyX/joyY signals
- Joystick component (src/components/input/Joystick.tsx) with canvas
  rendering, pointer events, and follow mode toggle
- Input clamping for out-of-range values (NaN, Infinity, negative, >1)
- Follow mode badge with pulse animation
- 12 e2e tests covering VAL-JOY-001, VAL-JOY-002, VAL-JOY-005

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
2026-04-07 17:51:05 +02:00
monkey-w1n5t0n
9887bf50c9 feat(solidjs): implement reactive inference loop with NaN-safe clamping and comprehensive e2e tests
- Add NaN/Infinity guard in MLStore.setInputs() — non-finite values map to 0.5 (center)
- Add 14 e2e tests covering VAL-ML-004 (different inputs → different outputs) and
  VAL-ML-005 (synchronous inference — getOutputs immediately reflects setInputs)
- Tests cover: position differentiation, sequential consistency, clamping verification,
  boundary values, NaN handling, bus emission, and determinism

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
2026-04-07 17:34:34 +02:00
monkey-w1n5t0n
6fdc2985f9 feat(solidjs): implement ML store with dual WasmIML instances and dynamic output count
Create ML store wrapping dual WasmIML instances (imlJoy for joystick with
2 inputs, imlHand for hand tracking with 14 inputs) with warm-start weight
transfer on mode switch. Outputs stored as Float32Array signal. Mode switching
triggers MLP resize (visual=20, synth=126, midi-cc=8, audio-canvas=36).
Initial state: 0 examples, null loss, all outputs bounded [0,1].

Fulfills: VAL-ML-001, VAL-ML-002, VAL-ML-022

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
2026-04-07 17:23:06 +02:00
monkey-w1n5t0n
4613cbbbde feat(solidjs): extract debug probe module with comprehensive e2e tests
Extract window.__nisps debug probe into its own module (src/probe/debug-probe.ts)
with typed DebugProbe interface. Probe is only exposed when ?debug=1 is present.
Add 17 Playwright e2e tests validating VAL-PROJ-005 and VAL-PROJ-006, including
method enumeration, smoke tests for all 15 methods, and undefined check without debug flag.

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
2026-04-07 16:42:15 +02:00
monkey-w1n5t0n
f3252008e5 feat(solidjs): implement reactive signal bus with wildcard matching
Add signal bus (src/bus/signal-bus.ts) with:
- Named topics using createSignal with equals:false for event semantics
- emit() triggers all subscribers even with identical data
- subscribe() returns unsubscribe function
- match() with wildcard patterns: * (single segment) and ** (multi-segment)
- Callable topic interface (topic() reads current value)

Wire bus into App.tsx, expose as window.__nispsBus for tests.
10 e2e tests covering all bus behaviors (VAL-PROJ-004).

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
2026-04-07 16:29:09 +02:00
monkey-w1n5t0n
7337e8eaed feat(solidjs): set up Vite + SolidJS project with WASM inference
- Vite config with COOP/COEP headers for SharedArrayBuffer
- SolidJS app renders at root URL without JS errors
- WASM ML engine loads and inference returns 126 bounded [0,1] outputs
- Debug probe (window.__nisps) exposed only with ?debug=1
- TypeScript strict mode with complete type coverage
- Playwright e2e tests (8 tests) for VAL-PROJ-001/002/003
- WasmIML TypeScript port from playground/js/nisps/nisps-wasm.js
- Dataset TypeScript port with FIFO ring buffer and sample weighting

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
2026-04-07 16:17:08 +02:00
w1n5t0n
960676acf3 feat(tests): add 24 Playwright e2e tests for engine switching + fix hidden param filtering
Tests cover:
- Default state (C15, 126 params, heatmap cells)
- Engine switcher UI (3 cards, active state)
- Switch to Additive (48 params, outputs bounded, training works)
- Switch to FM Matrix (55 params, outputs bounded, training works)
- Round-trip switching (C15→Add→C15, C15→FM→Add→C15)
- Warm-start weight preservation across resize
- EOC chain accessibility across engines
- SynthVisualizer visibility across engines
- No console errors during any switch

Also fixes: faustJsonToParamMeta now filters [hidden:1] params,
giving correct counts (48 additive, 55 FM) instead of including
freq/gate/_vel control inputs.
2026-04-03 19:28:23 +01:00
w1n5t0n
f81f0cc51d test(e2e): add 11 tests for new WASM API methods
Cover inferBatch, evalLoss, getLayerStats, lossHistory, and
moveWeights pin mask — verifying correctness, bounds, and
weight preservation semantics.
2026-04-03 17:22:13 +01:00
w1n5t0n
44fc974425 feat(tests): add Playwright e2e suite + debug probe for a-immersive
- Add window.__nisps debug probe (gated on ?debug=1) exposing iml state,
  getOutputs/getLoss/getWeights/getExampleCount, and action triggers
  (thumbsUp/thumbsDown/train/randomise/clearExamples/saveState)
- Fix WasmIML bug: this.dataset was a plain object; import Dataset and
  use new Dataset(100) so computeWeights() is available for training
- Fix WasmIML.addExample/clearDataset to use Dataset API methods
- 44 Playwright e2e tests across 4 spec files:
  - ml-engine.spec.js: WASM inference bounds, training loss, thumbs
    up/down behavior, async training, example capture semantics
  - ui-interactions.spec.js: drawer open/close, mode switching,
    heatmap bar counts, preset chips, keyboard shortcuts (1/2/Z)
  - input-pipeline.spec.js: input→output variation, clamping, joystick
    drag, post-training output bounds across the full input space
  - persistence.spec.js: URL params (?preset, ?spread), localStorage
    round-trip, saveState probe
2026-04-03 16:38:04 +01:00