Add retry exhaustion callback to RecommendationService
Summary
Add user-facing callback when WebSocket reconnection attempts are exhausted
Background
During code review of !7 (merged), jean_gabriel suggested adding a user notification when max retry attempts are exhausted. Currently the service silently stops retrying after 5 attempts.
Requirements
- Add callback interface for retry exhaustion
- Allow UI components to register listeners
- Include retry count and last error in callback
- Provide user-friendly error message suggestions
Proposed API
recommendationService.onRetryExhausted((error, attemptCount) => {
// Show user notification
showToast('Unable to connect to recommendation service. Please check your connection.');
});
Acceptance Criteria
-
Callback interface defined -
UI hook implemented -
User notification shown -
Unit tests for callback behavior
Related Work
- Implemented in !7 (merged)
- Follow-up from code review discussion
Epic Context
mobile-section