Skip to content
2 changes: 1 addition & 1 deletion .github/workflows/ui-smoke.yml
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ jobs:
needs: quick
# Both 8D-SonKu and SOF native-owner PRs share ONE actual Chromium runner.
# Preserve fast-only checks for unrelated GUI and engine branches.
if: ${{ (github.event_name == 'pull_request' && (startsWith(github.head_ref, 'feat/8d-sonku-') || startsWith(github.head_ref, 'feat/sonku-p1-') || startsWith(github.head_ref, 'test/sof-native-') || startsWith(github.head_ref, 'integration/sof-sonku-main-') || startsWith(github.head_ref, 'fix/native-wire-inspector-') || (startsWith(github.head_ref, 'integration/sonku-m4-wire-') || startsWith(github.head_ref, 'integration/sonku-m4-guitar-picker-') || startsWith(github.head_ref, 'fix/sonku-')))) || (github.event_name == 'workflow_dispatch' && startsWith(github.ref, 'refs/heads/feat/8d-sonku-') && inputs.expected_sha != '') }}
if: ${{ (github.event_name == 'pull_request' && (startsWith(github.head_ref, 'feat/8d-sonku-') || startsWith(github.head_ref, 'feat/sonku-p1-') || startsWith(github.head_ref, 'feat/sonku-flipped-') || startsWith(github.head_ref, 'test/sof-native-') || startsWith(github.head_ref, 'integration/sof-sonku-main-') || startsWith(github.head_ref, 'fix/native-wire-inspector-') || (startsWith(github.head_ref, 'integration/sonku-m4-wire-') || startsWith(github.head_ref, 'integration/sonku-m4-guitar-picker-') || startsWith(github.head_ref, 'fix/sonku-')))) || (github.event_name == 'workflow_dispatch' && startsWith(github.ref, 'refs/heads/feat/8d-sonku-') && inputs.expected_sha != '') }}
runs-on: ubuntu-latest
timeout-minutes: 12
steps:
Expand Down
23 changes: 5 additions & 18 deletions site/preview-v2/assets/mixer-native-sonku.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,7 @@ root.innerHTML=[
'<defs><radialGradient id="skBg" cx="50%" cy="48%" r="73%"><stop offset="0" stop-color="#263b49"/><stop offset=".65" stop-color="#152533"/><stop offset="1" stop-color="#0a1622"/></radialGradient>',
'<radialGradient id="skFloor" cx="50%" cy="55%" r="65%"><stop offset="0" stop-color="#7fdae7" stop-opacity=".14"/><stop offset="1" stop-color="#46758b" stop-opacity="0"/></radialGradient>',
'<linearGradient id="skRail" x1="0" x2="0" y1="0" y2="1"><stop stop-color="#80dce8"/><stop offset="1" stop-color="#355969"/></linearGradient>',
'<linearGradient id="skBackSuit" x1="0" x2=".85" y1="0" y2="1"><stop stop-color="#9ee9ff"/><stop offset=".32" stop-color="#3ca8d3"/><stop offset=".77" stop-color="#14648b"/><stop offset="1" stop-color="#0b3c5d"/></linearGradient>',
'<radialGradient id="skCrown" cx=".43" cy=".24" r=".79"><stop stop-color="#b4f1ff"/><stop offset=".27" stop-color="#6ec8ec"/><stop offset=".63" stop-color="#338fbc"/><stop offset="1" stop-color="#115477"/></radialGradient>',
'<linearGradient id="skNeck" x1="0" x2="1" y1="0" y2="0"><stop stop-color="#2b81ad"/><stop offset=".45" stop-color="#88d6f4"/><stop offset="1" stop-color="#1a6389"/></linearGradient>',
'<filter id="skAvatarGlow" x="-35%" y="-35%" width="170%" height="170%"><feGaussianBlur stdDeviation="4"/></filter></defs>',
'</defs>',
'<rect width="400" height="330" rx="10" fill="url(#skBg)"/>',
'<ellipse cx="200" cy="174" rx="148" ry="83" fill="url(#skFloor)"/>',
'<path class="sk-axis" d="M200 79V270 M45 174H355" fill="none" stroke="#597d89" stroke-opacity=".21" stroke-width=".8" stroke-dasharray="2 9"/>',
Expand All @@ -86,21 +83,11 @@ root.innerHTML=[
'<text class="sk-direction sk-front" x="200" y="55" text-anchor="middle">FRONT</text>',
'<text class="sk-direction" x="200" y="317" text-anchor="middle">REAR</text>',
'<text class="sk-direction" x="11" y="149">LEFT</text><text class="sk-direction" x="352" y="149">RIGHT</text>',
// Original vector back-view listener: anatomy and shoulders face UP.
// Do not rotate the old face PNG upside-down or alter native HRTF angles.
'<ellipse class="sk-head-shadow" cx="200" cy="242" rx="88" ry="30" fill="#031621" fill-opacity=".34"/>',
// Flipped transparent PNG replaces the provisional vector listener.
// Anatomical nose/FRONT points TOP; source azimuth is unchanged.
'<ellipse class="sk-head-shadow" cx="200" cy="246" rx="76" ry="22" fill="#031621" fill-opacity=".27"/>',
'<g id="skRearSources" class="sk-rear-sources"></g>',
'<g id="skListenerArt" class="sk-listener-art" aria-label="Listener back of head facing top" pointer-events="none">',
'<path d="M121 250 Q122 216 151 208 Q165 204 181 204 L219 204 Q235 204 250 210 Q279 221 279 250 Q200 278 121 250Z" fill="#0d87b2" opacity=".2" filter="url(#skAvatarGlow)"/>',
'<path d="M118 247 Q123 217 150 210 Q169 202 180 203 L220 203 Q235 204 251 211 Q277 223 282 247 Q245 271 200 266 Q154 270 118 247Z" fill="url(#skBackSuit)" stroke="#77c6e7" stroke-opacity=".54" stroke-width="1.3"/>',
'<path d="M152 211 Q174 229 200 229 Q226 229 249 212" fill="none" stroke="#a9ebfb" stroke-opacity=".22" stroke-width="2"/>',
'<path d="M183 189 L183 214 Q199 226 217 214 L216 189Z" fill="url(#skNeck)" stroke="#7bcbea" stroke-opacity=".5"/>',
'<ellipse cx="159" cy="170" rx="9" ry="17" fill="#3b9ec9" stroke="#9ae1f3" stroke-opacity=".45"/>',
'<ellipse cx="241" cy="170" rx="9" ry="17" fill="#206f9c" stroke="#9ae1f3" stroke-opacity=".45"/>',
'<path d="M200 99 C171 99 157 118 155 151 Q151 185 171 201 Q184 211 200 211 Q216 211 229 201 Q249 183 245 151 C243 118 228 99 200 99Z" fill="url(#skCrown)" stroke="#a0e8f9" stroke-opacity=".68" stroke-width="1.7"/>',
'<path d="M181 113 Q200 102 219 113 M169 142 Q182 124 194 126 M207 126 Q222 126 232 145" fill="none" stroke="#c7f7ff" stroke-opacity=".26" stroke-width="2.6" stroke-linecap="round"/>',
'<path d="M172 188 Q197 213 229 189" fill="none" stroke="#134e75" stroke-opacity=".28" stroke-width="2.4"/>',
'</g>',
'<image id="skListenerArt" class="sk-listener-art" href="assets/sonku-listener-top.png" x="103" y="73" width="194" height="202" preserveAspectRatio="xMidYMid meet" data-orientation="front-up-flipped" aria-label="Top-view listener facing front at top" pointer-events="none"/>',
// Near orbit overlays lower bust, forming ONE plausible 3D spatial ring.
'<path id="skFrontArc" class="sk-orbit-front-shadow" d="M348 174 A148 83 0 0 0 52 174" fill="none" stroke="#061723" stroke-opacity=".7" stroke-width="4.5"/>',
'<path class="sk-orbit-front" d="M348 174 A148 83 0 0 0 52 174" fill="none" stroke="url(#skRail)" stroke-opacity=".9" stroke-width="1.8" stroke-dasharray="5 7"/>',
Expand Down
Binary file modified site/preview-v2/assets/sonku-listener-top.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 14 additions & 6 deletions tests/approved_native_sonku_smoke.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,12 +141,20 @@ def exercise(browser,out,width,height):
assert editor.locator("#"+knob).get_attribute("type")=="range"
assert editor.locator("#"+knob).evaluate("(n)=>n.closest('.sk-dial')!==null")
art=editor.locator("#skListenerArt")
assert art.count()==1 and "facing top" in art.get_attribute("aria-label")
# An original back-of-head vector replaces the physically incorrect
# upside-down face PNG. Same SVG is bundled directly into /preview/.
assert art.locator("path").count()>=6
assert editor.locator("#skMap #skCrown").count()==1
assert editor.locator("#skMap #skBackSuit").count()==1
assert art.count()==1 and art.get_attribute("data-orientation")=="front-up-flipped"
assert art.get_attribute("href")=="assets/sonku-listener-top.png"
# The vertically flipped PNG must actually resolve in the BUILT
# native /preview/ bundle, and have transparent palette metadata.
assert page.evaluate("""async () => new Promise(resolve => {
const image=document.querySelector('#skListenerArt');
const href=image.getAttribute('href');
// file:// origins prohibit fetch(); SVG images still resolve from
// the compiled GUI resource. Exercise actual Image.decode instead.
const im=new Image();
im.onload=()=>resolve(im.naturalWidth===256&&im.naturalHeight===256);
im.onerror=()=>resolve(false);
im.src=href;
})"""),"Flipped transparent PNG missing from native GUI bundle"
# SVG <text> is not HTML text: Chromium 158 no longer exposes usable
# HTMLElement.innerText for these nodes. Read SVG textContent and verify
# the actual anchors, so front/rear cannot silently flip in the GUI.
Expand Down
13 changes: 11 additions & 2 deletions tests/native_peq_assembly_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,17 @@ def test_single_style_owner(self):
# rather than displaying the old face PNG upside-down. The legacy
# PNG is still packaged for historical/checkpoint builds.
self.assertIn('id="skListenerArt"',sonku)
self.assertIn('id="skCrown"',sonku)
self.assertIn('id="skBackSuit"',sonku)
self.assertIn('href="assets/sonku-listener-top.png"',sonku)
self.assertIn('data-orientation="front-up-flipped"',sonku)
self.assertNotIn('id="skCrown"',sonku)
self.assertNotIn('id="skBackSuit"',sonku)
# Alpha-palette PNG asset is the exact vertically flipped user-approved
# listener; fail if a stale provisional source is repackaged.
import hashlib
self.assertEqual(hashlib.sha256(png).hexdigest(),
"e4fa2f75a541615448dd2d2b0bcbbf7955428900b3bdba8ad45c1ff7374fefc8")
self.assertEqual(png[16:24],bytes([0,0,1,0,0,0,1,0]))
self.assertIn(b"tRNS",png)
self.assertIn("FRONT</text>",sonku)
self.assertIn('arMixBuiltinSonKuAck',sonku)
self.assertIn('nativeSonKuSet',sonku)
Expand Down
Loading