Skip to content

refactor(mvvm): one native Device Setup draft and selection ViewModel - #767

Merged
masarray merged 5 commits into
mainfrom
refactor/native-device-setup-draft-vm-mv2-20261118
Nov 17, 2026
Merged

masarray merged 5 commits into
mainfrom
refactor/native-device-setup-draft-vm-mv2-20261118

Conversation

@masarray

@masarray masarray commented Nov 17, 2026 •

Copy link
Copy Markdown
Owner

MV-2: Device Setup draft + selectors in the existing /preview/ ViewModel

Extends MERGED #765 on current main. No new native device dispatcher/PCM renderer/GUI.

Before: the approved native bridge still mutated Device Setup deviceChoice.backend/capture/playback/inputPins/outputPins/rate/buffer, constructed dropdown options and inferred enabled physical pins and Apply/MAIN/remap eligibility alongside DOM painting.

Now: web/approved-device-view-model.js owns pure setupDraft, setupEditDraft, setupPresentation and shared endpoint matching. Immutable, validated draft transitions keep duplex names paired, allow output-only on separate backends, reject absent pins/rates and retain native readback. web/approved-native-bridge.js only forwards DOM choices, renders the VM projection, and submits via the same arMixAction:audioDeviceApply; prior mutable switch branches and duplicate eligibility logic are removed. The merged #765 ACK/negative ACK/timeout/readback state machine is unchanged.

Safety: only approved bundled native /preview/, schemaVersion=6 and native src/NativeDeviceApplyCoordinator.h; no native C++ change, ASIO callback alteration, FIFO/ASRC, dual ASIO, second FX/VST3 graph, .smix mutation, GUI CSS/PNG, SonKu/ImmerSIB or installer change. Different thread work remains nonblocking.

Contracts: four new deterministic Node regression cases in tests/approved_native_m2_contract.test.cjs: initial verified selectors and pure inventory; backend/duplex/output-only switching; rates/buffer/MAIN pins/forged indices/rollback preserving installed masks; DOM bridge decoupling with exactly one native dispatch. Existing full schema-v6 and Chromium cold-start scripts remain.

Exact branch HEAD when created: d52822d6eede12fc3e3597ee77fbf60598af7d61; base main@c8fd3a8480b4dac485ff0636caf41f52603883c3. Fast CI and exact-SHA full Chromium are PENDING until verified; hardware testing NOT RUN. C++ unchanged → native CTest not required for this presentation-only PR.

Operator report: HASIL = pilih driver/input/output/rate/buffer/pin di native Device Setup sekarang lewat satu pure ViewModel, bukan logika duplikat bridge. STATUS = KODE DIBUAT (BELUM DIUJI). AMAN DIPAKAI? BELUM sebagai installer baru; source tidak menyentuh DSP. TINDAKAN ANDA = TIDAK PERLU MELAKUKAN APA-APA. LANGKAH BERIKUTNYA = fast Node/Python contracts, full native-assembled Chromium, exact SHA merge, then evaluate MV-3 read-model without creating a second authority.

Exact-SHA verification update (2026-11-18)

  • HEAD 9b6533535021f99fcc700255e6f66c7b2b47ff22, based on main@c8fd3a8480b4dac485ff0636caf41f52603883c3 (refresh before merge).
  • Fast Native Node/Python: PASS run #44196046433, including all new MV-2 tests.
  • Fast UI source/contract checks: PASS run #44196046290.
  • Full native-assembled Chromium: IN PROGRESS run #44196229867; must not mark as PASS before completion.
  • C++ unchanged, native MSVC/CTest NOT RUN; ASIO/hardware and installer NOT RUN.
  • User status: KODE DIUJI (source), PR DRAFT/NOT MERGED; no user action and no replacement installer.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

Deploying arsonmix with  Cloudflare Pages  Cloudflare Pages

Latest commit: 9b65335
Status: ✅  Deploy successful!
Preview URL: https://d09889f3.arsonmix.pages.dev
Branch Preview URL: https://refactor-native-device-setup.arsonmix.pages.dev

View logs

Copy link
Copy Markdown
Owner Author

/arsonmix-ci ui 9b65335

masarray added a commit that referenced this pull request Nov 17, 2026
@masarray
masarray marked this pull request as ready for review November 17, 2026 23:17
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 17, 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-17T23:19:06.191441Z 9b65335 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 3fb4c17 into main Nov 17, 2026
42 checks passed

Copy link
Copy Markdown
Owner Author

CHECKPOINT MV-2 — 18 November 2026 — completed and merged

HASIL: Device Setup on the real bundled native /preview/ GUI now uses one existing pure web/approved-device-view-model.js for transient draft creation, immutable driver/capture/playback/rate/buffer/pin edits, physical selectors, Apply/MAIN/remap eligibility. The old mutable choice branches and duplicate selection rules were deleted from web/approved-native-bridge.js, leaving only DOM binding/event forwarding and the one original native arMixAction: audioDeviceApply. Previous #765 ACK/negative ACK/stale generation/timeout/readback remains the same owner. Four new MV-2 Node contracts prove output-only, duplex, stale/unreported pins, immutability and the single dispatcher. Operator layout/assets unchanged.

STATUS: SUDAH MERGED KE MAIN. PR #767 original head 9b6533535021f99fcc700255e6f66c7b2b47ff22 merged as squash 3fb4c17cc4e8a6d4c23ee3fd229aceb67e216be9; base pre-merge c8fd3a8480b4dac485ff0636caf41f52603883c3. The prior MV-1 lifecycle #765 was already merged; no duplicate extraction was created.

AMAN DIPAKAI? YA untuk source di main yang telah melewati kontrak UI/native; BELUM diklaim terpasang atau teruji pada hardware/installer baru. Zero C++/PCM/ASIO/DSP/VST3/FX Rack/.smix/graphics/installer modifications. No dual-ASIO, multi-device adapters, physical audio FAT or audio output auto-arm introduced.

BUKTI: Fast Native and source regression PASS #44196046433; Fast UI PASS #44196046290; exact-head Full Chromium approved GUI and G1/G2 native I/O PASS #44196229867; latest PR Ready-for-Review fast native/UI and Required Merge Gate PASS #44198006393, #44198006382, #44198007099. C++ MSVC/CTest NOT RUN (C++ unchanged). Hardware FAT / installer build NOT RUN. Post-merge push CI on main@3fb4c17c initially IN PROGRESS; do not mislabel as PASS until verified.

TINDAKAN ANDA: TIDAK PERLU MELAKUKAN APA-APA. Jangan mengganti installer untuk mengevaluasi MV-2: tidak ada installer baru pada PR ini.

LANGKAH BERIKUTNYA: Continue MV-3 scoped consolidation of native read-model (without parallel LIVE authority), or IO-0 actual device feasibility before secondary capture adapter; preserve canonical schemaVersion=6 ChannelId/EdgeId, primary direct ASIO, one mixer/FX render owner, exact /preview/ and nonblocking parallel thread integration. Never claim dual-vendor ASIO until physical proof.

masarray added a commit that referenced this pull request Nov 18, 2026
…769)

One native /preview/ Channel Strip presentation ViewModel, native readback/pending guarded outputs; preserve merged #767 Device Setup VM as sole draft/Apply authority. Exact-head UI/native/release contracts, required gate, and full Chromium PASS. No C++/ASIO/DSP/GUI asset edits.
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