From 4d9b90f3e32bca3c73162c6dd5379f240f110b26 Mon Sep 17 00:00:00 2001 From: doxa-maps-88655c70 <88627970+doxa-maps-88655c70@users.noreply.github.com> Date: Wed, 23 Sep 2026 16:36:51 +0000 Subject: [PATCH] Stop the fitness gate reporting Mapbox's own wrappers as clipped On its first real verdict, clause E failed on ALL EIGHT viewport/target combinations with docOverflow=0 and the same two elements every time: mapboxgl-canvas-container and mapboxgl-control-container. Both are GL-JS's own wrappers, legitimately zero-height with children -- the canvas container collapses because the canvas is absolutely positioned, the control container is an empty positioning shell. Neither is a layout defect. That was 8 of the gate's 12 failures: a false signal loud enough to drown the one real finding underneath it (clause B -- a wheel below the map scrolls nothing on the composite leaf). A gate that reports four-fifths noise teaches its reader to skim the summary line, which is the failure this file was written to end. So the exemption is a correctness fix, not a convenience. Scoped by PREFIX rather than an exact class list, because GL-JS composes these as multi-class strings ("mapboxgl-canvas-container mapboxgl-interactive") and adds more across versions. Kept narrow to mapboxgl-/maplibregl- so it cannot silently swallow a real defect in our own markup. Negative-tested as a predicate, 7/7: both real false-positives and the maplibre equivalent are exempt; rd-shell, pgg-root and region-card__footer are NOT; and "my-mapboxgl-thing" does not match mid-string. check:mjs-parse passes. The gate could not be re-run end-to-end for a before/after verdict -- the shared build queue has been busy continuously (check:settled reported dirs=2/17 leaves=0/40 mid-clean). Predicate proven in isolation; the full verdict is owed. --- internal/check-fits-the-screen.mjs | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/internal/check-fits-the-screen.mjs b/internal/check-fits-the-screen.mjs index 8d0fec4cd..d13b5f873 100644 --- a/internal/check-fits-the-screen.mjs +++ b/internal/check-fits-the-screen.mjs @@ -396,10 +396,29 @@ async function runResponsiveSweep(url, label) { // Elements clipped to zero height: anything with real content but 0 rendered height. // Exempt .rd-td/.rd-th (text-overflow:ellipsis is EXPECTED there — the brief's own carve-out) // and anything with zero content (legitimately-empty containers are not a clipping defect). + // ★ MAPBOX INTERNALS ARE EXEMPT TOO (added 2026-09-23, after the first real verdict). + // On its first run this clause failed on ALL EIGHT viewport/target combinations with + // docOverflow=0 and the SAME two elements every time: mapboxgl-canvas-container and + // mapboxgl-control-container. Both are GL-JS's own wrappers, legitimately zero-height with + // children — the canvas container collapses because the canvas is absolutely positioned, and + // the control container is an empty positioning shell. Neither is a layout defect. + // + // That was 8 of this gate's 12 failures on its first verdict: a false signal loud enough to + // drown the ONE real finding (clause B, a wheel below the map scrolling nothing). A gate that + // reports four-fifths noise teaches its reader to skim the summary line, which is the same + // failure this file was written to end — so the exemption is a correctness fix, not a + // convenience. + // + // Scoped by PREFIX rather than an exact class list, because GL-JS composes these as + // multi-class strings ("mapboxgl-canvas-container mapboxgl-interactive") and adds more of + // them across versions. Kept NARROW to mapboxgl-/maplibregl- so it cannot silently swallow a + // real defect in our own markup. + const VENDOR_ZERO_HEIGHT = /(^|\s)(mapboxgl|maplibregl)-/; const all = __walk('*'); const clipped = []; for (const el of all) { if (el.classList && (el.classList.contains('rd-td') || el.classList.contains('rd-th'))) continue; + if (el.className && VENDOR_ZERO_HEIGHT.test(String(el.className))) continue; const r = el.getBoundingClientRect(); const hasText = (el.textContent || '').trim().length > 0; const hasOwnChildren = el.children && el.children.length > 0;