← Commit history

2.19.1: retract the 0px headroom claim - clientWidth-scrollWidth saturates at 0 for anything that fits; the real worst slack is 141px

John Lauer ·7ff43dec15 ·1mo ago ·parent 60a79f7
3 files changed +35−17
assets/module/newbie-panel.js+10−7
@@ -519,12 +519,15 @@      * fleet mismatch comes back in a form the check is blind to. This asserts the panel's      * left edge against the PANE, which covers the whole ancestor chain in one number.      * (parts-search, 2026-08-25, reasoning about what the new yardstick still could not see.) */-    /* PHRASE HEADROOM AS A ROW, not a console warning nobody reads. The mount-time probe has-     * warned about over-budget phrases since 2.0.0 and it warned on at least one live app that-     * then reported "0 of 6 truncated" and a clean pass, because "does not truncate TODAY" and-     * "has room" are different claims. kicad measured its longest phrase at clientWidth ==-     * scrollWidth EXACTLY: not truncating, and one character from doing so. A row makes it-     * appear in the evidence everyone already pastes. */+    /* PHRASE HEADROOM AS A ROW, not a console warning nobody reads: "does not truncate TODAY"+     * and "has room" are different claims.+     * MEASURE need AGAINST AN OFFSCREEN nowrap PROBE. Do NOT use clientWidth - scrollWidth:+     * for a block span with overflow:hidden, scrollWidth is max(clientWidth, content), so that+     * expression SATURATES AT 0 for anything that fits, whether it fits by 1px or by 180px. It+     * still goes negative correctly when text overflows, so it looks like a working metric.+     * Two apps independently reported "0px headroom, one character from truncating" off it;+     * remeasured with this probe, neither had less than 141px of slack. A metric that can only+     * return one value on success is not evidence of success. */     var spans = [].slice.call(panel.querySelectorAll('.anp-phrase span'));     if (spans.length) {       var probe = document.createElement('span');@@ -584,6 +587,6 @@   }    root.AdomNewbiePanel = { mount: mount, toast: toast, selfCheck: selfCheck, copyText: copyText,-                           checkSend: checkSend, version: '2.19.0',+                           checkSend: checkSend, version: '2.19.1',                            TWO_COL_MIN: TWO_COL_MIN, PHRASE_BUDGET: PHRASE_BUDGET }; })(typeof window !== 'undefined' ? window : this);
package.json+1−1
@@ -1,6 +1,6 @@ {   "slug": "adom-ui-design",-  "version": "2.19.0",+  "version": "2.19.1",   "type": "skill",   "description": "The Adom UI Design System plus a bundle of focused UI skills (tooltips, floating-windows, toasts, responsive-ui, app-shell, ai-driven-apps, clickable-paths, dark-default, input-feedback, settings-layout). One install drops the whole set of skill files onto your container, plus shared icon assets (the settings cog) so every Adom app draws the same glyph.",   "dependencies": {},
skills/newbie-panel/SKILL.md+24−9
@@ -1191,11 +1191,22 @@ others. slack**, and it reports the worst one by name.  The mount-time probe has warned about over-budget phrases since the first release, in a-`console.warn` **nobody reads**. So an app could report "0 of 6 truncated" and a clean eleven-rows while sitting exactly on the edge: kicad measured its longest phrase, "open the symbol in-kicad", at `clientWidth == scrollWidth` **exactly**. Not truncating, and one character from it.-A slightly wider font fallback, a 2px narrower pane, or one extra word, and it ellipsises the-trigger noun — which is the specific failure this whole panel exists to prevent.+`console.warn` **nobody reads**, so an app could report "0 of 6 truncated" and a clean pass+without anyone knowing how close it was.++**⛔ MEASURE `need` AGAINST AN OFFSCREEN `nowrap` PROBE. NEVER `clientWidth - scrollWidth`.**+For a block span with `overflow: hidden`, `scrollWidth` is `max(clientWidth, content)`, so that+expression **saturates at 0 for anything that fits** — by 1px or by 180px, identically. It+still goes correctly negative when text overflows, which is what makes it look like a working+metric. Two apps independently reported "0px headroom, one character from truncating" off it,+and it briefly went into this skill and into the module's own source as justification.+**Remeasured with the probe, neither had less than 141px of slack.** kicad also named the wrong+phrase as its worst, because with every value tied at 0 the minimum was just the first element+in DOM order.++**A METRIC THAT CAN ONLY RETURN ONE VALUE ON SUCCESS IS NOT EVIDENCE OF SUCCESS.** kicad's own+conclusion, and the cheapest possible guard: **ask what a HEALTHY reading looks like before you+report an unhealthy one.** Here the answer was "also 0".  **A warning in a channel nobody reads is not a check.** Put it in the evidence people already paste. Negative-controlled before shipping: comfortable phrases pass with 136px of slack, a@@ -1215,10 +1226,14 @@ parts-search measured these on his box and flagged them rather than reporting a - **The longest phrase is 332px in a 343px box: 11px of headroom**, on "check ESP32-S3-WROOM-1   stock". The 0-of-6 is real and it is not comfortable. -kicad's are tighter still, and it reported them rather than banking a clean pass: **a 2px-collapse margin** (scroller box 734, panel 702, threshold 700, so a 12px scrollbar drops it to-one column) and **0px of phrase headroom**. It is the app that defines the fleet's safety-margin on both axes.+kicad's **collapse** margin is tighter still and stands: **2px** (scroller box 734, panel 702,+threshold 700, so a 12px scrollbar drops it to one column). **Its 0px phrase headroom was+retracted** as a measurement artifact, above; its real worst is 141px.++**And the phrase cell cannot narrow onto its longest phrase, by construction.** `.anp-tbl` is+`table-layout: fixed` with the action column pinned at 72px, so the cell is a pure function of+container width — 342px at his geometry, identical for all six rows regardless of content.+There is no allowance to add and nothing to resize.  **And the version gate has zero headroom too:** John's shell is EXACTLY 1.0.142, the minimum the module requires. The gate passes with nothing to spare, so a single patch downgrade starts