Repository navigation
GUI V59: publish selected-only WIRE, quiet collapse, custom OUT independent of MAIN #383
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
1d09593
800df79
22225d0
0532ccd
05a800e
e663b7c
5dacf47
2ebf5a8
c0bc5d2
23179ad
f773fe7
42f4576
5d29632
c9551e5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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"> | ||
|
|
@@ -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> | ||
|
|
@@ -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}; | ||
|
|
@@ -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 | ||
|
|
@@ -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'); | ||
| node.style.setProperty('--main-wire-hue',master.color); | ||
| } | ||
| } | ||
| function renderWireRouting(){ | ||
|
|
@@ -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
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
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 Useful? React with 👍 / 👎. |
||
| const controlSource=focus||source; | ||
| const legend=document.getElementById('wireLegend'),main=document.getElementById('wireMaster'); | ||
| if(legend){ | ||
| const filter=document.getElementById('viewFilter').value; | ||
|
|
@@ -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">'+ | ||
|
|
@@ -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')){ | ||
|
|
@@ -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); | ||
|
|
@@ -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. | ||
|
|
@@ -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. | ||
|
|
@@ -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'); | ||
|
|
@@ -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'); | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
pointerdownhandler still falls back towireFor(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 👍 / 👎.