Make CLI help dialog visually readable#16696
Conversation
WalkthroughThe updates to the Changes
Sequence Diagram(s)No sequence diagrams are necessary, as the changes are primarily focused on type annotations and formatting without altering the control flow or introducing new features. Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
There was a problem hiding this comment.
Actionable comments posted: 1
Outside diff range and nitpick comments (1)
source/nvda.pyw (1)
Line range hint
339-369: The_acquireMutexfunction is robust and well-documented, ensuring proper mutex handling. Consider enhancing the logging within this function to include more detailed diagnostics, especially in error scenarios.- _log.error(f"Unable to create mutex, last error: {createMutexResult}") + _log.error(f"Unable to create mutex for desktop {_desktopName}, last error: {createMutexResult}")
Link to issue number:
None
Summary of the issue:
When using the CLI command

nvda.exe --help, a dialog window opens with visual clipping for smaller screens.Description of user facing changes
Make the dialog wider and more legible.

Description of development approach
Created a custom formatter to widen the default dialog for CLI help.
Testing strategy:
runnvda.bat --helpKnown issues with pull request:
This still will result in clipping, particulary with larger text environment. We can consider shortening the text to improve this, or making custom help on a command level (this is a complex solution).
An alternative would be to find a way to pipe the text out to the console of whatever is running --help.
Code Review Checklist:
Summary by CodeRabbit
New Features
Improvements