Skip to content

UX: azd init confirmation declined message #5187

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

UX: azd init confirmation declined message #5187

wants to merge 1 commit into from

Conversation

hemarina
Copy link
Contributor

@hemarina hemarina commented May 12, 2025

fix #4836
image

@hemarina hemarina changed the title UX: azd init confirmation declined emessag UX: azd init confirmation declined message May 12, 2025
Copy link
Contributor

@wbreza wbreza left a comment

Choose a reason for hiding this comment

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

I don't think we should show anything "Successful" about cancelling the prompt. The user declined the message and therefore the initialization failed.

We should come up with a better error message but IMO should stay as a red ERROR message.

@vhvb1989
Copy link
Member

I don't think we should show anything "Successful" about cancelling the prompt. The user declined the message and therefore the initialization failed.

We should come up with a better error message but IMO should stay as a red ERROR message.

People might think that there was an error while trying to decline the overriding. Maybe we need a more neutral output for a no-op message. The green color and SUCCESS message implies AZD did something successfully. The red color and error means AZD encounter an error while trying to do something (either requested by the user or part of a process).

What we need here is a way to communicate: "Ok, nothing happened. Nothing's changed".

Some other program would just not-output anything else and terminate w/o any specific output. There would be just a verbose log in stderr like "user cancel operation. Program exit without changes. No revert or rollover required". The message would only be visible with --debug. Otherwise azd just stops with exit-code equals 0 (no error)

@JeffreyCA
Copy link
Contributor

JeffreyCA commented May 13, 2025

I don't think we should show anything "Successful" about cancelling the prompt. The user declined the message and therefore the initialization failed.
We should come up with a better error message but IMO should stay as a red ERROR message.

People might think that there was an error while trying to decline the overriding. Maybe we need a more neutral output for a no-op message. The green color and SUCCESS message implies AZD did something successfully. The red color and error means AZD encounter an error while trying to do something (either requested by the user or part of a process).

What we need here is a way to communicate: "Ok, nothing happened. Nothing's changed".

Some other program would just not-output anything else and terminate w/o any specific output. There would be just a verbose log in stderr like "user cancel operation. Program exit without changes. No revert or rollover required". The message would only be visible with --debug. Otherwise azd just stops with exit-code equals 0 (no error)

This makes sense to me as well, I think I'd prefer a neutral message (and neutral colour) without the "SUCCESS:"/"ERROR:" prefix, or not print anything at all

@wbreza
Copy link
Contributor

wbreza commented May 13, 2025

This makes sense to me as well, I think I'd prefer a neutral message (and neutral colour) without the "SUCCESS:"/"ERROR:" prefix, or not print anything at all

Maybe we display in our warning (yellow) color and then just return an appropriate exit code. Based on my quick research a common exit code for use cancellation is 130 for Script terminated by Ctrl+C (SIGINT)

@hemarina hemarina requested a review from SophCarp May 13, 2025 22:16
@weikanglim
Copy link
Contributor

Just my $0.02: Taking inspiration from what everyone has already said and being slightly inspired from other tooling, I wonder if using our ErrorWithSuggestion patterns to soften the user-perceived impact of the cancellation error is enough here:

image

It might achieve the result of softening the UX impact of the cancellation error, but retain the behavior of representing the user-cancellation request as a non-success state. @SophCarp for final thoughts here; there's a lot of good commentary on the PR comments above.

@vhvb1989
Copy link
Member

If we are collecting telemetry after errors (AZD returning non-zero exit code), could this be misleading to see as an error in the reports? After all, AZD is just doing what is been asked...

So, I think we have 2 things to consider:

  • User experience - How clear is it that this is an AZD Error or not?
  • Telemetry collected by AZD and what would it means in one report to see the % of errors from AZD

@SophCarp
Copy link
Collaborator

Did some quick mockups of everyone's suggestions as best I understood them

1: Error, with longer description (@wbreza)
Terminal

2: Error with suggestion @weikanglim
Terminal-1

3:Success @SophCarp and @kristenwomack
Terminal-2

4: Warning @wbreza
Terminal-3

5: Warning with Exit Code @wbreza
Terminal-4

6: Neutral text @vhvb1989 and @JeffreyCA
Terminal-5

Personally, I think neutral is best. I wasn't sure if this is how the exit code is formatted, but I do like having an exit code, so that's my second-place item. I think errors make a user think they made a mistake (and it's incorrect to give an error when azd is following the users instructions).

@wbreza
Copy link
Contributor

wbreza commented May 14, 2025

Personally, I think neutral is best. I wasn't sure if this is how the exit code is formatted, but I do like having an exit code, so that's my second-place item. I think errors make a user think they made a mistake (and it's incorrect to give an error when azd is following the users instructions).

image

image

I prefer either error or warning text followed by a next steps description. It is not required to print anything about the exit code to the user - that is purely for the calling application. If the command were called inside a script the script would then be able to react to the non-zero exit code vs assume it completed successfully.

@hemarina
Copy link
Contributor Author

I prefer option 6. I think this is part of user behavior and do not need to have a warning text.
image

@kristenwomack
Copy link
Collaborator

This is the solution I'd like to move forward with because I think it clearly let's a person know that the project was not initialized (still need to take an action, like cd) and, if I understand your point correctly @wbreza, the warning will also serve the script use case.

image

(Here's where we had discussion on this before #4836 where there is less conversation than I remembered.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[UX improvement] confirmation vs error
7 participants