Skip to content

Fix/dx 4439 v1 dev interactive mode messages#2445

Merged
harshithad0703 merged 11 commits intov1-devfrom
fix/dx-4439-v1-dev-interactive-mode-messages
Mar 10, 2026
Merged

Fix/dx 4439 v1 dev interactive mode messages#2445
harshithad0703 merged 11 commits intov1-devfrom
fix/dx-4439-v1-dev-interactive-mode-messages

Conversation

@harshithad0703
Copy link
Contributor

@harshithad0703 harshithad0703 commented Mar 4, 2026

Problem

  1. 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").

  2. 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

  • New prerun hook init-context-for-command: When context.messageFilePath is missing and the current command id is available (e.g. after correction), re-build CsdxContext for that command and re-initialize messageHandler, cliux, and SDK initiators so the correct plugin message file is loaded.
  • Hook is registered as the first prerun hook.

2. Correct message when user cancels logout

  • Added message key CLI_AUTH_LOGOUT_CANCELLED: "Log out cancelled".
  • In 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):

  1. Run csdx loginasda (or node bin/run.js loginasda from packages/contentstack).
  2. At "Did you mean login?", answer Yes.
  3. Expected: Prompt shows "Enter your email address" (not the key).

Logout cancel:

  1. Run csdx auth:login and log in.
  2. Run csdx auth:logout, answer No to the confirmation.
  3. Expected: Message shows "Log out cancelled" (not "You're already logged out").
  4. Run csdx whoami to confirm you are still logged in.

@harshithad0703 harshithad0703 requested review from a team as code owners March 4, 2026 06:34
@github-actions
Copy link

github-actions bot commented Mar 4, 2026

🔒 Security Scan Results

ℹ️ Note: Only vulnerabilities with available fixes (upgrades or patches) are counted toward thresholds.

Check Type Count (with fixes) Without fixes Threshold Result
🔴 Critical Severity 0 0 10 ✅ Passed
🟠 High Severity 0 0 25 ✅ Passed
🟡 Medium Severity 0 47 500 ✅ Passed
🔵 Low Severity 0 0 1000 ✅ Passed

⏱️ SLA Breach Summary

✅ No SLA breaches detected. All vulnerabilities are within acceptable time thresholds.

Severity Breaches (with fixes) Breaches (no fixes) SLA Threshold (with/no fixes) Status
🔴 Critical 0 0 15 / 30 days ✅ Passed
🟠 High 0 0 30 / 120 days ✅ Passed
🟡 Medium 0 0 90 / 365 days ✅ Passed
🔵 Low 0 0 180 / 365 days ✅ Passed

ℹ️ Vulnerabilities Without Available Fixes (Informational Only)

The following vulnerabilities were detected but do not have fixes available (no upgrade or patch). These are excluded from failure thresholds:

  • Critical without fixes: 0
  • High without fixes: 0
  • Medium without fixes: 47
  • Low without fixes: 0

✅ BUILD PASSED - All security checks passed

@github-actions
Copy link

github-actions bot commented Mar 4, 2026

🔒 Security Scan Results

ℹ️ Note: Only vulnerabilities with available fixes (upgrades or patches) are counted toward thresholds.

Check Type Count (with fixes) Without fixes Threshold Result
🔴 Critical Severity 0 0 10 ✅ Passed
🟠 High Severity 0 0 25 ✅ Passed
🟡 Medium Severity 0 47 500 ✅ Passed
🔵 Low Severity 0 0 1000 ✅ Passed

⏱️ SLA Breach Summary

✅ No SLA breaches detected. All vulnerabilities are within acceptable time thresholds.

Severity Breaches (with fixes) Breaches (no fixes) SLA Threshold (with/no fixes) Status
🔴 Critical 0 0 15 / 30 days ✅ Passed
🟠 High 0 0 30 / 120 days ✅ Passed
🟡 Medium 0 0 90 / 365 days ✅ Passed
🔵 Low 0 0 180 / 365 days ✅ Passed

ℹ️ Vulnerabilities Without Available Fixes (Informational Only)

The following vulnerabilities were detected but do not have fixes available (no upgrade or patch). These are excluded from failure thresholds:

  • Critical without fixes: 0
  • High without fixes: 0
  • Medium without fixes: 47
  • Low without fixes: 0

✅ BUILD PASSED - All security checks passed

@github-actions
Copy link

github-actions bot commented Mar 4, 2026

🔒 Security Scan Results

ℹ️ Note: Only vulnerabilities with available fixes (upgrades or patches) are counted toward thresholds.

Check Type Count (with fixes) Without fixes Threshold Result
🔴 Critical Severity 0 0 10 ✅ Passed
🟠 High Severity 0 0 25 ✅ Passed
🟡 Medium Severity 0 47 500 ✅ Passed
🔵 Low Severity 0 0 1000 ✅ Passed

⏱️ SLA Breach Summary

✅ No SLA breaches detected. All vulnerabilities are within acceptable time thresholds.

Severity Breaches (with fixes) Breaches (no fixes) SLA Threshold (with/no fixes) Status
🔴 Critical 0 0 15 / 30 days ✅ Passed
🟠 High 0 0 30 / 120 days ✅ Passed
🟡 Medium 0 0 90 / 365 days ✅ Passed
🔵 Low 0 0 180 / 365 days ✅ Passed

ℹ️ Vulnerabilities Without Available Fixes (Informational Only)

The following vulnerabilities were detected but do not have fixes available (no upgrade or patch). These are excluded from failure thresholds:

  • Critical without fixes: 0
  • High without fixes: 0
  • Medium without fixes: 47
  • Low without fixes: 0

✅ BUILD PASSED - All security checks passed

Base automatically changed from v1-dev to v1-beta March 5, 2026 08:31
@github-actions
Copy link

github-actions bot commented Mar 6, 2026

🔒 Security Scan Results

ℹ️ Note: Only vulnerabilities with available fixes (upgrades or patches) are counted toward thresholds.

Check Type Count (with fixes) Without fixes Threshold Result
🔴 Critical Severity 0 0 10 ✅ Passed
🟠 High Severity 0 0 25 ✅ Passed
🟡 Medium Severity 0 2 500 ✅ Passed
🔵 Low Severity 0 0 1000 ✅ Passed

⏱️ SLA Breach Summary

✅ No SLA breaches detected. All vulnerabilities are within acceptable time thresholds.

Severity Breaches (with fixes) Breaches (no fixes) SLA Threshold (with/no fixes) Status
🔴 Critical 0 0 15 / 30 days ✅ Passed
🟠 High 0 0 30 / 120 days ✅ Passed
🟡 Medium 0 0 90 / 365 days ✅ Passed
🔵 Low 0 0 180 / 365 days ✅ Passed

ℹ️ Vulnerabilities Without Available Fixes (Informational Only)

The following vulnerabilities were detected but do not have fixes available (no upgrade or patch). These are excluded from failure thresholds:

  • Critical without fixes: 0
  • High without fixes: 0
  • Medium without fixes: 2
  • Low without fixes: 0

✅ BUILD PASSED - All security checks passed

@harshithad0703 harshithad0703 self-assigned this Mar 6, 2026
@harshithad0703 harshithad0703 changed the base branch from v1-beta to v1-dev March 10, 2026 10:19
@harshithad0703 harshithad0703 merged commit bd50ebd into v1-dev Mar 10, 2026
9 of 10 checks passed
@harshithad0703 harshithad0703 deleted the fix/dx-4439-v1-dev-interactive-mode-messages branch March 10, 2026 10:21
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.

5 participants