feat: surface app version and update awareness#223
Merged
Conversation
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.
Summary
Adds a Help → About dialog showing the host version and a row per loaded plugin. Plugins that opt in via a new capability interface get a per-row "Check for updates" affordance; the host has its own check against the public releases endpoint. The host never hardcodes a plugin's update channel.
Design
A new capability interface in
SharpFM.Plugin:Opt-in, not a member of
IPlugin:IPlugin.Versionalready covers "what am I running?" — every plugin reports it. Check-for-updates is a separate concern.IPanelPlugin : IPluginopt-in extension inSharpFM.Plugin.UI.Each plugin decides where its updates live. The host iterates
[host, ...plugins]uniformly and runsCheckForUpdatesAsyncon entries that opted in. The host has no compile-time knowledge of any specific plugin's release source.Host self-check
HostUpdateCheckimplementsIUpdateCheckableagainstapi.github.com/repos/fuzzzerd/SharpFM/releases/latest:/releases/latestendpoint already excludes pre-release tags, so beta-channel filtering is the endpoint's responsibility, not ours.vprefix from tags and+commit-hashbuild metadata from the runningAssemblyInformationalVersionbefore comparing.OperationCanceledException— fail silently if GitHub is unreachable.User-Agentheader (GitHub rejects requests without one).About dialog UX
[ExcludeFromCodeCoverage](Avalonia plumbing); the view models behind it are fully unit-tested.Tests
IPlugin-derived), record equality.HttpMessageHandlerfor newer/equal/older versions, 404, network exception, malformed JSON, cancellation propagation,v-prefix and+commitstripping, release-notes capture.CanCheckForUpdatesgating, status transitions, fail-silent on exceptions, INPC onStatus, cancellation propagation.IUpdateCheckable, homepage URL exposed.All 1454 tests pass (+28 new).
Test plan