diff --git a/.github/workflows/ui-smoke.yml b/.github/workflows/ui-smoke.yml index 74b6a40fd..0dc55a7db 100644 --- a/.github/workflows/ui-smoke.yml +++ b/.github/workflows/ui-smoke.yml @@ -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 @@ -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 @@ -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 @@ -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 diff --git a/site/preview-v2/assets/mixer-fader-assembly.css b/site/preview-v2/assets/mixer-fader-assembly.css index 668f50002..07a895afc 100644 --- a/site/preview-v2/assets/mixer-fader-assembly.css +++ b/site/preview-v2/assets/mixer-fader-assembly.css @@ -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)} +} +@media(max-height:610px){ + .console-body{--fader-fixed-h:clamp(175px,32vh,210px)} +} diff --git a/site/preview-v2/assets/mixer-wire-dots.css b/site/preview-v2/assets/mixer-wire-dots.css index 935ee119b..f3f610f74 100644 --- a/site/preview-v2/assets/mixer-wire-dots.css +++ b/site/preview-v2/assets/mixer-wire-dots.css @@ -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. */ diff --git a/site/preview-v2/index.html b/site/preview-v2/index.html index 1fc7f9650..6d016cdc0 100644 --- a/site/preview-v2/index.html +++ b/site/preview-v2/index.html @@ -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; } @@ -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{ + 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"].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()