feat: display latest dev version in settings for non-main builds#582
feat: display latest dev version in settings for non-main builds#582dnzxy merged 5 commits intonightscout:devfrom
Conversation
Add display of latest dev version (x.x.x.x format) in Settings for all non-main branch builds. Shows version with visual indicators for update status. Uses same caching and comparison logic as main version checking. - Only visible when not on main branch builds - Orange color with arrow icon when newer version available - Secondary color with hammer icon when on latest version - 24-hour cache to minimize API calls - Properly parses APP_DEV_VERSION for x.x.x.x format - Added localization entries for new strings
Review and TestI plan to approve this from review and test. Formatting CommentI noticed when reviewing that the comments in this PR use /** Most files in Trio use // on each line that is a comment. That format is my personal preference because when searching for content, it is immediately obvious if a line is code or comment. I assume there is a preferred style for Trio.
This command indicates // is used for 5040 lines, whereas /** is used 30 times. These are the Trio/Sources files that contain instances of |
marionbarker
left a comment
There was a problem hiding this comment.
Reviewed and tested. Left comment questioning comment format.
- Replaced all /// single-line documentation comments with // - Converted multi-line /** */ comments to // style - Maintains consistency with Trio's predominant comment style - Addresses PR nightscout#582 review feedback about comment formatting
@marionbarker Fixed |
marionbarker
left a comment
There was a problem hiding this comment.
Test again after commit 71a278b.
Works as expected for branches named main and pr582 (with and without a modification to the APP_DEV_VERSION).
kingst
left a comment
There was a problem hiding this comment.
I left a few questions / comments / suggestions. I'm not that familiar with this module but hopefully my feedback is useful.
Trio/Sources/Services/AppVersionChecker/AppVersionChecker.swift
Outdated
Show resolved
Hide resolved
Trio/Sources/Services/AppVersionChecker/AppVersionChecker.swift
Outdated
Show resolved
Hide resolved
|
What is the status here wrt. to Sam's comments on his review? @kingst @Sjoerd-Bo3 |
|
We'd like to move to |
I have the changes locally. Will push when home. |
|
Hi, what's the status here? |
Signed-off-by: Sjoerd Bozon <sjoerd.bozon@gmail.com>
- Convert refreshVersionInfo to async/await with completion handler wrapper - Convert private checkForNewVersion to async/await with completion handler wrapper - Convert fetchDataAndUpdateCache to async/await with parallel data fetching - Convert checkAndNotifyVersionStatus to use async/await with @mainactor - Update SettingsRootView to use async methods with Task blocks - Simplify parseVersionFromConfig condition by checking for "DEV" instead of "APP_DEV_VERSION"
- Add async version of fetchData method - Convert checkForNewDevVersion to async/await with completion handler wrapper - Convert fetchDevVersionAndUpdateCache to async/await
|
Addressed Comments from @kingst, ready for review and merge |
MikePlante1
left a comment
There was a problem hiding this comment.
Approval based on testing, not code review:
| installed branch name | APP_VERSION | APP_DEV_VERSION | latest version (0.2.7) | latest dev (0.5.1.4) | new version alert |
|---|---|---|---|---|---|
| main | 0.2.6 | 0.2.6 | orange | yes | |
| main | 0.2.7 | 0.2.7 | green | no | |
| dev | 0.2.7 | 0.2.7 | green | orange | no |
| test | 0.2.6 | 0.2.6 | orange | orange | yes |
| test | 0.2.7 | 0.2.7 | green | orange | no |
| test | 0.5.1 | 0.5.1.3 | green | orange | no |
| test | 0.5.1 | 0.5.1.4 | green | gray | no |
…al-temp Implement low glucose suspend and skip neutral temp dosing logic
Summary
Description
This enhancement improves version tracking for development builds by fetching and displaying the latest available dev version from GitHub. The feature:
Implementation Details
AppVersionCheckerto fetch latest dev releasesTest plan
Screenshots