Point the filter-width gate at pages that exist, and make it say so when they do not

check:filter-width was failing on both hosts with "UNMEASURED: no
.filter-dropdown__trigger found in the composed tree" and "no tab matched
/dashboard-plus-grid/i". Neither was true of the product. Both paths ended in a
trailing slash — directory URLs — and `bun run serve` is serve-strict.mjs, which
404s a directory with no index fallback because the live static layer does. A
404 page has no trigger and no tab rail, so a missing PAGE was reported as two
missing FEATURES. Measured: both directory URLs return 404, both index.html URLs
return 200.

Now passes in both hosts, and what it reports is the Driver's fixed-width
decision holding: all eight triggers at 168px before and after selecting the
longest option, identical in the standalone dashboard and inside the cap-5
studio.

Two things were checked rather than assumed. The tab regex looked like a second
bug — the rail labels tabs "Big Picture", not by bundle id — but the studio also
renders a developer row reading "dashboard-plus-grid<dashboard-plus-grid>", so
/dashboard-plus-grid/i correctly matches tab 3. Single cause, not two. And the
trigger class the gate looks for does exist (FilterDropdown.vue:278), which is
what made "the page is wrong" the remaining explanation.

Also adds a response check before any content assertion, so this failure mode
cannot recur silently. Negative-tested by pointing it at a nonexistent page: it
now fails with "UNMEASURED: HTTP 404 for /research-dashboard/NO-SUCH-PAGE/
index.html — nothing below this means anything", which names the cause instead
of describing a symptom.

Worth recording why this survived: one tick earlier I swept for directory URLs
and reported the class closed. That sweep grepped for goto(`${BASE}...`) as a
template literal, and this file builds its URL as BASE + path by concatenation,
so the pattern could not match it. A sweep is only as wide as its pattern. The
re-sweep looked instead for any goto whose URL lacks ".html" — a property of the
RESULT rather than of the syntax — and found this one plus nothing else among
the static-tree gates. The BASE + '/' users in smoke-studio, smoke and
check-scrim target the vite dev server on 5173, which does resolve directories,
so they are correct as written.
This commit is contained in:
doxa-maps-88655c70 2026-09-23 10:03:03 +00:00
parent 2fdfee37ac
commit c7029aaa55

View file

@ -71,14 +71,36 @@ async function measure(page, label, activateTab) {
}
const browser = await chromium.launch()
// ★ EXPLICIT index.html, never a trailing slash (fixed 2026-09-23). `bun run serve` is
// serve-strict.mjs, which 404s a DIRECTORY request with no index fallback because the live static
// layer does. Both paths here ended in '/', so both loaded a 404 page — and a 404 page has no
// .filter-dropdown__trigger and no .vtl-tab, so the gate reported "UNMEASURED: no
// .filter-dropdown__trigger found in the composed tree" and "no tab matched /dashboard-plus-grid/i".
// Those read as missing FEATURES; they were a missing PAGE. Measured: both directory URLs return
// 404, both index.html URLs return 200.
//
// This survived a sweep that declared the class closed one tick earlier, because that sweep
// grepped for goto(`${BASE}...`) with a template literal and this file builds the URL as
// `BASE + path` string concatenation. A sweep is only as wide as its pattern — the re-sweep looked
// for any goto whose URL lacks '.html', which is a property of the RESULT rather than of the syntax.
//
// The tab regex was checked rather than assumed guilty: the studio renders a developer row reading
// "🔗dashboard-plus-grid<dashboard-plus-grid>", so /dashboard-plus-grid/i correctly matches tab #3.
// Single cause, not two.
const hosts = []
for (const [label, path, tab] of [
['STANDALONE research-dashboard', '/research-dashboard/research-dashboard/', null],
['INSIDE cap-5 plugin-studio', '/plugin-studio/plugin-studio/', '/dashboard-plus-grid/i'],
['STANDALONE research-dashboard', '/research-dashboard/research-dashboard/index.html', null],
['INSIDE cap-5 plugin-studio', '/plugin-studio/plugin-studio/index.html', '/dashboard-plus-grid/i'],
]) {
const page = await browser.newPage({ viewport: { width: 1600, height: 900 } })
try {
await page.goto(BASE + path, { waitUntil: 'load', timeout: 45000 })
const res = await page.goto(BASE + path, { waitUntil: 'load', timeout: 45000 })
// ASSERT THE RESPONSE BEFORE ASSERTING CONTENT, so a missing page can never again be reported
// as a missing feature.
if (!res || res.status() !== 200) {
hosts.push({ label, error: `HTTP ${res ? res.status() : 'no response'} for ${path} — nothing below this means anything` })
await page.close(); continue
}
await page.waitForTimeout(7000)
hosts.push(await measure(page, label, tab))
} catch (e) {