Commit 30255ee
fix(verify): publish what Verify finds, and give the user a way to fix it
Clicking "Verify all" reported a drifted setting while the Status page kept
showing 0, and there was nothing to click to put the setting back.
Two independent causes.
Verify never published what it found. It ran its own CheckDrift loop, logged a
snapshot and showed a count in a MessageBox, and never touched MonitorService.
The Status page reads MonitorService.CurrentDrift, so it kept showing whatever
the last background poll published -- up to ten minutes stale for a stable
setting. Verify is a full re-read of every monitor, so its findings are now
published as a full scan via PublishManualScan. Nothing is applied and no
notification is raised: Verify still only reports.
Verify and Status were also counting different populations. The background scan
filters CheckDrift on IsMonitored; Verify did not, so it counted unmonitored
settings too. That is the reported case exactly -- on the reporter's machine all
ten drifted settings are unmonitored, so Verify counted ten and Status correctly
counted zero. Only monitored drift is published (the Status count is defined as
monitored settings), and the window now states the split in words rather than
leaving the user to reconcile two numbers.
A third defect in the same family, found while fixing these: RecordVerifiedApplies
seeded _lastVerified but left the published snapshot alone, so fixing a setting by
hand left it in the count until its tier was next scanned. The auto-apply path
already dropped verified ids via appliedAndVerified; the manual path did not.
Verified applies now leave the snapshot too, which is what makes the new Fix
button move the number.
Publishing is no longer single-writer, so the read-modify-write takes a lock and
the event is raised outside it -- a UI handler that marshals to the dispatcher
would otherwise deadlock the next publisher.
VerifyResultsWindow replaces the MessageBox: every drifted setting with its
current and desired value, where it lives, how it is enforced, and a badge on the
unmonitored ones. "Fix these settings" runs the same verified-apply path as the
Settings Apply button -- apply, re-read, log, ApplyResultsWindow, and the shared
unowned RebootPrompt.
Verified by opening the window in the running app, not only by the suite. The
construction test deliberately does not claim to cover the row template: with a
broken StaticResource in it the test still passed under construction,
Measure/Arrange, Show(), and a drained dispatcher queue, because an ItemsControl
never generates containers in that host. That limitation is written into the test
rather than left implied.
739 stable / 721 beta tests pass.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>1 parent f2a5010 commit 30255ee
5 files changed
Lines changed: 735 additions & 22 deletions
File tree
- src/GamerGuardian
- Services
- UI
- tests/GamerGuardian.Tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
96 | | - | |
97 | | - | |
98 | | - | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
99 | 104 | | |
100 | 105 | | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
101 | 110 | | |
102 | 111 | | |
103 | 112 | | |
| |||
205 | 214 | | |
206 | 215 | | |
207 | 216 | | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
208 | 224 | | |
209 | 225 | | |
210 | 226 | | |
211 | 227 | | |
| 228 | + | |
212 | 229 | | |
213 | 230 | | |
214 | 231 | | |
215 | 232 | | |
| 233 | + | |
216 | 234 | | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
217 | 254 | | |
218 | 255 | | |
219 | 256 | | |
| |||
449 | 486 | | |
450 | 487 | | |
451 | 488 | | |
452 | | - | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
453 | 503 | | |
454 | | - | |
455 | | - | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
456 | 510 | | |
457 | | - | |
458 | | - | |
459 | | - | |
460 | | - | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
461 | 516 | | |
462 | | - | |
| 517 | + | |
| 518 | + | |
463 | 519 | | |
464 | 520 | | |
465 | 521 | | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
466 | 548 | | |
467 | 549 | | |
468 | 550 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1935 | 1935 | | |
1936 | 1936 | | |
1937 | 1937 | | |
1938 | | - | |
1939 | | - | |
1940 | | - | |
| 1938 | + | |
| 1939 | + | |
| 1940 | + | |
| 1941 | + | |
| 1942 | + | |
| 1943 | + | |
| 1944 | + | |
| 1945 | + | |
| 1946 | + | |
| 1947 | + | |
| 1948 | + | |
1941 | 1949 | | |
1942 | 1950 | | |
1943 | 1951 | | |
1944 | 1952 | | |
1945 | 1953 | | |
1946 | 1954 | | |
1947 | | - | |
| 1955 | + | |
1948 | 1956 | | |
1949 | 1957 | | |
1950 | 1958 | | |
| |||
1953 | 1961 | | |
1954 | 1962 | | |
1955 | 1963 | | |
1956 | | - | |
| 1964 | + | |
1957 | 1965 | | |
1958 | 1966 | | |
1959 | 1967 | | |
1960 | | - | |
1961 | | - | |
1962 | | - | |
1963 | | - | |
1964 | | - | |
1965 | | - | |
| 1968 | + | |
| 1969 | + | |
| 1970 | + | |
| 1971 | + | |
| 1972 | + | |
| 1973 | + | |
| 1974 | + | |
| 1975 | + | |
| 1976 | + | |
| 1977 | + | |
| 1978 | + | |
| 1979 | + | |
| 1980 | + | |
| 1981 | + | |
| 1982 | + | |
| 1983 | + | |
| 1984 | + | |
1966 | 1985 | | |
1967 | 1986 | | |
1968 | 1987 | | |
| |||
1971 | 1990 | | |
1972 | 1991 | | |
1973 | 1992 | | |
| 1993 | + | |
| 1994 | + | |
| 1995 | + | |
| 1996 | + | |
| 1997 | + | |
| 1998 | + | |
| 1999 | + | |
| 2000 | + | |
| 2001 | + | |
| 2002 | + | |
| 2003 | + | |
| 2004 | + | |
| 2005 | + | |
| 2006 | + | |
| 2007 | + | |
| 2008 | + | |
| 2009 | + | |
| 2010 | + | |
1974 | 2011 | | |
1975 | 2012 | | |
1976 | 2013 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
0 commit comments