-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
feat(perps): show alert when user gets disconnected #24318
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
base: main
Are you sure you want to change the base?
Conversation
|
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
- Create PerpsWebSocketHealthToast component with slide-from-top animation - Show connection states: disconnected (error), connecting (warning), connected (success) - Position toast at top of screen (74px from top) with solid background and shadow - Update useWebSocketHealthToast hook to return state for custom toast rendering - Remove websocketHealth options from usePerpsToasts (no longer needed) - Update PerpsStreamBridge to render the custom toast component
- Add reconnect() method to HyperLiquidClientService, Provider, and Controller - Show Retry button on toast when connection is disconnected - Update toast positioning to 12px from left/right edges - Update copy: title, description, and button text per design specs
- Limit auto-reconnection to 10 attempts before marking as disconnected - Reset attempt counter when user manually clicks Retry button - Allows user to always retry even after max attempts reached
…sitioning - Create WebSocketHealthToastContext for managing toast state globally - Render PerpsWebSocketHealthToast at App level next to existing Toast - Update useWebSocketHealthToast hook to use context instead of local state - Remove toast rendering from PerpsStreamBridge (now uses context) - Ensures toast appears on top of all content regardless of where useWebSocketHealthToast is called
…ached - Update condition to show disconnected toast when transitioning from CONNECTING to DISCONNECTED (max attempts reached case) - Previously only showed toast for direct CONNECTED to DISCONNECTED transition
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsThis PR introduces WebSocket connection health monitoring and toast notifications specifically for the Perps (perpetuals trading) feature. The changes include:
All changes are contained within the Perps feature domain. The E2E tests in e2e/specs/perps/ directory use the SmokePerps tag and should verify that the Perps functionality still works correctly with these WebSocket health monitoring changes. No other features are affected by these changes. |
Description
Changelog
CHANGELOG entry:
Related issues
Fixes:
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist