-
-
Notifications
You must be signed in to change notification settings - Fork 8.6k
[grid] UI Liveview disconnect noVNC websocket when closing dialog #14598
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
Signed-off-by: Viet Nguyen Duc <[email protected]>
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
CI Failure Feedback 🧐(Checks updated until commit 5295bea)
✨ CI feedback usage guide:The CI feedback tool (
In addition to being automatically triggered, the tool can also be invoked manually by commenting on a PR: where Configuration options
See more information about the |
User description
Thanks for contributing to Selenium!
A PR well described will help maintainers to quickly review and merge it
Before submitting your PR, please check our contributing guidelines.
Avoid large PRs, help reviewers by making them as simple and short as possible.
Description
Motivation and Context
Fixes #12358
When clicking Close button to close Liveview dialog of a session. noVNC websocket keeps transferring data in the background
Before

After

Types of changes
Checklist
PR Type
Bug fix
Description
useImperativeHandleandforwardRefinLiveViewcomponent to expose thedisconnectmethod.RunningSessionscomponent to use a reference to theLiveViewcomponent and ensure proper disconnection on dialog close.Changes walkthrough 📝
LiveView.tsx
Implement WebSocket disconnection on dialog closejavascript/grid-ui/src/components/LiveView/LiveView.tsx
useImperativeHandleandforwardRefto manage componentreferences.
disconnectfunction to handle WebSocket disconnection.disconnectis called on dialog close and password dialogclose.
RunningSessions.tsx
Manage LiveView component reference for disconnectionjavascript/grid-ui/src/components/RunningSessions/RunningSessions.tsx
useRefto manageLiveViewcomponent reference.handleDialogCloseto ensure WebSocket disconnection.handleDialogClose.