P4-C: PWA installable, service worker push & campagne de fiabilité dialogues

- PWA: public/manifest.webmanifest + icon.svg + meta index.html (theme-color, apple-touch-icon)
- public/sw.js: service worker push-only (push → showNotification tag=sessionId ;
  notificationclick → focus/ouvre /sessions/<id>) — pas de précache (hors périmètre)
- lib/push.ts + stores/push.ts: enable/disable, abonnement VAPID, enregistrement SW au boot
- DashboardView: toggle « Notifications » (gardé par pushSupported) + i18n en/fr
- campagne de fiabilité (verdict S3): classification de tous les types de dialogue sur captures
  réelles (trust/permission×2/question) + refus Esc (deny-esc2) + plan (synthétique)
- acceptance-p4.mjs: VAPID/auth/Origin, subscribe idempotent/unsubscribe, answer (rejets)

Choix: SW écrit à la main plutôt que vite-plugin-pwa (qui tirait ~295 paquets Workbox +
2 vulns esbuild high pour un SW push-only). Zéro dépendance front nouvelle. 175 tests verts,
acceptance p1..p4 ALL GREEN.
This commit is contained in:
2026-06-15 12:23:00 +02:00
parent 664e2b583c
commit 32e6ffba70
14 changed files with 505 additions and 1 deletions

View File

@@ -0,0 +1,18 @@
<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 512 512" role="img" aria-label="Arboretum">
<rect width="512" height="512" fill="#09090b"/>
<!-- arbre / branches (worktrees) — tracé dans la zone sûre maskable (~80% central) -->
<g fill="none" stroke="#34d399" stroke-width="22" stroke-linecap="round" stroke-linejoin="round">
<!-- tronc -->
<path d="M256 420 V232"/>
<!-- branche gauche -->
<path d="M256 300 L168 212"/>
<!-- branche droite -->
<path d="M256 268 L344 180"/>
</g>
<!-- nœuds (sessions) -->
<g fill="#34d399">
<circle cx="256" cy="156" r="34"/>
<circle cx="160" cy="196" r="26"/>
<circle cx="352" cy="164" r="26"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 727 B