From 22c3326038f4bbf81f5f356d98c3b51cd88dc183 Mon Sep 17 00:00:00 2001 From: Ari Sulistiono Date: Wed, 4 Nov 2026 13:55:59 +0700 Subject: [PATCH 01/13] fix(wire): fail closed for unresolved legacy patch imports --- site/preview-v2/assets/wire-graph-model.js | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/site/preview-v2/assets/wire-graph-model.js b/site/preview-v2/assets/wire-graph-model.js index 1c541cbe7..ffcddad47 100644 --- a/site/preview-v2/assets/wire-graph-model.js +++ b/site/preview-v2/assets/wire-graph-model.js @@ -147,15 +147,26 @@ edges.push({id:nextId++,sourceId:src,destId:dst,kind,mode,levelDb,enabled:true}); }; for(const t of channels){ - const out=t.output==='Master'?mainId:names.get(t.output); + // A legacy patch that points to a deleted/renamed channel must not + // silently disappear on Show/Scene import. Fail before graph publication. + const output=String(t.output||''); + const out=output==='Master'?mainId:names.get(output); + if(!out&&output&&output!=='None'&&output!=='SOURCE ONLY (No Main)') + return {ok:false,error:'UNRESOLVED_LEGACY_OUTPUT'}; if(out)add(t.id,out,'primary',out===mainId?'postFader':'routeOnly'); if(Array.isArray(t.sendSlots))for(let i=0;i Date: Wed, 4 Nov 2026 13:56:23 +0700 Subject: [PATCH 02/13] test(wire): randomized canonical DAG and fail-closed legacy migration --- tests/wire_graph_canonical_model.test.cjs | 38 +++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/tests/wire_graph_canonical_model.test.cjs b/tests/wire_graph_canonical_model.test.cjs index 84a088a23..7e5ff6d99 100644 --- a/tests/wire_graph_canonical_model.test.cjs +++ b/tests/wire_graph_canonical_model.test.cjs @@ -43,6 +43,44 @@ const legacy=graph.migrateLegacy([{...channels[0],send:'CH2',sendOn:true,sendLev channels[1],channels[2]],9); assert.equal(legacy.ok,true); assert.equal(legacy.edges.filter(e=>e.sourceId===1&&e.destId===2).length,1); +// Imported saved patches must never vanish because a renamed destination is +// missing. No partial migration/ghost route is allowed on Scene recall. +const badOutput=graph.migrateLegacy([{...channels[0],output:'Deleted Bus'},channels[1],channels[2]],9); +assert.equal(badOutput.error,'UNRESOLVED_LEGACY_OUTPUT'); +const badSend=graph.migrateLegacy([{...channels[0],send:'Deleted Bus',sendOn:true, + sendSlots:[{send:'Deleted Bus',sendOn:true,sendLevel:-6}],activeSend:0}, + channels[1],channels[2]],9); +assert.equal(badSend.error,'UNRESOLVED_LEGACY_SEND'); +const badGain=graph.migrateLegacy([{...channels[0],send:'CH2',sendOn:true, + sendSlots:[{send:'CH2',sendOn:true,sendLevel:NaN}],activeSend:0,sendLevel:NaN}, + channels[1],channels[2]],9); +assert.equal(badGain.error,'INVALID_LEGACY_SEND_GAIN'); +const badSplit=graph.migrateLegacy([{...channels[0],input:'CH99 PRE-FX SPLIT'},channels[1],channels[2]],9); +assert.equal(badSplit.error,'INVALID_EDGE'); +const unrecognizedSplit=graph.migrateLegacy([{...channels[0],input:'CH?? PRE-FX SPLIT'},channels[1],channels[2]],9); +assert.equal(unrecognizedSplit.error,'UNRESOLVED_LEGACY_SPLIT'); +// Deterministic random edit sequences check that no rejected candidate +// changes graph data and all accepted candidates remain acyclic. +let seed=0x5eeda11; +const rand=()=>{seed=(Math.imul(seed,1664525)+1013904223)>>>0;return seed;}; +for(let sequence=0;sequence<32;sequence++){ + let cur={channels,mainId:9,edges:base.edges.map(e=>({...e})),nextId:base.nextId}; + for(let step=0;step<48;step++){ + const src=1+(rand()%3),dst=[1,2,3,9][rand()%4]; + const existing=cur.edges.filter(e=>e.sourceId===src); + const pick=existing.length?existing[rand()%existing.length]:null; + const op=pick&&(rand()%3===0)?{type:'REMOVE',sourceId:src,edgeId:pick.id}: + {type:'CONNECT',sourceId:src,destId:dst}; + const oldJson=JSON.stringify(cur),result=graph.applyWireTransaction(cur,[op]); + assert.equal(JSON.stringify(cur),oldJson,'pure reducer must never mutate input'); + if(result.ok){ + cur={...cur,edges:result.edges,nextId:result.nextId}; + assert.equal(graph.validateCandidateGraph(channels,9,cur.edges).ok,true); + assert.equal(new Set(cur.edges.map(e=>e.id)).size,cur.edges.length); + assert.equal(new Set(cur.edges.map(e=>e.sourceId+':'+e.destId)).size,cur.edges.length); + } + } +} // Safety contract: every entry point (including Scenes and untrusted imports) // must fail closed for unknown kinds/taps, never silently create a SEND. const unknownKind={...state.edges[0],kind:'phantom'}; From 54657c7fcf0bd44d90451de910dad45608ccb404 Mon Sep 17 00:00:00 2001 From: Ari Sulistiono Date: Wed, 4 Nov 2026 13:58:40 +0700 Subject: [PATCH 03/13] feat(wire): draw two measured curved MAIN cable fragments for one graph edge --- site/preview-v2/index.html | 45 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/site/preview-v2/index.html b/site/preview-v2/index.html index d1e064bc5..4e4819d40 100644 --- a/site/preview-v2/index.html +++ b/site/preview-v2/index.html @@ -1529,6 +1529,49 @@ return (dot||button).getBoundingClientRect?.()||null; } /* One pair of short MAIN-colored stubs is a projection of ONE real edgeId. */ +/* One accepted CH→MAIN edge is represented by two local cable fragments. + Physical coordinates are measured from actual sockets; never connect strips + with a long SVG crossing banks or alter the audio graph. */ +function paintMainWireFragment(strip,edge,isMain){ + const section=strip?.querySelector('.send-section.wire-section'); + if(!section)return; + let layer=section.querySelector('.wire-main-fragment'); + if(!edge||document.querySelector('.console-body')?.classList.contains('collapsed-send')){ + layer?.remove();return; + } + const jack=section.querySelector(isMain?'.wire-node-in .wire-arrow':'.wire-node-out .wire-pin'); + const sectionRect=section.getBoundingClientRect(),pin=jack?.getBoundingClientRect(); + if(!pin||!sectionRect.width||!sectionRect.height)return; + const x=pin.left+pin.width/2-sectionRect.left; + const y=pin.top+pin.height/2-sectionRect.top; + const lower=Math.min(sectionRect.height-2,Math.max(y+5,sectionRect.height-2)); + const dx=Math.min(8,Math.max(3,sectionRect.width*.07)); + const start=isMain?[x+dx,lower]:[x,y]; + const end=isMain?[x,y]:[x+dx,lower]; + const c1=isMain?[start[0],start[1]-Math.max(8,(lower-y)*.65)]: + [start[0],start[1]+Math.max(8,(lower-y)*.65)]; + const c2=isMain?[end[0]+dx*.65,end[1]+Math.max(4,(lower-y)*.35)]: + [end[0]+dx*.65,end[1]-Math.max(4,(lower-y)*.35)]; + const path='M'+start.map(n=>n.toFixed(2)).join(' ')+ + ' C'+c1.map(n=>n.toFixed(2)).join(' ')+','+ + c2.map(n=>n.toFixed(2)).join(' ')+','+ + end.map(n=>n.toFixed(2)).join(' '); + const sig=edge.id+':'+sectionRect.width.toFixed(1)+':'+sectionRect.height.toFixed(1)+':'+path; + if(layer?.dataset.geometry===sig)return; + if(!layer){ + layer=document.createElementNS('http://www.w3.org/2000/svg','svg'); + layer.setAttribute('class','wire-main-fragment'); + layer.setAttribute('aria-hidden','true'); + section.appendChild(layer); + } + layer.dataset.geometry=sig;layer.dataset.edgeId=String(edge.id); + layer.setAttribute('viewBox','0 0 '+sectionRect.width+' '+sectionRect.height); + const p=(className,d)=>''; + layer.innerHTML=p('wire-main-shadow',path)+p('wire-main-jacket',path)+ + p('wire-main-sheen',path)+ + ''; + layer.style.setProperty('--main-wire-hue',master.color); +} function syncMainWireFragments(){ const selectedSources=selection().filter(t=>t.kind!=='master'); const focus=armedWireSource()||(selectedSources.length===1?selectedSources[0]:null); @@ -1536,6 +1579,7 @@ for(const t of tracks){ const edge=wireFor(t.id,master.id); const lane=document.querySelector('.strip[data-id="'+t.id+'"]'); + paintMainWireFragment(lane,edge,false); for(const el of [lane?.querySelector('.wire-node-out'),lane?.querySelector('.wire-fold-summary')]){ if(!el)continue; if(edge)el.setAttribute('data-wire-main-edge',String(edge.id)); @@ -1543,6 +1587,7 @@ el.style.setProperty('--main-wire-hue',master.color); } } + paintMainWireFragment(masterEl,selected,true); for(const el of [masterEl.querySelector('.wire-node-in'),masterEl.querySelector('.wire-fold-summary')]){ if(!el)continue; if(selected)el.setAttribute('data-wire-main-edge',String(selected.id)); From 501a8b768308701e0f0a8d1b1d50078fc84fae37 Mon Sep 17 00:00:00 2001 From: Ari Sulistiono Date: Wed, 4 Nov 2026 13:58:58 +0700 Subject: [PATCH 04/13] style(wire): replace straight MAIN CSS stubs with curved cable material --- site/preview-v2/assets/mixer-wire-dots.css | 49 ++++++++++++---------- 1 file changed, 28 insertions(+), 21 deletions(-) diff --git a/site/preview-v2/assets/mixer-wire-dots.css b/site/preview-v2/assets/mixer-wire-dots.css index 598c6c9ee..b02449415 100644 --- a/site/preview-v2/assets/mixer-wire-dots.css +++ b/site/preview-v2/assets/mixer-wire-dots.css @@ -936,28 +936,35 @@ box-shadow:inset 0 1px 2px #07141c!important; } -/* WIRE A2: MAIN-color cable stubs. Source and pinned MAIN consume the SAME - data-wire-main-edge identity. Scoped to the existing WIRE CSS owner. - No new layout box, no cross-bank SVG, no hit area or compositor animation. */ -/* Position source stub on the actual 12px OUT PIN, not the wider - caption-bearing button: accurate at every density and browser width. */ -.console-body.wire-routing-v15 .strip .wire-tray - .wire-node-out[data-wire-main-edge] .wire-pin{position:relative;overflow:visible} -.console-body.wire-routing-v15 .strip .wire-tray - .wire-node-out[data-wire-main-edge] .wire-pin::after, -.console-body.wire-routing-v15 #master .wire-tray - .wire-node-in[data-wire-main-edge]::before{ - content:"";position:absolute;left:calc(50% - 1.25px);width:2.5px; - height:12px;background:var(--main-wire-hue,#a04b65); - border-radius:0 0 4px 4px;box-shadow:1px 0 #09121f,0 0 0 1px #111e29; - pointer-events:none;z-index:1; +/* WIRE A2: two measured, local SVG fragments of one accepted MAIN edge. + Existing WIRE component owns material; jack hitboxes and console geometry + stay untouched. A tiny cubic sag replaces the former straight pseudo-stub. */ +.console-body.wire-routing-v15 .strip .send-section.wire-section{ + position:relative; } -.console-body.wire-routing-v15 .strip .wire-tray - .wire-node-out[data-wire-main-edge] .wire-pin::after{top:10px;transform:rotate(-8deg);transform-origin:top center} -.console-body.wire-routing-v15 #master .wire-tray - .wire-node-in[data-wire-main-edge]::before{ - top:23px;transform:rotate(8deg);transform-origin:top center; - border-radius:4px 4px 0 0; +.console-body.wire-routing-v15 .strip .wire-main-fragment{ + position:absolute;inset:0;width:100%;height:100%; + display:block;overflow:hidden;z-index:2;pointer-events:none; +} +.console-body.wire-routing-v15 .strip .wire-main-fragment .wire-main-shadow, +.console-body.wire-routing-v15 .strip .wire-main-fragment .wire-main-jacket, +.console-body.wire-routing-v15 .strip .wire-main-fragment .wire-main-sheen{ + fill:none;stroke-linecap:round;stroke-linejoin:round; +} +.console-body.wire-routing-v15 .strip .wire-main-fragment .wire-main-shadow{ + stroke:#061019;stroke-width:5.4; +} +.console-body.wire-routing-v15 .strip .wire-main-fragment .wire-main-jacket{ + stroke:var(--main-wire-hue,#a04b65);stroke-width:3.4; +} +.console-body.wire-routing-v15 .strip .wire-main-fragment .wire-main-sheen{ + stroke:#ffffff45;stroke-width:.8;opacity:.7; +} +.console-body.wire-routing-v15 .strip .wire-main-fragment .wire-main-plug{ + fill:#9eabb2;stroke:#152530;stroke-width:1.3; +} +.console-body.wire-routing-v15.collapsed-send .strip .wire-main-fragment{ + display:none; } /* Folded 23px WIRE retains two discreet color fragments tied to exact graph IDs. The accepted V52 fader, V51 meter and V54 jack material remain unchanged. */ From bedb4d8b839091fc6c4d3c6d8ad63475291e5bf5 Mon Sep 17 00:00:00 2001 From: Ari Sulistiono Date: Wed, 4 Nov 2026 13:59:26 +0700 Subject: [PATCH 05/13] test(wire): verify paired MAIN SVG curved physical cables in Chromium --- tests/pages_wire_first_canonical_main_smoke.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tests/pages_wire_first_canonical_main_smoke.py b/tests/pages_wire_first_canonical_main_smoke.py index 91e823c8b..febcaedeb 100644 --- a/tests/pages_wire_first_canonical_main_smoke.py +++ b/tests/pages_wire_first_canonical_main_smoke.py @@ -95,6 +95,18 @@ def run(): control=main_button(page,5) assert page.locator('#master .wire-node-in').get_attribute("data-wire-main-edge")==initial assert control.get_attribute("aria-pressed")=="true" + # One graph edge paints TWO measured local cubic cables, never a + # cross-bank line. Geometry and edge identity survive all widths. + source_stub=page.locator('#tracks .strip[data-id="5"] .wire-main-fragment') + main_stub=page.locator('#master .wire-main-fragment') + assert source_stub.count()==1 and main_stub.count()==1,( + width,"missing paired physical MAIN cables") + assert source_stub.get_attribute("data-edge-id")==initial + assert main_stub.get_attribute("data-edge-id")==initial + assert " C" in source_stub.locator(".wire-main-jacket").get_attribute("d") + assert " C" in main_stub.locator(".wire-main-jacket").get_attribute("d") + assert page.locator('#tracks .strip[data-id="6"] .wire-main-fragment').count()==1 + # Distinct disconnect is reversible and only affects this channel. control.click() assert edge(page,5,"out") is None,(width,"MAIN disconnect not real") From c83be9c34794d9244142060839d8d6876f898ed1 Mon Sep 17 00:00:00 2001 From: Ari Sulistiono Date: Wed, 4 Nov 2026 14:00:18 +0700 Subject: [PATCH 06/13] test(wire): expand collapsed bay before checking real physical MAIN fragments --- tests/pages_wire_first_canonical_main_smoke.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/pages_wire_first_canonical_main_smoke.py b/tests/pages_wire_first_canonical_main_smoke.py index febcaedeb..6bec19d2b 100644 --- a/tests/pages_wire_first_canonical_main_smoke.py +++ b/tests/pages_wire_first_canonical_main_smoke.py @@ -95,6 +95,8 @@ def run(): control=main_button(page,5) assert page.locator('#master .wire-node-in').get_attribute("data-wire-main-edge")==initial assert control.get_attribute("aria-pressed")=="true" + if "collapsed-send" in (page.locator(".console-body").get_attribute("class") or ""): + page.locator('.section-rail [data-section="send"]').click() # One graph edge paints TWO measured local cubic cables, never a # cross-bank line. Geometry and edge identity survive all widths. source_stub=page.locator('#tracks .strip[data-id="5"] .wire-main-fragment') From 4a84eb0ae3a2454bc32cbad853ea2b7d45500c61 Mon Sep 17 00:00:00 2001 From: Ari Sulistiono Date: Wed, 4 Nov 2026 14:04:09 +0700 Subject: [PATCH 07/13] perf(wire): avoid MAIN fragment layout measurements on pointer frames --- site/preview-v2/index.html | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/site/preview-v2/index.html b/site/preview-v2/index.html index 4e4819d40..4b42185ba 100644 --- a/site/preview-v2/index.html +++ b/site/preview-v2/index.html @@ -1539,6 +1539,10 @@ if(!edge||document.querySelector('.console-body')?.classList.contains('collapsed-send')){ layer?.remove();return; } + // Pointer-motion repaint must not synchronously remeasure every channel. + // Structural render, bank, density and resize remount the section; a + // changed accepted edgeId invalidates this tiny projection automatically. + if(layer?.dataset.edgeId===String(edge.id))return; const jack=section.querySelector(isMain?'.wire-node-in .wire-arrow':'.wire-node-out .wire-pin'); const sectionRect=section.getBoundingClientRect(),pin=jack?.getBoundingClientRect(); if(!pin||!sectionRect.width||!sectionRect.height)return; From baf4e4250ae826703c69e1cc07c719a95bb68411 Mon Sep 17 00:00:00 2001 From: Ari Sulistiono Date: Wed, 4 Nov 2026 14:48:52 +0700 Subject: [PATCH 08/13] fix(wire): reject ambiguous and duplicate legacy routes without lossy migration --- site/preview-v2/assets/wire-graph-model.js | 46 ++++++++++++++++------ 1 file changed, 34 insertions(+), 12 deletions(-) diff --git a/site/preview-v2/assets/wire-graph-model.js b/site/preview-v2/assets/wire-graph-model.js index ffcddad47..0555c5324 100644 --- a/site/preview-v2/assets/wire-graph-model.js +++ b/site/preview-v2/assets/wire-graph-model.js @@ -141,10 +141,22 @@ const edges=existingEdges.map(e=>({...e})),seen=new Set(edges.map(edgeKey)); nextId=Math.max(nextId,1,...edges.map(e=>e.id+1)); const names=new Map(channels.map(c=>[c.name,c.id])); + if(names.size!==channels.length)return {ok:false,error:'AMBIGUOUS_LEGACY_NAME'}; const add=(src,dst,kind='send',mode='send',levelDb=0)=>{ - if(!validId(src)||!validId(dst)||src===dst||seen.has(src+':'+dst))return; - seen.add(src+':'+dst); + if(!validId(src)||!validId(dst)||src===dst)return 'INVALID_LEGACY_ROUTE'; + const key=src+':'+dst; + if(seen.has(key))return 'DUPLICATE_LEGACY_ROUTE'; + seen.add(key); edges.push({id:nextId++,sourceId:src,destId:dst,kind,mode,levelDb,enabled:true}); + return null; + }; + const importSend=(t,slot)=>{ + if(!slot||typeof slot!=='object')return 'INVALID_LEGACY_SEND_SLOT'; + if(!slot.sendOn)return null; + if(!names.has(slot.send))return 'UNRESOLVED_LEGACY_SEND'; + const gain=Number(slot.sendLevel); + if(!Number.isFinite(gain))return 'INVALID_LEGACY_SEND_GAIN'; + return add(t.id,names.get(slot.send),'send','send',Math.max(-60,Math.min(6,gain))); }; for(const t of channels){ // A legacy patch that points to a deleted/renamed channel must not @@ -153,20 +165,30 @@ const out=output==='Master'?mainId:names.get(output); if(!out&&output&&output!=='None'&&output!=='SOURCE ONLY (No Main)') return {ok:false,error:'UNRESOLVED_LEGACY_OUTPUT'}; - if(out)add(t.id,out,'primary',out===mainId?'postFader':'routeOnly'); - if(Array.isArray(t.sendSlots))for(let i=0;i=slots.length) + return {ok:false,error:'INVALID_LEGACY_ACTIVE_SEND'}; + for(let i=0;i Date: Wed, 4 Nov 2026 14:49:09 +0700 Subject: [PATCH 09/13] test(wire): cover legacy duplicate, malformed split, missing slot and single send --- tests/wire_graph_canonical_model.test.cjs | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/tests/wire_graph_canonical_model.test.cjs b/tests/wire_graph_canonical_model.test.cjs index 7e5ff6d99..a8a5a2aeb 100644 --- a/tests/wire_graph_canonical_model.test.cjs +++ b/tests/wire_graph_canonical_model.test.cjs @@ -59,6 +59,28 @@ const badSplit=graph.migrateLegacy([{...channels[0],input:'CH99 PRE-FX SPLIT'},c assert.equal(badSplit.error,'INVALID_EDGE'); const unrecognizedSplit=graph.migrateLegacy([{...channels[0],input:'CH?? PRE-FX SPLIT'},channels[1],channels[2]],9); assert.equal(unrecognizedSplit.error,'UNRESOLVED_LEGACY_SPLIT'); +// A legacy migration is transactional: never silently drop duplicated slots, +// unknown source indices, ambiguous names, or an older single live SEND. +const duplicateLegacySend=graph.migrateLegacy([ + {...channels[0],send:'CH2',sendOn:true,sendLevel:-6,activeSend:0, + sendSlots:[{send:'CH2',sendOn:true,sendLevel:-6}, + {send:'CH2',sendOn:true,sendLevel:-12}]}, + channels[1],channels[2]],9); +assert.equal(duplicateLegacySend.error,'DUPLICATE_LEGACY_ROUTE'); +assert.equal(graph.migrateLegacy([{...channels[0],name:'CH2'},channels[1],channels[2]],9).error, + 'AMBIGUOUS_LEGACY_NAME'); +assert.equal(graph.migrateLegacy([{...channels[0],sendSlots:[null],activeSend:0}, + channels[1],channels[2]],9).error,'INVALID_LEGACY_SEND_SLOT'); +assert.equal(graph.migrateLegacy([{...channels[0],sendSlots:[{}],activeSend:3}, + channels[1],channels[2]],9).error,'INVALID_LEGACY_ACTIVE_SEND'); +assert.equal(graph.migrateLegacy([{...channels[0],input:'CH0 PRE-FX SPLIT'}, + channels[1],channels[2]],9).error,'INVALID_LEGACY_ROUTE'); +const singleSlotLegacy=graph.migrateLegacy([{...channels[0],send:'CH2',sendOn:true,sendLevel:-9}, + channels[1],channels[2]],9); +assert.equal(singleSlotLegacy.ok,true,'legacy single live SEND must remain audible'); +assert.equal(singleSlotLegacy.edges.filter(e=>e.sourceId===1&&e.destId===2).length,1); +const mixedDuplicate=graph.migrateLegacy(channels,9,[base.edges[0]],base.nextId); +assert.equal(mixedDuplicate.error,'DUPLICATE_LEGACY_ROUTE'); // Deterministic random edit sequences check that no rejected candidate // changes graph data and all accepted candidates remain acyclic. let seed=0x5eeda11; From ffd298a7c5fa803825b2a30d929e37504bbc91ca Mon Sep 17 00:00:00 2001 From: Ari Sulistiono Date: Wed, 4 Nov 2026 14:49:51 +0700 Subject: [PATCH 10/13] test(wire): render all nine viewport/density MAIN cable geometries and focus states --- .../pages_wire_first_canonical_main_smoke.py | 66 ++++++++++++++++++- 1 file changed, 65 insertions(+), 1 deletion(-) diff --git a/tests/pages_wire_first_canonical_main_smoke.py b/tests/pages_wire_first_canonical_main_smoke.py index 6bec19d2b..10b3044fa 100644 --- a/tests/pages_wire_first_canonical_main_smoke.py +++ b/tests/pages_wire_first_canonical_main_smoke.py @@ -78,9 +78,73 @@ def drag_to(point,escape=False): page.locator("#wireWsUndo").click() assert source.get_attribute("data-wire-main-edge")==original,"Retarget Undo did not restore MAIN" + +def audit_visual_matrix(browser): + """Nine real Chromium renders: viewport, density, focus, collapse, plug.""" + for width,height in ((1366,768),(1680,900),(1920,1080)): + for density in ("comfort","standard","compact"): + page=browser.new_page(viewport={"width":width,"height":height}, + reduced_motion="reduce") + errors=[] + page.on("pageerror",lambda exc: errors.append(str(exc))) + page.goto(PAGE.as_uri()) + page.locator("#densitySelect").select_option(density) + body=page.locator(".console-body") + if "collapsed-send" in (body.get_attribute("class") or ""): + page.locator('.section-rail [data-section="send"]').click() + pair=page.evaluate("""() => { + const src=document.querySelector('#tracks .strip[data-id="1"]'); + const main=document.querySelector('#master'); + const fragment=src?.querySelector('.wire-main-fragment'); + const incoming=main?.querySelector('.wire-main-fragment'); + const dot=src?.querySelector('.wire-node-out .wire-pin'); + const jack=main?.querySelector('.wire-node-in .wire-arrow'); + function position(svg,pin){ + if(!svg||!pin)return null; + const r=svg.getBoundingClientRect(),p=pin.getBoundingClientRect(); + const c=svg.querySelector('.wire-main-plug'); + const x=Number(c?.getAttribute('cx')),y=Number(c?.getAttribute('cy')); + if(!Number.isFinite(x)||!Number.isFinite(y))return null; + return {error:Math.hypot(r.left+x-(p.left+p.width/2), + r.top+y-(p.top+p.height/2)), + bounded:x>0&&x0&&yx.querySelector('.wire-node-out[data-wire-main-edge]')).length, + painted:strips.filter(x=>x.querySelector('.wire-main-fragment')).length}; + }""") + assert pair["source"] and pair["source"]==pair["main"]==pair["connected"],( + width,height,density,"MAIN fragments do not share exact graph edge",pair) + assert pair["sources"]==pair["painted"],( + width,height,density,"one physical MAIN fragment per connected source",pair) + for side in ("sourceGeometry","mainGeometry"): + geom=pair[side] + assert geom and geom["bounded"] and geom["cubic"] and geom["error"]<=1.1,( + width,height,density,side,"misaligned or clipped MAIN plug",geom) + # Selecting CH5 changes the MAIN plug edgeId, not other connections. + page.locator('#tracks .strip[data-id="5"] .strip-identity-top').click() + focused=page.locator('#master .wire-main-fragment').get_attribute("data-edge-id") + assert focused==edge(page,5,"out") and focused!=pair["source"],( + width,height,density,"focused MAIN edge selection") + page.locator('.section-rail [data-section="send"]').click() + assert page.locator('.wire-main-fragment').count()==0,( + width,height,density,"collapsed MAIN fragments not retired") + page.locator('.section-rail [data-section="send"]').click() + assert page.locator('#master .wire-main-fragment').get_attribute("data-edge-id")==focused + page.screenshot(path=str(PAGE.parents[2]/ + f"pages-wire-main-{width}x{height}-{density}.png")) + assert not errors,(width,height,density,errors) + page.close() + def run(): with sync_playwright() as pw: browser=pw.chromium.launch(headless=True) + audit_visual_matrix(browser) for width in (1366,1680,1920): page=browser.new_page(viewport={"width":width,"height":900}) errors=[] @@ -210,7 +274,7 @@ def run(): assert edge(page,5,"out") is None,"Snapshot SAFE overwrote live MAIN route" page.close() browser.close() - print("PASS WIRE A: real Chrome MAIN edgeId, physical plug Escape/unplug/replug/Undo, cycle guard, Scene/SAFE, 3 widths") + print("PASS WIRE A: nine Chromium viewport/density cable audits plus exact-edge MAIN gesture, Scene/SAFE, Undo") if __name__=="__main__": run() From e2a9e0e7d1e63b32d686a506f17fb261ab3945ee Mon Sep 17 00:00:00 2001 From: Ari Sulistiono Date: Wed, 4 Nov 2026 14:50:02 +0700 Subject: [PATCH 11/13] ci(wire): retain all nine rendered viewport-density MAIN screenshot proofs --- .github/workflows/ui-smoke.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ui-smoke.yml b/.github/workflows/ui-smoke.yml index e639a0100..97a671947 100644 --- a/.github/workflows/ui-smoke.yml +++ b/.github/workflows/ui-smoke.yml @@ -297,6 +297,7 @@ jobs: name: arsonmix-gui-baseline-smoke path: | pages-wire-main-1680.png + pages-wire-main-*.png pages-v51-portrait-meter-1680.png pages-fader-rollback-console-1680.png pages-fader-rollback-detail-1680.png From c94997762cb2710e6d63cccfcd634493fbe080a0 Mon Sep 17 00:00:00 2001 From: Ari Sulistiono Date: Wed, 4 Nov 2026 14:51:02 +0700 Subject: [PATCH 12/13] fix(wire): reject corrupt selected SEND slot metadata on Show import --- site/preview-v2/assets/wire-graph-model.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/site/preview-v2/assets/wire-graph-model.js b/site/preview-v2/assets/wire-graph-model.js index 0555c5324..6d8a2d49d 100644 --- a/site/preview-v2/assets/wire-graph-model.js +++ b/site/preview-v2/assets/wire-graph-model.js @@ -175,6 +175,10 @@ if(!Number.isSafeInteger(active)||active<0||active>=slots.length) return {ok:false,error:'INVALID_LEGACY_ACTIVE_SEND'}; for(let i=0;i Date: Wed, 4 Nov 2026 14:52:48 +0700 Subject: [PATCH 13/13] test(wire): validate Compact folded contacts instead of forbidden expanded cable geometry --- tests/pages_wire_first_canonical_main_smoke.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/tests/pages_wire_first_canonical_main_smoke.py b/tests/pages_wire_first_canonical_main_smoke.py index 10b3044fa..92ca4b023 100644 --- a/tests/pages_wire_first_canonical_main_smoke.py +++ b/tests/pages_wire_first_canonical_main_smoke.py @@ -90,6 +90,24 @@ def audit_visual_matrix(browser): page.goto(PAGE.as_uri()) page.locator("#densitySelect").select_option(density) body=page.locator(".console-body") + # Narrow/Compact intentionally locks the WIRE bay folded to keep + # 23px physical geometry. It has graph-bound compact contacts, + # not a full cable overlay; the rail refuses expansion by design. + if density=="compact": + assert "collapsed-send" in (body.get_attribute("class") or "") + initial=edge(page,1,"out") + assert initial and page.locator( + '#tracks .strip[data-id="1"] .wire-fold-summary' + ).get_attribute("data-wire-main-edge")==initial + assert page.locator( + '#master .wire-fold-summary' + ).get_attribute("data-wire-main-edge")==initial + assert page.locator(".wire-main-fragment").count()==0 + page.screenshot(path=str(PAGE.parents[2]/ + f"pages-wire-main-{width}x{height}-{density}.png")) + assert not errors,(width,height,density,errors) + page.close() + continue if "collapsed-send" in (body.get_attribute("class") or ""): page.locator('.section-rail [data-section="send"]').click() pair=page.evaluate("""() => {