Repository navigation
Tap the version row in Settings to check for updates now - #52
Merged
Merged
Conversation
The throttled check answers at most once per 24h, so a release published after the app's last successful check stays invisible until the throttle expires. The version row is now a button: it bypasses the throttle, and says which answer it got (new version / up to date / could not reach GitHub) instead of leaving the two silences indistinguishable.
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.
Why
The in-app update check answers at most once per 24 h, and only when the sessions-tab banner or the Settings version row mounts (
src/lib/update-check-policy.ts:39). So a release published after the app's last successful check stays invisible until the throttle expires, and there was no way to ask for one — restarting didn't help.What
The version row in Settings is now a button:
checkForUpdateNow()(src/lib/update-check.ts:101), which skips the throttle.nullused to cover both "nothing newer" and "the check could not run", so those were indistinguishable to the user. You now getChecking for updates…with a spinner, then either0.9.0 → 0.10.0(arrow opens the release page),· Up to date, orCouldn't reach GitHub — try again later.The three-way classification is
classifyCheckinsrc/lib/update-check-policy.ts, so it is covered bynode --test(3 new tests). Locale keys were added toenandzh-Hanstogether, whichcatalog-parity.test.tsenforces.Verification
463 tests pass,
tsc --noEmitclean. Not exercised on a device: the change is oneTouchableOpacityplus two state values, and the network path is the same code that already runs on mount.