Skip to content

Make console output compact and readable - #4

Merged
Softhe merged 2 commits into
mainfrom
feat/cleaner-console-output
Oct 29, 2026
Merged

Softhe merged 2 commits into
mainfrom
feat/cleaner-console-output

Conversation

@Softhe

@Softhe Softhe commented Oct 29, 2026

Copy link
Copy Markdown
Owner

Summary

The console printed about 150 timestamped lines on the LTSC 2024 VM run, usually 4–5 per package. It now prints about 35:

  • A header with the Windows build, account, install mode, apps, and log path.
  • Named sections (downloading, installing frameworks, installing apps, verifying), with one colored status line per package: OK, SKIP, WARN, or FAIL. Columns are aligned, and short notes are dimmed (for example "version 8.2511.26001.0 already installed" or the download size).
  • Transient progress bars during the catalog lookup, downloads, and installs.
  • A final result line with the exit code. Problems are listed again, followed by the next step and the log path.

The log file is unchanged in detail. It keeps every step with timestamps, package file names, and full error messages, plus each console result line.

The 64-bit relaunch no longer uses 6>&1, which split multi-color lines into fragments. Colors are still lost on that path, but lines stay intact.

Testing

  • tests/Run-Tests.ps1 passes under Windows PowerShell 5.1 and PowerShell 7.
  • A real -DownloadOnly run against Microsoft printed the new download section: 10 packages, 496 MB, 16 unneeded frameworks skipped.
  • I replayed the VM's package set, including UI.Xaml 8.2511, through the real installer code with the Appx cmdlets mocked. One run ends with exit code 0; the case where new users lack UI.Xaml ends with exit code 5 and two FAIL lines.
  • No real installation has used this branch yet.

🤖 Generated with Claude Code

The console now shows a header, named sections, one colored status line
per package (OK, SKIP, WARN, FAIL) with aligned columns and short notes,
transient progress bars, and a final result line with the exit code,
any problems, the next step, and the log path. The log file keeps every
step with timestamps, file names, and full error messages.

The 64-bit relaunch no longer redirects the information stream, which
split multi-color lines into fragments.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@coderabbitai

coderabbitai Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: cdcdcecc-0e33-4ae1-aff1-0f462024bcc8
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@greptile-apps

greptile-apps Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 4/5

[Low impact] The changes affect console output for the LTSC installer and its relaunch path.

The PR appears safe to merge, with non-blocking improvements needed for lost error details and progress cleanup.

Fix All in CodexFindings

  1. P2 Full error details disappear ▶
  2. P2 Failed runs leave progress active ▶
Fix with agent prompt
### Issue 1
install.ps1:191
If neither log folder is writable, or writing fails during the run, `Write-Log` still drops messages marked `-Quiet`. Full deployment errors then disappear, leaving only the shortened console note from `Format-Brief`. Apply `-Quiet` only after the message was saved, and print the full message otherwise.

### Issue 2
install.ps1:1196
The new progress bars are cleared only after their loops finish normally. A required catalog lookup or package download can throw before `-Completed` runs, leaving the bar active while the console shows the error. Clear the active bar in `finally`, including before an elevated window waits at the closing prompt.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Summary

The PR replaces verbose console logs with package results, named sections, progress bars, and a final outcome. Detailed messages still go to the log file.

  • Package installs and checks now show concise status rows.
  • The installer shows run details, named steps, and a clear finish.
  • Online downloads now show progress and clear package results.
  • The 64-bit relaunch keeps each console line together.

Reviews (1) · Last reviewed commit: "Make console output compact and readable" · Reviewed by Greptile

Comment thread install.ps1 Outdated
catch { Write-Host "[log write failed: $($_.Exception.Message)]" -ForegroundColor Yellow }
}
Write-Host $line
if ($Quiet) { return }

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Full error details disappear

If neither log folder is writable, or writing fails during the run, Write-Log still drops messages marked -Quiet. Full deployment errors then disappear, leaving only the shortened console note from Format-Brief. Apply -Quiet only after the message was saved, and print the full message otherwise.

Prompt To Fix With AI
This is a comment left during a code review.
Path: install.ps1
Line: 191

Comment:
**Full error details disappear**

If neither log folder is writable, or writing fails during the run, `Write-Log` still drops messages marked `-Quiet`. Full deployment errors then disappear, leaving only the shortened console note from `Format-Brief`. Apply `-Quiet` only after the message was saved, and print the full message otherwise.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Fix in Codex Fix in Claude Code

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Valid. Fixed in 2f2d128: Write-Log hides -Quiet details and uses shortened -Console text only after the line was written to the log file. If there is no log file or the write fails, it prints the full message. Covered by tests/Test-ConsoleOutput.ps1.

Comment thread install.ps1
}
}
}
Show-Progress -Activity 'Downloading packages from Microsoft' -Completed

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Failed runs leave progress active

The new progress bars are cleared only after their loops finish normally. A required catalog lookup or package download can throw before -Completed runs, leaving the bar active while the console shows the error. Clear the active bar in finally, including before an elevated window waits at the closing prompt.

Prompt To Fix With AI
This is a comment left during a code review.
Path: install.ps1
Line: 1196

Comment:
**Failed runs leave progress active**

The new progress bars are cleared only after their loops finish normally. A required catalog lookup or package download can throw before `-Completed` runs, leaving the bar active while the console shows the error. Clear the active bar in `finally`, including before an elevated window waits at the closing prompt.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Fix in Codex Fix in Claude Code

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Valid. Fixed in 2f2d128: Show-Progress now tracks open bars, and Clear-Progress closes them when a download fails, in the fatal-error handler, and at the start of Complete-Run. That covers every exit path, including the elevated window before its closing prompt. Covered by tests/Test-ConsoleOutput.ps1.

Write-Log hides -Quiet details and uses shortened -Console text only
after the line was saved to the log file; otherwise it prints the full
message. Show-Progress tracks open bars, and Clear-Progress closes them
when a download fails, on a fatal error, and in Complete-Run, before the
elevated window waits at its closing prompt.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@Softhe
Softhe merged commit 2ed1e6f into main Oct 29, 2026
5 checks passed
@Softhe
Softhe deleted the feat/cleaner-console-output branch October 29, 2026 19:03
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.

1 participant