Web: Add connection failure banner#176
Merged
Merged
Conversation
Owner
SloMR
commented
Apr 5, 2026
- Shows a warning banner when peer-to-peer connections are lost for over 5 seconds.
- Disables the send button and file attachment options when no peers are connected.
- Adds English and Arabic translations for troubleshooting network issues.
- Includes UI buttons to refresh the page or dismiss the warning banner.
- Tracks peer connection states in real-time to provide immediate feedback.
Contributor
There was a problem hiding this comment.
Pull request overview
Adds user-facing connection-loss feedback to the web chat UI by tracking peer connection state changes and surfacing a warning banner + disabling message/file actions when peers aren’t connected.
Changes:
- Introduces a 5s disconnect threshold and UI banner for prolonged peer connection loss (with refresh/dismiss actions).
- Disables send, attachments, emoji picker, and per-member file send actions when peers aren’t connected.
- Adds EN/AR i18n strings for connection troubleshooting messaging.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| client/web/src/app/utils/constants.ts | Adds a 5s connection warning threshold constant. |
| client/web/src/app/features/chat/chat.component.ts | Tracks peer connect/disconnect events and drives warning + send-disabled state. |
| client/web/src/app/features/chat/chat.component.html | Renders warning banner and disables relevant UI controls when disconnected. |
| client/web/src/app/core/services/communication/webrtc.service.ts | Exposes peer connect/disconnect streams from signaling service. |
| client/web/src/app/core/services/communication/webrtc-signaling.service.ts | Emits connect/disconnect events based on RTCPeerConnection state. |
| client/web/src/app/core/i18n/localizations/en.json | Adds connection warning translations (EN). |
| client/web/src/app/core/i18n/localizations/ar.json | Adds connection warning translations (AR). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Shows a warning banner when peer-to-peer connections are lost for over 5 seconds. - Disables the send button and file attachment options when no peers are connected. - Adds English and Arabic translations for troubleshooting network issues. - Includes UI buttons to refresh the page or dismiss the warning banner. - Tracks peer connection states in real-time to provide immediate feedback.
1b1ef60 to
290664b
Compare
- Ignore stale data channel events, preventing unnecessary actions. - Add checks for connection and disconnection processes to avoid redundant peer reconnections.
- Automatically hides connection warnings when all peers connect successfully.
- Refactor and simplify connection status timeout handling. - Improve management of connection warning delays with more precise control. - Improve user notification for connection status, aiming for better UX.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.