Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
14 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 3 additions & 12 deletions site/preview-v2/assets/mixer-wire-dots.css
Original file line number Diff line number Diff line change
Expand Up @@ -966,15 +966,6 @@
.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. */
.console-body.wire-routing-v15.collapsed-send .strip
.wire-fold-summary[data-wire-main-edge]::after{
content:"";position:absolute;left:22%;bottom:1px;width:2px;height:8px;
border-radius:2px;background:var(--main-wire-hue,#a04b65);
transform:rotate(-9deg);pointer-events:none;opacity:.85;
}
.console-body.wire-routing-v15.collapsed-send #master
.wire-fold-summary[data-wire-main-edge]::after{
left:78%;transform:rotate(9deg);
}
/* V59: Folded WIRE shows only the flat IN/OUT contacts.
Physical MAIN cables (including ::after tails) are completely absent.
MAIN remains a canonical graph edge and does not light the OUT contact. */
117 changes: 54 additions & 63 deletions site/preview-v2/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@
<link rel="stylesheet" href="assets/mixer-meter-display.css?v=css-owner-v27-meter-pruned">
<link rel="stylesheet" href="assets/mixer-utility-controls.css?v=css-owner-v27-utility-pruned">
<link rel="stylesheet" href="assets/inter-embedded.css?v=inter-utility-v7">
<link rel="stylesheet" href="assets/mixer-wire-dots.css?v=v55-accepted-wire-paint">
<link rel="stylesheet" href="assets/mixer-wire-dots.css?v=v59-selected-wire-quiet">
<link rel="stylesheet" href="assets/mixer-wire-out-align-v48.css?v=out-center-v48">

<link rel="stylesheet" href="assets/mixer-contextual-buttons.css?v=contextual-micro-handoff-v1">
Expand Down Expand Up @@ -384,7 +384,7 @@
</div>
<div class="wire-config-row">
<label for="wireView">CABLE DISPLAY</label>
<select class="wire-view-select" id="wireView" title="Cable display only; does not change the audio graph" aria-label="Wire cable display"><option value="focus">Focus</option><option value="out">OUT only</option><option value="all">All wires</option></select>
<select class="wire-view-select" id="wireView" title="Cable display only; does not change the audio graph" aria-label="Wire cable display"><option value="focus">Selected IN + OUT</option><option value="out">Selected OUT only</option></select>
</div>
<div class="wire-config-context"><span class="wire-config-caption">SELECTED ROUTES & QUICK PATCH</span><div class="wire-legend" id="wireLegend" aria-live="polite">Select a channel for IN / OUT</div></div>
<div class="wire-config-foot">Mode affects new wires only · View never changes audio · GUI reference, no PCM</div>
Expand Down Expand Up @@ -609,7 +609,7 @@
}
function wireFor(src,dst){return wireEdges.find(e=>e.enabled&&e.sourceId===src&&e.destId===dst);}
function outgoingWires(id){return wireEdges.filter(e=>e.enabled&&e.sourceId===id);}
function wireOutgoingCount(id){return outgoingWires(id).length;}
function wireOutgoingCount(id){return outgoingWires(id).filter(e=>e.destId!==master.id).length;}
function wireIsCycle(src,dst){
if(src===dst)return true;
const candidate={id:nextWireId,sourceId:src,destId:dst,kind:'send',mode:'send',levelDb:0,enabled:true};
Expand Down Expand Up @@ -803,14 +803,14 @@
// CH→MAIN is also an actual graph route, not hidden OUT metadata.
return {
incoming:wireEdges.filter(e=>e.enabled&&e.destId===t.id).length,
outgoing:wireEdges.filter(e=>e.enabled&&e.sourceId===t.id).length
outgoing:wireEdges.filter(e=>e.enabled&&e.sourceId===t.id&&e.destId!==master.id).length
};
}
function compactWireSummary(t){
const {incoming,outgoing}=compactWireActivity(t);
const activeIn=incoming>0,activeOut=outgoing>0,connected=activeIn||activeOut;
const activeIn=t.kind!=='master'&&incoming>0,activeOut=outgoing>0,connected=activeIn||activeOut;
const title='Expand WIRE · '+t.name+' · '+incoming+' incoming, '+outgoing+
' outgoing canonical edges (including MAIN)';
' outgoing custom wires · MAIN is the default output';
// 1:1 physical order with the expanded patch:
// solid OUT dot LEFT, larger recessed IN circle RIGHT (with small center dot).
// Both muted while unused. A channel-hue indicator lights independently
Expand Down Expand Up @@ -1577,26 +1577,28 @@
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);
const selected=focus&&wireFor(focus.id,master.id);
// Render the physical MAIN fragments for ONE selected channel only.
// A pinned routing source is a patch action, not selection for cable display.
const selectedChannels=selection().filter(t=>t.kind!=='master');
const focus=selectedChannels.length===1?selectedChannels[0]:null;
const chosenEdge=focus?wireFor(focus.id,master.id):null;
const folded=document.querySelector('.console-body')?.classList.contains('collapsed-send');
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));
else el.removeAttribute('data-wire-main-edge');
el.style.setProperty('--main-wire-hue',master.color);
const edge=wireFor(t.id,master.id),lane=document.querySelector('.strip[data-id="'+t.id+'"]');
paintMainWireFragment(lane,!folded&&focus?.id===t.id?edge:null,false);
const node=lane?.querySelector('.wire-node-out');
if(node){
if(edge)node.setAttribute('data-wire-main-edge',String(edge.id));
else node.removeAttribute('data-wire-main-edge');
node.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));
else el.removeAttribute('data-wire-main-edge');
el.style.setProperty('--main-wire-hue',master.color);
paintMainWireFragment(masterEl,!folded?chosenEdge:null,true);
const node=masterEl.querySelector('.wire-node-in');
if(node){
if(chosenEdge&&!folded)node.setAttribute('data-wire-main-edge',String(chosenEdge.id));
else node.removeAttribute('data-wire-main-edge');
Comment on lines +1599 to +1600

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Prevent MAIN dragging from falling back to an undisplayed edge

When CH2 has no direct MAIN edge, arm CH1 OUT and click CH2 IN to connect CH1→CH2. CH2 becomes selected while CH1 remains pinned, so this code removes MAIN's displayed edge identity. However, the MAIN pointerdown handler still falls back to wireFor(activeSource.id, receiver.id) when no focused edge exists. Dragging the now-empty MAIN jack into the WIRE bay therefore disconnects CH1→MAIN, even though CH2 is selected and no plug is displayed. Reject MAIN unplug gestures without the displayed exact edge ID rather than falling back to the pinned source.

AGENTS.md reference: AGENTS.md:L3-L3

Useful? React with 👍 / 👎.

node.style.setProperty('--main-wire-hue',master.color);
}
}
function renderWireRouting(){
Expand All @@ -1609,8 +1611,10 @@
// Display focus must NOT depend on an armed OUT. A mixer channel being
// inspected always reveals its existing INCOMING and OUTGOING cables.
// The separate 'focus' remains the only authority for making new routes.
const selectedChannels=selection().filter(t=>t.kind!=='master');
const source=dragging?wireSourceTrack(wireGesture.sourceId):
(focus||selection().find(t=>t.kind!=='master')||null);
(selectedChannels.length===1?selectedChannels[0]:null);
Comment on lines 1615 to +1616

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Keep hover previews bound to the pinned patch source

After arming CH1 OUT and clicking CH2 IN, CH2 is selected but CH1 remains the pinned patch source. With this change, hovering CH3 IN makes the existing preview branch construct a CH2→CH3 cable using source.id and CH2's color, while clicking that same IN still connects CH1→CH3 through armedWireSource(). Previously both used CH1. Keep committed-route inspection selected-only, but render new-route previews from the pinned source so the cable shown before a click matches the route that will actually be created.

Useful? React with 👍 / 👎.

const controlSource=focus||source;
const legend=document.getElementById('wireLegend'),main=document.getElementById('wireMaster');
if(legend){
const filter=document.getElementById('viewFilter').value;
Expand All @@ -1620,7 +1624,7 @@
const markup=focus&&!sourceInBank?
'<button type="button" class="wire-offbank-source" data-wire-jump-source="1" title="Return to '+escapeHtml(focus.name)+' without changing the patch source">FROM CH'+String(focus.id).padStart(2,'0')+' · '+escapeHtml(focus.name)+' ↶</button>'+
'<span class="wire-offbank-instruction">Click any IN on this bank</span>':
source?wireLegendHtml(source,routes):'Select a channel for IN / OUT';
controlSource?wireLegendHtml(controlSource,routes):'Select a channel for IN / OUT';
const picker=focus?'<span class="wire-patch-source" title="Pinned wire source">CH'+
String(focus.id).padStart(2,'0')+' OUT →</span>'+
'<select class="wire-dest-picker" data-wire-destination aria-label="Patch '+escapeHtml(focus.name)+' to any channel across all mixer banks" title="Patch to any bank: selecting a destination does not change mixer bank">'+
Expand All @@ -1636,15 +1640,15 @@
if(legend.innerHTML!==fullMarkup)legend.innerHTML=fullMarkup;
}
const configSource=document.getElementById('wireConfigSource');
if(configSource)configSource.textContent=source?wireWsLabel(source.id)+' · '+(focus?'OUT armed':'selected channel'):'Select a channel or OUT jack to inspect routing';
if(configSource)configSource.textContent=controlSource?wireWsLabel(controlSource.id)+' · '+(focus?'OUT armed':'selected channel'):'Select a channel or OUT jack to inspect routing';
if(main){
main.disabled=!source;
if(!source){main.textContent='MAIN';main.setAttribute('aria-pressed','false');}
main.disabled=!controlSource;
if(!controlSource){main.textContent='MAIN';main.setAttribute('aria-pressed','false');}
}
if(main&&source){
const direct=!!wireFor(source.id,master.id);
if(main&&controlSource){
const direct=!!wireFor(controlSource.id,master.id);
main.textContent=direct?'MAIN ON':'MAIN OFF';main.setAttribute('aria-pressed',String(direct));
main.title='Direct source output: '+source.output+' · click to toggle Main only when currently mapped to Main or Source Only';
main.title='Direct source output: '+controlSource.output+' · click to toggle Main only when currently mapped to Main or Source Only';
}
if(!svg||!viewport)return;
if(!source||document.querySelector('.console-body')?.classList.contains('collapsed-send')){
Expand All @@ -1671,32 +1675,11 @@
const sagLimit=wireSagClearance(anchor,well);
const paths=[];
wireMotionGeometry=new Map();
// V30 optional ALL: draw non-focused, currently visible paths in the back.
// Never simulate a cable across hidden banks; the compact legend retains
// the selected channel's complete routing status across those banks.
if(wireView==='all'&&!dragging){
for(const edge of routes){
if(edge.sourceId===source.id||edge.destId===source.id)continue;
const sender=wireSourceTrack(edge.sourceId);
const fromNode=viewport.querySelector?.('.strip[data-id="'+edge.sourceId+'"] .wire-node-out');
const toNode=viewport.querySelector?.('.strip[data-id="'+edge.destId+'"] .wire-node-in');
const a=wireJackRect(fromNode),b=wireJackRect(toNode);
if(!sender||!a?.width||!b?.width)continue;
const bay=fromNode.closest?.('.send-section')?.getBoundingClientRect?.();
const lift=wireSagClearance(a,bay);
const d=wirePathFor(edge,a.left-vp.left+a.width*.5,a.top-vp.top+a.height*.5,
b.left-vp.left+b.width*.5,b.top-vp.top+b.height*.5,lift);
paths.push('<path class="wire-context-line" data-cable-key="'+wireCableKey(edge)+'" data-from="'+edge.sourceId+
'" data-to="'+edge.destId+'" data-route-kind="'+edge.kind+
'" d="'+d+'" stroke="'+sender.color+
'" stroke-width="1.25" opacity=".20" fill="none" stroke-linecap="round"/>');
}
}
// Never render unrelated channels. Navigator and Matrix inspect all routes.
// Physical incoming cables remain visible even when OUT is unarmed.
// If patch source is pinned, also show inputs of the inspected channel.
const inspected=selection().find(t=>t.kind!=='master');
const receiverIds=new Set([source.id,inspected?.id].filter(Number.isFinite));
const incoming=routes.filter(e=>receiverIds.has(e.destId)&&e.sourceId!==e.destId);
const incoming=wireView==='out'?[]:
routes.filter(e=>e.destId===source.id&&e.sourceId!==e.destId&&e.destId!==master.id);
let offBankIncoming=0;
for(const edge of incoming){
const sender=wireSourceTrack(edge.sourceId);
Expand Down Expand Up @@ -1796,8 +1779,9 @@
// Physical WIRE material follows accepted edges only; legacy SEND/OUT/split
// metadata remains in Navigator but cannot light an unplugged WIRE jack.
const committed=wireEdges.filter(e=>e.enabled);
const arrivals=new Set(committed.map(e=>String(e.destId)));
const sends=new Set(committed.map(e=>String(e.sourceId)));
const custom=committed.filter(e=>e.destId!==master.id);
const arrivals=new Set(custom.map(e=>String(e.destId)));
const sends=new Set(custom.map(e=>String(e.sourceId)));
for(const path of svg.querySelectorAll('path.wire-incoming-line,path.wire-outgoing-line,path.wire-context-line')){
// A hover hint is not a plugged-in cable. Keep snap/hover illumination
// independent of physical connection state and endpoint paint.
Expand All @@ -1815,7 +1799,7 @@
const isInput=node.classList.contains('wire-node-in');
const trackId=node.closest('.strip')?.dataset.id;
const key=trackId+':'+(isInput?'in':'out');
const connected=isInput?arrivals.has(trackId):sends.has(trackId);
const connected=isInput?committed.some(e=>String(e.destId)===trackId):sends.has(trackId);
if(connected)node.setAttribute('data-wire-connected','true');
else node.removeAttribute('data-wire-connected');
// Connected paint follows committed model; cable display focus never changes it.
Expand All @@ -1828,11 +1812,18 @@
const edge=visible.get(key);
// Visual paint follows the visible committed WIRE path, not a legacy
// SEND or an off-bank hidden connection. Keep graph state separate.
node.dataset.wirePaint=edge?'connected':'idle';
node.dataset.wirePaint=(edge||( !isInput&&sends.has(trackId)))?'connected':'idle';
if(!edge){
if(!isInput&&sends.has(trackId)){
const t=tracks.find(x=>String(x.id)===trackId);
if(t)node.style.setProperty('--wire-edge-color',t.color);
node.style.setProperty('--wire-edge-opacity','1');
}
node.removeAttribute('data-wire-visible');
node.style.removeProperty('--wire-edge-color');
node.style.removeProperty('--wire-edge-opacity');
if(isInput||!sends.has(trackId)){
node.style.removeProperty('--wire-edge-color');
node.style.removeProperty('--wire-edge-opacity');
}
continue;
}
node.setAttribute('data-wire-visible','true');
Expand Down Expand Up @@ -2736,9 +2727,9 @@
});
document.getElementById('wireView').addEventListener('change',()=>{
const next=document.getElementById('wireView').value;
wireView=['focus','out','all'].includes(next)?next:'focus';
wireView=['focus','out'].includes(next)?next:'focus';
renderWireRouting(); // Visualization only: never touch wireEdges or DSP state
say('WIRE VIEW '+(wireView==='focus'?'FOCUS · incoming behind outgoing':wireView==='out'?'OUT ONLY · selected sends':'ALL VISIBLE ROUTES · selected channel highlighted')+' · display only');
say('WIRE VIEW '+(wireView==='focus'?'SELECTED · incoming and outgoing':'SELECTED OUT ONLY')+' · display only');
});
function toggleDirectMain(){
const t=armedWireSource()||selection().find(x=>x.kind!=='master');
Expand Down
4 changes: 2 additions & 2 deletions tests/pages_m3_operator_visual_interaction_smoke.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ def interactions(page):
assert config.locator("#wireMode").count()==1
assert config.locator("#wireMaster").count()==1
assert config.locator("#wireView").count()==1
config.locator("#wireView").select_option("all")
assert config.locator("#wireView").input_value()=="all"
config.locator("#wireView").select_option("out")
assert config.locator("#wireView").input_value()=="out"
page.keyboard.press("Escape")
assert config.is_hidden() and config_button.get_attribute("aria-expanded")=="false"

Expand Down
6 changes: 3 additions & 3 deletions tests/pages_v50_wire_popout_layout_smoke.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ def inspect(page,width,height):
cfg=page.locator("#wireConfigWindow")
assert cfg.locator("#wireMode,#wireMaster,#wireView").count()==3
cfg.locator("#wireMode").select_option("split")
cfg.locator("#wireView").select_option("all")
cfg.locator("#wireView").select_option("out")
assert cfg.locator("#wireMode").input_value()=="split"
assert cfg.locator("#wireView").input_value()=="all"
assert cfg.locator("#wireView").input_value()=="out"
page.keyboard.press("Escape")
assert cfg.is_hidden(),"Escape did not dismiss WIRE configuration"

Expand Down Expand Up @@ -68,7 +68,7 @@ def inspect(page,width,height):
width,height,"committed WIRE missing from route inspector")
workspace.locator("#wireWsClose").click()
launch(page,"config")
assert cfg.locator("#wireView").input_value()=="all"
assert cfg.locator("#wireView").input_value()=="out"
assert cfg.locator("#wireMode").input_value()=="split"
cfg.locator("#wireConfigClose").click()
assert abs(title.bounding_box()["height"]-27)<=1.5
Expand Down
7 changes: 4 additions & 3 deletions tests/pages_v54_wire_fx_context_smoke.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ def scenario(page,w,density):
assert incoming["connected"] is None and incoming["arrival"] is None and not incoming["stale"],(
w,density,"phantom incoming graph route",ch,incoming)
assert incoming["color"]=="rgb(75, 83, 91)",(w,density,"idle IN dot isn't graphite",ch,incoming)
assert outgoing["connected"]=="true",(w,density,"default MAIN edge missing",ch,outgoing)
assert outgoing["connected"] is None,(w,density,"MAIN should not light custom OUT",ch,outgoing)
assert page.locator(f'#tracks .strip[data-id="{ch}"] .wire-node-out').get_attribute("data-wire-main-edge"),"Canonical MAIN edge lost"
assert outgoing["stale"]=="",(w,density,"stale OUT paint",ch,outgoing)
# Compact/Standard can intentionally fold SEND/WIRE controls to protect
# the fixed meter/fader. Validate their passive material in every density;
Expand All @@ -55,12 +56,12 @@ def scenario(page,w,density):
assert wire(page,5,"out")["connected"]=="true",(w,density,"missing OUT")
assert wire(page,3,"in")["arrival"]=="true",(w,density,"missing IN")
for ch in (1,2):
assert wire(page,ch,"out")["connected"]=="true",(w,density,"default MAIN disappeared",ch)
assert wire(page,ch,"out")["connected"] is None,(w,density,"MAIN should not light OUT",ch)
page.locator("#wireNavigatorToggle").click()
undo=page.locator("#wireWsUndo")
assert undo.is_enabled(),(w,density,"undo not available")
undo.click()
assert wire(page,5,"out")["connected"]=="true",(w,density,"Undo removed default MAIN")
assert wire(page,5,"out")["connected"] is None,(w,density,"Undo left ghost custom OUT")
assert wire(page,3,"in")["arrival"] is None,(w,density,"ghost input after undo")
page.locator("#wireNavigatorToggle").click()
before=fx(page,1)
Expand Down
8 changes: 5 additions & 3 deletions tests/pages_v55_context_wire_fader_smoke.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ def main():
v=node(page,ch,direction)
assert v["paint"]=="idle" and v["visible"] is None,(w,density,ch,direction,v)
if direction=="in": assert v["connected"] is None,(w,density,"phantom receiving wire",ch,v)
else: assert v["connected"]=="true",(w,density,"default MAIN edge missing",ch,v)
else:
assert v["connected"] is None,(w,density,"MAIN must not light custom OUT",ch,v)
assert page.locator(f'#tracks .strip[data-id="{ch}"] .wire-node-out').get_attribute("data-wire-main-edge")
assert v["color"]=="rgb(75, 83, 91)",(w,density,ch,direction,v)
cap=page.locator('#tracks .strip[data-id="1"] .fader-travel .cap').first
shadow=cap.evaluate("(el)=>getComputedStyle(el).boxShadow")
Expand All @@ -37,7 +39,7 @@ def main():
a=node(page,5,"out");b=node(page,3,"in")
assert a["connected"]=="true" and a["paint"]=="connected",(w,a)
assert b["connected"]=="true" and b["paint"]=="connected",(w,b)
assert node(page,1,"out")["connected"]=="true" and node(page,1,"out")["paint"]=="idle"
assert node(page,1,"out")["connected"] is None and node(page,1,"out")["paint"]=="idle"
page.locator('#tracks .strip[data-id="2"] .strip-identity-top').click()
hidden=node(page,3,"in")
assert hidden["connected"]=="true" and hidden["paint"]=="idle",(w,density,hidden)
Expand All @@ -46,7 +48,7 @@ def main():
assert node(page,3,"in")["paint"]=="connected"
page.locator("#wireNavigatorToggle").click()
page.locator("#wireWsUndo").click()
assert node(page,5,"out")["connected"]=="true" and node(page,5,"out")["paint"]=="idle"
assert node(page,5,"out")["connected"] is None and node(page,5,"out")["paint"]=="idle"
assert node(page,3,"in")["paint"]=="idle"
page.close()
browser.close()
Expand Down
Loading
Loading