Skip to content

[Enhancement]: Notification Blocker — replace "master switch", and "whitelist" in comments and test names #2617

Description

@laurentiu021

Problem

The app's own text calls Notification Blocker's main toggle "the master switch" (Views/NotificationBlockerView.xaml:43, ViewModels/NotificationBlockerViewModel.cs:143, :212), and the README and ARCHITECTURE.md repeat it. Comments, log messages and tests use "master toggle" (Services/NotificationBlockerService.cs, Services/GamingTweaks.cs, Models/GamingProfile.cs), and "whitelist" and "whitelisted" describe the scheduler's fixed arguments (Models/MaintenanceSchedule.cs, Services/MaintenanceSchedulerService.cs, MaintenanceScheduleTests.CliArguments_MapToWhitelistedVerbs, MaintenanceSchedulerServiceTests.RegisterAsync_PassesWhitelistedArgs_NeverFreeText). The docs already say "allowlist".

Proposed solution

  • The switch becomes the "main switch" (or "All notifications"), in the view, the confirmation, the status line and the README.
  • "Master toggle" becomes "main toggle" in comments and log messages; "whitelist" and "whitelisted" become "allowlist" and "allowlisted", test names included.
  • notification-master-writes.json keeps its name, because it is a file on users' PCs that a rename would orphan, unless the rename comes with a one-time migration.
  • SetMasterVolume, GetMasterVolume and similar are Windows API names and stay.

Affected tab

Notification Blocker

Activity

  1. laurentiu021 commented on Oct 9, 2026

    @laurentiu021
    OwnerAuthor

    Fixed in v1.128.3 (#2657).

    Cause. An earlier pass removed these words by hand in 0.48.22, and nothing kept them out afterwards: they came back with the maintenance scheduler in 1.50.0, whose fixed arguments were "whitelisted", and with Notification Blocker in 1.56.0, whose top toggle was "the master switch" on screen, in its confirmation, on the status line and in the README, and in the comments, log messages, identifiers and test names behind it.

    Fix. The toggle is the main switch everywhere it is named: MasterEnabled became AllowNotifications, after the caption beside it, and the view binds to it; ReadMasterToggleWriteCount became ReadMainToggleWriteCount; the log lines say main toggle, or name ToastEnabled where reading or writing that value is denied. The scheduler's arguments are an allowlist, test names included, and the one use in the changelog's history now says main switch. What the switch does is unchanged. As proposed, notification-master-writes.json keeps its name, so the count on PCs that have one is not lost, and SetMasterVolume and its relatives stay, as Windows API names.

    Guard. InclusiveTermsTests reads every text file in the repository's top folder, .github, docs and the solution, and fails on a non-inclusive term. The only uses it allows are those API names, that file name, and winget-pkgs' own branch in the README link and the release steps. Against the unfixed tree it failed on 103 lines in 18 files; it passes over 978 files now, and each of eight mutations of it, or of a file it reads, turns a named test red.

    Files. ViewModels/NotificationBlockerViewModel.cs, Views/NotificationBlockerView.xaml, Services/NotificationBlockerService.cs, Services/GamingTweaks.cs, Services/GamingProfileService.cs, Models/GamingProfile.cs, Models/MaintenanceSchedule.cs, Services/MaintenanceSchedulerService.cs, Services/IAudioMixerService.cs, their tests, the new InclusiveTermsTests, README, ARCHITECTURE, CONTRIBUTING and CHANGELOG.

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

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions