memlnaut-nisps/manifold/src/console
monkey-w1n5t0n 75e0e58067 fix(manifold): full-width input vector, dropped switches, MIDI churn, re-subscribe churn
Phase 2 (S10, L19, L18, L24).

- S10: EngineApi.inputVector() returned a freshly allocated [lastRawX, lastRawY]
  on every spine tick, so VCV bridged mode silently truncated gamepad/MIDI input
  to 2-D while the spine already held the full N-dim raw vector. It now returns
  spine.lastRawInputs (ArrayLike<number>, documented as a live reused buffer —
  copy, don't retain; VcvBackend already copies), and VcvBackend tracks and
  dead-zones the full length. Audit correction: "32-input head" is not a
  constant — 32 is DEFAULT_MODE_ML.inputSize, the over-provisioned default
  before any mode is chosen; real per-mode widths come from the schemas.
- L19: BackendManager.setActive silently dropped a switch requested while
  another was in flight. Now stores the latest requested id and re-runs it in
  the finally block (latest-caller-wins).
- L18: MIDI CC messages triggered a React state update plus a snapshot
  allocation each. notifyBindings now fires only when the binding LIST changes.
- L24: two ConsoleApp global-listener effects had no dependency array and so
  re-subscribed on every render, including every pointer frame. Both now read
  through a single ref assigned in the render body, matching the existing
  onMoveRef pattern. Audit correction: its suggested `[inputs]` dep would not
  have worked — useInputLayer returns a fresh object literal each call, so that
  dep changes every render too.

Regression tests: input-vector-truncation.test.ts, backend-manager-switch.test.ts
(a fake backend whose start() is held open, to make the in-flight switch real),
midi-notify-churn.test.ts (fail-before confirmed: 51 notifications vs 1).
L24 has no test — this repo has no DOM render harness to count re-subscriptions
against a mounted component; verified by reading and reference-stability tracing.

ALSO: manifold/package.json's test script named its test files explicitly
("bun test src tests/pipeline-golden.test.ts"), so the three new files were not
run by `bun run test` or CI — regression tests that never execute. Now a glob.
Deliberately `tests/*.test.ts` rather than `tests`: bun's discovery matches
*.spec.ts too, which would drag the Playwright e2e specs into the unit run
(verified — it fails). Unit tests go 9 -> 17.

Gates: run-all-tests.sh ALL GREEN.
2026-07-21 13:22:38 +02:00
..
CompositeStage.tsx feat(manifold): add convertible React front-end + simplify console chrome 2026-06-28 03:28:45 +02:00
ConsoleApp.tsx fix(manifold): full-width input vector, dropped switches, MIDI churn, re-subscribe churn 2026-07-21 13:22:38 +02:00
CurvePad.tsx feat(manifold): add convertible React front-end + simplify console chrome 2026-06-28 03:28:45 +02:00
Dock.tsx feat(manifold,firmware): restore uSEQ CV/gate as an Outputs backend 2026-06-28 22:30:54 +02:00
Drawers.tsx refactor(manifold): delete the dead console UI stratum 2026-07-21 12:49:25 +02:00
flow-field.ts style(manifold): on-theme heatmap-strip colours (brand orange→cyan ramp) 2026-06-28 20:46:48 +02:00
icons.tsx feat(manifold,firmware): restore uSEQ CV/gate as an Outputs backend 2026-06-28 22:30:54 +02:00
index.ts refactor(manifold): delete the dead console UI stratum 2026-07-21 12:49:25 +02:00
Manifold.tsx feat(manifold): follow-mouse knob (dbl-click mark) + 1/2 verdict keys 2026-06-29 00:45:45 +02:00
model.ts refactor(manifold): delete the dead console UI stratum 2026-07-21 12:49:25 +02:00
output-mode.ts refactor(manifold): delete the dead console UI stratum 2026-07-21 12:49:25 +02:00
OutputEditor.tsx fix(manifold): keep the output hover-editor inside the viewport 2026-06-28 22:21:18 +02:00
OutputStage.tsx feat(manifold): add convertible React front-end + simplify console chrome 2026-06-28 03:28:45 +02:00
ParticleStage.tsx fix(manifold): particle top bar = a-immersive heatmap strip, not macro axes 2026-06-28 20:34:34 +02:00
ReshapeModal.tsx feat(manifold): runtime-shaped net reshape with confirm modal (P2.3) 2026-07-14 03:54:12 +02:00
SandwichStage.tsx fix(manifold): correct SandwichStage 3D depth sort so tilt occludes right 2026-06-28 23:06:33 +02:00
shared-ui.tsx refactor(manifold): delete the dead console UI stratum 2026-07-21 12:49:25 +02:00
types.ts refactor(manifold): delete the dead console UI stratum 2026-07-21 12:49:25 +02:00
VerdictCluster.tsx refactor(manifold): delete the dead console UI stratum 2026-07-21 12:49:25 +02:00