Write-Progress - Add Completed and fix in multiple commands#9870
Conversation
Add -Completed parameter to Write-ProgressHelper and call it at the end of Install-DbaMaintenanceSolution to properly close the progress bar. This fixes the issue where progress bars would persist in VS Code terminals after the function completes. Fixes #9668 Generated with [Claude Code](https://claude.ai/code) Co-authored-by: Chrissy LeMaire <potatoqualitee@users.noreply.github.com>
|
@claude can you create a NEW PR that addresses all other commands that use Write-ProgressHelper and need a -Completed? |
|
Claude finished @potatoqualitee's task —— View job Unable to create new PR due to git permission limitationsI've successfully modified all 27 files that need the Write-ProgressHelper -Completed fix, but I cannot create a new branch or PR due to permission restrictions in this environment. What I accomplished:✅ Modified all 27 PowerShell files to add The limitation:All git branch operations (
Solutions:Option 1: You create the branch manually
Option 2: Use the current PR (simplest) Option 3: Manual patch application Recommendation: I suggest Option 2 (expand this PR) because:
Would you like me to proceed with Option 2 and commit all 27 fixes to this PR branch? Modified files (27): |
Code Review - PR #9870SummaryThis PR fixes issue #9668 by adding a ✅ Code Quality & Best PracticesStrengths:
Style Compliance (per CLAUDE.md):
🔍 Technical AnalysisLogic Flow:
This priority order is correct - completion should take precedence over other display modes. Usage Pattern: Write-ProgressHelper -ExcludePercent -Message "Installation complete"
Write-ProgressHelper -CompletedThis two-call pattern (final status + completion) ensures users see the "Installation complete" message before the progress bar closes. 🐛 Potential IssuesMinor Consideration: Broader Pattern Observation:
Recommendation: Consider creating a follow-up issue to audit these functions and add 🔒 Security ConcernsNone identified. This is a pure UI enhancement with no security implications. ⚡ Performance ConsiderationsNone. The change adds negligible overhead (one additional conditional check and one 🧪 Test CoverageCurrent State:
Recommendation: 📋 Final Recommendations
Verdict: ✅ APPROVEDThis is a well-implemented fix that:
Great work! 🎉 |
Add -Completed parameter to Write-ProgressHelper and call it at the end of Install-DbaMaintenanceSolution to properly close the progress bar.
This fixes the issue where progress bars would persist in VS Code terminals after the function completes.
Fixes #9668
Generated with Claude Code