Add window-level progress indicator for Run Tweaks and Undo
Type of Change
- [x] New feature
- [ ] Bug fix
- [ ] Documentation update
- [ ] Refactor
- [x] UI/UX improvement
Description
Running Run Tweaks / Undo Selected Tweaks gives no visible feedback in the window itself - only the taskbar icon overlay updates, so there's no way to tell what's currently running, how far along it is, or whether it's hung, without alt-tabbing to check the taskbar.
This adds a slim status bar at the bottom of the window (visible regardless of which tab is active, since it lives outside the TabControl) showing the current tweak being applied/undone and a progress bar, using the exact same progress data (Set-WinUtilProgressBar) already computed by Invoke-WPFtweaksbutton.ps1/Invoke-WPFundoall.ps1 - it's an additive display, not a rework of the existing Install-tab progress bar (that one stays untouched, it's used deliberately for the Install/Uninstall flow).
New: functions/private/Set-WinUtilTweaksProgressIndicator.ps1, following the same pattern as Set-WinUtilProgressbar.ps1.
Verification
.\Compile.ps1succeeds.- Full Pester suite: 400/401 passing (the 1 failure is pre-existing on
main, unrelated to this change -Initialize-InstallAppEntry.ps1references an out-of-scope$Appsvariable; happy to open that as a separate issue). - Manually run end-to-end (Run Tweaks and Undo, light and dark theme) to confirm the indicator shows/updates/looks correct.
Issue related to PR
- Resolves #1151
I attached my PS7 logs for reference. The Pester suite produces the same results on my end, and I’m able to compile successfully, but I can’t run winutil.ps1 in PowerShell Core 7. Everything works as expected in Windows PowerShell 5.1.
Thanks for testing and attaching the logs!
The crash you're hitting is in functions/public/Invoke-WPFUIElements.ps1 (Install tab tile rendering - the GridLength/GridUnitType construction around the $panelcount loop). This PR's diff only touches themes.json, Set-WinUtilTweaksProgressIndicator.ps1, Invoke-WPFtweaksbutton.ps1, Invoke-WPFundoall.ps1, tweaks.Tests.ps1, and inputXML.xaml - it doesn't touch that file at all, so this isn't something introduced by this change. It looks like a pre-existing PowerShell 7 compatibility gap (the WPF assemblies types aren't resolving the same way they do under Windows PowerShell 5.1).
Since it's unrelated to the progress indicator feature here, I'd rather track/fix it separately so this PR doesn't grow scope. Would you be able to confirm you hit the same crash on main (without this branch) so it's clearly pre-existing? If so I'll file/open a separate PR for the PS7 fix.
Thanks @YayoRazo. Confirmed this was due to my local environment setup, not this PR. Re-tested and everything is working fine now. Please disregard my earlier concern. Changes look good!
Updated this branch onto current main and addressed the progress-indicator lifecycle feedback.
- Rebased onto
157a66b, which includes the upstream app-entry rendering fix from #4834. - The completed tweaks/undo indicator now hides on the next idle button or tab interaction, while remaining visible during active work.
- Added focused tests for idle cleanup and active-process behavior.
Validation:
.\Compile.ps1- Full Pester suite: 411 passed, 0 failed