Skip to content

refactor(mvvm): Device Setup draft + selector ownership in approved native GUI (MV-2) - #768

Closed
masarray wants to merge 5 commits into
mainfrom
refactor/mv2-device-draft-selectors-20261118
Closed

masarray wants to merge 5 commits into
mainfrom
refactor/mv2-device-draft-selectors-20261118

Conversation

@masarray

Copy link
Copy Markdown
Owner

Why (real feature extension, not file shuffle)

After merged #765, native Device Setup still changed backend/capture/playback/rate/buffer/physical-pin draft directly inside DOM callbacks, and its Apply-enabled rules were duplicated in rendering. On combined non-separate JUCE devices, selecting another output left capture on the previous endpoint, preventing Apply.

Delivered

  • Pure setupInitialDraft, setupEditDraft, setupUiModel own ephemeral editable selection and UI affordances.
  • setupBegin reuses the same setupValidSelection predicate used by the Apply button (one rule).
  • Selecting a combined-device output updates capture to the same physical name and clears stale pins/rate/buffer. Invalid pin/rate/driver edits fail closed; output-only selection survives dialog reopen.
  • Native assembled /preview/ bridge only translates real DOM events to pure model operations and paints their results; retains single arMixAction dispatcher, NativeDeviceApplyCoordinator, ACK, v6 readback, and G0/M4/ChannelId PCM distinctions.
  • Three new isolated Node tests cover output-only, combined-identity, immutable pin/rate guards + bridge call contract.

Measurable baseline and delta

  • web/approved-native-bridge.js: 4228 → 4184 lines (-44); removed inline draft mutator and duplicate option/Apply-state decisions.
  • web/approved-device-view-model.js: 225 → 338 lines (+113); explicit pure unit-test seam (without JUCE/ASIO).
  • Scope: 3 JS/test files. 0 C++ files; no DSP, mixer, plugins, session schema, visual assets, or native dispatcher changed.

Required evidence before merge

  • Fast UI/Native contracts on exact HEAD; deliberate full Chromium native /preview/ (one ui dispatch after fast CI).
  • Compare latest main and any overlapping PR HEAD before merge. Physical dual-ASIO FAT NOT RUN; this PR does not implement multi-device I/O.
  • No sound or SonKu/ImmerSIB changes.

@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: 14a17bd
Status:🚫  Build failed.

View logs

Copy link
Copy Markdown
Owner Author

/arsonmix-ci ui 14a17bd

Copy link
Copy Markdown
Owner Author

CI efficiency workstream instruction — owner request, independent audit 18 Nov 2026

Goal: speed up practical MVVM development while preserving EXACT-HEAD reliability and release quality, not merely delete tests. This is nonblocking guidance to the PR #768 working thread. PR #767 was already MERGED; audit current main and reconcile #768 against that source before any further work. DO NOT reimplement the overlapping Device Setup draft/selector work or silently merge both variants.

Measured GitHub evidence: normal fast UI PR run #44196523503 completed in ~34 seconds and deliberately SKIPPED the full Chromium job; exact-SHA owner-dispatched full UI #44189797846 completed in ~8m45s and was SUCCESS. Thus the repository already avoids running full Chromium on every PR commit. There is no evidence it is necessary to remove essential coverage or replace CI framework.

Task split: Complete/reconcile the MV-2 functional PR first. If optimizing CI, use a separate, narrow CI-only PR, after an explicit audit of .github/workflows/ui-smoke.yml, p1-windows.yml, scripts/required_pr_merge_gate.mjs, docs/SMART_CI_RUNNER_WORKFLOW.md, and tests. Do NOT mix workflow refactors and Device Setup logic in the same diff. Do NOT create duplicate CI implementations on parallel branches.

Safe optimization candidates:

  1. Benchmark exact run/job/step timings and cold setup costs; distinguish normal fast (~34s), full Chromium (~8m45s), Windows MSVC and release FAT; report real before/after wall time, runner-minutes, and test counts.
  2. Keep fast deterministic Node contract tests and bundle/source syntax per PR commit. Add targeted MVVM Device Setup tests covering combined ASIO endpoint, output-only, negative/stale ACK, offline .smix, readback and device generation vs routing epoch divergence; do NOT substitute static regex checks for the actual behavioral tests.
  3. Run one full exact-SHA native-assembled /preview/ Chromium UI qualification at a meaningful milestone before merge. Preserve browser smoke, popup/click/resize, source/output mapping and ACK/readback coverage. Avoid repeated same-SHA dispatch; use existing dispatcher de-duplication. Reuse browser installation/cache where correctly keyed, consolidate setup, optionally parallelize safe independent test shards. Keep historical CSS tests opt-in when appropriate.
  4. Keep Windows MSVC/full CTest for native C++/device/graph changes, FAT for a real installer/physical device milestone; don't trigger Windows for pure JS presentation-only.
  5. Never weaken protected required status checks, requiredLanes(), exact HEAD/source provenance, fail-closed pending/failure logic, main Pages publishing protections, branch protection, or hardware FAT requirements. Do not produce green status through skip/cancel/neutral outcomes. If changing trigger paths, prove each relevant source path still triggers or requires an independently verifiable run; add negative gate tests.
  6. Check PR refactor(mvvm): one native Device Setup draft and selection ViewModel #767 merged vs refactor(mvvm): Device Setup draft + selector ownership in approved native GUI (MV-2) #768 latest changed files before working; no ownership locks, no waiting for other threads, no unrelated CI gating. CI optimization is separate from GUI architecture and Multi-Device engine.

Acceptance: CI-only PR with measured wall/runner-time improvement without reduced scope; PR source tests for changed-files matrix (GUI JS, bridge, CSS/asset, native C++, docs, release, missing/pending/failing runs); tested exact-SHA workflow paths; report what was NOT run. If measurement shows fast lane is already sufficiently efficient, DO NOT make cosmetic YAML refactors—return to shipping real GUI modularization.

Operator report: HASIL, STATUS, AMAN DIPAKAI?, TINDAKAN ANDA, BUKTI PR/SHA/CI before/after, BERIKUTNYA. No new audio installer is implied by workflow changes.

Copy link
Copy Markdown
Owner Author

MV-2 reconciliation: SUPERSEDED — DO NOT MERGE THIS PR

On final verification, PR #767 independently merged to main as 3fb4c17cc4e8a6d4c23ee3fd229aceb67e216be9 (one canonical Device Setup draft/selector VM). This PR #768 was an overlapping alternative based on the pre-#767 main; merging it as a second MV-2 implementation would duplicate selectors and potentially regress the already merged code. Therefore #768 is closed without merge, not force-pushed and not bulk-cherry-picked.

Exact alternative HEAD: 14a17bd94d117fe012630f014a373a813eaab46a. Full native-assembled Chromium /preview/ UI #44197725729 SUCCESS, fast UI #44197503312 SUCCESS, fast native #44197503306 SUCCESS for that alternative SHA. These successful tests are retained as evidence of the alternative, not proof it should replace the merged #767.

Reviewed unique ideas for follow-up from #768, excluding duplicated drafts/selectors:

  1. Non-separate (duplex) driver Output change must simultaneously select the same Input endpoint; refactor(mvvm): one native Device Setup draft and selection ViewModel #767's current setupEditDraft changes playback only and leaves an impossible mismatched pair.
  2. Same-device physical playback mask with fewer than two pins must fail closed in both Apply-enabled projection and request creation.
  3. Regression tests for changed output selection, stale hardware masks, and compiled native Chromium selector behavior.

Any needed corrections will be forward-ported as minimal edits against merged main, not by merging this branch. Subsequent ownership moves to GUI-1 Channel Strip + Source/Output presentation; no ASIO engine/DSP changes. This is nonblocking cross-thread status.

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