Have the refresh button check for a new build too
The version poller already diffs /api/version against the manifest captured at boot -- hot-swapping changed CSS, reloading for changed JS/HTML once playback allows -- but only on its own 60s tick or when the tab regains visibility. Pressing refresh now runs that same check in the background, so a tab left open across a deploy picks the new build up when the user asks for fresh content rather than up to a minute later. App.version.checkNow() exposes it; with no baseline (the endpoint was down at boot) it just adopts the current manifest, since there is nothing to compare against yet. Verified against the running app: appending to style.css and pressing refresh swapped the tag to style.css?v=<hash> with the page still alive, and appending to a .js file reloaded the page. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QBDkEXP4htyXTCZUwMLphd
This commit is contained in:
@@ -461,6 +461,13 @@ App.ui = App.ui || {};
|
||||
|
||||
if (reloadChannelBtn) {
|
||||
reloadChannelBtn.onclick = () => {
|
||||
// Refresh means "give me the current everything": the videos
|
||||
// below, and the app itself. The version check runs in the
|
||||
// background and only acts if the deployed assets actually
|
||||
// differ from what this tab is running.
|
||||
if (App.version && typeof App.version.checkNow === 'function') {
|
||||
App.version.checkNow();
|
||||
}
|
||||
App.videos.resetAndReload();
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user