diff --git a/api/blade-tasks/task_20260420131619_50c112.json b/api/blade-tasks/task_20260420131619_50c112.json index 3f3b48ca4..5c4bc211c 100644 --- a/api/blade-tasks/task_20260420131619_50c112.json +++ b/api/blade-tasks/task_20260420131619_50c112.json @@ -5,7 +5,8 @@ "command": "python3 \/tmp\/v92_selenium_biz.py", "cmd": "python3 \/tmp\/v92_selenium_biz.py", "priority": "high", - "status": "pending", + "status": "dispatched", "created": "2026-04-20T13:16:19+00:00", - "created_by": "blade-control-ui" + "created_by": "blade-control-ui", + "dispatched_at": "2026-04-20T13:16:29+00:00" } \ No newline at end of file diff --git a/api/blade-tasks/task_20260420131705_b1068d.json b/api/blade-tasks/task_20260420131705_b1068d.json new file mode 100644 index 000000000..5e6413cfa --- /dev/null +++ b/api/blade-tasks/task_20260420131705_b1068d.json @@ -0,0 +1,12 @@ +{ + "id": "task_20260420131705_b1068d", + "name": "V92 WEVIA Business Scenario authed Chrome", + "type": "powershell", + "command": "# V92 WEVIA Business Scenario Test - opens tabs in authenticated Chrome session\n$urls = @(\n 'https:\/\/weval-consulting.com\/weval-technology-platform.html',\n 'https:\/\/weval-consulting.com\/wevia-em-big4.html',\n 'https:\/\/weval-consulting.com\/enterprise-model.html',\n 'https:\/\/weval-consulting.com\/business-kpi-dashboard.php',\n 'https:\/\/weval-consulting.com\/wevia-master.html',\n 'https:\/\/weval-consulting.com\/wevia-admin-crm.php'\n)\nforeach ($u in $urls) {\n Start-Process chrome -ArgumentList $u\n Start-Sleep -Seconds 2\n}\nNew-BurntToastNotification -Text 'WEVIA V92', 'Business scenario 6 tabs opened auth Chrome' -ErrorAction SilentlyContinue\nWrite-Host \"V92 scenario started at $(Get-Date)\"", + "cmd": "# V92 WEVIA Business Scenario Test - opens tabs in authenticated Chrome session\n$urls = @(\n 'https:\/\/weval-consulting.com\/weval-technology-platform.html',\n 'https:\/\/weval-consulting.com\/wevia-em-big4.html',\n 'https:\/\/weval-consulting.com\/enterprise-model.html',\n 'https:\/\/weval-consulting.com\/business-kpi-dashboard.php',\n 'https:\/\/weval-consulting.com\/wevia-master.html',\n 'https:\/\/weval-consulting.com\/wevia-admin-crm.php'\n)\nforeach ($u in $urls) {\n Start-Process chrome -ArgumentList $u\n Start-Sleep -Seconds 2\n}\nNew-BurntToastNotification -Text 'WEVIA V92', 'Business scenario 6 tabs opened auth Chrome' -ErrorAction SilentlyContinue\nWrite-Host \"V92 scenario started at $(Get-Date)\"", + "priority": "high", + "status": "dispatched", + "created": "2026-04-20T13:17:05+00:00", + "created_by": "blade-control-ui", + "dispatched_at": "2026-04-20T13:17:06+00:00" +} \ No newline at end of file diff --git a/api/blade-tasks/task_v92_em_verify_20260420.json b/api/blade-tasks/task_v92_em_verify_20260420.json new file mode 100644 index 000000000..1bf83cf30 --- /dev/null +++ b/api/blade-tasks/task_v92_em_verify_20260420.json @@ -0,0 +1,36 @@ +{ + "id": "v92_em_verify_20260420_1518", + "created_at": "2026-04-20T15:18:00+02:00", + "status": "dispatched", + "type": "playwright_e2e", + "title": "V92 E2E Enterprise Model + Big4 post-fix V91", + "description": "Selenium Chrome Blade validation enterprise-model.html TDZ fix V91. Prendre screenshots + v\u00e9rifier dots\/agents rendus via canvas (pas DOM).", + "steps": [ + { + "name": "goto_enterprise_model", + "url": "https:\/\/weval-consulting.com\/enterprise-model.html", + "wait_ms": 8000 + }, + { + "name": "screenshot_em", + "path": "v92_enterprise_model_post_fix.png" + }, + { + "name": "goto_em_big4", + "url": "https:\/\/weval-consulting.com\/wevia-em-big4.html", + "wait_ms": 8000 + }, + { + "name": "screenshot_big4", + "path": "v92_em_big4_post_fix.png" + } + ], + "ctq": { + "em_no_js_error": true, + "em_canvas_visible": true, + "big4_authed_visible": "auth required" + }, + "priority": "high", + "source": "opus_v92", + "dispatched_at": "2026-04-20T13:17:51+00:00" +} \ No newline at end of file diff --git a/api/playwright-results/v98-linkedin-publish/session-check.png b/api/playwright-results/v98-linkedin-publish/session-check.png new file mode 100644 index 000000000..037653df7 Binary files /dev/null and b/api/playwright-results/v98-linkedin-publish/session-check.png differ diff --git a/api/playwright-v92-canvas-check.json b/api/playwright-v92-canvas-check.json new file mode 100644 index 000000000..334f82c2a --- /dev/null +++ b/api/playwright-v92-canvas-check.json @@ -0,0 +1,19 @@ +{ + "ts": "2026-04-20T13:18:22.887Z", + "test": "V92 Canvas + AG/DP runtime validation", + "diag": { + "canvasInfo": { + "width": 3840, + "height": 14578, + "hasContext": true, + "hasPixels": 10000 + }, + "agState": { + "AG_exists": true, + "AG_length": 739, + "DP_exists": true, + "DP_length": 27 + } + }, + "js_errors": [] +} \ No newline at end of file diff --git a/api/v83-business-kpi-latest.json b/api/v83-business-kpi-latest.json index 93a9a24db..a0246a103 100644 --- a/api/v83-business-kpi-latest.json +++ b/api/v83-business-kpi-latest.json @@ -1,7 +1,7 @@ { "ok": true, "version": "V83-business-kpi", - "ts": "2026-04-20T13:15:16+00:00", + "ts": "2026-04-20T13:18:39+00:00", "summary": { "total_categories": 7, "total_kpis": 56, diff --git a/api/v92_canvas_check.js b/api/v92_canvas_check.js new file mode 100644 index 000000000..fa404b611 --- /dev/null +++ b/api/v92_canvas_check.js @@ -0,0 +1,71 @@ +const { chromium } = require('playwright'); +const fs = require('fs'); + +(async () => { + const browser = await chromium.launch({ headless: true }); + const ctx = await browser.newContext({ + viewport: { width: 1920, height: 1080 }, + recordVideo: { dir: '/tmp/v92-videos/' } + }); + const page = await ctx.newPage(); + await page.addInitScript(() => { + try { localStorage.setItem('weval_internal', 'yacine-2026'); } catch(e){} + }); + + const errs = []; + page.on('pageerror', e => errs.push(e.message)); + page.on('console', m => { if (m.type() === 'error') errs.push(`console: ${m.text().substring(0,150)}`); }); + + // Test enterprise-model POST V91 fix + await page.goto('https://weval-consulting.com/enterprise-model.html', { waitUntil: 'load', timeout: 30000 }); + await page.waitForTimeout(8000); // Wait for canvas animation to fully initialize + + const diag = await page.evaluate(() => { + // Check actual canvas content & AG/DP runtime state + const canvas = document.querySelector('canvas'); + let canvasInfo = null; + if (canvas) { + canvasInfo = { + width: canvas.width, + height: canvas.height, + hasContext: !!canvas.getContext('2d'), + // Check if canvas has drawn pixels (not all transparent) + hasPixels: (() => { + try { + const ctx = canvas.getContext('2d'); + const data = ctx.getImageData(0, 0, Math.min(canvas.width, 100), Math.min(canvas.height, 100)).data; + let nonTransparent = 0; + for (let i = 3; i < data.length; i += 4) { + if (data[i] > 0) nonTransparent++; + } + return nonTransparent; + } catch(e) { return 'err:' + e.message; } + })() + }; + } + + // Access global AG + DP + const agState = { + AG_exists: typeof AG !== 'undefined', + AG_length: typeof AG !== 'undefined' ? AG.length : 0, + DP_exists: typeof DP !== 'undefined', + DP_length: typeof DP !== 'undefined' ? DP.length : 0, + }; + + return { canvasInfo, agState }; + }); + + await page.screenshot({ path: '/tmp/v92-enterprise-model-full.png', fullPage: true }); + + await ctx.close(); + await browser.close(); + + const result = { + ts: new Date().toISOString(), + test: 'V92 Canvas + AG/DP runtime validation', + diag, + js_errors: errs.slice(0, 5), + }; + fs.writeFileSync('/var/www/html/api/playwright-v92-canvas-check.json', JSON.stringify(result, null, 2)); + console.log(JSON.stringify(result, null, 2)); +})(); diff --git a/api/v98-linkedin-browser.php b/api/v98-linkedin-browser.php new file mode 100644 index 000000000..ddb5de073 --- /dev/null +++ b/api/v98-linkedin-browser.php @@ -0,0 +1,56 @@ +&1"); + $data = @json_decode(trim($out), true); + echo json_encode($data ?: ['ok' => false, 'raw' => substr($out, 0, 500)], JSON_PRETTY_PRINT); + break; + +case 'publish_due': + // Runs full scheduled queue through browser + $out = shell_exec("cd /tmp && timeout 180 python3 $script publish_due 2>&1"); + $data = @json_decode(trim($out), true); + echo json_encode($data ?: ['ok' => false, 'raw' => substr($out, 0, 500)], JSON_PRETTY_PRINT); + break; + +case 'publish_id': + $id = escapeshellarg($_GET['id'] ?? $_POST['id'] ?? ''); + $out = shell_exec("cd /tmp && timeout 90 python3 $script publish_id $id 2>&1"); + $data = @json_decode(trim($out), true); + echo json_encode($data ?: ['ok' => false, 'raw' => substr($out, 0, 500)], JSON_PRETTY_PRINT); + break; + +case 'session_status': + // Check if persistent Chromium context has valid LinkedIn session + $cookies_file = "$session_dir/Default/Cookies"; + $exists = file_exists($cookies_file); + $size = $exists ? filesize($cookies_file) : 0; + $mtime = $exists ? filemtime($cookies_file) : 0; + echo json_encode([ + 'session_exists' => $exists, + 'cookies_file' => $cookies_file, + 'size_bytes' => $size, + 'last_update' => $mtime ? date('c', $mtime) : null, + 'age_hours' => $mtime ? round((time() - $mtime) / 3600, 1) : null, + 'instructions' => !$exists ? 'One-time login: run /api/v98-linkedin-browser.php?action=init_session on a server with display OR visit from your logged-in browser to feed cookies' : 'Session ready', + ], JSON_PRETTY_PRINT); + break; + +case 'log': + $tail = @shell_exec('tail -50 /var/log/v98-linkedin-browser.log 2>/dev/null') ?: ''; + echo json_encode(['log' => $tail], JSON_PRETTY_PRINT); + break; + +default: + echo json_encode(['err' => 'unknown', 'available' => ['check_session', 'publish_due', 'publish_id', 'session_status', 'log']]); +}