Skip to content

[Docs]: Code comments that no longer match the code #2616

Description

@laurentiu021

Problem

Comments a contributor will trust, each contradicted by the code beside it:

  • ViewModels/NavItem.cs:125-128: "37 view-models set IsProgressIndeterminate and 10 set Progress", and Deep Cleanup, File Shredder and Speed Test are "in the second group". 7 set Progress, and those three set neither (see the taskbar issue).
  • ViewModels/ViewModelBase.cs:90-96 and SysManager.Tests/ArchitectureTests.cs:2876-2884: "12 distinct spellings" of the refresh command, and ScanLargeFilesCommand. There are 11, and that command no longer exists (Large Files is its own tab).
  • Views/AdminBanner.xaml:21: cites ArchitectureTests.EveryAdminBannerHost_ExposesWhatTheBannerBinds; the test is TheElevationBanner_LivesInOneControl_AndItsHostsExposeWhatItBinds. :39 says the control "serves all 30 privileged tabs"; it serves 31.
  • Helpers/AtomicFile.cs:230: "Three attempts in all". It is four: the first try and three retries.
  • Services/UpdateService.cs:322: hash verification "is best-effort — network errors don't block install". A missing or unreadable hash refuses the update.
  • App.xaml:159: "the two layout strategies in the project docs". There are three.
  • Services/FileLockService.cs:23: "the one place we use classic [DllImport]". Seven files use it, 13 declarations.
  • Services/AudioMixerService.cs:17, :40-41: interop "for the seven" interfaces, and a tab "created/destroyed on navigation". There are ten interfaces, and the service is a singleton disposed with the container.
  • Services/SystemFixService.cs:10: lists the network stack among its repairs; those resets live on Network Repair (the same file says so at :94).
  • ViewModels/SystemFixesViewModel.cs:21: "Repairs require administrator rights". The two desktop fixes do not.
  • ViewModels/BandwidthMonitorViewModel.cs:25: "(Monitor group)". Bandwidth Monitor is in the Network group.

Expected behavior

Each comment says what the code does now. Where a comment carries a count, it either goes or names the guard that keeps the count true.

Affected tab

Code comments only, no behaviour change

Activity

  1. added a commit that references this issue on Oct 9, 2026
    d371560
  2. laurentiu021 commented on Oct 9, 2026

    @laurentiu021
    OwnerAuthor

    Done in #2659. Comments only, so it ships with the next release rather than making one.

    Each item was re-read against the code before it changed. Two had been corrected since this was written and still carried a count nothing keeps true, so the number went: NavItem's progress signals (38 and 12 again after #2646) and the refresh spellings in ViewModelBase and the F5 guard (15 after #2598, with ScanLargeFilesCommand already gone). The rest now say what the code does:

    • AdminBanner.xaml cites TheElevationBanner_LivesInOneControl_AndItsHostsExposeWhatItBinds and serves every privileged tab, 31 today; the same count left AdminBanner.xaml.cs and that guard's remarks, comment and failure message.
    • AtomicFile: three retries, four attempts in all.
    • UpdateService.VerifyHashAsync: false for a mismatch, a .sha256 that cannot be downloaded or parsed, an unreadable file or a cancellation, and false means the update is not installed.
    • App.xaml: three layout strategies, named.
    • FileLockService: "this file uses classic [DllImport]"; eight files declare it today.
    • AudioMixerService: the Core Audio interfaces without a count, what is held across polls since [Bug]: Volume Control — an app sent to another output device loses its row's level, and leaves the list once it restarts #2652, a singleton disposed with the container, and the _groups key, which is the app key from the session-instance identifier rather than a PID string.
    • SystemFixService: Windows Update and WinGet; the network-stack reset is on Network Repair.
    • SystemFixesViewModel: the two desktop fixes are listed, and run as the user.
    • BandwidthMonitorViewModel: the Network group.

    Nine more comments name a test by a name it no longer has; they are listed in #2658, with a check that keeps a cited name true.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions