Files
html/api/audit-v5-overlap-real.js
Opus e4dae78b03
Some checks failed
WEVAL NonReg / nonreg (push) Has been cancelled
phase37 doctrine 175 consolidation 12 doublons + 45 pages UX total
Livrables:
- Registry doublons v2/v3 cree: /var/www/html/wtp-doublons-registry.json
  - 12 paires analysees
  - Stats: 2 orphan, 1 v_canonical, 3 base_canonical, 6 mixed

- Archive 3 doublons obsoletes (safe):
  - admin-v2.html (base admin.html + recent + plus gros)
  - l99-v2.html (base l99.html plus recent)
  - wevia-apple-v3.html (base wevia-apple.html plus gros)
  Archive dir: /var/www/html/archive/doublons-obsolete-20260424/
  GOLD backups crees avant move

- 3 base pages enrichies doctrine 60 UX via cascade Cerebras:
  - admin.html
  - l99.html
  - wevia-apple.html

Total session Opus:
- 45 pages UX doctrine 60 (40 + WTP + 3 bases + orphans)
- 34 tags Opus push dual
- 22 doctrines vault (146-175)
- 3 doublons consolidés

6 paires Mixed signals restent - review manuel/WEVIA si besoin.
Train multi-Claude actif: wave 311 multichat + wave 312 plan-execute + phase36 dashboards.
NR 153/153 invariant.
2026-04-24 12:40:35 +02:00

78 lines
3.7 KiB
JavaScript

// Doctrine 177: Audit v5 - detect REAL overlaps (rects intersect), not just count
const { chromium } = require('playwright');
const fs = require('fs');
const { execSync } = require('child_process');
const TS = new Date().toISOString().replace(/[:.]/g, '-').slice(0, 19);
const OUT = `/var/www/html/proofs/wevia-ux-v5-real-${TS}`;
fs.mkdirSync(`${OUT}/zooms`, { recursive: true });
const enriched = execSync(`grep -l "DOCTRINE-60-UX-ENRICH" /var/www/html/*.html /var/www/html/*.php 2>/dev/null`).toString().trim().split('\n')
.map(p => p.replace('/var/www/html/', '')).filter(n => n.length).slice(0, 12);
(async () => {
const browser = await chromium.launch({ headless: true, args: ['--no-sandbox','--disable-gpu','--disable-dev-shm-usage'] });
const results = [];
for (const name of enriched) {
let ctx;
try {
ctx = await browser.newContext({ viewport: { width: 1440, height: 900 } });
const pg = await ctx.newPage();
const clean = name.replace(/\.(html|php)$/,'');
await pg.goto(`https://weval-consulting.com/${name}`, { waitUntil: 'domcontentloaded', timeout: 12000 });
await pg.waitForTimeout(1200);
await pg.screenshot({ path: `${OUT}/zooms/${clean}-tr.png`, clip: { x: 1040, y: 0, width: 400, height: 400 } });
await pg.screenshot({ path: `${OUT}/zooms/${clean}-br.png`, clip: { x: 1040, y: 500, width: 400, height: 400 } });
const overlaps = await pg.evaluate(() => {
const findFixed = () => {
const all = document.querySelectorAll('*');
const fixed = [];
for (const el of all) {
const cs = getComputedStyle(el);
if (cs.position !== 'fixed' && cs.position !== 'absolute') continue;
const r = el.getBoundingClientRect();
if (r.width < 8 || r.height < 8 || r.width > 1300 || r.height > 800) continue;
// Seulement ceux qui sont réellement positionnés dans un coin
const isTR = r.left > 800 && r.top < 150;
const isBR = r.right > 800 && r.bottom > 650;
const isBL = r.left < 150 && r.bottom > 650;
const isTL = r.left < 150 && r.top < 150;
if (!(isTR || isBR || isBL || isTL)) continue;
fixed.push({
x: Math.round(r.x), y: Math.round(r.y),
w: Math.round(r.width), h: Math.round(r.height),
r: Math.round(r.right), b: Math.round(r.bottom),
pos: isTR ? 'TR' : isBR ? 'BR' : isBL ? 'BL' : 'TL',
tag: el.tagName, cls: (el.className||'').toString().slice(0,40)
});
}
// Detect intersections (real overlap)
const overlapping = [];
for (let i = 0; i < fixed.length; i++) {
for (let j = i+1; j < fixed.length; j++) {
const a = fixed[i], b = fixed[j];
if (a.pos !== b.pos) continue;
const overlapX = Math.max(0, Math.min(a.r, b.r) - Math.max(a.x, b.x));
const overlapY = Math.max(0, Math.min(a.b, b.b) - Math.max(a.y, b.y));
if (overlapX > 5 && overlapY > 5) {
overlapping.push({ a: a.cls||a.tag, b: b.cls||b.tag, pos: a.pos, overlapX, overlapY });
}
}
}
return { fixed_count: fixed.length, real_overlaps: overlapping };
};
return findFixed();
});
results.push({
hub: clean,
fixed_elements: overlaps.fixed_count,
real_overlaps_count: overlaps.real_overlaps.length,
overlaps: overlaps.real_overlaps,
ok: true
});
await pg.close();
await ctx.close();
} catch (e) {
results.push({ hub: name, error: e.message.slice(0,100) });
try { await c