Skip to content

fix: give the Windows Update list a real select-all checkbox#843

Merged
laurentiu021 merged 2 commits into
mainfrom
fix/r7-windowsupdate-select-all
Jun 11, 2026
Merged

fix: give the Windows Update list a real select-all checkbox#843
laurentiu021 merged 2 commits into
mainfrom
fix/r7-windowsupdate-select-all

Conversation

@laurentiu021

Copy link
Copy Markdown
Owner

What

Audit Round 7 (accessibility, Gate-UX) — finding #66. The updates grid's checkbox column used a decorative header that did nothing and had no accessible name (it announced as an anonymous control). Replaced it with a working select-all checkbox (AutomationProperties.Name="Select all updates").

  • New AllSelected VM property; OnAllSelectedChanged toggles every row's IsSelected.
  • The existing Select all / Deselect all buttons now route through a shared SetAllSelected helper that keeps AllSelected in sync, guarded against re-entrancy so a button press doesn't re-fire the header handler.
  • The header checkbox binds to the DataGrid's DataContext via RelativeSource to reach the VM from inside the column-header template.

Behavior

The header checkbox is a new, additive control. Existing button behavior is preserved (now also syncing the header state). Row toggles are unaffected.

Tests

Added regression tests: header toggle selects/deselects all rows, and the Select all / Deselect all commands keep AllSelected in sync.

Verification

  • Build: main + unit + integration, 0 errors / 0 warnings (Release).

Notes

  • fix: (user-visible + accessibility) — version bumped to 1.20.12, CHANGELOG updated in this PR. Triggers a release.

The updates grid's checkbox column used a decorative checkmark header that did
nothing and had no accessible name (it announced as an anonymous control).
Replaced it with a working select-all checkbox bound to a new AllSelected VM
property, with AutomationProperties.Name='Select all updates'.

- AllSelected toggles every row's IsSelected via OnAllSelectedChanged.
- The existing Select all / Deselect all buttons now route through a shared
  SetAllSelected helper that keeps AllSelected in sync, guarded against
  re-entrancy so a button press doesn't re-fire the header handler.
- Added regression tests for the header toggle and button-sync behavior.

The header checkbox binds to the DataGrid's DataContext via RelativeSource so
it reaches the VM from inside the column header template.
The first version drove the row apply only through OnAllSelectedChanged, which
CommunityToolkit does not raise when the value is unchanged — so toggling the
header to a value it already held (e.g. deselect when AllSelected was still its
default false) was a no-op against already-selected rows. SetAllSelected now
always loops the rows and only syncs AllSelected when it actually differs, and
OnAllSelectedChanged routes through it. AllSelected is also synced to true after
a scan (listed updates default selected) so the header reflects reality.

Tests rewritten to exercise real header transitions from a synced starting
state.
@laurentiu021 laurentiu021 merged commit 943615a into main Jun 11, 2026
4 checks passed
@laurentiu021 laurentiu021 deleted the fix/r7-windowsupdate-select-all branch June 11, 2026 08:51
laurentiu021 added a commit that referenced this pull request Jun 11, 2026
…#845)

AboutViewModel's constructor fires InitializeAsync(InitAsync), a fire-and-forget
network call that populates UpdateStatus / LatestNotes / LatestVersionLabel /
LatestPublishedLabel / UpdateAvailable. Five tests asserting those default values
raced that call and failed intermittently on slow CI (e.g. LatestNotes_DefaultsEmpty
failed once in PR #843's pipeline).

Added an internal AboutViewModel(updates, reportService, autoCheck) constructor;
both public constructors pass autoCheck: true so production behavior is unchanged
(the startup check still runs). The five default-state tests now construct with
autoCheck: false via a NewVmNoAutoCheck helper, asserting the constructor's real
defaults deterministically with no network and no race.

No release (test:); production behavior byte-identical.

Co-authored-by: laurentiu021 <laurentiu021@users.noreply.github.com>
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.

1 participant