diff --git a/AR-MIX-Live-FX-Host-Standalone-v0.3.html b/AR-MIX-Live-FX-Host-Standalone-v0.3.html index 6f28b2af2..96bcf5ba8 100644 --- a/AR-MIX-Live-FX-Host-Standalone-v0.3.html +++ b/AR-MIX-Live-FX-Host-Standalone-v0.3.html @@ -649,7 +649,7 @@ filter:none!important; color:white!important; text-shadow:0 1px 0 rgba(0, 0, 0, .3)!important; - transition:background-color 150ms ease-out, border-color 150ms ease-out, color 150ms ease-out, box-shadow 90ms ease-out, filter 120ms ease-out, transform 75ms ease-out!important; + transition:background-color 150ms ease-out, border-color 150ms ease-out, color 150ms ease-out, transform 75ms ease-out!important; font-family:Arial,Helvetica,sans-serif; cursor:pointer;text-decoration:none;user-select:none; display:inline-flex;justify-content:center;align-items:center; @@ -711,14 +711,9 @@ .strip .strip-name,#masterLeft .master-strip-name{position:relative;z-index:2;isolation:isolate} /* No odd vertical displacement of the active nav relative to its neighbors. */ -/* Hover intensifies reflected light, but creates NO new border/halo/motion. */ -:is(.btn-180,.toolbar .nav button.btn-180,.toolbar .spec-device, - .strip .channel-actions .candy,.strip .utility-row button,.strip .fader-tools button, - #masterLeft .master-actions button,#masterLeft .master-tools button, - .left-rail .tabs button.btn-180,.left-rail .rail-presets button.btn-180, - .left-rail .rail-bottom button.btn-180,.native-btn):hover:not(:disabled){ - filter:brightness(1.32)!important; -} +/* Issue #56: passive hover has no filter or animated shadow. + Preserve all seven resting / seven pressed shadows and 1px tactile response. + Historical brightness is isolated to opt-in baseline A/B only. */ /* Hardware tactility: brief pointer/keyboard activation presses the SAME cap 1px into the control panel. The layout and hit target stay the same; only @@ -882,7 +877,7 @@ pointer-events:none; } /* Issue #56: diagnostic variants for hover paint, demo meters and layer hints. - All mixer geometry, fader PNG, Button 19 and native audio remain untouched. */ + All mixer geometry, fader PNG, BTN-180 and native audio remain untouched. */ html:is([data-mixperf="baseline"],[data-mixperf="layers-off"],[data-mixperf="meters-off"]) #mixer .fader:not(.is-dragging):hover .cap, html:is([data-mixperf="baseline"],[data-mixperf="layers-off"],[data-mixperf="meters-off"]) #mixer .fader:not(.is-dragging) .cap:hover{filter:brightness(1.19) contrast(1.06) drop-shadow(0 1px 3px #c6deef70)!important} html:is([data-mixperf="baseline"],[data-mixperf="layers-off"],[data-mixperf="meters-off"]) #mixer .pan-track:not(.is-dragging):hover .pan-thumb{filter:brightness(1.12) drop-shadow(1px 1px 2px #000a)!important} @@ -893,6 +888,12 @@ html:is([data-mixperf="hover-off"],[data-mixperf="all-off"]) #mixer :is(.fader:hover .cap,.pan-track:hover .pan-thumb,.rack .insert:hover,.rack .fx-power:hover,.strip-name:hover,.master-insert:hover,.master-tools button:hover){filter:none!important;transition:none!important} html:is([data-mixperf="hover-off"],[data-mixperf="all-off"]) #mixer .strip-name:hover{outline:none!important} +/* Issue #56: optional historical BTN-180 brightness for field A/B only. */ +html[data-mixperf="baseline"] #app button.btn-180:hover:not(:disabled), +html[data-mixperf="baseline"] #app .native-btn:hover:not(:disabled){ + filter:brightness(1.32)!important; +} + /* LED quantisation follows Soundcraft-style *fixed-color* segments. Low green is always at the bottom; amber/red exist only at upper meter thresholds. The fill remains full-height; a clip reveals reached segments without diff --git a/docs/ARD_056_GUI_IDLE_POINTER_RENDERING_2026-10-27.md b/docs/ARD_056_GUI_IDLE_POINTER_RENDERING_2026-10-27.md new file mode 100644 index 000000000..77caa28c1 --- /dev/null +++ b/docs/ARD_056_GUI_IDLE_POINTER_RENDERING_2026-10-27.md @@ -0,0 +1,28 @@ +# ARD-056: P0 idle-pointer rendering optimization + +**Date:** 2026-10-27 | **Base:** `main@78b71bd056f3c0a81d88f0fb1c41ff85d76749ef` | **Issue:** [#56](https://github.com/masarray/arsonmix/issues/56) + +## Scope and known facts + +The user reports pointer stutter on Windows 11 Pro server hardware in both browser and JUCE/WebView2 native EXE, but smooth results with RTX 4050/3060 Ti. GPU model/driver, DPI, direct/RDP, WebRender/Edge compositor traces and affected-PC p95 are not available. Source inspection finds avoidable *work*, not a confirmed root cause or measured improvement. Preserve native audio callback, VST3 hosting and visual geometry. + +## Audit (risk ranking by executable path; GPU paint cost NOT measured) + +| Area | Source and trigger | Decision | +| --- | --- | --- | +| Global BTN-180 | `20-button-180.css`: large set of buttons with seven resting shadows; `brightness(1.32)` plus filter (120ms) and shadow (90ms) transitions per pointer hover | Keep seven resting / seven pressed shadows, 3px radius, all palettes and 1px press; remove passive brightness and filter/shadow animations | +| FX, fader PNG, PAN | `41-mixer-performance.css`: normal optimized path already suppresses costly hover filters | Keep normal path, original artwork and relative drag | +| Native pointer edit guard | `bridge.js`: capturing `pointermove` always calls a DOM `closest()` guard even when not dragging | Remove global move listener only; keep pointerdown/up/cancel, wheel, key, active `drag` readback guard, 350ms grace | +| LED bank | `40-rail-pan.css`: fixed colors plus dynamic `clip-path`, 12Hz native / bounded preview timer | No speculative Canvas change; await meters-off physical A/B | +| Legacy filters, overlay | `10-console-legacy.css`: dormant historical blur/filter rules; `41-mixer-performance.css` already overrides common active paths | No broad selector deletion without computed-style proof | +| Status/monitor bridge | `bridge.js`, `monitor.js` native status | Leave intact until main-thread profile justifies further work | + +## Decision and alternatives + +Change shared web renderer, not DSP. BTN material remains one exact seven-shadow surface for OFF/ON; state changes still animate color 150ms and 1px press translates 75ms. Pressed shadow geometry remains but switches immediately, avoiding interpolated shadow paint. `?mixperf=baseline` restores only historical BTN-180 brightness for same-hardware A/B; this is **not a full historical build**. Normal / `optimized` no longer uses BTN-180 brightness hover. Do not add new compositing layers, framework, animation queue, `!important` cascade patches, or merge unmeasured Canvas PR #60. + +## Verification and field acceptance + +Static gates: concatenate eight modules to exact runtime CSS, embed exact CSS in offline HTML, button geometry/shadow/palette contract, calculated normal-vs-baseline BTN-180 hover, no idle native pointermove. Automated Chromium and Firefox smoke plus Windows native CI must pass on exact PR head. + +Physical test is pending: use `https://masarray.github.io/arsonmix/preview/perf.html` after deployment; 2–3 matched 10-second runs, modes `optimized`, `baseline`, `meters-off`, `all-off`, same cursor route across BTN-180, FX, fader, PAN and outside. Capture median/p95/p99/over33.3ms, browser, GPU driver, DPI/refresh, direct-vs-iframe, Edge/Firefox paint/compositor trace. rAF intervals are **not** input-to-photon latency. Distinguish engineering/CI completion from hardware qualification; Issue #56 remains open until actual affected PC validates improvement. diff --git a/tests/button_asset_test.py b/tests/button_asset_test.py index 1e15fde93..ab5d9e153 100644 --- a/tests/button_asset_test.py +++ b/tests/button_asset_test.py @@ -21,7 +21,7 @@ '0 0 0 1px var(--b180-border)', 'box-shadow:var(--b180-shadow-surface)', 'transform:translateY(0px)!important', - 'transition:background-color 150ms ease-out, border-color 150ms ease-out, color 150ms ease-out, box-shadow 90ms ease-out, filter 120ms ease-out, transform 75ms ease-out', + 'transition:background-color 150ms ease-out, border-color 150ms ease-out, color 150ms ease-out, transform 75ms ease-out', 'background:var(--b180-color)', 'display:inline-flex', 'inset 5px 5px 2px -1px rgba(0,0,0,.30)' @@ -59,6 +59,9 @@ assert 'top:13px!important' in css assert 'top:12px!important' in css assert 'top:15px!important' in css +# Historical brightness must remain diagnostic-only, not the normal pad. +assert 'filter:brightness(1.32)!important' not in (root/'web/styles-src/20-button-180.css').read_text(encoding='utf8') +assert 'html[data-mixperf="baseline"] #app button.btn-180:hover:not(:disabled)' in css assert 'filter:brightness(1.32)!important' in css assert 'border-color:#527789!important' not in css assert css.count('inset 5px 5px 2px -1px rgba(0,0,0,.30)') == 1 diff --git a/tests/gui_workflow_contract_test.mjs b/tests/gui_workflow_contract_test.mjs index 25e4c3252..91384f2ef 100644 --- a/tests/gui_workflow_contract_test.mjs +++ b/tests/gui_workflow_contract_test.mjs @@ -46,3 +46,12 @@ test('native meter bridge drives fixed-palette LED reveal by level',()=>{ assert.ok(!bridge.includes('backdrop-filter:blur(5px)')); assert.ok(!app.includes("meter.fill.style.setProperty('--meter-scale'")); }); + +test('native bridge does not inspect idle pointer movement',()=>{ + const a=bridge.indexOf('let controlEditUntil=0;'); + const b=bridge.indexOf('function syncNativeMixerControls',a); + assert.ok(a>=0 && b>a); + const guard=bridge.slice(a,b); + assert.ok(!guard.includes('"pointermove"'), 'idle pointer listener forbidden'); + assert.ok(guard.includes('typeof drag') && guard.includes('"pointerup"') && guard.includes('"pointercancel"')); +}); diff --git a/tests/ui_smoke.py b/tests/ui_smoke.py index a0715cb84..d98b8878a 100644 --- a/tests/ui_smoke.py +++ b/tests/ui_smoke.py @@ -179,7 +179,16 @@ def shared_shadow_shape(shadow): return document.fonts.check('600 12px "ArSonMix Inter"')&& getComputedStyle(document.querySelector('.strip-name')).fontFamily.includes('ArSonMix Inter'); }"""),'Embedded Inter font was not applied' - assert [round(float(v.rstrip('s')),3) for v in style['dur'].split(', ')]==[.15,.15,.15,.09,.12,.075],style + assert [round(float(v.rstrip('s')),3) for v in style['dur'].split(', ')]==[.15,.15,.15,.075],style + # Hover in production does not create a filter, while diagnostic + # baseline restores brightness to permit same-PC performance A/B. + utility=page.locator('[data-hpf="0"]') + await utility.hover() + assert await utility.evaluate("(e)=>getComputedStyle(e).filter")=='none' + await page.evaluate("document.documentElement.dataset.mixperf='baseline'") + assert 'brightness(1.32)' in await utility.evaluate("(e)=>getComputedStyle(e).filter") + await page.evaluate("delete document.documentElement.dataset.mixperf") + assert await utility.evaluate("(e)=>getComputedStyle(e).filter")=='none' # Visual-architecture regression: four intentionally different hardware # families, FX slots recessed rather than taking on button-cap artwork. # GUI target: MASTER is the 11th strip, not a floating right rail. @@ -632,9 +641,8 @@ def same_rect(a,b): assert fader_hover=='none',fader_hover button=page.locator('[data-mute="0"]') await button.hover() - await page.wait_for_timeout(150) # Finish 90 ms physical-switch filter transition. button_hover=await button.evaluate("(e)=>getComputedStyle(e).filter") - assert button_hover=='brightness(1.32)',button_hover + assert button_hover=='none',button_hover # No passive GPU filter in normal GUI # FX power and FX name remain separate inside the 104px channel strip. assert await page.evaluate("""() => [...document.querySelectorAll('.strip .insert-slot')].every(slot=>{ const cell=slot.getBoundingClientRect(),strip=slot.closest('.strip').getBoundingClientRect(); diff --git a/web/bridge.js b/web/bridge.js index 10380e316..4890333dd 100644 --- a/web/bridge.js +++ b/web/bridge.js @@ -792,7 +792,9 @@ (drag.type==="fader" || drag.type==="pan")) controlEditUntil=Date.now()+350; } - for(const event of ["pointerdown","pointermove","pointerup","pointercancel","wheel","keydown"]) + // Idle pointer traversal does not inspect DOM. Active drag stays guarded + // by syncNativeMixerControls() and pointer release renews the grace window. + for(const event of ["pointerdown","pointerup","pointercancel","wheel","keydown"]) document.addEventListener(event,markNativeUiEdit,true); // A restored GUI-only snapshot must not masquerade as a live native setting. function syncNativeMixerControls(d){ diff --git a/web/styles-src/20-button-180.css b/web/styles-src/20-button-180.css index 7700ef923..fd8296344 100644 --- a/web/styles-src/20-button-180.css +++ b/web/styles-src/20-button-180.css @@ -40,7 +40,7 @@ filter:none!important; color:white!important; text-shadow:0 1px 0 rgba(0, 0, 0, .3)!important; - transition:background-color 150ms ease-out, border-color 150ms ease-out, color 150ms ease-out, box-shadow 90ms ease-out, filter 120ms ease-out, transform 75ms ease-out!important; + transition:background-color 150ms ease-out, border-color 150ms ease-out, color 150ms ease-out, transform 75ms ease-out!important; font-family:Arial,Helvetica,sans-serif; cursor:pointer;text-decoration:none;user-select:none; display:inline-flex;justify-content:center;align-items:center; @@ -102,14 +102,9 @@ .strip .strip-name,#masterLeft .master-strip-name{position:relative;z-index:2;isolation:isolate} /* No odd vertical displacement of the active nav relative to its neighbors. */ -/* Hover intensifies reflected light, but creates NO new border/halo/motion. */ -:is(.btn-180,.toolbar .nav button.btn-180,.toolbar .spec-device, - .strip .channel-actions .candy,.strip .utility-row button,.strip .fader-tools button, - #masterLeft .master-actions button,#masterLeft .master-tools button, - .left-rail .tabs button.btn-180,.left-rail .rail-presets button.btn-180, - .left-rail .rail-bottom button.btn-180,.native-btn):hover:not(:disabled){ - filter:brightness(1.32)!important; -} +/* Issue #56: passive hover has no filter or animated shadow. + Preserve all seven resting / seven pressed shadows and 1px tactile response. + Historical brightness is isolated to opt-in baseline A/B only. */ /* Hardware tactility: brief pointer/keyboard activation presses the SAME cap 1px into the control panel. The layout and hit target stay the same; only diff --git a/web/styles-src/41-mixer-performance.css b/web/styles-src/41-mixer-performance.css index 24be86cc1..a5497fe60 100644 --- a/web/styles-src/41-mixer-performance.css +++ b/web/styles-src/41-mixer-performance.css @@ -1,5 +1,5 @@ /* Issue #56: diagnostic variants for hover paint, demo meters and layer hints. - All mixer geometry, fader PNG, Button 19 and native audio remain untouched. */ + All mixer geometry, fader PNG, BTN-180 and native audio remain untouched. */ html:is([data-mixperf="baseline"],[data-mixperf="layers-off"],[data-mixperf="meters-off"]) #mixer .fader:not(.is-dragging):hover .cap, html:is([data-mixperf="baseline"],[data-mixperf="layers-off"],[data-mixperf="meters-off"]) #mixer .fader:not(.is-dragging) .cap:hover{filter:brightness(1.19) contrast(1.06) drop-shadow(0 1px 3px #c6deef70)!important} html:is([data-mixperf="baseline"],[data-mixperf="layers-off"],[data-mixperf="meters-off"]) #mixer .pan-track:not(.is-dragging):hover .pan-thumb{filter:brightness(1.12) drop-shadow(1px 1px 2px #000a)!important} @@ -10,6 +10,12 @@ html:is([data-mixperf="baseline"],[data-mixperf="hover-off"],[data-mixperf="mete html:is([data-mixperf="hover-off"],[data-mixperf="all-off"]) #mixer :is(.fader:hover .cap,.pan-track:hover .pan-thumb,.rack .insert:hover,.rack .fx-power:hover,.strip-name:hover,.master-insert:hover,.master-tools button:hover){filter:none!important;transition:none!important} html:is([data-mixperf="hover-off"],[data-mixperf="all-off"]) #mixer .strip-name:hover{outline:none!important} +/* Issue #56: optional historical BTN-180 brightness for field A/B only. */ +html[data-mixperf="baseline"] #app button.btn-180:hover:not(:disabled), +html[data-mixperf="baseline"] #app .native-btn:hover:not(:disabled){ + filter:brightness(1.32)!important; +} + /* LED quantisation follows Soundcraft-style *fixed-color* segments. Low green is always at the bottom; amber/red exist only at upper meter thresholds. The fill remains full-height; a clip reveals reached segments without diff --git a/web/styles.css b/web/styles.css index 61f663eac..c8a91e769 100644 --- a/web/styles.css +++ b/web/styles.css @@ -648,7 +648,7 @@ html,body,body *:not(svg):not(path):not(circle):not(rect){ filter:none!important; color:white!important; text-shadow:0 1px 0 rgba(0, 0, 0, .3)!important; - transition:background-color 150ms ease-out, border-color 150ms ease-out, color 150ms ease-out, box-shadow 90ms ease-out, filter 120ms ease-out, transform 75ms ease-out!important; + transition:background-color 150ms ease-out, border-color 150ms ease-out, color 150ms ease-out, transform 75ms ease-out!important; font-family:Arial,Helvetica,sans-serif; cursor:pointer;text-decoration:none;user-select:none; display:inline-flex;justify-content:center;align-items:center; @@ -710,14 +710,9 @@ html,body,body *:not(svg):not(path):not(circle):not(rect){ .strip .strip-name,#masterLeft .master-strip-name{position:relative;z-index:2;isolation:isolate} /* No odd vertical displacement of the active nav relative to its neighbors. */ -/* Hover intensifies reflected light, but creates NO new border/halo/motion. */ -:is(.btn-180,.toolbar .nav button.btn-180,.toolbar .spec-device, - .strip .channel-actions .candy,.strip .utility-row button,.strip .fader-tools button, - #masterLeft .master-actions button,#masterLeft .master-tools button, - .left-rail .tabs button.btn-180,.left-rail .rail-presets button.btn-180, - .left-rail .rail-bottom button.btn-180,.native-btn):hover:not(:disabled){ - filter:brightness(1.32)!important; -} +/* Issue #56: passive hover has no filter or animated shadow. + Preserve all seven resting / seven pressed shadows and 1px tactile response. + Historical brightness is isolated to opt-in baseline A/B only. */ /* Hardware tactility: brief pointer/keyboard activation presses the SAME cap 1px into the control panel. The layout and hit target stay the same; only @@ -881,7 +876,7 @@ html,body,body *:not(svg):not(path):not(circle):not(rect){ pointer-events:none; } /* Issue #56: diagnostic variants for hover paint, demo meters and layer hints. - All mixer geometry, fader PNG, Button 19 and native audio remain untouched. */ + All mixer geometry, fader PNG, BTN-180 and native audio remain untouched. */ html:is([data-mixperf="baseline"],[data-mixperf="layers-off"],[data-mixperf="meters-off"]) #mixer .fader:not(.is-dragging):hover .cap, html:is([data-mixperf="baseline"],[data-mixperf="layers-off"],[data-mixperf="meters-off"]) #mixer .fader:not(.is-dragging) .cap:hover{filter:brightness(1.19) contrast(1.06) drop-shadow(0 1px 3px #c6deef70)!important} html:is([data-mixperf="baseline"],[data-mixperf="layers-off"],[data-mixperf="meters-off"]) #mixer .pan-track:not(.is-dragging):hover .pan-thumb{filter:brightness(1.12) drop-shadow(1px 1px 2px #000a)!important} @@ -892,6 +887,12 @@ html:is([data-mixperf="baseline"],[data-mixperf="hover-off"],[data-mixperf="mete html:is([data-mixperf="hover-off"],[data-mixperf="all-off"]) #mixer :is(.fader:hover .cap,.pan-track:hover .pan-thumb,.rack .insert:hover,.rack .fx-power:hover,.strip-name:hover,.master-insert:hover,.master-tools button:hover){filter:none!important;transition:none!important} html:is([data-mixperf="hover-off"],[data-mixperf="all-off"]) #mixer .strip-name:hover{outline:none!important} +/* Issue #56: optional historical BTN-180 brightness for field A/B only. */ +html[data-mixperf="baseline"] #app button.btn-180:hover:not(:disabled), +html[data-mixperf="baseline"] #app .native-btn:hover:not(:disabled){ + filter:brightness(1.32)!important; +} + /* LED quantisation follows Soundcraft-style *fixed-color* segments. Low green is always at the bottom; amber/red exist only at upper meter thresholds. The fill remains full-height; a clip reveals reached segments without