Commit graph

8 commits

Author SHA1 Message Date
monkey-w1n5t0n
1127c8aac9 fix: default to visual mode (20 outputs) and fix FlowField canvas resize
Change default outputMode from 'synth' to 'visual' in ml-store.ts so
FlowField particles render immediately on page load. Fix FlowField
component canvas initialization: create visualizer in ResizeObserver
callback (after layout) instead of in createEffect (before layout
settles), preventing the default 300x150 canvas size issue. Add window
resize listener as fallback. Update all 13 affected tests to expect 20
outputs (visual mode default) instead of 126 (synth mode).

Unblocks VAL-VIS-001, VAL-VIS-002, VAL-VIS-003.

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
2026-04-07 19:01:55 +02:00
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