Commit Graph
4 Commits
Author SHA1 Message Date
Phuc ToandGitHub 6de45a38b9 Fix UI helper errors during headless -Preset and -Config runs (#4941)
* Make UI helpers no-op when no window exists

The -Preset and -Config paths run Invoke-WinUtilAutoRun before the XAML
form is created and before PresentationCore is loaded, so every call into
Invoke-WPFUIThread failed with InvokeMethodOnNull and every call into
Set-WinUtilTweaksProgressIndicator failed to resolve [Windows.Visibility].
The errors were non-terminating, so tweaks still applied, but each run
filled the log with noise.

Loading presentationframework earlier does not help: Visibility lives in
PresentationCore, which only loads once a WPF object is instantiated, and
the XAML-named progress controls do not exist in these paths either.
Guarding the two helpers covers Invoke-WPFtweaksbutton, Invoke-WPFundoall
and Invoke-WPFFeatureInstall, which the existing per-call-site $hasUI
convention never reached.

* Suppress stray console output from automation runs

Invoke-WPFRunspace returns an IAsyncResult that no caller uses, and
Set-WinUtilRegistry was the only New-PSDrive call site that did not
suppress its output. A GUI click handler discards both, but the -Preset
and -Config paths call the workflows directly, so an async handle dump
and a PSDrive table landed in the user's log.

The handle itself is kept because pester/runspace.Tests.ps1 asserts that
Invoke-WPFRunspace returns a single IAsyncResult, so the suppression goes
at the four call sites reachable from Invoke-WinUtilAutoRun.

* Add project learning for window-free UI helpers
2026-08-09 13:06:17 -05:00
Chris TitusandGitHub 9ed06e793a Replace install progress overlay with shared indicator (#4844)
* Use shared progress for app workflows

* Remove legacy install progress overlay

* Document shared app progress indicator

* Address progress review feedback

* Track all Win11 ISO progress

* Restore Win11 Creator work on relaunch
2026-07-15 22:35:58 -05:00
Chris TitusandGitHub 822003d87f Fix AppX detection and add package restore support (#4842)
* Fix installed AppX package detection

* Add AppX package restore workflow

* Add AppX operation progress feedback

* Fix AppX operation launch race

* Handle AppX workflow failures
2026-07-15 15:57:56 -05:00
c8c3c7869f Add window-level progress indicator for Run Tweaks and Undo (#4830)
* feat(tweaks): add window-level progress indicator for Run Tweaks and Undo

* Hide completed tweaks progress on next action

---------

Co-authored-by: Chris Titus <contact@christitus.com>
2026-07-15 14:17:42 -05:00