Repository navigation
release: 1.2.0 — suppress post-run banner after update (#42) - #43
Merged
Merged
Conversation
The post-run banner compared the latest tag with the running process's version, which is still the old binary after an install swaps the files, so right after `update` it offered the version just installed. It also repeated `update check` and a declined `update`. An internal process-wide UpdateSession now records that the update UX has shown the latest release (set by UpdateCommand and UpdateCheckCommand) and which tag this process installed (set by UpdateInstaller on success). RenderIfAvailable is a no-op in either case. New public UpdateBanner.Suppress() lets apps with their own update UX do the same. Tests isolate the static state per test via an AsyncLocal test scope rather than a serial collection, so writers such as the installer tests need no coordination. Version 1.2.0; PackageValidationBaselineVersion moves to 1.1.0. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Closes #42.
Problem
UpdateBanner.RenderIfAvailablecompared the latest tag with the running process's version. Afterupdateinstalls, the process is still the old binary, so the banner offered the version just installed. It also repeatedupdate checkand a declinedupdate.Fix
UpdateSessionmarker:UpdateCommand/UpdateCheckCommandmark it once they have shown "Latest release: …" (install, decline, failure, up to date).UpdateInstallerrecords the installed tag after a successful swap, which covers apps callingISelfUpdater.InstallAsyncfrom their own command.RenderIfAvailablereturns early (before waiting on the task) when the marker is set, and stays silent when the available release is not newer than the installed one.UpdateBanner.Suppress()(XML-documented) for apps with their own update UX.Tests
New banner, command and installer tests. On both TFMs they fail with the fix removed and pass with it. Static state is isolated per test through an internal
AsyncLocaltest scope (UpdateSession.BeginTestScope()) rather than a non-parallel collection. Only tests that assert on the marker open a scope, so tests that write it, such as the installer tests, need no coordination.Release
Version1.1.0 → 1.2.0 (additive API, so minor).PackageValidationBaselineVersion1.0.1 → 1.1.0 (the last shipped release, restorable on nuget.org).[1.2.0]and README note.Locally: Release build clean, pack/validation passes, 426/426 tests on net8.0 + net10.0.
🤖 Generated with Claude Code