Streamline join flow, error messaging, and client cleanup#18
Merged
Streamline join flow, error messaging, and client cleanup#18
Conversation
- Deleted PageTransition.tsx and related SCSS. - Centralized password validation errors in PasswordInput component. - Simplified MediaService and PeerService by removing redundant methods. - Streamlined usePasswordProtection and usePasswordVerification hooks. - Consolidated type definitions for Media and Peer connections.
- Clear video stream on unmount to prevent memory leaks. - Use type imports for PeerJS to optimize build size. - Cache camera devices in mediaService for reduced latency. - Optimize QR scan by caching canvas context per video element.
- Removed `useEffect` from `usePasswordVerification` in favor of `useCallback` for better performance. - Switched from direct state mutation to `useRef` for persistent variables like `tempPeerForVerification`. - Simplified password message handling with `handlePasswordMessage`. - Removed unnecessary `hostPeerId` parameter and validation logic for cleaner implementation. - Updated README with new badge placement for improved visibility.
- Removed redundant connection validation steps in diagrams. - Added spacing adjustments to README for better readability.
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.
Description
This PR removes the redundant pre-connection validation step and consolidates password message handling into a single flow during participant join to reduce latency and state complexity. It also cleans up UI error display, improves client resource handling (QR scan canvas reuse, video srcObject cleanup, device list caching), and updates architecture docs to reflect the current data flow.
Type of Change
Changes Made
Checklist