feature: Added update notification and download links per platform#362
Merged
PartyDonut merged 2 commits intodevelopfrom Jun 1, 2025
Merged
feature: Added update notification and download links per platform#362PartyDonut merged 2 commits intodevelopfrom
PartyDonut merged 2 commits intodevelopfrom
Conversation
Contributor
Reviewer's GuideThis PR adds a GitHub‐based update checker that polls for new releases, stores user preferences in the settings model, and surfaces update notifications and download links in the UI per platform. Sequence diagram for Automatic Update Check ProcesssequenceDiagram
participant Timer
participant UpdateProvider
participant ClientSettingsProvider
participant UpdateChecker
participant GitHubAPI
participant HasNewUpdateProvider
participant SettingsUserIcon
Timer->>UpdateProvider: Triggers periodic check (_fetchLatest)
UpdateProvider->>ClientSettingsProvider: Read checkForUpdates setting
alt checkForUpdates is true
UpdateProvider->>UpdateChecker: fetchRecentReleases()
UpdateChecker->>GitHubAPI: GET /repos/{owner}/{repo}/releases
GitHubAPI-->>UpdateChecker: Release data (JSON)
UpdateChecker-->>UpdateProvider: List~ReleaseInfo~
UpdateProvider->>UpdateProvider: Update state (UpdatesModel)
alt New update found AND (lastViewedUpdate != latestRelease.version)
UpdateProvider->>HasNewUpdateProvider: Update state (true)
HasNewUpdateProvider->>SettingsUserIcon: Update UI (show indicator)
end
end
Sequence diagram for User Viewing Update Details and InteractionsequenceDiagram
actor User
participant SettingsScreen
participant AboutSettingsRoute
participant SettingsUpdateInformation
participant UpdateProvider
participant ClientSettingsProvider
participant Browser
User->>SettingsScreen: Navigates to Settings
SettingsScreen->>HasNewUpdateProvider: Check for new update status
alt New update available (via HasNewUpdateProvider)
SettingsScreen-->>User: Displays "New Release Found" card
User->>SettingsScreen: Taps "New Release Found" card (navigates to About)
else User navigates to "About" directly
User->>SettingsScreen: Taps "About" section
end
SettingsScreen->>AboutSettingsRoute: Navigate
AboutSettingsRoute->>SettingsUpdateInformation: Display
SettingsUpdateInformation->>UpdateProvider: Get UpdatesModel (releases)
UpdateProvider-->>SettingsUpdateInformation: UpdatesModel
SettingsUpdateInformation-->>User: Show release list (versions, changelogs, download links)
opt User views latest release details
SettingsUpdateInformation->>ClientSettingsProvider: update(lastViewedUpdate = latestRelease.version)
ClientSettingsProvider-->>ClientSettingsProvider: Persist change
SettingsUpdateInformation->>HasNewUpdateProvider: (Potentially causes update to false)
end
opt User clicks download link
User->>SettingsUpdateInformation: Taps download link for a release
SettingsUpdateInformation->>Browser: Opens GitHub URL for download
end
opt User toggles update check setting
User->>SettingsUpdateInformation: Toggles "Check for Updates" switch
SettingsUpdateInformation->>ClientSettingsProvider: update(checkForUpdates = newValue)
ClientSettingsProvider-->>ClientSettingsProvider: Persist change
end
File-Level Changes
Assessment against linked issues
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Contributor
There was a problem hiding this comment.
Hey @PartyDonut - I've reviewed your changes - here's some feedback:
- In
SettingsUpdateInformation.initState, you’re marking updates as viewed on widget build—consider moving that into a user action (e.g. when they expand or tap the update) so updates aren’t flagged as seen prematurely. - Enhance
UpdateChecker.fetchRecentReleaseswith proper exception handling, retries and a GitHub‐compatibleUser-Agentheader to avoid silent failures and API rate limits. - The
hasNewUpdateProviderusesdefaultTargetPlatformwhich won’t catch web or custom builds correctly—consider a more robust platform check (e.g. usingkIsWebor explicit desktop flags).
Here's what I looked at during the review
- 🟡 General issues: 4 issues found
- 🟢 Security: all looks good
- 🟢 Review instructions: all looks good
- 🟢 Testing: all looks good
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Julien9969
pushed a commit
to Julien9969/Fladder
that referenced
this pull request
Sep 7, 2025
…onutWare#362) Co-authored-by: PartyDonut <PartyDonut@users.noreply.github.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.
Pull Request Description
Implements a update notification the user can disable if wanted.
Only gives a notification because updating desktop with the different amount of packages would be less then trivial.
Updates are shown on mobile devices but no notification by default because the update using appstores.
Issue Being Fixed
Resolves #154