forked from anomalyco/opencode
-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
Summary
Implement server-driven push notifications via an OpenCode server plugin integration to enable reliable background notifications.
Context
Currently, WhisperCode has in-app notification support that fires when:
- A session completes (agent turn done)
- An error occurs
However, mobile background notifications are unreliable - the app may be killed or in background mode, causing notifications to be missed. Users have requested more reliable notification delivery.
Problem
- iOS/Android background push notifications are not consistently delivered
- App must be in foreground or recently active to show notifications
- Users miss important events when the app is not running
Proposed Solution
Create a server-side plugin for OpenCode that can send push notifications through a notification service:
-
Server Plugin - Create an OpenCode server plugin that:
- Listens for session events (completion, errors, etc.)
- Sends push notifications to the mobile app via a push service (APNs for iOS, FCM for Android)
- Supports customizable notification preferences per user
-
Push Service Integration:
- Integrate with APNs (Apple Push Notification service) for iOS
- Integrate with FCM (Firebase Cloud Messaging) for Android (future)
- Or use a third-party service like OneSignal, Pushwoosh, etc.
-
Mobile App Changes:
- Register for push notifications on app launch
- Handle push payload to navigate to relevant session/project
- Allow users to configure which events trigger notifications
Technical Considerations
- The app already has a notification context (
useNotification) that tracks session events - The OpenCode plugin system has event hooks like
event,session.idle,session.error - Server needs to store device tokens for each user
- Consider encryption for sensitive notification payloads
- Need to handle notification permission flow on iOS
Scope
- Design server plugin architecture for notification delivery
- Research and choose push notification provider (native vs third-party)
- Implement server-side plugin code
- Update iOS app to register for and handle remote notifications
- Add settings UI for notification preferences
Related Features
This complements the existing in-app notification system - it doesn't replace it, but provides reliability when the app is in the background.
Labels
- enhancement
- infrastructure
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels