Skip to content

refactor(mvvm): native FX Rack scalar/readback presentation ViewModel (GUI-2) - #773

Merged
masarray merged 9 commits into
mainfrom
refactor/mvvm-native-fx-rack-readback-20261118
Nov 18, 2026
Merged

masarray merged 9 commits into
mainfrom
refactor/mvvm-native-fx-rack-readback-20261118

Conversation

@masarray

Copy link
Copy Markdown
Owner

GUI-2 — Native FX Rack readback ViewModel, one accepted DSP/PCM authority

Milestone (implementation, not docs): Extract rack/global/individual-insert power and label/latency projection from the 4,153-line web/approved-native-bridge.js into pure web/approved-fx-rack-view-model.js. A second pure function verifies that every mounted FX control belongs to the exact accepted native instanceId + slot before ANY DOM write. The bridge is now the DOM adapter; it retains the same native ACK/request dispatcher and never owns DSP/VST3/session state. On stale or replaced FX instance it returns false, invoking the existing structural re-projection from the accepted graph.

Delivered source

  • web/approved-fx-rack-view-model.js — powerReadback and mountedRackMatches. Only passed native snapshot determines rack enabled, global bypass, independent per-slot bypass/effective flags, header/slot labels and latency warning. Missing/incomplete readback is null, not a fabricated ON. No DOM, callback, state storage or dispatch.
  • web/approved-native-bridge.js — removed old bypass/effective/label policy and inline instance-mount matcher, paints the pure projection only. Existing GAIN/SOF alternate views, virtualized banks, held faders, focus, and exact slot-power button identity remain unchanged. Rejects noncanonical DOM slot tokens and changed instance owner before writing.
  • scripts/build_approved_native_gui.py — adds the VM before bridge only in the existing native-assembled /preview/ bundle, not public Pages. Asset byte parity and HTML reversal remain.
  • tests/approved_native_m2_contract.test.cjs — pure scenario coverage for rack-vs-slot-vs-global power, missing native fields, readback immutability, latency metadata, wrong/stale/duplicate slot ids, and refactor boundary. Existing comprehensive mounted DOM / negative ACK and still-captured fader regression retained.
  • tests/live_fader_held_drag.test.cjs, tests/approved_native_gui_bundle_test.py, tests/approved_native_cold_start_smoke.py — existing harness receives the VM, verifies native-only injection and actual assembled Chromium VM.

Measured delta from branch base: bridge 4,153 → 4,133 lines (about 20 responsibility lines removed); one 68-line pure VM. Feature commands are unchanged, removed old combined selector/painter decision; no duplicate source-of-truth. No C++, ASIO/PCM, FX processing, signal routing, .smix, CSS, HTML layout, SonKu/ImmerSIB or plugin editor modifications.

Conflict avoidance: #769 GUI-1 already merged in main@c733b102718ad7203e8e27094d76b037b1149de6; #768 duplicate closed unmerged; independent #771 IO-1 C++ keeps its branch untouched. This branch starts on latest merged GUI-1.

Verification requirement: Fast native/fast UI Node+Python on exact HEAD, then one explicit full Chromium native-/preview/ on final SHA before merge. C++ unchanged: MSVC/CTest not required. Physical ASIO, installer, audio FAT NOT RUN, this PR does not claim new audio features. Do not merge until exact-head required gate and CI pass.

Owner-facing HASIL: FX rack readback code separated into testable pure model, native controls unchanged. STATUS: KODE DIBUAT / CI PENDING. AMAN DIPAKAI? not as a new installer, source scope presentation-only. TINDAKAN ANDA: TIDAK PERLU MELAKUKAN APA-APA. LANGKAH BERIKUTNYA: fix any deterministic/Chromium regressions, merge, then continue WIRE readback selectors without second graph.

Copy link
Copy Markdown
Owner Author

/arsonmix-ci ui 1b3d124

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying arsonmix with  Cloudflare Pages  Cloudflare Pages

Latest commit: 1b3d124
Status: ✅  Deploy successful!
Preview URL: https://78625036.arsonmix.pages.dev
Branch Preview URL: https://refactor-mvvm-native-fx-rack.arsonmix.pages.dev

View logs

Copy link
Copy Markdown
Owner Author

GUI-2 owner checkpoint — native FX Rack readback MVVM (2026-11-18)

HASIL: Pure web/approved-fx-rack-view-model.js now owns FX Rack/Global FX/slot power readback, latency/button labels, and exact instance+slot mount validation; web/approved-native-bridge.js stopped duplicating those presentation decisions and still owns only DOM paint + original native transport/ACK. One user-approved native-assembled /preview/ UI, no new audio authority, no CSS/PNG/HTML, no C++/ASIO/DSP/VST3 edits. The old, wrong-instance FX DOM is rejected before a write, and replaced only from the accepted graph.

STATUS: KODE DIBUAT / Fast CI KODE DIUJI, PR #773 OPEN DRAFT, NOT YET MERGED. Exact SHA 1b3d1241faf9cc1bae6f56f12e5e604224dbe0b7 based on merged GUI-1 main@c733b102718ad7203e8e27094d76b037b1149de6.

Proof: Fast Native 44226458270 PASS; Fast UI 44226458272 PASS; release contracts 44226458265 PASS; Required Merge Gate 44226458509 PASS. FULL exact-SHA Chromium 44226621568 IN PROGRESS, including native-assembled FX/fader tests; do not mark PASS before completion. Physical hardware / Windows MSVC / installer / acoustic FAT NOT RUN (no native code changes).

AMAN DIPAKAI? Safe source-only presentation isolation, not proof of new installer or physical audio. Installed FX engine/PCM path unchanged. No demo LIVE authority.

TINDAKAN ANDA: TIDAK PERLU MELAKUKAN APA-APA.

LANGKAH BERIKUTNYA: finish same-SHA Chromium; only if PASS and main reconciled, make Ready and merge. Next separate vertical slice is WIRE selectors/readback or MV-3 native snapshot consolidation without duplicating the accepted graph.

@masarray
masarray marked this pull request as ready for review November 18, 2026 03:03
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-18T03:05:24.555470Z 1b3d124 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@masarray
masarray merged commit 87a1abe into main Nov 18, 2026
43 checks passed

Copy link
Copy Markdown
Owner Author

OWNER DELIVERY — GUI-2 FX Rack Modular MVVM • 18 November 2026

HASIL: Native approved /preview/ FX Rack global/rack/slot power readback, plugin delay/tooltips and exact mounted slot+instance identity are now pure functions in web/approved-fx-rack-view-model.js (68 lines). The existing web/approved-native-bridge.js has removed the old inline rules and delegates only DOM writing. This preserves live fader capture, FX GAIN/SOF alternate views, slot bypass independence, existing FX instances and one native accepted PCM/VST3 graph. No visual change, no second DSP engine or JS-authoritative session.

STATUS: MERGED MAIN, PR #773 squash commit 87a1abe439fd3d5cc205338e2758cba1d9c0cff7 (verified live branch HEAD). Feature exact SHA 1b3d1241faf9cc1bae6f56f12e5e604224dbe0b7.

AMAN DIPAKAI? YA for the merged source-only GUI presentation refactor under the existing approved application; BELUM as a new installer/hardware-qualified build. Audio DSP/native device and .smix unchanged.

TINDAKAN ANDA: TIDAK PERLU MELAKUKAN APA-APA.

BUKTI: Fast Native 44226458270 PASS, Fast UI 44226458272 PASS, Full exact-head Chromium native assembled 44226621568 PASS (109/109 steps), Required Merge Gate SUCCESS before squash merge, merge HEAD 87a1abe439fd3d5cc205338e2758cba1d9c0cff7. Windows MSVC/CTest and physical ASIO FAT NOT RUN / not needed for JS-only change. Postmerge push quick checks pending at merge time; do not claim installer or acoustic FAT.

LANGKAH BERIKUTNYA: Separate GUI-3/WIRE or MV-3 native read-model consolidation, preserving one accepted ChannelId/EdgeId graph and no duplicate transport. Independent IO-1 native capture PR #771 untouched; it has its own MSVC/hardware evidence.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant