Skip to content

Require installing a new release before use - #67

Merged
SamiPr0 merged 2 commits into
mainfrom
feat/mandatory-updates
Oct 6, 2026
Merged

SamiPr0 merged 2 commits into
mainfrom
feat/mandatory-updates

Conversation

@SamiPr0

@SamiPr0 SamiPr0 commented Oct 6, 2026

Copy link
Copy Markdown
Owner

What changes for the user

When a newer release exists, PoolTrack no longer shows a dismissible dialog. The whole app is replaced by an "Update required" screen until the update is installed:

State Screen Way out
Update known "Update required", version, size and release notes Update only, no "Later"
Downloading progress Cancel returns to "Update required" (still blocked)
Downloaded "Ready to install", or how to allow installs Install
Failed the error Retry only, no "Close"

It shows before sign-in too, so nobody can use the app on an old version.

Rules

  • Re-check on resume: besides app start, the app checks again when it comes back to the foreground, at most every 15 minutes (RECHECK_INTERVAL_MILLIS). Leaving the app open in the background doesn't dodge an update. It's spaced out to stay far below GitHub's 60 requests/hour limit for unauthenticated calls.
  • Offline stays usable: if the check can't reach GitHub, nothing is known, so the app stays usable. The pass must stay reachable at the pool entrance even without signal.

Code

  • UpdateDialog becomes UpdateRequiredScreen, a full screen in place of an AlertDialog. PoolTrackApp returns it instead of the rest of the app while UpdateUiState isn't None.
  • UpdateViewModel:
    • onDismiss is removed;
    • onCancelDownload goes back to Available;
    • onResume re-checks when usable and the last check is old enough;
    • an injectable now clock for tests.

Tests

  • UpdateRequiredScreenTest, 13 tests: no "Later"/"Close", Cancel only while downloading, Retry only on failure, full flow with the view model.
  • UpdateViewModelTest, 19 tests: cancel keeps the update required; re-check before, at and after the interval; no re-check while blocked; a re-check that finds nothing keeps the app usable.
  • MainActivityTest:
    • app blocked (no nav bars) when an update exists;
    • blocked before sign-in too;
    • usable when no update is known.
  • ./gradlew ktfmtCheck check: BUILD SUCCESSFUL.

Shipping it

Phones on 1.1.1 still have the old dismissible dialog, so they'll see the release that contains this as a normal "Update available". From that version on, updates are mandatory. To release: bump appVersionName (e.g. 1.2.0), merge, tag.

🤖 Generated with Claude Code

SamiPr0 and others added 2 commits October 6, 2026 20:39
A newer release used to be offered in a dialog that could be dismissed
with "Later". It now replaces the whole app with an "Update required"
screen until the update is installed: no Later, no Close. Cancelling a
download goes back to the Update button, and a failed download offers
Retry only.

The app also checks again when it comes back to the foreground, at most
every 15 minutes, so a long-running session can't dodge an update.

If the check can't reach GitHub, e.g. offline at the pool, the app
stays usable so the pass can still be shown at the entrance.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Ships mandatory updates. Phones on 1.1.1 see it as a normal update
offer; from 1.2.0 on, every update is required.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@SamiPr0
SamiPr0 merged commit 1d702c9 into main Oct 6, 2026
3 checks passed
@SamiPr0
SamiPr0 deleted the feat/mandatory-updates branch October 6, 2026 18:54
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