Opus eab055012d fix(web-ia-health w331): UI vide+flou cause API timeout - 3 fixes
CAUSE RACINE (Yacine capture 19:51):
- Page web-ia-health.html UI vide + apparait flou
- Cause: /api/web-ia-health.php TIMEOUT 8s+ (build complet)
- JS frontend bloque sur fetch sans timeout = render figé = effet flou
- Tasks 24h chart vide + Recent Tasks 0 (no API tasks-feed)
- 8 vraies tasks dans /tmp/wevia-job-*.log mais jamais exposees

FIX wave 331 - 3 endpoints+patches:

1. /api/web-ia-health-cached.php NEW (wrapper cache 30s)
   - Sert version cachee si <30s, evite rebuild lourd
   - Fallback stale cache si timeout
   - Hard fallback minimal si rien

2. /api/tasks-feed.php NEW (vraies tasks)
   - Lit /tmp/wevia-job-*.log dernieres 10
   - Detecte status: done/failed/pending depuis content
   - Extrait title intelligent (=== WEVIA GENERATE / Prompt:)
   - Build timeline_24h pour Chart.js (24 buckets done/failed/pending)
   - Summary counters total/done/failed/pending

3. JS w331-tasks-poller dans web-ia-health.html
   - Fetch /api/tasks-feed.php every 15s avec AbortController 5s
   - Update Recent Tasks list (10 cards)
   - Update Tasks 24h chart Chart.js (stacked bar)
   - Update topbar counter Tasks: X done Y failed
   - Switch /api/web-ia-health.php -> /api/web-ia-health-cached.php

Result attendu apres refresh:
- Page repond instantanement (cache 30s)
- Recent Tasks affiche 10 vraies tasks colorees
- Chart 24h peuple avec donnees reelles
- Topbar Tasks counter live (8 done par exemple)
- Plus de flou (pas de blocage JS sur fetch)

Zero regression (additive endpoints + JS additif)
chattr +i toggle, GOLD backup
CF purge 3 URLs
2026-04-24 20:55:21 +02:00
2026-04-23 22:15:04 +02:00
2026-04-24 05:00:12 +02:00
2026-04-24 03:05:04 +02:00
2026-04-24 03:00:11 +02:00
2026-04-24 02:30:07 +02:00
2026-04-24 03:00:11 +02:00
Description
No description provided
4.4 GiB
Languages
HTML 56.8%
PHP 28.8%
JavaScript 6.1%
Shell 5.6%
Python 2.2%
Other 0.5%