Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Reset modifier button's state when connection is completed #10743

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

Draft
wants to merge 1 commit into
base: 4.19
Choose a base branch
from

Conversation

vishesh92
Copy link
Member

@vishesh92 vishesh92 commented Apr 17, 2025

Description

This PR fixes #9940

Copilot Generated summary

This pull request introduces functionality to reset the state of modifier keys in the noVNC UI when reconnecting. This ensures that the visual state of the UI and the actual key states are synchronized, improving the user experience.

Enhancements to UI state management:

  • systemvm/agent/noVNC/app/ui.js: Added a new method resetModifierKeysState to reset the states of modifier keys (Ctrl, Shift, Alt, Windows) in the UI. This includes updating button styles and sending key-up events if necessary.
  • systemvm/agent/noVNC/app/ui.js: Integrated the resetModifierKeysState method into the connection flow by calling it when the connection state changes to "connected."

Types of changes

  • Breaking change (fix or feature that would cause existing functionality to change)
  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Enhancement (improves an existing feature and functionality)
  • Cleanup (Code refactoring and cleanup, that may add test cases)
  • build/CI
  • test (unit or integration test code)

Feature/Enhancement Scale or Bug Severity

Feature/Enhancement Scale

  • Major
  • Minor

Bug Severity

  • BLOCKER
  • Critical
  • Major
  • Minor
  • Trivial

Screenshots (if appropriate):

How Has This Been Tested?

This needs a rebuild of systemvm template or patch the scripts in CPVM to test this patch.

  1. Open Console for a VM in Chromium
  2. Hold the shift key and then close the tab or the window
  3. Open the console session again. Try typing some text and check if the behaviour is as if the shift key is pressed or not.

Before the patch, when you enter any text it will appear as if the shift key is pressed even when it's not. Once the CPVM session goes into this buggy state, it's not possible to recover without restarting the VM.

After the patch, the keys works as expected.

How did you try to break this feature and the system with this change?

@vishesh92
Copy link
Member Author

@blueorangutan package

@blueorangutan
Copy link

@vishesh92 a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.

Copy link

codecov bot commented Apr 17, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 15.17%. Comparing base (53d3d19) to head (d16bd22).
Report is 6 commits behind head on 4.19.

Additional details and impacted files
@@            Coverage Diff            @@
##               4.19   #10743   +/-   ##
=========================================
  Coverage     15.17%   15.17%           
- Complexity    11335    11336    +1     
=========================================
  Files          5415     5415           
  Lines        474898   474898           
  Branches      57923    57923           
=========================================
+ Hits          72055    72059    +4     
+ Misses       394788   394781    -7     
- Partials       8055     8058    +3     
Flag Coverage Δ
uitests 4.28% <ø> (ø)
unittests 15.89% <ø> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@blueorangutan
Copy link

Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 13091

Copy link
Contributor

@DaanHoogland DaanHoogland left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clgtm

@DaanHoogland
Copy link
Contributor

@blueorangutan test keepEnv

@blueorangutan
Copy link

@DaanHoogland a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests

@blueorangutan
Copy link

[SF] Trillian test result (tid-13184)
Environment: kvm-ol8 (x2), Advanced Networking with Mgmt server ol8
Total time taken: 51745 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr10743-t13184-kvm-ol8.zip
Smoke tests completed. 133 look OK, 0 have errors, 0 did not run
Only failed and skipped tests results shown below:

Test Result Time (s) Test File

Copy link
Member

@rohityadavcloud rohityadavcloud left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM didn't test it

@rohityadavcloud
Copy link
Member

@nvazquez @weizhouapache can you have a look if this is good to go?

Copy link
Contributor

@nvazquez nvazquez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - haven't tested it though

@DaanHoogland DaanHoogland self-requested a review May 7, 2025 11:11
@DaanHoogland DaanHoogland marked this pull request as draft May 7, 2025 14:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

CPVM: if special key is pressed down while window is closed, key is not release for next opening
7 participants