forked from anomalyco/opencode
-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
Summary
Improve background handling to preserve session state and allow syncing when the app is in the background, ensuring users don't lose work and stay up-to-date.
Context
Currently, when WhisperCode goes to the background, there can be issues with:
- Losing session state
- Interrupted file syncing
- Missing server updates
- Connection drops
Better background handling would make the app more reliable and reduce friction for users who frequently switch between apps.
Goals
-
Preserve Session State
- Save current session context when backgrounded
- Restore seamlessly when returning to foreground
- Don't lose any in-progress work
-
Background Sync
- Continue syncing file changes when possible
- Update session status in background
- Queue actions that need to be sent to server
-
Better Reconnection
- Automatically reconnect to server when returning to foreground
- Handle network transitions gracefully (WiFi <-> Cellular)
- Don't require manual refresh
-
Background Tasks
- Complete any pending operations before suspension
- Save local changes to persist
- Handle iOS memory pressure gracefully
Technical Considerations
- Use iOS background task APIs (BGTaskScheduler, etc.)
- Implement proper state persistence
- Handle "nominal" background time efficiently
- Consider notification-based updates as alternative
Related
- Add server-driven push notifications via OpenCode plugin #5: Server-driven push notifications (complements background sync)
Labels
- enhancement
- reliability
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels