Repository navigation
Publish current approved ArSonMix GUI to /preview/ without promoting P0 native engine #440
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
Merged
+1,877
−65
Merged
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
f980d58
Pages GUI: sync tested public compiler scripts/approved_fx_rack_power.py
masarray 905595f
Pages GUI: sync tested public compiler scripts/approved_fx_rack_inter…
masarray 07b417e
Pages GUI: sync tested public compiler scripts/approved_fx_rack_inter…
masarray 8f77d9e
Pages GUI: sync tested public compiler scripts/compose_native_peq.py
masarray b7a7e19
Pages GUI: sync tested public compiler scripts/compose_operator_ux.py
masarray db327ba
Pages GUI: sync tested public compiler site/preview-v2/assets/mixer-n…
masarray de5d08d
Pages GUI: reconcile approved source scripts/build_pages.py
masarray 2965c2d
Pages GUI: reconcile approved source site/preview-v2/assets/mixer-fx-…
masarray 7565a18
Pages GUI: reconcile approved source site/preview-v2/assets/wire-grap…
masarray 480e45b
Pages GUI: reconcile approved source tests/single_preview_publication…
masarray 4168641
Pages GUI: reconcile approved source tests/approved_css_original_bund…
masarray fb49569
Pages GUI: reconcile approved source tests/pages_fx_rail_v53_smoke.py
masarray e72c518
Pages GUI: add browser qualification tests/approved_operator_ux_smoke.py
masarray 42e5764
Pages GUI: add browser qualification tests/approved_operator_ux_chrom…
masarray c408e76
Pages GUI: add browser qualification tests/approved_fx_rack_master_po…
masarray 6236f70
Pages GUI: add browser qualification tests/approved_native_peq_smoke.py
masarray 0005026
Qualify public Pages 5-viewport editor geometry without staging unmer…
masarray 9b2b522
Gate Pages publication on handle-free FX and five-viewport zero-reflo…
masarray 4da4c08
Scope Pages GUI smoke to public DOM; keep native identity/ASIO checks…
masarray File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,124 @@ | ||
| // Shared by the one assembled /preview/ and its native bundle. | ||
| // Presentation follows the pointer; only accepted native readback moves DSP. | ||
| let fxPointerDrag=null,fxPointerFrame=0,fxPointerSuppressUntil=0,fxTransferUndo=null; | ||
| function clearFxPointer(){ | ||
| if(fxPointerFrame)cancelAnimationFrame(fxPointerFrame);fxPointerFrame=0; | ||
| fxPointerDrag?.ghost?.remove();fxPointerDrag?.marker?.remove(); | ||
| document.querySelectorAll('.fx-moving').forEach(e=>e.classList.remove('fx-moving')); | ||
| fxPointerDrag=null; | ||
| } | ||
| function removeFxReference(t,slot){ | ||
| ensureFxInsertIds(t); | ||
| if(!Number.isInteger(slot)||slot<0||t.fx[slot]==='None')return false; | ||
| for(const key of ['fx','slotBypass','fxInsertIds']){ | ||
| t[key].splice(slot,1);t[key].push(key==='fx'?'None':key==='slotBypass'?false:null); | ||
| } | ||
| fxReorderUndo=null;fxTransferUndo=null;refreshStrip(t);return true; | ||
| } | ||
| function undoFxTransfer(t){ | ||
| const u=fxTransferUndo;if(!u||window.__JUCE__?.backend||![u.from.id,u.to.id].includes(t.id))return false; | ||
| if(fxOrderSignature(u.from)!==u.afterFrom||fxOrderSignature(u.to)!==u.afterTo)return false; | ||
| for(const [track,before] of [[u.from,u.beforeFrom],[u.to,u.beforeTo]]) | ||
| for(const key of ['fx','slotBypass','fxInsertIds'])track[key]=before[key]; | ||
| fxTransferUndo=null;refreshStrip(u.from);refreshStrip(u.to);return true; | ||
| } | ||
| function moveFxBetween(from,slot,to,position,token){ | ||
| ensureFxInsertIds(from);ensureFxInsertIds(to); | ||
| if(from.fxInsertIds[slot]?.id!==token||from.fx[slot]==='None')return false; | ||
| if(window.__JUCE__?.backend) | ||
| return !!window.ArSonFxRackAuthority?.move?.(from.id,slot,to.id,position,token); | ||
| if(from===to)return moveReferenceFx(from,slot,position); | ||
| const count=to.fx.filter(x=>x!=='None').length; | ||
| if(count>=8||position<0||position>count)return false; | ||
| const save=t=>({fx:t.fx.slice(),slotBypass:t.slotBypass.slice(),fxInsertIds:clone(t.fxInsertIds)}); | ||
| const beforeFrom=save(from),beforeTo=save(to); | ||
| for(const key of ['fx','slotBypass','fxInsertIds']){ | ||
| const value=from[key].splice(slot,1)[0];from[key].push(key==='fx'?'None':key==='slotBypass'?false:null); | ||
| to[key].splice(position,0,value);to[key].pop(); | ||
| } | ||
| fxTransferUndo={from,to,beforeFrom,beforeTo,afterFrom:fxOrderSignature(from),afterTo:fxOrderSignature(to)}; | ||
| refreshStrip(from);refreshStrip(to);say(from.name+' → '+to.name+' · FX moved');return true; | ||
| } | ||
| function paintFxPointer(){ | ||
| fxPointerFrame=0;const g=fxPointerDrag;if(!g?.active)return; | ||
| const hit=document.elementFromPoint(g.x,g.y),rack=hit?.closest?.('.fx-section'),track=rack&&findTrack(rack); | ||
| let drop=null,mark=null; | ||
| if(track){ | ||
| const rows=[...rack.querySelectorAll('.fxslot-row:not(.is-empty)')]; | ||
| const rect=rack.getBoundingClientRect();let position=rows.length,y=rows.at(-1)?.getBoundingClientRect().bottom||rect.top+25; | ||
| for(let i=0;i<rows.length;i++){ | ||
| const box=rows[i].getBoundingClientRect(); | ||
| if(g.y<box.top+box.height/2){position=i;y=box.top;break;} | ||
| } | ||
| const final=track.id===g.sourceId&&position>g.slot?position-1:position; | ||
| if(rows.length<8||track.id===g.sourceId){drop={id:track.id,position:final};mark={left:rect.left+3,top:y,width:rect.width-6};} | ||
| const list=rack.querySelector('.fxslot-list'),box=list?.getBoundingClientRect(); | ||
| if(list&&box&&list.scrollHeight>list.clientHeight) | ||
| list.scrollTop+=g.y<box.top+18?-4:g.y>box.bottom-18?4:0; | ||
| } | ||
| g.drop=drop;g.ghost.style.transform='translate3d('+(g.x-g.offsetX)+'px,'+(g.y-g.offsetY)+'px,0)'; | ||
| g.ghost.classList.toggle('fx-drop-invalid',!drop); | ||
| g.marker.hidden=!mark; | ||
| if(mark){g.marker.style.left=mark.left+'px';g.marker.style.top=mark.top+'px';g.marker.style.width=mark.width+'px';} | ||
| fxPointerFrame=requestAnimationFrame(paintFxPointer); | ||
| } | ||
| document.addEventListener('pointerdown',e=>{ | ||
| if(e.button!==0)return; | ||
| // A fresh gesture must never inherit suppression of the previous drag's click. | ||
| fxPointerSuppressUntil=0; | ||
| const row=e.target.closest?.('.fxslot-row:not(.is-empty)'); | ||
| // POWER and DELETE are never drag initiators, even on touch devices. | ||
| if(!row||e.target.closest?.('[data-action="slotPower"],[data-action="removeFx"]'))return; | ||
| const t=findTrack(row); | ||
| if(!row||!t)return;ensureFxInsertIds(t); | ||
| const slot=Number(row.dataset.slot),token=t.fxInsertIds[slot]?.id;if(!token)return; | ||
| clearFxPointer();const r=row.getBoundingClientRect(); | ||
| fxPointerDrag={pointer:e.pointerId,sourceId:t.id,slot,token,row,x:e.clientX,y:e.clientY,startX:e.clientX,startY:e.clientY, | ||
| offsetX:e.clientX-r.left,offsetY:e.clientY-r.top,width:r.width,active:false}; | ||
| },true); | ||
| window.addEventListener('pointermove',e=>{ | ||
| const g=fxPointerDrag;if(!g||e.pointerId!==g.pointer)return; | ||
| g.x=e.clientX;g.y=e.clientY; | ||
| if(!g.active&&Math.hypot(g.x-g.startX,g.y-g.startY)>=5){ | ||
| g.active=true;g.row.classList.add('fx-moving'); | ||
| g.ghost=g.row.cloneNode(true);g.ghost.classList.remove('fx-moving');g.ghost.classList.add('fx-drag-ghost');g.ghost.style.width=g.width+'px'; | ||
| const originals=[g.row,...g.row.querySelectorAll('*')],copies=[g.ghost,...g.ghost.querySelectorAll('*')]; | ||
| for(let i=0;i<copies.length;i++){ | ||
| const css=getComputedStyle(originals[i]); | ||
| for(const prop of ['font','color','background-color','height','min-height','border','padding','width','min-width','flex','box-sizing','display','align-items','justify-content','gap']) | ||
| copies[i].style.setProperty(prop,css.getPropertyValue(prop)); | ||
| } | ||
| g.ghost.style.backgroundColor=getComputedStyle(g.row.closest('.fx-section')).backgroundColor; | ||
| g.ghost.setAttribute('aria-hidden','true'); | ||
| g.ghost.querySelectorAll('button,input').forEach(n=>{n.tabIndex=-1;n.removeAttribute('draggable');}); | ||
| g.marker=document.createElement('div');g.marker.className='fx-drop-marker';g.marker.hidden=true; | ||
| document.body.append(g.ghost,g.marker);fxPointerFrame=requestAnimationFrame(paintFxPointer); | ||
| } | ||
| if(g.active)e.preventDefault(); | ||
| },true); | ||
| window.addEventListener('pointerup',e=>{ | ||
| const g=fxPointerDrag;if(!g||e.pointerId!==g.pointer)return; | ||
| if(g.active){ | ||
| // Resolve the release point even when pointerup preceded the next RAF. | ||
| g.x=e.clientX;g.y=e.clientY; | ||
| if(fxPointerFrame)cancelAnimationFrame(fxPointerFrame);fxPointerFrame=0;paintFxPointer(); | ||
| fxPointerSuppressUntil=performance.now()+350; | ||
| const from=tracks.concat(master).find(t=>t.id===g.sourceId),to=tracks.concat(master).find(t=>t.id===g.drop?.id); | ||
| if(from&&to)moveFxBetween(from,g.slot,to,g.drop.position,g.token); | ||
| e.preventDefault(); | ||
| } | ||
| clearFxPointer(); | ||
| },true); | ||
| window.addEventListener('pointercancel',clearFxPointer,true); | ||
| window.addEventListener('blur',clearFxPointer); | ||
| document.addEventListener('dragstart',e=>{ | ||
| if(e.target.closest?.('.fxslot-row:not(.is-empty)')){e.preventDefault();e.stopImmediatePropagation();} | ||
| },true); | ||
| document.addEventListener('click',e=>{ | ||
| if(e.detail!==0&&performance.now()<fxPointerSuppressUntil&&e.target.closest?.('.fx-section')){ | ||
| e.preventDefault();e.stopImmediatePropagation(); | ||
| } | ||
| },true); | ||
| document.addEventListener('keydown',e=>{ | ||
| if(e.key==='Escape'&&fxPointerDrag){clearFxPointer();e.preventDefault();e.stopPropagation();} | ||
| },true); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,82 @@ | ||
| """Single official /preview/ FX interaction composer; historical V28 stays immutable.""" | ||
| from pathlib import Path | ||
| ROOT=Path(__file__).resolve().parent | ||
|
|
||
| def once(source, before, after, label): | ||
| if source.count(before)!=1: | ||
| raise ValueError("FX composer anchor drift: "+label) | ||
| return source.replace(before,after,1) | ||
|
|
||
| def apply_fx_rack_interaction(html, assets=None): | ||
| start=html.index('function paintMainWireFragment(strip,edge,isMain){') | ||
| end=html.index('\nfunction syncMainWireFragments()',start) | ||
| html=html[:start]+'''function paintMainWireFragment(strip,edge,isMain){ | ||
| strip?.querySelectorAll('.wire-main-fragment').forEach(layer=>layer.remove()); | ||
| }'''+html[end:] | ||
| anchor='function moveReferenceFx(t,from,to){\n' | ||
| html=once(html,anchor,anchor+''' if(window.__JUCE__?.backend){ | ||
| ensureFxInsertIds(t); | ||
| return !!window.ArSonFxRackAuthority?.move?.(t.id,from,t.id,to,t.fxInsertIds[from]?.id); | ||
| } | ||
| ''',"native MOVE_INSERT bridge") | ||
| html=once(html, | ||
| "document.querySelector('.strip[data-id=\"'+t.id+'\"] .fx-grip[data-insert-id=\"'+id+'\"]')?.focus();", | ||
| "document.querySelector('.strip[data-id=\"'+t.id+'\"] .fxslot-row[data-insert-id=\"'+id+'\"] .fx-pick')?.focus({preventScroll:true});", | ||
| "preserve keyboard focus after handle-free reorder") | ||
| html=once(html,'Ctrl+Z on grip to undo','Ctrl+Z on FX name to undo', | ||
| "retire grip keyboard tooltip") | ||
| anchor='function undoReferenceFx(t){\n' | ||
| html=once(html,anchor,anchor+' if(undoFxTransfer(t))return true;\n',"transfer undo") | ||
| before="const i=Number(btn.dataset.slot);t.fx[i]='None';t.slotBypass[i]=false;if(t.fxInsertIds)t.fxInsertIds[i]=null;fxReorderUndo=null;refreshStrip(t);" | ||
| html=once(html,before,"const i=Number(btn.dataset.slot);removeFxReference(t,i);","remove compactly") | ||
|
|
||
| # The whole occupied FX slot is the drag surface. Power and Delete keep | ||
| # their native click semantics; there is no extra grab handle or DnD owner. | ||
| grip_start="if(name!=='None')out+='<button type=\"button\" class=\"grip fx-grip\"" | ||
| grip_end='<button class="mx-util-key" data-util-kind="fx-remove"' | ||
| if html.count(grip_start)!=1: | ||
| raise ValueError("FX grip markup drift") | ||
| a=html.index(grip_start) | ||
| b=html.index(grip_end,a) | ||
| html=html[:a]+"if(name!=='None')out+='"+html[b:] | ||
| a=html.index("/* FX V53: the focused 16px grip alone owns drag;") | ||
| b=html.index("document.querySelector('.console-body').addEventListener('pointerover'",a) | ||
| html=html[:a]+'''/* Native and Pages share one row-wide pointer gesture (see assembled JS). | ||
| Keyboard move/undo lives on the existing, focusable plugin-name button. */ | ||
| consoleBody.addEventListener('keydown',e=>{ | ||
| const button=e.target.closest?.('.fx-pick:not(.empty)'); | ||
| if(!button)return; | ||
| const t=findTrack(button),from=Number(button.dataset.slot); | ||
| if(!t)return; | ||
| if((e.ctrlKey||e.metaKey)&&e.key.toLowerCase()==='z'){ | ||
| e.preventDefault();undoReferenceFx(t);return; | ||
| } | ||
| if(e.altKey&&!e.ctrlKey&&!e.metaKey&&['ArrowUp','ArrowDown'].includes(e.key)){ | ||
| e.preventDefault(); | ||
| const used=t.fx.map((name,i)=>name==='None'?-1:i).filter(i=>i>=0); | ||
| const current=used.indexOf(from),next=used[current+(e.key==='ArrowUp'?-1:1)]; | ||
| if(Number.isInteger(next)&&!moveReferenceFx(t,from,next))say('FX move unavailable'); | ||
| } | ||
| },true); | ||
| '''+html[b:] | ||
| anchor='restorePluginPreferences();init();\n})();' | ||
| html=once(html,anchor,(ROOT/'approved_fx_rack_interaction.js').read_text()+'\n'+anchor,"pointer drag composer") | ||
| if assets is not None: | ||
| sheet=Path(assets)/'mixer-fx-rack.css' | ||
| css=sheet.read_text(encoding='utf-8') | ||
| a=css.index('.fxslot-row .grip{') | ||
| b=css.index('@media(max-height:750px)',a) | ||
| css=css[:a]+css[b:] | ||
| css=once(css, | ||
| '.console-body .strip .fxslot-row .grip .mi-svg{width:13px;height:14px;pointer-events:none}\n\n.console-body .fx-section .grip{display:inline-flex;align-items:center;justify-content:center}\n.console-body .fx-section .grip .mi-svg{width:13px;height:15px}\n\n', | ||
| '',"remove retired grip visual selectors") | ||
| css=once(css,'.fx-grip{touch-action:none;}', | ||
| '.fxslot-row:not(.is-empty){touch-action:none;}',"row pointer touch ownership") | ||
| css=once(css,'.fxslot-row{cursor:default}', | ||
| '.fxslot-row{cursor:default}\n' | ||
| '.fxslot-row:not(.is-empty){cursor:grab;user-select:none}\n' | ||
| '.fxslot-row:not(.is-empty):active{cursor:grabbing}\n' | ||
| '.fxslot-row:not(.is-empty) .fx-pick{cursor:grab}', | ||
| "row drag pointer affordance") | ||
| sheet.write_text(css,encoding='utf-8') | ||
| return html | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| """Approved single-GUI FX rack power semantics, injected at the ONE Pages build. | ||
|
|
||
| The historical V28 source HTML is immutable. Apply exactly TWO audited | ||
| semantic substitutions to its JavaScript when assembling both public /preview/ | ||
| and native JUCE WebView2. No additional stylesheet, second state store, or | ||
| private fork of the mixer. t.fxOn is rack authority, slotBypass[] is the | ||
| preserved per-insert preference. Effective = fxOn && !slotBypass[i]. | ||
| """ | ||
| def apply_authoritative_fx_power(html: str) -> str: | ||
| substitutions = [ | ||
| ( | ||
| "name==='None'?'is-empty':t.slotBypass[i]?'is-bypassed':'is-active'", | ||
| "name==='None'?'is-empty':(!t.fxOn||t.slotBypass[i])?'is-bypassed':'is-active'", | ||
| ), | ||
| ( | ||
| 'aria-pressed="\'+Boolean(!t.slotBypass[i])+\'">', | ||
| 'aria-pressed="\'+Boolean(t.fxOn&&!t.slotBypass[i])+\'">', | ||
| ), | ||
| ( | ||
| "title=\"'+(t.slotBypass[i]?'Enable':'Bypass')+' only insert", | ||
| "title=\"'+(!t.fxOn?'Rack bypassed, saved '+(t.slotBypass[i]?'OFF':'ON'):t.slotBypass[i]?'Enable':'Bypass')+' only insert", | ||
| ), | ||
| ( | ||
| "aria-label=\"'+(t.slotBypass[i]?'Enable':'Bypass')+' only FX insert", | ||
| "aria-label=\"'+(!t.fxOn?'Rack bypassed, saved '+(t.slotBypass[i]?'OFF':'ON'):t.slotBypass[i]?'Enable':'Bypass')+' only FX insert", | ||
| ), | ||
| ] | ||
| for before, after in substitutions: | ||
| if html.count(before) != 1: | ||
| raise ValueError("FX master semantics anchor missing or ambiguous: " + before[:90]) | ||
| html=html.replace(before,after,1) | ||
| return html |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,68 @@ | ||
| """One additive native Parametric EQ injection into approved /preview/ assembler. | ||
| No alternate GUI, pseudo FX row, fixed pre-VST DSP bank or demo audio engine. | ||
| An accepted EQ uses the same rack slot, ChannelId, and FX control as VST3. | ||
| """ | ||
| CATALOG="armix.builtin.channel-eq.v1" | ||
| SCRIPT='<script defer src="assets/mixer-native-peq.js?v=eq-graph1"></script>' | ||
| PICKER_HEAD="function renderFastPicker(){" | ||
| PICKER_FN="""function insertChosenNativeEq(){ | ||
| const t=tracks.concat(master).find(x=>x.id===activeFxTarget?.channelId); | ||
| const slot=Number(activeFxTarget?.slot); | ||
| if(!t||!Number.isInteger(slot)||slot<0||slot>=8){ | ||
| say('Parametric EQ · choose an empty FX insert');return false; | ||
| } | ||
| if(window.__JUCE__?.backend?.emitEvent){ | ||
| const host=window.ArSonMixNativeEq; | ||
| if(!host?.insert){ | ||
| say('Native FX host not ready · audio unchanged');return false; | ||
| } | ||
| host.insert(activeFxTarget); | ||
| // The existing native ACK + subsequent accepted snapshot will replace the | ||
| // empty slot. Do not optimistically draw an ACTIVE effect or open editor. | ||
| return true; | ||
| } | ||
| if(t.fx[slot]!=='None'){ | ||
| say('FX slot already occupied · choose an empty insert');return false; | ||
| } | ||
| t.fx[slot]='Parametric EQ';t.slotBypass[slot]=false; | ||
| t.fxInsertIds[slot]={id:'visual-eq-'+t.id+'-'+slot,name:'Parametric EQ'}; | ||
| refreshStrip(t);setFastPicker(false); | ||
| say('Parametric EQ · browser visual preview ONLY · no audio DSP'); | ||
| return true; | ||
| } | ||
| function renderFastPicker(){""" | ||
| PICKER_RENDER="plugEl('fastResults').innerHTML=list.length?list.map(p=>" | ||
| PICKER_RENDER_NEW="""const builtin=!q||['parametric eq','peq','channel eq','built-in fx'].some(n=>n.includes(q))? | ||
| '<div class="fast-fx-category">BUILT-IN FX</div><button class="fast-effect" type="button" data-fast-native-eq="1"><span class="fast-effect-title">Parametric EQ</span><span class="fast-effect-kind">Native · 8-band · ordered insert</span></button>':''; | ||
| plugEl('fastResults').innerHTML=builtin+'<div class="fast-fx-category">VST3 PLUGINS</div>'+(list.length?list.map(p=>""" | ||
| PICKER_END=""").join(''):'<div class="fast-empty">No matching effects</div>';""" | ||
| PICKER_END_NEW=""").join(''):'<div class="fast-empty">No matching effects</div>');""" | ||
| PICKER_CLICK=" const btn=e.target.closest('[data-fast-id]');if(btn)insertCatalogPlugin(btn.dataset.fastId);" | ||
| PICKER_CLICK_NEW=""" if(e.target.closest('[data-fast-native-eq]')){insertChosenNativeEq();return;} | ||
| const btn=e.target.closest('[data-fast-id]');if(btn)insertCatalogPlugin(btn.dataset.fastId);""" | ||
| PICKER_ENTER="if(b){e.preventDefault();insertCatalogPlugin(b.dataset.fastId);}" | ||
| PICKER_ENTER_NEW="if(b){e.preventDefault();if(b.hasAttribute('data-fast-native-eq'))insertChosenNativeEq();else insertCatalogPlugin(b.dataset.fastId);}" | ||
| OPEN=" if(a==='openPlugin'){openFastPicker(t,Number(btn.dataset.slot),btn);return;}" | ||
| OPEN_NEW=""" if(a==='openPlugin'){ | ||
| const index=Number(btn.dataset.slot); | ||
| if(t.fx[index]==='Parametric EQ'){ | ||
| window.ArSonMixNativeEq?.open(t,index);return; | ||
| } | ||
| openFastPicker(t,index,btn);return; | ||
| }""" | ||
| def apply_native_peq(html: str)->str: | ||
| anchors=((PICKER_HEAD,PICKER_FN), | ||
| (PICKER_RENDER,PICKER_RENDER_NEW), | ||
| (PICKER_END,PICKER_END_NEW), | ||
| (PICKER_CLICK,PICKER_CLICK_NEW), | ||
| (PICKER_ENTER,PICKER_ENTER_NEW), | ||
| (OPEN,OPEN_NEW)) | ||
| if html.count('</head>')!=1 or html.count('</body>')!=1 or \ | ||
| SCRIPT in html or 'insertChosenNativeEq' in html: | ||
| raise ValueError("Parametric EQ requires one pristine approved compiled GUI") | ||
| for before,after in anchors: | ||
| if html.count(before)!=1: | ||
| raise ValueError('Ambiguous approved picker/editor anchor: '+before[:90]) | ||
| html=html.replace(before,after,1) | ||
| html=html.replace('</body>',SCRIPT+'\n</body>',1) | ||
| return html |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 an operator expands WIRE for a channel connected to MAIN, this replacement removes every fragment instead of painting the selected channel's accepted edge and its MAIN endpoint. Repository-wide search finds no replacement renderer:
syncMainWireFragments()still delegates to this function. This also contradicts the existing assertions intests/pages_wire_first_canonical_main_smoke.py, which the full UI workflow still runs. Retain the focused expanded-state rendering and suppress fragments only in the collapsed or unfocused states required byAGENTS.md.AGENTS.md reference: AGENTS.md:L134-L134
Useful? React with 👍 / 👎.