[PR #4756] AzCon: improve input, usability, reliability (4 commits) #25939

Open
opened 2026-01-31 09:12:48 +00:00 by claunia · 0 comments
Owner

Original Pull Request: https://github.com/microsoft/terminal/pull/4756

State: closed
Merged: Yes


This pull request comprises four commits that improve the Azure connection.

Azure: rewrite user input handler

This commit replaces the AzureConnection's input handler with one that
acts more like "getline()". Instead of the Read thread setting a state
and WriteInput filling in the right member variable, the reader blocks
on the user's input and receives it in an optional.

This moves the input number parsing and error case handling closer to
the point where those inputs are used, as opposed to where they're
collected.

It also switches our input to be "line-based", which is a huge boon for
typing tenant numbers >9. This fixes #3233. A simple line editor
(supporting only backspace and CR) is included.

It also enables echo on user input, and prints it in a nice pretty green
color.

It also enables input queueing: if the user types anything before the
connection is established, it'll be sent once it is.

Fixes #3233.

Azure: display the user's options and additional information in color

This commit colorizes parts of the AzCon's strings that include "user
options" -- things the user can type -- in yellow. This is to help with
accessibility.

The implementation here is based on a discussion with the team.
Alternative options for coloration were investigated, such as:

  • Embedding escape sequences in the resource file.
    This would have been confusing for translators.
    The RESW file format doesn't support  escapes, so we would need
    some magic post-processing.
  • Embedding "markup" in the resource file (like #{93m}, ...)
    This still would have been annoying for translators.

We settled on an implementation that takes resource names, colorizes
them, and string-formats them into other resources.

Azure: follow the user's shell choice from the online portal

Fixes #2266.

Azure: remove all credentials instead of just the first one

just a silly bug.

**Original Pull Request:** https://github.com/microsoft/terminal/pull/4756 **State:** closed **Merged:** Yes --- This pull request comprises four commits that improve the Azure connection. ## Azure: rewrite user input handler This commit replaces the AzureConnection's input handler with one that acts more like "getline()". Instead of the Read thread setting a state and WriteInput filling in the right member variable, the reader blocks on the user's input and receives it in an optional<string>. This moves the input number parsing and error case handling closer to the point where those inputs are used, as opposed to where they're collected. It also switches our input to be "line-based", which is a huge boon for typing tenant numbers >9. This fixes #3233. A simple line editor (supporting only backspace and CR) is included. It also enables echo on user input, and prints it in a nice pretty green color. It also enables input queueing: if the user types anything before the connection is established, it'll be sent once it is. Fixes #3233. ## Azure: display the user's options and additional information in color This commit colorizes parts of the AzCon's strings that include "user options" -- things the user can type -- in yellow. This is to help with accessibility. The implementation here is based on a discussion with the team. Alternative options for coloration were investigated, such as: * Embedding escape sequences in the resource file. This would have been confusing for translators. The RESW file format doesn't support &amp;#x1B; escapes, so we would need some magic post-processing. * Embedding "markup" in the resource file (like #{93m}, ...) This still would have been annoying for translators. We settled on an implementation that takes resource names, colorizes them, and string-formats them into other resources. ## Azure: follow the user's shell choice from the online portal Fixes #2266. ## Azure: remove all credentials instead of just the first one just a silly bug.
claunia added the pull-request label 2026-01-31 09:12:48 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#25939