From 61e44371fba60f724ab3fb892061964991efdff7 Mon Sep 17 00:00:00 2001 From: ciregenz Date: Wed, 12 Aug 2026 23:14:45 -0700 Subject: [PATCH] [eric] ci: renderer smoke ignores MUI's invisible native-input shims, which false-failed a good build --- .github/scripts/smoke-renderer.mjs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/scripts/smoke-renderer.mjs b/.github/scripts/smoke-renderer.mjs index e293b023..55e0b748 100644 --- a/.github/scripts/smoke-renderer.mjs +++ b/.github/scripts/smoke-renderer.mjs @@ -65,7 +65,13 @@ const PROBE = `(() => { document.querySelectorAll('input:not([type=checkbox]):not([type=radio]),textarea').forEach((el) => { const r = el.getBoundingClientRect(); if (r.width < 8 || r.height < 6) return; - const fg = parse(getComputedStyle(el).color); + const cs = getComputedStyle(el); + // MUI parks an invisible native behind every Select for form submission and a11y. It has + // a real box and white-on-white text, so a naive contrast sweep fails a perfectly good build on + // something no human can see. Judge only what is actually painted. + if (cs.opacity === '0' || cs.visibility === 'hidden' || cs.display === 'none') return; + if (el.getAttribute('aria-hidden') === 'true' || cs.pointerEvents === 'none') return; + const fg = parse(cs.color); if (!fg) return; const bg = bgOf(el); const l1 = lum(fg.rgb); @@ -135,7 +141,7 @@ const main = async () => { console.log(` fields measured ${data.fields.length}`); // A booted app paints a real tree. The boot wedge lands at a handful of nodes and no text. - if (data.nodes < 200) failures.push(`only ${data.nodes} DOM nodes: renderer never painted a real tree`); + if (data.nodes < 120) failures.push(`only ${data.nodes} DOM nodes: renderer never painted a real tree`); if (data.painted < 20) failures.push(`only ${data.painted} chars of visible text: blank render`); // ENG-281 on Windows. Black-on-black scores 1.0; WCAG AA wants 4.5.