mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-16 12:00:43 +00:00
Make the Control UI installable as a Progressive Web App and add Web Push notification infrastructure so the gateway can send browser notifications to subscribed clients. PWA shell: - Add manifest.webmanifest with app name, icons, standalone display - Add service worker with cache-first for hashed assets, network-first for HTML/API, push event handler, and notification click focus - Register service worker from main.ts - Serve .webmanifest with correct content type from gateway - Add worker-src 'self' to CSP Web Push server (src/infra/push-web.ts): - VAPID key auto-generation and persistence to state dir - Subscription CRUD with async-locked atomic JSON storage - Send and broadcast via web-push library - Mirrors push-apns.ts patterns Gateway RPC (4 new methods): - push.web.vapidPublicKey: returns VAPID public key for PushManager - push.web.subscribe: registers browser push subscription - push.web.unsubscribe: removes subscription by endpoint - push.web.test: broadcasts test notification to all subscribers Client-side push manager (ui/src/ui/push-subscription.ts): - Permission request, VAPID key fetch, PushManager subscribe/unsubscribe - Gateway RPC wiring for registration and test Settings UI: - New "Notifications" virtual section in Communications tab - Shows browser support, permission state, subscription status - Subscribe/unsubscribe/test buttons Includes 10 unit tests for push-web subscription CRUD and VAPID keys.