Skip to content

feat(bulk-operations): integrate progress manager UI [DX-3882]#293

Draft
harshitha-cstk wants to merge 6 commits into
v2-devfrom
fix/dx-3882-bulk-operation-progress-manager
Draft

feat(bulk-operations): integrate progress manager UI [DX-3882]#293
harshitha-cstk wants to merge 6 commits into
v2-devfrom
fix/dx-3882-bulk-operation-progress-manager

Conversation

@harshitha-cstk

@harshitha-cstk harshitha-cstk commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Overview

Integrates the Progress Manager UI into all cm:stacks:bulk-* commands so bulk
operations show a clean header, a live summary with per-command Module Details,
and suppress the timestamped console logs by default.

Purpose

Bulk commands previously streamed raw [timestamp] INFO: log lines with no
consolidated summary, making the output noisy and hard to scan. This gives a
concise, readable run experience with an at-a-glance pass/fail summary.

Changes

  • Progress-module flag set in buildConfig() (config layer) before the first
    log call, so console logs are suppressed and the progress UI renders. Users who
    need raw logs can opt back in with csdx config:set:log --show-console-logs.
  • Run-level summary initialized once per command with a header, and a
    per-command Module Details row (ENTRY / ASSET / TAXONOMY) with
    success/failed counts, printed once at the end.
  • Summary helpers live as protected methods on BaseBulkCommand
    (beginOperationSummary, recordModuleSummary, finalizeProgressSummary);
    bulk-taxonomies (which overrides init/executeBulkOperation) reuses them.
  • bulk-am-assets (separate base) suppresses console logs and clears the
    progress flag on completion; it keeps its existing delete/move summary output.
  • Replaced the direct chalk import with loadChalk()/getChalk().

🤖 Generated with Claude Code

Wire CLIProgressManager/SummaryManager into the bulk operations commands, matching the export/import/audit pattern:

- replace the direct `chalk` import with loadChalk()/getChalk() (ESM-safe)
- set/clear `log.progressSupportedModule` in init()/finally(); null-reset
  first so pre-flight/auth/setup errors still reach the console
- initialize the run-level global summary + header in executeBulkOperation
  (empty-branch fallback like import; label suffixed with branch when set)
- show a loading spinner while the async batch/job queue drains, then
  record accurate success/failed counts from the final result
- print the global summary and clear the progress-module flag in finally()
@harshitha-cstk harshitha-cstk requested a review from a team as a code owner July 14, 2026 09:59
@github-actions

Copy link
Copy Markdown

🔒 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 1 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: 0
  • Medium without fixes: 1
  • 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

🔒 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 1 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: 0
  • Medium without fixes: 1
  • Low without fixes: 0

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

Consider reviewing these vulnerabilities when fixes become available.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Integrates the shared CLIProgressManager/global summary UX into the bulk-operations plugin’s BaseBulkCommand, aligning it with the progress/summary behavior used by other CLI plugins while keeping Bulk API’s async nature in mind.

Changes:

  • Replaces direct chalk usage in BaseBulkCommand with loadChalk()/getChalk() and initializes progress UI prerequisites in init().
  • Enables/disables the progress-module suppression flag (log.progressSupportedModule) around command execution and prints the global summary in finally().
  • Wraps bulk execution in a loading spinner and attempts to record final success/failure counts into the progress summary.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread packages/contentstack-bulk-operations/src/base-bulk-command.ts Outdated
Comment thread packages/contentstack-bulk-operations/src/base-bulk-command.ts
Comment thread packages/contentstack-bulk-operations/src/base-bulk-command.ts Outdated
@github-actions

Copy link
Copy Markdown

🔒 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 1 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: 0
  • Medium without fixes: 1
  • Low without fixes: 0

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

Consider reviewing these vulnerabilities when fixes become available.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

Comments suppressed due to low confidence (1)

packages/contentstack-bulk-operations/src/base-bulk-command.ts:246

  • initForRevertOrRetry() calls process.exit(0) after enabling the progress module. Because process.exit bypasses the normal oclif lifecycle, finally() will not run, so the global progress summary won’t be printed and clearProgressModuleSetting() won’t be called. This can leave log.progressSupportedModule set in persisted config and affect subsequent commands.
  protected async setupStack(): Promise<void> {
    const flags = this.parsedFlags || (await this.parse(this.constructor as typeof BaseBulkCommand)).flags;

    let stackConfig;
    try {
      stackConfig = setupStackConfig(flags, this.cmaHost, this.cdaHost);

Comment thread packages/contentstack-bulk-operations/src/base-bulk-command.ts Outdated

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

Comment thread packages/contentstack-bulk-operations/src/utils/config-builder.ts Outdated
Comment thread packages/contentstack-bulk-operations/src/base-bulk-command.ts
@github-actions

Copy link
Copy Markdown

🔒 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 1 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: 0
  • Medium without fixes: 1
  • 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

🔒 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 1 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: 0
  • Medium without fixes: 1
  • Low without fixes: 0

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

Consider reviewing these vulnerabilities when fixes become available.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

Comment thread packages/contentstack-bulk-operations/src/utils/config-builder.ts Outdated
Comment thread packages/contentstack-bulk-operations/src/base-bulk-command.ts
@github-actions

Copy link
Copy Markdown

🔒 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 1 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: 0
  • Medium without fixes: 1
  • Low without fixes: 0

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

Consider reviewing these vulnerabilities when fixes become available.

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.

2 participants