mirror of
https://github.com/johndoe6345789/docker-swarm-termina.git
synced 2026-04-26 14:45:02 +00:00
Frontend changes (TerminalModal.tsx): - Added fallback state tracking (interactiveFailed, fallbackReason) - Implemented fallbackToSimpleMode() function for automatic mode switching - Added connection attempt tracking to prevent infinite retry loops - Enhanced WebSocket error handling: * Detects connection errors (connect_error event) * Falls back after 2 failed connection attempts * Identifies critical errors (auth, Docker connection failures) * Handles unexpected disconnections (transport errors) - Added prominent notification system: * Snackbar alert appears at top-center when fallback occurs * Displays reason for fallback to user * Includes "Retry" button for easy reconnection attempt * Auto-dismisses after 10 seconds - Visual feedback in mode toggle: * Interactive button shows warning icon when failed * Orange color indicates failure state * Tooltip updates to show failure and retry option - Smart retry functionality: * Resets failure state and connection attempts * Clears error messages on retry * Can be triggered via notification button or toggle switch User experience improvements: - No silent failures - users always know why Interactive mode didn't work - One-click retry makes recovering from transient errors easy - Automatic fallback ensures terminal always works (degrades gracefully) - Clear visual indicators prevent confusion about current mode state https://claude.ai/code/session_01UFVy14uUD5Q7DjkUSgUFXC