Skip to content

[Fix] Stabilize Windows update handoff, simplify updater responsibilities, and improve Changelog UX - #549

Merged
DearVa merged 2 commits into
mainfrom
refactor/software-update
Dec 2, 2026
Merged

DearVa merged 2 commits into
mainfrom
refactor/software-update

Conversation

@DearVa

@DearVa DearVa commented Dec 1, 2026 •

Copy link
Copy Markdown
Member

Description

Fix the Windows update shutdown deadlock, separate release discovery from installation, and consolidate Changelog update feedback into a single progress button.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change
  • Refactoring
  • Documentation update
  • CI/CD or Build changes

Current Behavior

  • Update cancellation and application shutdown can deadlock, leaving Everywhere unresponsive when Setup attempts cooperative shutdown.
  • Setup lacks a usable fallback when the running application does not exit.
  • Release discovery and installation responsibilities are mixed, including an exposed terminal handler and forwarding-only APIs.
  • The Changelog page displays separate status text, progress indicators, and a green cancel button with an unchanged icon.

Updated/Expected Behavior

Windows update handoff

  • Wait for UAC consent and installer process creation before requesting application shutdown.
  • Keep Everywhere running when elevation is canceled or installer launch fails.
  • In-app updates let Everywhere exit itself; standalone installation requests cooperative shutdown.
  • Interactive installation offers retry, force close and continue, or cancel after the shutdown timeout.
  • Silent installation force-closes remaining processes belonging to the target installation without a confirmation prompt, then verifies that they have exited.
  • Preserve close/force-close opt-out parameters. In-app installation retains progress and terminal error feedback; documented Microsoft Store parameters suppress installer UI and return failure codes.

Changelog update button

  • Replace separate download status and progress indicators with a fixed-height progress button.
  • Show a rotating loading indicator and download percentage; expose cancellation on hover or keyboard focus.
  • Keep checking, validation, cancellation, and installer-launch status visible. Disable interaction during non-cancellable stages.
  • Restore the appropriate download or installation action after cancellation, including declined UAC.
  • Show retry actions according to the available package state.
  • Remove redundant tooltips, retaining only target-version details and the cached-version caveat.
  • Preserve Linux's externally managed installation behavior and update all 13 localization files.

Implementation Details

  • Simplify cancellation ownership and dispose cancellation sources outside the updater lock.
  • Introduce IUpdateReleaseSource for release metadata, history, and fixed asset URL resolution.
  • Keep IPlatformUpdateHandler focused on package recognition and installation handoff; remove Linux's placeholder installer implementation.
  • Remove TerminalUpdateHandler, ResolveUpdateAsync, and both IsTerminalUpdate aliases. Consumers use the release source or CanInstallInApp directly.
  • Retain ReleaseInfo as a presentation model while removing obsolete JSON attributes.
  • Reuse ShadUI button styling and loading controls without introducing another update state machine.
  • Document Windows direct, in-app, and Microsoft Store EXE installation parameters.

Validation

  • Core update regression tests: 47 passed.
  • Final capability-alias cleanup: 13 relevant presentation/settings tests passed.
  • Windows updater/release-source tests: 4 passed.
  • Linux release-source tests: 5 passed on the Windows host using -p:IsWindows=false.
  • Installer fixtures exercised cooperative shutdown, scoped forced termination, and interactive/silent error handling.
  • Inspected light/dark Changelog renders and exercised pointer cancellation, keyboard cancellation, disabled handoff states, and live localization.
  • Rider inspection completed for the final Changelog and capability-cleanup changes with no errors.
  • Real desktop UAC acceptance/cancellation remains to be checked manually.
  • Native macOS installation remains unverified. C# compilation succeeded, but the full build stopped because the development signing identity was unavailable.

Checklist

  • My code follows the code style of this project
  • I have performed a self-review of my own code
  • I have added XML documentation to related APIs

Breaking Changes

No user-facing breaking changes. The cached update package format is unchanged.

Summary by CodeRabbit

  • New Features
    • The changelog now shows update download and installation progress, with clearer status, retry, and cancellation controls.
    • Update actions and progress messages are available in additional languages.
  • Improvements
    • Windows updates better handle open applications during installation, with clearer prompts and options to retry or close them.
    • Linux release history and update details are available in the changelog; package installation remains outside the app.

…handoff

Separate release discovery from platform installation and remove updater forwarding APIs.

Wait for Windows elevation before shutdown, avoid cancellation deadlocks, and provide scoped installer shutdown fallbacks.
@coderabbitai

coderabbitai Bot commented Dec 1, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

Release discovery and asset resolution move to platform-specific release sources. The updater uses an optional platform handler to manage in-app installation and cancellation. The changelog presents update progress and actions through a single button. The Windows installer changes its application shutdown and force-close flow.

Changes: Software update flow

Layer / File(s) Summary
Release source contract and platform implementations
src/Everywhere.Core/Common/SoftwareUpdate/*, src/Everywhere.Core/Common/IPlatformUpdateHandler.cs, src/Everywhere.Mac/Common/*Update*, src/Everywhere.Windows/Common/*Update*, platform Program.cs files, release-source tests, docs/Development/LinuxTerminalUpdate.md
A shared release-source contract and download-service implementation handle release details, history, asset resolution, and validation. macOS and Windows add platform-specific asset selection and register their sources.
Updater discovery, cancellation, and installation
src/Everywhere.Core/Common/SoftwareUpdate/ISoftwareUpdater.cs, src/Everywhere.Core/Common/SoftwareUpdate/SoftwareUpdater.cs, tests/Everywhere.Core.Tests/Common/SoftwareUpdate/SoftwareUpdaterLifecycleTests.cs, tests/Everywhere.Core.Tests/Common/SoftwareUpdate/TestDownloadServiceReleaseSource.cs
SoftwareUpdater uses a release source and an optional platform handler. Automatic and manual operations use distinct cancellation ownership, and recovery, downloads, and cleanup are gated by in-app installation capability. Lifecycle tests cover handoff retry and cancellation behavior.
Changelog release history and update controls
src/Everywhere.Core/ViewModels/Pages/ChangeLogViewModel.cs, src/Everywhere.Core/Views/OOBE/ChangeLogView.axaml, src/Everywhere.Core/Views/Chat/SoftwareUpdateButton.axaml.cs, src/Everywhere.Core/Views/Configuration/SoftwareUpdateControl.axaml.cs, src/Everywhere.Core/I18N/Strings*.resx, tests/Everywhere.Core.Tests/Common/SoftwareUpdate/UpdatePresentationTests.cs
The changelog loads releases through the release source and projects update stages, progress, button actions, and cancellation. The view uses one progress-aware button. Localized resources and presentation tests cover the updated controls.
Windows installer handoff and process shutdown
src/Everywhere.Windows/Common/WindowsUpdateHandler.cs, tools/installer.iss, docs/Development/WindowsInstallation.md
The Windows handler requests elevation and uses update-specific installer arguments. The installer checks for running processes and applies retry, cancellation, and permitted force-close behavior. The guide documents direct installation and Store submission parameters.

Estimated code review effort: 4 (Complex) | ~50 minutes

Change: Bug fix

Sequence Diagram(s)

sequenceDiagram
  participant SoftwareUpdater
  participant IUpdateReleaseSource
  participant IFileDownloadService
  participant IPlatformUpdateHandler
  SoftwareUpdater->>IUpdateReleaseSource: GetReleaseAsync(channel, tag)
  IUpdateReleaseSource-->>SoftwareUpdater: Release metadata and resolved asset
  SoftwareUpdater->>IFileDownloadService: Download update package
  IFileDownloadService-->>SoftwareUpdater: Cached package
  SoftwareUpdater->>IPlatformUpdateHandler: ExecuteUpdateAsync(package)
  IPlatformUpdateHandler-->>SoftwareUpdater: Handoff result or cancellation
Loading

Possibly related PRs

  • Sylinko/Everywhere#524: Both PRs modify SoftwareUpdater and the Windows update handoff; #549 changes the release-source contract and changelog update controls in the same flow.

Suggested reviewers: pasical, auroraziling

Merge Risk: Low · up to 1aa87 · assessed changes only

Path filters excluded changed files. This rating applies only to the assessed changes.

Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title names the main changes: a Windows update handoff fix, separating release discovery from installation through a new release source, and Changelog UX updates. These match the raw summary and t…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the main changes: a Windows update handoff fix, separating release discovery from installation through a new release source, and Changelog UX updates. These match the raw summary and the PR objectives. The title is long at 12 words and 99 characters, and it lists three themes, but it still reflects the primary changeset.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 63baa836-53a8-4baa-af34-5acd99fe6d3e
Commits

Reviewing files that changed from the base of the PR and between ba24293 and 1aa87d9.

Files ignored due to path filters: 2

  • src/Everywhere.Linux/Common/LinuxUpdateReleaseSource.cs is excluded by !src/Everywhere.Linux/**
  • src/Everywhere.Linux/Program.cs is excluded by !src/Everywhere.Linux/**
Files selected for processing: 41

  • docs/Development/LinuxTerminalUpdate.md
  • docs/Development/WindowsInstallation.md
  • src/Everywhere.Core/Common/IPlatformUpdateHandler.cs
  • src/Everywhere.Core/Common/SoftwareUpdate/DownloadServiceReleaseSource.cs
  • src/Everywhere.Core/Common/SoftwareUpdate/ISoftwareUpdater.cs
  • src/Everywhere.Core/Common/SoftwareUpdate/ITerminalUpdateHandler.cs
  • src/Everywhere.Core/Common/SoftwareUpdate/IUpdateReleaseSource.cs
  • src/Everywhere.Core/Common/SoftwareUpdate/SoftwareUpdateOperation.cs
  • src/Everywhere.Core/Common/SoftwareUpdate/SoftwareUpdater.cs
  • src/Everywhere.Core/Common/SoftwareUpdate/UpdateAssetMetadata.cs
  • src/Everywhere.Core/Common/SoftwareUpdate/UpdateReleaseJsonSerializerContext.cs
  • src/Everywhere.Core/I18N/Strings.de.resx
  • src/Everywhere.Core/I18N/Strings.es.resx
  • src/Everywhere.Core/I18N/Strings.fr.resx
  • src/Everywhere.Core/I18N/Strings.it.resx
  • src/Everywhere.Core/I18N/Strings.ja.resx
  • src/Everywhere.Core/I18N/Strings.ko.resx
  • src/Everywhere.Core/I18N/Strings.pt-br.resx
  • src/Everywhere.Core/I18N/Strings.resx
  • src/Everywhere.Core/I18N/Strings.ru.resx
  • src/Everywhere.Core/I18N/Strings.tr.resx
  • src/Everywhere.Core/I18N/Strings.zh-hans.resx
  • src/Everywhere.Core/I18N/Strings.zh-hant-hk.resx
  • src/Everywhere.Core/I18N/Strings.zh-hant.resx
  • src/Everywhere.Core/ViewModels/Pages/ChangeLogViewModel.cs
  • src/Everywhere.Core/Views/Chat/SoftwareUpdateButton.axaml.cs
  • src/Everywhere.Core/Views/Configuration/SoftwareUpdateControl.axaml.cs
  • src/Everywhere.Core/Views/OOBE/ChangeLogView.axaml
  • src/Everywhere.Mac/Common/MacUpdateHandler.cs
  • src/Everywhere.Mac/Common/MacUpdateReleaseSource.cs
  • src/Everywhere.Mac/Program.cs
  • src/Everywhere.Windows/Common/WindowsUpdateHandler.cs
  • src/Everywhere.Windows/Common/WindowsUpdateReleaseSource.cs
  • src/Everywhere.Windows/Program.cs
  • tests/Everywhere.Core.Tests/Common/SoftwareUpdate/DownloadServiceReleaseSourceTests.cs
  • tests/Everywhere.Core.Tests/Common/SoftwareUpdate/SoftwareUpdaterLifecycleTests.cs
  • tests/Everywhere.Core.Tests/Common/SoftwareUpdate/TestDownloadServiceReleaseSource.cs
  • tests/Everywhere.Core.Tests/Common/SoftwareUpdate/UpdatePresentationTests.cs
  • tests/Everywhere.Linux.Tests/LinuxUpdateReleaseSourceTests.cs
  • tests/Everywhere.Windows.Tests/Common/WindowsUpdateReleaseSourceTests.cs
  • tools/installer.iss
Files with no reviewable changes: 1

  • src/Everywhere.Core/Common/SoftwareUpdate/ITerminalUpdateHandler.cs

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review.

@DearVa
DearVa merged commit 58f808c into main Dec 2, 2026
2 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators Dec 2, 2026
@DearVa
DearVa deleted the refactor/software-update branch December 2, 2026 03:04
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant