diff --git a/scripts/record_release_demo.mjs b/scripts/record_release_demo.mjs index ac9fb6f..0d61312 100644 --- a/scripts/record_release_demo.mjs +++ b/scripts/record_release_demo.mjs @@ -653,7 +653,7 @@ const panelOk = await page.evaluate(rows => { panel.id = 'corpus-audit'; Object.assign(panel.style, { position: 'fixed', inset: '96px 14px 40px 14px', zIndex: '15000', - background: 'rgba(24,20,18,.97)', color: '#f6f1e6', borderRadius: '18px', + background: '#181412', color: '#f6f1e6', borderRadius: '18px', border: '1px solid rgba(245,201,91,.45)', padding: '13px 13px 11px', font: '600 10.5px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace', display: 'flex', flexDirection: 'column', gap: '1px', overflow: 'hidden', @@ -689,11 +689,16 @@ const panelProof = await page.evaluate(() => { if (!panel) return { ok: false, reason: 'panel missing' }; const rect = panel.getBoundingClientRect(); const topmost = document.elementFromPoint(Math.round(rect.left + rect.width / 2), Math.round(rect.top + rect.height / 2)); + const background = getComputedStyle(panel).backgroundColor; + // A translucent card lets the nav bar and body copy ghost through its empty rows, which reads as a + // sloppy overlay on the thinnest part of the frame. The card must be fully opaque. + const opaque = !/^rgba\(.*,\s*(0?\.\d+|0)\)$/.test(background); return { - ok: rect.top >= 60 && rect.bottom <= window.innerHeight && rect.width > 300 && rect.height > 300 + ok: opaque && rect.top >= 60 && rect.bottom <= window.innerHeight && rect.width > 300 && rect.height > 300 && (topmost === panel || panel.contains(topmost)) && panel.scrollHeight <= panel.clientHeight + 1, top: Math.round(rect.top), height: Math.round(rect.height), width: Math.round(rect.width), - scroll: panel.scrollHeight, client: panel.clientHeight, covered: topmost === panel || panel.contains(topmost), + scroll: panel.scrollHeight, client: panel.clientHeight, background, opaque, + covered: topmost === panel || panel.contains(topmost), }; }); if (!panelProof.ok) throw new Error(`Corpus audit card is not fully readable on screen: ${JSON.stringify(panelProof)}`);