Fix/dx 4439 v2 dev interactive mode messages#2446
Open
harshithad0703 wants to merge 4 commits intov2-devfrom
Open
Fix/dx 4439 v2 dev interactive mode messages#2446harshithad0703 wants to merge 4 commits intov2-devfrom
harshithad0703 wants to merge 4 commits intov2-devfrom
Conversation
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.
Problem
Interactive prompts after command correction: When an invalid command is corrected (e.g.
csdx loginasda→ "Did you mean login?" → Yes), the CLI shows i18n keys (e.g.CLI_AUTH_LOGIN_ENTER_EMAIL_ADDRESS) instead of user-friendly text (e.g. "Enter your email address").Logout confirmation message: When the user answers No to "Are you sure you want to log out?", the CLI still shows "SUCCESS: You're already logged out", which is incorrect—the user chose not to log out and remains logged in.
Solution
1. Human-readable prompts after command correction
init-context-for-command: Whencontext.messageFilePathis missing and the current command id is available (e.g. after correction), re-buildCsdxContextfor that command and re-initializemessageHandler,cliux, and SDK initiators so the correct plugin message file is loaded.2. Correct message when user cancels logout
CLI_AUTH_LOGOUT_CANCELLED: "Log out cancelled".auth:logout, when the user answers No to the confirmation and is still authenticated, show "Log out cancelled" instead of "You're already logged out". "You're already logged out" is now only shown when the user is actually not authenticated.Testing
Interactive prompts (command correction):
csdx loginasda(ornode bin/run.js loginasdafrompackages/contentstack).Logout cancel:
csdx auth:loginand log in.csdx auth:logout, answer No to the confirmation.csdx whoamito confirm you are still logged in.