WsprryPi Automatic Update Polling
Architecture Overview
WsprryPi uses two independent background update systems that share common UI infrastructure but serve different purposes.
User Interface Build Polling
The UI build poller detects local web UI file changes and prompts the browser to reload when the active interface is outdated.
It works by:
Generating a
ui_build_idfrom tracked PHP, JS, and CSS file metadataPolling the local
/versionendpoint every 60 secondsComparing the loaded build ID against the current server build ID
Showing a
UI refresh requiredmodal when they differ
This mechanism is entirely local and does not contact GitHub.
Purpose:
Detect live UI changes during development
Force asset cache invalidation
Reload stale browser tabs after UI updates
GitHub Application Update Polling
The GitHub update poller checks whether the installed WsprryPi build is behind upstream releases or branch commits.
It works by:
Polling update metadata once per hour
Fetching GitHub release and branch information
Comparing the installed SHA/version against upstream targets
Applying branch-aware update policy rules
Showing an
Update availablemodal when appropriate
Purpose:
Notify users about newer releases
Support branch-based prerelease workflows
Detect newer commits on development branches
Technical Overview
Current implementation lives primarily in WsprryPi-UI/data/site.js, with UI build metadata from WsprryPi-UI/data/ui_version.php and /version metadata from src/web_server.cpp or WsprryPi-UI/data/version.php.
Two Separate Pollers
WsprryPi has two update mechanisms:
UI build-id polling detects whether the web UI files changed and prompts the browser to reload.
GitHub/app update polling checks whether the installed WsprryPi build is behind an upstream GitHub branch or release.
They share the /version endpoint and the shared Bootstrap #confirmModal, but they have separate timers, comparison rules, cache behavior, and dismissal state.
For ordinary update checks and notifications, use the Maintenance page. The pages below are implementation references for development and validation.
Detailed References
UI Build Polling documents build identity, asset cache invalidation, polling, refresh comparisons, and retry safeguards.
GitHub Update Polling documents version metadata, comparison flow, and branch-aware release policy.
Update Prompts and Stored State documents modal ownership, notification paths, dismissal behavior, local-storage keys, and testing controls.
Developer Validation and Safeguards collects regression workflows, debug calls, and duplicate-polling, cache, and policy protections.