From d0a318e405989505bfdcada2645f6319b4e5553b Mon Sep 17 00:00:00 2001 From: Ari Sulistiono Date: Thu, 29 Oct 2026 16:11:03 +0700 Subject: [PATCH 1/7] R1: add polished native input patchbay surface and routing workspaces --- web/monitor.js | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/web/monitor.js b/web/monitor.js index 349133b09..253a4a4c7 100644 --- a/web/monitor.js +++ b/web/monitor.js @@ -37,6 +37,8 @@ "#arRouteApply{background:#237566;border-color:#4ba48d}#arRouteStop{background:#50343c;border-color:#a8717c}" + "#arRouteFeedback{font-size:11px;min-height:18px;color:#8bdec1;margin-top:10px}" + ".arAuxRow{display:grid;grid-template-columns:64px 52px 90px 70px 1fr;align-items:center;gap:7px;padding:7px;background:#0c202b;border-bottom:1px solid #36515f;font-size:11px}.arAuxRow label{display:flex;gap:4px;align-items:center}.arAuxRow select{min-width:0;width:100%;background:#0c202b;color:#dcecf3;border:1px solid #496b7a;padding:6px;border-radius:4px}#arAuxReturns h3{font-size:12px;color:#b1d4dd;margin:14px 0 8px}#arAuxReturns p{color:#90afbc;font-size:10px;margin:4px 0 7px}"; + // R1 native-only patchbay: static CSS with cheap hover. No filter/blur/animations. + css.textContent += "\n#arRoutingLabOverlay{background:#06121ccc}\n#arRoutingLabPanel{width:min(1110px,97vw);max-height:92vh;padding:0;background:#182a36;border:1px solid #68808c;border-radius:7px;overflow:auto;box-shadow:0 12px 32px #0009}\n.arPatchTop{padding:15px 20px;display:flex;align-items:center;justify-content:space-between;gap:12px;background:linear-gradient(#344955,#1a2c38);border-bottom:1px solid #45606e}\n.arPatchBrand{font-size:16px;font-weight:800;letter-spacing:.025em;color:#ecf3f5}\n.arPatchBrand em{font-size:11px;font-style:normal;font-weight:650;color:#9bdfdf;letter-spacing:.12em;margin-left:8px}\n.arPatchSub{color:#b0c6d0;font-size:10px;margin-top:5px}\n.arPatchTabs{display:flex;gap:5px;padding:10px 19px;background:#142733;border-bottom:1px solid #334d5a}\n.arPatchTabs button{border:1px solid transparent;border-radius:3px;background:#182c39;color:#9cb5c1;font-size:11px;letter-spacing:.05em;font-weight:700;padding:9px 16px;cursor:pointer}\n.arPatchTabs button[aria-selected=true]{background:#2a5262;color:#eaf9fa;border-color:#6093a4}\n.arPatchTabs button:hover{background:#2d4553;color:#fff}\n.arPatchTabs button:focus-visible,.arPatchGrid button:focus-visible{outline:2px solid #91e8dc;outline-offset:-2px}\n.arPatchBody{padding:16px 20px 6px;min-height:360px}\n.arPatchHeading{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:12px;margin-bottom:12px}\n.arPatchHeading strong{color:#e1f2f5;font-size:12px;letter-spacing:.09em}\n.arPatchHeading small{display:block;margin-top:5px;font-size:10px;color:#a5c2cc}\n.arPatchPager{display:flex;align-items:center;gap:8px;color:#c2d4dc;font-size:10px}\n.arPatchPager button{border:1px solid #5a7b88;background:#253b48;border-radius:3px;color:#e6eff4;padding:6px 12px;cursor:pointer}\n.arPatchPager button:disabled{opacity:.3;cursor:default}\n.arPatchViewport{border:1px solid #426071;border-radius:4px;overflow:auto;background:#0c1d28}\n.arPatchGrid{display:grid;min-width:650px;width:100%;font-variant-numeric:tabular-nums}\n.arPatchCorner,.arPatchPort,.arPatchChan,.arPatchCell{min-width:0;box-sizing:border-box;min-height:39px;border:0;border-right:1px solid #25404e;border-bottom:1px solid #263d4b}\n.arPatchCorner{padding:13px 10px;position:sticky;left:0;z-index:2;background:#263d4a;color:#d3e9f0;font-size:10px;font-weight:700}\n.arPatchPort{background:#243b49;display:flex;flex-direction:column;align-items:center;justify-content:center;color:#ebf5fa;font-size:10px;font-weight:750;padding:4px;white-space:nowrap}\n.arPatchPort small{color:#aac3ce;font-weight:400;font-size:9px;text-overflow:ellipsis;overflow:hidden;max-width:100%}\n.arPatchChan{position:sticky;left:0;z-index:1;background:#1c3240;display:flex;gap:7px;align-items:center;padding:5px 8px}\n.arPatchChan strong{font-size:11px;color:#edf7f9;min-width:42px}\n.arPatchChan select{width:86px;min-width:0;padding:5px;background:#0f2633;color:#dae9ef;border:1px solid #4c6876;border-radius:3px;font-size:10px}\n.arPatchSides{display:flex;gap:2px;margin-left:auto}\n.arPatchSides button{width:24px;height:26px;padding:0;border:1px solid #486b7a;background:#102935;color:#9ebfce;cursor:pointer;font-size:10px;border-radius:2px}\n.arPatchSides button[aria-pressed=true]{background:#456c7c;border-color:#9acbd5;color:#fff}\n.arPatchSides button:disabled{opacity:.25;cursor:default}\n.arPatchChan[data-status=live]{border-left:3px solid #51ccb6;padding-left:5px}\n.arPatchChan[data-status=draft]{border-left:3px solid #e6b968;padding-left:5px}\n.arPatchCell{cursor:pointer;display:flex;justify-content:center;align-items:center;background:#102631;color:#597887;font-size:11px;font-weight:750}\n.arPatchCell:hover,.arPatchCell.arPatchColHover{background:#2a4959;color:#f2fbfc}\n.arPatchCell[data-patch-state=live]{background:#145447;color:#a4f6df;box-shadow:inset 0 0 0 1px #428877}\n.arPatchCell[data-patch-state=draft]{background:#715532;color:#ffe3aa;box-shadow:inset 0 0 0 1px #c79651}\n.arPatchCell[data-patch-state=removed]{background:#453b40;color:#e9b49c;box-shadow:inset 0 0 0 1px #99755e}\n.arPatchCell[data-patch-state=live]:hover{background:#1e7564}\n.arPatchCell[data-patch-state=draft]:hover{background:#926936}\n.arPatchCell:disabled{cursor:not-allowed;opacity:.36}\n.arPatchLegend{display:flex;flex-wrap:wrap;gap:18px;align-items:center;padding:13px 1px;color:#b4cad2;font-size:10px}\n.arPatchLegend b{display:inline-block;width:9px;height:9px;vertical-align:middle;margin-right:6px;background:#233d4a;border:1px solid #7b97a4}\n.arPatchLegend b.live{background:#44bea9;border-color:#44bea9}\n.arPatchLegend b.draft{background:#dba858;border-color:#dba858}\n.arPatchLegend b.removed{background:#8a695a;border-color:#8a695a}\n.arPatchInspector{border-top:1px solid #385564;display:flex;gap:10px;align-items:center;justify-content:space-between;padding:12px 1px;font-size:11px;color:#b9cfd9}\n.arPatchInspector strong{color:#e5f2f6}\n.arPatchNote{color:#99b6c0;font-size:10px;margin:6px 1px 12px}\n.arPatchEmpty{padding:45px 10px;text-align:center;background:#102733;border:1px dashed #476575;color:#b8d2dc;font-size:12px}\n.arPatchHidden{display:none!important}\n.arPatchFooter{display:flex;align-items:center;justify-content:space-between;gap:15px;flex-wrap:wrap;padding:12px 20px;background:#1c303e;border-top:1px solid #395568}\n#arRouteFeedback{flex:1;min-width:230px;margin:0;font-size:11px;color:#bfe5e7}\n.arPatchFooter .arRouteFoot{margin:0}\n#arRouteApply{background:#1c6b61;border-color:#4da99d;color:#effffb;font-weight:750}\n#arRouteApply:disabled{opacity:.5;cursor:default}\n#arPatchRevert{background:#253d49;border:1px solid #658190}\n#arPatchOutputMap{display:flex;gap:14px;flex-wrap:wrap}\n.arPatchOutput{flex:1;min-width:170px;padding:22px 16px;border:1px solid #3b6273;border-radius:4px;background:#102834}\n.arPatchOutput b{display:block;color:#b4f1e5;margin-bottom:10px}.arPatchOutput span{font-size:11px;color:#aec8d1}\n@media(max-width:730px){.arPatchTop{padding:12px}.arPatchTabs{padding:8px}.arPatchTabs button{padding:9px 7px;font-size:9px}.arPatchBody{padding:10px}.arPatchFooter{padding:10px}}\n"; document.head.appendChild(css); // Signal Check is declared in the permanent toolbar; footer holds status only. const overlay = document.createElement("div"); @@ -50,7 +52,7 @@ '
Reading native audio state...
' + '
' + '' + - '
' + + '' + '
' + ''+ + ['NONE','MONO','STEREO','BUS'].map(mode=>'').join("")+ + '
'; + for(const port of shown){ + const draftRole=patchRole(v,port.port),liveRole=patchRole(live,port.port); + const changedRole=!!draftRole && draftRole!==liveRole; + const status=draftRole?(changedRole?'draft':'live'):liveRole?'removed':'off'; + const content=draftRole|| (liveRole?'−':'·'); + const desc='CH '+(i+1)+' '+(v.mode==='STEREO'?'L/R':v.mode)+ + ' ← '+safeRouteText(port.label||('Input '+(port.port+1)))+ + ' · '+(status==='live'?'native confirmed':status==='draft'?'draft not applied': + status==='removed'?'live until APPLY':'unpatched'); + html+=''; + } + html+=''; + } + patchGrid.innerHTML=html; + hoveredPort=-1; + } + function selectPatchTab(tab){ + if(!["input","internal","output"].includes(tab))return; + patchTab=tab; + routeOverlay.querySelectorAll("[data-patch-tab]").forEach(el=> + el.setAttribute("aria-selected",String(el.dataset.patchTab===tab))); + for(const section of ["input","internal","output"]){ + document.getElementById("arPatch"+section[0].toUpperCase()+section.slice(1)+"Panel") + .classList.toggle("arPatchHidden",section!==tab); + } + if(tab==="input")renderPatchMatrix(); + else if(tab==="internal")drawRoutes(); + else renderPatchOutput(); + } + function patchFeedback(message){ + document.getElementById("arRouteFeedback").textContent=message; + } + routeOverlay.querySelector(".arPatchTabs").addEventListener("click",e=>{ + const tab=e.target.closest("[data-patch-tab]"); + if(tab)selectPatchTab(tab.dataset.patchTab); + }); + document.getElementById("arPatchPrev").addEventListener("click",()=>{ + if(patchPage>0){patchPage--;renderPatchMatrix();} + }); + document.getElementById("arPatchNext").addEventListener("click",()=>{ + if(patchPage+1{ + const el=e.target.closest("[data-patch-mode]"); + if(!el||patchPending)return; + const row=Number(el.dataset.patchMode),v=draftRoutes[row],prior=v.mode; + const next=el.value; + if(!["NONE","MONO","STEREO","BUS"].includes(next))return; + v.mode=next; + if(next==="NONE"||next==="BUS"){v.left=-1;v.right=-1;} + else if(next==="MONO"){v.right=-1;} + else if(next==="STEREO"&&prior!=="STEREO"){v.right=-1;patchSide[row]="left";} + patchFeedback("DRAFT · CH "+(row+1)+" "+next+" · output unchanged until APPLY."); + renderPatchMatrix(); + }); + patchGrid.addEventListener("click",e=>{ + if(patchPending)return; + const side=e.target.closest("[data-patch-side]"); + if(side){ + const i=Number(side.dataset.patchRow); + if(draftRoutes[i]?.mode==="STEREO"){patchSide[i]=side.dataset.patchSide;renderPatchMatrix();} + return; + } + const cell=e.target.closest("[data-patch-port]"); + if(!cell)return; + const i=Number(cell.dataset.patchRow),port=Number(cell.dataset.patchPort),v=draftRoutes[i]; + if(!Number.isInteger(i)||i<0||i>=10||!patchPorts().some(p=>p.port===port))return; + if(v.mode==="BUS"){patchFeedback("CH "+(i+1)+" is BUS receiver. Select MONO/STEREO before physical patch.");return;} + if(v.mode==="NONE"){v.mode="MONO";v.left=port;v.right=-1;} + else if(v.mode==="MONO"){ + if(v.left===port){v.mode="NONE";v.left=-1;}else v.left=port; + v.right=-1; + }else if(v.mode==="STEREO"){ + const side=patchSide[i]; + const opposite=side==="left"?"right":"left"; + if(v[side]!==port && v[opposite]===port){ + patchFeedback("REJECTED DRAFT · CH "+(i+1)+" stereo L/R cannot use the same physical port."); + return; + } + v[side]=v[side]===port?-1:port; + } + patchFeedback("DRAFT · CH "+(i+1)+" input assignment edited. APPLY validates the real hardware route."); + renderPatchMatrix(); + }); + // Delegated hover changes only the visible physical column (at most 11 + // DOM cells), not the matrix or all mixer meters. No frame/timer loop. + patchGrid.addEventListener("pointerover",e=>{ + const cell=e.target.closest("[data-patch-port]"); + const port=cell?Number(cell.dataset.patchPort):-1; + if(port===hoveredPort)return; + hoveredPort=port; + patchGrid.querySelectorAll("[data-patch-col]").forEach(n=> + n.classList.toggle("arPatchColHover",Number(n.dataset.patchCol)===port)); + }); + patchGrid.addEventListener("pointerleave",()=>{ + if(hoveredPort<0)return; + hoveredPort=-1; + patchGrid.querySelectorAll(".arPatchColHover").forEach(n=>n.classList.remove("arPatchColHover")); + }); + document.getElementById("arPatchRevert").addEventListener("click",()=>{ + const d=state.dryRoutingLab||{}; + if(!hydrateAcceptedRoute()){ + invalidateDraftForNewDevice(0); + invalidateDraftForNewDevice(Number(d.epoch)||0); + } + syncNativeLevelsToRouteDraft(); + drawRoutes(); + renderPatchMatrix(); + patchFeedback("DRAFT REVERTED · displayed input routes match last native ACK (or unpatched device)."); + }); + function drawRoutes(){ // An identical numbered input on another ASIO device is NOT the same // microphone. Clear all prior user intent if device epoch changed. @@ -255,7 +471,7 @@ const d=state.dryRoutingLab||{}; const label=document.getElementById("arRouteIdentity"); if(!label)return; - setTextIfChanged(label,(d.active ? (d.ready?"DRY LAB ACTIVE":"DRY LAB STALE — SILENT, REAPPLY"):"DRY LAB OFF")+ + setTextIfChanged(label,(d.active ? (d.ready?"NATIVE PATCH LIVE":"PATCH STALE — SILENT, REAPPLY"):"AWAITING NATIVE PATCH")+ " · device epoch "+(d.epoch||0)+" · rev "+(d.revision||0)+ " · "+(d.ports?.length||0)+" enabled inputs · "+(d.outputPorts?.length||0)+" outputs · "+(d.sendCount||0)+" channel sends · "+(d.auxSendCount||0)+" AUX sends · "+(d.auxCount||0)+" AUX"); } @@ -263,17 +479,29 @@ hydrateAcceptedRoute(); syncNativeLevelsToRouteDraft(); drawRoutes(); + patchPage=0; routeOverlay.classList.add("open"); + selectPatchTab("input"); overlay.classList.remove("open"); } // Exposed only to the existing native SIGNAL FLOW GUI; does not publish a // routing transaction or bypass the output-MUTE operator safety gate. window.__arMixOpenRoutingLab=openRoutingLab; + window.__arMixOpenRouting=openRoutingLab; + const routingNav=document.querySelector('[data-view="SIGNAL FLOW"] span'); + if(routingNav)routingNav.textContent="ROUTING"; document.getElementById("arOpenRoutingLab").addEventListener("click",openRoutingLab); document.getElementById("arRouteClose").addEventListener("click",()=>routeOverlay.classList.remove("open")); routeOverlay.addEventListener("click",e=>{if(e.target===routeOverlay)routeOverlay.classList.remove("open");}); document.getElementById("arRouteApply").addEventListener("click",()=>{ const d=state.dryRoutingLab||{}; + if(patchPending)return; + const failure=patchPreflight(); + if(failure){patchFeedback("REJECTED · "+failure);return;} + if(state.monitor){patchFeedback("MUTE OUTPUT FIRST · structural routing cannot be applied while speakers are armed.");return;} + syncNativeLevelsToRouteDraft(); + patchPending=true; + renderPatchMatrix(); if(!draftEpoch || draftEpoch!==Number(d.epoch)){ document.getElementById("arRouteFeedback").textContent= "DEVICE CHANGED · old channel assignments discarded. Re-select the actual physical inputs."; @@ -311,7 +539,11 @@ }); api.addEventListener("arMixRoutingLabAck",reply=>{ const result=reply?.state||reply||{}; + patchPending=false; if(result && typeof result==="object" && "epoch" in result)state.dryRoutingLab=result; + if(reply?.ok===true)hydrateAcceptedRoute(); + renderPatchMatrix(); + if(patchTab==="output")renderPatchOutput(); document.getElementById("arRouteFeedback").textContent= reply?.ok===false?("REJECTED · "+(reply.error||"Invalid route")): result.active?"NATIVE ACK: "+(Number(result.fxCount||0)+Number(state.chainCount||0))+" VST3 total (CH1 rack retained · "+(result.fxReused||0)+" native inserts preserved) · "+(result.auxCount||0)+" AUX · "+(result.auxSendCount||0)+" AUX sends · UNMUTE OUTPUT in SIGNAL CHECK":"NATIVE ACK: STOPPED · output remains MUTED for safety"; @@ -335,8 +567,8 @@ Number(d?.overBudgetCount)===0; function diagnosis(d) { if(d.dryRoutingLab?.active) return d.dryRoutingLab.ready? - "Live 10-channel Routing LAB: "+(d.dryRoutingLab.fxCount||0)+" independent native VST3 inserts, PRE/POST sends and BUS returns. Use low headphone volume.": - "Routing LAB device generation changed. Output is SILENT until you remap the real device and APPLY again."; + "Live 10-channel native route: "+(d.dryRoutingLab.fxCount||0)+" independent native VST3 inserts, PRE/POST sends and BUS returns. Use low headphone volume.": + "Physical input mapping is STALE. Output is SILENT until the device is remapped and ACKed."; if(d.diagnosticRoute==="OUTPUT_ONLY_TONE") return "Output-only test: capture endpoint is disconnected. Listen for tone at low headphone volume and click MARK CRACKLE when audible."; if(d.diagnosticRoute==="CAPTURE_ONLY") return "Capture-only test: hardware render endpoint is disconnected. Observe capture input and backend discontinuity count; you should hear no audio."; if(d.diagnosticRoute==="DRY_THROUGH") return "Dry-through test: microphone to output with all VST3 bypassed. MARK CRACKLE at audible glitches."; @@ -365,7 +597,10 @@ setTextIfChanged(el,d.dryRoutingLab?.ready?(Math.round(Math.min(1,peak)*100)+"%"):"—"); }); if(draftEpoch!==(Number(d.dryRoutingLab?.epoch)||0)) { + patchPending=false; drawRoutes(); // fresh port names; reset stale user assignments + renderPatchMatrix(); + if(patchTab==="output")renderPatchOutput(); document.getElementById("arRouteFeedback").textContent= "AUDIO DEVICE CHANGED · all input assignments reset. Select ports again."; } else updateRouteLabIdentity(); @@ -383,7 +618,7 @@ const driverLabel=document.querySelector('.spec-device strong'); setTextIfChanged(driverLabel,d.driver||"NO DRIVER"); const liveLabel=document.querySelector('.status > span:first-child > b'); - setTextIfChanged(liveLabel,d.dryRoutingLab?.active?"NATIVE 10CH FX LAB":"NATIVE CH1"); + setTextIfChanged(liveLabel,d.dryRoutingLab?.ready?"NATIVE 10CH ROUTED":"NATIVE CH1 · UNPATCHED"); const edition=document.querySelector('.status > span:last-child'); setTextIfChanged(edition,d.dryRoutingLab?.active? "AR MIX P1H · REAL 10CH FX / BUS SENDS":"AR MIX P2 · CH1 NATIVE + UI PREVIEW"); From ae119cc0cabaeb49a0be9e067fb3644a16eafc80 Mon Sep 17 00:00:00 2001 From: Ari Sulistiono Date: Thu, 29 Oct 2026 16:15:43 +0700 Subject: [PATCH 3/7] R1: correct grid subrow layout and open patchbay from ROUTING toolbar --- web/app.js | 1 + web/monitor.js | 1 + 2 files changed, 2 insertions(+) diff --git a/web/app.js b/web/app.js index 714869dd7..9ce616056 100644 --- a/web/app.js +++ b/web/app.js @@ -693,6 +693,7 @@ function renderRackWorkspace(){let c=channels[currentChannel];let chain=normalCh function pluginInspector(ch,slot){const name=normalChain(channels[ch])[slot],v=getFxParams(ch,slot);return `
FX EDITOR · DEMO PARAMETERS

${safeText(name)}

These generic controls demonstrate the editing and preset workflow. The real VST3 editor will replace them when connected.

`} function renderSignalFlow(){ if(window.__JUCE__?.backend?.emitEvent){ + window.__arMixOpenRouting?.(); // native patchbay is the workspace; no intermediate LAB. $('rackWorkspace').innerHTML=`
ARSONMIX · NATIVE ROUTING

Signal Flow — 10 Native Channels

Physical inputs → native VST3 → PRE/POST sends → BUS returns → MASTER. All routing changes use the same live engine and hardware epoch.

01 · DEVICEVerified ASIO/WASAPIActual enabled port mask
➜
02 · CHANNELS10 Native StripsIndependent VST3 + live controls
➜
03 · BUSPRE/POST SendsCycle-validated internal returns
➜
04 · MASTERHardware L / RDirect authorized endpoint
Routing edits still require OUTPUT MUTE. Unchanged VST3 instances now retain state and tails when a route is re-applied. CUE/AUX hardware output patching and plugin latency compensation remain future gates.
`; return; } diff --git a/web/monitor.js b/web/monitor.js index 6b5831f1f..bea6160d7 100644 --- a/web/monitor.js +++ b/web/monitor.js @@ -39,6 +39,7 @@ ".arAuxRow{display:grid;grid-template-columns:64px 52px 90px 70px 1fr;align-items:center;gap:7px;padding:7px;background:#0c202b;border-bottom:1px solid #36515f;font-size:11px}.arAuxRow label{display:flex;gap:4px;align-items:center}.arAuxRow select{min-width:0;width:100%;background:#0c202b;color:#dcecf3;border:1px solid #496b7a;padding:6px;border-radius:4px}#arAuxReturns h3{font-size:12px;color:#b1d4dd;margin:14px 0 8px}#arAuxReturns p{color:#90afbc;font-size:10px;margin:4px 0 7px}"; // R1 native-only patchbay: static CSS with cheap hover. No filter/blur/animations. css.textContent += "\n#arRoutingLabOverlay{background:#06121ccc}\n#arRoutingLabPanel{width:min(1110px,97vw);max-height:92vh;padding:0;background:#182a36;border:1px solid #68808c;border-radius:7px;overflow:auto;box-shadow:0 12px 32px #0009}\n.arPatchTop{padding:15px 20px;display:flex;align-items:center;justify-content:space-between;gap:12px;background:linear-gradient(#344955,#1a2c38);border-bottom:1px solid #45606e}\n.arPatchBrand{font-size:16px;font-weight:800;letter-spacing:.025em;color:#ecf3f5}\n.arPatchBrand em{font-size:11px;font-style:normal;font-weight:650;color:#9bdfdf;letter-spacing:.12em;margin-left:8px}\n.arPatchSub{color:#b0c6d0;font-size:10px;margin-top:5px}\n.arPatchTabs{display:flex;gap:5px;padding:10px 19px;background:#142733;border-bottom:1px solid #334d5a}\n.arPatchTabs button{border:1px solid transparent;border-radius:3px;background:#182c39;color:#9cb5c1;font-size:11px;letter-spacing:.05em;font-weight:700;padding:9px 16px;cursor:pointer}\n.arPatchTabs button[aria-selected=true]{background:#2a5262;color:#eaf9fa;border-color:#6093a4}\n.arPatchTabs button:hover{background:#2d4553;color:#fff}\n.arPatchTabs button:focus-visible,.arPatchGrid button:focus-visible{outline:2px solid #91e8dc;outline-offset:-2px}\n.arPatchBody{padding:16px 20px 6px;min-height:360px}\n.arPatchHeading{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:12px;margin-bottom:12px}\n.arPatchHeading strong{color:#e1f2f5;font-size:12px;letter-spacing:.09em}\n.arPatchHeading small{display:block;margin-top:5px;font-size:10px;color:#a5c2cc}\n.arPatchPager{display:flex;align-items:center;gap:8px;color:#c2d4dc;font-size:10px}\n.arPatchPager button{border:1px solid #5a7b88;background:#253b48;border-radius:3px;color:#e6eff4;padding:6px 12px;cursor:pointer}\n.arPatchPager button:disabled{opacity:.3;cursor:default}\n.arPatchViewport{border:1px solid #426071;border-radius:4px;overflow:auto;background:#0c1d28}\n.arPatchGrid{display:grid;min-width:650px;width:100%;font-variant-numeric:tabular-nums}\n.arPatchCorner,.arPatchPort,.arPatchChan,.arPatchCell{min-width:0;box-sizing:border-box;min-height:39px;border:0;border-right:1px solid #25404e;border-bottom:1px solid #263d4b}\n.arPatchCorner{padding:13px 10px;position:sticky;left:0;z-index:2;background:#263d4a;color:#d3e9f0;font-size:10px;font-weight:700}\n.arPatchPort{background:#243b49;display:flex;flex-direction:column;align-items:center;justify-content:center;color:#ebf5fa;font-size:10px;font-weight:750;padding:4px;white-space:nowrap}\n.arPatchPort small{color:#aac3ce;font-weight:400;font-size:9px;text-overflow:ellipsis;overflow:hidden;max-width:100%}\n.arPatchChan{position:sticky;left:0;z-index:1;background:#1c3240;display:flex;gap:7px;align-items:center;padding:5px 8px}\n.arPatchChan strong{font-size:11px;color:#edf7f9;min-width:42px}\n.arPatchChan select{width:86px;min-width:0;padding:5px;background:#0f2633;color:#dae9ef;border:1px solid #4c6876;border-radius:3px;font-size:10px}\n.arPatchSides{display:flex;gap:2px;margin-left:auto}\n.arPatchSides button{width:24px;height:26px;padding:0;border:1px solid #486b7a;background:#102935;color:#9ebfce;cursor:pointer;font-size:10px;border-radius:2px}\n.arPatchSides button[aria-pressed=true]{background:#456c7c;border-color:#9acbd5;color:#fff}\n.arPatchSides button:disabled{opacity:.25;cursor:default}\n.arPatchChan[data-status=live]{border-left:3px solid #51ccb6;padding-left:5px}\n.arPatchChan[data-status=draft]{border-left:3px solid #e6b968;padding-left:5px}\n.arPatchCell{cursor:pointer;display:flex;justify-content:center;align-items:center;background:#102631;color:#597887;font-size:11px;font-weight:750}\n.arPatchCell:hover,.arPatchCell.arPatchColHover{background:#2a4959;color:#f2fbfc}\n.arPatchCell[data-patch-state=live]{background:#145447;color:#a4f6df;box-shadow:inset 0 0 0 1px #428877}\n.arPatchCell[data-patch-state=draft]{background:#715532;color:#ffe3aa;box-shadow:inset 0 0 0 1px #c79651}\n.arPatchCell[data-patch-state=removed]{background:#453b40;color:#e9b49c;box-shadow:inset 0 0 0 1px #99755e}\n.arPatchCell[data-patch-state=live]:hover{background:#1e7564}\n.arPatchCell[data-patch-state=draft]:hover{background:#926936}\n.arPatchCell:disabled{cursor:not-allowed;opacity:.36}\n.arPatchLegend{display:flex;flex-wrap:wrap;gap:18px;align-items:center;padding:13px 1px;color:#b4cad2;font-size:10px}\n.arPatchLegend b{display:inline-block;width:9px;height:9px;vertical-align:middle;margin-right:6px;background:#233d4a;border:1px solid #7b97a4}\n.arPatchLegend b.live{background:#44bea9;border-color:#44bea9}\n.arPatchLegend b.draft{background:#dba858;border-color:#dba858}\n.arPatchLegend b.removed{background:#8a695a;border-color:#8a695a}\n.arPatchInspector{border-top:1px solid #385564;display:flex;gap:10px;align-items:center;justify-content:space-between;padding:12px 1px;font-size:11px;color:#b9cfd9}\n.arPatchInspector strong{color:#e5f2f6}\n.arPatchNote{color:#99b6c0;font-size:10px;margin:6px 1px 12px}\n.arPatchEmpty{padding:45px 10px;text-align:center;background:#102733;border:1px dashed #476575;color:#b8d2dc;font-size:12px}\n.arPatchHidden{display:none!important}\n.arPatchFooter{display:flex;align-items:center;justify-content:space-between;gap:15px;flex-wrap:wrap;padding:12px 20px;background:#1c303e;border-top:1px solid #395568}\n#arRouteFeedback{flex:1;min-width:230px;margin:0;font-size:11px;color:#bfe5e7}\n.arPatchFooter .arRouteFoot{margin:0}\n#arRouteApply{background:#1c6b61;border-color:#4da99d;color:#effffb;font-weight:750}\n#arRouteApply:disabled{opacity:.5;cursor:default}\n#arPatchRevert{background:#253d49;border:1px solid #658190}\n#arPatchOutputMap{display:flex;gap:14px;flex-wrap:wrap}\n.arPatchOutput{flex:1;min-width:170px;padding:22px 16px;border:1px solid #3b6273;border-radius:4px;background:#102834}\n.arPatchOutput b{display:block;color:#b4f1e5;margin-bottom:10px}.arPatchOutput span{font-size:11px;color:#aec8d1}\n@media(max-width:730px){.arPatchTop{padding:12px}.arPatchTabs{padding:8px}.arPatchTabs button{padding:9px 7px;font-size:9px}.arPatchBody{padding:10px}.arPatchFooter{padding:10px}}\n"; + css.textContent += ".arPatchRow{display:contents}.arPatchPort.arPatchColHover{background:#385a69}.arPatchChan:hover{background:#294756}"; document.head.appendChild(css); // Signal Check is declared in the permanent toolbar; footer holds status only. const overlay = document.createElement("div"); From 173f5c6e4ebd878fced5a7b601c7653fb7e73408 Mon Sep 17 00:00:00 2001 From: Ari Sulistiono Date: Thu, 29 Oct 2026 16:17:19 +0700 Subject: [PATCH 4/7] R1: test native patch click/draft/ACK/stereo/hotplug and document backend boundaries --- docs/R1_NATIVE_INPUT_PATCH_MATRIX_20261029.md | 17 ++++ tests/live_routing_ui_contract_test.mjs | 20 ++++- tests/ui_smoke.py | 84 +++++++++++++++++++ 3 files changed, 120 insertions(+), 1 deletion(-) create mode 100644 docs/R1_NATIVE_INPUT_PATCH_MATRIX_20261029.md diff --git a/docs/R1_NATIVE_INPUT_PATCH_MATRIX_20261029.md b/docs/R1_NATIVE_INPUT_PATCH_MATRIX_20261029.md new file mode 100644 index 000000000..49e8b730f --- /dev/null +++ b/docs/R1_NATIVE_INPUT_PATCH_MATRIX_20261029.md @@ -0,0 +1,17 @@ +# R1 — Production-style native input patchbay (2026-10-29) + +**Reconciled base:** `main@369c2a9c1fbf827815afb3f4866672ee47f554bf`, including approved GPU hover-inert optimization; merged R0A #144. **R0B dual-mode engine lifecycle is not complete.** + +## Implemented + +- Native ROUTING opens from toolbar **in one click** (existing SIGNAL FLOW action); no extra diagram or operator-facing START LAB. Original ArSonMix metallic charcoal / aquatic green UI, 1100px bounded panel, horizontal paging of eight active physical input ports, 10 fixed CH rows. +- Matrix gets real physical source list from `dryRoutingLab.ports` on the active JUCE DIRECT device, not static assumptions or browser localStorage. Escaped device names; malformed, duplicate or invalid physical port descriptors ignored. +- MONO: click a physical input to patch; click again to clear; new choice replaces old. STEREO: independent visible L/R selectors; incomplete, duplicate-side or stale hardware port rejects before native call. NONE and BUS remain explicit. Physical fan-out to several channels is allowed by existing native routing plan. +- User edits are DRAFT only (amber). LIVE/green only if the device-epoch-matched acknowledged `acceptedRoute` reports that exact physical assignment. A removed cell displays old-live-until-APPLY status. REVERT reinstates native ACK, not a browser snapshot. Native `routingDryApply` and exact `arMixRoutingLabAck` are reused; no backend duplication. No automatic unmute; output must be MUTED. +- Input matrix redraw only on edit/tab/page, native ACK, device epoch/hotplug, and open. Delegated click/change and hover handlers, no per-cell listeners, no blur, no filter, no animation or audio-thread changes. Hardware status/peaks continue from existing 12Hz telemetry without full-grid repaint. +- INTERNAL/SENDS tab preserves existing CH/AUX/VST3 PRE/POST editor for R2 full internal matrix; OUTPUT tab exposes actual MAIN L/R device output mapping as read-only and accurately describes R3 as incomplete. No invented group/DCA/multi-output feature. +- Existing backend `dryRoutingLab`, `routingDryApply` and old JS alias remain for compatibility while R0B migrates CH1 FX ADD/REMOVE/MOVE/Orbit to the one default live native topology. UI no longer presents LAB as a product feature; **does not mean R0B is done**. + +## Verification and limits + +Native-mock Playwright exercises ASIO sparse port 2/5, escaped label, direct top nav, status DRAFT/LIVE/REVERT, stereo L/R duplicate prevention, exact epoch/revision APPLY, pending ACK, output read-only, device epoch 77→78 invalidation. Previous native/JS smoke tests preserved. Windows MSVC/CTest and native physical hardware FAT are separate; P0 #15 no-FX crackle remains open. diff --git a/tests/live_routing_ui_contract_test.mjs b/tests/live_routing_ui_contract_test.mjs index 3e0709be5..f65e20ff5 100644 --- a/tests/live_routing_ui_contract_test.mjs +++ b/tests/live_routing_ui_contract_test.mjs @@ -28,7 +28,7 @@ test("P1E is opt-in; all native VST3/clock/diagnostic paths protected",()=>{ assert.match(lab,/std::array/); }); test("GUI exposes only truthful dry device routes and acknowledged commit",()=>{ - assert.match(ui,/ROUTING LAB · 10 CH/); + assert.match(ui,/ROUTING · 10 CH/); assert.match(ui,/routingDryApply/); assert.match(ui,/routingDryStop/); assert.match(ui,/arMixRoutingLabAck/); @@ -175,3 +175,21 @@ test("P1K truly keeps ten physical INPUT strips and adds four independent native assert.match(cmake,/P1KTenIndependentInputsAndFourDedicatedAuxReturns/); assert.match(workflow,/ARMixDedicatedAuxBusTests/); }); + + +test("R1 matrix edits only device-bound draft and honors native revision ACK",()=>{ + assert.match(ui,/data-patch-tab="input"/); + assert.match(ui,/patchPageSize=8/); + assert.match(ui,/patchPorts\(\)/); + assert.match(ui,/Number\.isInteger\(n\)/); + assert.match(ui,/data-patch-state/); + assert.match(ui,/patchPreflight\(\)/); + assert.match(ui,/patchPending=true/); + assert.match(ui,/hydrateAcceptedRoute/); + assert.match(ui,/arMixRoutingLabAck/); + assert.match(ui,/selectPatchTab\("input"\)/); + assert.match(ui,/window\.__arMixOpenRouting=openRoutingLab/); + assert.doesNotMatch(ui,/filter\s*:\s*blur\(/); + const app=readFileSync(new URL("../web/app.js",import.meta.url),"utf8"); + assert.match(app,/window\.__arMixOpenRouting\?\.\(\)/); +}); diff --git a/tests/ui_smoke.py b/tests/ui_smoke.py index 5b028562c..461295318 100644 --- a/tests/ui_smoke.py +++ b/tests/ui_smoke.py @@ -1221,6 +1221,90 @@ async def image_for(selector): return Number.parseFloat(l.style.getPropertyValue('--led-lit'))>7 && Number.parseFloat(r.style.getPropertyValue('--led-lit'))>7; }""",timeout=3000) + + # R1: native-backed Waves-style INPUT PATCH, not an image or browser + # mock-routing claim. Test real panel interaction against native ACKs. + await native.evaluate("""()=>{ + window.__arMixSent=[]; + window.__JUCE__.backend.emitEvent=(name,payload)=> + window.__arMixSent.push({name,payload}); + }""") + await native.add_script_tag(path=str(project/"web/monitor.js")) + await native.evaluate("""()=>{ + window.__arPatchRows=Array.from({length:10},()=>({ + mode:"NONE",left:-1,right:-1,gain:.25,pan:0,main:true, + mute:false,solo:false,fxId:"" + })); + window.__arPatchStatus={ + connected:true,driver:"ASIO",rate:48000,buffer:128,monitor:false, + masterMute:false,channelMute:false,diagnosticRoute:"NORMAL",chainCount:0, + dryRoutingLab:{active:false,ready:false,epoch:77,revision:0, + ports:[{port:2,callback:0,label:"Input & One"}, + {port:5,callback:1,label:"USB Input Six"}], + outputPorts:[0,1],channelControls:[],fxCount:0} + }; + window.__arMixMockEvents.arMixStatus(window.__arPatchStatus); + }""") + await native.locator('[data-view="SIGNAL FLOW"]').click() + assert await native.locator("#arRoutingLabOverlay").evaluate( + "(e)=>e.classList.contains('open')") + assert await native.locator("#arPatchGrid [data-patch-row][data-patch-port]").count()==20 + assert await native.locator("#arPatchGrid .arPatchRow").first.evaluate( + "(e)=>getComputedStyle(e).display")=="contents" + assert await native.locator(".arPatchPort").first.get_attribute("title")=="Input & One" + cell=native.locator('[data-patch-row="0"][data-patch-port="2"].arPatchCell') + assert await cell.get_attribute("data-patch-state")=="off" + await cell.click() + assert await cell.get_attribute("data-patch-state")=="draft" + assert await cell.inner_text()=="M" + assert await native.evaluate( + "()=>window.__arMixSent.filter(x=>x.payload?.action==='routingDryApply').length")==0 + await native.locator('[data-patch-mode="1"]').select_option("STEREO") + await native.locator('[data-patch-row="1"][data-patch-port="2"].arPatchCell').click() + await native.locator('[data-patch-row="1"][data-patch-side="right"]').click() + await native.locator('[data-patch-row="1"][data-patch-port="2"].arPatchCell').click() + assert "cannot use the same" in await native.locator("#arRouteFeedback").inner_text() + await native.locator('[data-patch-row="1"][data-patch-port="5"].arPatchCell').click() + assert await native.locator('[data-patch-row="1"][data-patch-port="5"].arPatchCell').inner_text()=="R" + await native.locator("#arRouteApply").click() + action=await native.evaluate("""()=>{ + const actions=window.__arMixSent.filter(x=>x.payload?.action==='routingDryApply'); + return actions.at(-1)?.payload?.value; + }""") + assert action["deviceEpoch"]==77 and action["revision"]==0,action + assert action["channels"][0]["left"]==2 and action["channels"][0]["mode"]=="MONO",action + assert action["channels"][1]["left"]==2 and action["channels"][1]["right"]==5,action + assert await native.locator("#arRouteApply").is_disabled() + await native.evaluate("""()=>{ + const d=window.__arPatchStatus.dryRoutingLab; + d.active=true;d.ready=true;d.revision=1; + d.acceptedRoute={deviceEpoch:77,revision:0, + channels:window.__arMixSent.filter(x=>x.payload?.action==='routingDryApply').at(-1).payload.value.channels, + auxes:[],sends:[]}; + window.__arMixMockEvents.arMixRoutingLabAck({ok:true,state:d}); + window.__arMixMockEvents.arMixStatus(window.__arPatchStatus); + }""") + assert await cell.get_attribute("data-patch-state")=="live" + assert await native.locator("#arRouteApply").is_enabled() + await native.locator('[data-patch-row="0"][data-patch-port="5"].arPatchCell').click() + assert await native.locator('[data-patch-row="0"][data-patch-port="5"].arPatchCell').get_attribute("data-patch-state")=="draft" + await native.locator("#arPatchRevert").click() + assert await cell.get_attribute("data-patch-state")=="live" + await native.locator('[data-patch-tab="output"]').click() + assert "READ-ONLY" in await native.locator("#arPatchOutputPanel").inner_text() + assert await native.locator(".arPatchOutput").count()==2 + await native.locator('[data-patch-tab="input"]').click() + await native.evaluate("""()=>{ + const d=window.__arPatchStatus.dryRoutingLab; + d.epoch=78;d.revision=1;d.ready=false;d.active=false; + d.ports=[{port:9,callback:0,label:"Other interface"}]; + d.acceptedRoute=null; + window.__arMixMockEvents.arMixStatus(window.__arPatchStatus); + }""") + assert await native.locator('[data-patch-row][data-patch-port]').count()==10 + assert await native.locator('[data-patch-row="0"][data-patch-port="9"]').get_attribute("data-patch-state")=="off" + assert "DEVICE CHANGED" in await native.locator("#arRouteFeedback").inner_text() + assert not native_errors,native_errors await native.close() await browser.close() From 78cb80e472de3500542dcd3693c6ec026610ad63 Mon Sep 17 00:00:00 2001 From: Ari Sulistiono Date: Thu, 29 Oct 2026 16:19:25 +0700 Subject: [PATCH 5/7] R1: preserve standalone app byte-parity; handle one-click ROUTING in native monitor adapter --- tests/live_routing_ui_contract_test.mjs | 3 +-- web/app.js | 1 - web/monitor.js | 5 +++++ 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/tests/live_routing_ui_contract_test.mjs b/tests/live_routing_ui_contract_test.mjs index f65e20ff5..6abd48fc0 100644 --- a/tests/live_routing_ui_contract_test.mjs +++ b/tests/live_routing_ui_contract_test.mjs @@ -190,6 +190,5 @@ test("R1 matrix edits only device-bound draft and honors native revision ACK",() assert.match(ui,/selectPatchTab\("input"\)/); assert.match(ui,/window\.__arMixOpenRouting=openRoutingLab/); assert.doesNotMatch(ui,/filter\s*:\s*blur\(/); - const app=readFileSync(new URL("../web/app.js",import.meta.url),"utf8"); - assert.match(app,/window\.__arMixOpenRouting\?\.\(\)/); + assert.match(ui,/document\.addEventListener\("click",event=>/); }); diff --git a/web/app.js b/web/app.js index 9ce616056..714869dd7 100644 --- a/web/app.js +++ b/web/app.js @@ -693,7 +693,6 @@ function renderRackWorkspace(){let c=channels[currentChannel];let chain=normalCh function pluginInspector(ch,slot){const name=normalChain(channels[ch])[slot],v=getFxParams(ch,slot);return `
FX EDITOR · DEMO PARAMETERS

${safeText(name)}

These generic controls demonstrate the editing and preset workflow. The real VST3 editor will replace them when connected.

`} function renderSignalFlow(){ if(window.__JUCE__?.backend?.emitEvent){ - window.__arMixOpenRouting?.(); // native patchbay is the workspace; no intermediate LAB. $('rackWorkspace').innerHTML=`
ARSONMIX · NATIVE ROUTING

Signal Flow — 10 Native Channels

Physical inputs → native VST3 → PRE/POST sends → BUS returns → MASTER. All routing changes use the same live engine and hardware epoch.

01 · DEVICEVerified ASIO/WASAPIActual enabled port mask
➜
02 · CHANNELS10 Native StripsIndependent VST3 + live controls
➜
03 · BUSPRE/POST SendsCycle-validated internal returns
➜
04 · MASTERHardware L / RDirect authorized endpoint
Routing edits still require OUTPUT MUTE. Unchanged VST3 instances now retain state and tails when a route is re-applied. CUE/AUX hardware output patching and plugin latency compensation remain future gates.
`; return; } diff --git a/web/monitor.js b/web/monitor.js index bea6160d7..8bef7e4f6 100644 --- a/web/monitor.js +++ b/web/monitor.js @@ -489,6 +489,11 @@ // routing transaction or bypass the output-MUTE operator safety gate. window.__arMixOpenRoutingLab=openRoutingLab; window.__arMixOpenRouting=openRoutingLab; + // Native toolbar action remains the approved SIGNAL FLOW data-view, + // but ROUTING opens on the same click without an intermediate lab screen. + document.addEventListener("click",event=>{ + if(event.target.closest('[data-view="SIGNAL FLOW"]'))openRoutingLab(); + }); const routingNav=document.querySelector('[data-view="SIGNAL FLOW"] span'); if(routingNav)routingNav.textContent="ROUTING"; document.getElementById("arOpenRoutingLab").addEventListener("click",openRoutingLab); From 36cfe6a4425b43fab47f9990039f8222afd9a54a Mon Sep 17 00:00:00 2001 From: Ari Sulistiono Date: Thu, 29 Oct 2026 16:21:22 +0700 Subject: [PATCH 6/7] R1: guard optional status badge across native WebView shells during ACK refresh --- web/monitor.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/web/monitor.js b/web/monitor.js index 8bef7e4f6..aebbee8af 100644 --- a/web/monitor.js +++ b/web/monitor.js @@ -612,7 +612,9 @@ } else updateRouteLabIdentity(); } setTextIfChanged(el("arSignalBadge"),!d.monitor ? "OUTPUT MUTED" : d.masterMute ? "MASTER MUTED" : d.channelMute ? "CH1 MUTED" : "OUTPUT ARMED"); - el("arSignalBadge").style.color = d.monitor && !d.masterMute && !d.channelMute ? "#71e9cc" : "#e9be7c"; + const outputBadge=el("arSignalBadge"); + if(outputBadge)outputBadge.style.color = + d.monitor && !d.masterMute && !d.channelMute ? "#71e9cc" : "#e9be7c"; const monitorButton=document.querySelector('[data-native-action="monitor"]'); setTextIfChanged(monitorButton,d.monitor?"MUTE OUTPUT":"UNMUTE OUTPUT"); // The original UI shell had fixed 48 kHz / 64-sample demo badges. Show From 854700021a74d0df57145a52170655749f0bce73 Mon Sep 17 00:00:00 2001 From: Ari Sulistiono Date: Thu, 29 Oct 2026 16:24:31 +0700 Subject: [PATCH 7/7] R1 polish: stable eight-column native patch grid with responsive screenshot/geometry QA --- .github/workflows/ui-smoke.yml | 2 ++ docs/R1_NATIVE_INPUT_PATCH_MATRIX_20261029.md | 2 +- tests/ui_smoke.py | 17 +++++++++++++++++ web/monitor.js | 8 ++++++-- 4 files changed, 26 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ui-smoke.yml b/.github/workflows/ui-smoke.yml index 3d4fff8e5..08322496c 100644 --- a/.github/workflows/ui-smoke.yml +++ b/.github/workflows/ui-smoke.yml @@ -95,6 +95,8 @@ jobs: device-green-on-palette-review.png mixer-design-review.png mixer-design-review-1440.png + native-input-patch-review-1680.png + native-input-patch-review-1440.png mixer-master-clip-review.png mixer-pro-view-review.png mixer-master-dual-metric-left-rail.png diff --git a/docs/R1_NATIVE_INPUT_PATCH_MATRIX_20261029.md b/docs/R1_NATIVE_INPUT_PATCH_MATRIX_20261029.md index 49e8b730f..5670a38ba 100644 --- a/docs/R1_NATIVE_INPUT_PATCH_MATRIX_20261029.md +++ b/docs/R1_NATIVE_INPUT_PATCH_MATRIX_20261029.md @@ -4,7 +4,7 @@ ## Implemented -- Native ROUTING opens from toolbar **in one click** (existing SIGNAL FLOW action); no extra diagram or operator-facing START LAB. Original ArSonMix metallic charcoal / aquatic green UI, 1100px bounded panel, horizontal paging of eight active physical input ports, 10 fixed CH rows. +- Native ROUTING opens from toolbar **in one click** (existing SIGNAL FLOW action); no extra diagram or operator-facing START LAB. Original ArSonMix metallic charcoal / aquatic green UI, 1100px bounded panel, horizontal paging of eight fixed-size matrix columns per page (unused hardware input slots are disabled, never stretched into oversized tiles), 10 fixed CH rows. - Matrix gets real physical source list from `dryRoutingLab.ports` on the active JUCE DIRECT device, not static assumptions or browser localStorage. Escaped device names; malformed, duplicate or invalid physical port descriptors ignored. - MONO: click a physical input to patch; click again to clear; new choice replaces old. STEREO: independent visible L/R selectors; incomplete, duplicate-side or stale hardware port rejects before native call. NONE and BUS remain explicit. Physical fan-out to several channels is allowed by existing native routing plan. - User edits are DRAFT only (amber). LIVE/green only if the device-epoch-matched acknowledged `acceptedRoute` reports that exact physical assignment. A removed cell displays old-live-until-APPLY status. REVERT reinstates native ACK, not a browser snapshot. Native `routingDryApply` and exact `arMixRoutingLabAck` are reused; no backend duplication. No automatic unmute; output must be MUTED. diff --git a/tests/ui_smoke.py b/tests/ui_smoke.py index 461295318..3ee573a64 100644 --- a/tests/ui_smoke.py +++ b/tests/ui_smoke.py @@ -1249,6 +1249,23 @@ async def image_for(selector): assert await native.locator("#arRoutingLabOverlay").evaluate( "(e)=>e.classList.contains('open')") assert await native.locator("#arPatchGrid [data-patch-row][data-patch-port]").count()==20 + assert await native.locator("#arPatchGrid .arPatchCell").count()==80 + patch_visual=await native.evaluate("""()=>{ + const grid=document.querySelector('#arPatchGrid').getBoundingClientRect(); + const cols=[...document.querySelectorAll('#arPatchGrid .arPatchPort')] + .map(x=>x.getBoundingClientRect().width); + const panel=document.querySelector('#arRoutingLabPanel').getBoundingClientRect(); + return {grid:Math.round(grid.width),panel:Math.round(panel.width), + cols:cols.map(Math.round),rowCount: + document.querySelectorAll('#arPatchGrid .arPatchChan').length}; + }""") + assert patch_visual['rowCount']==10 and len(patch_visual['cols'])==8,patch_visual + assert max(patch_visual['cols'])-min(patch_visual['cols'])<=1,patch_visual + assert all(58<=w<=140 for w in patch_visual['cols']),patch_visual + await native.screenshot(path=str(project/"native-input-patch-review-1680.png")) + await native.set_viewport_size({"width":1440,"height":820}) + await native.screenshot(path=str(project/"native-input-patch-review-1440.png")) + await native.set_viewport_size({"width":1680,"height":920}) assert await native.locator("#arPatchGrid .arPatchRow").first.evaluate( "(e)=>getComputedStyle(e).display")=="contents" assert await native.locator(".arPatchPort").first.get_attribute("title")=="Input & One" diff --git a/web/monitor.js b/web/monitor.js index aebbee8af..16c5fc7ac 100644 --- a/web/monitor.js +++ b/web/monitor.js @@ -39,7 +39,7 @@ ".arAuxRow{display:grid;grid-template-columns:64px 52px 90px 70px 1fr;align-items:center;gap:7px;padding:7px;background:#0c202b;border-bottom:1px solid #36515f;font-size:11px}.arAuxRow label{display:flex;gap:4px;align-items:center}.arAuxRow select{min-width:0;width:100%;background:#0c202b;color:#dcecf3;border:1px solid #496b7a;padding:6px;border-radius:4px}#arAuxReturns h3{font-size:12px;color:#b1d4dd;margin:14px 0 8px}#arAuxReturns p{color:#90afbc;font-size:10px;margin:4px 0 7px}"; // R1 native-only patchbay: static CSS with cheap hover. No filter/blur/animations. css.textContent += "\n#arRoutingLabOverlay{background:#06121ccc}\n#arRoutingLabPanel{width:min(1110px,97vw);max-height:92vh;padding:0;background:#182a36;border:1px solid #68808c;border-radius:7px;overflow:auto;box-shadow:0 12px 32px #0009}\n.arPatchTop{padding:15px 20px;display:flex;align-items:center;justify-content:space-between;gap:12px;background:linear-gradient(#344955,#1a2c38);border-bottom:1px solid #45606e}\n.arPatchBrand{font-size:16px;font-weight:800;letter-spacing:.025em;color:#ecf3f5}\n.arPatchBrand em{font-size:11px;font-style:normal;font-weight:650;color:#9bdfdf;letter-spacing:.12em;margin-left:8px}\n.arPatchSub{color:#b0c6d0;font-size:10px;margin-top:5px}\n.arPatchTabs{display:flex;gap:5px;padding:10px 19px;background:#142733;border-bottom:1px solid #334d5a}\n.arPatchTabs button{border:1px solid transparent;border-radius:3px;background:#182c39;color:#9cb5c1;font-size:11px;letter-spacing:.05em;font-weight:700;padding:9px 16px;cursor:pointer}\n.arPatchTabs button[aria-selected=true]{background:#2a5262;color:#eaf9fa;border-color:#6093a4}\n.arPatchTabs button:hover{background:#2d4553;color:#fff}\n.arPatchTabs button:focus-visible,.arPatchGrid button:focus-visible{outline:2px solid #91e8dc;outline-offset:-2px}\n.arPatchBody{padding:16px 20px 6px;min-height:360px}\n.arPatchHeading{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:12px;margin-bottom:12px}\n.arPatchHeading strong{color:#e1f2f5;font-size:12px;letter-spacing:.09em}\n.arPatchHeading small{display:block;margin-top:5px;font-size:10px;color:#a5c2cc}\n.arPatchPager{display:flex;align-items:center;gap:8px;color:#c2d4dc;font-size:10px}\n.arPatchPager button{border:1px solid #5a7b88;background:#253b48;border-radius:3px;color:#e6eff4;padding:6px 12px;cursor:pointer}\n.arPatchPager button:disabled{opacity:.3;cursor:default}\n.arPatchViewport{border:1px solid #426071;border-radius:4px;overflow:auto;background:#0c1d28}\n.arPatchGrid{display:grid;min-width:650px;width:100%;font-variant-numeric:tabular-nums}\n.arPatchCorner,.arPatchPort,.arPatchChan,.arPatchCell{min-width:0;box-sizing:border-box;min-height:39px;border:0;border-right:1px solid #25404e;border-bottom:1px solid #263d4b}\n.arPatchCorner{padding:13px 10px;position:sticky;left:0;z-index:2;background:#263d4a;color:#d3e9f0;font-size:10px;font-weight:700}\n.arPatchPort{background:#243b49;display:flex;flex-direction:column;align-items:center;justify-content:center;color:#ebf5fa;font-size:10px;font-weight:750;padding:4px;white-space:nowrap}\n.arPatchPort small{color:#aac3ce;font-weight:400;font-size:9px;text-overflow:ellipsis;overflow:hidden;max-width:100%}\n.arPatchChan{position:sticky;left:0;z-index:1;background:#1c3240;display:flex;gap:7px;align-items:center;padding:5px 8px}\n.arPatchChan strong{font-size:11px;color:#edf7f9;min-width:42px}\n.arPatchChan select{width:86px;min-width:0;padding:5px;background:#0f2633;color:#dae9ef;border:1px solid #4c6876;border-radius:3px;font-size:10px}\n.arPatchSides{display:flex;gap:2px;margin-left:auto}\n.arPatchSides button{width:24px;height:26px;padding:0;border:1px solid #486b7a;background:#102935;color:#9ebfce;cursor:pointer;font-size:10px;border-radius:2px}\n.arPatchSides button[aria-pressed=true]{background:#456c7c;border-color:#9acbd5;color:#fff}\n.arPatchSides button:disabled{opacity:.25;cursor:default}\n.arPatchChan[data-status=live]{border-left:3px solid #51ccb6;padding-left:5px}\n.arPatchChan[data-status=draft]{border-left:3px solid #e6b968;padding-left:5px}\n.arPatchCell{cursor:pointer;display:flex;justify-content:center;align-items:center;background:#102631;color:#597887;font-size:11px;font-weight:750}\n.arPatchCell:hover,.arPatchCell.arPatchColHover{background:#2a4959;color:#f2fbfc}\n.arPatchCell[data-patch-state=live]{background:#145447;color:#a4f6df;box-shadow:inset 0 0 0 1px #428877}\n.arPatchCell[data-patch-state=draft]{background:#715532;color:#ffe3aa;box-shadow:inset 0 0 0 1px #c79651}\n.arPatchCell[data-patch-state=removed]{background:#453b40;color:#e9b49c;box-shadow:inset 0 0 0 1px #99755e}\n.arPatchCell[data-patch-state=live]:hover{background:#1e7564}\n.arPatchCell[data-patch-state=draft]:hover{background:#926936}\n.arPatchCell:disabled{cursor:not-allowed;opacity:.36}\n.arPatchLegend{display:flex;flex-wrap:wrap;gap:18px;align-items:center;padding:13px 1px;color:#b4cad2;font-size:10px}\n.arPatchLegend b{display:inline-block;width:9px;height:9px;vertical-align:middle;margin-right:6px;background:#233d4a;border:1px solid #7b97a4}\n.arPatchLegend b.live{background:#44bea9;border-color:#44bea9}\n.arPatchLegend b.draft{background:#dba858;border-color:#dba858}\n.arPatchLegend b.removed{background:#8a695a;border-color:#8a695a}\n.arPatchInspector{border-top:1px solid #385564;display:flex;gap:10px;align-items:center;justify-content:space-between;padding:12px 1px;font-size:11px;color:#b9cfd9}\n.arPatchInspector strong{color:#e5f2f6}\n.arPatchNote{color:#99b6c0;font-size:10px;margin:6px 1px 12px}\n.arPatchEmpty{padding:45px 10px;text-align:center;background:#102733;border:1px dashed #476575;color:#b8d2dc;font-size:12px}\n.arPatchHidden{display:none!important}\n.arPatchFooter{display:flex;align-items:center;justify-content:space-between;gap:15px;flex-wrap:wrap;padding:12px 20px;background:#1c303e;border-top:1px solid #395568}\n#arRouteFeedback{flex:1;min-width:230px;margin:0;font-size:11px;color:#bfe5e7}\n.arPatchFooter .arRouteFoot{margin:0}\n#arRouteApply{background:#1c6b61;border-color:#4da99d;color:#effffb;font-weight:750}\n#arRouteApply:disabled{opacity:.5;cursor:default}\n#arPatchRevert{background:#253d49;border:1px solid #658190}\n#arPatchOutputMap{display:flex;gap:14px;flex-wrap:wrap}\n.arPatchOutput{flex:1;min-width:170px;padding:22px 16px;border:1px solid #3b6273;border-radius:4px;background:#102834}\n.arPatchOutput b{display:block;color:#b4f1e5;margin-bottom:10px}.arPatchOutput span{font-size:11px;color:#aec8d1}\n@media(max-width:730px){.arPatchTop{padding:12px}.arPatchTabs{padding:8px}.arPatchTabs button{padding:9px 7px;font-size:9px}.arPatchBody{padding:10px}.arPatchFooter{padding:10px}}\n"; - css.textContent += ".arPatchRow{display:contents}.arPatchPort.arPatchColHover{background:#385a69}.arPatchChan:hover{background:#294756}"; + css.textContent += ".arPatchRow{display:contents}.arPatchPort.arPatchColHover{background:#385a69}.arPatchChan:hover{background:#294756}.arPatchUnavailable{opacity:.23;pointer-events:none}"; document.head.appendChild(css); // Signal Check is declared in the permanent toolbar; footer holds status only. const overlay = document.createElement("div"); @@ -247,12 +247,14 @@ patchGrid.innerHTML='
NO VERIFIED HARDWARE INPUTS · Choose a DIRECT ASIO / WASAPI device in AUDIO SETUP
'; return; } - patchGrid.style.gridTemplateColumns="190px repeat("+shown.length+",minmax(58px,1fr))"; + patchGrid.style.gridTemplateColumns="190px repeat("+patchPageSize+",minmax(58px,1fr))"; let html='
CHANNEL / FORMAT
'; for(const port of shown) html+='
IN '+(port.port+1)+ ''+safeRouteText(port.label||"Physical input")+'
'; + for(let k=shown.length;k'+ content+''; } + for(let k=shown.length;k