fix: say that Scheduled Maintenance keeps one schedule, before Save replaces it - #2349
Merged
Merged
Conversation
…eplaces it The tab registers a single Windows task at a fixed name, so Save does not add a second schedule — it overwrites the first. Nothing said so. The header mentioned "one Windows scheduled task" in passing, which reads as an implementation detail rather than a limit that affects you. The Configure card offered an action and a time as though each Save were a new entry. And the confirmation dialog said "This creates a Windows scheduled task" even when one already existed, so the dialog whose whole purpose is to stop an unwanted change actively concealed which change it was. Someone who wanted a weekly cleanup AND a monthly standby purge would have set the second, silently lost the first, and seen the tab report the survivor as though nothing had gone (#1509). Three statements of the same fact, at the three moments it matters: - the header now says SysManager keeps one schedule at a time and that saving a new one replaces the previous one; - a line beside the Save button says the rule, and changes to "saving this replaces the one above" as soon as a schedule exists, so it reads as a warning only when there is something to lose; - the confirmation asks a different question in each case. Replacing says so in those words and names the time the old schedule was next due — the only detail the status read-back has, since it reports state and times rather than which action Windows is holding, and it comes from the same read the card above displays, so the dialog and the card cannot disagree. Supporting several schedules was considered and deliberately not done, and the CHANGELOG says why: the design rests on touching exactly one task by name, which is what keeps the feature from needing administrator rights and what makes it incapable of disturbing anything else Windows has scheduled. No new CLI verbs and no new actions, so the headless surface is unchanged. 5 tests, asserted through DialogAnswer rather than the file's older hand-rolled DialogService swap, because for this gate the WORDING is the behaviour and the old helper cannot read it. Red ritual, four mutations, each red for the right reason and green after restore: the pre-fix single confirmation text (2 red — the replace wording and the create wording, since even the create case now states the rule); the note stopping to depend on whether a schedule exists (1); the replace text dropping the next run (1); the dialog title no longer distinguishing replace from create (1). The "declining leaves the task alone" test passes either way and is a regression guard on a path that had no test, not a proof of this change. Unit suite 5798 passed, 0 failed. All four projects build with 0 warnings. Closes #1509
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Scheduled Maintenance registers a single Windows task at a fixed name, so Save does not add a second schedule — it overwrites the first. Nothing said so.
Someone who wanted a weekly cleanup and a monthly standby purge would have set the second, silently lost the first, and then seen the tab report the survivor as though nothing had gone.
What changed
Three statements of the same fact, at the three moments it matters.
The header now says SysManager keeps one schedule at a time and that saving a new one replaces the previous one.
A line beside the Save button says the rule, and changes to "saving this replaces the one above" as soon as a schedule exists — so it reads as a warning only when there is something to lose, and as reassurance otherwise.
The confirmation asks a different question in each case. Replacing says so in those words, and names the time the old schedule was next due. That is the only detail available: the status read-back reports state and times, not which action or trigger Windows is holding. It is enough to tell the user which schedule they are about to lose, and it comes from the same read the card above displays, so the dialog and the card cannot disagree. The dialog title changes too — "Replace Schedule — Confirm" rather than "Schedule Maintenance — Confirm".
What deliberately did not change
No new CLI verbs and no new actions. #1509 originally proposed adding a scheduled health check and a browser-cache clean. Supporting several schedules — which more actions would create an expectation of — was considered and turned down, and the reason is now written into the code and the CHANGELOG rather than living in an issue: the design rests on touching exactly one task by name, and that is precisely what keeps the feature from needing administrator rights and what makes it incapable of disturbing anything else Windows has scheduled. The headless attack surface is unchanged.
Verification
5 new tests, asserted through
DialogAnswerrather than the file's older hand-rolledDialogServiceswap — for this gate the wording is the behaviour, and the older helper cannot read it. A secondNewScheduledVmAsynchelper mirrorsMaintenanceSchedulerServiceTests.StatusRowso the "a task already exists" path is reachable at all; it had no test before.Red ritual — four mutations, each red for the right reason, green after restore, every file restored from saved bytes and rebuilt before running:
The 2 in the first row is worth stating: I predicted 3, and the fourth new test — "declining a replacement leaves the task alone" — passes either way, because No meant No before this change too. It is a regression guard on a path that had no test, not a proof of this one.
dotnet build -c Release, 0 errors, 0 warnings.dotnet format --verify-no-changes: clean..cs,.xamland.md: no test or doc quoted it, andAllTabsSmokeUiTestschecks only the unchangedDisplayheader.Closes #1509