-
-
Notifications
You must be signed in to change notification settings - Fork 8
fix: add automatic WebSocket reconnection for Run of Show viewer #114
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Resolves persistent WebSocket connection failures with robust reconnection logic. Changes: - Add useRealtimeSubscription hook with exponential backoff retry strategy - Configurable retry attempts (default: 10) and delays (1s → 30s max) - Proper channel cleanup before reconnect attempts - Jitter to prevent thundering herd problem - Update SharedShowModePage to use new hook instead of manual subscription - Add real-time connection status indicator UI: - Live (green) - Connected and receiving updates - Connecting (blue) - Initial connection attempt - Reconnecting (yellow) - Auto-retry in progress with attempt count - Offline (gray) - Disconnected - Connection failed (red) - Max retries exceeded with manual retry button Before: WebSocket fails → terminal error → manual page refresh required After: WebSocket fails → automatic reconnection with visual feedback 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
✅ Deploy Preview for sounddocsbeta ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
PR Compliance Guide 🔍Below is a summary of compliance checks for this PR:
Compliance status legend🟢 - Fully Compliant🟡 - Partial Compliant 🔴 - Not Compliant ⚪ - Requires Further Human Verification 🏷️ - Compliance label |
||||||||||||||||||
CI Feedback 🧐(Feedback updated until commit 977c101)A test triggered by this PR failed. Here is an AI-generated analysis of the failure:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
|||||||||
User description
Resolves persistent WebSocket connection failures with robust reconnection logic.
Changes:
Before: WebSocket fails → terminal error → manual page refresh required
After: WebSocket fails → automatic reconnection with visual feedback
🤖 Generated with Claude Code
PR Type
Bug fix, Enhancement
Description
Add robust WebSocket reconnection with exponential backoff
Replace manual subscription with reusable hook
Add real-time connection status indicator
Implement automatic retry with visual feedback
Diagram Walkthrough
File Walkthrough
useRealtimeSubscription.ts
Add robust real-time subscription hookapps/web/src/hooks/useRealtimeSubscription.ts
SharedShowModePage.tsx
Integrate reconnection hook and status UIapps/web/src/pages/SharedShowModePage.tsx