Skip to content

Tap the version row in Settings to check for updates now - #52

Merged
kjeldahl merged 1 commit into
mainfrom
forge/check-updates
Nov 12, 2026
Merged

kjeldahl merged 1 commit into
mainfrom
forge/check-updates

Conversation

@kjeldahl

Copy link
Copy Markdown
Owner

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:

  • Tapping it calls checkForUpdateNow() (src/lib/update-check.ts:101), which skips the throttle.
  • The row reports which answer it got. Returning null used to cover both "nothing newer" and "the check could not run", so those were indistinguishable to the user. You now get Checking for updates… with a spinner, then either 0.9.0 → 0.10.0 (arrow opens the release page), · Up to date, or Couldn't reach GitHub — try again later.
  • The result is written to the same storage keys the throttled check uses, so the banner and the row agree afterwards and the 24 h clock restarts from this lookup.
  • Not tappable on iOS: TestFlight and the App Store update themselves, and pointing an iOS user at a GitHub APK is worse than saying nothing.

The three-way classification is classifyCheck in src/lib/update-check-policy.ts, so it is covered by node --test (3 new tests). Locale keys were added to en and zh-Hans together, which catalog-parity.test.ts enforces.

Verification

463 tests pass, tsc --noEmit clean. Not exercised on a device: the change is one TouchableOpacity plus two state values, and the network path is the same code that already runs on mount.

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.
@kjeldahl
kjeldahl merged commit e64727f into main Nov 12, 2026
8 checks passed
@kjeldahl
kjeldahl deleted the forge/check-updates branch November 12, 2026 11:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant