Summary
System notifications do not appear when a session completes or fails in the Android PWA. Chrome on Android rejects the web app's use of the Notification constructor and requires ServiceWorkerRegistration.showNotification().
Environment
- opencode version: 2.0.8
- Device: OnePlus 15
- OS: Android 16
- Browser: Chrome 153.0.0.0
- Terminal: Not applicable (standalone PWA)
- Shell: Not applicable (standalone PWA)
- Install/channel:
https://beta.opencode.ai, installed as a PWA
Reproduction
- Install
https://beta.opencode.ai as an Android PWA.
- Grant notification permission and enable opencode session notifications.
- Open the PWA from its home-screen icon.
- Start a session and switch to another Android app before it completes.
- Wait for the session to complete.
Expected Behavior
An Android system notification should appear when the session completes or fails. Selecting it should return to the corresponding opencode session.
Actual Behavior
No system notification appears.
The following values were confirmed through remote DevTools:
Notification.permission: granted
- Standalone display mode:
true
- Service-worker registration:
null
Calling the same notification API used by the web platform produces:
TypeError: Failed to construct 'Notification': Illegal constructor. Use ServiceWorkerRegistration.showNotification() instead.
The failure also reproduced during a controlled session-completion test while the PWA was in the background.
Additional Context
packages/app/src/runtime/platform/web.ts creates notifications with new Notification(...). Chrome on Android does not support this constructor and requires ServiceWorkerRegistration.showNotification().
The generated service worker also has no notificationclick handler, which is required to implement notification click behavior.
There is a separate service-worker installation failure on the current beta deployment:
Fetch API cannot load https://beta.opencode.ai/_assets/__vite-browser-external-2447137e-BvRk9kiK.js. SRI's integrity checks failed.
sw.js:1 Uncaught (in promise) TypeError: Failed to fetch. SRI's integrity checks failed.
The browser reported the resource's computed SHA-256 integrity as:
8swVqH0fwc8XDDvPqJf6xzG3/DAwdGgKhA+t9mMRYQQ=
Because the service worker is not currently registered, showNotification() could not be tested on this deployment.
Summary
System notifications do not appear when a session completes or fails in the Android PWA. Chrome on Android rejects the web app's use of the
Notificationconstructor and requiresServiceWorkerRegistration.showNotification().Environment
https://beta.opencode.ai, installed as a PWAReproduction
https://beta.opencode.aias an Android PWA.Expected Behavior
An Android system notification should appear when the session completes or fails. Selecting it should return to the corresponding opencode session.
Actual Behavior
No system notification appears.
The following values were confirmed through remote DevTools:
Notification.permission:grantedtruenullCalling the same notification API used by the web platform produces:
The failure also reproduced during a controlled session-completion test while the PWA was in the background.
Additional Context
packages/app/src/runtime/platform/web.tscreates notifications withnew Notification(...). Chrome on Android does not support this constructor and requiresServiceWorkerRegistration.showNotification().The generated service worker also has no
notificationclickhandler, which is required to implement notification click behavior.There is a separate service-worker installation failure on the current beta deployment:
The browser reported the resource's computed SHA-256 integrity as:
Because the service worker is not currently registered,
showNotification()could not be tested on this deployment.