Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
11 changes: 10 additions & 1 deletion .github/workflows/ui-smoke.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,8 @@ jobs:
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: V60 fast no-browser fader and WIRE motion contract
run: python tests/pages_v60_fader_wire_tactile_smoke.py --source
- name: Verify approved /preview/ and native bridge syntax without browser
run: |
node scripts/check_console_puzzle.mjs
Expand Down Expand Up @@ -146,6 +148,9 @@ jobs:
python -m playwright install --with-deps chromium
- name: Drag Routes, Matrix, Wire Setup and FX; verify close geometry
run: python tests/approved_floating_window_chromium_smoke.py
- name: V60 physical fader detent and full-length WIRE actual Chromium QA
if: ${{ startsWith(github.head_ref, 'fix/gui-fader-unity-wire-') }}
run: python tests/pages_v60_fader_wire_tactile_smoke.py
- name: Assemble exact-source official Pages preview for touch Chromium test
if: ${{ startsWith(github.head_ref, 'fix/gui-') }}
run: python scripts/build_pages.py --out dist-pages --sha "${{ github.event.pull_request.head.sha }}" --branch main
Expand Down Expand Up @@ -175,7 +180,9 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: ArSonMix-Floating-UX-${{ github.run_id }}
path: arsonmix-floating-ux-*.png
path: |
arsonmix-floating-ux-*.png
arsonmix-v60-*.png
if-no-files-found: ignore
retention-days: 7

Expand Down Expand Up @@ -359,6 +366,8 @@ jobs:
run: python tests/approved_native_wire_gain_smoke.py
- name: Stage D one runtime CSSOM and actual stylesheet network count
run: python tests/approved_css_stage_d_single_bundle_smoke.py
- name: V60 real Chromium tactile fader and selected full-span WIRE
run: python tests/pages_v60_fader_wire_tactile_smoke.py
- name: Stage C rendered CSS parity (original vs compiled, three viewports + hover)
run: python tests/approved_css_stage_c_computed_parity_smoke.py
- name: WIRE A main edge and safe graph integration in real Chromium DOM
Expand Down
12 changes: 12 additions & 0 deletions site/preview-v2/assets/mixer-fader-assembly.css
Original file line number Diff line number Diff line change
Expand Up @@ -408,3 +408,15 @@
box-shadow:0 20px 10px -1px #000c,0 4px 3px -4px #000a!important;
filter:none!important;
}

/* V60 taller console fader: use ONE shared height for source channels,
pinned MASTER and the section rail. Reclaim space only from the elastic
FX workspace; never scale the approved SVG/PNG cap or move its dB ticks.
Short displays get a bounded travel instead of clipping the strip. */
.console-body{--fader-fixed-h:clamp(270px,35vh,390px)}
@media(max-height:850px){
.console-body{--fader-fixed-h:clamp(225px,37vh,310px)}
Comment on lines +416 to +418

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 Apply the taller travel through the active layout authority

In the assembled /preview/, these new height declarations never take effect: mixer-chrome-material.css:795–797 already sets --fader-fixed-h:var(--v13-fader-h)!important, which overrides all three new non-important declarations. Additionally, scripts/compose_operator_ux.py installs a layout bootstrap that computes --v13-fader-h from the existing half-console budget and writes it as an inline important property. Consequently, this change leaves the actual source/Master/rail travel unchanged despite the new source contract passing. Update the active shared height calculation and its FX-space budget rather than adding an overridden token.

AGENTS.md reference: AGENTS.md:L140-L140

Useful? React with 👍 / 👎.

}
@media(max-height:610px){
.console-body{--fader-fixed-h:clamp(175px,32vh,210px)}
}
9 changes: 7 additions & 2 deletions site/preview-v2/assets/mixer-wire-dots.css
Original file line number Diff line number Diff line change
Expand Up @@ -824,13 +824,18 @@
pointer-events:stroke!important;fill:none!important;stroke:transparent!important;
stroke-width:12px!important;stroke-linecap:butt!important;cursor:pointer;
}
/* Selected WIRE = entire luminous physical jacket, not an outer halo.
The transparent hitbox remains nonpainting (including its endpoint gaps). */
#wireLayer path.wire-interaction-hit.is-wire-selected{
stroke:rgba(136,217,241,.19)!important;
stroke:transparent!important;
}
#wireLayer path.wire-incoming-line.is-wire-selected,
#wireLayer path.wire-outgoing-line.is-wire-selected,
#wireLayer path.wire-context-line.is-wire-selected{
stroke-width:3px!important;opacity:1!important;
stroke:color-mix(in srgb,var(--wire-selected-hue,#88dfff) 54%,#ffffff 46%)!important;
stroke-width:5.6px!important;opacity:1!important;
stroke-dasharray:none!important;
filter:none!important;
}
/* Source selection is temporary intent, while cable connection derives only
from the committed route model. No phantom lit output without an edge. */
Expand Down
59 changes: 41 additions & 18 deletions site/preview-v2/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -904,30 +904,35 @@
wireMotionGeometry.set(key,[x0,y0,x1,y1,limit]);
return wirePathData(x0,y0,x1,y1,limit,wireMotion.key===key?wireMotion.offset:0);
}
/* Socket impact travels backwards along the SAME accepted cable.
The two endpoints remain physically pinned; only the accepted SVG path
changes for 36 frames. No CSS keyframes, idle RAF or all-cables remount. */
/* One low-frequency impact travels from receiver toward source, then
loses energy. Elapsed time makes 60/120 Hz render the same physical motion. */
/* V60 tactile patch cable: one short full-span impact OUT -> IN.
The physical endpoints stay welded to the socket centers throughout.
The packet travels along the full normalized curve in 460ms, then the
cable settles in 190ms. No idle animation or graph/PCM writes. */
const WIRE_IMPACT_TRAVEL_MS=460,WIRE_IMPACT_SETTLE_MS=190;
const WIRE_IMPACT_DURATION_MS=WIRE_IMPACT_TRAVEL_MS+WIRE_IMPACT_SETTLE_MS;
function wireImpactPathData(x0,y0,x1,y1,limit,elapsedMs){
const span=Math.abs(x1-x0),ceiling=Math.max(12,Math.min(100,Number(limit)||72));
const sag=Math.max(10,Math.min(ceiling,Math.min(ceiling-5,28+Math.sqrt(span)*1.55)));
const c=sag*4/3,progress=Math.max(0,Math.min(1,elapsedMs/1600));
// V44 geometric witness: 10.5px produced only 4.17px broad visible jolt
// against the approved >5px gate. 13.4 restores a gentle >5px packet,
// still below the retired 13.8px short/fast impulse; 1600ms remains.
const center=.99-progress*.98,amp=13.4*Math.exp(-progress*3.5);
const c=sag*4/3;
const sweep=Math.max(0,Math.min(1,elapsedMs/WIRE_IMPACT_TRAVEL_MS));
// The impulse center actually reaches the receiving plug rather than
// disappearing halfway through from exponential travel attenuation.
const center=.035+.93*sweep;
const settle=Math.max(0,Math.min(1,(elapsedMs-WIRE_IMPACT_TRAVEL_MS)/WIRE_IMPACT_SETTLE_MS));
const amplitude=15.2*Math.pow(1-settle,2);
let d='M '+x0.toFixed(1)+' '+y0.toFixed(1);
// Smooth curve samples; zero displacement at both anchored ends.
for(let i=1;i<=56;i++){
const t=i/56,u=1-t;
const x=u*u*u*x0+3*u*u*t*x0+3*u*t*t*x1+t*t*t*x1;
const y=u*u*u*y0+3*u*u*t*(y0+c)+3*u*t*t*(y1+c)+t*t*t*y1;
const dx=6*u*t*(x1-x0),dy=3*u*u*c+6*u*t*(y1-y0)+3*t*t*(-c);
const norm=Math.hypot(dx,dy)||1,delta=t-center;
const pulse=amp*Math.exp(-(delta*delta)/(.30*.30))*
Math.sin(delta*10-progress*6)*Math.sin(Math.PI*t);
d+=' L '+(x-dy/norm*pulse).toFixed(1)+' '+(y+dx/norm*pulse).toFixed(1);
// A bounded, springy packet with no seam at the two fixed plugs.
// Preserve visible displacement all the way to 96% of cable length.
const tether=Math.min(1,t/.035,(1-t)/.035);
const packet=Math.exp(-(delta*delta)/(.145*.145));
const impulse=amplitude*packet*Math.cos(delta*13-sweep*1.4)*tether;
d+=' L '+(x-dy/norm*impulse).toFixed(1)+' '+(y+dx/norm*impulse).toFixed(1);
}
return d;
}
Expand All @@ -952,8 +957,9 @@
}
if(began===null)began=now;
const elapsed=Math.max(0,now-began);
paint(elapsed<1600?wireImpactPathData(...geometry,elapsed):wirePathData(...geometry,0));
if(elapsed<1600)requestAnimationFrame(step);
paint(elapsed<WIRE_IMPACT_DURATION_MS?
wireImpactPathData(...geometry,elapsed):wirePathData(...geometry,0));
if(elapsed<WIRE_IMPACT_DURATION_MS)requestAnimationFrame(step);
else{wireMotion.offset=0;wireMotion.key=null;}
}
paint(wireImpactPathData(...geometry,0));
Expand Down Expand Up @@ -1527,7 +1533,12 @@
const edge=wireFor(Number(line.dataset.from),Number(line.dataset.to));
if(!edge||represented.has(edge.id))continue;
represented.add(edge.id);
if(edge.id===selectedWireEdgeId)line.classList.add('is-wire-selected');
if(edge.id===selectedWireEdgeId){
line.classList.add('is-wire-selected');
// The rendered jacket (NOT the transparent click hitbox) gains full
// length and a brighter version of its own channel color.
line.style.setProperty('--wire-selected-hue',line.getAttribute('stroke')||'#87dbff');
}
const hit=document.createElementNS('http://www.w3.org/2000/svg','path');
hit.setAttribute('class','wire-interaction-hit'+(edge.id===selectedWireEdgeId?' is-wire-selected':''));
hit.setAttribute('data-edge-id',String(edge.id));
Expand Down Expand Up @@ -1833,12 +1844,21 @@
The 29x62 visual cap center is aligned to this same travel ruler. */
let faderGesture=null;
const consoleBody=document.querySelector('.console-body');
/* Hardware unity detent measures physical distance, never an arbitrary
dB band: stable on tall/short rails. Alt bypasses the detent. Keyboard
and accessibility arrows retain unquantized 0.1 dB control. */
const FADER_UNITY_CAPTURE_PX=7,FADER_UNITY_RELEASE_PX=12;
function setFaderFromPointer(ev,gesture){
const input=gesture.input,travel=gesture.travel?.getBoundingClientRect?.();
if(!travel||travel.height<=0)return;
const max=Number(input.max)||10,min=Number(input.min)||-60;
const frac=Math.max(0,Math.min(1,(ev.clientY-travel.top)/travel.height));
const gain=Math.round((max-(max-min)*frac)*10)/10;
let gain=Math.round((max-(max-min)*frac)*10)/10;

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 Update the native fader hooks alongside the pointer handler

Every native GUI bundle build now fails because scripts/build_approved_native_gui.py still matches the exact const gain=... statement in NATIVE_EVENT_HOOKS; changing it to let makes native_html() raise ValueError: Native-only M2 control hook anchor drift. The new release handling also breaks its separate anchor requiring releasePointerCapture immediately after clearing faderGesture. Confirmed by running tests/approved_native_gui_bundle_test.py, which reports two errors. Update both native hooks together with this handler, preserving the native taper and a single committed change notification, so the shared approved GUI remains packageable.

AGENTS.md reference: AGENTS.md:L149-L149

Useful? React with 👍 / 👎.

const unityY=travel.top+travel.height*(max/(max-min));
const tolerance=gesture.unityLatched?FADER_UNITY_RELEASE_PX:FADER_UNITY_CAPTURE_PX;
if(!ev.altKey&&Math.abs(ev.clientY-unityY)<=tolerance){
gain=0;gesture.unityLatched=true;
}else gesture.unityLatched=false;
input.value=String(gain);
handleField({target:input,type:'input',altKey:!!ev.altKey});
}
Expand Down Expand Up @@ -1960,6 +1980,9 @@
if(!faderGesture||ev.pointerId!==faderGesture.pointerId)return;
setFaderFromPointer(ev,faderGesture);
const g=faderGesture;faderGesture=null;
// A final committed release (including exactly 0 dB) is always delivered
// to native ACK/readback and offline session persistence, not only preview.
handleField({target:g.input,type:'change',altKey:!!ev.altKey});
g.box.releasePointerCapture?.(ev.pointerId);
const t=findTrack(g.input);
if(t)say(t.name+' fader '+formatDb(sofEnabled&&t.kind==='audio'?getSofLevel(t):t.level)+' dB');
Expand Down
200 changes: 200 additions & 0 deletions tests/pages_v60_fader_wire_tactile_smoke.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,200 @@
"""V60 approved mixer: tactile unity fader and physical full-span WIRE.
Fast --source contract runs without Playwright; browser mode tests actual DOM,
mouse gestures, responsive rail/Master geometry and SVG path animation.
This is reference GUI evidence, never native PCM or ASIO FAT.
"""
from __future__ import annotations

import subprocess
import sys
import tempfile
from pathlib import Path

ROOT=Path(__file__).resolve().parents[1]
HTML=(ROOT/"site/preview-v2/index.html").read_text("utf-8")
FADER=(ROOT/"site/preview-v2/assets/mixer-fader-assembly.css").read_text("utf-8")
WIRE=(ROOT/"site/preview-v2/assets/mixer-wire-dots.css").read_text("utf-8")


def source_contract():
for text in ("FADER_UNITY_CAPTURE_PX=7,FADER_UNITY_RELEASE_PX=12",
"gesture.unityLatched=true", "if(!ev.altKey&&Math.abs",
"handleField({target:g.input,type:'change'",
"WIRE_IMPACT_TRAVEL_MS=460,WIRE_IMPACT_SETTLE_MS=190",
"const center=.035+.93*sweep",
"const tether=Math.min(1,t/.035,(1-t)/.035)",
"line.style.setProperty('--wire-selected-hue'"):
assert text in HTML,("missing tactile contract",text)
assert "elapsed<1600" not in HTML
assert "--fader-fixed-h:clamp(270px,35vh,390px)" in FADER
assert "--fader-fixed-h:clamp(175px,32vh,210px)" in FADER
assert "stroke:transparent!important;" in WIRE
assert "stroke-width:5.6px!important;opacity:1!important;" in WIRE
assert "stroke-dasharray:none!important;" in WIRE
print("PASS V60 fast source contract: detent / tall rail / full-span impulse / selected jacket")


def point_at_midpoint(path):
return path.evaluate("""el=>{
const pt=el.getPointAtLength(el.getTotalLength()*.48);
const svg=el.ownerSVGElement,r=svg.getBoundingClientRect(),v=svg.viewBox.baseVal;
return {x:r.left+(pt.x-v.x)*r.width/v.width,
y:r.top+(pt.y-v.y)*r.height/v.height};
}""")


def exercise(page,width,height):
page.goto((ROOT/"dist-pages/preview/index.html").as_uri())
page.locator('#tracks .strip[data-id="1"] .fader-box').wait_for()
layout=page.evaluate("""()=> {
const r=q=>{const n=document.querySelector(q);if(!n)return null;
const b=n.getBoundingClientRect();return {y:b.y,h:b.height,bottom:b.bottom};};
return {fader:r('#tracks .strip[data-id="1"] .fader-section'),
master:r('#master .strip .fader-section'),
rail:r('.section-rail .rail-cell.fader'),
travel:r('#tracks .strip[data-id="1"] .fader-travel'),
fx:r('#tracks .strip[data-id="1"] .fx-section'),
footer:r('#tracks .strip[data-id="1"] .bottom-section'),
token:getComputedStyle(document.querySelector('.console-body')).getPropertyValue('--fader-fixed-h').trim(),
flex:getComputedStyle(document.querySelector('#tracks .strip[data-id="1"] .fader-section')).flexBasis};
}""")
a,b,c=layout["fader"],layout["master"],layout["rail"]
assert all(x and x["h"]>0 for x in (a,b,c)),layout
assert abs(a["h"]-b["h"])<2 and abs(a["h"]-c["h"])<2,(width,layout)
min_height=300 if height>=1000 else (275 if height>=850 else 210)
assert a["h"]>=min_height,(width,"tall hardware fader lower bound",layout)
print("V60 geometry",width,height,"fader",a["h"],"CSS token",layout["token"],"flex",layout["flex"])
assert layout["travel"]["h"]>a["h"]-110,(width,layout)
assert layout["fx"]["h"]>=23,(width,"FX cell disappeared",layout)
assert a["bottom"]<layout["footer"]["bottom"],(width,"fader overlaps footer",layout)

strip=page.locator('#tracks .strip[data-id="1"]')
box=strip.locator(".fader-box").bounding_box()
travel=strip.locator(".fader-travel").bounding_box()
fader=strip.locator('input[data-field="level"]')
x=box["x"]+box["width"]/2
zero=travel["y"]+travel["height"]*(10/70)
page.mouse.move(x,zero+5)
page.mouse.down()
assert abs(float(fader.input_value()))<.001,(width,"unity detent failed")
page.mouse.move(x,zero+10)
assert abs(float(fader.input_value()))<.001,(width,"unity detent hold failed")
page.mouse.up()
assert abs(float(fader.input_value()))<.001,(width,"unity release failed")
page.mouse.move(x,zero+5)
page.mouse.down()
page.mouse.move(x,zero+22)
page.mouse.up()
assert float(fader.input_value())<-.3,(width,"fader trapped at zero")
page.keyboard.down("Alt")
page.mouse.move(x,zero+5)
page.mouse.down()
page.mouse.up()
page.keyboard.up("Alt")
assert abs(float(fader.input_value()))>.25,(width,"Alt must bypass detent")
# Restored unity can be stored and re-rendered without display rounding.
page.mouse.move(x,zero)
page.mouse.down()
page.mouse.up()
assert abs(float(fader.input_value()))<.001
assert "0.0" in strip.locator(".fader-readout").inner_text()
return layout


def test_wire(page):
# The SEND bay can be folded by default on the assembled preview.
# Use the actual operator rail to reveal the physical sockets.
body=page.locator(".console-body")
if "collapsed-send" in (body.get_attribute("class") or ""):
page.locator('.section-rail [data-section="send"]').click()
source=page.locator('#tracks .strip[data-id="1"] .wire-node-out')
target=page.locator('#tracks .strip[data-id="3"] .wire-node-in')
assert source.count()==target.count()==1
# Listen before a user-originated WIRE acceptance. The observer records
# only real outgoing jacket path mutations, no synthetic second renderer.
page.evaluate("""()=>{
window.__v60WireSamples=[];
const svg=document.querySelector('#wireLayer');
window.__v60Observer=new MutationObserver(records=>{
for(const record of records){
const el=record.target;
if(!el.matches?.('path.wire-outgoing-line[data-from="1"][data-to="3"],path.wire-incoming-line[data-from="1"][data-to="3"]'))continue;
const d=el.getAttribute('d'),len=el.getTotalLength();
const p=el.getPointAtLength(len*.90),a=el.getPointAtLength(0),
b=el.getPointAtLength(len);
window.__v60WireSamples.push({d,near:[p.x,p.y],start:[a.x,a.y],end:[b.x,b.y]});
}
});
window.__v60Observer.observe(svg,{subtree:true,attributes:true,attributeFilter:['d']});
}""")
# CH01 -> CH03: simple explicit parallel graph patch, not PCM.
source.click()
target.click()
cable=page.locator('#wireLayer path.wire-outgoing-line[data-from="1"][data-to="3"],#wireLayer path.wire-incoming-line[data-from="1"][data-to="3"]').first
print("V60 wire paths",page.locator("#wireLayer path[data-from][data-to]").evaluate_all(
"nodes=>nodes.map(n=>[n.getAttribute('class'),n.dataset.from,n.dataset.to])"))
cable.wait_for(state="attached",timeout=8000)
page.wait_for_timeout(850)
samples=page.evaluate("window.__v60WireSamples")
assert len(samples)>=5,("no finite spring movement",len(samples))
assert any(" L " in x["d"] for x in samples),("no cable impact",len(samples))
settled=cable.get_attribute("d")
assert " C " in settled,("must return to exact canonical cubic",settled[:90])
canonical=cable.evaluate("""el=>{const p=el.getPointAtLength(el.getTotalLength()*.90);
return [p.x,p.y];}""")
far=max(((x["near"][0]-canonical[0])**2+
(x["near"][1]-canonical[1])**2)**.5 for x in samples)
assert far>1.0,("wave never reached receiving end",far)
for axis in ("start","end"):
coords=[x[axis] for x in samples]
assert max(abs(p[j]-coords[0][j]) for p in coords for j in (0,1))<.3,\
("motion detached endpoint",axis,coords[:3])

hit=page.locator('#wireLayer path.wire-interaction-hit[data-cable-key="1-3"]')
assert hit.count()==1
mid=point_at_midpoint(hit)
page.mouse.click(mid["x"],mid["y"])
selected=page.locator('#wireLayer path.wire-outgoing-line[data-from="1"][data-to="3"].is-wire-selected,#wireLayer path.wire-incoming-line[data-from="1"][data-to="3"].is-wire-selected')
assert selected.count()==1,"Selected edge must brighten its real visible jacket"
values=selected.evaluate("""el=>{
const c=getComputedStyle(el);
const hit=document.querySelector('#wireLayer .wire-interaction-hit.is-wire-selected');
return {width:parseFloat(c.strokeWidth),stroke:c.stroke,
original:el.getAttribute('stroke'),dash:c.strokeDasharray,
filter:c.filter,hit:getComputedStyle(hit).stroke};
}""")
assert values["width"]>=5.5 and values["dash"]=="none",values
assert values["stroke"]!=values["original"],values
assert values["filter"]=="none",values
assert values["hit"] in ("transparent","rgba(0, 0, 0, 0)"),values
# Re-selecting does not alter source/destination graph identity.
assert hit.get_attribute("data-edge-id")
page.evaluate("window.__v60Observer.disconnect()")


def run():
from playwright.sync_api import sync_playwright
subprocess.run([sys.executable,str(ROOT/"scripts/build_pages.py"),
"--out",str(ROOT/"dist-pages"),"--sha","v60-tactile-test",
"--branch","gui-test"],cwd=ROOT,check=True,capture_output=True,text=True)
with sync_playwright() as pw:
browser=pw.chromium.launch(headless=True)
try:
for width,height in ((640,1005),(1680,900),(1366,768)):
page=browser.new_page(viewport={"width":width,"height":height})
errs=[]
page.on("pageerror",lambda error:errs.append(str(error)))
exercise(page,width,height)
if width==1680:test_wire(page)
if width in (640,1680):
page.screenshot(path=f"arsonmix-v60-fader-wire-{width}.png",full_page=False)
assert not errs,(width,errs)
page.close()
finally:
browser.close()
print("PASS V60 Chromium: taller source/Master, unity detent, fast full-span WIRE, no selected halo")


if __name__=="__main__":
source_contract()
if "--source" not in sys.argv:run()
Loading