Files
ashvale-station/ashvale
kemal ca1d6ba528 Fix cards whose content overflowed them, and the audit that missed it
Reported on a 13 inch screen: the Detectors column and the Learner bank spilled
past their cards. My earlier sweep called those tabs clean because it only
checked content escaping the viewport, never content escaping its own card, and
the cards are overflow-hidden so it was invisible rather than obviously broken.

The worst was not either of those. The Station log was discarding up to 299 px
of entries behind overflow-hidden with no indication, at every viewport. It now
binary-searches the number of rows that fit and says how many are not shown.
The count is searched rather than divided out of an assumed row height, because
a long detail line wraps to two lines and no constant knows that. It runs from
a ResizeObserver rather than once: measuring at call time reads a stale
clientHeight, since the pane has only just become visible and Chart.js resizes
its siblings 40 ms later, which fitted 13 rows into a box that holds 10.

Also: denser learner and attribution rows on short screens, three precipitation
coefficients instead of four, and a lower floor on the tendency chart.

Two mistakes of mine on the way, both worth recording. I declared a second
const rows inside loadModels, which is a parse error that killed the entire
dashboard script; the audit reported it as a flood of sparkline layout faults
because it was not listening for page errors, and it now fails loudly on them.
And the min-height override did nothing at first because the Tailwind CDN
injects its sheet after this style block, so min-h-[42px] won at equal
specificity.

Verified: 20 theme x viewport combinations, 120 tab renders, from 1920x1080 to
375x667 in both themes. Zero card overflow, zero horizontal overflow, zero
console errors.
2026-08-16 17:53:59 +01:00
..