Skip to content

fix: About and Bulk Installer say when a switch that decides whether SysManager goes online could not be saved - #2945

Merged
laurentiu021 merged 1 commit into
mainfrom
fix/online-switches-say-when-not-saved
Oct 22, 2026
Merged

laurentiu021 merged 1 commit into
mainfrom
fix/online-switches-say-when-not-saved

Conversation

@laurentiu021

Copy link
Copy Markdown
Owner

Closes #2833.

Confirmed in the code: UpdateCheckPreferenceService.Save caught IOException and UnauthorizedAccessException, logged at Debug and returned nothing, so SetCheckOnStartup and SetCheckAppUpdatesOnStartup could not say a save failed; AppIconService.SetNetworkFetchEnabled returned the flag it had just set. About's two handlers and Bulk Installer's OnLoadWebIconsChanged ignored both. About's view binds no StatusMessage, so the sentence the other tabs use would have been set where nobody reads it.

The changes:

  • Save and the two setters return whether the file was written, and SetNetworkFetchEnabled returns whether the choice was saved, the shape DiskAnalyzerPreferenceService.Save and WindowsThemeService.SaveSchedule use. RecordCheck is unchanged: a record that is not kept only means the next start checks again.
  • About: a new StartupChecksStatus, shown under the two checkboxes in the SubtleStatusLine style and collapsed while empty, like the report and rollback lines on the same card. It says ChangeNotSavedStatus when a choice could not be saved and clears once one is.
  • Bulk Installer: ChangeNotSavedStatus on the status line when the web-icons choice could not be saved.

Docs

README: the network notice says About and Bulk Installer tell you when one of these choices cannot be saved. ARCHITECTURE: UpdateCheckPreferenceService and AppIconService.

Tests

  • New in UpdateCheckPreferenceServiceTests: the switches and Save say a choice was saved, and say so when a folder where the file goes makes the write fail.
  • New in AppIconServiceTests: a choice that cannot be saved says so, holds for this run, and the next start does not fetch. SetNetworkFetchEnabled_TogglesAndReportsValue asserted the old return, the flag, and now asserts the flag and the save separately.
  • New in AboutViewModelUpdateGateTests: a choice that cannot be saved puts the sentence under the switches, and a later one that is saved clears it.
  • New in BulkInstallerViewModelTests: turning web icons on when the choice cannot be saved says so, and saved choices say nothing. The icon service gets a handler that answers 404, so nothing goes online.
  • New in AboutViewUiTests (integration): the sentence is on the page, under the switches, once a choice cannot be saved.
  • Red before the fix, green after, each undone on its own: Save claiming a save it did not make, About ignoring the result, the icon switch returning the flag again (which also put the sentence up after a saved "off"), Bulk Installer ignoring the result, and the line removed from the view.
  • Run locally, twice: every unit class that names the four changed types (AboutViewModelTests and its three sibling classes, AboutUpdateExitTests, AppIconServiceTests, AtomicFileTests, the three Bulk Installer classes, DashboardViewModelTests, EnvironmentVariablesViewModelTests, NetworkUseGuard, ProfileServiceTests, RowMarkBindingTests, SecurityPromiseTests, both Settings Watchdog classes, UpdateCheckPreferenceServiceTests, WingetFailureTests, ArchitectureTests and InclusiveTermsTests), and the integration classes that name them. All four projects build with 0 warnings, and dotnet format --verify-no-changes is clean. The new line has not been looked at on screen.

…SysManager goes online could not be saved

- UpdateCheckPreferenceService.Save, SetCheckOnStartup and SetCheckAppUpdatesOnStartup, and
  AppIconService.SetNetworkFetchEnabled return whether the choice was written, as DiskAnalyzerPreferenceService.Save
  does. They returned nothing, or the flag just set, so a choice that was not kept looked kept, and the next start went
  online after it had been switched off.
- About shows ChangeNotSavedStatus in a line of its own under the two checkboxes, because the tab has no shared status
  line, and clears it once a choice is saved. Bulk Installer shows it on its status line.
@codecov-commenter

Copy link
Copy Markdown

❌ 1 Tests Failed:

Tests completed Failed Passed Skipped
8750 1 8749 0
View the top 1 failed test(s) by shortest run time
SysManager.Tests.DisplayProfileViewModelTests::SysManager.Tests.DisplayProfileViewModelTests.AWindowsDisplayChange_ReadsTheDisplaysAgain_AndLeavesTheStatusLineAlone
Stack Traces | 0.003s run time
at SysManager.Tests.DisplayProfileViewModelTests.AWindowsDisplayChange_ReadsTheDisplaysAgain_AndLeavesTheStatusLineAlone() in .../_/SysManager/SysManager.Tests/DisplayProfileViewModelTests.cs:line 239
--- End of stack trace from previous location ---

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

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.

[Bug]: About, Bulk Installer — the three switches that decide whether SysManager goes online say nothing when their save fails

2 participants