Add option to revert changes via registry backup#566
Add option to revert changes via registry backup#566
Conversation
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Adds a registry-backup based rollback path so Win11Debloat changes can be reverted later, and exposes this via a new GUI “Restore backup” flow.
Changes:
- Create registry snapshot backups before applying registry-backed features and persist them under a new
Backups/directory. - Add GUI dialog + menu entry to select a backup
.jsonand restore its captured registry state (including loaded-hive scenarios). - Refactor several path constructions to use
Join-Pathand update UI wording/styling for dialogs.
Reviewed changes
Copilot reviewed 27 out of 29 changed files in this pull request and generated 12 comments.
Show a summary per file
| File | Description |
|---|---|
| Win11Debloat.ps1 | Adds backups path, restore window schema path, and dotsources new backup/restore feature + GUI scripts. |
| Scripts/Helpers/RegistryPathHelpers.ps1 | New helpers for splitting registry paths and resolving regfile paths for features. |
| Scripts/Helpers/Get-RegFileOperations.ps1 | New parser to infer registry operations from .reg files to drive snapshot capture. |
| Scripts/Get.ps1 | Uses Join-Path, preserves Backups on cleanup, and quotes script path when launching. |
| Scripts/Get-Dev.ps1 | Same as Get.ps1 for dev zip flow; preserves Backups. |
| Scripts/GUI/Show-RestoreBackupWindow.ps1 | New entrypoint to trigger restore dialog and run restore action with UI feedback. |
| Scripts/GUI/Show-RestoreBackupDialog.ps1 | New WPF dialog that loads a backup, previews revertible/non-revertible changes, and confirms restore. |
| Scripts/GUI/Show-MainWindow.ps1 | Adds “Restore backup” menu item and improves error handling around import/export actions. |
| Scripts/GUI/Show-ConfigWindow.ps1 | Makes import/export dialog OK button label customizable (e.g., “Export Settings”). |
| Scripts/GUI/Show-ApplyModal.ps1 | Changes reboot-required list entries to use feature label only. |
| Scripts/GUI/RestoreBackupDialogFeatureLists.ps1 | New helpers to build revertible/non-revertible feature lists from a backup’s SelectedFeatures. |
| Scripts/Features/RestoreRegistryBackup.ps1 | Loads/validates backup JSON and orchestrates restore across keys/subkeys. |
| Scripts/Features/RestoreRegistryApplyState.ps1 | Implements registry key/value restore logic and loaded-hive execution. |
| Scripts/Features/RestartExplorer.ps1 | Updates reboot warning text to show feature label only. |
| Scripts/Features/ReplaceStartMenu.ps1 | Updates asset path string formatting for Start Menu template. |
| Scripts/Features/RegistryBackupValidation.ps1 | New normalization/validation functions for backups (SelectedFeatures + registry snapshots). |
| Scripts/Features/ExecuteChanges.ps1 | Captures registry backup as an extra “apply” step when registry-backed features are selected. |
| Scripts/Features/BackupRegistryState.ps1 | Writes a registry backup JSON payload to Backups/ before applying changes. |
| Scripts/Features/BackupRegistrySnapshotCapture.ps1 | Generates capture plans from .reg operations and snapshots registry keys/values (including loaded hive). |
| Scripts/Features/BackupRegistryFeatureSelection.ps1 | Helpers to pick selected features and filter registry-backed features. |
| Scripts/CLI/PrintPendingChanges.ps1 | CLI output now prints feature label only (no action prefix). |
| Schemas/SharedStyles.xaml | Introduces shared modal shell styles reused by multiple dialogs. |
| Schemas/RestoreBackupWindow.xaml | New restore-backup modal UI schema. |
| Schemas/MainWindow.xaml | Adds “Restore backup” menu item with automation name. |
| Schemas/ImportExportConfigWindow.xaml | Refactors to shared modal styles and updates button layout. |
| Schemas/ApplyChangesWindow.xaml | Refactors to shared modal styles and adjusts footer/button layout. |
| Schemas/AboutWindow.xaml | Refactors to shared modal styles and adjusts layout/margins. |
| Config/Features.json | Large reformat + schema/content changes (e.g., labels, removed Action fields). |
| .gitignore | Ignores Backups/* and normalizes Win11Debloat.log pattern line. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…eferences Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 28 out of 30 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 28 out of 30 changed files in this pull request and generated 5 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…epth Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 32 out of 33 changed files in this pull request and generated 6 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 33 out of 34 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…stry backup Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
…d user Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
…tion and improve Start Menu backup handling Co-authored-by: Copilot <copilot@github.com>
A registry backup will be created every time Win11Debloat applies changes.
Afterwards, this backup can be used to restore any registry changes made by Win11Debloat.