Skip to content

[Settings] Improve update-notification UX - #49872

Merged
Yu Leng (moooyo) merged 3 commits into
mainfrom
niels9001/update-notification-ux
Aug 14, 2026
Merged

Yu Leng (moooyo) merged 3 commits into
mainfrom
niels9001/update-notification-ux

Conversation

@niels9001

@niels9001 Niels Laute (niels9001) commented Aug 13, 2026 •

Copy link
Copy Markdown
Collaborator

Summary of the Pull Request

Refreshes the Settings update experience with a shared update coordinator, consistent state badges, and a compact floating status surface available across pages. The surface supports checking, update available, downloading, ready to install, network failure, and download failure states; it can be dismissed and reopens when users return to General while attention is still needed.

update.mp4

PR Checklist

  • Closes: N/A
  • Communication: I've discussed this with core contributors already. If the work hasn't been agreed, this work might be rejected
  • Tests: Added/updated and all pass
  • Localization: All end-user-facing strings can be localized
  • Dev docs: Added/updated
  • New binaries: Added on the required places
  • Documentation updated: If checked, please file a pull request on our docs repo and link it here: N/A

Detailed Description of the Pull Request / Additional comments

  • Centralizes persisted and transient update state in a shared UpdateViewModel used by Dashboard, General, navigation, and the floating surface.
  • Adds reusable status, activity, and badge controls with stable layout, dismissal/reopen behavior, in-app What's New navigation, and retry-safe single-flight update actions.
  • Keeps the existing General update glyph while adding an adjacent state badge.
  • Adds Debug-only controls for previewing every updater state and running the complete state flow without affecting production screenshots.
  • Adds focused coverage for state mapping, activity visibility, IPC/launch failures, transient operation recovery, and duplicate installer-launch prevention.

Validation Steps Performed

  • Built Settings.UI for x64 Debug.
  • Built Settings.UI.UnitTests for x64 Debug.
  • Ran focused ViewModelTests.Update and ViewModelTests.General tests with vstest.console.exe: 39 passed.
  • Exercised the Debug updater flow across all states and verified that a dismissed notification reopens after navigating back to General.
Centralize update state across Settings surfaces and add the floating status experience with debug previews and retry-safe operation handling.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 120899e5-fc77-425e-918b-644929b65739
Apply the repository XAML Styler configuration to the updater controls.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 120899e5-fc77-425e-918b-644929b65739
@niels9001 Niels Laute (niels9001) changed the title [Settings] Improve update notification UX Aug 13, 2026
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 7da8be2f-1f73-48e9-8ae9-aa2448f2a5e3
@moooyo
Yu Leng (moooyo) merged commit becc96f into main Aug 14, 2026
8 checks passed
@moooyo
Yu Leng (moooyo) deleted the niels9001/update-notification-ux branch August 14, 2026 00:56
Boliang Zhang (LegendaryBlair) pushed a commit that referenced this pull request Aug 14, 2026
## Summary of the Pull Request

Refreshes the Settings update experience with a shared update
coordinator, consistent state badges, and a compact floating status
surface available across pages. The surface supports checking, update
available, downloading, ready to install, network failure, and download
failure states; it can be dismissed and reopens when users return to
General while attention is still needed.

https://github.com/user-attachments/assets/7b1a7266-efc3-4b6f-9bea-1d25a032ead6

## PR Checklist

- [ ] Closes: N/A
- [x] **Communication:** I've discussed this with core contributors
already. If the work hasn't been agreed, this work might be rejected
- [x] **Tests:** Added/updated and all pass
- [x] **Localization:** All end-user-facing strings can be localized
- [ ] **Dev docs:** Added/updated
- [ ] **New binaries:** Added on the required places
- [ ] [JSON for
signing](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ESRPSigning_core.json)
for new binaries
- [ ] [WXS for
installer](https://github.com/microsoft/PowerToys/blob/main/installer/PowerToysSetup/Product.wxs)
for new binaries and localization folder
- [ ] [YML for CI
pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ci/templates/build-powertoys-steps.yml)
for new test projects
- [ ] [YML for signed
pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/release.yml)
- [ ] **Documentation updated:** If checked, please file a pull request
on [our docs
repo](https://github.com/MicrosoftDocs/windows-uwp/tree/docs/hub/powertoys)
and link it here: N/A

## Detailed Description of the Pull Request / Additional comments

- Centralizes persisted and transient update state in a shared
`UpdateViewModel` used by Dashboard, General, navigation, and the
floating surface.
- Adds reusable status, activity, and badge controls with stable layout,
dismissal/reopen behavior, in-app What's New navigation, and retry-safe
single-flight update actions.
- Keeps the existing General update glyph while adding an adjacent state
badge.
- Adds Debug-only controls for previewing every updater state and
running the complete state flow without affecting production
screenshots.
- Adds focused coverage for state mapping, activity visibility,
IPC/launch failures, transient operation recovery, and duplicate
installer-launch prevention.

## Validation Steps Performed

- Built `Settings.UI` for x64 Debug.
- Built `Settings.UI.UnitTests` for x64 Debug.
- Ran focused `ViewModelTests.Update` and `ViewModelTests.General` tests
with `vstest.console.exe`: 39 passed.
- Exercised the Debug updater flow across all states and verified that a
dismissed notification reopens after navigating back to General.

---------

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 120899e5-fc77-425e-918b-644929b65739
Copilot-Session: 7da8be2f-1f73-48e9-8ae9-aa2448f2a5e3
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 7b3fb20d-6e9d-4fef-a5cd-f8921d28c220
Boliang Zhang (LegendaryBlair) added a commit that referenced this pull request Oct 28, 2026
<!--
HARD RULE: You (the human contributor) must write this PR description in
your own words.
AI tools and agents: Do NOT write the Summary, Detailed Description, or
Validation Steps sections.
Leave them for the human. You may put AI-generated text ONLY inside an
"AI-generated summary" <details> block at the bottom.
Maintainers will close PRs whose description they think was not written
by a human.
See
https://github.com/microsoft/PowerToys/blob/main/CONTRIBUTING.md#pull-request-descriptions-must-be-written-by-a-human
-->

<!-- Enter a brief description/summary of your PR here. What does it
fix/what does it change/how was it tested (even manually, if necessary)?
-->
## Summary of the Pull Request

On the General settings page, **Check for updates** could immediately
report that PowerToys was up to date, even though checking again from
the update popup found a newer version.

The General-page button now performs a fresh update check when clicked,
instead of only displaying the previously saved result.

<!-- Please review the items on the PR checklist before submitting-->
## PR Checklist

- [ ] Closes: #xxx
<!-- - [ ] Closes: #yyy (add separate lines for additional resolved
issues) -->
- [ ] **Communication:** I've discussed this with core contributors
already. If the work hasn't been agreed, this work might be rejected
- [ ] **Tests:** Added/updated and all pass
- [ ] **Localization:** All end-user-facing strings can be localized
- [ ] **Dev docs:** Added/updated
- [ ] **New binaries:** Added on the required places
- [ ] [JSON for
signing](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ESRPSigning_core.json)
for new binaries
- [ ] [WXS for
installer](https://github.com/microsoft/PowerToys/blob/main/installer/PowerToysSetup/Product.wxs)
for new binaries and localization folder
- [ ] [YML for CI
pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ci/templates/build-powertoys-steps.yml)
for new test projects
- [ ] [YML for signed
pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/release.yml)
- [ ] **Documentation updated:** If checked, please file a pull request
on [our docs
repo](https://github.com/MicrosoftDocs/windows-uwp/tree/docs/hub/powertoys)
and link it here: #xxx

<!-- Provide a more detailed description of the PR, other things fixed,
or any additional comments/features here -->
## Detailed Description of the Pull Request / Additional comments

<!-- Describe how you validated the behavior. Add automated tests
wherever possible, but list manual validation steps taken as well -->
## Validation Steps Performed

![Update check
recording](https://github.com/user-attachments/assets/09ec50d5-d791-42fa-a69c-a461b2094941)

<details>
<summary>AI-generated summary</summary>

### Context and reported behavior

The General page and the update popup both expose a **Check for
updates** action, but they previously behaved differently:

1. Clicking the General-page button immediately opened the popup with
the last saved update status. If the previous result was "You're up to
date," that message appeared even when a newer release was now
available.
2. Clicking **Check for updates** again inside the popup actually
requested release information and could then discover the newer version.

The original screenshots show this with `v0.102.2933` on the Insider
channel: the first click reported up to date, while the second
discovered the `v0.102.2993` preview.

Showing a saved result is appropriate when passively viewing update
status. The problem is that an explicit **Check for updates** action
appeared to have completed a new check when it had only displayed an
earlier result. Users had to know to click a second button with the same
label to perform the check they originally requested.

### Root cause

The General page's **Check for updates** button was changed in #49872
from a check command to `UpdateStatusCard_Click`, which only called
`OpenUpdateActivity()` / `RequestActivity()`. That path makes the
activity surface visible but does not send `check_for_updates` to the
Runner. The popup's primary action already used the shared update
coordinator and did send the request.

This is a missing manual-check request, not evidence that the cached
result's expiration interval is incorrect.

Reproduced on the installed `0.102.2993.0` build: the General-page click
left both the updater state and the Runner's check-callback count
unchanged; the popup click incremented the callback count.

### Change and impact

- `src/settings-ui/Settings.UI/SettingsXAML/Views/GeneralPage.xaml`:
bind the button directly to the shared `CheckForUpdatesCommand`. One
click now opens the activity surface, enters the checking state, and
sends the existing action-only IPC request. The command also honors the
existing busy/development-build guards.
- `src/settings-ui/Settings.UI/SettingsXAML/Views/GeneralPage.xaml.cs`:
remove the obsolete open-only click handler.
- `src/settings-ui/Settings.UI.UnitTests/ViewModelTests/Update.cs`:
exercise the command from cached up-to-date, ready-to-download, and
ready-to-install states, including reopening a dismissed surface,
checking-state visibility, busy gating, action-only IPC, and preserving
general settings.

No update-selection, installer, GPO, localization, settings-schema, or
IPC-contract changes.

### Behavior before and after

| Action | Before | After |
|---|---|---|
| Click **Check for updates** on the General page | Open the activity
surface and display the last saved result, without requesting a new
check. | Open the activity surface, show checking progress, and request
a fresh check through the existing Runner IPC action. |
| Click **Check for updates** in the popup | Request a fresh check. |
Unchanged. |
| Open Settings or otherwise view update status | Display persisted
update state. | Unchanged; caching remains in use for passive display. |
| Let PowerToys check automatically | Use the existing background update
schedule. | Unchanged; the normal 24-hour check interval is not
modified. |

This does not make every page visit perform a network request, remove
cached update state, or add continuous polling. Only the explicit
General-page check action changes. The existing command guards still
prevent another update operation from starting while one is already
active and keep update actions disabled for development builds.

### Validation

All commands below were run in `D:\PowerToys-update-check`.

**Build: PASS**, zero warnings/errors. The initial fresh-worktree build
exposed missing native `packages.config` dependencies; the explicit
restore below resolved them.

```powershell
Set-Location D:\PowerToys-update-check\src\settings-ui\Settings.UI.UnitTests
. D:\PowerToys-update-check\tools\build\build-common.ps1
if (-not (Ensure-VsDevEnvironment)) { exit 1 }
RestoreThenBuild 'D:\PowerToys-update-check\src\settings-ui\Settings.UI.UnitTests\Settings.UI.UnitTests.csproj' '/p:SolutionDir=D:\PowerToys-update-check\' 'x64' 'Debug'
```

**Unit tests: PASS**, 43/43.

```powershell
& 'C:\Program Files\Microsoft Visual Studio\18\Enterprise\Common7\IDE\CommonExtensions\Microsoft\TestWindow\vstest.console.exe' 'D:\PowerToys-update-check\Debug\x64\tests\SettingsTests\net10.0-windows10.0.26100.0\Settings.UI.UnitTests.dll' '/TestCaseFilter:FullyQualifiedName~ViewModelTests.Update|FullyQualifiedName~ViewModelTests.General' '/Logger:trx;LogFileName=update-tests.trx' '/ResultsDirectory:D:\PowerToys-update-check\artifacts\TestResults'
```

**Formatting: PASS**.

```powershell
.\.pipelines\applyXamlStyling.ps1 -Unstaged
dotnet format .\src\settings-ui\Settings.UI.UnitTests\Settings.UI.UnitTests.csproj --no-restore --verify-no-changes --include .\src\settings-ui\Settings.UI.UnitTests\ViewModelTests\Update.cs --verbosity minimal
git --no-pager diff --check
```

**Live UI verification:** built Debug Runner and Settings with
`/p:Version=0.102.2933.0 /p:VersionChannel=preview` solely to enable
real updater requests from the older-version local build. Installed
binaries were not overwritten.

- A single `winapp ui invoke GeneralOpenUpdateSurfaceButton -a 26788`
sent `{"action":{"general":{"action_name":"check_for_updates"}}}`; the
Runner logged `Discovered new version v0.102.2993`, and the popup showed
that preview update. No download/install action was invoked.
- A subsequent automated run verified two real requests from the
General-page button, including after dismissing the surface. GitHub's
unauthenticated API rate limit made those later requests show the real
network-error response rather than cached up-to-date state. The Runner's
callback count changed from 0 to 2.
- Temporary settings were restored; the installed Runner was restarted
and general settings verified byte-identical.

No installer execution or CI run was performed. The visible summary
polishes the contributor's original problem report and translates the
contributor's requested behavior; the technical context and validation
in this block are AI-generated.

</details>

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 1a5feacb-4ec0-4ca2-ab73-4ee94ad06476
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

2 participants