Developer Validation and Safeguards
This page collects the update-check regression workflows, debug calls, and safeguards. Use it with UI Build Polling and GitHub Update Polling when validating a specific polling path.
Run the Comparison Regression Test
node src/tests/update_check_comparison_test.js
Simulate a Non-Main Branch Update
git checkout my-feature
git commit --allow-empty -m "test update polling"
git push origin my-feature
Load an older local build from the same branch. The GitHub compare status should become ahead, causing an update notification.
Test Main Branch Release Policy
git checkout main
git commit --allow-empty -m "test main ahead without release"
git push origin main
A main commit difference alone should not show an app update. A newer tagged GitHub release is required.
Useful Debug Console Calls
updateWsprryPiVersion();
forceUpdateCheckNow();
checkUiBuildVersion();
readUpdateModalState();
isUpdateCheckDisabled();
setUpdateCheckDisabled(false);
Safeguards
uiBuildPollTimerprevents duplicate UI polling intervalsgithubUpdatePollTimerprevents duplicate GitHub polling intervalsuiBuildVersionCheckRunningprevents overlapping UI build checksuiRefreshPromptActiveprevents duplicate UI reload promptsdata-update-check-activeprotects shared modal ownershipreleaseUpdateCheckModalOwnership()clears update modal handlers before generic confirmation dialogs reuse the modal/version.phpsends:
Cache-Control: no-store, no-cache, must-revalidate, max-age=0
GitHub API fetches use:
cache: "no-store"
UI assets use build-id query parameters for cache busting
Branch-aware policy prevents
mainfrom reporting unreleased commits as user-facing updates