Error message for users when pushClipboard remote tool used with no connection#17991
Closed
rachanabhandiwad wants to merge 1 commit into
Closed
Error message for users when pushClipboard remote tool used with no connection#17991rachanabhandiwad wants to merge 1 commit into
rachanabhandiwad wants to merge 1 commit into
Conversation
See test results for failed build of commit ab248ca57a |
Member
|
This approach is not appropriate. The speech should be queued with |
Member
|
@rachanabhandiwad do you plan to continue work on this PR? |
5 tasks
SaschaCowley
added a commit
that referenced
this pull request
May 9, 2025
…e NVDA Menu (#18070) Closes #17947 Supersedes #17991 Summary of the issue: When executing some Remote Access actions via the Remote Access submenu in the NVDA menu, the status is interrupted by the focus changing, making the messages useless. Description of user facing changes Remote Access actions performed via the NVDA menu should now correctly report their status. Description of development approach - Add a `delayedMessage` function to `ui`, based on the approach taken for focusing open blocking modals in #17582. - Remove the now duplicated code, and replace it with a call to `ui.delayedMessage`. - In `_remoteClient.client.RemoteClient`, updated `copyLink`, `pushClipboard`, and `toggleMute`, to use `ui.delayedMessage` instead of `ui.message`, as these methods can be envoked directly from the menu. - Also moved the success message out of `globalCommands.GlobalCommands.script_copyRemoteLink` into `_remoteClient.client.RemoteClient.copyLink`. - Updated `_remoteClient.cues._playCue` to use `ui.delayedMessage` instead of `ui.message`, as the "Disconnect" menu item causes a cue to be issued. This means that cues should work even if issued at the same time as a UI change, and should have very little performance impact. Testing strategy: - Performed the above listed commands with and without a Remote Access session in progress.
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.
Link to issue number:
#17947
Summary of the issue:
Previously, when attempting to push clipboard content to a remote machine without a connection, NVDA would silently fail or show a message via ui.message(). This behavior wasn't accessible for non-visual users in all contexts and was inconsistent with other parts of NVDA that use structured exception handling.
Description of user facing changes
Users now receive a spoken error message when pushing clipboard content fails due to no connection
Description of development approach
Updated pushClipboard() to raise RuntimeError instead of silently failing or calling ui.message(). This allows higher-level functions to handle the error and present it in a consistent, user-facing way.
Updated script_pushClipboard() to catch RuntimeError and call ui.message() after logging the traceback. This pattern is consistent with how other NVDA script actions handle errors.
Updated unit test test_pushClipboardNoConnection() to expect RuntimeError rather than assert ui.message() calls.
Testing strategy:
Ran unit tests, including updated test_pushClipboardNoConnection, to confirm exceptions are raised and contain the correct error message.
Manually tested clipboard pushing with and without a connection using the remote add-on.
Known issues with pull request:
Code Review Checklist:
@coderabbitai summary