Skip to content

fix: fixed log disappearing in clone process#200

Merged
cs-raj merged 3 commits into
v2-devfrom
fix/DX-5341
Jun 2, 2026
Merged

fix: fixed log disappearing in clone process#200
cs-raj merged 3 commits into
v2-devfrom
fix/DX-5341

Conversation

@cs-raj
Copy link
Copy Markdown
Contributor

@cs-raj cs-raj commented Jun 1, 2026

Root Cause

cloneTypeSelection() in clone-handler.ts had an unconditional console.clear() call as its very first line:

async cloneTypeSelection(): Promise<any> {
  console.clear(); // ← wiped the entire terminal buffer
  return new Promise(async (resolve, reject) => {
    ...
    await inquirer.prompt(cloneTypeSelection); // "Type of data to clone"
  });
}

Execution sequence:

clone-handler.ts  HandleExportCommand runs        → export logs printed to console
clone-handler.ts  executeDestination()            → "Want to clone into a new stack?" prompt
clone-handler.ts  createNewStack()                → org, stack name prompts
clone-handler.ts  CloneTypeSelectionCommand       → cloneTypeSelection() called
clone-handler.ts  console.clear()                 ← entire terminal buffer wiped here
clone-handler.ts  inquirer.prompt(cloneType)      → renders on blank terminal

The export phase completes and all its logs are visible — then console.clear() fires just before the final "Type of data" prompt, erasing everything. console.clear() emits \x1bc (full terminal reset), not just a line clear, so there is no way to scroll back.


Fix

Removed the console.clear() from cloneTypeSelection(). The inquirer list prompt renders correctly without it — there was no functional reason for the clear.

src/core/util/clone-handler.ts

  async cloneTypeSelection(): Promise<any> {
-   console.clear();
    return new Promise(async (resolve, reject) => {

What Is Not Changed

Two other console.clear() calls remain at lines 425 and 506 inside the Shift+Left (undo) keypress handlers in execute() and executeDestination(). These are conditional on a specific keypress and are tracked separately for a follow-up fix.


@cs-raj cs-raj requested a review from a team as a code owner June 1, 2026 09:08
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 1, 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 3 57 25 ✅ Passed
🟡 Medium Severity 0 2 500 ✅ Passed
🔵 Low Severity 0 0 1000 ✅ Passed

⏱️ SLA Breach Summary

⚠️ Warning: The following vulnerabilities have exceeded their SLA thresholds (days since publication).

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 1 90 / 365 days ⚠️ Warning
🔵 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: 57
  • Medium without fixes: 2
  • Low without fixes: 0

⚠️ BUILD PASSED WITH WARNINGS - SLA breaches detected for issues without available fixes

Consider reviewing these vulnerabilities when fixes become available.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 1, 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 3 57 25 ✅ Passed
🟡 Medium Severity 0 2 500 ✅ Passed
🔵 Low Severity 0 0 1000 ✅ Passed

⏱️ SLA Breach Summary

⚠️ Warning: The following vulnerabilities have exceeded their SLA thresholds (days since publication).

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 1 90 / 365 days ⚠️ Warning
🔵 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: 57
  • Medium without fixes: 2
  • Low without fixes: 0

⚠️ BUILD PASSED WITH WARNINGS - SLA breaches detected for issues without available fixes

Consider reviewing these vulnerabilities when fixes become available.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 2, 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 1 25 ✅ Passed
🟡 Medium Severity 0 2 500 ✅ Passed
🔵 Low Severity 0 0 1000 ✅ Passed

⏱️ SLA Breach Summary

⚠️ Warning: The following vulnerabilities have exceeded their SLA thresholds (days since publication).

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 1 90 / 365 days ⚠️ Warning
🔵 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: 1
  • Medium without fixes: 2
  • Low without fixes: 0

⚠️ BUILD PASSED WITH WARNINGS - SLA breaches detected for issues without available fixes

Consider reviewing these vulnerabilities when fixes become available.

@cs-raj cs-raj merged commit 4fb06fd into v2-dev Jun 2, 2026
10 checks passed
@cs-raj cs-raj deleted the fix/DX-5341 branch June 2, 2026 06:18
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