fix(release): draw the corpus audit card opaque and gate on it
Quality gates / quality (push) Successful in 12m37s
Quality gates / quality (push) Successful in 12m37s
The first recording of the card was legible but translucent, so the bottom nav and the journal's body copy ghosted through its empty lower rows. The card is now fully opaque and the on-screen proof rejects a background with any alpha, so a future edit cannot reintroduce the bleed unnoticed.
This commit is contained in:
1 parent
1d338ed35b
commit
fa5f4232dd
1 file changed
+8
-3
@@ -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)}`);
|
||||
|
||||
Reference in new issue
Block a user